]> gcc.gnu.org Git - gcc.git/blob - gcc/c-family/ChangeLog
Daily bump.
[gcc.git] / gcc / c-family / ChangeLog
1 2022-10-04 Jakub Jelinek <jakub@redhat.com>
2
3 * c-omp.cc (c_omp_directives): Uncomment begin declare target
4 entry.
5
6 2022-10-03 Patrick Palka <ppalka@redhat.com>
7
8 * c-common.cc (c_common_reswords): Use RID_IS_SAME instead of
9 RID_IS_SAME_AS.
10
11 2022-10-03 Joseph Myers <joseph@codesourcery.com>
12
13 * c-cppbuiltin.cc (builtin_define_float_constants): Do not
14 special-case __*_EPSILON__ setting for IBM long double for C2x.
15
16 2022-09-30 Patrick Palka <ppalka@redhat.com>
17
18 * c-common.cc (c_common_reswords): Use cp/cp-trait.def to handle
19 C++ traits.
20 * c-common.h (enum rid): Likewise.
21
22 2022-09-29 Joseph Myers <joseph@codesourcery.com>
23
24 * c-lex.cc (c_common_has_attribute): Handle noreturn attribute for
25 C.
26
27 2022-09-29 Patrick Palka <ppalka@redhat.com>
28
29 * c-common.cc (c_common_reswords): Add __remove_cv,
30 __remove_reference and __remove_cvref.
31 * c-common.h (enum rid): Add RID_REMOVE_CV, RID_REMOVE_REFERENCE
32 and RID_REMOVE_CVREF.
33
34 2022-09-27 Marek Polacek <polacek@redhat.com>
35
36 PR c++/101165
37 PR c++/106882
38 * c-cppbuiltin.cc (c_cpp_builtins): Define __cpp_implicit_move.
39
40 2022-09-27 Marek Polacek <polacek@redhat.com>
41
42 * c-format.cc (c_keywords): Drop nothrow.
43
44 2022-09-27 Jakub Jelinek <jakub@redhat.com>
45
46 PR c++/106651
47 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
48 __cpp_static_call_operator=202207L for C++23.
49
50 2022-09-27 Jakub Jelinek <jakub@redhat.com>
51
52 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ASSUME,
53 PRAGMA_OMP_ASSUMES and PRAGMA_OMP_BEGIN. Rename
54 PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
55 * c-pragma.cc (omp_pragmas): Add assumes and begin.
56 For end rename PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
57 (omp_pragmas_simd): Add assume.
58 * c-common.h (c_omp_directives): Declare.
59 * c-omp.cc (omp_directives): Rename to ...
60 (c_omp_directives): ... this. No longer static. Uncomment
61 assume, assumes, begin assumes and end assumes entries.
62 In end declare target entry rename PRAGMA_OMP_END_DECLARE_TARGET
63 to PRAGMA_OMP_END.
64 (c_omp_categorize_directive): Adjust for omp_directives to
65 c_omp_directives renaming.
66
67 2022-09-27 Jakub Jelinek <jakub@redhat.com>
68
69 PR c++/106652
70 PR c++/85518
71 * c-common.cc (c_common_reswords): Change _Float{16,32,64,128} and
72 _Float{32,64,128}x flags from D_CONLY to 0.
73 (shorten_binary_op): Punt if common_type returns error_mark_node.
74 (shorten_compare): Likewise.
75 (c_common_nodes_and_builtins): For C++ record _Float{16,32,64,128}
76 and _Float{32,64,128}x builtin types if available. For C++
77 clear float128t_type_node.
78 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
79 __STDCPP_FLOAT{16,32,64,128}_T__ for C++23 if supported.
80 * c-lex.cc (interpret_float): For q/Q suffixes prefer
81 float128t_type_node over float128_type_node. Allow
82 {f,F}{16,32,64,128} suffixes for C++ if supported with pedwarn
83 for C++20 and older. Allow {f,F}{32,64,128}x suffixes for C++
84 with pedwarn. Don't call excess_precision_type for C++.
85
86 2022-09-26 Marek Polacek <polacek@redhat.com>
87
88 PR c++/106656
89 * c-cppbuiltin.cc (c_cpp_builtins): Update value of __cpp_char8_t
90 for C++20.
91
92 2022-09-23 Marek Polacek <polacek@redhat.com>
93
94 PR c++/106784
95 * c-common.cc (c_common_reswords): Add __is_convertible and
96 __is_nothrow_convertible.
97 * c-common.h (enum rid): Add RID_IS_CONVERTIBLE and
98 RID_IS_NOTHROW_CONVERTIBLE.
99
100 2022-09-22 David Malcolm <dmalcolm@redhat.com>
101
102 PR c/106830
103 * c-warn.cc (check_for_xor_used_as_pow): Don't try checking
104 values that don't fit in uhwi.
105
106 2022-09-15 Richard Biener <rguenther@suse.de>
107
108 * c-common.h (build_void_list_node): Remove.
109 * c-common.cc (c_common_nodes_and_builtins): Do not initialize
110 void_list_node.
111
112 2022-09-09 Jan-Benedict Glaw <jbglaw@lug-owl.de>
113
114 * c-format.cc (convert_format_name_to_system_name): Fix warning.
115
116 2022-09-07 Joseph Myers <joseph@codesourcery.com>
117
118 * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY
119 for alignas, alignof, bool, false, static_assert, thread_local and
120 true.
121
122 2022-09-07 Jakub Jelinek <jakub@redhat.com>
123
124 * c.opt (Winvalid-utf8): Use ObjC instead of objC. Remove
125 " in comments" from description.
126 (Wunicode): New option.
127
128 2022-09-06 Jakub Jelinek <jakub@redhat.com>
129
130 PR c/106836
131 * c-omp.cc (c_omp_split_clauses): Handle OMP_CLAUSE_DOACROSS.
132
133 2022-09-03 Jakub Jelinek <jakub@redhat.com>
134
135 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DOACROSS.
136 * c-omp.cc (c_finish_omp_depobj): Check also for OMP_CLAUSE_DOACROSS
137 clause and diagnose it. Don't handle OMP_CLAUSE_DEPEND_SOURCE and
138 OMP_CLAUSE_DEPEND_SINK. Assert kind is not OMP_CLAUSE_DEPEND_INVALID.
139
140 2022-09-02 David Malcolm <dmalcolm@redhat.com>
141
142 PR c/90885
143 * c-common.h (check_for_xor_used_as_pow): New decl.
144 * c-lex.cc (c_lex_with_flags): Add DECIMAL_INT to flags as appropriate.
145 * c-warn.cc (check_for_xor_used_as_pow): New.
146 * c.opt (Wxor-used-as-pow): New.
147
148 2022-09-01 Jason Merrill <jason@redhat.com>
149
150 * c-common.cc (c_common_nodes_and_builtins): Set TREE_STRING_FLAG on
151 char8_t.
152 (braced_list_to_string): Check for char-sized elements.
153
154 2022-09-01 Jakub Jelinek <jakub@redhat.com>
155
156 PR c++/106655
157 * c.opt (-Winvalid-utf8): New warning.
158 * c-opts.cc (c_common_handle_option) <case OPT_finput_charset_>:
159 Set cpp_opts->cpp_input_charset_explicit.
160 (c_common_post_options): If -finput-charset=UTF-8 is explicit
161 in C++23, enable -Winvalid-utf8 by default and if -pedantic
162 or -pedantic-errors, make it a pedwarn.
163
164 2022-08-31 Joseph Myers <joseph@codesourcery.com>
165
166 * c-attribs.cc (handle_deprecated_attribute): Check and pedwarn
167 for LABEL_DECL.
168 * c-common.cc (c_add_case_label): Add argument ATTRS. Call
169 decl_attributes.
170 * c-common.h (do_case, c_add_case_label): Update declarations.
171 * c-lex.cc (c_common_has_attribute): For C, produce a result of
172 201910 for fallthrough and 202106 for maybe_unused.
173
174 2022-08-26 Marek Polacek <polacek@redhat.com>
175
176 PR c++/81159
177 * c.opt (Wself-move): New option.
178
179 2022-08-26 Jakub Jelinek <jakub@redhat.com>
180
181 * c-common.cc (check_builtin_function_arguments): Handle
182 BUILT_IN_ISSIGNALING.
183
184 2022-08-26 Jakub Jelinek <jakub@redhat.com>
185
186 PR c++/106648
187 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
188 __cpp_named_character_escapes to 202207L.
189
190 2022-08-25 Marek Polacek <polacek@redhat.com>
191
192 * c-common.cc (c_common_reswords): Enable nullptr in C2X.
193 (c_common_nodes_and_builtins): Create the built-in node for nullptr.
194 * c-common.h (enum c_tree_index): Add CTI_NULLPTR, CTI_NULLPTR_TYPE.
195 (struct c_common_resword): Resize the disable member.
196 (D_C2X): Add.
197 (nullptr_node): Define.
198 (nullptr_type_node): Define.
199 (NULLPTR_TYPE_P): Define.
200 * c-pretty-print.cc (c_pretty_printer::simple_type_specifier): Handle
201 NULLPTR_TYPE.
202 (c_pretty_printer::direct_abstract_declarator): Likewise.
203 (c_pretty_printer::constant): Likewise.
204
205 2022-08-16 Tom Honermann <tom@honermann.net>
206
207 PR c++/106423
208 * c-opts.cc (c_common_post_options): Disable -Wc++20-compat
209 diagnostics in C++20 and later.
210 * c.opt (Wc++20-compat): Enable hooks for the preprocessor.
211
212 2022-08-11 Marek Polacek <polacek@redhat.com>
213
214 PR middle-end/102633
215 * c-gimplify.cc (c_gimplify_expr) <case DECL_EXPR>: Don't call
216 suppress_warning here.
217
218 2022-08-08 Tom Honermann <tom@honermann.net>
219
220 PR preprocessor/106426
221 * c-opts.cc (c_common_post_options): Assign cpp_opts->unsigned_utf8char
222 subject to -fchar8_t, -fsigned-char, and/or -funsigned-char.
223
224 2022-08-08 Tom Honermann <tom@honermann.net>
225
226 * c-lex.cc (lex_string, lex_charconst): Use char8_t as the type
227 of CPP_UTF8CHAR and CPP_UTF8STRING when char8_t support is
228 enabled.
229 * c-opts.cc (c_common_post_options): Set flag_char8_t if
230 targeting C2x.
231
232 2022-07-31 Lewis Hyatt <lhyatt@gmail.com>
233
234 PR c++/66290
235 * c-common.h: Rename global done_lexing to
236 override_libcpp_locations.
237 * c-common.cc (c_cpp_diagnostic): Likewise.
238 * c-opts.cc (c_common_finish): Set override_libcpp_locations
239 (formerly done_lexing) immediately prior to calling cpp_finish ().
240
241 2022-07-27 Lewis Hyatt <lhyatt@gmail.com>
242
243 * c-ppoutput.cc (token_streamer::stream): Update input_location
244 prior to streaming each token.
245
246 2022-07-23 Immad Mir <mirimmad@outlook.com>
247
248 * c-attribs.cc: (c_common_attribute_table): add three new attributes
249 namely: fd_arg, fd_arg_read and fd_arg_write.
250 (handle_fd_arg_attribute): New.
251
252 2022-07-15 Marek Polacek <polacek@redhat.com>
253
254 PR c++/104477
255 * c-common.cc (c_common_reswords): Add
256 __reference_constructs_from_temporary and
257 __reference_converts_from_temporary.
258 * c-common.h (enum rid): Add RID_REF_CONSTRUCTS_FROM_TEMPORARY and
259 RID_REF_CONVERTS_FROM_TEMPORARY.
260
261 2022-07-15 Jonathan Wakely <jwakely@redhat.com>
262
263 * c-format.cc (class range_label_for_format_type_mismatch):
264 Adjust to new label_text API.
265
266 2022-07-11 Lewis Hyatt <lhyatt@gmail.com>
267
268 PR preprocessor/106252
269 * c-pragma.cc (handle_pragma_diagnostic_impl): Don't look up the
270 option argument prior to verifying the option was found.
271
272 2022-07-07 David Malcolm <dmalcolm@redhat.com>
273
274 * c-format.cc (range_label_for_format_type_mismatch::get_text):
275 Update for removal of label_text::maybe_free in favor of automatic
276 memory management.
277
278 2022-07-06 Lewis Hyatt <lhyatt@gmail.com>
279
280 PR preprocessor/53920
281 PR c++/53431
282 * c-common.cc (c_option_is_from_cpp_diagnostics): New function.
283 * c-common.h (c_option_is_from_cpp_diagnostics): Declare.
284 (c_pp_stream_token): Declare.
285 * c-ppoutput.cc (init_pp_output): Refactor logic about skipping
286 pragmas to...
287 (should_output_pragmas): ...here. New function.
288 (token_streamer::stream): Support handling early pragmas.
289 (do_line_change): Likewise.
290 (c_pp_stream_token): New function.
291 * c-pragma.cc (struct pragma_diagnostic_data): New helper class.
292 (pragma_diagnostic_lex_normal): New function. Moved logic for
293 interpreting GCC diagnostic pragmas here.
294 (pragma_diagnostic_lex_pp): New function for parsing diagnostic pragmas
295 directly from libcpp.
296 (handle_pragma_diagnostic): Refactor into helper function...
297 (handle_pragma_diagnostic_impl): ...here. New function.
298 (handle_pragma_diagnostic_early): New function.
299 (handle_pragma_diagnostic_early_pp): New function.
300 (struct pragma_ns_name): Renamed to...
301 (struct pragma_pp_data): ...this. Add new "early_handler" member.
302 (c_register_pragma_1): Support early pragmas in the preprocessor.
303 (c_register_pragma_with_early_handler): New function.
304 (c_register_pragma): Support the new early handlers in struct
305 internal_pragma_handler.
306 (c_register_pragma_with_data): Likewise.
307 (c_register_pragma_with_expansion): Likewise.
308 (c_register_pragma_with_expansion_and_data): Likewise.
309 (c_invoke_early_pragma_handler): New function.
310 (c_pp_invoke_early_pragma_handler): New function.
311 (init_pragma): Add early pragma support for diagnostic pragmas.
312 * c-pragma.h (struct internal_pragma_handler): Add new early handler
313 members.
314 (c_register_pragma_with_early_handler): Declare.
315 (c_invoke_early_pragma_handler): Declare.
316 (c_pp_invoke_early_pragma_handler): Declare.
317
318 2022-07-05 Marek Polacek <polacek@redhat.com>
319
320 PR c++/105626
321 * c-format.cc (check_format_arg): Don't emit -Wformat warnings with
322 u8 strings.
323
324 2022-07-01 Marek Polacek <polacek@redhat.com>
325
326 PR c++/106111
327 * c-common.h (enum rid): Update RID_LAST_CXX20.
328
329 2022-06-30 Jonathan Wakely <jwakely@redhat.com>
330
331 * known-headers.cc (get_stdlib_header_for_name): Add <time.h>
332 names.
333
334 2022-06-24 Jason Merrill <jason@redhat.com>
335
336 PR c++/87729
337 PR c++/20423
338 * c.opt (Woverloaded-virtual): Add levels, include in -Wall.
339
340 2022-06-18 Jakub Jelinek <jakub@redhat.com>
341
342 * c-ubsan.cc (ubsan_instrument_division, ubsan_instrument_shift):
343 Use flag_sanitize_trap & SANITIZE_??? instead of
344 flag_sanitize_undefined_trap_on_error. If 2 sanitizers are involved
345 and flag_sanitize_trap differs for them, emit __builtin_trap only
346 for the comparison where trap is requested.
347 (ubsan_instrument_vla, ubsan_instrument_return): Use
348 lag_sanitize_trap & SANITIZE_??? instead of
349 flag_sanitize_undefined_trap_on_error.
350
351 2022-06-13 Jason Merrill <jason@redhat.com>
352
353 * c-ubsan.cc (ubsan_instrument_return): Use BUILTINS_LOCATION.
354
355 2022-05-27 Marek Polacek <polacek@redhat.com>
356
357 PR c/90658
358 * c-attribs.cc (get_priority): Check FUNCTION_DECL.
359
360 2022-05-27 Jakub Jelinek <jakub@redhat.com>
361
362 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ENTER.
363
364 2022-05-20 David Malcolm <dmalcolm@redhat.com>
365
366 * c-format.cc: Replace uses of "FINAL" and "OVERRIDE" with "final"
367 and "override".
368 * c-pretty-print.h: Likewise.
369
370 2022-05-18 Marek Polacek <polacek@redhat.com>
371
372 PR c/105131
373 * c.opt (Wenum-int-mismatch): New.
374
375 2022-05-18 Marek Polacek <polacek@redhat.com>
376
377 PR c++/105497
378 * c-warn.cc (c_do_switch_warnings): Don't warn about unhandled
379 enumerator when it was marked with attribute unused.
380
381 2022-05-18 Eric Botcazou <ebotcazou@adacore.com>
382
383 * c-ada-spec.cc (dump_ada_node) <COMPLEX_TYPE>: Deal with usual
384 floating-point complex types.
385 <POINTER_TYPE>: Do not use limited_with clause if the designated
386 type is a scalar type.
387
388 2022-05-17 Jakub Jelinek <jakub@redhat.com>
389
390 * c-omp.cc (c_finish_omp_depobj): Handle
391 OMP_CLAUSE_DEPEND_INOUTSET.
392
393 2022-05-16 Jason Merrill <jason@redhat.com>
394
395 PR c/105492
396 * c-attribs.cc (handle_mode_attribute): Don't fix broken typedefs
397 here.
398
399 2022-05-16 Martin Liska <mliska@suse.cz>
400
401 * c-common.cc (ARRAY_SIZE): Use ARRAY_SIZE.
402 (c_common_nodes_and_builtins): Likewise.
403 * c-format.cc (check_tokens): Likewise.
404 (check_plain): Likewise.
405 * c-pragma.cc (c_pp_lookup_pragma): Likewise.
406 (init_pragma): Likewise.
407 * known-headers.cc (get_string_macro_hint): Likewise.
408 (get_stdlib_header_for_name): Likewise.
409 * c-attribs.cc: Likewise.
410
411 2022-05-13 Richard Biener <rguenther@suse.de>
412
413 * c-omp.cc: Remove gimple-fold.h include.
414
415 2022-05-12 Jakub Jelinek <jakub@redhat.com>
416
417 * c-common.h (enum rid): Add RID_OMP_ALL_MEMORY.
418 * c-omp.cc (c_finish_omp_depobj): Don't build_fold_addr_expr
419 if null_pointer_node.
420
421 2022-05-11 Martin Liska <mliska@suse.cz>
422
423 PR target/105355
424 * c-opts.cc (c_common_handle_option): Change option name.
425 * c.opt: Remove Joined and use Separate option.
426
427 2022-05-09 Alex Coplan <alex.coplan@arm.com>
428
429 * c-common.h (get_dump_info): Delete.
430 * c-gimplify.cc (c_genericize): Get TDI_original dump file info
431 from the global dump_manager instead of the (now obsolete)
432 get_dump_info.
433 * c-opts.cc (original_dump_file): Delete.
434 (original_dump_flags): Delete.
435 (c_common_parse_file): Switch to using global dump_manager to
436 manage the original dump file; fix leak of dump file.
437 (get_dump_info): Delete.
438
439 2022-05-07 Marek Polacek <polacek@redhat.com>
440
441 PR c++/101833
442 PR c++/47634
443 * c-attribs.cc (positional_argument): Pass POS by reference. Deal
444 with FN being either a function declaration or function type. Use
445 maybe_adjust_arg_pos_for_attribute.
446 * c-common.cc (check_function_arguments): Maybe pass FNDECL down to
447 check_function_format.
448 * c-common.h (maybe_adjust_arg_pos_for_attribute): Declare.
449 (positional_argument): Adjust.
450 * c-format.cc (get_constant): Rename to ...
451 (validate_constant): ... this. Take EXPR by reference. Return bool
452 instead of tree.
453 (handle_format_arg_attribute): Don't overwrite FORMAT_NUM_EXPR by the
454 return value of validate_constant.
455 (decode_format_attr): Don't overwrite FORMAT_NUM_EXPR and
456 FIRST_ARG_NUM_EXPR by the return value of validate_constant.
457 (check_function_format): Adjust a parameter name.
458 (handle_format_attribute): Maybe pass FNDECL down to decode_format_attr.
459
460 2022-05-04 Marek Polacek <polacek@redhat.com>
461
462 * c-warn.cc (warnings_for_convert_and_check): Convert constants of type
463 char to int.
464
465 2022-04-30 Jason Merrill <jason@redhat.com>
466
467 PR c/100545
468 * c-attribs.cc (handle_mode_attribute): Copy attributes, aligned,
469 and typedef.
470 * c-common.cc (set_underlying_type): Add assert.
471
472 2022-04-26 Patrick Palka <ppalka@redhat.com>
473
474 PR c++/105304
475 * c-common.cc (verify_tree) [restart]: Move up to before the
476 NULL test.
477
478 2022-04-11 Jakub Jelinek <jakub@redhat.com>
479
480 PR c++/105186
481 * c-common.cc (c_common_nodes_and_builtins): After registering __int%d
482 and __int%d__ builtin types, initialize corresponding ridpointers
483 entry.
484
485 2022-03-30 Marek Polacek <polacek@redhat.com>
486
487 PR c++/101030
488 * c-warn.cc (conversion_warning) <case COND_EXPR>: Don't call
489 conversion_warning when OP1 is null.
490
491 2022-03-30 Thomas Schwinge <thomas@codesourcery.com>
492
493 * c.opt (Wc++11-extensions, Wc++14-extensions, Wc++17-extensions)
494 (Wc++20-extensions, Wc++23-extensions): Remove 'LangEnabledBy'
495 option properties.
496
497 2022-03-30 Thomas Schwinge <thomas@codesourcery.com>
498
499 * c.opt (Wuse-after-free): Remove.
500
501 2022-03-30 Thomas Schwinge <thomas@codesourcery.com>
502
503 * c.opt (Warray-bounds): Remove.
504
505 2022-03-26 Thomas Schwinge <thomas@codesourcery.com>
506
507 * c.opt: Properly quote comment.
508
509 2022-03-25 Eric Botcazou <ebotcazou@adacore.com>
510
511 * c-ada-spec.cc (dump_ada_import): Deal with the "section" attribute
512 (dump_ada_node) <POINTER_TYPE>: Do not modify and pass the name, but
513 the referenced type instead. Deal with the anonymous original type
514 of a typedef'ed type. In the actual access case, follow the chain
515 of external subtypes.
516 <TYPE_DECL>: Tidy up control flow.
517
518 2022-03-21 Qian Jianhua <qianjh@cn.fujitsu.com>
519
520 * c-ada-spec.cc: Change array length
521
522 2022-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
523
524 * c-common.cc (c_family_tests): Call the new tests.
525 * c-common.h (c_diagnostic_tests): Declare.
526 (c_opt_problem_cc_tests): Likewise.
527
528 2022-03-19 Jakub Jelinek <jakub@redhat.com>
529
530 PR c++/101515
531 * c-pretty-print.cc (c_fold_indirect_ref_for_warn): For C++ don't
532 return COMPONENT_REFs with FIELD_DECLs whose containing scope can't
533 be printed.
534
535 2022-03-16 Christophe Lyon <christophe.lyon@arm.com>
536 Roger Sayle <roger@nextmovesoftware.com>
537
538 PR c/98198
539 * c-attribs.cc (decl_or_type_attrs): Add error_mark_node check.
540
541 2022-03-16 Patrick Palka <ppalka@redhat.com>
542
543 PR c++/96780
544 * c.opt: Add -ffold-simple-inlines.
545
546 2022-03-13 Tobias Burnus <tobias@codesourcery.com>
547
548 * c-target.def (check_string_object_format_arg): Fix description typo.
549
550 2022-03-12 Thomas Schwinge <thomas@codesourcery.com>
551
552 PR other/65095
553 * c-common.h (c_omp_map_clause_name): Remove.
554 * c-omp.cc (c_omp_map_clause_name): Remove.
555
556 2022-03-09 Jakub Jelinek <jakub@redhat.com>
557
558 PR c/104711
559 * c-opts.cc (c_common_post_options): Don't enable
560 -Wshift-negative-value from -Wextra for C++20 or later.
561 * c-ubsan.cc (ubsan_instrument_shift): Adjust comments.
562 * c-warn.cc (maybe_warn_shift_overflow): Use TYPE_OVERFLOW_WRAPS
563 instead of TYPE_UNSIGNED.
564
565 2022-03-07 Jakub Jelinek <jakub@redhat.com>
566
567 * c-attribs.cc: Fix up duplicated word issue in a comment.
568
569 2022-03-01 Martin Liska <mliska@suse.cz>
570
571 PR ipa/104533
572 * c-attribs.cc (handle_target_clones_attribute): Use
573 get_target_clone_attr_len and report warning soon.
574
575 2022-02-17 Jonathan Wakely <jwakely@redhat.com>
576
577 * c-pragma.cc (handle_pragma_pack): Remove parameter name.
578 (handle_pragma_weak): Likewise.
579 (handle_pragma_scalar_storage_order): Likewise.
580 (handle_pragma_redefine_extname): Likewise.
581 (handle_pragma_visibility): Likewise.
582 (handle_pragma_diagnostic): Likewise.
583 (handle_pragma_target): Likewise.
584 (handle_pragma_optimize): Likewise.
585 (handle_pragma_push_options): Likewise.
586 (handle_pragma_pop_options): Likewise.
587 (handle_pragma_reset_options): Likewise.
588 (handle_pragma_message): Likewise.
589 (handle_pragma_float_const_decimal64): Likewise.
590
591 2022-02-16 Jakub Jelinek <jakub@redhat.com>
592
593 PR c/104531
594 * c-omp.cc (c_finish_omp_atomic): For MIN_EXPR/MAX_EXPR, try first
595 build_binary_op with LT_EXPR and only if that doesn't return
596 error_mark_node call build_modify_expr.
597
598 2022-02-16 Jakub Jelinek <jakub@redhat.com>
599
600 PR c/104510
601 * c-common.cc (shorten_compare): Convert original arguments to
602 the original *restype_ptr when mixing binary and decimal float.
603
604 2022-02-14 Richard Biener <rguenther@suse.de>
605
606 PR c/104505
607 * c-pretty-print.cc (c_pretty_printer::postfix_expression): Handle
608 internal function calls.
609
610 2022-02-11 Richard Biener <rguenther@suse.de>
611
612 * c-attribs.cc (c_common_attribute_table): Add entry for
613 vector_mask.
614 (handle_vector_mask_attribute): New.
615
616 2022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
617
618 * c-omp.cc (c_omp_split_clauses): Added OMP_CLAUSE_HAS_DEVICE_ADDR case.
619 * c-pragma.h (enum pragma_kind): Added 5.1 in comment.
620 (enum pragma_omp_clause): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR.
621
622 2022-02-09 Jason Merrill <jason@redhat.com>
623
624 * c-cppbuiltin.cc (c_cpp_builtins): Update values
625 of __cpp_constexpr and __cpp_concepts for C++20.
626
627 2022-01-24 Marek Polacek <polacek@redhat.com>
628
629 PR preprocessor/104030
630 * c.opt (Wbidi-chars): Mark as EnumSet. Also accept =ucn.
631
632 2022-01-21 Jakub Jelinek <jakub@redhat.com>
633
634 PR c++/104148
635 * c-common.h (check_function_arguments_recurse): Add for_format
636 arg.
637 * c-common.cc (check_function_nonnull): Pass false to
638 check_function_arguments_recurse's last argument.
639 (check_function_arguments_recurse): Add for_format argument,
640 if true, don't stop on warning_suppressed_p.
641 * c-format.cc (check_format_info): Pass true to
642 check_function_arguments_recurse's last argument.
643
644 2022-01-19 David Malcolm <dmalcolm@redhat.com>
645
646 * c-common.cc (c_common_c_tests): Rename to...
647 (c_common_cc_tests): ...this.
648 (c_family_tests): Update calls for .c to .cc renaming.
649 * c-common.h (c_format_c_tests): Rename to...
650 (c_format_cc_tests): ...this.
651 (c_indentation_c_tests): Rename to...
652 (c_indentation_cc_tests): ...this.
653 (c_pretty_print_c_tests): Rename to...
654 (c_pretty_print_cc_tests): ...this.
655 * c-format.cc (c_format_c_tests): Rename to...
656 (c_format_cc_tests): ...this.
657 * c-indentation.cc (c_indentation_c_tests): Rename to...
658 (c_indentation_cc_tests): ...this.
659 * c-pretty-print.cc (c_pretty_print_c_tests): Rename to...
660 (c_pretty_print_cc_tests): ...this.
661
662 2022-01-17 Martin Liska <mliska@suse.cz>
663
664 * c-ada-spec.cc: Rename .c names to .cc.
665 * c-ada-spec.h: Likewise.
666 * c-common.cc (c_build_vec_convert): Likewise.
667 (warning_candidate_p): Likewise.
668 * c-common.h (enum rid): Likewise.
669 (build_real_imag_expr): Likewise.
670 (finish_label_address_expr): Likewise.
671 (c_get_substring_location): Likewise.
672 (c_build_bind_expr): Likewise.
673 (conflict_marker_get_final_tok_kind): Likewise.
674 (c_parse_error): Likewise.
675 (check_missing_format_attribute): Likewise.
676 (invalid_array_size_error): Likewise.
677 (warn_for_multistatement_macros): Likewise.
678 (build_attr_access_from_parms): Likewise.
679 * c-cppbuiltin.cc (c_cpp_builtins): Likewise.
680 * c-format.cc: Likewise.
681 * c-gimplify.cc (c_gimplify_expr): Likewise.
682 * c-indentation.h: Likewise.
683 * c-objc.h (objc_prop_attr_kind_for_rid): Likewise.
684 * c-omp.cc (c_omp_predetermined_mapping): Likewise.
685 * c-opts.cc (c_common_post_options): Likewise.
686 (set_std_cxx23): Likewise.
687 * c-pragma.cc (handle_pragma_redefine_extname): Likewise.
688 * c-pretty-print.h: Likewise.
689
690 2022-01-17 Martin Liska <mliska@suse.cz>
691
692 * c-ada-spec.c: Moved to...
693 * c-ada-spec.cc: ...here.
694 * c-attribs.c: Moved to...
695 * c-attribs.cc: ...here.
696 * c-common.c: Moved to...
697 * c-common.cc: ...here.
698 * c-cppbuiltin.c: Moved to...
699 * c-cppbuiltin.cc: ...here.
700 * c-dump.c: Moved to...
701 * c-dump.cc: ...here.
702 * c-format.c: Moved to...
703 * c-format.cc: ...here.
704 * c-gimplify.c: Moved to...
705 * c-gimplify.cc: ...here.
706 * c-indentation.c: Moved to...
707 * c-indentation.cc: ...here.
708 * c-lex.c: Moved to...
709 * c-lex.cc: ...here.
710 * c-omp.c: Moved to...
711 * c-omp.cc: ...here.
712 * c-opts.c: Moved to...
713 * c-opts.cc: ...here.
714 * c-pch.c: Moved to...
715 * c-pch.cc: ...here.
716 * c-ppoutput.c: Moved to...
717 * c-ppoutput.cc: ...here.
718 * c-pragma.c: Moved to...
719 * c-pragma.cc: ...here.
720 * c-pretty-print.c: Moved to...
721 * c-pretty-print.cc: ...here.
722 * c-semantics.c: Moved to...
723 * c-semantics.cc: ...here.
724 * c-ubsan.c: Moved to...
725 * c-ubsan.cc: ...here.
726 * c-warn.c: Moved to...
727 * c-warn.cc: ...here.
728 * cppspec.c: Moved to...
729 * cppspec.cc: ...here.
730 * stub-objc.c: Moved to...
731 * stub-objc.cc: ...here.
732
733 2022-01-15 Martin Sebor <msebor@redhat.com>
734
735 PR c/63272
736 * c.opt (-Wdangling-pointer): New option.
737
738 2022-01-15 Martin Sebor <msebor@redhat.com>
739
740 PR tree-optimization/80532
741 * c.opt (-Wuse-after-free): New options.
742
743 2022-01-14 David Malcolm <dmalcolm@redhat.com>
744
745 * c-attribs.c (c_common_attribute_table): Add "tainted_args".
746 (handle_tainted_args_attribute): New.
747
748 2022-01-13 Anthony Sharp <anthonysharp15@gmail.com>
749 Jason Merrill <jason@redhat.com>
750
751 PR c++/70417
752 * c.opt: Added -Wmissing-template-keyword.
753
754 2022-01-13 Richard Biener <rguenther@suse.de>
755
756 PR c/104002
757 * c-common.c (c_common_mark_addressable_vec): Handle TARGET_EXPR.
758
759 2022-01-12 Martin Liska <mliska@suse.cz>
760
761 PR target/103804
762 * c-attribs.c (handle_optimize_attribute): Do not call
763 cl_optimization_compare if we seen an error.
764
765 2022-01-11 Jakub Jelinek <jakub@redhat.com>
766
767 PR c/101537
768 PR c/103881
769 * c-warn.c (conversion_warning): Handle BIT_AND_EXPR, BIT_IOR_EXPR
770 and BIT_XOR_EXPR.
771
772 2022-01-10 Richard Biener <rguenther@suse.de>
773
774 PR middle-end/101530
775 * c-common.c (c_build_shufflevector): Wrap the BIT_FIELD_REF
776 in a TARGET_EXPR to force a temporary.
777
778 2022-01-06 Marek Polacek <polacek@redhat.com>
779
780 PR c++/103758
781 * c-pragma.c (handle_pragma_scalar_storage_order): Use %< %> in
782 diagnostic messages.
783 (handle_pragma_diagnostic): Likewise.
784
785 2022-01-03 Marek Polacek <polacek@redhat.com>
786
787 PR c++/103758
788 * c-format.c (check_tokens): Accept "decl-specifier*".
789
790 2022-01-03 Jakub Jelinek <jakub@redhat.com>
791
792 PR c++/103600
793 * c-attribs.c (handle_non_overlapping_attribute): New function.
794 (c_common_attribute_table): Add "non overlapping" attribute.
795
796 2021-12-30 Jakub Jelinek <jakub@redhat.com>
797
798 PR c++/103012
799 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Perform
800 cpp_define_unused/cpp_undef calls with forced token locations
801 BUILTINS_LOCATION.
802
803 2021-12-27 Patrick Palka <ppalka@redhat.com>
804
805 PR c++/103700
806 * c-common.c (pointer_int_sum): When quiet, return
807 error_mark_node for an incomplete pointed-to type and don't
808 call size_in_bytes_loc.
809
810 2021-12-17 Jason Merrill <jason@redhat.com>
811
812 PR c++/103681
813 * c-opts.c (c_common_post_options): Update defaults.
814
815 2021-12-16 Martin Liska <mliska@suse.cz>
816
817 PR target/103709
818 * c-pragma.c (handle_pragma_pop_options): Do not check
819 global options modification when an error is seen in parsing
820 of options (pragmas or attributes).
821
822 2021-12-12 Jonathan Wakely <jwakely@redhat.com>
823
824 * known-headers.cc: Define INCLUDE_MEMORY instead of
825 INCLUDE_UNIQUE_PTR.
826 * name-hint.h: Likewise.
827 (class name_hint): Use std::unique_ptr instead of gnu::unique_ptr.
828
829 2021-12-09 Jakub Jelinek <jakub@redhat.com>
830
831 PR pch/71934
832 * c-pch.c (c_common_no_more_pch): Pass a temporary void * var
833 with NULL value instead of NULL to host_hooks.gt_pch_use_address.
834
835 2021-12-03 Jakub Jelinek <jakub@redhat.com>
836
837 PR pch/71934
838 * c-pch.c (struct c_pch_validity): Remove pch_init member.
839 (pch_init): Don't initialize v.pch_init.
840 (c_common_valid_pch): Don't warn and punt if .text addresses change.
841
842 2021-12-01 Jason Merrill <jason@redhat.com>
843
844 PR c++/103310
845 * c.opt: Add -fconstexpr-fp-except.
846
847 2021-11-29 Richard Biener <rguenther@suse.de>
848
849 * c-format.c (check_format_string): Remove spurious
850 gcc_unreachable.
851
852 2021-11-29 Richard Biener <rguenther@suse.de>
853
854 * c-opts.c (c_common_post_options): Remove unreachable return.
855 * c-pragma.c (handle_pragma_target): Likewise.
856 (handle_pragma_optimize): Likewise.
857
858 2021-11-25 Jakub Jelinek <jakub@redhat.com>
859
860 PR c++/102611
861 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
862 default for C++23 regardless of warn_deprecated.
863 * c-cppbuiltin.c (c_cpp_builtins): Predefine
864 __cpp_multidimensional_subscript=202110L for C++23.
865
866 2021-11-23 Martin Sebor <msebor@redhat.com>
867
868 PR middle-end/88232
869 * c.opt: Add -Winfinite-recursion.
870
871 2021-11-19 Martin Sebor <msebor@redhat.com>
872
873 PR c++/33925
874 PR c/102867
875 * c-common.c (decl_with_nonnull_addr_p): Call maybe_nonzero_address
876 and improve handling tof defined symbols.
877
878 2021-11-19 Martin Liska <mliska@suse.cz>
879
880 Revert:
881 2021-11-18 Martin Liska <mliska@suse.cz>
882
883 * c-gimplify.c (genericize_c_loop): Use option directly.
884
885 2021-11-18 Matthias Kretz <m.kretz@gsi.de>
886
887 * c-common.c (c_common_reswords): Add __builtin_assoc_barrier.
888 * c-common.h (enum rid): Add RID_BUILTIN_ASSOC_BARRIER.
889
890 2021-11-18 Martin Liska <mliska@suse.cz>
891
892 * c-gimplify.c (genericize_c_loop): Use option directly.
893
894 2021-11-17 Martin Uecker <uecker@gcc.gnu.org>
895
896 PR c/91038
897 PR c/29970
898 * c-common.c (pointer_int_sum): Make sure pointer expressions
899 are evaluated first when the size expression depends on for
900 variably-modified types.
901
902 2021-11-17 Marek Polacek <polacek@redhat.com>
903
904 PR preprocessor/103026
905 * c.opt (Wbidi-chars, Wbidi-chars=): New option.
906
907 2021-11-16 Jason Merrill <jason@redhat.com>
908
909 * c-common.c (release_tree_vector): Only cache vecs smaller than
910 16 elements.
911
912 2021-11-15 Jason Merrill <jason@redhat.com>
913
914 * c.opt: Add -fimplicit-constexpr.
915 * c-cppbuiltin.c: Define __cpp_implicit_constexpr.
916 * c-opts.c (c_common_post_options): Disable below C++14.
917
918 2021-11-15 Jakub Jelinek <jakub@redhat.com>
919
920 * c-omp.c (c_omp_split_clauses) <case OMP_CLAUSE_THREAD_LIMIT>:
921 Duplicate to both OMP_TARGET and OMP_TEAMS.
922
923 2021-11-10 Marek Polacek <polacek@redhat.com>
924
925 PR c++/101940
926 * c-pragma.c (handle_pragma_diagnostic): Handle #pragma GCC diagnostic
927 ignored_attributes.
928
929 2021-11-09 David Malcolm <dmalcolm@redhat.com>
930
931 * c-pragma.c (GCC_BAD_AT): New macro.
932 (GCC_BAD2_AT): New macro.
933 (handle_pragma_pack): Use the location of the pertinent token when
934 issuing diagnostics about invalid constants/actions, and trailing
935 junk.
936 (handle_pragma_target): Likewise for non-string "GCC option".
937 (handle_pragma_message): Likewise for trailing junk.
938
939 2021-11-03 Joseph Myers <joseph@codesourcery.com>
940
941 PR c/103031
942 * c-common.c (convert_and_check): Add argument init_const. Call
943 convert_init if init_const.
944 * c-common.h (convert_and_check): Update prototype.
945 (convert_init): New prototype.
946
947 2021-11-01 David Malcolm <dmalcolm@redhat.com>
948
949 * c-lex.c (c_lex_with_flags): When complaining about non-printable
950 CPP_OTHER tokens, set the "escape on output" flag.
951
952 2021-10-27 Jakub Jelinek <jakub@redhat.com>
953
954 * c-omp.c (c_omp_check_loop_iv_r): Don't clear 3rd bit for
955 POINTER_PLUS_EXPR.
956 (c_omp_check_nonrect_loop_iv): Handle POINTER_PLUS_EXPR.
957 (c_omp_check_loop_iv): Set kind even if the iterator is non-integral.
958
959 2021-10-27 Jakub Jelinek <jakub@redhat.com>
960
961 PR c++/102854
962 * c-common.h (c_omp_check_loop_iv_exprs): Add enum tree_code argument.
963 * c-omp.c (c_omp_check_loop_iv_r): For trees other than decls,
964 TREE_VEC, PLUS_EXPR, MINUS_EXPR, MULT_EXPR, POINTER_PLUS_EXPR or
965 conversions temporarily clear the 3rd bit from d->kind while walking
966 subtrees.
967 (c_omp_check_loop_iv_exprs): Add CODE argument. Or in 4 into data.kind
968 if possibly non-rectangular.
969
970 2021-10-21 Jakub Jelinek <jakub@redhat.com>
971
972 PR middle-end/64888
973 * c-omp.c (c_omp_predefined_variable): Return true also for
974 ubsan_create_data created artificial variables.
975
976 2021-10-14 Joseph Myers <joseph@codesourcery.com>
977
978 * c-format.c (printf_length_specs, scanf_length_specs)
979 (print_char_table, scan_char_table): Support DFP formats for C2X.
980 * c-format.h (TEX_D32, TEX_D64, TEX_D128): Remove.
981 (T2X_D32, T2X_D64, T2X_D128): New macros.
982
983 2021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
984
985 * c-omp.c (c_omp_check_context_selector): Rename to
986 omp_check_context_selector and move to omp-general.c.
987 (c_omp_mark_declare_variant): Rename to omp_mark_declare_variant and
988 move to omp-general.c.
989
990 2021-10-12 Joseph Myers <joseph@codesourcery.com>
991
992 * c-format.c (print_char_table): Add %b and %B formats.
993 (scan_char_table): Add %b format.
994 * c-format.h (T2X_UI, T2X_UL, T2X_ULL, T2X_US, T2X_UC, T2X_ST)
995 (T2X_UPD, T2X_UIM): New macros.
996
997 2021-10-12 Jakub Jelinek <jakub@redhat.com>
998
999 * c-omp.c (c_finish_omp_atomic): Use
1000 clear_padding_type_may_have_padding_p.
1001
1002 2021-10-08 Martin Liska <mliska@suse.cz>
1003
1004 * c-opts.c (c_common_post_options): Use new macro
1005 OPTION_SET_P.
1006
1007 2021-10-07 Martin Liska <mliska@suse.cz>
1008
1009 * c-common.c (parse_optimize_options): Make
1010 save_opt_decoded_options a pointer type.
1011
1012 2021-10-06 Jakub Jelinek <jakub@redhat.com>
1013
1014 PR tree-optimization/102571
1015 * c-omp.c (c_finish_omp_atomic): Optimize the case where type has
1016 padding, but the non-padding bits are contiguous set of bytes
1017 by adjusting the memcmp call arguments instead of emitting
1018 __builtin_clear_padding and then comparing all the type's bytes.
1019
1020 2021-10-06 Jakub Jelinek <jakub@redhat.com>
1021
1022 PR c++/102612
1023 * c-cppbuiltin.c (c_cpp_builtins): For -std=c++23 predefine
1024 __cpp_constexpr to 202110L rather than 201907L.
1025
1026 2021-10-04 Marek Polacek <polacek@redhat.com>
1027
1028 PR c++/97573
1029 * c-common.h (do_warn_array_compare): Declare.
1030 * c-warn.c (do_warn_array_compare): New.
1031 * c.opt (Warray-compare): New option.
1032
1033 2021-10-02 Iain Sandoe <iain@sandoe.co.uk>
1034
1035 * c-format.c: Remove a test of TARGET_FORMAT_TYPES with
1036 NULL, this is not needed.
1037
1038 2021-10-01 Martin Sebor <msebor@redhat.com>
1039
1040 PR c/102103
1041 * c-common.c (decl_with_nonnull_addr_p): Handle members.
1042 Check and perform warning suppression.
1043 (c_common_truthvalue_conversion): Enhance warning suppression.
1044
1045 2021-10-01 Martin Liska <mliska@suse.cz>
1046
1047 PR target/102552
1048 * c-common.c (parse_optimize_options): decoded_options[0] is
1049 used for program name, so merged_decoded_options should also
1050 respect that.
1051
1052 2021-10-01 Jakub Jelinek <jakub@redhat.com>
1053 Richard Biener <rguenther@suse.de>
1054
1055 PR sanitizer/102515
1056 * c-ubsan.c (ubsan_instrument_division): Check the right
1057 flag_sanitize_recover bit, depending on which sanitization
1058 is done. Sanitize INT_MIN / -1 under SANITIZE_SI_OVERFLOW
1059 rather than SANITIZE_DIVIDE. If both SANITIZE_SI_OVERFLOW
1060 and SANITIZE_DIVIDE is enabled, neither check is known
1061 to be false and flag_sanitize_recover bits for those two
1062 aren't the same, emit both __ubsan_handle_divrem_overflow
1063 and __ubsan_handle_divrem_overflow_abort calls.
1064
1065 2021-10-01 Martin Liska <mliska@suse.cz>
1066
1067 * c-common.c (parse_optimize_options): Combine optimize
1068 options with what was provided on the command line.
1069
1070 2021-10-01 Jakub Jelinek <jakub@redhat.com>
1071
1072 * c-omp.c (c_omp_split_clauses): Also copy
1073 OMP_CLAUSE_ORDER_REPRODUCIBLE.
1074
1075 2021-09-27 Martin Liska <mliska@suse.cz>
1076
1077 * c-opts.c (c_common_init_options_struct): Set also
1078 x_flag_default_complex_method.
1079
1080 2021-09-22 Jakub Jelinek <jakub@redhat.com>
1081
1082 * c-omp.c (c_omp_split_clauses): Copy over OMP_CLAUSE_ALLOCATE_ALIGN.
1083
1084 2021-09-20 Matthias Kretz <m.kretz@gsi.de>
1085
1086 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define or
1087 undefine __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
1088 __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
1089 __ROUNDING_MATH__ according to the new optimization flags.
1090
1091 2021-09-18 Jakub Jelinek <jakub@redhat.com>
1092
1093 * c-omp.c (c_omp_split_clauses): Split order clause also to
1094 distribute construct. Copy over OMP_CLAUSE_ORDER_UNCONSTRAINED.
1095
1096 2021-09-17 Jakub Jelinek <jakub@redhat.com>
1097
1098 * c-omp.c (c_finish_omp_atomic): Avoid creating
1099 TARGET_EXPR if test is true, use create_tmp_var_raw instead of
1100 create_tmp_var and add a zero initializer to TARGET_EXPRs that
1101 had NULL initializer. When omitting operands after v = x,
1102 use type of v rather than type of x. Fix type of vtmp
1103 TARGET_EXPR.
1104
1105 2021-09-13 Jason Merrill <jason@redhat.com>
1106
1107 * c.opt: Add -Winterference-size.
1108 * c-cppbuiltin.c (cpp_atomic_builtins): Add __GCC_DESTRUCTIVE_SIZE
1109 and __GCC_CONSTRUCTIVE_SIZE.
1110
1111 2021-09-10 Jakub Jelinek <jakub@redhat.com>
1112
1113 * c-common.h (c_finish_omp_atomic): Add r and weak arguments.
1114 * c-omp.c: Include gimple-fold.h.
1115 (c_finish_omp_atomic): Add r and weak arguments. Add support for
1116 OpenMP 5.1 atomics.
1117
1118 2021-09-09 qing zhao <qing.zhao@oracle.com>
1119
1120 * c-attribs.c (handle_uninitialized_attribute): New function.
1121 (c_common_attribute_table): Add "uninitialized" attribute.
1122
1123 2021-09-08 liuhongt <hongtao.liu@intel.com>
1124
1125 * c-common.c (excess_precision_mode_join): Update below comments.
1126 (c_ts18661_flt_eval_method): Set excess_precision_type to
1127 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1128 * c-cppbuiltin.c (cpp_atomic_builtins): Update below comments.
1129 (c_cpp_flt_eval_method_iec_559): Set excess_precision_type to
1130 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1131
1132 2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
1133
1134 * c-omp.c (c_finish_omp_flush): Handle MEMMODEL_SEQ_CST.
1135
1136 2021-09-03 Eric Botcazou <ebotcazou@adacore.com>
1137
1138 * c-ada-spec.c (dump_ads): Generate pragmas to disable style checks
1139 and -gnatwu warning for the package specification.
1140
1141 2021-09-01 Iain Sandoe <iain@sandoe.co.uk>
1142
1143 * c-attribs.c (handle_unavailable_attribute): New.
1144
1145 2021-08-30 Jason Merrill <jason@redhat.com>
1146
1147 * c.opt: Add -Wmissing-requires.
1148
1149 2021-08-25 Lewis Hyatt <lhyatt@gmail.com>
1150
1151 PR other/93067
1152 * c-opts.c (c_common_input_charset_cb): New function.
1153 (c_common_post_options): Call new function
1154 diagnostic_initialize_input_context().
1155
1156 2021-08-20 Tobias Burnus <tobias@codesourcery.com>
1157
1158 * c-format.c (gcc_gfc_length_specs): Add 'll' and 'w'.
1159 (gcc_gfc_char_table): Add T9L_LL and T9L_ULL to
1160 "di" and "u", respecitively; fill with BADLEN to match
1161 size of 'types'.
1162 (get_init_dynamic_hwi): Split off from ...
1163 (init_dynamic_diag_info): ... here. Call it.
1164 (init_dynamic_gfc_info): Call it.
1165
1166 2021-08-20 Jakub Jelinek <jakub@redhat.com>
1167
1168 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ERROR.
1169 * c-pragma.c (omp_pragmas): Add error directive.
1170 * c-omp.c (omp_directives): Uncomment error directive entry.
1171
1172 2021-08-18 Jakub Jelinek <jakub@redhat.com>
1173
1174 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_NOTHING.
1175 * c-pragma.c (omp_pragmas): Add nothing directive.
1176 * c-omp.c (omp_directives): Uncomment nothing directive entry.
1177
1178 2021-08-17 Jakub Jelinek <jakub@redhat.com>
1179
1180 PR c++/101539
1181 * c-common.h (enum rid): Add RID_IS_LAYOUT_COMPATIBLE.
1182 * c-common.c (c_common_reswords): Add __is_layout_compatible.
1183
1184 2021-08-17 Matt Jacobson <mhjacobson@me.com>
1185
1186 * c-opts.c (c_common_post_options): Default to
1187 flag_objc_sjlj_exceptions = 1 only when flag_objc_abi < 2.
1188
1189 2021-08-17 Jakub Jelinek <jakub@redhat.com>
1190
1191 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCOPE.
1192 * c-pragma.c (omp_pragmas): Add scope construct.
1193 * c-omp.c (omp_directives): Uncomment scope directive entry.
1194
1195 2021-08-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
1196
1197 * c-cppbuiltin.c (c_cpp_builtins): Define
1198 __LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
1199
1200 2021-08-12 Jakub Jelinek <jakub@redhat.com>
1201
1202 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_MASKED.
1203 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FILTER.
1204 * c-pragma.c (omp_pragmas_simd): Add masked construct.
1205 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_MASKED
1206 enumerator.
1207 (c_finish_omp_masked): Declare.
1208 * c-omp.c (c_finish_omp_masked): New function.
1209 (c_omp_split_clauses): Handle combined masked constructs.
1210
1211 2021-07-30 Jakub Jelinek <jakub@redhat.com>
1212
1213 PR c++/101539
1214 * c-common.h (enum rid): Add RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
1215 * c-common.c (c_common_reswords): Add
1216 __is_pointer_interconvertible_base_of.
1217
1218 2021-07-29 Richard Biener <rguenther@suse.de>
1219
1220 PR c/101512
1221 * c-common.c (c_common_mark_addressable_vec): Look through
1222 C_MAYBE_CONST_EXPR even if not at the toplevel.
1223
1224 2021-07-27 Martin Sebor <msebor@redhat.com>
1225
1226 PR c/101585
1227 * c-warn.c (warn_parm_ptrarray_mismatch): Use OEP_DECL_NAME.
1228
1229 2021-07-23 Jakub Jelinek <jakub@redhat.com>
1230
1231 * c-lex.c (c_common_has_attribute): Call canonicalize_attr_name also
1232 on attr_id. Return 1 for omp::directive or omp::sequence in C++11
1233 and later.
1234
1235 2021-07-23 Jakub Jelinek <jakub@redhat.com>
1236
1237 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP__START_ and
1238 PRAGMA_OMP__LAST_ enumerators.
1239
1240 2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
1241 Joseph Myers <joseph@codesourcery.com>
1242 Cesar Philippidis <cesar@codesourcery.com>
1243
1244 * c-pragma.h (pragma_omp_clause): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
1245
1246 2021-07-20 Martin Sebor <msebor@redhat.com>
1247
1248 * c-common.c (c_build_shufflevector): Adjust by-value argument to
1249 by-const-reference.
1250 * c-common.h (c_build_shufflevector): Same.
1251
1252 2021-07-16 Andrew Pinski <apinski@marvell.com>
1253
1254 PR c/101453
1255 * c-common.c (parse_optimize_options): Use the correct
1256 size for buffer.
1257
1258 2021-07-15 Martin Sebor <msebor@redhat.com>
1259
1260 PR c/101289
1261 PR c/97548
1262 * c-warn.c (warn_parm_array_mismatch): Use OEP_DECL_NAME.
1263
1264 2021-07-14 Jason Merrill <jason@redhat.com>
1265
1266 * c-opts.c (c_common_post_options): Set -fdelete-dead-exceptions.
1267
1268 2021-07-06 Martin Sebor <msebor@redhat.com>
1269
1270 * c-format.c (gcc_tdiag_char_table): Remove support for %G and %K.
1271 (gcc_cdiag_char_table): Same.
1272 (gcc_cxxdiag_char_table): Same.
1273
1274 2021-07-02 Jakub Jelinek <jakub@redhat.com>
1275
1276 * c-common.h (enum c_omp_directive_kind): New enum.
1277 (struct c_omp_directive): New type.
1278 (c_omp_categorize_directive): Declare.
1279 * c-omp.c (omp_directives): New variable.
1280 (c_omp_categorize_directive): New function.
1281
1282 2021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1283
1284 * c-ada-spec.c (packed_layout): New global variable.
1285 (dump_ada_declaration): Set it upon seeing a packed record type.
1286 Do not put the "aliased" keyword if it is set.
1287 (dump_ada_structure): Add Pack aspect if it is set and clear it.
1288
1289 2021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1290
1291 * c-ada-spec.c (check_name): Rename into...
1292 (check_type_name_conflict): ...this. Minor tweak.
1293 (dump_ada_function_declaration): Adjust to above renaming.
1294 (dump_ada_array_domains): Fix oversight.
1295 (dump_ada_declaration): Call check_type_name_conflict for variables.
1296
1297 2021-06-25 Martin Sebor <msebor@redhat.com>
1298
1299 * c-common.c (c_wrap_maybe_const): Remove TREE_NO_WARNING.
1300 (c_common_truthvalue_conversion): Replace direct uses of
1301 TREE_NO_WARNING with warning_suppressed_p, suppress_warning, and
1302 copy_no_warning.
1303 (check_function_arguments_recurse): Same.
1304 * c-gimplify.c (c_gimplify_expr): Same.
1305 * c-warn.c (overflow_warning): Same.
1306 (warn_logical_operator): Same.
1307 (warn_if_unused_value): Same.
1308 (do_warn_unused_parameter): Same.
1309
1310 2021-06-24 Jakub Jelinek <jakub@redhat.com>
1311
1312 * c-common.h (enum c_omp_region_type): Add C_ORT_TARGET and
1313 C_ORT_OMP_TARGET.
1314 * c-omp.c (c_omp_split_clauses): For OMP_CLAUSE_IN_REDUCTION on
1315 combined target constructs also add map (always, tofrom:) clause.
1316
1317 2021-06-15 Robin Dapp <rdapp@linux.ibm.com>
1318
1319 * c-attribs.c (common_handle_aligned_attribute): Remove short
1320 circuit and dead code.
1321
1322 2021-06-14 Jonathan Wakely <jwakely@redhat.com>
1323
1324 PR c++/101052
1325 * known-headers.cc (get_stdlib_header_for_name): Add known
1326 headers for EXIT_FAILURE, EXIT_SUCCESS, abort, atexit, calloc,
1327 exit, and getenv.
1328
1329 2021-06-12 Jason Merrill <jason@redhat.com>
1330
1331 * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL.
1332
1333 2021-06-11 Jakub Jelinek <jakub@redhat.com>
1334
1335 PR c++/100974
1336 * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_if_consteval for
1337 -std=c++2b for P1938R3 consteval if support.
1338
1339 2021-06-09 Jason Merrill <jason@redhat.com>
1340
1341 PR c++/100879
1342 * c-warn.c (warn_for_sign_compare): Remove C++ enum mismatch
1343 warning.
1344
1345 2021-06-07 Martin Liska <mliska@suse.cz>
1346
1347 * c-target.def: Split long lines and replace them
1348 with '\n\'.
1349
1350 2021-06-04 Martin Sebor <msebor@redhat.com>
1351
1352 PR c/100783
1353 * c-attribs.c (positional_argument): Bail on erroneous types.
1354
1355 2021-06-04 Martin Sebor <msebor@redhat.com>
1356
1357 * c-warn.c (warn_parm_array_mismatch): Check TREE_PURPOSE to test
1358 for element presence.
1359
1360 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1361
1362 * c-ada-spec.c (dump_ada_macros): Minor tweaks.
1363 (dump_ada_decl_name): Likewise.
1364 (dump_anonymous_type_name): Remove parent parameter and adjust.
1365 (dump_sloc): Minor tweak.
1366 (dump_ada_array_type): Remove type parameter and adjust.
1367 (dump_ada_enum_type): Remove parent parameter and adjust.
1368 (dump_ada_node): Adjust calls to above functions.
1369 (dumped_anonymous_types): New global variable.
1370 (dump_nested_types_1): Rename into...
1371 (dump_nested_types): ...this.
1372 (dump_nested_type): Remove parent and dumped_types parameters.
1373 <ARRAY_TYPE>: Replace dumped_types with dumped_anonymous_types.
1374 Adjust calls to dump_anonymous_type_name and dump_ada_array_type.
1375 (dump_ada_specs): Initialize and free dumped_anonymous_types.
1376
1377 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1378
1379 * c-ada-spec.c (pp_ada_tree_identifier): Tidy up.
1380 (dump_ada_node) <POINTER_TYPE>: Deal specially with external subtypes.
1381
1382 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1383
1384 * c-ada-spec.c (dump_ada_enum_type): Dump a prefix for constants.
1385 (htable_t): New typedef.
1386 (overloaded_names): Use it.
1387 (add_name): New function.
1388 (init_overloaded_names): Use add_name to populate the table and add
1389 special cases for sigaction and stat.
1390 (overloaded_name_p): Rename into...
1391 (overloading_index): ...this. Do not initialize overloaded_names table
1392 here. Return the index or zero.
1393 (dump_ada_declaration): Minor tweaks. Do not skip overloaded functions
1394 but add an overloading suffix instead.
1395 (dump_ada_specs): Initialize overloaded_names tables here.
1396
1397 2021-06-01 Martin Liska <mliska@suse.cz>
1398
1399 PR other/100759
1400 * c-attribs.c (handle_optimize_attribute): Limit sanity check
1401 to a situation where we are not in processing of an optimize
1402 pragma.
1403 * c-pragma.c (handle_pragma_pop_options): Restore target
1404 options.
1405
1406 2021-05-31 Indu Bhagat <indu.bhagat@oracle.com>
1407
1408 PR testsuite/100749
1409 * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names.
1410
1411 2021-05-31 Richard Biener <rguenther@suse.de>
1412
1413 PR c++/88601
1414 * c-common.c: Include tree-vector-builder.h and
1415 vec-perm-indices.h.
1416 (c_common_reswords): Add __builtin_shufflevector.
1417 (c_build_shufflevector): New funtion.
1418 * c-common.h (enum rid): Add RID_BUILTIN_SHUFFLEVECTOR.
1419 (c_build_shufflevector): Declare.
1420
1421 2021-05-28 Jakub Jelinek <jakub@redhat.com>
1422
1423 PR middle-end/99928
1424 * c-omp.c (c_omp_split_clauses): For reduction clause if combined with
1425 target add a map tofrom clause with OMP_CLAUSE_MAP_IMPLICIT.
1426
1427 2021-05-28 Tobias Burnus <tobias@codesourcery.com>
1428
1429 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_AFFINITY.
1430
1431 2021-05-25 Martin Liska <mliska@suse.cz>
1432
1433 PR tree-optimization/92860
1434 PR target/99592
1435 * c-attribs.c (handle_optimize_attribute): Save target node
1436 before calling parse_optimize_options and save it in case
1437 it changes.
1438 * c-pragma.c (handle_pragma_target): Similarly for pragma.
1439 (handle_pragma_pop_options): Likewise here.
1440
1441 2021-05-25 Martin Liska <mliska@suse.cz>
1442
1443 * c-attribs.c (handle_no_sanitize_coverage_attribute): New.
1444
1445 2021-05-25 Jakub Jelinek <jakub@redhat.com>
1446
1447 PR middle-end/99928
1448 * c-omp.c (c_omp_split_clauses): Copy reduction to teams when teams is
1449 combined with simd and not with taskloop or for.
1450
1451 2021-05-21 Jakub Jelinek <jakub@redhat.com>
1452
1453 PR middle-end/99928
1454 * c-omp.c (c_omp_split_clauses): Set OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
1455 on firstprivate clause copy going to target construct, and for
1456 target simd set also OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET bit.
1457
1458 2021-05-20 Jonathan Wakely <jwakely@redhat.com>
1459
1460 * c.opt (Wc++11-extensions, Wc++14-extensions)
1461 (Wc++17-extensions, Wc++20-extensions, Wc++23-extensions): New
1462 options.
1463
1464 2021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1465
1466 * c-lex.c (init_c_lex): Use dwarf_debuginfo_p.
1467
1468 2021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1469
1470 * c-opts.c (c_common_post_options): Adjust access to debug_type_names.
1471 * c-pch.c (struct c_pch_validity): Use type uint32_t.
1472 (pch_init): Renamed member.
1473 (c_common_valid_pch): Adjust access to debug_type_names.
1474
1475 2021-05-19 Martin Sebor <msebor@redhat.com>
1476
1477 PR c/100619
1478 * c-attribs.c (build_attr_access_from_parms): Handle arbitrarily many
1479 bounds.
1480
1481 2021-05-18 Richard Biener <rguenther@suse.de>
1482
1483 PR c/100547
1484 * c-attribs.c (type_valid_for_vector_size): Reject too large nunits.
1485 Reword existing nunit diagnostic.
1486
1487 2021-05-17 Joern Rennecke <joern.rennecke@embecosm.com>
1488
1489 * c-common.c (braced_list_to_string): Return CTOR unchanged
1490 if host and target character sizes don't match.
1491
1492 2021-05-14 Martin Liska <mliska@suse.cz>
1493
1494 * c.opt: Add Warning keyword for 2 options.
1495
1496 2021-05-13 Martin Liska <mliska@suse.cz>
1497
1498 PR middle-end/100504
1499 * c-attribs.c (handle_target_clones_attribute): Expect a string
1500 argument to target_clone argument.
1501
1502 2021-05-11 Joseph Myers <joseph@codesourcery.com>
1503
1504 * c-lex.c (interpret_float): Handle digit separators for C2X.
1505
1506 2021-05-10 Martin Liska <mliska@suse.cz>
1507
1508 * c-ada-spec.c (print_destructor): Use startswith
1509 function instead of strncmp.
1510 (dump_ada_declaration): Likewise.
1511 * c-common.c (disable_builtin_function): Likewise.
1512 (def_builtin_1): Likewise.
1513 * c-format.c (check_tokens): Likewise.
1514 (check_plain): Likewise.
1515 (convert_format_name_to_system_name): Likewise.
1516
1517 2021-04-28 Patrick McGehearty <patrick.mcgehearty@oracle.com>
1518
1519 * c-cppbuiltin.c (c_cpp_builtins): Add supporting macros for new
1520 complex divide
1521
1522 2021-04-26 Thomas Schwinge <thomas@codesourcery.com>
1523 Nathan Sidwell <nathan@codesourcery.com>
1524 Tom de Vries <vries@codesourcery.com>
1525 Julian Brown <julian@codesourcery.com>
1526 Kwok Cheung Yeung <kcy@codesourcery.com>
1527
1528 * c.opt (Wopenacc-parallelism): New.
1529
1530 2021-04-19 Thomas Schwinge <thomas@codesourcery.com>
1531
1532 * c.opt (fopenacc-kernels=): Remove.
1533
1534 2021-04-08 Jakub Jelinek <jakub@redhat.com>
1535
1536 * c-warn.c (do_warn_double_promotion): Fix comment typo,
1537 occured -> occurred.
1538 (check_alignment_of_packed_member): Fix a comment typo,
1539 memeber -> member.
1540 (warn_parm_ptrarray_mismatch): Fix comment typos, os -> of
1541 and onless -> unless.
1542 (warn_parm_array_mismatch): Fix comment typos, declaratation
1543 -> declaration and woud -> would. Fix up comment indentation.
1544
1545 2021-04-08 Martin Sebor <msebor@redhat.com>
1546
1547 PR middle-end/99883
1548 * c.opt (Wmismatched-new-delete): Correct spelling.
1549
1550 2021-04-05 Eric Botcazou <ebotcazou@adacore.com>
1551
1552 * c-ada-spec.c (is_simple_enum): Minor tweaks.
1553 (dump_ada_enum_type): Add TYPE and PARENT parameters. For non-simple
1554 enumeral types use again the type name for the enumeration constants.
1555 (dump_ada_node): Adjust call to dump_ada_enum_type.
1556 (dump_nested_type): Likewise.
1557
1558 2021-04-01 Jason Merrill <jason@redhat.com>
1559
1560 PR c++/98481
1561 * c-opts.c (c_common_post_options): Bump latest_abi_version.
1562
1563 2021-03-25 Jakub Jelinek <jakub@redhat.com>
1564
1565 PR c++/99565
1566 * c-warn.c (do_warn_duplicated_branches): Pass also
1567 OEP_ADDRESS_OF_SAME_FIELD to operand_equal_p.
1568
1569 2021-03-20 Jakub Jelinek <jakub@redhat.com>
1570
1571 PR debug/99230
1572 * c-gimplify.c (c_genericize_control_stmt): Handle STATEMENT_LIST.
1573
1574 2021-03-05 Eric Botcazou <ebotcazou@adacore.com>
1575
1576 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types
1577 after entering the separate class package, if any.
1578
1579 2021-03-04 Richard Biener <rguenther@suse.de>
1580
1581 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
1582 Handle ERROR_MARK.
1583
1584 2021-03-04 Jakub Jelinek <jakub@redhat.com>
1585
1586 PR c/99325
1587 * c-ppoutput.c (print): Change src_line type from int to unsigned.
1588 (token_streamer::stream) Likewise.
1589 (maybe_print_line_1): Likewise. Don't strcmp src_file if src_loc is
1590 UNKNOWN_LOCATION.
1591
1592 2021-03-03 Jakub Jelinek <jakub@redhat.com>
1593
1594 PR c/99324
1595 * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
1596 instead of mark_addressable. Fix a comment typo -
1597 neutrallly -> neutrally.
1598
1599 2021-02-28 Jakub Jelinek <jakub@redhat.com>
1600
1601 PR c/99304
1602 * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
1603 message - refernced -> referenced. Remove superfluous space before
1604 closing paren of function calls.
1605
1606 2021-02-25 Nathan Sidwell <nathan@acm.org>
1607
1608 PR c++/99166
1609 * c.opt (-flang-info-module-cmi): Renamed option.
1610
1611 2021-02-19 Nathan Sidwell <nathan@acm.org>
1612
1613 * c.opt (flang-info-module-read, flang-info-module-read=): New.
1614
1615 2021-02-18 H.J. Lu <hjl.tools@gmail.com>
1616
1617 PR target/99113
1618 * c-attribs.c (c_common_attribute_table): Add the "retain"
1619 attribute.
1620 (handle_retain_attribute): New function.
1621
1622 2021-02-16 Marek Polacek <polacek@redhat.com>
1623
1624 PR c++/99062
1625 * c-attribs.c (handle_assume_aligned_attribute): Check that the
1626 alignment argument is non-negative. Tweak a warning message.
1627
1628 2021-02-12 Martin Sebor <msebor@redhat.com>
1629
1630 PR c/99055
1631 * c-warn.c (warn_parm_array_mismatch): Free strings returned from
1632 print_generic_expr_to_str.
1633
1634 2021-02-10 Richard Biener <rguenther@suse.de>
1635
1636 * c-common.c (parse_optimize_options): Free decoded_options.
1637
1638 2021-02-04 emsr <3dw4rd@verizon.net>
1639
1640 * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
1641
1642 2021-02-03 Ed Smith-Rowland <3dw4rd@verizon.net>
1643
1644 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
1645 * c-lex.c (interpret_integer): Set node type for size literal.
1646
1647 2021-01-28 Jakub Jelinek <jakub@redhat.com>
1648
1649 * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
1650 draft from description.
1651 (-std=c++2b): Fix a pasto, 2020 -> 2023.
1652
1653 2021-01-26 Paul Fee <paul.f.fee@gmail.com>
1654
1655 * c-common.h (cxx_dialect): Add cxx23 as a dialect.
1656 * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
1657 and -std=gnu++2b
1658 * c-opts.c (set_std_cxx23): New.
1659 (c_common_handle_option): Set options when -std=c++23 is enabled.
1660 (c_common_post_options): Adjust comments.
1661 (set_std_cxx20): Likewise.
1662
1663 2021-01-25 Martin Sebor <msebor@redhat.com>
1664
1665 PR c++/98646
1666 * c-common.c (check_nonnull_arg): Adjust warning text.
1667
1668 2021-01-17 Martin Sebor <msebor@redhat.com>
1669
1670 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
1671 assume SSA_NAME_IDENTIFIER evaluates to nonzero.
1672
1673 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
1674
1675 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
1676 Redefine PRAGMA_OACC_CLAUSE_DETACH.
1677
1678 2021-01-15 Jakub Jelinek <jakub@redhat.com>
1679
1680 PR tree-optimization/98597
1681 * c-pretty-print.c: Include options.h.
1682 (c_fold_indirect_ref_for_warn): New function.
1683 (print_mem_ref): Use it. If it returns something that has compatible
1684 type and is TBAA compatible with zero offset, print it and return,
1685 otherwise print it using offsetof syntax or array ref syntax. Fix up
1686 printing if MEM_REFs first operand is ADDR_EXPR, or when the first
1687 argument has pointer to array type. Print pointers using the standard
1688 formatting.
1689
1690 2021-01-12 Martin Sebor <msebor@redhat.com>
1691
1692 PR c/98597
1693 PR c/98592
1694 * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
1695 has pointer type. Remove redundant code. Avoid calling
1696 gimple_canonical_types_compatible_p.
1697
1698 2021-01-07 Martin Sebor <msebor@redhat.com>
1699
1700 PR middle-end/98578
1701 * c-pretty-print.c (print_mem_ref): Strip array from access type.
1702 Avoid assuming acces type's size is constant. Correct condition
1703 guarding the printing of a parenthesis.
1704
1705 2021-01-06 Martin Sebor <msebor@redhat.com>
1706
1707 PR c++/95768
1708 * c-pretty-print.c (c_pretty_printer::primary_expression): For
1709 SSA_NAMEs print VLA names and GIMPLE defining statements.
1710 (print_mem_ref): New function.
1711 (c_pretty_printer::unary_expression): Call it.
1712
1713 2021-01-06 Richard Biener <rguenther@suse.de>
1714
1715 PR tree-optimization/95582
1716 * c-attribs.c (c_common_attribute_table): Add entry for
1717 signed_bool_precision.
1718 (handle_signed_bool_precision_attribute): New.
1719
1720 2020-12-24 Iain Sandoe <iain@sandoe.co.uk>
1721
1722 * c.opt: Add -stdlib= option and enumerations for
1723 libstdc++ and libc++.
1724
1725 2020-12-16 Martin Liska <mliska@suse.cz>
1726
1727 * c.opt: Remove usage of Report.
1728
1729 2020-12-14 Martin Sebor <msebor@redhat.com>
1730
1731 PR middle-end/98166
1732 PR c++/57111
1733 PR middle-end/98160
1734 * c-attribs.c (maybe_add_noinline): New function.
1735 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
1736 Implicitly add attribute noinline to functions not declared inline
1737 and warn on those.
1738
1739 2020-12-09 Tobias Burnus <tobias@codesourcery.com>
1740
1741 * c-pragma.c (omp_pragmas): Add 'allocate'.
1742 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
1743
1744 2020-12-08 Jakub Jelinek <jakub@redhat.com>
1745
1746 PR c++/98187
1747 * c-pragma.c (omp_pragmas): Remove "master".
1748 (omp_pragmas_simd): Add "master".
1749
1750 2020-12-07 Marek Polacek <polacek@redhat.com>
1751
1752 PR c++/98126
1753 * c-common.c (verify_tree_lim_r): New function.
1754 (verify_sequence_points): Use it. Use nullptr instead of 0.
1755
1756 2020-12-03 Martin Sebor <msebor@redhat.com>
1757
1758 PR c++/90629
1759 PR middle-end/94527
1760 * c-attribs.c (handle_dealloc_attribute): New function.
1761 (handle_malloc_attribute): Handle argument forms of attribute.
1762 * c.opt (-Wmismatched-dealloc): New option.
1763 (-Wmismatched-new-delete): New option.
1764
1765 2020-12-03 Jakub Jelinek <jakub@redhat.com>
1766
1767 PR libstdc++/93121
1768 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
1769 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
1770
1771 2020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
1772
1773 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
1774 {__GNUC_EXECUTION_CHARSET_NAME} and
1775 _WIDE_EXECUTION_CHARSET_NAME} macros.
1776
1777 2020-12-01 Nathan Sidwell <nathan@acm.org>
1778
1779 * c-common.c (module, import, export): New internal tokens (with
1780 trailing space).
1781 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
1782 them.
1783 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
1784 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
1785
1786 2020-12-01 Nathan Sidwell <nathan@acm.org>
1787
1788 * c-opts.c (c_common_init_options): Ask for module dependencies.
1789 (c_common_handle_option): Handle -Mmodules -Mno-modules.
1790 * c-pch.c (c_common_valid_pch): ... does not play with C++
1791 modules.
1792 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
1793 options.
1794 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
1795 (fmodule-only, fmodule-mapper, fmodule-lazy)
1796 (fmodule-version-ignore, Winvalid-imported-macros)
1797 (flang-info-include-translate, flang-info-include-translate-not):
1798 New options
1799
1800 2020-11-28 Eric Botcazou <ebotcazou@adacore.com>
1801
1802 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
1803 (dump_ada_structure): Also deal with convention, unchecked union and
1804 bit-field for nested types. In the latter case, print an Alignment
1805 aspect along with the Pack aspect.
1806
1807 2020-11-25 Martin Sebor <msebor@redhat.com>
1808
1809 PR bootstrap/94982
1810 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
1811 -Wformat-diag.
1812
1813 2020-11-24 Martin Sebor <msebor@redhat.com>
1814
1815 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
1816
1817 2020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1818
1819 * c-attribs.c (handle_special_var_sec_attribute): New.
1820 (handle_noinit_attribute): Remove.
1821 (attr_noinit_exclusions): Rename to...
1822 (attr_section_exclusions): ...this, and add "persistent" attribute
1823 exclusion.
1824 (c_common_attribute_table): Add "persistent" attribute.
1825
1826 2020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
1827
1828 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
1829 Treat opaque types like other types.
1830 (c_pretty_printer::direct_abstract_declarator): Opaque types are
1831 supported types.
1832
1833 2020-11-20 Martin Sebor <msebor@redhat.com>
1834
1835 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
1836 with fewer arguments.
1837
1838 2020-11-20 Martin Sebor <msebor@redhat.com>
1839
1840 PR middle-end/97879
1841 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
1842 Error out on invalid modes.
1843
1844 2020-11-20 Jakub Jelinek <jakub@redhat.com>
1845
1846 PR libstdc++/88101
1847 * c-common.c (check_builtin_function_arguments): Handle
1848 BUILT_IN_CLEAR_PADDING.
1849
1850 2020-11-18 Nathan Sidwell <nathan@acm.org>
1851
1852 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
1853
1854 2020-11-17 Nathan Sidwell <nathan@acm.org>
1855
1856 * c-common.h (enum c_tree_index): Reorder to place lazy fields
1857 after newly-added CTI_MODULE_HWM.
1858
1859 2020-11-17 Joseph Myers <joseph@codesourcery.com>
1860
1861 * c-cppbuiltin.c (builtin_define_float_constants): Define
1862 "*_IS_IEC_60559__" macros.
1863
1864 2020-11-17 Nathan Sidwell <nathan@acm.org>
1865
1866 * c-lex.c: #include "langhooks.h".
1867 (cb_undef): Maybe call preprocess_undef lang hook.
1868 * c-opts.c (c_common_post_options): Maybe call preprocess_options
1869 lang hook.
1870 (push_command_line_include): Maybe call preprocess_main_file lang
1871 hook.
1872 (cb_file_change): Likewise.
1873 * c-ppoutput.c: #include "langhooks.h.
1874 (scan_translation_unit): Maybe call preprocess_token lang hook.
1875 (class do_streamer): New, derive from token_streamer.
1876 (directives_only_cb): Data pointer is do_streamer, call
1877 preprocess_token lang hook.
1878 (scan_translation_unit_directives_only): Use do_streamer.
1879 (print_line_1): Move src_line recording to after string output.
1880 (cb_undef): Maybe call preprocess_undef lang hook.
1881
1882 2020-11-17 Nathan Sidwell <nathan@acm.org>
1883
1884 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
1885 code duplicating that functionality.
1886
1887 2020-11-17 Jakub Jelinek <jakub@redhat.com>
1888
1889 PR c/90628
1890 * c-common.c (check_builtin_function_arguments)
1891 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
1892 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
1893 for more builtins and argument positions.
1894
1895 2020-11-16 Iain Sandoe <iain@sandoe.co.uk>
1896
1897 PR objc/97854
1898 * stub-objc.c: Include c-common.h to declare enum rid.
1899
1900 2020-11-13 Jakub Jelinek <jakub@redhat.com>
1901
1902 PR c++/63287
1903 * c-cppbuiltin.c: Include configargs.h.
1904 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
1905 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
1906 "single".
1907
1908 2020-11-13 Gergö Barany <gergo@codesourcery.com>
1909 Thomas Schwinge <thomas@codesourcery.com>
1910
1911 * c.opt (fopenacc-kernels): Add.
1912
1913 2020-11-13 Jason Merrill <jason@redhat.com>
1914
1915 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
1916
1917 2020-11-13 Piotr H. Dabrowski <phd@phd.re>
1918
1919 PR c++/91318
1920 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
1921
1922 2020-11-13 Martin Liska <mliska@suse.cz>
1923
1924 * c-attribs.c (build_attr_access_from_parms): Format properly.
1925
1926 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1927
1928 PR objc/90707
1929 * c-common.c (c_common_reswords): null_unspecified, nullable,
1930 nonnull, null_resettable: New keywords.
1931 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
1932 RID_NONNULL, RID_NULL_RESETTABLE: New.
1933 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
1934 ranges accepted for property attributes.
1935 * c-attribs.c (handle_objc_nullability_attribute): New.
1936 * c-objc.h (enum objc_property_attribute_group): Add
1937 OBJC_PROPATTR_GROUP_NULLABLE.
1938 (enum objc_property_attribute_kind):Add
1939 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
1940 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
1941
1942 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1943
1944 PR objc/77404
1945 * c-attribs.c (handle_objc_root_class_attribute): New
1946 * c-objc.h (objc_start_class_interface): Add a location
1947 value for the position of the class name.
1948 * c.opt: Add Wobjc-root-class.
1949 * stub-objc.c (objc_start_class_interface): Add a location
1950 value for the position of the class name.
1951
1952 2020-11-12 Joseph Myers <joseph@codesourcery.com>
1953
1954 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
1955 Allow scope for C. Handle standard attributes for C. Do not
1956 accept unscoped attributes if std_syntax and not handled as
1957 standard attributes.
1958 * c-common.h (c_common_has_attribute): Update prototype.
1959
1960 2020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
1961
1962 PR pch/86674
1963 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
1964 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
1965
1966 2020-11-11 Patrick Palka <ppalka@redhat.com>
1967
1968 PR c++/88115
1969 * c-opts.c (c_common_post_options): Update latest_abi_version.
1970
1971 2020-11-10 Jakub Jelinek <jakub@redhat.com>
1972
1973 PR c/97748
1974 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
1975 to false.
1976 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
1977 recursively and just return true instead of warning if it is true.
1978 Handle COMPLEX_EXPR.
1979
1980 2020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
1981
1982 * c-common.h (c_omp_adjust_map_clauses): New declaration.
1983 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
1984 (c_omp_adjust_map_clauses): New function.
1985
1986 2020-11-09 Marek Polacek <polacek@redhat.com>
1987
1988 DR 1914
1989 * c-common.c (attribute_fallthrough_p): Tweak the warning
1990 message.
1991
1992 2020-11-09 Patrick Palka <ppalka@redhat.com>
1993
1994 * c-pragma.c (handle_pragma_diagnostic): Split the
1995 unknown-option -Wpragmas diagnostic into a warning and a
1996 subsequent note containing a spelling suggestion. Avoid
1997 computing the suggestion if -Wpragmas warnings are being
1998 suppressed.
1999
2000 2020-11-09 Patrick Palka <ppalka@redhat.com>
2001
2002 PR testsuite/97117
2003 * c-indentation.c (get_visual_column): Remove location_t
2004 parameter. Move the column-tracking diagnostic code from here
2005 to ...
2006 (should_warn_for_misleading_indentation): ... here, before the
2007 early exit for when the loci are not all distinct. Don't pass a
2008 location_t argument to get_visual_column.
2009 (assert_get_visual_column_succeeds): Don't pass a location_t
2010 argument to get_visual_column.
2011 (assert_get_visual_column_fails): Likewise.
2012
2013 2020-11-08 Iain Sandoe <iain@sandoe.co.uk>
2014
2015 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
2016 of keywords accepted in @property attribute contexts.
2017 * c-objc.h (enum objc_property_attribute_group): Add
2018 OBJC_PROPATTR_GROUP_CLASS.
2019 (enum objc_property_attribute_kind): Add
2020 OBJC_PROPERTY_ATTR_CLASS.
2021
2022 2020-11-07 Iain Sandoe <iain@sandoe.co.uk>
2023
2024 * c-common.c (c_common_reswords): Add 'atomic' property
2025 attribute.
2026 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
2027 property attributes.
2028
2029 2020-11-07 Iain Sandoe <iain@sandoe.co.uk>
2030
2031 * c-attribs.c (handle_nsobject_attribute): New.
2032 * c.opt: Add WNSObject-attribute.
2033
2034 2020-11-06 Iain Sandoe <iain@sandoe.co.uk>
2035
2036 * c-objc.h (enum objc_property_attribute_group): New
2037 (enum objc_property_attribute_kind): New.
2038 (OBJC_PROPATTR_GROUP_MASK): New.
2039 (struct property_attribute_info): Small class encapsulating
2040 parser output from property attributes.
2041 (objc_prop_attr_kind_for_rid): New
2042 (objc_add_property_declaration): Simplify interface.
2043 * stub-objc.c (enum rid): Dummy type.
2044 (objc_add_property_declaration): Simplify interface.
2045 (objc_prop_attr_kind_for_rid): New.
2046
2047 2020-11-06 Nathan Sidwell <nathan@acm.org>
2048
2049 * c-ada-spec.c (collect_ada_nodes): Rename
2050 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2051 (collect_ada_node): Likewise.
2052 (dump_forward_type): Likewise.
2053 * c-common.c (set_underlying_type): Rename
2054 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2055 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
2056
2057 2020-11-06 Jakub Jelinek <jakub@redhat.com>
2058
2059 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
2060
2061 2020-11-05 Marek Polacek <polacek@redhat.com>
2062
2063 PR c++/97675
2064 * c.opt (Wexceptions): New option.
2065
2066 2020-11-05 Marek Polacek <polacek@redhat.com>
2067
2068 PR c++/25814
2069 * c.opt (Wvexing-parse): New option.
2070
2071 2020-11-04 Jakub Jelinek <jakub@redhat.com>
2072
2073 PR c++/97670
2074 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
2075 underlying decl to clear in the allocate_head bitmap.
2076
2077 2020-11-04 Iain Sandoe <iain@sandoe.co.uk>
2078
2079 * c-objc.h (objc_non_constant_expr_p): New.
2080 * stub-objc.c (objc_non_constant_expr_p): New.
2081
2082 2020-11-03 Nathan Sidwell <nathan@acm.org>
2083
2084 * c.opt (MQ,MT): Reword description to be make-agnostic.
2085
2086 2020-11-02 Nathan Sidwell <nathan@acm.org>
2087
2088 * c-opts.c (c_common_post_options): Move var decl to its
2089 initialization point.
2090
2091 2020-11-01 Iain Sandoe <iain@sandoe.co.uk>
2092
2093 * c-lex.c (c_lex_with_flags): When combining '@' with a
2094 keyword for Objective-C, combine the location ranges too.
2095
2096 2020-10-30 Qing Zhao <qing.zhao@oracle.com>
2097 H.J.Lu <hjl.tools@gmail.com>
2098
2099 * c-attribs.c (c_common_attribute_table): Add new attribute
2100 zero_call_used_regs.
2101 (handle_zero_call_used_regs_attribute): New function.
2102
2103 2020-10-28 Marek Polacek <polacek@redhat.com>
2104
2105 PR c++/97573
2106 * c-opts.c (c_common_post_options): In C++20, turn on
2107 -Wdeprecated-enum-enum-conversion and
2108 -Wdeprecated-enum-float-conversion.
2109 * c.opt (Wdeprecated-enum-enum-conversion,
2110 Wdeprecated-enum-float-conversion): New options.
2111 (Wenum-conversion): Allow for C++ too.
2112
2113 2020-10-28 Jakub Jelinek <jakub@redhat.com>
2114
2115 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
2116 * c-omp.c: Include bitmap.h.
2117 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
2118
2119 2020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2120
2121 * c-common.c (__is_nothrow_assignable): New.
2122 (__is_nothrow_constructible): Likewise.
2123 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
2124 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
2125
2126 2020-10-23 Jan Hubicka <hubicka@ucw.cz>
2127
2128 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
2129
2130 2020-10-23 Marek Polacek <polacek@redhat.com>
2131
2132 PR c++/91741
2133 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
2134 (c_common_init_ts): Likewise.
2135 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
2136 * c-common.h (maybe_warn_sizeof_array_div): Declare.
2137 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
2138 (maybe_warn_sizeof_array_div): New function.
2139 * c.opt (Wsizeof-array-div): New option.
2140
2141 2020-10-23 Martin Sebor <msebor@redhat.com>
2142
2143 PR c/97463
2144 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
2145
2146 2020-10-22 Martin Liska <mliska@suse.cz>
2147
2148 PR c/94722
2149 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
2150 (handle_stack_protect_attribute): Add error message for a
2151 no_stack_protector function.
2152
2153 2020-10-22 Martin Liska <mliska@suse.cz>
2154
2155 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
2156
2157 2020-10-22 Jan Hubicka <hubicka@ucw.cz>
2158
2159 * c-gimplify.c: Include tree-nested.h
2160 (c_genericize): Update for new nested function info.
2161
2162 2020-10-14 Martin Sebor <msebor@redhat.com>
2163
2164 PR c/97413
2165 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
2166 bounds in an extra list.
2167
2168 2020-10-05 Richard Biener <rguenther@suse.de>
2169 Jakub Jelinek <jakub@redhat.com>
2170
2171 PR c++/97197
2172 * c-pretty-print.c: Include langhooks.h.
2173 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
2174 expression.
2175 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
2176 unary_expression.
2177 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
2178
2179 2020-09-30 Martin Sebor <msebor@redhat.com>
2180
2181 PR middle-end/97189
2182 * c-attribs.c (append_access_attr): Use the function declaration
2183 location for a warning about an attribute access argument.
2184
2185 2020-09-29 Marek Polacek <polacek@redhat.com>
2186
2187 PR c++/94695
2188 * c.opt (Wrange-loop-construct): New option.
2189
2190 2020-09-23 Martin Sebor <msebor@redhat.com>
2191
2192 PR c/97131
2193 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
2194
2195 2020-09-23 Marek Polacek <polacek@redhat.com>
2196
2197 PR c/97125
2198 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
2199 after loops and other structured control constructs have been lowered.
2200
2201 2020-09-22 Jakub Jelinek <jakub@redhat.com>
2202
2203 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
2204 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
2205
2206 2020-09-21 Marek Polacek <polacek@redhat.com>
2207
2208 * c.opt (Wctad-maybe-unsupported): New option.
2209
2210 2020-09-19 Martin Sebor <msebor@redhat.com>
2211
2212 PR c/50584
2213 * c-common.h (warn_parm_array_mismatch): Declare new function.
2214 (has_attribute): Move declaration of an existing function.
2215 (build_attr_access_from_parms): Declare new function.
2216 * c-warn.c (parm_array_as_string): Define new function.
2217 (plus_one): Define new function.
2218 (warn_parm_ptrarray_mismatch): Define new function.
2219 (warn_parm_array_mismatch): Define new function.
2220 (vla_bound_parm_decl): New function.
2221 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
2222 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
2223 qualifiers here...
2224 (c_pretty_printer::direct_abstract_declarator): ...but instead print
2225 them in brackets here. Also print [static]. Strip extraneous
2226 expressions from VLA bounds.
2227
2228 2020-09-19 Martin Sebor <msebor@redhat.com>
2229
2230 PR c/50584
2231 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
2232 (handle_argspec_attribute): New function.
2233 (get_argument, get_argument_type): New functions.
2234 (append_access_attrs): Add overload. Handle internal attribute
2235 representation in addition to external.
2236 (handle_access_attribute): Handle internal attribute representation
2237 in addition to external.
2238 (build_attr_access_from_parms): New function.
2239
2240 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2241
2242 * c-gimplify.c (genericize_c_loop): Rewrite to match
2243 c_finish_loop in c-typeck.c.
2244
2245 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2246
2247 * c-common.c (c_block_may_fallthrough): New, split from
2248 cxx_block_may_fallthrough in the cp front end.
2249 (c_common_init_ts): Move handling of loop and switch-related
2250 statements here from the cp front end.
2251 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
2252 cp front end.
2253 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
2254 * c-common.h (c_block_may_fallthru): Declare.
2255 (bc_state_t): Move here from cp front end.
2256 (save_bc_state, restore_bc_state): Declare.
2257 (c_genericize_control_stmt): Declare.
2258 (WHILE_COND, WHILE_BODY): Likewise.
2259 (DO_COND, DO_BODY): Likewise.
2260 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
2261 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
2262 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
2263 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
2264 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
2265 * c-dump.c (dump_stmt): Copy from cp front end.
2266 (c_dump_tree): Move code to handle structured loop and switch
2267 tree nodes here from cp front end.
2268 * c-gimplify.c: Adjust includes.
2269 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
2270 cp front end.
2271 (save_bc_state, restore_bc_state): New functions using old code
2272 from cp front end.
2273 (get_bc_label, expr_loc_or_loc): Move from cp front end.
2274 (genericize_c_loop): Move from cp front end.
2275 (genericize_for_stmt, genericize_while_stmt): Likewise.
2276 (genericize_do_stmt, genericize_switch_stmt): Likewise.
2277 (genericize_continue_stmt, genericize_break_stmt): Likewise.
2278 (genericize_omp_for_stmt): Likewise.
2279 (c_genericize_control_stmt): New function using code split from
2280 cp front end.
2281 (c_genericize_control_r): New.
2282 (c_genericize): Call walk_tree with c_genericize_control_r.
2283 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
2284 structured loop and switch tree nodes here from cp front end.
2285
2286 2020-09-17 Patrick Palka <ppalka@redhat.com>
2287
2288 PR c/80076
2289 * c-indentation.c (should_warn_for_misleading_indentation): Move
2290 declarations of local variables closer to their first use.
2291 Handle virtual token locations by resolving them to their
2292 respective macro expansion points. If all three tokens are
2293 produced from the same macro expansion, then instead use their
2294 loci within the macro definition.
2295
2296 2020-09-16 Martin Sebor <msebor@redhat.com>
2297
2298 PR c/78666
2299 PR c/96126
2300 * c-attribs.c (validate_attr_args): New function.
2301 (validate_attr_arg): Same.
2302 (handle_section_attribute): Call it. Introduce a local variable.
2303 (handle_alloc_size_attribute): Same.
2304 (handle_alloc_align_attribute): Same.
2305
2306 2020-09-14 Jakub Jelinek <jakub@redhat.com>
2307
2308 * c-attribs.c (handle_optimize_attribute): Adjust
2309 cl_optimization_save, cl_optimization_restore and
2310 build_optimization_node callers.
2311 * c-pragma.c (handle_pragma_optimize): Adjust
2312 build_optimization_node caller.
2313 (handle_pragma_push_options): Adjust
2314 build_optimization_node and build_target_option_node callers.
2315 (handle_pragma_pop_options, handle_pragma_reset_options):
2316 Adjust cl_optimization_restore callers.
2317
2318 2020-08-28 Martin Sebor <msebor@redhat.com>
2319
2320 * c.opt (Wstringop-overread): New option.
2321
2322 2020-08-11 Jakub Jelinek <jakub@redhat.com>
2323
2324 PR c/96545
2325 * c-common.c (get_atomic_generic_size): Require that first argument's
2326 type points to a complete type and use tree_fits_uhwi_p instead of
2327 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
2328
2329 2020-07-31 Martin Sebor <msebor@redhat.com>
2330
2331 PR c++/96003
2332 * c-common.c (check_function_arguments_recurse): Return early when
2333 no-warning bit is set.
2334
2335 2020-07-31 Richard Biener <rguenther@suse.de>
2336
2337 PR debug/96383
2338 * c-common.h (c_common_finalize_early_debug): Declare.
2339 * c-common.c: Include debug.h.
2340 (c_common_finalize_early_debug): finalize_early_debug langhook
2341 implementation generating debug for extern declarations.
2342
2343 2020-07-27 Nathan Sidwell <nathan@acm.org>
2344
2345 * c-common.c (try_to_locate_new_include_insertion_point): Use
2346 strcmp, not pointer equality.
2347
2348 2020-07-25 Martin Sebor <msebor@redhat.com>
2349
2350 PR c++/96310
2351 * c-common.c (check_nonnull_arg): Print note only when warning was
2352 issued.
2353
2354 2020-07-22 Tobias Burnus <tobias@codesourcery.com>
2355
2356 * c-omp.c (c_finish_omp_critical): Check for no name but
2357 nonzero hint provided.
2358
2359 2020-07-20 Jason Merrill <jason@redhat.com>
2360
2361 * c-cppbuiltin.c (c_cpp_builtins): Update
2362 __cpp_nontype_template_args for C++20.
2363
2364 2020-07-20 Martin Sebor <msebor@redhat.com>
2365
2366 PR c/96249
2367 * c.opt: Remove stray text.
2368
2369 2020-07-14 Lewis Hyatt <lhyatt@gmail.com>
2370
2371 PR other/86904
2372 * c-indentation.c (should_warn_for_misleading_indentation): Get
2373 global tabstop from the new source.
2374 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
2375 is now a common option.
2376 * c.opt: Likewise.
2377
2378 2020-07-08 Eric Botcazou <ebotcazou@adacore.com>
2379
2380 * c.opt (Wscalar-storage-order): Add explicit variable.
2381
2382 2020-07-07 Nathan Sidwell <nathan@acm.org>
2383
2384 * c-opts.c (c_common_post_options): Add 'injecting' arg to
2385 cpp_read_main_file.
2386 (c_finish_options): Add linemap_line_start calls for builtin and cmd
2387 maps. Force token position to line_table's highest line.
2388 * c-ppoutput.c (print_line_1): Refactor, print line zero.
2389 (cb_define): Always increment source line.
2390
2391 2020-07-06 Martin Sebor <msebor@redhat.com>
2392
2393 PR c++/95984
2394 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
2395 to stub lambda objects with null this pointer.
2396 (check_nonnull_arg): Handle C++ nullptr.
2397
2398 2020-07-02 Jason Merrill <jason@redhat.com>
2399 Jakub Jelinek <jakub@redhat.com>
2400
2401 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
2402
2403 2020-06-30 Jakub Jelinek <jakub@redhat.com>
2404
2405 PR c++/95963
2406 * c-common.c (check_function_arguments_recurse): Don't crash on
2407 calls to internal functions.
2408
2409 2020-06-28 Martin Sebor <msebor@redhat.com>
2410
2411 PR c++/86568
2412 * c-common.c (struct nonnull_arg_ctx): Add members.
2413 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
2414 C++ member functions specially. Consider the this pointer implicitly
2415 nonnull.
2416 (check_nonnull_arg): Use location of argument when available.
2417 (check_function_arguments): Use nonnull_arg_ctx as argument.
2418
2419 2020-06-27 Jakub Jelinek <jakub@redhat.com>
2420
2421 PR middle-end/95903
2422 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
2423 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
2424 smaller precision intop operands separately.
2425
2426 2020-06-26 Marek Polacek <polacek@redhat.com>
2427
2428 * c-opts.c (c_common_init_options): Default to gnu++17.
2429
2430 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
2431
2432 PR c/95378
2433 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
2434 pointer arguments.
2435
2436 2020-06-16 Jakub Jelinek <jakub@redhat.com>
2437
2438 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
2439 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
2440 idx members.
2441 (c_omp_is_loop_iterator): New function.
2442 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
2443 if outer loop iterator is present. Perform duplicate checking through
2444 hash_set in the function rather than expecting caller to do that.
2445 Pass NULL instead of d->ppset to walk_tree_1.
2446 (c_omp_check_nonrect_loop_iv): New function.
2447 (c_omp_check_loop_iv): Use it. Fill in new members, allow
2448 non-rectangular loop forms, diagnose multiple associated loops with
2449 the same iterator. Pass NULL instead of &pset to walk_tree_1.
2450 (c_omp_check_loop_iv_exprs): Likewise.
2451
2452 2020-06-10 Martin Liska <mliska@suse.cz>
2453
2454 PR tree-optimization/92860
2455 * c-attribs.c (handle_optimize_attribute):
2456 Save global options and compare it after parsing of function
2457 attribute.
2458 * c-pragma.c (opt_stack::saved_global_options): New field.
2459 (handle_pragma_push_options): Save global_options.
2460 (handle_pragma_pop_options): Compare them after pop.
2461
2462 2020-06-09 Jakub Jelinek <jakub@redhat.com>
2463
2464 PR c/95580
2465 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
2466 case when MEM_REF's first argument has type pointer to incomplete type.
2467
2468 2020-06-05 Jason Merrill <jason@redhat.com>
2469
2470 * c-pretty-print.c (pp_c_additive_expression): Handle negative
2471 operand to POINTER_PLUS_EXPR.
2472
2473 2020-06-04 Martin Sebor <msebor@redhat.com>
2474
2475 PR middle-end/10138
2476 PR middle-end/95136
2477 * c-attribs.c (append_access_attrs): Handle attr_access::none.
2478 (handle_access_attribute): Same.
2479
2480 2020-06-03 Mark Wielaard <mark@klomp.org>
2481
2482 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
2483 New function.
2484 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
2485 New function declaration.
2486
2487 2020-06-03 Mark Wielaard <mark@klomp.org>
2488
2489 * known-headers.cc (get_string_macro_hint): New function.
2490 (get_stdlib_header_for_name): Use get_string_macro_hint.
2491 (get_c_stdlib_header_for_string_macro_name): New function.
2492 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
2493 New function declaration.
2494
2495 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
2496
2497 * c-common.h (c_omp_predetermined_mapping): Declare.
2498 * c-omp.c (c_omp_predetermined_mapping): New.
2499
2500 2020-05-22 Mark Wielaard <mark@klomp.org>
2501
2502 * known-headers.cc (get_stdlib_header_for_name): Add a new
2503 stdlib_hint array for stdbool and stdint.
2504
2505 2020-05-22 Mark Wielaard <mark@klomp.org>
2506
2507 * known-headers.cc (get_stdlib_header_for_name): Return
2508 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
2509 flag_isoc99.
2510
2511 2020-05-20 Nathan Sidwell <nathan@acm.org>
2512
2513 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
2514
2515 * c-common.c (try_to_locate_new_include_insertion_point): Use
2516 strcmp to compare filenames.
2517 * c-lex.c (init_c_lex): Move declaration to initialization.
2518 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
2519 deferred count loop.
2520
2521 2020-05-15 Jason Merrill <jason@redhat.com>
2522
2523 * c-opts.c (set_std_cxx20): Set flag_coroutines.
2524
2525 2020-05-13 Jason Merrill <jason@redhat.com>
2526
2527 * c.opt (std=c++20): Make c++2a the alias.
2528 (std=gnu++20): Likewise.
2529 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
2530 * c-opts.c: Adjust.
2531 * c-cppbuiltin.c: Adjust.
2532 * c-ubsan.c: Adjust.
2533 * c-warn.c: Adjust.
2534
2535 2020-05-12 Eric Botcazou <ebotcazou@adacore.com>
2536
2537 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
2538
2539 2020-05-08 Nathan Sidwell <nathan@acm.org>
2540
2541 Reimplement directives only processing.
2542 * c-ppoutput.c (token_streamer): Ne.
2543 (directives_only_cb): New. Swallow ...
2544 (print_lines_directives_only): ... this.
2545 (scan_translation_unit_directives_only): Reimplment using the
2546 published interface.
2547
2548 2020-05-07 Marek Polacek <polacek@redhat.com>
2549
2550 * c-format.c (badwords): Add "nonstatic".
2551
2552 202-05-07 Jakub Jelinek <jakub@redhat.com>
2553
2554 PR c/94968
2555 * c-common.c (speculation_safe_value_resolve_params): Return false if
2556 error_operand_p (val2).
2557 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
2558 Remove extraneous semicolon.
2559
2560 2020-05-06 qing zhao <qing.zhao@oracle.com>
2561
2562 PR c/94230
2563 * c-indentation.c (get_visual_column): Add a hint to use the new
2564 -flarge-source-files option.
2565
2566 2020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
2567
2568 * c-attribs.c (handle_vector_size_attribute): Add attribute
2569 nonnull for argument args in order to silence warning of
2570 uninitialized variable usage. Since this is local to the
2571 compilation unit and thus cannot be checked at call sides by the
2572 compiler, added an assert statement in order to verify this.
2573
2574 2020-05-01 H.J. Lu <hongjiu.lu@intel.com>
2575
2576 PR target/93492
2577 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
2578 value to USHRT_MAX (65535).
2579
2580 2020-04-29 Jakub Jelinek <jakub@redhat.com>
2581
2582 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
2583
2584 2020-04-27 Jakub Jelinek <jakub@redhat.com>
2585
2586 PR c/94755
2587 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
2588 fncode == BUILT_IN_NONE before initialization of first_param.
2589
2590 2020-04-23 Marek Polacek <polacek@redhat.com>
2591
2592 PR c++/94733
2593 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
2594 TREE_PURPOSE.
2595
2596 2020-04-14 Patrick Palka <ppalka@redhat.com>
2597
2598 PR c++/85278
2599 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
2600 ampersand if it's an rvalue reference type.
2601
2602 2020-04-13 Martin Sebor <msebor@redhat.com>
2603
2604 PR c/92326
2605 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
2606 printing array bound for flexible array members.
2607
2608 2020-04-13 Iain Sandoe <iain@sandoe.co.uk>
2609
2610 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
2611 define, per n4861.
2612
2613 2020-04-02 Richard Biener <rguenther@suse.de>
2614
2615 PR c/94392
2616 * c-opts.c (c_common_post_options): Enable -ffinite-loops
2617 for -O2 and C++11 or newer.
2618
2619 2020-03-28 Patrick Palka <ppalka@redhat.com>
2620
2621 * c.opt: Add -fconcepts-diagnostics-depth.
2622
2623 2020-03-27 Martin Sebor <msebor@redhat.com>
2624
2625 PR c++/94346
2626 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
2627 to decl_attributes. Make handling of different kinds of entities
2628 more robust.
2629
2630 2020-03-27 Martin Sebor <msebor@redhat.com>
2631
2632 PR c++/94098
2633 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
2634 here.
2635
2636 2020-03-23 Jakub Jelinek <jakub@redhat.com>
2637
2638 PR c++/91993
2639 * c-warn.c (warnings_for_convert_and_check): For expr and/or
2640 result being COMPOUND_EXPRs, skip to ultimate rhs.
2641
2642 2020-03-20 Richard Sandiford <richard.sandiford@arm.com>
2643
2644 PR middle-end/94072
2645 * c-common.c (c_common_type_for_mode): Before using a registered
2646 built-in type, check that the vectorness of the type matches
2647 the vectorness of the mode.
2648
2649 2020-03-17 Jakub Jelinek <jakub@redhat.com>
2650
2651 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
2652 issue in a diagnostic message.
2653
2654 2020-03-15 Lewis Hyatt <lhyatt@gmail.com>
2655
2656 * c.opt: Avoid redundancy in the help text.
2657
2658 2020-03-02 Marek Polacek <polacek@redhat.com>
2659
2660 PR c++/93958 - add missing -std=gnu++20.
2661 * c.opt: Add -std=gnu++20.
2662
2663 2020-03-01 Martin Sebor <msebor@redhat.com>
2664
2665 PR c++/92721
2666 * c-attribs.c (append_access_attrs): Correctly handle attribute.
2667 (handle_access_attribute): Same.
2668
2669 2020-02-25 Jakub Jelinek <jakub@redhat.com>
2670
2671 PR c/93858
2672 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
2673 "did you mean" hint in diagnostics.
2674
2675 2020-02-15 Jason Merrill <jason@redhat.com>
2676
2677 * c.opt: Add -std=c++20.
2678
2679 2020-02-14 Eric Botcazou <ebotcazou@adacore.com>
2680
2681 * c-ada-spec.c: Include bitmap.h.
2682 (dump_ada_double_name): Rename into...
2683 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
2684 (dump_ada_array_type): Adjust to above renaming. Robustify.
2685 (dump_nested_types_1): New function copied from... Add dumped_types
2686 parameter and pass it down to dump_nested_type.
2687 (dump_nested_types): ...this. Remove parent parameter. Just call
2688 dump_nested_types_1 on an automatic bitmap.
2689 (dump_nested_type): Add dumped_types parameter.
2690 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
2691 Adjust recursive calls and adjust to above renaming.
2692 (dump_ada_declaration): Adjust call to dump_nested_types.
2693 Tidy up and adjust to above renaming.
2694 (dump_ada_specs): Initialize and release bitmap obstack.
2695
2696 2020-02-10 Martin Sebor <msebor@redhat.com>
2697
2698 PR c/93640
2699 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
2700
2701 2020-02-10 Jakub Jelinek <jakub@redhat.com>
2702
2703 PR other/93641
2704 * c-format.c (check_plain): Fix up last argument of strncasecmp.
2705 Remove useless extra test.
2706
2707 2020-02-03 Julian Brown <julian@codesourcery.com>
2708 Tobias Burnus <tobias@codesourcery.com>
2709
2710 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
2711
2712 2020-01-29 Jason Merrill <jason@redhat.com>
2713
2714 PR c++/89357
2715 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
2716
2717 2020-01-23 Jason Merrill <jason@redhat.com>
2718
2719 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
2720
2721 2020-01-23 Martin Sebor <msebor@redhat.com>
2722
2723 PR c/84919
2724 * c-common.c (check_function_arguments): Avoid overlap checking
2725 of sprintf functions.
2726
2727 2020-01-22 Jason Merrill <jason@redhat.com>
2728
2729 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
2730 PR c++/40752
2731 * c-warn.c (conversion_warning): Check operands only after checking
2732 the whole expression. Don't check second operand of + for sign.
2733
2734 2020-01-21 Jason Merrill <jason@redhat.com>
2735 Manuel López-Ibáñez <manu@gcc.gnu.org>
2736
2737 PR c++/40752 - useless -Wconversion with short +=.
2738 * c.opt (-Warith-conversion): New.
2739 * c-warn.c (conversion_warning): Recurse for operands of
2740 operators. Only warn about the whole expression with
2741 -Warith-conversion.
2742
2743 2020-01-21 Jason Merrill <jason@redhat.com>
2744
2745 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
2746 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
2747
2748 2020-01-20 Nathan Sidwell <nathan@acm.org>
2749
2750 PR preprocessor/80005
2751 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
2752
2753 2020-01-18 Iain Sandoe <iain@sandoe.co.uk>
2754
2755 * c-common.c (co_await, co_yield, co_return): New.
2756 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
2757 RID_CO_RETURN): New enumeration values.
2758 (D_CXX_COROUTINES): Bit to identify coroutines are active.
2759 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
2760 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
2761 * c.opt (fcoroutines): New command-line switch.
2762
2763 2020-01-10 David Malcolm <dmalcolm@redhat.com>
2764
2765 * c-format.c (local_event_ptr_node): New.
2766 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
2767 (init_dynamic_diag_info): Initialize local_event_ptr_node.
2768 * c-format.h (T_EVENT_PTR): New define.
2769
2770 2020-01-10 Martin Sebor <msebor@redhat.com>
2771
2772 PR c/93132
2773 * c-attribs.c (append_access_attrs): Validate against the translated
2774 access string rather than the human-readable representation.
2775
2776 2020-01-01 Jakub Jelinek <jakub@redhat.com>
2777
2778 Update copyright years.
2779
2780 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
2781
2782 * c-ada-spec.h (decl_sloc): Delete.
2783 * c-ada-spec.c (decl_sloc): Make static.
2784
2785 2019-12-19 Julian Brown <julian@codesourcery.com>
2786
2787 * c-common.h (c_omp_map_clause_name): Add prototype.
2788 * c-omp.c (c_omp_map_clause_name): New function.
2789 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
2790 PRAGMA_OACC_CLAUSE_DETACH.
2791
2792 2019-12-19 Julian Brown <julian@codesourcery.com>
2793 Maciej W. Rozycki <macro@codesourcery.com>
2794 Tobias Burnus <tobias@codesourcery.com>
2795 Thomas Schwinge <thomas@codesourcery.com>
2796
2797 * c-pragma.h (pragma_omp_clause): Add
2798 PRAGMA_OACC_CLAUSE_NO_CREATE.
2799
2800 2019-12-17 Martin Sebor <msebor@redhat.com>
2801
2802 PR c++/61339
2803 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
2804
2805 2019-12-11 David Malcolm <dmalcolm@redhat.com>
2806
2807 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
2808 implementation.
2809 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
2810
2811 2019-12-09 David Malcolm <dmalcolm@redhat.com>
2812
2813 * c-format.c (range_label_for_format_type_mismatch::get_text):
2814 Replace label_text ctor called with true with label_text::take.
2815
2816 2019-12-09 David Malcolm <dmalcolm@redhat.com>
2817
2818 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
2819 initial newline from expected outputs.
2820 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
2821 call to diagnostic_show_locus.
2822
2823 2019-12-06 Jakub Jelinek <jakub@redhat.com>
2824
2825 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
2826 now.
2827
2828 2019-12-05 Marek Polacek <polacek@redhat.com>
2829 Jakub Jelinek <jakub@redhat.com>
2830
2831 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
2832 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
2833
2834 2019-12-05 Marek Polacek <polacek@redhat.com>
2835
2836 PR c++/92271 - make __is_same alias for __is_same_as.
2837 * c-common.c: Add __is_same, an alias for __is_same_as.
2838
2839 2019-12-03 Marek Polacek <polacek@redhat.com>
2840
2841 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
2842 * c-cppbuiltin.c (c_cpp_builtins): Predefine
2843 __cpp_aggregate_paren_init=201902 for -std=c++2a.
2844
2845 2019-11-30 Jan Hubicka <hubicka@ucw.cz>
2846
2847 * c-attribs.c (handle_symver_attribute): New function
2848 (c_common_attributes): Add symver.
2849
2850 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
2851
2852 * c-common.c (pointer_int_sum): Use verify_type_context to check
2853 whether the target allows pointer arithmetic for the types involved.
2854 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
2855 to check whether the target allows sizeof and alignof operations
2856 for the types involved.
2857
2858 2019-11-27 Jason Merrill <jason@redhat.com>
2859
2860 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
2861
2862 2019-11-26 Jakub Jelinek <jakub@redhat.com>
2863
2864 PR c++/61414
2865 * c-attribs.c (handle_mode_attribute): Add mode attribute to
2866 ENUMERAL_TYPEs.
2867
2868 2019-11-25 Joseph Myers <joseph@codesourcery.com>
2869
2870 PR c/91985
2871 * c-common.c (c_common_type_for_mode): Handle decimal
2872 floating-point types being NULL_TREE.
2873 * c-format.c (get_format_for_type_1): Handle specified types being
2874 NULL_TREE.
2875 * c-lex.c (interpret_float): Give an error for decimal
2876 floating-point constants when decimal floating-point not
2877 supported.
2878
2879 2019-11-23 Jakub Jelinek <jakub@redhat.com>
2880
2881 PR middle-end/83859
2882 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
2883 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
2884 group warning with inform together.
2885 (handle_access_attribute): Formatting fix.
2886
2887 2019-11-22 Jakub Jelinek <jakub@redhat.com>
2888
2889 PR c/90677
2890 * c-common.h (identifier_global_tag): Declare.
2891 * c-format.c (get_pointer_to_named_type): Renamed to ...
2892 (get_named_type): ... this. Use identifier_global_tag instead of
2893 identifier_global_value, handle the return value being a TYPE_P.
2894 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
2895 to call get_named_type instead. Formatting fixes.
2896
2897 Implement P1902R1, Missing feature-test macros 2017-2019.
2898 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
2899 and __cpp_generic_lambdas for -std=c++2a. Define
2900 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
2901 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
2902 __cpp_concepts for -std=c++2a.
2903
2904 2019-11-22 Martin Sebor <msebor@redhat.com>
2905
2906 PR middle-end/83859
2907 * c-attribs.c (handle_access_attribute): New function.
2908 (c_common_attribute_table): Add new attribute.
2909 (get_argument_type): New function.
2910 (append_access_attrs): New function.
2911 (get_nonnull_operand): Rename...
2912 (get_attribute_operand): ...to this.
2913 * c-common.c (get_nonnull_operand): Rename...
2914 (get_attribute_operand): ...to this.
2915
2916 2019-11-21 Joseph Myers <joseph@codesourcery.com>
2917
2918 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
2919 of warning.
2920
2921 2019-11-19 Joseph Myers <joseph@codesourcery.com>
2922
2923 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
2924 warning for standard attributes mixed with fallthrough attributes.
2925
2926 2019-11-15 Joseph Myers <joseph@codesourcery.com>
2927
2928 * c-attribs.c (handle_fallthrough_attribute): Remove static.
2929 * c-common.h (handle_fallthrough_attribute): Declare.
2930
2931 2019-11-15 Joseph Myers <joseph@codesourcery.com>
2932
2933 * c-attribs.c (handle_deprecated_attribute): Remove static.
2934 * c-common.h (handle_deprecated_attribute): Declare.
2935
2936 2019-11-14 Joseph Myers <joseph@codesourcery.com>
2937
2938 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
2939 char for C.
2940
2941 2019-11-14 Jakub Jelinek <jakub@redhat.com>
2942
2943 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
2944 valid vendors.
2945
2946 * c-omp.c (c_omp_check_context_selector): Handle name lists
2947 containing string literals. Don't diagnose atomic_default_mem_order
2948 with multiple props.
2949
2950 2019-11-13 Joseph Myers <joseph@codesourcery.com>
2951
2952 * c-cppbuiltin.c (builtin_define_float_constants): Also define
2953 NORM_MAX constants. Update call to get_max_float.
2954 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
2955 constants.
2956
2957 2019-11-13 Eric Botcazou <ebotcazou@adacore.com>
2958
2959 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
2960 (dump_forward_type): Do not generate a declaration for function types.
2961 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
2962 of the component type if it is declared in another file.
2963
2964 2019-11-12 Martin Liska <mliska@suse.cz>
2965
2966 * c-opts.c (c_common_post_options):
2967 Use SET_OPTION_IF_UNSET.
2968
2969 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
2970 Frederik Harwath <frederik@codesourcery.com>
2971
2972 gcc/c-family/
2973 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
2974 constant.
2975 * c-pragma.c (oacc_pragmas): Add "serial" entry.
2976
2977 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
2978
2979 * c-common.h (gnu_vector_type_p): New function.
2980 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
2981 vectors to satisfy gnu_vector_type_p.
2982 (c_build_vec_convert): Likewise __builtin_convertvector.
2983 (convert_vector_to_array_for_subscript): Likewise when applying
2984 implicit vector to array conversion.
2985 (scalar_to_vector): Likewise when converting vector-scalar
2986 operations to vector-vector operations.
2987
2988 2019-11-08 Joseph Myers <joseph@codesourcery.com>
2989
2990 * c.opt (Wold-style-definition): Initialize to -1.
2991 * c-opts.c (c_common_post_options): Set warn_old_style_definition
2992 to flag_isoc2x if not set explicitly.
2993
2994 2019-11-07 Joseph Myers <joseph@codesourcery.com>
2995
2996 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
2997
2998 2019-11-05 Jason Merrill <jason@redhat.com>
2999
3000 * c-opts.c (c_common_post_options): -fconcepts-ts implies
3001 -fconcepts.
3002
3003 2019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
3004
3005 * c-opts.c (c_common_post_options): Update
3006 latest_abi_version.
3007
3008 2019-11-02 Jakub Jelinek <jakub@redhat.com>
3009
3010 * c-common.h (c_omp_get_context_selector): Remove.
3011 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
3012 and renamed to omp_get_context_selector.
3013
3014 * c-omp.c (c_omp_mark_declare_variant): Use
3015 omp_context_selector_set_compare.
3016
3017 PR c++/88335 - Implement P1073R3: Immediate functions
3018 * c-common.h (enum rid): Add RID_CONSTEVAL.
3019 * c-common.c (c_common_reswords): Add consteval.
3020
3021 2019-11-01 Martin Sebor <msebor@redhat.com>
3022
3023 PR middle-end/91679
3024 PR middle-end/91647
3025 PR middle-end/91463
3026 PR middle-end/92312
3027 * c-pretty-print.c (direct_abstract_declarator): Print
3028 bound in zero-length arrays.
3029 * c.opt (-Wzero-length-bounds): New option.
3030
3031 2019-10-30 Nathan Sidwell <nathan@acm.org>
3032
3033 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
3034 macros.
3035
3036 2019-10-28 Martin Sebor <msebor@redhat.com>
3037
3038 PR c/66970
3039 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
3040 even when only preprocessing.
3041 * c-common.h (names_builtin_p): Declare new function.
3042 * c-lex.c (init_c_lex): Set has_builtin.
3043 (c_common_has_builtin): Define a new function.
3044 * c-ppoutput.c (init_pp_output): Set has_builtin.
3045
3046 2019-10-24 Jakub Jelinek <jakub@redhat.com>
3047
3048 * c-common.h (c_omp_context_selector_matches): Remove.
3049 * c-omp.c (c_omp_context_selector_matches): Remove.
3050 * c-attribs.c (c_common_attribute_table): Add
3051 "omp declare target {host,nohost,block}" attributes.
3052
3053 2019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
3054
3055 * c-lex.c (c_common_has_attribute): Update nodiscard value.
3056
3057 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
3058
3059 * c-common.h (user_facing_original_type_p): Declare.
3060 * c-common.c: Include c-spellcheck.h.
3061 (user_facing_original_type_p): New function.
3062
3063 2019-10-12 Jakub Jelinek <jakub@redhat.com>
3064
3065 * c-common.h (c_omp_mark_declare_variant,
3066 c_omp_context_selector_matches): Declare.
3067 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
3068 and hsa-common.h.
3069 (c_omp_get_context_selector): Support second argument NULL.
3070 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
3071 functions.
3072 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
3073 attribute, add "omp declare variant base" and
3074 "omp declare variant variant" attributes.
3075
3076 2019-10-11 Joseph Myers <joseph@codesourcery.com>
3077
3078 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
3079 CppReason(CPP_W_C11_C2X_COMPAT).
3080
3081 2019-10-11 Joseph Myers <joseph@codesourcery.com>
3082
3083 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
3084 _Decimal64 and _Decimal128.
3085
3086 2019-10-10 Joseph Myers <joseph@codesourcery.com>
3087
3088 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
3089 types if DFP not supported.
3090
3091 2019-10-10 Jakub Jelinek <jakub@redhat.com>
3092
3093 * c-common.h (c_omp_check_context_selector,
3094 c_omp_get_context_selector): Declare.
3095 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
3096 in diagnostic message.
3097 (c_omp_check_context_selector, c_omp_get_context_selector): New
3098 functions.
3099 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
3100 attribute.
3101 (handle_omp_declare_variant_attribute): New function.
3102
3103 2019-10-09 Martin Sebor <msebor@redhat.com>
3104
3105 PR tree-optimization/90879
3106 * c.opt (-Wstring-compare): New option.
3107
3108 2019-10-08 Andrew Sutton <asutton@lock3software.com>
3109 Jason Merrill <jason@redhat.com>
3110
3111 Update the concepts implementation to conform to the C++20
3112 specification, improve compile times, and generally clean up
3113 the implementation.
3114
3115 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
3116 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
3117 * c.opt: Add -Wconcepts-ts.
3118 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
3119 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
3120 (set_std_cxx2a): Enable concepts by default.
3121
3122 2019-10-08 Joseph Myers <joseph@codesourcery.com>
3123
3124 * c-opts.c (c_common_post_options): Set
3125 -fno-fp-int-builtin-inexact for C2X.
3126
3127 2019-10-05 Jakub Jelinek <jakub@redhat.com>
3128
3129 PR c++/91369 - Implement P0784R7: constexpr new
3130 * c-cppbuiltin.c (c_cpp_builtins): Predefine
3131 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
3132
3133 2019-10-04 Joseph Myers <joseph@codesourcery.com>
3134
3135 PR c/82752
3136 * c-format.c (C_STD_VER): Handle C2x.
3137 (C_STD_NAME): Likewise.
3138 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
3139 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
3140 modifier allowed and 'p' flag.
3141 * c-format.h (enum format_std_version): Add STD_C2X.
3142 (struct format_char_info): Mention 'p' in comment on flags2.
3143
3144 2019-10-01 David Malcolm <dmalcolm@redhat.com>
3145
3146 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
3147 calling diagnostic_show_locus, rather than destroying it afterwards.
3148
3149 2019-10-01 Jakub Jelinek <jakub@redhat.com>
3150
3151 PR c++/91925
3152 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
3153 with NULL DECL_FIELD_OFFSET.
3154
3155 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
3156
3157 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
3158 has a type name, use it in preference to the __vector syntax.
3159
3160 2019-09-30 Richard Sandiford <richard.sandiford@arm.com>
3161
3162 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
3163 two spaces between a comma and "...".
3164
3165 2019-09-27 Jakub Jelinek <jakub@redhat.com>
3166
3167 PR c++/88203
3168 * c-common.h (c_omp_predefined_variable): Declare.
3169 * c-omp.c (c_omp_predefined_variable): New function.
3170 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
3171 for predefined variables.
3172
3173 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
3174
3175 * c-common.h (build_function_call_vec): Take the original
3176 function decl as an optional final parameter.
3177 (check_builtin_function_arguments): Take the original function decl.
3178 * c-common.c (check_builtin_function_arguments): Likewise.
3179 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
3180 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
3181
3182 2019-09-15 Jason Merrill <jason@redhat.com>
3183
3184 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
3185 fold_for_warn in "|| mask" warning.
3186
3187 2019-09-10 Martin Liska <mliska@suse.cz>
3188
3189 * c.opt: Use newly added WarnRemoved.
3190
3191 2019-09-09 Martin Liska <mliska@suse.cz>
3192
3193 * c.opt: Update comment of removed
3194 options that are preserved only for backward
3195 compatibility.
3196
3197 2019-09-06 Martin Liska <mliska@suse.cz>
3198
3199 PR c++/91125
3200 * c-common.c: Remove definition of flag_use_repository.
3201 * c-common.h: Likewise.
3202 * c-opts.c (c_common_handle_option):
3203 Do not handle OPT_frepo option.
3204 * c.opt: Mark the option with Deprecated.
3205
3206 2019-09-04 Marek Polacek <polacek@redhat.com>
3207
3208 * c.opt (fdeduce-init-list): Ignored.
3209
3210 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3211
3212 PR c/78736
3213 * c.opt (Wenum-conversion): New option.
3214
3215 2019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3216
3217 * c-attribs.c (handle_section_attribute): Call the
3218 handle_generic_attribute target hook after performing target
3219 independent processing.
3220 (handle_noinit_attribute): Likewise.
3221
3222 2019-09-03 Ian Lance Taylor <iant@golang.org>
3223
3224 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
3225 when using -fgo-dump-spec.
3226
3227 2019-09-02 Martin Liska <mliska@suse.cz>
3228
3229 PR c++/91155
3230 * c-common.c (fname_as_string): Use cxx_printable_name for
3231 __PRETTY_FUNCTION__ same as was used before r265711.
3232
3233 2019-08-28 Marek Polacek <polacek@redhat.com>
3234
3235 Implement P1152R4: Deprecating some uses of volatile.
3236 PR c++/91361
3237 * c-opts.c (c_common_post_options): Enable -Wvolatile by
3238 default for C++2a, unless -Wno-deprecated.
3239 * c.opt (Wvolatile): New warning.
3240
3241 2019-08-28 Marek Polacek <polacek@redhat.com>
3242
3243 PR c++/91360 - Implement C++20 P1143R2: constinit.
3244 * c-common.c (c_common_reswords): Add constinit and __constinit.
3245 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
3246 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
3247 RID_LAST_CXX20.
3248 (D_CXX20): Define.
3249 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
3250 * c-format.c (cxx_keywords): Add "constinit".
3251 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
3252
3253 2019-08-27 Jakub Jelinek <jakub@redhat.com>
3254
3255 PR c++/91415
3256 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
3257 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
3258 like COMPOUND_EXPR rather than normal expression.
3259
3260 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
3261
3262 PR pch/61250
3263 * c-lex.c (c_lex_with_flags): Don't call
3264 c_common_no_more_pch () from here.
3265
3266 2019-08-23 Jakub Jelinek <jakub@redhat.com>
3267
3268 PR middle-end/91283
3269 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
3270 instead of flag_excess_precision_cmdline.
3271 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
3272 * c-opts.c (c_common_post_options): Likewise.
3273
3274 2019-08-22 Martin Sebor <msebor@redhat.com>
3275
3276 PR middle-end/91490
3277 * c-common.c (braced_list_to_string): Add argument and overload.
3278 Handle flexible length arrays and unions.
3279
3280 2019-08-21 Eric Botcazou <ebotcazou@adacore.com>
3281
3282 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
3283 function declarations where arguments are missing. Rename variables.
3284
3285 2019-08-15 Richard Biener <rguenther@suse.de>
3286
3287 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
3288 enabled, define __SIZETYPE__.
3289
3290 2019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
3291
3292 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
3293 exclusion with "section" attribute.
3294 (attr_noinit_exclusions): New table.
3295 (handle_noinit_attribute): New function.
3296
3297 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
3298
3299 PR middle-end/91421
3300 * c-common.c (resolve_overloaded_builtin): Use
3301 copy_decl_built_in_function.
3302
3303 2019-08-13 Martin Sebor <msebor@redhat.com>
3304
3305 PR c/80619
3306 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
3307 (asm_fprintf_length_spec): Same.
3308 * c-format.h (format_lengths): Add FMT_LEN_w.
3309
3310 2019-08-10 Jakub Jelinek <jakub@redhat.com>
3311
3312 * c-pragma.h (enum pragma_omp_clause): Add
3313 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3314
3315 2019-08-07 Jakub Jelinek <jakub@redhat.com>
3316
3317 * c-pragma.h (enum pragma_omp_clause): Add
3318 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
3319 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
3320 enumeration value.
3321
3322 2019-08-05 Marek Polacek <polacek@redhat.com>
3323
3324 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
3325 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
3326 default for C++2a, unless -Wno-deprecated.
3327 * c.opt (Wcomma-subscript): New warning.
3328
3329 2019-07-20 Jakub Jelinek <jakub@redhat.com>
3330
3331 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
3332 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
3333 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
3334 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
3335 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
3336 constructs with the loop construct.
3337
3338 2019-07-13 Jakub Jelinek <jakub@redhat.com>
3339
3340 PR c/91149
3341 * c-omp.c (c_omp_split_clauses): Fix a pasto in
3342 OMP_CLAUSE_REDUCTION_TASK handling.
3343
3344 2019-07-12 Jakub Jelinek <jakub@redhat.com>
3345
3346 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
3347 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
3348
3349 2019-07-09 Martin Sebor <msebor@redhat.com>
3350
3351 PR c++/61339
3352 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
3353 and others to class.
3354 * c-pretty-print.h: Same.
3355
3356 2019-07-09 Martin Sebor <msebor@redhat.com>
3357
3358 PR c++/61339
3359 * c-format.c (check_argument_type): Change class-key from class to
3360 struct and vice versa to match convention and avoid -Wclass-is-pod
3361 and -Wstruct-no-pod.
3362 * c-pretty-print.h: Same.
3363
3364 2019-07-03 Martin Liska <mliska@suse.cz>
3365
3366 * c-common.c (try_to_locate_new_include_insertion_point): Remove
3367 dead assignemts.
3368
3369 2019-07-03 Jakub Jelinek <jakub@redhat.com>
3370
3371 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
3372 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
3373 with OMP_PARALLEL.
3374
3375 2019-07-02 qing zhao <qing.zhao@oracle.com>
3376
3377 PR preprocessor/90581
3378 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
3379 * c.opt: Add new option -fmax-include-depth.
3380
3381 2019-06-26 Jason Merrill <jason@redhat.com>
3382
3383 PR c++/55442 - memory-hog with highly recursive constexpr.
3384 * c.opt (fconstexpr-loop-limit): New.
3385
3386 2019-06-25 Jakub Jelinek <jakub@redhat.com>
3387
3388 PR sanitizer/90954
3389 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
3390 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
3391
3392 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3393
3394 * c-common.c (c_common_nodes_and_builtins): Define
3395 alternate "__intN__" name for "__intN" types.
3396
3397 2019-06-24 Jan Hubicka <jh@suse.cz>
3398
3399 * c-common.c (braced_lists_to_strings): Check that
3400 type is array or integer prior checking string flag.
3401
3402 2019-06-21 Matthew Beliveau <mbelivea@redhat.com>
3403
3404 PR c++/90875 - added -Wswitch-outside-range option
3405 * c.opt (Wswitch-outside-range): Added new option.
3406 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
3407
3408 2019-06-21 Marek Polacek <polacek@redhat.com>
3409
3410 PR c++/90953 - ICE with -Wmissing-format-attribute.
3411 * c-common.c (check_function_arguments_recurse): Use
3412 get_attribute_name.
3413 (check_missing_format_attribute): Likewise.
3414
3415 2019-06-19 Marek Polacek <polacek@redhat.com>
3416
3417 PR c++/60364 - noreturn after first decl not diagnosed.
3418 * c-attribs.c (handle_noreturn_attribute): No longer static.
3419 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
3420 Declare.
3421 * c-format.c (check_function_format): Use get_attribute_name.
3422
3423 2019-06-19 Martin Sebor <msebor@redhat.com>
3424
3425 PR translation/90156
3426 * c-format.c (function_format_info::format_type): Adjust type.
3427 (function_format_info::is_raw): New member.
3428 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
3429 (decode_format_attr): Adjust call to decode_format_type.
3430 Avoid a redundant call to convert_format_name_to_system_name.
3431 Avoid abbreviating the word "arguments" in a diagnostic.
3432 (format_warning_substr): New function.
3433 (avoid_dollar_number): Quote dollar sign in a diagnostic.
3434 (finish_dollar_format_checking): Same.
3435 (check_format_info): Same.
3436 (struct baltoks_t): New.
3437 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
3438 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
3439 functions.
3440 (check_format_info_main): Call check_plain. Use baltoks_t. Call
3441 maybe_diag_unbalanced_tokens.
3442 (handle_format_attribute): Spell out the word "arguments" in
3443 a diagnostic.
3444
3445 2019-06-11 Matthew Beliveau <mbelivea@redhat.com>
3446
3447 PR c++/90449 - add -Winaccessible-base option.
3448 * c.opt (Winaccessible-base): New option.
3449
3450 2019-06-10 Jakub Jelinek <jakub@redhat.com>
3451
3452 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
3453 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
3454 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
3455 combined/composite constructs where it is not allowed. Copy over
3456 OMP_CLAUSE_REDUCTION_INSCAN.
3457
3458 2019-06-05 Martin Sebor <msebor@redhat.com>
3459
3460 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
3461 (handle_alias_ifunc_attribute): Same.
3462 (handle_copy_attribute): Same.
3463 (handle_weakref_attribute): Same.
3464 (handle_nonnull_attribute): Same.
3465 * c-warn.c (warn_for_sign_compare): Same.
3466 (warn_for_restrict): Same.
3467 * c.opt: Same.
3468
3469 2019-06-05 Martin Sebor <msebor@redhat.com>
3470
3471 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
3472 * c.opt (-Wformat-diag): Remove a spurious period.
3473
3474 2019-05-29 Jakub Jelinek <jakub@redhat.com>
3475
3476 PR c/90628
3477 * c-common.c (check_builtin_function_arguments)
3478 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
3479 as last argument.
3480
3481 2019-05-23 Eric Botcazou <ebotcazou@adacore.com>
3482
3483 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
3484
3485 2019-05-22 Martin Liska <mliska@suse.cz>
3486
3487 PR lto/90500
3488 * c-attribs.c (handle_copy_attribute): Do not copy
3489 target_clones attribute.
3490
3491 2019-05-21 Eric Botcazou <ebotcazou@adacore.com>
3492
3493 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
3494 * c-ada-spec.c (print_assignment_operator): New function.
3495 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
3496 assignment operators declared as methods and filter out the others.
3497
3498 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
3499
3500 PR c/89433
3501 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
3502 "omp declare target".
3503
3504 2019-05-16 Martin Sebor <msebor@redhat.com>
3505
3506 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
3507 keywords, operators, and types in diagnostics.
3508 (handle_scalar_storage_order_attribute): Same.
3509 (handle_mode_attribute): Same.
3510 (handle_visibility_attribute): Same.
3511 (handle_assume_aligned_attribute): Same.
3512 (handle_no_split_stack_attribute): Same.
3513 * c-common.c (shorten_compare): Same.
3514 (c_common_truthvalue_conversion): Same.
3515 (cb_get_source_date_epoch): Same.
3516 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
3517 in diagnostics.
3518 (interpret_float): Same.
3519 * c-omp.c (c_finish_omp_for): Same.
3520 * c-opts.c (c_common_post_options): Same.
3521 * c-pch.c (c_common_pch_pragma): Same.
3522 * c-pragma.c (pop_alignment): Same.
3523 (handle_pragma_pack): Same.
3524 (apply_pragma_weak): Same.
3525 (handle_pragma_weak): Same.
3526 (handle_pragma_scalar_storage_order): Same.
3527 (handle_pragma_redefine_extname): Same.
3528 (add_to_renaming_pragma_list): Same.
3529 (maybe_apply_renaming_pragma): Same.
3530 (push_visibility): Same.
3531 (handle_pragma_visibility): Same.
3532 (handle_pragma_optimize): Same.
3533 (handle_pragma_message): Same.
3534 * c-warn.c (warn_for_omitted_condop): Same.
3535 (lvalue_error): Same.
3536
3537 2019-05-15 Richard Biener <rguenther@suse.de>
3538
3539 PR c/90474
3540 * c-common.c (c_common_mark_addressable_vec): Also mark
3541 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
3542 c_mark_addressable.
3543
3544 2019-05-06 Nathan Sidwell <nathan@acm.org>
3545
3546 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
3547
3548 2019-04-30 Nathan Sidwell <nathan@acm.org>
3549
3550 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
3551
3552 2019-04-30 Martin Liska <mliska@suse.cz>
3553
3554 * c-pragma.c (handle_pragma_diagnostic): Provide hints
3555 for unknown options.
3556
3557 2019-04-26 Richard Sandiford <richard.sandiford@arm.com>
3558
3559 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
3560 the pointer target rather than the pointer itself.
3561
3562 2019-04-19 Jakub Jelinek <jakub@redhat.com>
3563
3564 PR c/89888
3565 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
3566 arguments.
3567 (c_do_switch_warnings): Remove outside_range_p argument.
3568 * c-common.c (check_case_bounds): Removed.
3569 (c_add_case_label): Remove orig_type and outside_range_p arguments.
3570 Don't call check_case_bounds. Fold low_value as well as high_value.
3571 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
3572 Check for case labels outside of range of original type here and
3573 adjust them.
3574
3575 2019-04-12 Jakub Jelinek <jakub@redhat.com>
3576
3577 PR translation/90041
3578 * c.opt (-fhandle-exceptions): Use %< and %> around option names
3579 in the Warn diagnostics.
3580
3581 PR c/89946
3582 * c-attribs.c (handle_patchable_function_entry_attribute): Add
3583 function comment. Warn if arguments of the attribute are not positive
3584 integer constants.
3585
3586 2019-04-09 Eric Botcazou <ebotcazou@adacore.com>
3587
3588 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
3589 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
3590
3591 2019-04-07 Eric Botcazou <ebotcazou@adacore.com>
3592
3593 * c-ada-spec.c (is_float128): New predicate extracted from...
3594 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
3595 <REAL_TYPE>: ...here. Call it.
3596
3597 2019-04-05 David Malcolm <dmalcolm@redhat.com>
3598
3599 PR c/89985
3600 * c-warn.c (check_address_or_pointer_of_packed_member): Add
3601 auto_diagnostic_group. Guard inform calls by result of
3602 warning_at call.
3603
3604 2019-04-05 Marek Polacek <polacek@redhat.com>
3605
3606 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
3607 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
3608 of RHS.
3609
3610 2019-04-03 Jason Merrill <jason@redhat.com>
3611
3612 PR c++/86586 - -fcompare-debug=-Wsign-compare.
3613 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
3614
3615 2019-04-01 Martin Sebor <msebor@redhat.com>
3616
3617 PR c/89685
3618 * c-attribs.c (handle_copy_attribute): Handle references and
3619 non-constant expressions.
3620
3621 2019-03-22 Jakub Jelinek <jakub@redhat.com>
3622
3623 PR c++/87481
3624 * c.opt (-fconstexpr-ops-limit=): New option.
3625
3626 2019-03-21 Jakub Jelinek <jakub@redhat.com>
3627
3628 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
3629 template param.
3630
3631 2019-03-19 Martin Sebor <msebor@redhat.com>
3632
3633 PR tree-optimization/89688
3634 * c-common.c (braced_list_to_string): Make static.
3635 (braced_lists_to_strings): Define new function.
3636 * c-common.h (braced_list_to_string): Remove.
3637 (braced_lists_to_strings): Declare.
3638
3639 2019-03-12 Martin Liska <mliska@suse.cz>
3640
3641 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
3642
3643 2019-03-11 Martin Liska <mliska@suse.cz>
3644
3645 * c-opts.c (c_common_post_options): Wrap apostrophes
3646 in gcc internal format with %'.
3647
3648 2019-03-11 Martin Liska <mliska@suse.cz>
3649
3650 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
3651 in a string format message and fix GNU coding style.
3652 * c-common.c (vector_types_convertible_p): Likewise.
3653 (c_build_vec_perm_expr): Likewise.
3654 * c-indentation.c (get_visual_column): Likewise.
3655 * c-opts.c (c_common_handle_option): Likewise.
3656 (c_common_post_options): Likewise.
3657 (sanitize_cpp_opts): Likewise.
3658 * c-pch.c (c_common_pch_pragma): Likewise.
3659 * c-pragma.c (handle_pragma_pack): Likewise.
3660
3661 2019-03-08 Jakub Jelinek <jakub@redhat.com>
3662
3663 PR tree-optimization/89550
3664 * c-common.c (c_common_truthvalue_conversion): Only set
3665 TREE_NO_WARNING if warning_at returned true.
3666 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
3667
3668 2019-02-25 Sandra Loosemore <sandra@codesourcery.com>
3669 Martin Sebor <msebor@gmail.com>
3670
3671 * c.opt (Wmissing-attributes): Clean up doc string.
3672
3673 2019-02-25 Jakub Jelinek <jakub@redhat.com>
3674
3675 PR c/89495
3676 * c-format.c (maybe_read_dollar_number): Compute nargnum in
3677 HOST_WIDE_INT type to avoid overflows and change overflow_flag
3678 checking.
3679
3680 2019-02-22 Richard Biener <rguenther@suse.de>
3681
3682 * c-pch.c (no_checksum): Remove.
3683 (pch_init): Remove assertion that executable_checksum is not
3684 all zero.
3685 (c_common_valid_pch): Likewise.
3686
3687 2019-02-18 Martin Sebor <msebor@redhat.com>
3688
3689 PR middle-end/89294
3690 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
3691
3692 2019-02-16 David Malcolm <dmalcolm@redhat.com>
3693
3694 PR c++/88680
3695 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
3696 implementing -Wtype-limits.
3697
3698 2019-02-11 Martin Sebor <msebor@redhat.com>
3699
3700 PR c++/87996
3701 * c-common.c (invalid_array_size_error): New function.
3702 (valid_array_size_p): Call it. Handle size as well as type.
3703 * c-common.h (valid_constant_size_p): New function.
3704 (enum cst_size_error): New type.
3705
3706 2019-01-31 David Malcolm <dmalcolm@redhat.com>
3707
3708 PR c/89122
3709 * known-headers.cc (get_stdlib_header_for_name): Add
3710 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
3711
3712 2019-01-31 Jakub Jelinek <jakub@redhat.com>
3713
3714 PR libstdc++/88170
3715 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
3716 a C cast in pp_c_flag_gnu_v3 mode.
3717
3718 2019-01-29 Jakub Jelinek <jakub@redhat.com>
3719
3720 PR c/86125
3721 * c-common.c (c_common_nodes_and_builtins): Build type variants for
3722 builtin_structptr_types types even for C.
3723
3724 2019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
3725
3726 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
3727 when rhs is of array type correctly. Fix handling of nested structures.
3728 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
3729 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
3730 type casts within nested compound expressions.
3731
3732 2019-01-22 Jakub Jelinek <jakub@redhat.com>
3733
3734 PR middle-end/88968
3735 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
3736 variable after using BIT_FIELD_REF.
3737
3738 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
3739
3740 PR c/51628
3741 PR c/88664
3742 * c-common.h (warn_for_address_or_pointer_of_packed_member):
3743 Remove the boolean argument.
3744 * c-warn.c (check_address_of_packed_member): Renamed to ...
3745 (check_address_or_pointer_of_packed_member): This. Also
3746 warn pointer conversion.
3747 (check_and_warn_address_of_packed_member): Renamed to ...
3748 (check_and_warn_address_or_pointer_of_packed_member): This.
3749 Also warn pointer conversion.
3750 (warn_for_address_or_pointer_of_packed_member): Remove the
3751 boolean argument. Don't check pointer conversion here.
3752
3753 2019-01-15 Richard Sandiford <richard.sandiford@arm.com>
3754
3755 PR inline-asm/52813
3756 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
3757
3758 2019-01-14 Jakub Jelinek <jakub@redhat.com>
3759
3760 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
3761 and __cpp_nontype_template_parameter_auto. Add a comment that
3762 __cpp_template_auto is deprecated.
3763
3764 2019-01-14 Tom Honermann <tom@honermann.net>
3765
3766 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
3767 * c-common.c (c_common_reswords): Add char8_t.
3768 (fix_string_type): Use char8_t for the type of u8 string literals.
3769 (c_common_get_alias_set): char8_t doesn't alias.
3770 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
3771 C++.
3772 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
3773 (keyword_begins_type_specifier): Add RID_CHAR8.
3774 * c-common.h (rid): Add RID_CHAR8.
3775 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
3776 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
3777 Define char8_type_node and char8_array_type_node.
3778 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
3779 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
3780 (c_cpp_builtins): Predefine __cpp_char8_t.
3781 * c-lex.c (lex_string): Use char8_array_type_node as the type of
3782 CPP_UTF8STRING.
3783 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
3784 * c-opts.c: If not otherwise specified, enable -fchar8_t when
3785 targeting C++2a.
3786 * c.opt: Add the -fchar8_t command line option.
3787
3788 2019-01-14 Martin Sebor <msebor@redhat.com>
3789
3790 PR target/88638
3791 * c-attribs.c (positional_argument): Call valid_format_string_type_p
3792 and issue errors if it fails.
3793 * c-common.h (valid_format_string_type_p): Declare.
3794 * c-format.c (valid_stringptr_type_p): Rename...
3795 (valid_format_string_type_p): ...to this and make extern.
3796 (handle_format_arg_attribute): Adjust to new name.
3797 (check_format_string): Same.
3798
3799 2019-01-13 H.J. Lu <hongjiu.lu@intel.com>
3800
3801 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
3802 Replace "may may" with "may" in warning message.
3803
3804 2019-01-07 Jakub Jelinek <jakub@redhat.com>
3805
3806 PR c++/85052
3807 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
3808 (c_build_vec_convert): Declare.
3809 * c-common.c (c_build_vec_convert): New function.
3810
3811 2019-01-04 Martin Sebor <msebor@redhat.com>
3812
3813 PR c/88546
3814 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
3815 Handle C++ empty throw specification and C11 _Noreturn.
3816 (has_attribute): Also handle C11 _Noreturn.
3817
3818 2019-01-04 Martin Sebor <msebor@redhat.com>
3819
3820 PR c/88363
3821 * c-attribs.c (positional_argument): Also accept enumerated types.
3822
3823 2019-01-01 Jakub Jelinek <jakub@redhat.com>
3824
3825 Update copyright years.
3826
3827 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
3828
3829 PR c/51628
3830 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
3831 * c-warn.c (check_alignment_of_packed_member): New function.
3832 (check_address_of_packed_member): Likewise.
3833 (check_and_warn_address_of_packed_member): Likewise.
3834 (warn_for_address_or_pointer_of_packed_member): Likewise.
3835 * c.opt: Add -Wno-address-of-packed-member.
3836
3837 2018-12-20 David Malcolm <dmalcolm@redhat.com>
3838
3839 PR c++/87504
3840 * c-warn.c (get_outermost_macro_expansion): New function.
3841 (spelled_the_same_p): Use it to unwind the macro expansions, and
3842 compare the outermost macro in each nested expansion, rather than
3843 the innermost.
3844
3845 2018-12-19 David Malcolm <dmalcolm@redhat.com>
3846
3847 PR c++/87504
3848 * c-common.h (warn_tautological_cmp): Convert 1st param from
3849 location_t to const op_location_t &.
3850 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
3851 when testing for INTEGER_CST.
3852 (warn_tautological_bitwise_comparison): Convert 1st param from
3853 location_t to const op_location_t &; use it to build a
3854 binary_op_rich_location, and use this.
3855 (spelled_the_same_p): New function.
3856 (warn_tautological_cmp): Convert 1st param from location_t to
3857 const op_location_t &. Warn for macro expansions if
3858 spelled_the_same_p. Use binary_op_rich_location.
3859
3860 2018-12-19 David Malcolm <dmalcolm@redhat.com>
3861
3862 PR c++/43064
3863 PR c++/43486
3864 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
3865 (verify_tree): Handle location wrappers.
3866 (c_common_truthvalue_conversion): Strip any location wrapper.
3867 Handle CONST_DECL.
3868 (fold_offsetof): Strip any location wrapper.
3869 (complete_array_type): Likewise for initial_value.
3870 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
3871 index before checking for INTEGER_CST.
3872 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
3873 print parentheses around location wrappers.
3874 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
3875 before checking for INTEGER_CST.
3876 (warn_tautological_bitwise_comparison): Call
3877 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
3878 before checking for INTEGER_CST.
3879 (readonly_error): Strip any location wrapper.
3880 (warn_array_subscript_with_type_char): Strip location wrappers
3881 before checking for INTEGER_CST. Use the location of the index if
3882 available.
3883
3884 2018-12-06 Jason Merrill <jason@redhat.com>
3885
3886 PR c++/88136 - -Wdeprecated-copy false positives
3887 * c.opt (Wdeprecated-copy-dtor): New.
3888 (Wdeprecated-copy): Move to -Wextra.
3889
3890 2018-11-29 Martin Sebor <msebor@redhat.com>
3891
3892 PR c/88172
3893 PR testsuite/88208
3894 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
3895 alignments to values less than the target requires.
3896 (has_attribute): For attribute aligned consider both the attribute
3897 and the alignment bits.
3898 * c-common.c (c_init_attributes): Optionally issue a warning for
3899 zero alignment.
3900
3901 2018-11-28 Martin Sebor <msebor@redhat.com>
3902
3903 PR c/88065
3904 PR c/87297
3905 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
3906 or destination is an error.
3907
3908 2018-11-28 Jakub Jelinek <jakub@redhat.com>
3909
3910 PR c++/88215
3911 * c-ubsan.c: Include langhooks.h.
3912 (ubsan_instrument_division): Change gcc_assert that main variants
3913 of op0 and op1 types are equal to gcc_checking_assert that the
3914 main variants are compatible types.
3915
3916 2018-11-27 Eric Botcazou <ebotcazou@adacore.com>
3917
3918 * c-ada-spec.c: Include stringpool.h.
3919 (has_static_fields): Return false for incomplete types.
3920 (is_tagged_type): Likewise.
3921 (has_nontrivial_methods): Likewise.
3922 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
3923 (struct overloaded_name_hash): New structure.
3924 (struct overloaded_name_hasher): Likewise.
3925 (overloaded_names): New global variable.
3926 (init_overloaded_names): New static function.
3927 (overloaded_name_p): New predicate.
3928 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
3929 on the TYPE_STUB_DECL of the original type of a typedef, if any.
3930 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
3931 Remove always-true condition and dump forward types.
3932 (dump_ada_specs): Delete overloaded_names.
3933
3934 2018-11-20 Martin Sebor <msebor@redhat.com>
3935
3936 * c-attribs.c (type_for_vector_size): New function.
3937 (type_valid_for_vector_size): Same.
3938 (handle_vector_size_attribute): Move code to the functions above
3939 and call them.
3940 (validate_attribute, has_attribute): New functions.
3941 * c-common.h (has_attribute): Declare.
3942 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
3943 * c-common.c (c_common_resword): Same.
3944
3945 2018-11-16 Jason Merrill <jason@redhat.com>
3946
3947 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
3948 * c-attribs.c (attr_cold_hot_exclusions): Make public.
3949
3950 2018-11-16 Jakub Jelinek <jakub@redhat.com>
3951
3952 PR middle-end/87854
3953 * c-common.c (fix_string_type): Reject string literals larger than
3954 TYPE_MAX_VALUE (ssizetype) bytes.
3955
3956 2018-11-15 Martin Sebor <msebor@redhat.com>
3957
3958 PR c++/87541
3959 PR c++/87542
3960 * c-attribs.c (positional_argument): New function.
3961 (handle_alloc_size_attribute): Use it and simplify.
3962 (handle_alloc_align_attribute): Same.
3963 (handle_assume_aligned_attribute): Same.
3964 (handle_nonnull_attribute): Same.
3965 * c-common.c (check_function_arguments): Pass fntype to
3966 check_function_format.
3967 * c-common.h (check_function_format): Add an argument.
3968 (PosArgFlags, positional_argument): Declare new type and function.
3969 * c-format.c (decode_format_attr): Add arguments.
3970 (check_format_string, get_constant): Same.
3971 (convert_format_name_to_system_name): Adjust.
3972
3973 2018-11-15 David Malcolm <dmalcolm@redhat.com>
3974
3975 PR other/19165
3976 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
3977
3978 2018-11-14 Jakub Jelinek <jakub@redhat.com>
3979
3980 P1236R1 - Signed integers are two's complement
3981 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
3982 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
3983 with in-range second operand well defined for -std=c++2a.
3984
3985 PR other/88007
3986 * c-common.c (parse_optimize_options): Allocate option string from
3987 opts_obstack rather than as GC memory. Move the allocation after
3988 warning for invalid option.
3989
3990 2018-11-13 David Malcolm <dmalcolm@redhat.com>
3991
3992 * c-common.c (c_get_substring_location): Update for renaming of
3993 get_source_location_for_substring to get_location_within_string.
3994 * c-lex.c: Replace "source_location" with "location_t".
3995 * c-opts.c: Likewise.
3996 * c-ppoutput.c: Likewise.
3997
3998 2018-11-13 Martin Sebor <msebor@redhat.com>
3999
4000 PR middle-end/81824
4001 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
4002 (handle_tls_model_attribute): Improve diagnostics.
4003
4004 2018-11-12 Jason Merrill <jason@redhat.com>
4005
4006 * c-cppbuiltin.c (c_cpp_builtins): Define
4007 __cpp_impl_destroying_delete.
4008
4009 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
4010 __cpp_conditional_explicit.
4011
4012 2018-11-09 Martin Sebor <msebor@redhat.com>
4013
4014 PR middle-end/81824
4015 * c-attribs.c (handle_copy_attribute): New function.
4016
4017 2018-11-09 Martin Sebor <msebor@redhat.com>
4018
4019 PR c/87795
4020 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
4021
4022 2018-11-08 Jakub Jelinek <jakub@redhat.com>
4023
4024 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
4025 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
4026 enum omp_memory_order MEMORY_ORDER.
4027 (c_finish_omp_flush): Add MO argument.
4028 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
4029 (c_finish_omp_for): Add FINAL_P argument.
4030 * c-omp.c: Include memmodel.h.
4031 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
4032 OMP_TASKGROUP_CLAUSES to it.
4033 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
4034 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
4035 instead of OMP_ATOMIC_SEQ_CST.
4036 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
4037 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
4038 __atomic_thread_fence call with the given value.
4039 (check_omp_for_incr_expr): Formatting fixes.
4040 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
4041 even in OpenMP loops, diagnose if NE_EXPR and incr expression
4042 is not constant expression 1 or -1. Transform NE_EXPR loops
4043 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
4044 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
4045 loops too.
4046 (c_omp_split_clauses): Add support for combined
4047 #pragma omp parallel master and
4048 #pragma omp {,parallel }master taskloop{, simd} constructs.
4049 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
4050 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
4051 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
4052 (c_omp_predetermined_sharing): Don't return
4053 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
4054 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
4055 PRAGMA_OMP_REQUIRES.
4056 * c-pragma.h (enum pragma_kind): Likewise.
4057 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
4058 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
4059
4060 2018-11-08 David Malcolm <dmalcolm@redhat.com>
4061
4062 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
4063
4064 2018-11-08 David Malcolm <dmalcolm@redhat.com>
4065
4066 * c-format.c (local_cgraph_node_ptr_node): New variable.
4067 (gcc_dump_printf_char_table): Add entry for %C.
4068 (get_pointer_to_named_type): New function, taken from the handling
4069 code for "gimple *" from...
4070 (init_dynamic_diag_info): ...here. Add handling for
4071 "cgraph_node *".
4072 * c-format.h (T_CGRAPH_NODE): New.
4073
4074 2018-10-19 Jason Merrill <jason@redhat.com>
4075
4076 * c-cppbuiltin.c (c_cpp_builtins): Add
4077 __cpp_nontype_template_parameter_class.
4078
4079 2018-10-31 Nathan Sidwell <nathan@acm.org>
4080
4081 * c-opts.c (c_finish_options): Force command line macro
4082 location. Refactor to avoid repeating main debug hook.
4083 (push_command_line_include): Clarify comment.
4084
4085 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
4086
4087 2018-10-30 Martin Sebor <msebor@redhat.com>
4088
4089 PR middle-end/87041
4090 * c-format.c (check_format_types): Avoid diagnosing null pointer
4091 arguments to printf-family of functions.
4092
4093 2018-10-30 Marek Polacek <polacek@redhat.com>
4094
4095 Implement P0892R2, explicit(bool).
4096 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
4097
4098 2018-10-29 David Malcolm <dmalcolm@redhat.com>
4099
4100 * name-hint.h (name_hint::take_deferred): New member function.
4101
4102 2018-10-29 David Malcolm <dmalcolm@redhat.com>
4103
4104 PR c++/56856
4105 * c-common.c (check_function_sentinel): Call fold_for_warn on the
4106 argument.
4107 (check_function_restrict): Rename param "argarray" to
4108 "unfolded_argarray", and make a copy named "argarray", calling
4109 fold_for_warn on each argument.
4110 (check_function_arguments): Add note about responsibility for
4111 folding the arguments.
4112
4113 2018-10-17 Joseph Myers <joseph@codesourcery.com>
4114
4115 * c-common.c (flag_isoc2x): New variable.
4116 * c-common.h (clk_c): Update comment to reference C2X.
4117 (flag_isoc99, flag_isoc11): Update comments to reference future
4118 standard versions in general.
4119 (flag_isoc2x): Declare.
4120 * c-opts.c (set_std_c2x): New function.
4121 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
4122 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
4123 flag_isoc2x to 0.
4124 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
4125
4126 2018-10-17 Joseph Myers <joseph@codesourcery.com>
4127
4128 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
4129 (std=iso9899:2018): Document C17 as published in 2018.
4130
4131 2018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
4132
4133 PR c++/87364
4134 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
4135
4136 2018-10-11 Will Wray <wjwray@gmail.com>
4137
4138 PR c++/87364
4139 * c-pretty-print.h (pp_c_type_cast): Prototype.
4140 (pp_c_integer_constant): Likewise.
4141 * c-pretty-print.c (pp_c_type_cast): No longer static.
4142 (pp_c_integer_constant): Likewise.
4143 (pp_c_enumeration_constant): Fix loop termination when finding
4144 name of constant. No longer returns a value. Call
4145 pp_c_integer_constant.
4146 (c_pretty_printer::constant): Update for changes to
4147 pp_c_enumeration_constant.
4148
4149 2018-10-11 Jakub Jelinek <jakub@redhat.com>
4150
4151 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
4152 for no_unique_address.
4153
4154 2018-10-09 David Malcolm <dmalcolm@redhat.com>
4155
4156 * c-common.c (c_option_controlling_cpp_error): Rename to...
4157 (c_option_controlling_cpp_diagnostic): ...this, and convert
4158 "reason" from int to enum.
4159 (c_cpp_error): Rename to...
4160 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4161 * c-common.h (c_cpp_error): Rename to...
4162 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4163 * c-opts.c (c_common_init_options): Update for renaming.
4164
4165 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
4166
4167 PR c/87286
4168 * c-common.c (vector_types_compatible_elements_p): Use
4169 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
4170
4171 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
4172
4173 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
4174 to generate constructor destructor priority warning.
4175 * c.opt (-Wprio-ctor-dtor): New option.
4176
4177 2018-10-01 Jason Merrill <jason@redhat.com>
4178
4179 * c-lex.c (c_common_has_attribute): Add no_unique_address.
4180
4181 2018-10-01 Eric Botcazou <ebotcazou@adacore.com>
4182
4183 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
4184 (dump_ada_node): Add const keyword.
4185
4186 2018-09-25 Martin Liska <mliska@suse.cz>
4187
4188 * c-common.c (c_common_truthvalue_conversion):
4189 Remove Pascal from documentation.
4190
4191 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
4192
4193 * c-ada-spec.c: Include diagnostic.h.
4194 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
4195
4196 2018-09-19 Marek Polacek <polacek@redhat.com>
4197
4198 * c.opt (Wclass-conversion): New.
4199
4200 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4201
4202 * c-format.c (range_label_for_format_type_mismatch::get_text):
4203 Update for new param.
4204
4205 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4206
4207 * c-format.c (format_warning_at_char): Update for introduction of
4208 format_string_diagnostic_t.
4209 (format_type_warning): Likewise.
4210
4211 2018-09-17 Martin Jambor <mjambor@suse.cz>
4212
4213 PR c/63886
4214 * c.opt (Wabsolute-value): New.
4215
4216 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
4217
4218 * c-common.c (complete_flexible_array_elts): New helper function.
4219 * c-common.h (complete_flexible_array_elts): Declare.
4220
4221 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4222
4223 * c-common.c (braced_list_to_string): Remove eval parameter.
4224 Add some more checks. Always create zero-terminated STRING_CST.
4225 * c-common.h (braced_list_to_string): Adjust prototype.
4226
4227 2018-08-27 David Malcolm <dmalcolm@redhat.com>
4228
4229 PR 87091
4230 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
4231 to a tri-state.
4232 (maybe_suggest_missing_token_insertion): Likewise.
4233 (maybe_add_include_fixit): Add param "override_location". If set,
4234 and source-printing is enabled, then override the rich_location's
4235 primary location with that of the insertion point for the fix-it
4236 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
4237 * c-common.h (extern void maybe_add_include_fixit): Add bool
4238 param.
4239 * c-format.c (selftest::test_type_mismatch_range_labels): Update
4240 for conversion of show_caret_p to a tri-state.
4241 * c-warn.c (warn_for_restrict): Likewise.
4242 * known-headers.cc
4243 (suggest_missing_header::~suggest_missing_header): Update call to
4244 maybe_add_include_fixit to suggest overriding the location, as it
4245 is for a note.
4246
4247 2018-08-27 Martin Liska <mliska@suse.cz>
4248
4249 * c-common.c (check_function_restrict): Use new function
4250 fndecl_built_in_p and remove check for FUNCTION_DECL if
4251 possible.
4252 (check_builtin_function_arguments): Likewise.
4253 (reject_gcc_builtin): Likewise.
4254 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
4255
4256 2018-08-26 Marek Polacek <polacek@redhat.com>
4257
4258 PR c++/87029, Implement -Wredundant-move.
4259 * c.opt (Wredundant-move): New option.
4260
4261 2018-08-21 Marek Polacek <polacek@redhat.com>
4262
4263 PR c++/86981, Implement -Wpessimizing-move.
4264 * c.opt (Wpessimizing-move): New option.
4265
4266 2018-08-20 David Malcolm <dmalcolm@redhat.com>
4267
4268 PR other/84889
4269 * c-attribs.c (common_handle_aligned_attribute): Add
4270 auto_diagnostic_group instance.
4271 * c-indentation.c (warn_for_misleading_indentation): Likewise.
4272 * c-opts.c (c_common_post_options): Likewise.
4273 * c-warn.c (warn_logical_not_parentheses): Likewise.
4274 (warn_duplicated_cond_add_or_warn): Likewise.
4275 (warn_for_multistatement_macros): Likewise.
4276
4277 2018-08-20 Nathan Sidwell <nathan@acm.org>
4278
4279 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
4280 access.
4281
4282 2018-08-17 Nathan Sidwell <nathan@acm.org>
4283
4284 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
4285 field.
4286 (laxy_hex_fp_value_count): Make unsigned.
4287 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
4288 manipulate the macro.
4289 (builtin_defin_with_hex_fp_value): Adjust callback name, use
4290 cpp_define_lazily.
4291
4292 2018-08-17 David Malcolm <dmalcolm@redhat.com>
4293
4294 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
4295 (gcc_dump_printf_length_specs): New.
4296 (gcc_dump_printf_flag_pairs): New.
4297 (gcc_dump_printf_flag_specs): New.
4298 (gcc_dump_printf_char_table): New.
4299 (format_types_orig): Add entry for "gcc_dump_printf".
4300 (init_dynamic_diag_info): Set up length_char_specs and
4301 conversion_specs for gcc_dump_printf_format_type.
4302 (handle_format_attribute): Handle gcc_dump_printf_format_type.
4303
4304 2018-08-17 Nathan Sidwell <nathan@acm.org>
4305
4306 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
4307
4308 * c-ada-spec.c: Don't #include "cpp-id-data.h"
4309 * c-cppbuiltin.c: Likewise.
4310
4311 2018-08-17 Martin Liska <mliska@suse.cz>
4312
4313 * c.opt: Remove Warn, Init and Report for options with
4314 Ignore/Deprecated flag. Warning is done automatically for
4315 Deprecated flags.
4316
4317 2018-08-16 David Malcolm <dmalcolm@redhat.com>
4318
4319 PR c++/70693
4320 * c-common.c (selftest::c_family_tests): Call
4321 selftest::c_indentation_c_tests.
4322 * c-common.h (selftest::c_indentation_c_tests): New decl.
4323 * c-indentation.c: Include "selftest.h".
4324 (next_tab_stop): Add "tab_width" param, rather than accessing
4325 cpp_opts.
4326 (get_visual_column): Likewise. Clarify comment. Bulletproof
4327 against reading past the end of the line.
4328 (get_first_nws_vis_column): Add "tab_width" param.
4329 (detect_intervening_unindent): Likewise.
4330 (should_warn_for_misleading_indentation): Read tab width from
4331 cpp_opts and pass around.
4332 (selftest::test_next_tab_stop): New test.
4333 (selftest::assert_get_visual_column_succeeds): New function.
4334 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
4335 (selftest::assert_get_visual_column_fails): New function.
4336 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
4337 (selftest::test_get_visual_column): New test.
4338 (selftest::c_indentation_c_tests): New function.
4339
4340 2018-08-16 Nathan Sidwell <nathan@acm.org>
4341
4342 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
4343 (store_ada_macro): Likewise.
4344 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
4345 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
4346
4347 2018-08-15 David Malcolm <dmalcolm@redhat.com>
4348
4349 * c-format.c: Include "selftest-diagnostic.h" and
4350 "gcc-rich-location.h".
4351 (format_warning_at_char): Pass NULL for new label params of
4352 format_warning_va.
4353 (class indirection_suffix): New class.
4354 (class range_label_for_format_type_mismatch): New class.
4355 (format_type_warning): Move logic for generating "*" suffix to
4356 class indirection_suffix. Create "fmt_label" and "param_label"
4357 to show their types, and pass them to the
4358 format_warning_at_substring calls.
4359 (selftest::test_type_mismatch_range_labels): New test.
4360 (selftest::c_format_c_tests): Call it.
4361
4362 2018-08-13 Martin Sebor <msebor@redhat.com>
4363
4364 PR tree-optimization/71625
4365 * c-common.c (braced_list_to_string): New function.
4366 * c-common.h (braced_list_to_string): Declare it.
4367
4368 2018-08-08 Nathan Sidwell <nathan@acm.org>
4369
4370 * c-common.c (try_to_locate_new_include_inertion_point): Use
4371 linemap_included_from_linemap.
4372 * c-lex.c (fe_file_change): Use linemap_included_from.
4373 * c-ppoutput.c (pp_file_change): Likewise.
4374
4375 2018-08-01 Martin Sebor <msebor@redhat.com>
4376
4377 PR tree-optimization/86650
4378 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
4379 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
4380 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
4381 * c-format.h (T89_G): Update to be "gimple *" rather than
4382 "gcall *".
4383 (local_gcall_ptr_node): Rename...
4384 (local_gimple_ptr_node): ...to this.
4385
4386 2018-07-31 David Malcolm <dmalcolm@redhat.com>
4387
4388 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
4389 table entries for gcc_diag_char_table, and the 'Z' entry from
4390 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
4391 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
4392 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
4393 adding missing "Z" for this table. Remove erroneous "G" and "K"
4394 entries.
4395 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4396 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
4397 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4398
4399 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4400
4401 * c-common.c (speculation_safe_resolve_call): New function.
4402 (speculation_safe_resolve_params): New function.
4403 (speculation_safe_resolve_return): New function.
4404 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
4405 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
4406 __HAVE_SPECULATION_SAFE_VALUE.
4407
4408 2018-07-20 David Malcolm <dmalcolm@redhat.com>
4409
4410 * c-common.c (c_cpp_error): Remove redundant "line_table"
4411 parameter from call to rich_location::set_range.
4412 (maybe_suggest_missing_token_insertion): Likewise.
4413
4414 2018-07-20 Martin Sebor <msebor@redhat.com>
4415
4416 PR middle-end/82063
4417 * c.opt (-Warray-bounds): Remove redundant -Wall.
4418
4419 2018-07-20 Martin Sebor <msebor@redhat.com>
4420
4421 PR middle-end/82063
4422 * c-common.h (c_common_handle_option): Change function argument
4423 to HOST_WIDE_INT.
4424 * c-opts.c (c_common_init_options): Same.
4425 (c_common_handle_option): Same. Remove special handling of
4426 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
4427 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
4428 options to take a HOST_WIDE_INT argument and accept a byte-size
4429 suffix. Initialize.
4430 (-Wvla-larger-than): Same.
4431 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
4432 (-Wno-vla-larger-than): Same.
4433
4434 2018-07-12 Jakub Jelinek <jakub@redhat.com>
4435
4436 * c-attribs.c (c_common_attribute_table): Add
4437 "omp declare target implicit" attribute.
4438
4439 2018-07-12 Richard Biener <rguenther@suse.de>
4440
4441 PR c/86453
4442 * c-attribs.c (handle_packed_attribute): Do not build a variant
4443 type with TYPE_PACKED, instead ignore the attribute if we may
4444 not apply to the original type.
4445
4446 2018-07-10 Jakub Jelinek <jakub@redhat.com>
4447
4448 PR c++/86443
4449 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
4450 to contain TREE_LIST for both the original class iterator and the
4451 "last" helper var.
4452
4453 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
4454
4455 * c-ada-spec.c (to_ada_name): Remove index parameter.
4456 (pp_ada_tree_identifier): Likewise.
4457 (dump_ada_macros): Adjust call to to_ada_name.
4458 (struct overloaded_name_hash): Delete.
4459 (struct overloaded_name_hasher): Likewise.
4460 (overloaded_names): Likewise.
4461 (compute_overloading_index): Likewise.
4462 (dump_ada_decl_name): Do not call compute_overloading_index and
4463 adjust calls to pp_ada_tree_identifier.
4464 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
4465 (dump_ada_import): Add spc parameter and switch to aspect syntax.
4466 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
4467 (dump_ada_enum_type): Remove type and display_convention parameters.
4468 Adjust calls to pp_ada_tree_identifier.
4469 (dump_ada_node): Likewise and for dump_ada_structure.
4470 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
4471 and tidy up.
4472 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
4473 syntax.
4474 (print_constructor): Adjust call to pp_ada_tree_identifier.
4475 (print_destructor): Likewise.
4476 (dump_ada_declaration): Switch to aspect syntax.
4477 (dump_ada_structure): Likewise and tidy up. Replace display_convention
4478 parameter with nested parameter.
4479 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
4480 (dump_ada_specs): Do not delete overloaded_names table.
4481
4482 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
4483
4484 PR target/86324
4485 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
4486 target hook.
4487
4488 2018-07-05 Nathan Sidwell <nathan@acm.org>
4489
4490 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
4491 NO_IMPLICIT_EXTERN_C.
4492
4493 2018-06-28 Martin Liska <mliska@suse.cz>
4494
4495 * cppspec.c: Include opt-suggestions.h.
4496
4497 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4498 Thomas Schwinge <thomas@codesourcery.com>
4499 Cesar Philippidis <cesar@codesourcery.com>
4500
4501 * c-pragma.h (enum pragma_omp_clause): Add
4502 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
4503 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
4504
4505 2018-06-20 Jakub Jelinek <jakub@redhat.com>
4506
4507 PR c++/86210
4508 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
4509 comment.
4510
4511 2018-06-18 Martin Sebor <msebor@redhat.com>
4512
4513 PR middle-end/85602
4514 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
4515 nonstring.
4516
4517 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4518
4519 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
4520
4521 2018-06-13 Jason Merrill <jason@redhat.com>
4522
4523 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
4524 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
4525 handling.
4526
4527 PR c++/86094 - wrong code with defaulted move ctor.
4528 * c-opts.c (c_common_post_options): Bump the current ABI version to
4529 13. Set warn_abi_version and flag_abi_compat_version to the current
4530 version rather than 0. Fix defaulting flag_abi_compat_version from
4531 warn_abi_version.
4532
4533 2018-06-12 Martin Sebor <msebor@redhat.com>
4534
4535 PR c/85931
4536 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
4537 sizeof source and destination yields the same value.
4538
4539 2018-06-12 Martin Liska <mliska@suse.cz>
4540
4541 * c.opt: Make MPX-related options as Deprecated.
4542
4543 2018-06-08 David Malcolm <dmalcolm@redhat.com>
4544
4545 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
4546 rather than 0.
4547
4548 2018-06-08 Martin Liska <mliska@suse.cz>
4549
4550 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
4551 for MPX (macros, related functions, fields in cgraph_node, ...).
4552 (handle_bnd_legacy): Likewise.
4553 (handle_bnd_instrument): Likewise.
4554 * c.opt: Likewise.
4555
4556 2018-06-06 Jakub Jelinek <jakub@redhat.com>
4557
4558 PR c++/86068
4559 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
4560 __cpp_transactional_memory to 201500 instead of 210500.
4561
4562 2018-06-06 Jason Merrill <jason@redhat.com>
4563
4564 PR c++/85710 - ICE with -Wmemset-elt-size.
4565 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
4566
4567 2018-06-01 Jason Merrill <jason@redhat.com>
4568
4569 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
4570 201703.
4571
4572 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
4573
4574 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
4575 declaration for a typedef independently of whether the declaration of
4576 the subtype is generated.
4577
4578 2018-05-31 Martin Sebor <msebor@redhat.com>
4579
4580 PR c/82063
4581 * c.opt (-Wno-alloc-size-larger-than): New option.
4582
4583 2018-04-22 David Pagan <dave.pagan@oracle.com>
4584
4585 PR c/55976
4586 * c-opts.c (c_common_post_options): Set default for warn_return_type
4587 for C++/C++ with ObjC extensions only. For C, makes it possible to
4588 differentiate between default (no option), -Wreturn-type, and
4589 -Wno-return-type.
4590
4591 2018-05-29 Jason Merrill <jason@redhat.com>
4592
4593 * c.opt (Winit-list-lifetime): New flag.
4594
4595 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
4596
4597 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
4598 splay_tree_delete_pointers.
4599
4600 2018-05-26 Jakub Jelinek <jakub@redhat.com>
4601
4602 PR bootstrap/85921
4603 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
4604 noinline variable to workaround broken kernel headers.
4605
4606 2018-05-18 Jason Merrill <jason@redhat.com>
4607
4608 * c.opt (Wdeprecated-copy): New flag.
4609
4610 2018-05-17 Martin Liska <mliska@suse.cz>
4611
4612 * c-warn.c (overflow_warning): Do not use
4613 space in between 'G_' and '('.
4614
4615 2018-05-09 Jason Merrill <jason@redhat.com>
4616
4617 * c-common.c (valid_array_size_p): Add complain parameter.
4618 * c-common.h: ...which defaults to true.
4619
4620 2018-05-11 Jakub Jelinek <jakub@redhat.com>
4621
4622 PR c/85696
4623 * c-omp.c (c_omp_predetermined_sharing): Return
4624 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
4625
4626 2018-05-11 Martin Liska <mliska@suse.cz>
4627
4628 PR sanitizer/85556
4629 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
4630 TREE_LIST values.
4631
4632 2018-05-10 Jakub Jelinek <jakub@redhat.com>
4633
4634 PR c++/85662
4635 * c-common.h (fold_offsetof_1): Removed.
4636 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
4637 CTX argument defaulted to ERROR_MARK.
4638 * c-common.c (fold_offsetof_1): Renamed to ...
4639 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
4640 argument, convert the pointer constant to TYPE and use size_binop
4641 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
4642 a pointer type. Adjust recursive calls.
4643
4644 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
4645
4646 PR c++/85400
4647 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
4648
4649 2018-05-07 Nathan Sidwell <nathan@acm.org>
4650
4651 * c.opt (ffor-scope): Remove functionality, issue warning.
4652
4653 2018-05-03 Nathan Sidwell <nathan@acm.org>
4654
4655 * c.opt (ffriend-injection): Remove functionality, issue warning.
4656
4657 2018-05-01 David Malcolm <dmalcolm@redhat.com>
4658
4659 PR c/84258
4660 * c-format.c (struct format_check_results): Add field
4661 "number_non_char".
4662 (check_format_info): Initialize it, and warn if encountered.
4663 (check_format_arg): Distinguish between wide char and
4664 everything else when detecting arrays of non-char.
4665
4666 2018-04-30 David Malcolm <dmalcolm@redhat.com>
4667
4668 * c-format.c (get_corrected_substring): Update for
4669 location_get_source_line returning a char_span. Use a char_span
4670 when handling the prefix of the correction.
4671 * c-indentation.c (get_visual_column): Update for
4672 location_get_source_line returning a char_span.
4673 (get_first_nws_vis_column): Likewise.
4674
4675 2018-03-29 David Malcolm <dmalcolm@redhat.com>
4676
4677 PR c++/84269
4678 * known-headers.cc (get_stdlib_header_for_name): Add various names
4679 from <assert.h>, <string.h>, and <memory.h>; add more names from
4680 <stdio.h>.
4681
4682 2018-03-27 Jakub Jelinek <jakub@redhat.com>
4683
4684 PR c++/85061
4685 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
4686 get_base_address of the second operand is a VAR_P, rather than the
4687 operand itself, and use gcc_checking_assert instead of gcc_assert.
4688
4689 2018-03-23 Marek Polacek <polacek@redhat.com>
4690
4691 PR c++/85045
4692 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
4693 <case RDIV_EXPR>: Tweak condition.
4694
4695 2018-03-20 Eric Botcazou <ebotcazou@adacore.com>
4696
4697 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
4698
4699 2018-03-16 Jakub Jelinek <jakub@redhat.com>
4700
4701 PR c/84909
4702 * c-warn.c (conversion_warning): Replace "to to" with "to" in
4703 diagnostics.
4704
4705 PR c/84910
4706 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
4707 diagnostics.
4708
4709 2018-03-16 Richard Biener <rguenther@suse.de>
4710
4711 PR c/84873
4712 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
4713 unshare the possibly folded expression.
4714
4715 2018-03-15 Richard Biener <rguenther@suse.de>
4716
4717 PR c/84873
4718 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
4719
4720 2018-03-13 Martin Sebor <msebor@redhat.com>
4721
4722 PR tree-optimization/84725
4723 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
4724 with all three narrow character types, including their qualified forms.
4725
4726 2018-03-12 Martin Sebor <msebor@redhat.com>
4727
4728 PR tree-optimization/83456
4729 * c-common.c (check_function_restrict): Return bool.
4730 Restore checking of bounded built-in functions.
4731 (check_function_arguments): Also return the result
4732 of warn_for_restrict.
4733 * c-common.c (check_function_restrict): Return bool.
4734 * c-warn.c (warn_for_restrict): Return bool.
4735
4736 2018-03-02 Marek Polacek <polacek@redhat.com>
4737
4738 PR c++/84171
4739 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
4740 is erroneous.
4741
4742 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
4743
4744 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
4745 function".
4746
4747 2018-03-01 Marek Polacek <polacek@redhat.com>
4748
4749 PR c++/84639
4750 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
4751 alignment in computation.
4752
4753 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4754
4755 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
4756 <REAL_TYPE>: Deal specifically with _Float128/__float128.
4757
4758 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4759
4760 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
4761 (is_char_array): Take a type instead of a declaration.
4762 (dump_ada_array_type): Likewise.
4763 (is_simple_enum): Minor tweak.
4764 (dump_ada_enum_type): New function extracted from...
4765 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
4766 <INTEGER_TYPE>: Remove unreachable code.
4767 <RECORD_TYPE>: Likewise. Minor tweaks.
4768 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
4769 <ENUMERAL_TYPE>: New case.
4770 <RECORD_TYPE>: Factor out common code.
4771 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
4772 Minor tweaks. Deal with enumeral types.
4773 (dump_ada_structure): Minor tweaks.
4774
4775 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4776
4777 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
4778 address for incomplete structures.
4779 (dump_forward_type): Do not bail out for incomplete structures.
4780 (dump_ada_declaration): Do not special-case incomplete structures
4781 for subtypes. Dump them as null records for types.
4782
4783 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4784
4785 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
4786 (is_char_array): Fix formatting.
4787 (dump_template_types): Likewise.
4788 (dump_generic_ada_node): Rename into...
4789 (dump_ada_node): ...this.
4790 <POINTER_TYPE>: Remove superfluous space. Use generic address for
4791 incomplete structures and not for empty structures. Do not use it
4792 when forward declarations are needed.
4793 (dump_forward_type): New function.
4794 (dump_nested_types): Remove FORWARD parameter. Do not consider
4795 TREE_VISITED and do not generate a forward declaration. Only dump
4796 original nested types for nested declaration.
4797 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
4798 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
4799 <RECORD_TYPE>: Do not consider TREE_VISITED.
4800 (dump_ada_declaration): Use booleans and fix formatting throughout.
4801 <TYPE_DECL>: Skip incomplete structures and not empty structures.
4802 Call dump_forward_type instead of dump_nested_types for a typedef.
4803 Remove superfluous check and adjust call to dump_nested_types.
4804 <POINTER_TYPE>: Call dump_forward_type and fall through.
4805 (dump_ada_struct_decl): Rename into...
4806 (dump_ada_structure): ...this. Do not special-case empty structures.
4807
4808 2018-02-27 Martin Sebor <msebor@redhat.com>
4809
4810 PR c++/83871
4811 * c.opt (-Wmissing-attributes): New option.
4812
4813 2018-02-21 Martin Liska <mliska@suse.cz>
4814
4815 * c.opt (Wcatch-value=): Add IntegerRange.
4816
4817 2018-02-15 Jason Merrill <jason@redhat.com>
4818
4819 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
4820
4821 2018-02-09 Nathan Sidwell <nathan@acm.org>
4822
4823 PR c/84293
4824 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
4825 arg.
4826 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
4827 arg. Adjust.
4828
4829 2018-02-09 Martin Sebor <msebor@redhat.com>
4830
4831 PR lto/84212
4832 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
4833 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
4834 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
4835 (-Wstrict-overflow, -Wsuggest-attribute): Same.
4836 (-Wuninitialized): Same.
4837
4838 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
4839
4840 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
4841 keyword for components.
4842
4843 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
4844
4845 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
4846
4847 2018-02-02 Julia Koval <julia.koval@intel.com>
4848
4849 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
4850
4851 2018-01-29 Marek Polacek <polacek@redhat.com>
4852
4853 PR c/83966
4854 * c-format.c (check_function_format): Check current_function_decl.
4855
4856 2018-01-27 Jakub Jelinek <jakub@redhat.com>
4857
4858 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
4859 argument.
4860 (LAZY_HEX_FP_VALUES_CNT): Define.
4861 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
4862 values rather than just 12.
4863 (builtin_define_with_hex_fp_value): Likewise.
4864
4865 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
4866
4867 PR other/70268
4868 * c.opt (-fmacro-prefix-map): New option.
4869 * c-opts.c (c_common_handle_option): Handle it.
4870 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
4871 * c-ppoutput.c (init_pp_output): Likewise.
4872
4873 2018-01-17 David Malcolm <dmalcolm@redhat.com>
4874
4875 PR c++/83814
4876 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
4877
4878 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
4879
4880 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
4881 Skip 'f' and 'F' characters if it is true.
4882 (store_ada_macro): Minor tweak.
4883 (dump_ada_macros) <CPP_COMMENT>: Likewise.
4884 <CPP_WSTRING>: Likewise.
4885 <CPP_STRING>: Output '&' in the buffer if not the first string.
4886 <CPP_NUMBER>: Adjust calls to dump_number.
4887
4888 2018-01-10 David Malcolm <dmalcolm@redhat.com>
4889
4890 PR c++/43486
4891 * c-common.c: Include "selftest.h".
4892 (get_atomic_generic_size): Perform the test for integral type
4893 before the range test for any integer constant, fixing indentation
4894 of braces. Call fold_for_warn before testing for an INTEGER_CST.
4895 (reject_gcc_builtin): Strip any location wrapper from EXPR.
4896 (selftest::test_fold_for_warn): New function.
4897 (selftest::c_common_c_tests): New function.
4898 (selftest::c_family_tests): Call it, and
4899 selftest::c_pretty_print_c_tests.
4900 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
4901 * c-format.c (check_format_arg): Convert VAR_P check to a
4902 fold_for_warn.
4903 * c-pretty-print.c: Include "selftest.h".
4904 (pp_c_cast_expression): Don't print casts for location wrappers.
4905 (selftest::assert_c_pretty_printer_output): New function.
4906 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
4907 (selftest::test_location_wrappers): New function.
4908 (selftest::c_pretty_print_c_tests): New function.
4909 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
4910
4911 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4912 Alan Hayward <alan.hayward@arm.com>
4913 David Sherwood <david.sherwood@arm.com>
4914
4915 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
4916
4917 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4918 Alan Hayward <alan.hayward@arm.com>
4919 David Sherwood <david.sherwood@arm.com>
4920
4921 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
4922 as polynomial.
4923
4924 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4925 Alan Hayward <alan.hayward@arm.com>
4926 David Sherwood <david.sherwood@arm.com>
4927
4928 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
4929 (convert_vector_to_array_for_subscript): Handle polynomial
4930 TYPE_VECTOR_SUBPARTS.
4931 (c_common_type_for_mode): Check valid_vector_subparts_p.
4932 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
4933 VECTOR_CST_NELTS.
4934
4935 2018-01-03 Jakub Jelinek <jakub@redhat.com>
4936
4937 Update copyright years.
4938
4939 2017-12-22 Mike Stump <mikestump@comcast.net>
4940 Eric Botcazou <ebotcazou@adacore.com>
4941
4942 * c-pragma.c (init_pragma): Register pragma GCC unroll.
4943 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
4944
4945 2017-12-22 Alexandre Oliva <aoliva@redhat.com>
4946
4947 PR debug/83527
4948 PR debug/83419
4949 * c-semantics.c (only_debug_stmts_after_p): New.
4950 (pop_stmt_list): Clear side effects in debug-only stmt list.
4951 Check for single nondebug stmt followed by debug stmts only.
4952
4953 2017-12-21 Alexandre Oliva <aoliva@redhat.com>
4954
4955 PR debug/83419
4956 * c-semantics.c (pop_stmt_list): Propagate side effects from
4957 single nondebug stmt to container list.
4958
4959 2017-12-19 Jakub Jelinek <jakub@redhat.com>
4960
4961 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
4962 conditions with typical order conditions.
4963
4964 2017-12-18 Marek Polacek <polacek@redhat.com>
4965
4966 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
4967 not in effect.
4968
4969 2017-12-17 Martin Sebor <msebor@redhat.com>
4970
4971 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
4972 an error for attribute warn_if_not_aligned.
4973
4974 2017-12-16 Martin Sebor <msebor@redhat.com>
4975
4976 PR tree-optimization/78918
4977 * c-common.c (check_function_restrict): Avoid checking built-ins.
4978 * c.opt (-Wrestrict): Include in -Wall.
4979
4980 2017-12-15 Jakub Jelinek <jakub@redhat.com>
4981
4982 * c-attribs.c (c_common_attribute_table,
4983 c_common_format_attribute_table): Swap affects_type_identity
4984 and handler fields, adjust comments.
4985
4986 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4987
4988 * c.opt (Wcast-function-type): New warning option.
4989 * c-lex.c (get_fileinfo): Avoid warning.
4990 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
4991
4992 2017-12-14 Qing Zhao <qing.zhao@oracle.com>
4993
4994 PR middle_end/79538
4995 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
4996 Adjust the size of buf1 and buf2, add a new buf to avoid
4997 format-overflow warning.
4998
4999 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
5000
5001 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
5002 subsequent statement list.
5003
5004 2017-12-07 Martin Sebor <msebor@redhat.com>
5005
5006 PR c/81544
5007 PR c/81566
5008 * c-attribs.c (attr_aligned_exclusions): New array.
5009 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
5010 (attr_common_exclusions, attr_const_pure_exclusions): Same.
5011 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
5012 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
5013 (attr_warn_unused_result_exclusions): Same.
5014 (handle_hot_attribute, handle_cold_attribute): Simplify.
5015 (handle_const_attribute): Warn on function returning void.
5016 (handle_pure_attribute): Same.
5017 (handle_aligned_attribute): Diagnose conflicting attribute
5018 specifications.
5019 * c-warn.c (diagnose_mismatched_attributes): Simplify.
5020
5021 2017-12-06 David Malcolm <dmalcolm@redhat.com>
5022
5023 PR c/83236
5024 * c-common.c (selftest::c_family_tests): Call
5025 selftest::c_spellcheck_cc_tests.
5026 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
5027 * c-spellcheck.cc: Include "selftest.h".
5028 (name_reserved_for_implementation_p): New function.
5029 (should_suggest_as_macro_p): New function.
5030 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
5031 should_suggest_as_macro_p and call it.
5032 (selftest::test_name_reserved_for_implementation_p): New function.
5033 (selftest::c_spellcheck_cc_tests): New function.
5034 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
5035
5036 2017-12-06 David Malcolm <dmalcolm@redhat.com>
5037
5038 * c-spellcheck.cc: New file, taken from macro-handling code in
5039 spellcheck-tree.c.
5040 * c-spellcheck.h: New file, taken from macro-handling code in
5041 spellcheck-tree.h.
5042
5043 2017-12-01 Jakub Jelinek <jakub@redhat.com>
5044
5045 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
5046 attribute.
5047 (handle_simd_attribute): Don't check for "cilk simd function"
5048 attribute. Reindent, formatting changes.
5049
5050 2017-11-30 Julia Koval <julia.koval@intel.com>
5051
5052 * c-common.h (inv_list): Remove.
5053
5054 2017-11-28 Jakub Jelinek <jakub@redhat.com>
5055
5056 PR sanitizer/81275
5057 * c-common.c (c_switch_covers_all_cases_p_1,
5058 c_switch_covers_all_cases_p): New functions.
5059 * c-common.h (c_switch_covers_all_cases_p): Declare.
5060
5061 2017-11-28 Julia Koval <julia.koval@intel.com>
5062 Sebastian Peryt <sebastian.peryt@intel.com>
5063
5064 * array-notation-common.c: Delete.
5065 * c-cilkplus.c: Ditto.
5066 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
5067 * c-common.def (ARRAY_NOTATION_REF): Remove.
5068 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
5069 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
5070 c_validate_cilk_plus_loop, cilkplus_an_parts,
5071 cilk_ignorable_spawn_rhs_op,
5072 cilk_recognize_spawn): Remove.
5073 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
5074 * c-omp.c: Remove CILK_SIMD check.
5075 * c-pragma.c: Ditto.
5076 * c-pragma.h: Remove CILK related pragmas.
5077 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
5078 ARRAY_NOTATION_REF condition.
5079 (c_pretty_printer::expression): Ditto.
5080 * c.opt (fcilkplus): Remove.
5081 * cilk.c: Delete.
5082
5083 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
5084
5085 * c-pretty-print.c (pp_c_additive_expression,
5086 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
5087
5088 2017-11-21 Jakub Jelinek <jakub@redhat.com>
5089
5090 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
5091
5092 PR c++/83059
5093 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
5094 instead of tree_to_uhwi, formatting fix.
5095
5096 2017-11-20 David Malcolm <dmalcolm@redhat.com>
5097
5098 PR c/81404
5099 * known-headers.cc: New file, based on material from c/c-decl.c.
5100 (suggest_missing_header): Copied as-is.
5101 (get_stdlib_header_for_name): New, based on get_c_name_hint but
5102 heavily edited to add C++ support. Add some knowledge about
5103 <limits.h>, <stdint.h>, and <wchar.h>.
5104 * known-headers.h: Likewise.
5105
5106 2017-11-20 David Malcolm <dmalcolm@redhat.com>
5107
5108 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
5109 (lookup_name_fuzzy): Likewise. Convert return type from
5110 const char * to name_hint. Add location_t param.
5111 * name-hint.h: New header.
5112
5113 2017-11-19 Jakub Jelinek <jakub@redhat.com>
5114
5115 PR c/66618
5116 PR c/69960
5117 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
5118
5119 2017-11-16 Joseph Myers <joseph@codesourcery.com>
5120
5121 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
5122 expected publication date of C17.
5123 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
5124
5125 2017-11-15 Joseph Myers <joseph@codesourcery.com>
5126
5127 PR c/81156
5128 * c-common.c (c_common_reswords): Add __builtin_tgmath.
5129 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
5130
5131 2017-11-10 Martin Sebor <msebor@redhat.com>
5132
5133 PR c/81117
5134 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
5135 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
5136 * c.opt (-Wstringop-truncation): New option.
5137
5138 2017-11-06 Martin Liska <mliska@suse.cz>
5139
5140 PR middle-end/82404
5141 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
5142 FE.
5143 * c.opt: Set default value of warn_return_type.
5144
5145 2017-10-31 David Malcolm <dmalcolm@redhat.com>
5146
5147 * c-common.c (binary_op_error): Update for renaming of
5148 error_at_rich_loc.
5149 (c_parse_error): Likewise.
5150 * c-warn.c (warn_logical_not_parentheses): Likewise for
5151 renaming of inform_at_rich_loc.
5152 (warn_for_restrict): Likewise for renaming of
5153 warning_at_rich_loc_n.
5154
5155 2017-10-30 Joseph Myers <joseph@codesourcery.com>
5156
5157 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
5158 * c-opts.c (set_std_c17): New function.
5159 (c_common_init_options): Use gnu17 as default C version.
5160 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
5161
5162 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
5163
5164 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
5165 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
5166 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
5167 __FP_FAST_FMA<N>X.
5168
5169 2017-10-23 Marek Polacek <polacek@redhat.com>
5170
5171 PR c/82681
5172 * c-warn.c (warnings_for_convert_and_check): Fix typos.
5173
5174 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
5175
5176 * c-common.c (check_builtin_function_arguments): Also check arguments
5177 of __builtin_alloca_with_align_and_max.
5178
5179 2017-10-17 David Malcolm <dmalcolm@redhat.com>
5180
5181 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
5182 rather than NULL to format_warning_va.
5183 (check_format_types): Likewise when calling format_type_warning.
5184 Remove code to extract source_ranges and source_range * in favor
5185 of just a location_t.
5186 (format_type_warning): Convert source_range * param to a
5187 location_t.
5188
5189 2017-10-13 Jakub Jelinek <jakub@redhat.com>
5190
5191 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
5192 [LR]SHIFT_EXPR.
5193
5194 2017-10-12 David Malcolm <dmalcolm@redhat.com>
5195
5196 * c-common.c (enum missing_token_insertion_kind): New enum.
5197 (get_missing_token_insertion_kind): New function.
5198 (maybe_suggest_missing_token_insertion): New function.
5199 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
5200
5201 2017-10-11 Nathan Sidwell <nathan@acm.org>
5202
5203 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
5204 (c_common_handle_option): Update incpath_kind names.
5205
5206 2017-10-11 Martin Liska <mliska@suse.cz>
5207
5208 PR sanitizer/82490
5209 * c-attribs.c (handle_no_sanitize_attribute): Report directly
5210 Wattributes warning.
5211
5212 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
5213
5214 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
5215 operating on trees as wide_ints.
5216 * c-common.c (pointer_int_sum): Likewise.
5217 * c-pretty-print.c (pp_c_integer_constant): Likewise.
5218 * c-warn.c (match_case_to_enum_1): Likewise.
5219 (c_do_switch_warnings): Likewise.
5220 (maybe_warn_shift_overflow): Likewise.
5221
5222 2017-10-10 Jakub Jelinek <jakub@redhat.com>
5223
5224 PR c/82437
5225 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
5226 instead of wide_int::from.
5227
5228 2017-10-06 Jakub Jelinek <jakub@redhat.com>
5229
5230 PR c/82437
5231 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
5232 using to_widest use wide_int with the larger of the two precisions.
5233
5234 2017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
5235
5236 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
5237 functions.
5238
5239 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
5240
5241 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
5242 when combining the original unconverted comparison operands.
5243
5244 2017-09-29 Jakub Jelinek <jakub@redhat.com>
5245
5246 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
5247 attribute.
5248
5249 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5250
5251 * c-ada-spec.c (to_ada_name): Add index parameter.
5252 (pp_ada_tree_identifier): Likewise.
5253 (dump_ada_macros): Adjust call to to_ada_name.
5254 (struct overloaded_name_hash): New type.
5255 (struct overloaded_name_hasher): Likewise.
5256 (overloaded_names): New hash table.
5257 (compute_overloading_index): New function.
5258 (dump_ada_decl_name): Call it and pass the result to
5259 pp_ada_tree_identifier.
5260 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
5261 (dump_ada_function_declaration): Likewise.
5262 (dump_generic_ada_node): Likewise.
5263 (print_constructor): Likewise.
5264 (print_destructor): Likewise.
5265 (dump_ada_specs): Delete overloaded_names table.
5266
5267 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5268
5269 * c-ada-spec.c (max_ada_macros): Move around.
5270 (store_ada_macro_index): Likewise.
5271 (source_file): Rename into...
5272 (macro_source_file): ...this.
5273 (count_ada_macro): Move around.
5274 (store_ada_macro): Likewise.
5275 (compare_macro): Likewise.
5276 (print_ada_macros): Merge in...
5277 (dump_ada_macros): ...this.
5278 (source_file_base): Rename into...
5279 (current_source_file): ...this.
5280 (print_comment): Move around.
5281 (dump_ada_nodes): Call dump_ada_declaration directly.
5282 (struct with): Change type of limited field to bool.
5283 (append_withs): Change type of limited_access parameter to bool.
5284 (pp_ada_tree_identifie): Likewise.
5285 (dump_ada_decl_nam): Likewise.
5286 (dump_generic_ada_node): Likewise. Do not print the return type.
5287 (to_ada_name): Change type of space_found parameter to bool.
5288 (dump_ada_function_declaration): Return void and change type of
5289 parameters to bool. Also print the return type for a function.
5290 (print_ada_methods): Rename into...
5291 (dump_ada_methods): ...this.
5292 (print_ada_declaration): Rename into ...
5293 (dump_ada_declaration): ...this. Do not print the return type.
5294 (print_ada_struct_decl): Rename into...
5295 (dump_ada_struct_decl): ...this.
5296
5297 2017-09-29 Jakub Jelinek <jakub@redhat.com>
5298
5299 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
5300 rather than DECL_INITIAL.
5301 (common_handle_aligned_attribute): Likewise.
5302
5303 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
5304
5305 * c.opt (gen-decls): Add RejectNegative.
5306
5307 2017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
5308 Jakub Jelinek <jakub@redhat.com>
5309
5310 Add support for -std=c++2a.
5311 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
5312 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
5313 * c-opts.c (set_std_cxx2a): New.
5314 (c_common_handle_option): Set options when -std=c++2a is enabled.
5315 (c_common_post_options): Adjust comments.
5316 (set_std_cxx14, set_std_cxx17): Likewise.
5317
5318 2017-09-15 Eric Botcazou <ebotcazou@adacore.com>
5319
5320 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
5321 message for non-uniform endianness and issue a warning in C++.
5322
5323 2017-09-15 Jakub Jelinek <jakub@redhat.com>
5324
5325 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
5326 (Wc++17-compat): Change from undocumented alias to option.
5327 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
5328 change C++1z to C++17 in description.
5329 (std=c++1z, std=gnu++1z): Change from option to undocumented
5330 deprecated alias.
5331 (std=c++17, std=gnu++17): Change from undocumented alias to option.
5332 Adjust description.
5333 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
5334 * c-opts.c (set_std_cxx1z): Rename to ...
5335 (set_std_cxx17): ... this.
5336 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
5337 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
5338 caller.
5339 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
5340 comments.
5341
5342 2017-09-12 H.J. Lu <hongjiu.lu@intel.com>
5343
5344 * c-attribs.c (common_handle_aligned_attribute): Don't warn
5345 function alignment if warn_if_not_aligned_p is true.
5346
5347 2017-09-12 Nathan Sidwell <nathan@acm.org>
5348
5349 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
5350 resort_sorted_fields): Move to c/c-decl.c.
5351 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
5352 (struct sorted_fields_type): Move to c/c-lang.h.
5353
5354 2017-09-09 Jonathan Wakely <jwakely@redhat.com>
5355
5356 PR c++/81852
5357 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
5358
5359 2017-09-04 Marek Polacek <polacek@redhat.com>
5360
5361 PR c/81783
5362 * c-warn.c (warn_tautological_bitwise_comparison): New function.
5363 (warn_tautological_cmp): Call it.
5364
5365 2017-09-01 Boris Kolpackov <boris@codesynthesis.com>
5366
5367 * c-opts.c (c_common_finish): Write dependency information even if
5368 there are errors.
5369
5370 2017-09-01 Jakub Jelinek <jakub@redhat.com>
5371
5372 PR c/81887
5373 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
5374 (omp_pragmas_simd): ... here.
5375 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
5376 create new clauses list containing just simd clause.
5377
5378 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5379 Alan Hayward <alan.hayward@arm.com>
5380 David Sherwood <david.sherwood@arm.com>
5381
5382 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
5383 into scalar_mode_supported_p call.
5384 (handle_mode_attribute): Update call to scalar_mode_supported_p.
5385
5386 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5387 Alan Hayward <alan.hayward@arm.com>
5388 David Sherwood <david.sherwood@arm.com>
5389
5390 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
5391 for the mode iterator.
5392
5393 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5394 Alan Hayward <alan.hayward@arm.com>
5395 David Sherwood <david.sherwood@arm.com>
5396
5397 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
5398 * c-common.c (c_build_vec_perm_expr): Likewise.
5399
5400 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5401 Alan Hayward <alan.hayward@arm.com>
5402 David Sherwood <david.sherwood@arm.com>
5403
5404 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
5405
5406 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5407 Alan Hayward <alan.hayward@arm.com>
5408 David Sherwood <david.sherwood@arm.com>
5409
5410 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
5411 before calling targetm.addr_space.valid_pointer_mode.
5412
5413 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5414 Alan Hayward <alan.hayward@arm.com>
5415 David Sherwood <david.sherwood@arm.com>
5416
5417 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
5418
5419 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5420 Alan Hayward <alan.hayward@arm.com>
5421 David Sherwood <david.sherwood@arm.com>
5422
5423 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
5424 iterators.
5425 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
5426
5427 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5428 Alan Hayward <alan.hayward@arm.com>
5429 David Sherwood <david.sherwood@arm.com>
5430
5431 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
5432 case statements.
5433
5434 2017-08-29 Martin Liska <mliska@suse.cz>
5435
5436 PR other/39851
5437 * c-common.c (parse_optimize_options): Add argument to function
5438 call.
5439 * c-pragma.c (handle_pragma_diagnostic): Likewise.
5440
5441 2017-08-24 David Malcolm <dmalcolm@redhat.com>
5442
5443 * c-lex.c (interpret_float): Use token location
5444 when building an EXCESS_PRECISION_EXPR.
5445
5446 2017-08-21 David Malcolm <dmalcolm@redhat.com>
5447
5448 * c-common.c (check_function_arguments): Add "arglogs" param; pass
5449 it to check_function_format.
5450 * c-common.h (check_function_arguments): Add vec<location_t> *
5451 param.
5452 (check_function_format): Likewise.
5453 * c-format.c (struct format_check_context): Add field "arglocs".
5454 (check_function_format): Add param "arglocs"; pass it to
5455 check_format_info.
5456 (check_format_info): Add param "arglocs"; use it to initialize
5457 new field of format_ctx.
5458 (check_format_arg): Pass format_ctx->arglocs to new param of
5459 check_format_info_main.
5460 (class argument_parser): New field "arglocs".
5461 (argument_parser::argument_parser): Add "arglocs_" param and use
5462 it to initialize new field.
5463 (argument_parser::check_argument_type): Pass new arglocs field to
5464 check_format_types.
5465 (check_format_info_main): Add param "arglocs", and use it when
5466 constructing arg_parser.
5467 (check_format_types): Add param "arglocs"; use it if non-NULL when
5468 !EXPR_HAS_LOCATION (cur_param) to get at location information.
5469
5470 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
5471
5472 PR c/53037
5473 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
5474 (c_common_attribute_table): Add warn_if_not_aligned.
5475 (handle_aligned_attribute): Renamed to ...
5476 (common_handle_aligned_attribute): Remove argument, name, and add
5477 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
5478 (handle_aligned_attribute): New.
5479 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
5480
5481 2017-08-14 Martin Sebor <msebor@redhat.com>
5482
5483 PR c/81117
5484 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
5485 (handle_nonstring_attribute): New function.
5486
5487 2017-08-14 Martin Sebor <msebor@redhat.com>
5488
5489 PR c/81117
5490 * c-format.h (T89_G): New macro.
5491 * c-format.c (local_gcall_ptr_node): New variable.
5492 (init_dynamic_diag_info): Initialize it.
5493
5494 2017-08-11 Martin Liska <mliska@suse.cz>
5495
5496 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
5497 TARGET_SUPPORTS_ALIASES.
5498
5499 2017-08-10 David Malcolm <dmalcolm@redhat.com>
5500
5501 * c-common.c (c_parse_error): Add rich_location * param, using it
5502 rather implicitly using input_location.
5503 * c-common.h (c_parse_error): Add rich_location * param.
5504
5505 2017-08-09 Marek Polacek <polacek@redhat.com>
5506
5507 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
5508 (c_common_truthvalue_conversion): Likewise.
5509 * c-omp.c (c_finish_omp_atomic): Likewise.
5510 * c-common.h (build_binary_op): Update declaration.
5511
5512 2017-08-08 Martin Liska <mliska@suse.cz>
5513
5514 * c-ada-spec.c: Include header files.
5515 * c-ubsan.c: Likewise.
5516 * c-warn.c: Likewise.
5517
5518 2017-08-07 Jakub Jelinek <jakub@redhat.com>
5519
5520 PR c/69389
5521 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
5522
5523 2017-08-07 Eric Botcazou <ebotcazou@adacore.com>
5524
5525 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
5526 (print_ada_methods): Likewise.
5527 (print_ada_declaration): Likewise.
5528
5529 2017-08-07 Martin Liska <mliska@suse.cz>
5530
5531 * array-notation-common.c: Add new includes.
5532 * c-format.c( handle_format_attribute): Canonicalize a format
5533 function name.
5534 * c-lex.c (c_common_has_attribute): Canonicalize name of an
5535 attribute.
5536 * c-pretty-print.c: Add new include.
5537
5538 2017-08-05 Eric Botcazou <ebotcazou@adacore.com>
5539
5540 * c-ada-spec.c (has_static_fields): Look only into variables.
5541 (print_constructor): Add TYPE parameter and use it for the name.
5542 (print_destructor): Likewise.
5543 (print_ada_declaration): Adjust to new constructor/destructor names.
5544 Adjust calls to print_constructor and print_destructor.
5545 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
5546 Look only into variables in the final loop.
5547
5548 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
5549
5550 * c-ada-spec.c (has_static_fields): Look only into fields.
5551 (dump_generic_ada_node): Small tweak.
5552 (dump_nested_types): Look only into fields.
5553 (print_ada_declaration): Look only into methods. Small tweak.
5554 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
5555
5556 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
5557
5558 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
5559 (dump_ada_function_declaration): Likewise.
5560 (dump_generic_ada_node): Likewise.
5561 (print_ada_declaration): Add support for const-qualified variables.
5562
5563 2017-07-31 Martin Liska <mliska@suse.cz>
5564
5565 PR sanitize/81530
5566 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
5567 Guard condition with flag_sanitize_p also with current_function_decl
5568 non-null equality.
5569 (ubsan_maybe_instrument_reference_or_call): Likewise.
5570
5571 2017-07-30 Uros Bizjak <ubizjak@gmail.com>
5572
5573 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
5574
5575 2017-07-29 Eric Botcazou <ebotcazou@adacore.com>
5576
5577 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
5578 for enumeral types.
5579 (print_ada_declaration): Add missing guard for record types.
5580
5581 2017-07-27 Jakub Jelinek <jakub@redhat.com>
5582
5583 PR c/45784
5584 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
5585 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
5586 new COMPOUND_EXPRs around the rhs of the comparison.
5587
5588 2017-07-27 Marek Polacek <polacek@redhat.com>
5589
5590 PR c/81417
5591 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
5592 the types.
5593
5594 2017-07-27 Jakub Jelinek <jakub@redhat.com>
5595
5596 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
5597 (handle_noipa_attribute): New function.
5598
5599 2017-07-07 Torsten Duwe <duwe@suse.de>
5600
5601 * c-attribs.c (c_common_attribute_table): Add entry for
5602 "patchable_function_entry".
5603
5604 2017-07-20 Nathan Sidwell <nathan@acm.org>
5605
5606 Remove TYPE_METHODS.
5607 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
5608 dump_ada_template, print_ada_methods,
5609 print_ada_declaration): Member fns are on TYPE_FIELDS.
5610
5611 2017-07-18 Nathan Sidwell <nathan@acm.org>
5612
5613 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
5614
5615 2017-07-14 David Malcolm <dmalcolm@redhat.com>
5616
5617 * c-common.c (try_to_locate_new_include_insertion_point): New
5618 function.
5619 (per_file_includes_t): New typedef.
5620 (added_includes_t): New typedef.
5621 (added_includes): New variable.
5622 (maybe_add_include_fixit): New function.
5623 * c-common.h (maybe_add_include_fixit): New decl.
5624
5625 2017-07-10 Martin Sebor <msebor@redhat.com>
5626
5627 PR other/81345
5628 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
5629
5630 2017-07-06 David Malcolm <dmalcolm@redhat.com>
5631
5632 * c-common.c (selftest::c_family_tests): New.
5633 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
5634 (selftest::c_family_tests): New decl.
5635
5636 2017-07-04 Marek Polacek <polacek@redhat.com>
5637
5638 PR c/81231
5639 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
5640 types.
5641
5642 2017-07-04 Marek Polacek <polacek@redhat.com>
5643
5644 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
5645
5646 2017-06-28 Martin Liska <mliska@suse.cz>
5647
5648 PR ipa/81128
5649 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
5650 to a function declaration.
5651
5652 2017-06-28 Martin Liska <mliska@suse.cz>
5653
5654 PR driver/79659
5655 * c.opt: Add IntegerRange to various options.
5656
5657 2017-06-26 Marek Polacek <polacek@redhat.com>
5658
5659 PR c/80116
5660 * c-common.h (warn_for_multistatement_macros): Declare.
5661 * c-warn.c: Include "c-family/c-indentation.h".
5662 (warn_for_multistatement_macros): New function.
5663 * c.opt (Wmultistatement-macros): New option.
5664 * c-indentation.c (guard_tinfo_to_string): No longer static.
5665 Change the parameter type to "enum rid". Handle RID_SWITCH.
5666 * c-indentation.h (guard_tinfo_to_string): Declare.
5667
5668 2017-06-23 Marc Glisse <marc.glisse@inria.fr>
5669
5670 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
5671
5672 2017-06-15 Martin Sebor <msebor@redhat.com>
5673
5674 PR c++/80560
5675 * c.opt (-Wclass-memaccess): New option.
5676
5677 2017-06-14 Boris Kolpackov <boris@codesynthesis.com>
5678
5679 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
5680
5681 2017-06-13 Marek Polacek <polacek@redhat.com>
5682
5683 PR objc/80949
5684 * c-warn.c (do_warn_duplicated_branches): Return if any of the
5685 branches is null.
5686
5687 2017-06-13 Martin Liska <mliska@suse.cz>
5688
5689 PR sanitize/78204
5690 * c-attribs.c (add_no_sanitize_value): New function.
5691 (handle_no_sanitize_attribute): Likewise.
5692 (handle_no_sanitize_address_attribute): Use the function.
5693 (handle_no_sanitize_thread_attribute): New function.
5694 (handle_no_address_safety_analysis_attribute): Use
5695 add_no_sanitize_value.
5696 (handle_no_sanitize_undefined_attribute): Likewise.
5697 * c-common.h: Declare new functions.
5698 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
5699 (ubsan_instrument_shift): Likewise.
5700 (ubsan_instrument_bounds): Likewise.
5701 (ubsan_maybe_instrument_array_ref): Likewise.
5702 (ubsan_maybe_instrument_reference_or_call): Likewise.
5703
5704 2017-06-11 Jason Merrill <jason@redhat.com>
5705
5706 * c-ada-spec.c, c-pragma.c: Use id_equal.
5707
5708 2017-06-04 Marek Polacek <polacek@redhat.com>
5709
5710 PR c/80919
5711 * c-format.c (matching_type_p): Return false if any of the types
5712 requires structural equality.
5713
5714 2017-06-02 Martin Sebor <msebor@redhat.com>
5715
5716 PR c/80892
5717 * c-warn.c (conversion_warning): Use -Wconversion for integer
5718 conversion and -Wfloat-conversion for floating one.
5719
5720 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
5721
5722 * c.opt (Wsizeof-pointer-div): New warning option.
5723
5724 2017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
5725
5726 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
5727 (Wcatch-value=1): Enable by -Wall.
5728
5729 2017-05-30 David Malcolm <dmalcolm@redhat.com>
5730
5731 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
5732 format_chars.
5733 * c.opt (fdiagnostics-show-template-tree): New option.
5734 (felide-type): New option.
5735
5736 2017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
5737
5738 * c.opt (Wcatch-value=): New C++ warning flag.
5739
5740 2017-05-24 Nathan Sidwell <nathan@acm.org>
5741
5742 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
5743 const casts to avoid warning.
5744
5745 2017-05-24 Martin Sebor <msebor@redhat.com>
5746
5747 PR c/80731
5748 * c-common.h (unsafe_conversion_p): Add a function argument.
5749 * c-common.c (unsafe_conversion_p): Same.
5750 Add type names and values to diagnostics.
5751 (scalar_to_vector): Adjust.
5752 * c-warn.c (constant_expression_error): Add a function argument.
5753 Add type names and values to diagnostics.
5754 (conversion_warning): Add a function argument.
5755 Add type names and values to diagnostics.
5756 (warnings_for_convert_and_check): Same.
5757
5758 2017-05-19 Jason Merrill <jason@redhat.com>
5759
5760 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
5761 enumerators.
5762
5763 2017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5764
5765 * c-format.c (locus): Move out of function scope,
5766 add GTY attribute.
5767
5768 2017-05-19 Nathan Sidwell <nathan@acm.org>
5769
5770 * c-opts.c (class_dump_file, class_dump_flags): Delete.
5771 (c_common_parse_file): Remove class dump handling.
5772 (get_dump_info): Likewise.
5773
5774 2017-05-19 Richard Biener <rguenther@suse.de>
5775
5776 PR c++/80593
5777 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
5778 to alias-set zero memory.
5779
5780 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
5781
5782 * c-format.c (local_tree_type_node): Add GTY attribute.
5783
5784 2017-05-18 Marek Polacek <polacek@redhat.com>
5785
5786 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
5787 (c_common_fixed_point_type_for_size): Likewise.
5788 (c_common_type_for_mode): Likewise.
5789 (shorten_compare): Likewise.
5790 (c_promoting_integer_type_p): Use false/true instead of 0/1.
5791 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
5792
5793 2017-05-18 Marek Polacek <polacek@redhat.com>
5794
5795 * c-common.c (self_promoting_args_p): Change the return type to bool.
5796 Use false/true instead of 0/1.
5797 * c-common.h (self_promoting_args_p): Update.
5798
5799 2017-05-17 Marek Polacek <polacek@redhat.com>
5800
5801 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
5802 * c-warn.c: Likewise.
5803
5804 2017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
5805
5806 Implement new C++ intrinsics __is_assignable and __is_constructible.
5807 * c-common.c (__is_assignable, __is_constructible): New.
5808 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
5809
5810 2017-05-17 Martin Liska <mliska@suse.cz>
5811
5812 * c-common.h: Introduce dump_flags_t type and
5813 use it instead of int type.
5814 * c-gimplify.c (c_genericize): Likewise.
5815 * c-opts.c: Likewise.
5816
5817 2017-05-17 Marek Polacek <polacek@redhat.com>
5818
5819 * c-common.c (c_save_expr): Remove.
5820 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
5821 * c-common.h (c_save_expr): Remove declaration.
5822
5823 2017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
5824
5825 PR c/35441
5826 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
5827 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
5828 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
5829 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
5830 RDIV_EXPR.
5831 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
5832
5833 2017-05-09 Marek Polacek <polacek@redhat.com>
5834
5835 PR c/80525
5836 * c-warn.c (unwrap_c_maybe_const): New.
5837 (warn_logical_operator): Call it.
5838
5839 2017-05-09 Nathan Sidwell <nathan@acm.org>
5840
5841 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
5842 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
5843
5844 2017-05-08 Martin Sebor <msebor@redhat.com>
5845
5846 PR translation/80280
5847 * c-format.h (struct format_flag_spec): Add new member.
5848 (T89_T): New macro.
5849 * c-format.c (local_tree_type_node): New global.
5850 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
5851 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
5852 (strfmon_flag_specs): Likewise.
5853 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
5854 with distinct quoting properties.
5855 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
5856 (flag_chars_t::validate): Add argument and handle bad quoting.
5857 (check_format_info_main): Handle quoting problems.
5858 (init_dynamic_diag_info): Simplify.
5859
5860 2017-05-08 Jason Merrill <jason@redhat.com>
5861
5862 * c-opts.c (c_common_post_options): Update defaults for
5863 flag_abi_version and flag_abi_compat_version.
5864
5865 2017-05-05 David Malcolm <dmalcolm@redhat.com>
5866
5867 * c-common.c (c_cpp_error): Replace report_diagnostic
5868 with diagnostic_report_diagnostic.
5869
5870 2017-05-04 Martin Sebor <msebor@redhat.com>
5871
5872 PR translation/80280
5873 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
5874 (handle_weakref_attribute): Same.
5875
5876 2017-05-03 Nathan Sidwell <nathan@acm.org>
5877
5878 Canonicalize canonical type hashing
5879 * c-common.c (complete_array_type): Use type_hash_canon.
5880
5881 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
5882
5883 PR c++/80038
5884 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
5885 prototype.
5886 (cilk_install_body_pedigree_operations): Likewise.
5887 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
5888 detatched.
5889 (cilk_gimplify_call_params_in_spawned_fn): Remove.
5890 (cilk_install_body_pedigree_operations): Likewise.
5891 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
5892 unwrapping.
5893
5894 2017-04-27 Jakub Jelinek <jakub@redhat.com>
5895
5896 PR c++/80534
5897 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
5898 flag on non-aggregate element types.
5899
5900 2017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
5901
5902 * c-common.c (c_type_hasher, type_hash_table): Remove.
5903 (c_common_get_alias_set): Remove unreachable code.
5904 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
5905
5906 2017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
5907
5908 * c.opt (Wextra-semi): New C++ warning flag.
5909
5910 2017-04-20 Jakub Jelinek <jakub@redhat.com>
5911
5912 PR middle-end/80423
5913 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
5914
5915 2017-04-18 Jakub Jelinek <jakub@redhat.com>
5916
5917 PR middle-end/79788
5918 PR middle-end/80375
5919 * c-common.c (c_common_type_for_mode): Don't handle
5920 widest_*_literal_type_node here.
5921 c_common_signed_or_unsigned_type): Likewise.
5922 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
5923 to *intTI_type_node or *intDI_type_node depending on whether
5924 TImode is supported by the target or not.
5925
5926 2017-04-10 Martin Liska <mliska@suse.cz>
5927
5928 PR sanitizer/80350
5929 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
5930 doing an UBSAN check.
5931
5932 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
5933
5934 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
5935
5936 2017-03-31 Jakub Jelinek <jakub@redhat.com>
5937
5938 PR c++/79572
5939 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
5940 tree *.
5941 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
5942 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
5943 REFERENCE_TYPE.
5944
5945 2017-03-31 David Malcolm <dmalcolm@redhat.com>
5946
5947 PR documentation/78732
5948 * c.opt (Wendif-labels): Fix description to refer to
5949 #else rather than #elif.
5950
5951 2017-03-31 Jakub Jelinek <jakub@redhat.com>
5952
5953 PR libstdc++/80251
5954 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
5955 * c-common.c (c_common_reswords): Add __is_aggregate trait.
5956
5957 2017-03-27 Jakub Jelinek <jakub@redhat.com>
5958
5959 PR middle-end/80162
5960 * c-common.c (c_common_mark_addressable_vec): Don't set
5961 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
5962
5963 2017-03-21 Martin Sebor <msebor@redhat.com>
5964
5965 PR c++/79548
5966 * c-common.c (set_underlying_type): Mark type used only when
5967 original del is declared unused.
5968
5969 2017-03-10 David Malcolm <dmalcolm@redhat.com>
5970
5971 PR translation/79848
5972 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
5973 "%qs".
5974
5975 2017-03-10 David Malcolm <dmalcolm@redhat.com>
5976
5977 PR c/79921
5978 * c-indentation.c (warn_for_misleading_indentation): Remove parens
5979 from inform's message, so that xgettext can locate it.
5980
5981 2017-03-09 Marek Polacek <polacek@redhat.com>
5982
5983 PR c++/79962
5984 PR c++/79984
5985 * c-attribs.c (handle_nonnull_attribute): Save the result of default
5986 conversion to the attribute list.
5987
5988 2017-03-09 Martin Liska <mliska@suse.cz>
5989
5990 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
5991
5992 2017-03-03 Jason Merrill <jason@redhat.com>
5993
5994 * c.opt (Wnoexcept-type): New.
5995
5996 2017-03-02 Richard Biener <rguenther@suse.de>
5997
5998 PR c/79756
5999 * c-common.c (c_common_mark_addressable_vec): Look through
6000 C_MAYBE_CONST_EXPR.
6001
6002 2017-02-28 Martin Liska <mliska@suse.cz>
6003
6004 * c.opt: Replace space with tabular for options of <number>
6005 type.
6006
6007 2017-02-28 Martin Liska <mliska@suse.cz>
6008
6009 * c.opt: Fix --help=option -Q for options which are of
6010 an enum type.
6011
6012 2017-02-24 Jakub Jelinek <jakub@redhat.com>
6013
6014 PR c++/79588
6015 * c-common.c (check_function_restrict): New function.
6016 (check_function_arguments): Add FNDECL argument. Call
6017 check_function_restrict if -Wrestrict.
6018 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
6019 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
6020 * c-common.h (check_function_arguments): Add FNDECL argument.
6021 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
6022
6023 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6024
6025 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
6026 treatment of parameters with pointer-to-tagged type and tidy up.
6027 (print_ada_methods): Remove the special treatment of C++ static member
6028 functions.
6029
6030 2017-02-22 Martin Liska <mliska@suse.cz>
6031
6032 * c.opt: Replace inequality signs with square brackets
6033 for -Wnornalized.
6034
6035 2017-02-21 Jakub Jelinek <jakub@redhat.com>
6036
6037 PR c++/79641
6038 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
6039 preserve quals.
6040
6041 2017-02-17 Joseph Myers <joseph@codesourcery.com>
6042
6043 * c-cppbuiltin.c (builtin_define_float_constants): Define
6044 __DECIMAL_DIG__ to the value for long double.
6045
6046 2017-02-15 Marek Polacek <polacek@redhat.com>
6047
6048 PR c/79515
6049 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
6050 conversion has occured.
6051
6052 2017-01-24 David Malcolm <dmalcolm@redhat.com>
6053
6054 * c-common.c (c_common_reswords): Add "__RTL".
6055 * c-common.h (enum rid): Add RID_RTL.
6056
6057 2017-01-20 Marek Polacek <polacek@redhat.com>
6058
6059 PR c/64279
6060 * c-common.h (do_warn_duplicated_branches_r): Declare.
6061 * c-gimplify.c (c_genericize): Walk the function tree calling
6062 do_warn_duplicated_branches_r.
6063 * c-warn.c (expr_from_macro_expansion_r): New.
6064 (do_warn_duplicated_branches): New.
6065 (do_warn_duplicated_branches_r): New.
6066 * c.opt (Wduplicated-branches): New option.
6067
6068 2017-01-17 David Malcolm <dmalcolm@redhat.com>
6069
6070 PR c++/71497
6071 * c-indentation.c (warn_for_misleading_indentation): Use the past
6072 subjunctive in the note.
6073
6074 2017-01-17 Aldy Hernandez <aldyh@redhat.com>
6075
6076 PR c/79116
6077 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
6078 start type to integer_type.
6079
6080 2017-01-16 Jakub Jelinek <jakub@redhat.com>
6081
6082 PR driver/49726
6083 * c.opt (gen-decls): Add Driver flag.
6084
6085 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6086
6087 Revert:
6088 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6089
6090 PR c++/71737
6091 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
6092
6093 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6094
6095 PR c++/71737
6096 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
6097
6098 2017-01-12 Martin Sebor <msebor@redhat.com>
6099
6100 (-Wformat-overflow): ...to this.
6101
6102 2017-01-11 Martin Sebor <msebor@redhat.com>
6103
6104 PR c/78768
6105 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
6106 Also enable for LTO.
6107
6108 2017-01-10 Jason Merrill <jason@redhat.com>
6109
6110 Implement P0195R2, C++17 variadic using.
6111 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
6112
6113 2017-01-09 Jakub Jelinek <jakub@redhat.com>
6114
6115 PR translation/79019
6116 PR translation/79020
6117 * c.opt (Wnormalized=): Fix typo in description.
6118
6119 2017-01-08 Martin Sebor <msebor@redhat.com>
6120
6121 PR middle-end/77708
6122 * c.opt (-Wformat-truncation): New option.
6123
6124 2017-01-06 Alexandre Oliva <aoliva@redhat.com>
6125
6126 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
6127 value to unsigned short to fit in 4 hex digits without
6128 warnings.
6129
6130 2017-01-05 Eric Botcazou <ebotcazou@adacore.com>
6131
6132 * c.opt (fsso-struct): Add 'native' value.
6133
6134 2017-01-05 Martin Liska <mliska@suse.cz>
6135
6136 PR pch/78970
6137 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
6138 header.
6139
6140 2017-01-04 Marek Polacek <polacek@redhat.com>
6141
6142 PR c++/64767
6143 * c.opt (Wpointer-compare): New option.
6144
6145 2017-01-04 Jakub Jelinek <jakub@redhat.com>
6146
6147 PR driver/78957
6148 * c.opt (fsso-struct=): Add RejectNegative.
6149
6150 2017-01-01 Jakub Jelinek <jakub@redhat.com>
6151
6152 Update copyright years.
6153
6154 2016-12-29 Martin Liska <mliska@suse.cz>
6155
6156 PR c/78933
6157 * c.opt (strong-eval-order): Add RejectNegative keyword.
6158
6159 2016-12-22 Jason Merrill <jason@redhat.com>
6160
6161 Implement P0522R0, matching of template template arguments.
6162 * c-cppbuiltin.c (c_cpp_builtins): Define
6163 __cpp_template_template_args.
6164
6165 2016-12-21 Jakub Jelinek <jakub@redhat.com>
6166
6167 PR bootstrap/78817
6168 * c-common.c (struct nonnull_arg_ctx): New type.
6169 (check_function_nonnull): Return bool instead of void. Use
6170 nonnull_arg_ctx as context rather than just location_t.
6171 (check_nonnull_arg): Adjust for the new context type, set
6172 warned_p to true if a warning has been diagnosed.
6173 (check_function_arguments): Return bool instead of void.
6174 * c-common.h (check_function_arguments): Adjust prototype.
6175
6176 2016-12-21 Jason Merrill <jason@redhat.com>
6177
6178 * c.opt (-fnew-ttp-matching): New flag.
6179 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
6180
6181 2016-12-14 Martin Jambor <mjambor@suse.cz>
6182
6183 * c-omp.c: Include omp-general.h instead of omp-low.h.
6184 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
6185 name.
6186
6187 2016-12-14 Martin Sebor <msebor@redhat.com>
6188
6189 PR c/17308
6190 * c-common.c (check_nonnull_arg): Disable when optimization
6191 is enabled.
6192
6193 2016-12-12 Marek Polacek <polacek@redhat.com>
6194
6195 PR c++/78647
6196 * c-common.c (attribute_fallthrough_p): Return false for
6197 error_mark_node.
6198
6199 2016-12-08 Martin Sebor <msebor@redhat.com>
6200
6201 PR c/78284
6202 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
6203
6204 2016-12-08 Martin Sebor <msebor@redhat.com>
6205
6206 PR c/78165
6207 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
6208 suffix.
6209
6210 2016-12-07 Martin Sebor <msebor@redhat.com>
6211
6212 PR c/53562
6213 PR middle-end/77784
6214 PR middle-end/78149
6215 PR middle-end/78138
6216 * c.opt (-Wstringop-overflow): New option.
6217
6218 2016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
6219
6220 * c-attribs.c (asan odr indicator): New attribute.
6221 (handle_asan_odr_indicator_attribute): New function.
6222
6223 2016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6224
6225 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
6226 ptrdiff_type_node;
6227
6228 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6229
6230 * c-common.c (excess_precision_mode_join): New.
6231 (c_ts18661_flt_eval_method): New.
6232 (c_c11_flt_eval_method): Likewise.
6233 (c_flt_eval_method): Likewise.
6234 * c-common.h (excess_precision_mode_join): New.
6235 (c_flt_eval_method): Likewise.
6236 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
6237 (cpp_iec_559_value): Call it.
6238 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
6239 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
6240 __FLT_EVAL_METHOD_TS_18661_3__.
6241
6242 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6243
6244 * c-opts.c (c_common_post_options): Add logic to handle the default
6245 case for -fpermitted-flt-eval-methods.
6246
6247 2016-11-23 Paolo Bonzini <bonzini@gnu.org>
6248
6249 * c.opt (Wexpansion-to-defined): New.
6250
6251 2016-11-23 Jakub Jelinek <jakub@redhat.com>
6252
6253 PR target/78451
6254 * c-pragma.c (handle_pragma_target): Don't replace
6255 current_target_pragma, but chainon the new args to the current one.
6256
6257 2016-11-22 Nathan Sidwell <nathan@acm.org>
6258
6259 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
6260 indentation and formatting.
6261
6262 2016-11-21 Martin Sebor <msebor@redhat.com>
6263
6264 * c.opt (-fprintf-return-value): Enable by default.
6265
6266 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6267
6268 PR c++/71973
6269 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
6270 * c-common.c (c_common_nodes_and_builtins): Initialize
6271 const_tm_ptr_type_node.
6272
6273 2016-11-16 Marek Polacek <polacek@redhat.com>
6274
6275 PR c/78285
6276 * c-common.c (c_add_case_label): Turn error_at calls into inform.
6277
6278 2016-11-14 Jakub Jelinek <jakub@redhat.com>
6279
6280 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
6281
6282 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
6283 Richard Biener <rguenther@suse.de>
6284
6285 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
6286 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
6287 * c.opt (fgimple): New option.
6288
6289 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6290
6291 PR c/35503
6292 * c-common.h (warn_for_restrict): Declare.
6293 * c-warn.c: Include gcc-rich-location.h.
6294 (warn_for_restrict): New function.
6295 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
6296 (gcc_cdiag_char_table): Likewise.
6297 (gcc_cxxdiag_char_table): Likewise.
6298 * c.opt (Wrestrict): New option.
6299
6300 2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
6301
6302 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
6303 for nested types only if the type is a record or union and dump SLOC.
6304
6305 2016-11-09 Jason Merrill <jason@redhat.com>
6306
6307 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
6308
6309 2016-11-09 Jakub Jelinek <jakub@redhat.com>
6310
6311 * c-ubsan.c (ubsan_instrument_shift): Handle split
6312 -fsanitize=shift-base and -fsanitize=shift-exponent.
6313
6314 2016-11-07 Jason Merrill <jason@redhat.com>
6315
6316 * c.opt (Wc++1z-compat): New.
6317 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
6318
6319 2016-11-07 Martin Liska <mliska@suse.cz>
6320
6321 * c-warn.c (warn_for_unused_label): Save all labels used
6322 in goto or in &label.
6323
6324 2016-11-03 Jason Merrill <jason@redhat.com>
6325
6326 * c-cppbuiltin.c (c_cpp_builtins): Correct
6327 __cpp_inheriting_constructors.
6328
6329 2016-11-01 Jason Merrill <jason@redhat.com>
6330
6331 * c-cppbuiltin.c (c_cpp_builtins): Update
6332 __cpp_inheriting_constructors.
6333
6334 * c.opt (-fnew-inheriting-ctors): New.
6335 * c-opts.c: Default to on for ABI 11+.
6336
6337 2016-10-31 Jakub Jelinek <jakub@redhat.com>
6338
6339 PR c++/77948
6340 * c.opt (fext-numeric-literals): Add Var and Init.
6341 * c-opts.c (c_common_handle_option): Don't clear
6342 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
6343 (c_common_post_options): Clear it here if not set
6344 explicitly.
6345
6346 2016-10-28 Aldy Hernandez <aldyh@redhat.com>
6347
6348 PR debug/77773
6349 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
6350 if NULL.
6351
6352 2016-10-25 Jakub Jelinek <jakub@redhat.com>
6353
6354 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
6355 * c-common.c (c_common_reswords): Add __builtin_launder.
6356
6357 2016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
6358
6359 * c-common.c (c_common_truthvalue_conversion): Warn for
6360 multiplications in boolean context. Fix the quoting of '<<' and '<'
6361 in the shift warning.
6362
6363 2016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6364
6365 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
6366
6367 2016-10-20 Jason Merrill <jason@redhat.com>
6368
6369 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
6370
6371 2016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6372
6373 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
6374 integer shift ops in boolean context.
6375
6376 2016-10-18 Aldy Hernandez <aldyh@redhat.com>
6377
6378 * c.opt (Walloca): New.
6379 (Walloca-larger-than=): New.
6380 (Wvla-larger-than=): New.
6381
6382 2016-10-17 Marek Polacek <polacek@redhat.com>
6383
6384 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
6385 Return immediately when finding a match.
6386 (warn_tautological_cmp): Remove a boolean variable that is no longer
6387 needed.
6388
6389 2016-10-17 Marek Polacek <polacek@redhat.com>
6390
6391 * c-attribs.c: New file.
6392 * c-common.c: Move attributes handling to c-attribs.c.
6393 (get_nonnull_operand): No longer static.
6394 * c-common.h: Move the declarations from c-attribs.c to its own section.
6395
6396 2016-10-14 Jason Merrill <jason@redhat.com>
6397
6398 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
6399 and __cpp_deduction_guides.
6400
6401 2016-10-13 Jason Merrill <jason@redhat.com>
6402
6403 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
6404
6405 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
6406
6407 * c-cppbuiltin.c: Include memmodel.h.
6408 * c-opts.c: Likewise.
6409 * c-pragma.c: Likewise.
6410 * c-warn.c: Likewise.
6411
6412 2016-10-12 Jakub Jelinek <jakub@redhat.com>
6413
6414 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
6415 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
6416 * c-opts.c (sanitize_cpp_opts): Initialize
6417 cpp_opts->cpp_warn_implicit_fallthrough.
6418
6419 2016-10-11 Marek Polacek <polacek@redhat.com>
6420
6421 * c-common.c (warning_candidate_p): Change the return type to bool
6422 and return true/false instead of 1/0.
6423 (vector_mode_valid_p): Likewise.
6424
6425 2016-10-11 Marek Polacek <polacek@redhat.com>
6426
6427 * c-common.c (fold_for_warn): No longer static.
6428 (bool_promoted_to_int_p): Likewise.
6429 (c_common_get_narrower): Likewise.
6430 (constant_expression_warning): Move to c-warn.c.
6431 (constant_expression_error): Likewise.
6432 (overflow_warning): Likewise.
6433 (warn_logical_operator): Likewise.
6434 (find_array_ref_with_const_idx_r): Likewise.
6435 (warn_tautological_cmp): Likewise.
6436 (expr_has_boolean_operands_p): Likewise.
6437 (warn_logical_not_parentheses): Likewise.
6438 (warn_if_unused_value): Likewise.
6439 (strict_aliasing_warning): Likewise.
6440 (sizeof_pointer_memaccess_warning): Likewise.
6441 (check_main_parameter_types): Likewise.
6442 (conversion_warning): Likewise.
6443 (warnings_for_convert_and_check): Likewise.
6444 (match_case_to_enum_1): Likewise.
6445 (match_case_to_enum): Likewise.
6446 (c_do_switch_warnings): Likewise.
6447 (warn_for_omitted_condop): Likewise.
6448 (readonly_error): Likewise.
6449 (lvalue_error): Likewise.
6450 (invalid_indirection_error): Likewise.
6451 (warn_array_subscript_with_type_char): Likewise.
6452 (warn_about_parentheses): Likewise.
6453 (warn_for_unused_label): Likewise.
6454 (warn_for_div_by_zero): Likewise.
6455 (warn_for_memset): Likewise.
6456 (warn_for_sign_compare): Likewise.
6457 (do_warn_double_promotion): Likewise.
6458 (do_warn_unused_parameter): Likewise.
6459 (record_locally_defined_typedef): Likewise.
6460 (maybe_record_typedef_use): Likewise.
6461 (maybe_warn_unused_local_typedefs): Likewise.
6462 (maybe_warn_bool_compare): Likewise.
6463 (maybe_warn_shift_overflow): Likewise.
6464 (warn_duplicated_cond_add_or_warn): Likewise.
6465 (diagnose_mismatched_attributes): Likewise.
6466 * c-common.h: Move the declarations from c-warn.c to its own section.
6467 * c-warn.c: New file.
6468
6469 2016-10-08 Jason Merrill <jason@redhat.com>
6470
6471 * c-common.c (c_common_truthvalue_conversion): Don't distribute
6472 into COND_EXPR in C++.
6473
6474 2016-10-08 Jakub Jelinek <jakub@redhat.com>
6475
6476 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
6477 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
6478 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
6479
6480 2016-10-07 Jakub Jelinek <jakub@redhat.com>
6481
6482 Implement LWG2296 helper intrinsic
6483 * c-common.h (enum rid): Add RID_ADDRESSOF.
6484 * c-common.c (c_common_reswords): Add __builtin_addressof.
6485
6486 2016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
6487
6488 PR c++/77700
6489 * c-common.c (c_common_truthvalue_conversion): Warn also for
6490 suspicious enum values in boolean context.
6491
6492 2016-10-06 Jakub Jelinek <jakub@redhat.com>
6493
6494 Implement P0258R2 - helper for C++17
6495 std::has_unique_object_representations trait
6496 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
6497 * c-common.c (c_common_reswords): Add
6498 __has_unique_object_representations.
6499
6500 2016-10-05 Jakub Jelinek <jakub@redhat.com>
6501
6502 PR sanitizer/66343
6503 * c-ubsan.c (ubsan_instrument_return): Don't call
6504 initialize_sanitizer_builtins here.
6505
6506 2016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
6507
6508 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
6509 conditional expression in boolean context when only one arm is
6510 non-boolean.
6511
6512 2016-10-05 Jakub Jelinek <jakub@redhat.com>
6513
6514 PR sanitizer/77823
6515 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
6516 is not integral.
6517
6518 * c-common.c (c_common_reswords): Update comment for C++11.
6519
6520 2016-10-04 Jason Merrill <jason@redhat.com>
6521
6522 * c-common.c (make_tree_vector_from_ctor): New.
6523 * c-common.h: Declare it.
6524
6525 2016-10-04 Jakub Jelinek <jakub@redhat.com>
6526
6527 * c-cppbuiltin.c (c_cpp_builtins): Don't define
6528 __LIBGCC_JCR_SECTION_NAME__.
6529
6530 2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
6531
6532 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
6533 left shift in boolean context.
6534
6535 2016-09-29 Jakub Jelinek <jakub@redhat.com>
6536
6537 Implement P0001R1 - C++17 removal of register storage class specifier
6538 * c.opt (Wregister): New warning.
6539 * c-opts.c (c_common_post_options): Enable -Wregister by
6540 default for C++17.
6541
6542 2016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
6543
6544 * c-opts.c (c_common_post_options): Remove special case for
6545 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
6546 in C++.
6547
6548 2016-09-27 Jakub Jelinek <jakub@redhat.com>
6549
6550 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
6551 -std=c++1z.
6552
6553 * c-ada-spec.c (print_ada_declaration): Remove break after return.
6554
6555 2016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
6556
6557 * c-common.c: Include memmodel.h.
6558
6559 2016-09-26 Marek Polacek <polacek@redhat.com>
6560
6561 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
6562
6563 2016-09-26 Marek Polacek <polacek@redhat.com>
6564
6565 PR c/7652
6566 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
6567 (handle_fallthrough_attribute): New function.
6568 (attribute_fallthrough_p): New function.
6569 * c-common.h (attribute_fallthrough_p): Declare.
6570
6571 2016-09-24 Marek Polacek <polacek@redhat.com>
6572
6573 PR c/77490
6574 * c.opt (Wbool-operation): New.
6575
6576 2016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6577
6578 * c-common.c (c_common_truthvalue_conversion): Inhibit
6579 Wint-in-bool-context warning with from_macro_definition_at.
6580 Mention the expression will always evaluate to true.
6581
6582 2016-09-21 Martin Sebor <msebor@redhat.com>
6583
6584 PR bootstrap/77676
6585 * c.opt (fprintf-return-value): Temporarily initialize to zero
6586 to unblock bootstrap failures.
6587
6588 2016-09-21 Jakub Jelinek <jakub@redhat.com>
6589
6590 PR c++/77651
6591 * c.opt (Waligned-new=): Add RejectNegative.
6592 (faligned-new=): Likewise. Spelling fix - change
6593 aligned_new_threshhold to aligned_new_threshold.
6594 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
6595 to aligned_new_threshold.
6596
6597 2016-09-20 Martin Sebor <msebor@redhat.com>
6598
6599 PR middle-end/49905
6600 * c.opt: Add -Wformat-length and -fprintf-return-value.
6601
6602 2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6603
6604 PR c++/77434
6605 * c.opt (Wint-in-bool-context): New warning.
6606 * c-common.c (c_common_truthvalue_conversion): Warn on integer
6607 constants in boolean context.
6608
6609 2016-09-19 Joseph Myers <joseph@codesourcery.com>
6610
6611 * c-common.c (max_align_t_align): Also consider alignment of
6612 float128_type_node.
6613
6614 2016-09-15 Jason Merrill <jason@redhat.com>
6615
6616 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
6617 DECL_EXTERNAL.
6618
6619 2016-09-14 Jason Merrill <jason@redhat.com>
6620
6621 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
6622 limit FIELD_DECL, either.
6623
6624 2016-09-14 Marek Polacek <polacek@redhat.com>
6625
6626 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
6627 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
6628 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
6629
6630 2016-09-13 David Malcolm <dmalcolm@redhat.com>
6631
6632 * c-common.c (warn_logical_not_parentheses): Replace
6633 rich_location::add_fixit_insert calls with add_fixit_insert_before
6634 and add_fixit_insert_after, eliminating the "next_loc" calculation.
6635
6636 2016-09-13 Jason Merrill <jason@redhat.com>
6637 Tom de Vries <tom@codesourcery.com>
6638
6639 PR c++/77427
6640 * c-common.c (set_underlying_type): Don't treat array as builtin type.
6641
6642 2016-09-13 Jason Merrill <jason@redhat.com>
6643
6644 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
6645 limit types at all.
6646
6647 2016-09-12 Jason Merrill <jason@redhat.com>
6648
6649 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
6650 bit/byte confusion, allow large alignment for types.
6651
6652 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
6653
6654 PR c++/77496
6655 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
6656
6657 2016-09-12 David Malcolm <dmalcolm@redhat.com>
6658
6659 PR c/72858
6660 * c-format.c (argument_parser::check_argument_type): Add params
6661 "type_start" and "conversion_char". Use the former to generate
6662 offset_to_type_start and pass it and conversion_char to
6663 check_format_types.
6664 (check_format_info_main): Capture the start of the type
6665 information as "type_start", and pass it an format_char
6666 to arg_parser.check_argument_type.
6667 (check_format_types): Provide an example in the leading comment.
6668 Add params "offset_to_type_start" and "conversion_char"; pass
6669 them to format_type_warning calls.
6670 (test_get_modifier_for_format_len): Likewise.
6671 (matching_type_p): New function.
6672 (get_format_for_type): Add param "conversion_char" and move
6673 implementation into...
6674 (get_format_for_type_1): ...new function, called twice.
6675 Use new function matching_type_p rather than checking for
6676 TYPE_CANONICAL equality.
6677 (get_corrected_substring): New function.
6678 (format_type_warning): Provide an example in the leading comment.
6679 Add params "offset_to_type_start" and "conversion_char". Replace
6680 call to get_format_for_type with call to get_corrected_substring
6681 and move rejection of hints for widths/precisions there.
6682 (assert_format_for_type_streq): Add param "conversion_char".
6683 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
6684 (test_get_format_for_type_printf): Add conversion chars to the
6685 tests, adding coverage for various combinations of integer
6686 vs double conversions, and for preserving octal and hexadecimal
6687 conversions.
6688 (test_get_format_for_type_scanf): Add conversion chars to the
6689 tests.
6690
6691 2016-09-10 Tom de Vries <tom@codesourcery.com>
6692
6693 PR C/71602
6694 * c-common.c (build_va_arg): Handle more strict
6695 targetm.canonical_va_list_type. Replace first argument type error with
6696 assert.
6697
6698 2016-09-09 Martin Sebor <msebor@redhat.com>
6699
6700 PR c/77520
6701 PR c/77521
6702 * c-format.c (argument_parser::find_format_char_info): Use %qc
6703 format directive unconditionally.
6704
6705 2016-09-09 Jason Merrill <jason@redhat.com>
6706
6707 Implement C++17 new of over-aligned types.
6708 * c.opt: Add -faligned-new and -Waligned-new.
6709 * c-common.c (max_align_t_align): Split out from...
6710 (cxx_fundamental_alignment_p): ...here.
6711 * c-common.h: Declare it.
6712 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
6713
6714 2016-09-09 Joseph Myers <joseph@codesourcery.com>
6715
6716 * c-cppbuiltin.c (builtin_define_type_width): New function.
6717 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
6718 macros.
6719
6720 2016-09-07 David Malcolm <dmalcolm@redhat.com>
6721
6722 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
6723 a POINTER_TYPE.
6724 (substring_loc::get_location): Move to substring-locations.c,
6725 keeping implementation as...
6726 (c_get_substring_location): New function, from the above, reworked
6727 to use accessors rather than member lookup.
6728 * c-common.h (class substring_loc): Move to substring-locations.h,
6729 replacing with a forward decl.
6730 (c_get_substring_location): New decl.
6731 * c-format.c: Include "substring-locations.h".
6732 (format_warning_va): Move to substring-locations.c.
6733 (format_warning_at_substring): Likewise.
6734
6735 2016-09-06 Martin Sebor <msebor@redhat.com>
6736
6737 PR c/77336
6738 * c-format.c (check_function_format): Avoid issuing warnings for
6739 functions unless they call format functions with non-constant
6740 format strings.
6741
6742 2016-09-06 Richard Biener <rguenther@suse.de>
6743
6744 PR c/77450
6745 * c-common.c (c_common_mark_addressable_vec): Handle
6746 COMPOUND_LITERAL_EXPR.
6747
6748 2016-09-05 Marek Polacek <polacek@redhat.com>
6749
6750 PR c/77423
6751 * c-common.c (bool_promoted_to_int_p): New function.
6752 (expr_has_boolean_operands_p): New function.
6753 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
6754 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
6755
6756 2016-09-04 Tom de Vries <tom@codesourcery.com>
6757
6758 revert:
6759 2016-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
6764 2016-09-02 Jakub Jelinek <jakub@redhat.com>
6765
6766 PR c/65467
6767 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
6768 (c_finish_omp_for): Reject _Atomic qualified iterators.
6769
6770 2016-09-01 Martin Sebor <msebor@redhat.com>
6771
6772 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
6773 size to guarantee it fits the output of the formatted function
6774 regardless of its arguments.
6775
6776 2016-09-01 Marek Polacek <polacek@redhat.com>
6777
6778 PR c/7652
6779 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
6780 FALLTHRU comments.
6781
6782 2016-08-29 Marek Polacek <polacek@redhat.com>
6783
6784 PR c/77292
6785 * c-common.c (warn_logical_not_parentheses): Don't warn for
6786 a comparison or a logical operator.
6787
6788 2016-08-29 Tom de Vries <tom@codesourcery.com>
6789
6790 * c-common.c (build_va_arg): Fix type comparison assert.
6791
6792 2016-08-29 Tom de Vries <tom@codesourcery.com>
6793
6794 * c-common.c (build_va_arg): Replace first argument type error
6795 with assert.
6796
6797 2016-08-29 Tom de Vries <tom@codesourcery.com>
6798
6799 PR c/77398
6800 * c-common.c (build_va_arg): Add first argument error. Build va_arg
6801 with error_mark_node as va_list instead of with illegal va_list.
6802
6803 2016-08-25 Marek Polacek <polacek@redhat.com>
6804 David Malcolm <dmalcolm@redhat.com>
6805
6806 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
6807 * c-common.h (warn_logical_not_parentheses): Update declaration.
6808
6809 2016-08-22 Marek Polacek <polacek@redhat.com>
6810
6811 PR c++/77321
6812 * c-common.c (warn_for_memset): Check type for null.
6813
6814 2016-08-22 Joseph Myers <joseph@codesourcery.com>
6815
6816 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6817 _FloatNx types for suffixes for built-in functions.
6818
6819 2016-08-19 Joseph Myers <joseph@codesourcery.com>
6820
6821 PR c/32187
6822 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
6823 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
6824 (RID_FLOAT128X): New enum rid values.
6825 (CASE_RID_FLOATN_NX): New macro.
6826 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
6827 keywords.
6828 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
6829 corresponding complex types.
6830 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
6831 _FloatNx and corresponding complex types.
6832 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
6833 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
6834 and _FloatNx types for the widest type for determining
6835 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
6836 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
6837 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
6838 and _FloatNx types.
6839 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
6840 constants.
6841 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
6842 _FloatNx types.
6843
6844 2016-08-18 David Malcolm <dmalcolm@redhat.com>
6845
6846 * c-opts.c (c_diagnostic_finalizer): Update for change to
6847 diagnostic_show_locus.
6848
6849 2016-08-18 David Malcolm <dmalcolm@redhat.com>
6850
6851 * c-common.c: Include "spellcheck.h".
6852 (cb_get_suggestion): New function.
6853 * c-common.h (cb_get_suggestion): New decl.
6854 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
6855 cb_get_suggestion.
6856
6857 2016-08-18 Marek Polacek <polacek@redhat.com>
6858
6859 PR c/71514
6860 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
6861 and pointer-to-VLA.
6862
6863 2016-08-16 David Malcolm <dmalcolm@redhat.com>
6864
6865 PR c/72857
6866 * c-common.c (substring_loc::get_range): Rename to...
6867 (substring_loc::get_location): ...this, converting param from a
6868 source_range * to a location_t *. Call
6869 get_source_location_for_substring rather than
6870 get_source_range_for_substring, and pass in m_caret_idx.
6871 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
6872 (substring_loc::get_range): Replace with...
6873 (substring_loc::get_location): ...this.
6874 (substring_loc::set_caret_index): New method.
6875 (substring_loc): Add field m_caret_idx.
6876 * c-format.c (format_warning_va): Update for above changes.
6877 Rename local "substring_loc" to "fmt_substring_loc" to avoid
6878 clashing with type name.
6879 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
6880 (check_argument_type): Likewise.
6881 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
6882 Use a copy when emitting warnings, setting the caret index from TYPE.
6883
6884 2016-08-16 Eric Botcazou <ebotcazou@adacore.com>
6885 Arnaud Charlet <charlet@adacore.com>
6886
6887 * c-ada-spec.c (dump_number): New function.
6888 (handle_escape_character): Likewise.
6889 (print_ada_macros): Add handling of constant integers and strings.
6890
6891 2016-08-12 Marek Polacek <polacek@redhat.com>
6892
6893 PR c/7652
6894 * c-common.c (scalar_to_vector): Adjust fall through comment.
6895 * c-opts.c (c_common_handle_option): Likewise.
6896 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
6897 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
6898 fall through comment.
6899 * cilk.c (extract_free_variables): Add FALLTHRU.
6900
6901 2016-08-10 Jason Merrill <jason@redhat.com>
6902
6903 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
6904
6905 2016-08-09 Jason Merrill <jason@redhat.com>
6906
6907 * c-common.c (c_common_attribute_table): vector_size affects type
6908 identity.
6909
6910 2016-08-09 Marek Polacek <polacek@redhat.com>
6911
6912 PR c/7652
6913 * c-ada-spec.c (dump_generic_ada_node): Add return.
6914
6915 2016-08-09 Jason Merrill <jason@redhat.com>
6916
6917 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
6918 C++17 constexpr lambdas.
6919
6920 2016-08-08 David Malcolm <dmalcolm@redhat.com>
6921
6922 PR c/64955
6923 * c-common.h (selftest::c_format_c_tests): New declaration.
6924 (selftest::run_c_tests): New declaration.
6925 * c-format.c: Include "selftest.h.
6926 (format_warning_va): Add param "corrected_substring" and use
6927 it to add a replacement fix-it hint.
6928 (format_warning_at_substring): Likewise.
6929 (format_warning_at_char): Update for new param of
6930 format_warning_va.
6931 (argument_parser::check_argument_type): Pass "fki" to
6932 check_format_types.
6933 (check_format_types): Add param "fki" and pass it to
6934 format_type_warning.
6935 (deref_n_times): New function.
6936 (get_modifier_for_format_len): New function.
6937 (selftest::test_get_modifier_for_format_len): New function.
6938 (get_format_for_type): New function.
6939 (format_type_warning): Add param "fki" and use it to attempt
6940 to provide hints for argument types when calling
6941 format_warning_at_substring.
6942 (selftest::get_info): New function.
6943 (selftest::assert_format_for_type_streq): New function.
6944 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
6945 (selftest::test_get_format_for_type_printf): New function.
6946 (selftest::test_get_format_for_type_scanf): New function.
6947 (selftest::c_format_c_tests): New function.
6948
6949 2016-08-08 David Malcolm <dmalcolm@redhat.com>
6950
6951 PR c/52952
6952 * c-format.c: Include "diagnostic.h".
6953 (location_column_from_byte_offset): Delete.
6954 (location_from_offset): Delete.
6955 (format_warning_va): New function.
6956 (format_warning_at_substring): New function.
6957 (format_warning_at_char): New function.
6958 (check_format_arg): Capture location of format_tree and pass to
6959 check_format_info_main.
6960 (argument_parser): Add fields "start_of_this_format" and
6961 "format_string_cst".
6962 (flag_chars_t::validate): Add param "format_string_cst". Convert
6963 warning_at call using location_from_offset to call to
6964 format_warning_at_char.
6965 (argument_parser::argument_parser): Add param "format_string_cst_"
6966 and use use it to initialize field "format_string_cst".
6967 Initialize new field "start_of_this_format".
6968 (argument_parser::read_format_flags): Convert warning_at call
6969 using location_from_offset to a call to format_warning_at_char.
6970 (argument_parser::read_any_format_left_precision): Likewise.
6971 (argument_parser::read_any_format_precision): Likewise.
6972 (argument_parser::read_any_other_modifier): Likewise.
6973 (argument_parser::find_format_char_info): Likewise, in three places.
6974 (argument_parser::parse_any_scan_set): Likewise, in one place.
6975 (argument_parser::handle_conversions): Likewise, in two places.
6976 (argument_parser::check_argument_type): Add param "fmt_param_loc"
6977 and use it to make a substring_loc. Pass the latter to
6978 check_format_types.
6979 (check_format_info_main): Add params "fmt_param_loc" and
6980 "format_string_cst". Convert warning_at calls using
6981 location_from_offset to calls to format_warning_at_char. Pass the
6982 new params to the arg_parser ctor. Pass "format_string_cst" to
6983 flag_chars.validate. Pass "fmt_param_loc" to
6984 arg_parser.check_argument_type.
6985 (check_format_types): Convert first param from a location_t
6986 to a const substring_loc & and rename to "fmt_loc". Attempt
6987 to extract the range of the relevant parameter and pass it
6988 to format_type_warning.
6989 (format_type_warning): Convert first param from a location_t
6990 to a const substring_loc & and rename to "fmt_loc". Add
6991 params "param_range" and "type". Replace calls to warning_at
6992 with calls to format_warning_at_substring.
6993
6994 2016-08-08 David Malcolm <dmalcolm@redhat.com>
6995
6996 * c-format.c (class flag_chars_t): New class.
6997 (struct length_modifier): New struct.
6998 (class argument_parser): New class.
6999 (flag_chars_t::flag_chars_t): New ctor.
7000 (flag_chars_t::has_char_p): New method.
7001 (flag_chars_t::add_char): New method.
7002 (flag_chars_t::validate): New method.
7003 (flag_chars_t::get_alloc_flag): New method.
7004 (flag_chars_t::assignment_suppression_p): New method.
7005 (argument_parser::argument_parser): New ctor.
7006 (argument_parser::read_any_dollar): New method.
7007 (argument_parser::read_format_flags): New method.
7008 (argument_parser::read_any_format_width): New method.
7009 (argument_parser::read_any_format_left_precision): New method.
7010 (argument_parser::read_any_format_precision): New method.
7011 (argument_parser::handle_alloc_chars): New method.
7012 (argument_parser::read_any_length_modifier): New method.
7013 (argument_parser::read_any_other_modifier): New method.
7014 (argument_parser::find_format_char_info): New method.
7015 (argument_parser::validate_flag_pairs): New method.
7016 (argument_parser::give_y2k_warnings): New method.
7017 (argument_parser::parse_any_scan_set): New method.
7018 (argument_parser::handle_conversions): New method.
7019 (argument_parser::check_argument_type): New method.
7020 (check_format_info_main): Introduce classes argument_parser
7021 and flag_chars_t, moving the code within the loop into methods
7022 of these classes. Make various locals "const".
7023
7024 2016-08-05 David Malcolm <dmalcolm@redhat.com>
7025
7026 * c-common.c: Include "substring-locations.h".
7027 (get_cpp_ttype_from_string_type): New function.
7028 (g_string_concat_db): New global.
7029 (substring_loc::get_range): New method.
7030 * c-common.h (g_string_concat_db): New declaration.
7031 (class substring_loc): New class.
7032 * c-lex.c (lex_string): When concatenating strings, capture the
7033 locations of all tokens using a new obstack, and record the
7034 concatenation locations within g_string_concat_db.
7035 * c-opts.c (c_common_init_options): Construct g_string_concat_db
7036 on the ggc-heap.
7037
7038 2016-07-29 Marek Polacek <polacek@redhat.com>
7039
7040 PR c/71926
7041 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
7042 parentheses warning.
7043
7044 PR c/71574
7045 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
7046
7047 2016-07-28 Martin Liska <mliska@suse.cz>
7048
7049 PR gcov-profile/68025
7050 * c-common.c (handle_no_profile_instrument_function_attribute):
7051
7052 2016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
7053
7054 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
7055 BITS_PER_UNIT_LOG.
7056
7057 2016-07-25 Jason Merrill <jason@redhat.com>
7058
7059 PR c++/65970
7060 * c.opt (fconstexpr-loop-limit): New.
7061
7062 2016-07-22 Martin Sebor <msebor@redhat.com>
7063
7064 PR c++/71675
7065 * c-common.c (resolve_overloaded_builtin): Avoid converting
7066 __atomic_compare_exchange_n return type to that of what its
7067 first argument points to.
7068
7069 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
7070
7071 * c-common.c: Use HOST_WIDE_INT_M1U instead of
7072 ~(unsigned HOST_WIDE_INT) 0.
7073
7074 2016-07-22 Martin Liska <mliska@suse.cz>
7075
7076 PR gcov-profile/69028
7077 PR gcov-profile/62047
7078 * cilk.c (create_cilk_helper_decl): Set location of a new decl
7079 to the current_function_decl.
7080
7081 2016-07-21 Jason Merrill <jason@redhat.com>
7082
7083 PR c++/65168
7084 * c-common.c (c_common_truthvalue_conversion): Check
7085 c_inhibit_evaluation_warnings for warning about address of
7086 reference.
7087
7088 2016-07-20 David Malcolm <dmalcolm@redhat.com>
7089
7090 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
7091 const char *.
7092
7093 2016-07-15 Jason Merrill <jason@redhat.com>
7094
7095 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
7096
7097 2016-07-15 Jakub Jelinek <jakub@redhat.com>
7098
7099 PR c/71858
7100 * c-common.h (enum lookup_name_fuzzy_kind): Add
7101 FUZZY_LOOKUP_FUNCTION_NAME.
7102
7103 2016-07-08 Jason Merrill <jason@redhat.com>
7104
7105 P0145: Refining Expression Order for C++.
7106 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
7107 * c-opts.c: Adjust.
7108
7109 2016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
7110
7111 PR c++/71214
7112 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
7113
7114 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
7115
7116 * c-pragma.h (enum pragma_kind): Rename
7117 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
7118 users.
7119
7120 2016-06-29 Richard Biener <rguenther@suse.de>
7121
7122 PR middle-end/71002
7123 * c-common.c (c_common_get_alias_set): Remove union type punning case.
7124
7125 2016-06-24 Jason Merrill <jason@redhat.com>
7126
7127 P0145R2: Refining Expression Order for C++.
7128 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
7129 MODIFY_EXPR.
7130
7131 2016-06-24 Jakub Jelinek <jakub@redhat.com>
7132
7133 * c-common.c (check_builtin_function_arguments): Require last
7134 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
7135 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
7136 if the last argument is pointer to enumerated or boolean type.
7137
7138 2016-06-22 David Malcolm <dmalcolm@redhat.com>
7139
7140 PR c/70339
7141 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
7142 (lookup_name_fuzzy): New prototype.
7143
7144 2016-06-21 John David Anglin <danglin@gcc.gnu.org>
7145
7146 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
7147
7148 2016-06-14 Jason Merrill <jason@redhat.com>
7149
7150 P0145R2: Refining Expression Order for C++.
7151 * c.opt (fargs-in-order): New.
7152 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
7153
7154 2016-06-13 Jakub Jelinek <jakub@redhat.com>
7155
7156 PR sanitizer/71498
7157 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
7158 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
7159
7160 PR preprocessor/71183
7161 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
7162 to cb_get_source_date_epoch.
7163
7164 2016-06-10 Jakub Jelinek <jakub@redhat.com>
7165
7166 PR c/68657
7167 * c.opt (Wpsabi): Add Warning flag.
7168
7169 2016-06-10 Martin Sebor <msebor@redhat.com>
7170
7171 PR c/71392
7172 * c-common.c (handle_nonnull_attribute): Accept
7173 the nonnull attribute in type-generic builtins.
7174
7175 2016-06-09 Martin Sebor <msebor@redhat.com>
7176
7177 PR c/70883
7178 * c-common.c (builtin_function_validate_nargs): Make text of error
7179 message consistent with others like it.
7180
7181 2016-06-08 Martin Sebor <msebor@redhat.com>
7182 Jakub Jelinek <jakub@redhat.com>
7183
7184 PR c++/70507
7185 PR c/68120
7186 * c-common.c (check_builtin_function_arguments): Handle
7187 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
7188
7189 2016-06-08 Richard Biener <rguenther@suse.de>
7190
7191 * c-common.c (parse_optimize_options): Improve diagnostic messages.
7192
7193 2016-06-07 Richard Biener <rguenther@suse.de>
7194
7195 PR c/61564
7196 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
7197 options and warn about others.
7198
7199 2016-06-01 Eduard Sanou <dhole@openmailbox.org>
7200
7201 * c-common.c (get_source_date_epoch): Rename to
7202 cb_get_source_date_epoch.
7203 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
7204 message when the parsing fails. Use error_at instead of fatal_error.
7205 * c-common.h (get_source_date_epoch): Rename to
7206 cb_get_source_date_epoch.
7207 * c-common.h (cb_get_source_date_epoch): Prototype.
7208 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
7209 * c-common.h (c_omp_region_type): Remove trailing comma.
7210 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
7211 * c-lex.c (c_lex_with_flags): Remove initialization of
7212 pfile->source_date_epoch.
7213
7214 2016-05-30 Jakub Jelinek <jakub@redhat.com>
7215
7216 PR c++/71349
7217 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
7218 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
7219 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
7220 instead of C_OMP_CLAUSE_SPLIT_FOR.
7221
7222 2016-05-24 Richard Biener <rguenther@suse.de>
7223
7224 PR middle-end/70434
7225 PR c/69504
7226 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
7227 (convert_vector_to_array_for_subscript): ... this.
7228 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
7229 VIEW_CONVERT_EXPR to an array type. Rename to ...
7230 (convert_vector_to_array_for_subscript): ... this.
7231
7232 2016-05-12 Marek Polacek <polacek@redhat.com>
7233
7234 PR c/70756
7235 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
7236 size_in_bytes and pass LOC to it.
7237
7238 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
7239
7240 PR c/43651
7241 * c.opt (Wduplicate-decl-specifier): New option.
7242
7243 2016-05-11 Marek Polacek <polacek@redhat.com>
7244
7245 PR c++/71024
7246 * c-common.c (diagnose_mismatched_attributes): New function.
7247 * c-common.h (diagnose_mismatched_attributes): Declare.
7248
7249 2016-05-04 Marek Polacek <polacek@redhat.com>
7250
7251 * c.opt (Wdangling-else): New option.
7252
7253 2016-05-03 Marek Polacek <polacek@redhat.com>
7254
7255 PR c/70859
7256 * c-common.c (builtin_function_validate_nargs): Add location
7257 parameter. Use it.
7258 (check_builtin_function_arguments): Add location and arguments
7259 parameters. Use them.
7260 * c-common.h (check_builtin_function_arguments): Update declaration.
7261
7262 2016-05-03 Richard Biener <rguenther@suse.de>
7263
7264 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
7265 allow call args to gimplify to SSA names.
7266
7267 2016-05-03 Marek Polacek <polacek@redhat.com>
7268
7269 * c-common.h (enum c_omp_region_type): Remove stray comma.
7270
7271 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
7272
7273 * c-common.h (enum c_omp_region_type): Define.
7274
7275 2016-05-02 Richard Sandiford <richard.sandiford@arm.com>
7276
7277 * c-common.c (shorten_compare): Use wi::to_wide.
7278
7279 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
7280
7281 PR middle-end/70626
7282 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
7283 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
7284 reduction clauses in acc parallel loops.
7285
7286 2016-04-29 Marek Polacek <polacek@redhat.com>
7287
7288 PR c/70852
7289 * c-common.c (warn_for_memset): Check domain before accessing it.
7290
7291 2016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
7292
7293 PR/69089
7294 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
7295 "aligned" attribute.
7296
7297 2016-04-28 Jason Merrill <jason@redhat.com>
7298
7299 * c-lex.c (c_common_has_attribute): Handle nodiscard.
7300
7301 2016-04-28 Eduard Sanou <dhole@openmailbox.org>
7302 Matthias Klose <doko@debian.org>
7303
7304 * c-common.c (get_source_date_epoch): New function, gets the environment
7305 variable SOURCE_DATE_EPOCH and parses it as long long with error
7306 handling.
7307 * c-common.h (get_source_date_epoch): Prototype.
7308 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
7309
7310 2015-04-27 Ryan Burn <contact@rnburn.com>
7311
7312 PR c++/69024
7313 PR c++/68997
7314 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
7315 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
7316 external linkage.
7317 (cilk_detect_and_unwrap): Corresponding changes.
7318 (extract_free_variables): Don't extract free variables from
7319 AGGR_INIT_EXPR slot.
7320 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
7321 (cilk_recognize_spawn): Likewise.
7322
7323 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
7324
7325 * c.opt (Wmemset-elt-size): New option.
7326 * c-common.c (warn_for_memset): New function.
7327 * c-common.h (warn_for_memset): Declare.
7328
7329 2016-04-25 Jason Merrill <jason@redhat.com>
7330
7331 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
7332 No longer static.
7333 * c-common.h: Declare it.
7334 * c-lex.c (c_common_has_attribute): Add maybe_unused.
7335
7336 2016-04-22 Jason Merrill <jason@redhat.com>
7337
7338 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
7339
7340 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
7341
7342 PR c++/69363
7343 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
7344 * c-common.h (c_finish_cilk_clauses): Remove declaration.
7345
7346 2016-04-18 Michael Matz <matz@suse.de>
7347
7348 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
7349 and SET_DECL_ALIGN.
7350
7351 2016-04-17 Eric Botcazou <ebotcazou@adacore.com>
7352
7353 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
7354 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
7355 to incomplete types.
7356 (dump_nested_type): Remove redundant tests and tidy up.
7357 (print_ada_declaration): Also set TREE_VISITED on the declaration of
7358 a type which is the typedef of an original type.
7359
7360 2016-04-15 Marek Polacek <polacek@redhat.com>
7361
7362 PR c/70651
7363 * c-common.c (build_va_arg): Change two asserts into errors and return
7364 error_mark_node.
7365
7366 2016-04-13 Marek Polacek <polacek@redhat.com>
7367
7368 PR c++/70639
7369 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
7370 for switch statements, too.
7371
7372 2016-03-28 Jason Merrill <jason@redhat.com>
7373
7374 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
7375
7376 2016-03-23 Marek Polacek <polacek@redhat.com>
7377
7378 PR c++/69884
7379 * c.opt (Wignored-attributes): New option.
7380
7381 2016-03-22 David Malcolm <dmalcolm@redhat.com>
7382
7383 PR c/69993
7384 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
7385 diagnostic text, reversing the order of the warning and note so
7386 that they appear in source order.
7387
7388 2016-03-17 Marek Polacek <polacek@redhat.com>
7389
7390 PR c/69407
7391 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
7392 operations.
7393
7394 2016-03-14 Jason Merrill <jason@redhat.com>
7395
7396 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
7397
7398 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
7399
7400 2016-03-09 Richard Biener <rguenther@suse.de>
7401
7402 PR c/70143
7403 * c-common.c (strict_aliasing_warning): Add back
7404 alias_sets_conflict_p check.
7405
7406 2016-03-08 Jason Merrill <jason@redhat.com>
7407
7408 * c-opts.c (set_std_cxx1z): Don't enable concepts.
7409
7410 2016-03-04 David Malcolm <dmalcolm@redhat.com>
7411
7412 PR c/68187
7413 * c-indentation.c (get_visual_column): Move code to determine next
7414 tab stop to...
7415 (next_tab_stop): ...this new function.
7416 (line_contains_hash_if): Delete function.
7417 (detect_preprocessor_logic): Delete function.
7418 (get_first_nws_vis_column): New function.
7419 (detect_intervening_unindent): New function.
7420 (should_warn_for_misleading_indentation): Replace call to
7421 detect_preprocessor_logic with a call to
7422 detect_intervening_unindent.
7423
7424 2016-03-04 David Malcolm <dmalcolm@redhat.com>
7425
7426 PR c/68187
7427 * c-indentation.c (should_warn_for_misleading_indentation): When
7428 suppressing warnings about cases where the guard and body are on
7429 the same column, only use the first non-whitespace column in place
7430 of the guard token column when dealing with "else" clauses.
7431 When rejecting aligned BODY and NEXT, loosen the requirement
7432 from equality with the first non-whitespace of guard to simply
7433 that they not be indented relative to it.
7434
7435 2016-03-04 Richard Biener <rguenther@suse.de>
7436
7437 PR c++/70054
7438 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
7439 instead of alias_sets_conflict_p.
7440
7441 2016-03-01 Marek Polacek <polacek@redhat.com>
7442
7443 PR c++/69795
7444 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
7445 any DECL.
7446
7447 2016-02-22 Martin Sebor <msebor@redhat.com>
7448
7449 PR middle-end/69780
7450 * c-common.c (check_builtin_function_arguments): Validate and
7451 reject invalid arguments to __builtin_alloca_with_align.
7452
7453 2016-02-20 Mark Wielaard <mjw@redhat.com>
7454
7455 PR c/28901
7456 * c.opt (Wunused-const-variable): Turn into Alias for...
7457 (Wunused-const-variable=): New option.
7458
7459 2016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
7460
7461 PR c++/69865
7462 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
7463 here...
7464 (c_common_init_options): ...to here.
7465 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
7466
7467 2016-02-19 Jakub Jelinek <jakub@redhat.com>
7468
7469 PR c++/69826
7470 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
7471 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
7472 flag_preprocess_only.
7473
7474 2016-02-16 Jakub Jelinek <jakub@redhat.com>
7475
7476 PR c/69835
7477 * c.opt (Wnonnull-compare): Enable for -Wall.
7478
7479 2016-02-15 Jakub Jelinek <jakub@redhat.com>
7480
7481 PR c++/69797
7482 * c-common.c (sync_resolve_size): Diagnose too few arguments
7483 even when params is non-NULL empty vector.
7484
7485 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
7486
7487 PR target/60410
7488 * c.opt (fshort-double): Remove.
7489
7490 2016-02-05 Martin Sebor <msebor@redhat.com>
7491
7492 PR c++/69662
7493 * c.opt (Warning options): Update -Wplacement-new to take
7494 an optional argument.
7495
7496 2016-02-01 Jakub Jelinek <jakub@redhat.com>
7497
7498 PR preprocessor/69543
7499 PR c/69558
7500 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
7501 instead of loc to control_warning_option.
7502
7503 2016-02-01 Nathan Sidwell <nathan@codesourcery.com>
7504
7505 * c.opt (fopenacc-dim=): New option.
7506
7507 2016-01-27 Ryan Burn <contact@rnburn.com>
7508
7509 PR cilkplus/69267
7510 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
7511 gimplify_arg. Removed superfluous post_p argument.
7512 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
7513 superfluous post_p argument.
7514 * c-gimplify.c (c_gimplify_expr): Likewise.
7515
7516 2016-01-26 David Malcolm <dmalcolm@redhat.com>
7517
7518 PR other/69006
7519 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
7520 pp_newline_and_flush with pp_flush.
7521
7522 2016-01-20 Martin Sebor <msebor@redhat.com>
7523
7524 PR c/69405
7525 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
7526 an incompatible argument when the argument isn't a valid tree node.
7527
7528 2016-01-18 Jason Merrill <jason@redhat.com>
7529
7530 PR c++/68767
7531 * c-common.c (check_function_arguments_recurse): Fold the whole
7532 COND_EXPR, not just the condition.
7533
7534 2016-01-18 Tom de Vries <tom@codesourcery.com>
7535
7536 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
7537 classify as loop clause.
7538
7539 2016-01-15 Jakub Jelinek <jakub@redhat.com>
7540
7541 PR bootstrap/68271
7542 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
7543 C++ FE no longer has limit on number of pragmas.
7544
7545 2015-01-14 Ryan Burn <contact@rnburn.com>
7546
7547 PR c++/69048
7548 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
7549 to add missing cleanup point.
7550
7551 2016-01-14 David Malcolm <dmalcolm@redhat.com>
7552
7553 PR c++/68819
7554 * c-indentation.c (get_visual_column): Add location_t param.
7555 Handle the column number being zero by effectively disabling the
7556 warning, with an "inform".
7557 (should_warn_for_misleading_indentation): Add location_t argument
7558 for all uses of get_visual_column.
7559
7560 2016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
7561
7562 PR c++/69029
7563 * c-indentation.c (should_warn_for_misleading_indentation):
7564 Don't warn about do-while statements.
7565
7566 2016-01-07 Martin Sebor <msebor@redhat.com>
7567
7568 PR c/68966
7569 * c-common.c (sync_resolve_size): Reject first argument when it's
7570 a pointer to _Bool.
7571
7572 2016-01-05 David Malcolm <dmalcolm@redhat.com>
7573
7574 PR c/69122
7575 * c-indentation.c (get_visual_column): Remove default argument.
7576 (should_warn_for_misleading_indentation): For the multiline case,
7577 update call to get_visual_column for next_stmt_exploc so that it
7578 captures the location of the first non-whitespace character in the
7579 relevant line. Don't issue warnings if there is non-whitespace
7580 before the next statement.
7581
7582 2016-01-04 Jakub Jelinek <jakub@redhat.com>
7583
7584 Update copyright years.
7585
7586 2015-12-21 David Malcolm <dmalcolm@redhat.com>
7587
7588 * c-common.c (binary_op_error): Convert first param from
7589 location_t to rich_location * and use it when emitting an error.
7590 * c-common.h (binary_op_error): Convert first param from
7591 location_t to rich_location *.
7592
7593 2015-12-16 David Malcolm <dmalcolm@redhat.com>
7594
7595 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
7596 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
7597
7598 2015-12-15 Ilya Verbin <ilya.verbin@intel.com>
7599
7600 * c-common.c (c_common_attribute_table): Handle "omp declare target
7601 link" attribute.
7602
7603 2015-12-14 Jakub Jelinek <jakub@redhat.com>
7604
7605 PR c/68833
7606 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
7607
7608 2014-12-12 Tobias Burnus <burnus@net-b.de>
7609
7610 PR fortran/68815
7611 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
7612 specifiers (%d, %i,%u and %c).
7613
7614 2015-12-10 David Malcolm <dmalcolm@redhat.com>
7615
7616 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
7617
7618 2015-12-08 Jakub Jelinek <jakub@redhat.com>
7619
7620 PR c/48088
7621 PR c/68657
7622 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
7623 * c-pragma.c (handle_pragma_diagnostic): Adjust
7624 control_warning_option caller.
7625
7626 2015-12-07 David Malcolm <dmalcolm@redhat.com>
7627
7628 * c-common.c (c_cpp_error): Update for change to
7629 rich_location::set_range.
7630
7631 2015-12-04 Paolo Bonzini <bonzini@gnu.org>
7632
7633 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
7634 shifting 1 out of the sign bit.
7635
7636 2015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
7637
7638 * c-common.c (c_common_attribute_table[]): Update max arguments
7639 count for "simd" attribute.
7640 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
7641
7642 2015-12-03 Jakub Jelinek <jakub@redhat.com>
7643
7644 PR preprocessor/57580
7645 * c-ppoutput.c (print): Change printed field to bool.
7646 Move src_file last for smaller padding.
7647 (init_pp_output): Set print.printed to false instead of 0.
7648 (scan_translation_unit): Fix up formatting. Set print.printed
7649 to true after printing something other than newline.
7650 (scan_translation_unit_trad): Set print.printed to true instead of 1.
7651 (maybe_print_line_1): Set print.printed to false instead of 0.
7652 (print_line_1): Likewise.
7653 (do_line_change): Set print.printed to true instead of 1.
7654 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
7655 dump_macro): Set print.printed to false after printing newline.
7656
7657 2015-12-02 Jason Merrill <jason@redhat.com>
7658
7659 * c-common.c (fold_for_warn): New.
7660 (warn_logical_operator, warn_tautological_cmp)
7661 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
7662
7663 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
7664 (c_fully_fold_internal, decl_constant_value_for_optimization):
7665 Move to c/c-fold.c.
7666 * c-common.h: Don't declare decl_constant_value_for_optimization.
7667
7668 2015-12-02 Joseph Myers <joseph@codesourcery.com>
7669
7670 PR c/68162
7671 * c-common.h (c_build_qualified_type): Add extra default
7672 arguments.
7673
7674 2015-12-01 Julian Brown <julian@codesourcery.com>
7675 Cesar Philippidis <cesar@codesourcery.com>
7676 James Norris <James_Norris@mentor.com>
7677
7678 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
7679 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
7680 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
7681
7682 2015-11-30 Eric Botcazou <ebotcazou@adacore.com>
7683
7684 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
7685 (decl_sloc_common): Delete and move bulk of processing to...
7686 (decl_sloc): ...here.
7687 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
7688 (dump_ada_double_name): Remove S parameter and compute the suffix.
7689 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
7690 element type and deal with an anonymous one.
7691 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
7692 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
7693 and remove reference to QUAL_UNION_TYPE.
7694 (dump_nested_types): Make 2 passes on the fields and move bulk to...
7695 (dump_nested_type): ...here. New function extracted from above.
7696 Generate a full declaration for anonymous element type of arrays.
7697 (print_ada_declaration): Really skip anonymous declarations. Remove
7698 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
7699 Clean up processing of declarations of array types and objects.
7700 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
7701 Remove obsolete code and tidy up.
7702
7703 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
7704
7705 PR c/67581
7706 * c-common.c (handle_transparent_union_attribute): Update
7707 also type variants.
7708
7709 2015-11-27 Martin Liska <mliska@suse.cz>
7710
7711 PR c++/68312
7712 * array-notation-common.c (cilkplus_extract_an_triplets):
7713 Release vector of vectors.
7714 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
7715
7716 2015-11-26 Eric Botcazou <ebotcazou@adacore.com>
7717
7718 PR c++/68527
7719 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
7720 (print_ada_struct_decl): Likewise.
7721
7722 2015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
7723
7724 PR c++/68001
7725 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
7726 * cilk.c (recognize_spawn): Determine location in a more precise
7727 way.
7728
7729 2015-11-19 Jason Merrill <jason@redhat.com>
7730
7731 * c-common.c (shorten_compare): But look through macros from
7732 system headers.
7733
7734 2015-11-18 Jason Merrill <jason@redhat.com>
7735
7736 * c-common.c (shorten_compare): Don't -Wtype-limits if the
7737 non-constant operand comes from a macro.
7738
7739 2015-11-17 Jason Merrill <jason@redhat.com>
7740
7741 PR bootstrap/68346
7742 * c-common.c (warn_tautological_cmp): Fold before checking for
7743 constants.
7744
7745 2015-11-16 Marek Polacek <polacek@redhat.com>
7746
7747 PR c++/68362
7748 * c-common.c (check_case_bounds): Fold low and high cases.
7749
7750 2015-11-16 Marek Polacek <polacek@redhat.com>
7751
7752 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
7753 * c-common.c (c_common_get_alias_set): Likewise.
7754 (handle_visibility_attribute): Likewise.
7755
7756 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
7757
7758 * c-common.c (handle_simd_attribute): New.
7759 (struct attribute_spec): Add entry for "simd".
7760 (handle_simd_attribute): New.
7761
7762 2015-11-13 Kai Tietz <ktietz70@googlemail.com>
7763
7764 * c-lex.c (interpret_float): Use fold_convert.
7765
7766 2015-11-13 David Malcolm <dmalcolm@redhat.com>
7767
7768 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
7769 and store it on the result.
7770 * c-opts.c (c_common_init_options): Set
7771 global_dc->colorize_source_p.
7772
7773 2015-11-12 James Norris <jnorris@codesourcery.com>
7774 Joseph Myers <joseph@codesourcery.com>
7775
7776 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
7777 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
7778 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
7779 PRAGMA_OACC_CLAUSE_LINK.
7780
7781 2015-11-11 Marek Polacek <polacek@redhat.com>
7782
7783 PR c/68107
7784 PR c++/68266
7785 * c-common.c (valid_array_size_p): New function.
7786 * c-common.h (valid_array_size_p): Declare.
7787
7788 2015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
7789
7790 PR bootstrap/68271
7791 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
7792
7793 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
7794
7795 * array-notation-common.c: Remove unused header files.
7796 * c-ada-spec.c: Likewise.
7797 * c-cilkplus.c: Likewise.
7798 * c-common.c: Likewise.
7799 * c-cppbuiltin.c: Likewise.
7800 * c-dump.c: Likewise.
7801 * c-format.c: Likewise.
7802 * c-gimplify.c: Likewise.
7803 * c-indentation.c: Likewise.
7804 * c-lex.c: Likewise.
7805 * c-omp.c: Likewise.
7806 * c-opts.c: Likewise.
7807 * c-pch.c: Likewise.
7808 * c-ppoutput.c: Likewise.
7809 * c-pragma.c: Likewise.
7810 * c-pretty-print.c: Likewise.
7811 * c-semantics.c: Likewise.
7812 * c-ubsan.c: Likewise.
7813 * cilk.c: Likewise.
7814 * stub-objc.c: Likewise.
7815
7816 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
7817 Cesar Philippidis <cesar@codesourcery.com>
7818 James Norris <jnorris@codesourcery.com>
7819 Julian Brown <julian@codesourcery.com>
7820 Nathan Sidwell <nathan@codesourcery.com>
7821
7822 * c-pragma.c (oacc_pragmas): Add "routine".
7823 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
7824
7825 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
7826
7827 * c-common.c (c_common_attributes): Add scalar_storage_order.
7828 (handle_scalar_storage_order_attribute): New function.
7829 * c-pragma.c (global_sso): New variable.
7830 (maybe_apply_pragma_scalar_storage_order): New function.
7831 (handle_pragma_scalar_storage_order): Likewise.
7832 (init_pragma): Register scalar_storage_order.
7833 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
7834 * c.opt (Wscalar-storage-order): New warning.
7835 (fsso-struct=): New option.
7836
7837 2015-11-08 Martin Sebor <msebor@redhat.com>
7838
7839 * c.opt (Wplacement-new): Add a period to the end of a sentence.
7840
7841 2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
7842
7843 * c-common.c: Don't undef DEF_BUILTIN.
7844
7845 2015-11-06 David Malcolm <dmalcolm@redhat.com>
7846
7847 * c-common.c (c_cpp_error): Convert parameter from location_t to
7848 rich_location *. Eliminate the "column_override" parameter and
7849 the call to diagnostic_override_column.
7850 Update the "done_lexing" clause to set range 0
7851 on the rich_location, rather than overwriting a location_t.
7852 * c-common.h (c_cpp_error): Convert parameter from location_t to
7853 rich_location *. Eliminate the "column_override" parameter.
7854
7855 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
7856 Thomas Schwinge <thomas@codesourcery.com>
7857 James Norris <jnorris@codesourcery.com>
7858
7859 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
7860 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
7861 clauses with parallel and kernels and loops.
7862 * c-pragma.h (enum pragma_omp_clause): Add entries for
7863 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
7864 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
7865 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
7866 INDEPENDENT,SEQ}.
7867 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
7868
7869 2015-11-05 Martin Sebor <msebor@redhat.com>
7870
7871 PR c++/67942
7872 * c.opt (-Wplacement-new): New option.
7873
7874 2015-11-05 Jakub Jelinek <jakub@redhat.com>
7875
7876 * c-common.h (c_finish_omp_atomic): Add TEST argument.
7877 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
7878 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
7879 save_expr or create_tmp_var* if TEST is true.
7880 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
7881 Don't call add_stmt here.
7882 (struct c_omp_check_loop_iv_data): New type.
7883 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
7884 c_omp_check_loop_iv_exprs): New functions.
7885 (c_omp_split_clauses): Adjust for lastprivate being allowed on
7886 distribute.
7887 (c_omp_declare_simd_clauses_to_numbers): Change
7888 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
7889 (c_omp_declare_simd_clauses_to_decls): Similarly change those
7890 from numbers to PARM_DECLs.
7891
7892 2015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
7893
7894 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
7895 flag_checking.
7896
7897 2015-11-03 Bernd Schmidt <bschmidt@redhat.com>
7898
7899 PR c++-common/67882
7900 * c-common.h (fold_offsetof_1): Add argument.
7901 * c-common.c (fold_offsetof_1): Diagnose more invalid
7902 offsetof expressions that reference elements past the end of
7903 an array.
7904
7905 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
7906 Chung-Lin Tang <cltang@codesourcery.com>
7907
7908 * c-pragma.c (oacc_pragmas): Add "atomic".
7909 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
7910
7911 2015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
7912
7913 * c-common.c (handle_target_clones_attribute): New.
7914 (c_common_attribute_table): Add handle_target_clones_attribute.
7915 (handle_always_inline_attribute): Add check on target_clones attribute.
7916 (handle_target_attribute): Ditto.
7917
7918 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
7919
7920 * array-notation-common.c: Reorder #include's and remove duplicates.
7921 * c-ada-spec.c: Likewise.
7922 * c-cilkplus.c: Likewise.
7923 * c-common.c: Likewise.
7924 * c-cppbuiltin.c: Likewise.
7925 * c-dump.c: Likewise.
7926 * c-format.c: Likewise.
7927 * c-gimplify.c: Likewise.
7928 * c-indentation.c: Likewise.
7929 * c-lex.c: Likewise.
7930 * c-omp.c: Likewise.
7931 * c-opts.c: Likewise.
7932 * c-pch.c: Likewise.
7933 * c-ppoutput.c: Likewise.
7934 * c-pragma.c: Likewise.
7935 * c-pretty-print.c: Likewise.
7936 * c-semantics.c: Likewise.
7937 * c-ubsan.c: Likewise.
7938 * cilk.c: Likewise.
7939 * stub-objc.c: Likewise.
7940
7941 2015-10-28 Jason Merrill <jason@redhat.com>
7942
7943 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
7944
7945 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
7946 James Norris <jnorris@codesourcery.com>
7947 Cesar Philippidis <cesar@codesourcery.com>
7948
7949 PR c/64765
7950 PR c/64880
7951 * c-common.h (c_oacc_split_loop_clauses): Declare function.
7952 * c-omp.c (c_oacc_split_loop_clauses): New function.
7953
7954 2015-10-21 Martin Sebor <msebor@redhat.com>
7955
7956 PR driver/68043
7957 * c.opt: End each sentence that describes an option with a period.
7958
7959 2015-10-20 Marek Polacek <polacek@redhat.com>
7960
7961 * array-notation-common.c (is_cilkplus_vector_p): Define.
7962 * c-common.h (is_cilkplus_vector_p): Declare.
7963
7964 2015-10-20 Marek Polacek <polacek@redhat.com>
7965
7966 * c.opt (std=gnu++11): Do not describe as experimental.
7967 (std=gnu++14): Likewise.
7968
7969 2015-10-19 Jason Merrill <jason@redhat.com>
7970
7971 * c-cppbuiltin.c (c_cpp_builtins): Define
7972 __cpp_nontype_template_args.
7973
7974 2015-10-19 Jason Merrill <jason@redhat.com>
7975
7976 * c-cppbuiltin.c (c_cpp_builtins): Define
7977 __cpp_enumerator_attributes, __cpp_fold_expressions,
7978 __cpp_unicode_characters.
7979
7980 2015-10-13 Jakub Jelinek <jakub@redhat.com>
7981 Aldy Hernandez <aldyh@redhat.com>
7982
7983 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
7984 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
7985 (c_define_builtins): Likewise.
7986 * c-common.h (enum c_omp_clause_split): Add
7987 C_OMP_CLAUSE_SPLIT_TASKLOOP.
7988 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
7989 (c_finish_omp_for): Add ORIG_DECLV argument.
7990 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
7991 201511 instead of 201307.
7992 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
7993 OMP_CRITICAL_CLAUSES to it.
7994 (c_finish_omp_ordered): Add CLAUSES argument, set
7995 OMP_ORDERED_CLAUSES to it.
7996 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
7997 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
7998 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
7999 constructs and new OpenMP 4.5 clauses. Clear
8000 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
8001 verification code.
8002 * c-pragma.c (omp_pragmas_simd): Add taskloop.
8003 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
8004 (enum pragma_omp_clause): Add
8005 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
8006 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
8007
8008 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
8009
8010 * c-lex.c (interpret_float): Use real_equal instead of
8011 REAL_VALUES_EQUAL.
8012
8013 2015-10-04 Jason Merrill <jason@redhat.com>
8014
8015 Implement N4514, C++ Extensions for Transactional Memory.
8016 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
8017 (c_common_attribute_table): Add transaction_safe_dynamic.
8018 transaction_safe now affects type identity.
8019 (handle_tm_attribute): Handle transaction_safe_dynamic.
8020 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
8021 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
8022 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
8023 (D_TRANSMEM): New.
8024 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
8025 * c-pretty-print.c (pp_c_attributes_display): Don't print
8026 transaction_safe in C++.
8027
8028 2015-10-02 Marek Polacek <polacek@redhat.com>
8029
8030 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
8031
8032 2015-10-02 Marek Polacek <polacek@redhat.com>
8033
8034 PR c/64249
8035 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
8036 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
8037 * c.opt (Wduplicated-cond): New option.
8038
8039 2015-10-01 Joseph Myers <joseph@codesourcery.com>
8040
8041 * c.opt (std=c11): Do not describe as experimental.
8042 (std=gnu11): Likewise.
8043 (std=iso9899:2011): Likewise.
8044
8045 2015-09-28 Nathan Sidwell <nathan@codesourcery.com>
8046
8047 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
8048 (DEF_FUNCTION_TYPE_VAR_11): Delete.
8049
8050 2015-09-25 Marek Polacek <polacek@redhat.com>
8051
8052 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
8053 (ubsan_instrument_shift): Likewise.
8054
8055 2015-09-25 Marek Polacek <polacek@redhat.com>
8056
8057 PR sanitizer/64906
8058 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
8059
8060 2015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
8061
8062 * c-indentation.c (should_warn_for_misleading_indentation):
8063 Compare next_stmt_vis_column with guard_line_first_nws instead
8064 of with guard_line_vis_column.
8065
8066 2015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
8067
8068 PR c/49654
8069 PR c/49655
8070 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
8071 options and options not valid for the current language.
8072
8073 2015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
8074
8075 * c-indentation.c (should_warn_for_misleading_indentation):
8076 Float out and consolidate the calls to get_visual_column that
8077 are passed guard_exploc as an argument. Compare
8078 next_stmt_vis_column with guard_line_first_nws instead of with
8079 body_line_first_nws.
8080
8081 2015-09-22 Nathan Sidwell <nathan@codesourcery.com>
8082
8083 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
8084 Wnamespaces): New C++ warnings.
8085
8086 2015-09-22 Jason Merrill <jason@redhat.com>
8087
8088 * c-common.h (abi_compat_version_crosses): New.
8089 (warn_abi_version): Declare.
8090 * c-common.c: Define it.
8091 * c-opts.c (c_common_post_options): Handle it.
8092 flag_abi_compat_version defaults to 8.
8093
8094 2015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
8095
8096 Complete the implementation of N4230, Nested namespace definition.
8097 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
8098 __cpp_nested_namespace_definitions.
8099
8100 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8101
8102 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
8103
8104 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8105
8106 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
8107 when warning.
8108 * c-pragma.h (pragma_lex): Add optional loc argument.
8109
8110 2015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
8111
8112 * c-format.c (check_format_arg): Adjust to use common block size in all
8113 object pools.
8114
8115 2015-09-15 David Malcolm <dmalcolm@redhat.com>
8116
8117 * c-format.c (location_from_offset): Update for change in
8118 signature of location_get_source_line.
8119 * c-indentation.c (get_visual_column): Likewise.
8120 (line_contains_hash_if): Likewise.
8121
8122 2015-09-14 Marek Polacek <polacek@redhat.com>
8123
8124 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
8125 setting various warnings.
8126
8127 2015-09-14 Marek Polacek <polacek@redhat.com>
8128
8129 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
8130 a negative value.
8131
8132 2015-09-11 Mark Wielaard <mjw@redhat.com>
8133
8134 PR c/28901
8135 * c.opt (Wunused-variable): Option from common.opt.
8136 (Wunused-const-variable): New option.
8137
8138 2015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
8139
8140 PR c++/53184
8141 * c.opt ([Wsubobject-linkage]): Add.
8142
8143 2015-09-03 Martin Sebor <msebor@redhat.com>
8144
8145 PR c/66516
8146 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
8147 functions.
8148 * c-common.c (reject_gcc_builtin): Define.
8149
8150 2015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
8151
8152 PR middle-end/60586
8153 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
8154 prototype.
8155 * c-gimplify.c (c_gimplify_expr): Added a call to the function
8156 cilk_gimplify_call_params_in_spawned_fn.
8157 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
8158 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
8159 unwrapping.
8160
8161 2015-08-25 Marek Polacek <polacek@redhat.com>
8162
8163 PR middle-end/67330
8164 * c-common.c (handle_weak_attribute): Don't check whether the
8165 visibility can be changed here.
8166
8167 2015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8168
8169 * c-lex.c (c_lex_with_flags): Use explicit locations.
8170
8171 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
8172
8173 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
8174 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
8175
8176 2015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
8177
8178 PR middle-end/36757
8179 * c-common.c (check_builtin_function_arguments): Add check
8180 for BUILT_IN_SIGNBIT argument.
8181
8182 2015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
8183
8184 PR c++/67160
8185 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
8186 in c++1z mode.
8187
8188 2015-08-17 Marek Polacek <polacek@redhat.com>
8189
8190 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
8191 with whitespaces before qualifier names.
8192
8193 2015-08-12 Marek Polacek <polacek@redhat.com>
8194
8195 PR c++/55095
8196 * c-common.c (maybe_warn_shift_overflow): Properly handle
8197 left-shifting 1 into the sign bit.
8198
8199 2015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8200
8201 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
8202
8203 2015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
8204 Braden Obrzut <admin@maniacsvault.net>
8205 Jason Merrill <jason@redhat.com>
8206
8207 Add C++ Concepts TS support.
8208 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
8209 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
8210 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
8211 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
8212 * c-opts.c (set_std_cxx1z): Set flag_concepts.
8213 * c.opt (fconcepts): New.
8214
8215 2015-08-02 Martin Sebor <msebor@redhat.com>
8216
8217 * c.opt (-Wframe-address): New warning option.
8218
8219 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8220
8221 * c-indentation.c (should_warn_for_misleading_indentation):
8222 Improve heuristics.
8223
8224 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8225
8226 * c-indentation.c (get_visual_column): Add parameter first_nws,
8227 use it. Update comment documenting the function.
8228 (is_first_nonwhitespace_on_line): Remove.
8229 (should_warn_for_misleading_indentation): Replace usage of
8230 of is_first_nonwhitespace_on_line with get_visual_column.
8231
8232 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8233
8234 * c-indentation.h (struct token_indent_info): Define.
8235 (get_token_indent_info): Define.
8236 (warn_for_misleading_information): Declare.
8237 * c-common.h (warn_for_misleading_information): Remove.
8238 * c-identation.c (warn_for_misleading_indentation):
8239 Change declaration to take three token_indent_infos. Adjust
8240 accordingly.
8241 * c-identation.c (should_warn_for_misleading_indentation):
8242 Likewise. Bail out early if the body is a compound statement.
8243 (guard_tinfo_to_string): Define.
8244
8245 2015-07-30 Jason Merrill <jason@redhat.com>
8246
8247 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
8248 '*' for reference decay.
8249
8250 2015-07-30 Marek Polacek <polacek@redhat.com>
8251
8252 * c-common.c (warn_tautological_cmp): Bail for float types.
8253
8254 2015-07-27 Marek Polacek <polacek@redhat.com>
8255
8256 PR bootstrap/67030
8257 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
8258
8259 2015-07-27 Marek Polacek <polacek@redhat.com>
8260
8261 PR c++/66555
8262 PR c/54979
8263 * c-common.c (find_array_ref_with_const_idx_r): New function.
8264 (warn_tautological_cmp): New function.
8265 * c-common.h (warn_tautological_cmp): Declare.
8266 * c.opt (Wtautological-compare): New option.
8267
8268 2015-07-23 Marek Polacek <polacek@redhat.com>
8269
8270 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
8271 (ubsan_instrument_shift): Likewise.
8272
8273 2015-07-23 Marek Polacek <polacek@redhat.com>
8274
8275 PR sanitizer/66908
8276 * c-ubsan.c: Include gimplify.h.
8277 (ubsan_instrument_division): Unshare OP0 and OP1.
8278 (ubsan_instrument_shift): Likewise.
8279
8280 2015-07-20 Marek Polacek <polacek@redhat.com>
8281 Richard Sandiford <richard.sandiford@arm.com>
8282
8283 PR c++/55095
8284 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
8285 Use EXPR_LOC_OR_LOC.
8286 (maybe_warn_shift_overflow): New function.
8287 * c-common.h (maybe_warn_shift_overflow): Declare.
8288 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
8289 * c.opt (Wshift-overflow): New option.
8290
8291 2015-07-16 Martin Liska <mliska@suse.cz>
8292
8293 * c-format.c (static void check_format_info_main): Use
8294 object_allocator instead of pool_allocator.
8295 (check_format_arg): Likewise.
8296 (check_format_info_main): Likewise.
8297
8298 2015-07-15 Andrew MacLeod <amacleod@redhat.com>
8299
8300 * c-opts.c: Remove multiline #include comment.
8301
8302 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
8303
8304 * c-common.c: Fix double word typos.
8305
8306 2015-07-10 Eric Botcazou <ebotcazou@adacore.com>
8307
8308 * c-ada-spec.h (cpp_operation): Revert latest change.
8309 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
8310 constructors and destructors.
8311
8312 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
8313
8314 * c-common.h: Adjust includes for flags.h changes.
8315 * stub-objc.c: Likewise.
8316
8317 2015-07-08 Eric Botcazou <ebotcazou@adacore.com>
8318
8319 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
8320 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
8321
8322 2015-07-08 Jakub Jelinek <jakub@redhat.com>
8323
8324 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
8325 are to be removed, return NULL rather than original clauses list.
8326
8327 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
8328
8329 * array-notation-common.c: Adjust includes.
8330 * c-ada-spec.c: Likewise.
8331 * c-cilkplus.c: Likewise.
8332 * c-common.h: Likewise.
8333 * c-cppbuiltin.c: Likewise.
8334 * c-dump.c: Likewise.
8335 * c-format.c: Likewise.
8336 * c-gimplify.c: Likewise.
8337 * c-indentation.c: Likewise.
8338 * c-lex.c: Likewise.
8339 * c-omp.c: Likewise.
8340 * c-opts.c: Likewise.
8341 * c-pch.c: Likewise.
8342 * c-ppoutput.c: Likewise.
8343 * c-pragma.c: Likewise.
8344 * c-pretty-print.c: Likewise.
8345 * c-semantics.c: Likewise.
8346 * c-ubsan.c: Likewise.
8347 * cilk.c: Likewise.
8348 * stub-objc.c: Likewise.
8349
8350 2015-07-07 Eric Botcazou <ebotcazou@adacore.com>
8351
8352 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
8353 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
8354
8355 2015-07-01 Jason Merrill <jason@redhat.com>
8356
8357 * c-common.h (D_CXX11): Rename from D_CXX0X.
8358 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
8359 * c-common.c: Adjust.
8360
8361 * c-opts.c (c_common_post_options): Default to C++14.
8362
8363 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
8364
8365 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
8366
8367 Implement N4197 - Adding u8 character literals
8368 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
8369 CPP_CHAR.
8370 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
8371 CPP_UTF8CHAR_USERDEF tokens.
8372 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
8373 and CPP_UTF8CHAR tokens.
8374 (lex_charconst): Treat CPP_UTF8CHAR token.
8375
8376 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8377
8378 PR fortran/66605
8379 * c-common.c (do_warn_unused_parameter): Move here.
8380 * c-common.h (do_warn_unused_parameter): Declare.
8381
8382 2015-06-29 Marek Polacek <polacek@redhat.com>
8383
8384 PR c/66322
8385 * c-common.c (check_case_bounds): Add bool * parameter. Set
8386 OUTSIDE_RANGE_P.
8387 (c_add_case_label): Add bool * parameter. Pass it down to
8388 check_case_bounds.
8389 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
8390 warning here.
8391 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
8392 declarations.
8393
8394 2015-06-27 Marek Polacek <polacek@redhat.com>
8395
8396 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
8397 or VECTOR_INTEGER_TYPE_P throughout.
8398 * c-gimplify.c: Likewise.
8399
8400 2015-06-26 Marek Polacek <polacek@redhat.com>
8401
8402 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
8403 * c-common.c (c_fully_fold_internal): Likewise.
8404 (c_alignof_expr): Likewise.
8405 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
8406 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
8407 * cilk.c (create_parm_list): Likewise.
8408
8409 2015-06-26 Marek Polacek <polacek@redhat.com>
8410
8411 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
8412
8413 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
8414
8415 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
8416 * c-gimplify.c: Likewise.
8417 * c-pragma.c: Likewise.
8418 * c-ubsan.c: Likewise.
8419 * cilk.c: Likewise.
8420
8421 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
8422
8423 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
8424 ggc_hasher.
8425
8426 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
8427
8428 * cilk.c: Move calls.h after tm.h in the include chain.
8429
8430 2015-06-25 Marek Polacek <polacek@redhat.com>
8431
8432 * array-notation-common.c: Use VAR_P throughout.
8433 * c-ada-spec.c: Likewise.
8434 * c-common.c: Likewise.
8435 * c-format.c: Likewise.
8436 * c-gimplify.c: Likewise.
8437 * c-omp.c: Likewise.
8438 * c-pragma.c: Likewise.
8439 * c-pretty-print.c: Likewise.
8440 * cilk.c: Likewise.
8441
8442 2015-06-25 Marek Polacek <polacek@redhat.com>
8443
8444 * cilk.c (extract_free_variables): Use is_global_var.
8445
8446 2015-06-23 Richard Sandiford <richard.sandiford@arm.com>
8447
8448 * c-common.c: Don't include target-def.h.
8449
8450 2015-06-23 Marek Polacek <polacek@redhat.com>
8451
8452 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
8453 when comparing INTEGER_CSTs.
8454
8455 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
8456
8457 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
8458 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
8459 (dump_ada_template): Skip partially specialized types.
8460
8461 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
8462
8463 * c-common.c (scalar_to_vector): Use std::swap instead of manually
8464 swapping.
8465
8466 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
8467
8468 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
8469 * c-ada-spec.c: Likewise.
8470 * c-cilkplus.c: Likewise.
8471 * c-common.c: Likewise.
8472 * c-common.h: Likewise.
8473 * c-cppbuiltin.c: Likewise.
8474 * c-dump.c: Likewise.
8475 * c-format.c: Likewise.
8476 * c-gimplify.c: Likewise.
8477 * c-indentation.c: Likewise.
8478 * c-lex.c: Likewise.
8479 * c-omp.c: Likewise.
8480 * c-opts.c: Likewise.
8481 * c-pch.c: Likewise.
8482 * c-ppoutput.c: Likewise.
8483 * c-pragma.c: Likewise.
8484 * c-pretty-print.c: Likewise.
8485 * c-semantics.c: Likewise.
8486 * c-ubsan.c: Likewise.
8487 * cilk.c: Likewise.
8488 * stub-objc.c: Likewise.
8489
8490 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
8491
8492 PR c++/65168
8493 * c-common.c (c_common_truthvalue_conversion): Warn when
8494 converting an address of a reference to a truth value.
8495
8496 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
8497
8498 * array-notation-common.c : Adjust include files.
8499 * c-ada-spec.c : Likewise.
8500 * c-cilkplus.c : Likewise.
8501 * c-common.c : Likewise.
8502 * c-common.h : Likewise.
8503 * c-cppbuiltin.c : Likewise.
8504 * c-dump.c : Likewise.
8505 * c-format.c : Likewise.
8506 * c-gimplify.c : Likewise.
8507 * c-indentation.c : Likewise.
8508 * c-lex.c : Likewise.
8509 * c-omp.c : Likewise.
8510 * c-opts.c : Likewise.
8511 * c-pch.c : Likewise.
8512 * c-ppoutput.c : Likewise.
8513 * c-pragma.c : Likewise.
8514 * c-pretty-print.c : Likewise.
8515 * c-semantics.c : Likewise.
8516 * c-ubsan.c : Likewise.
8517 * cilk.c : Likewise.
8518 * stub-objc.c : Likewise.
8519
8520 2015-06-08 Marek Polacek <polacek@redhat.com>
8521
8522 PR c/66415
8523 * c-format.c (location_from_offset): Return LOC if LINE is null.
8524
8525 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
8526
8527 * c-common.h (c_parse_final_cleanups): New prototype.
8528 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
8529
8530 2015-06-04 Sriraman Tallam <tmsriram@google.com>
8531
8532 * c-common.c (noplt): New attribute.
8533 (handle_noplt_attribute): New handler.
8534
8535 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
8536
8537 * array-notation-common.c: Adjust includes for restructured coretypes.h.
8538 * c-ada-spec.c: Likewise.
8539 * c-cilkplus.c: Likewise.
8540 * c-common.c: Likewise.
8541 * c-common.h: Likewise.
8542 * c-cppbuiltin.c: Likewise.
8543 * c-dump.c: Likewise.
8544 * c-format.c: Likewise.
8545 * c-gimplify.c: Likewise.
8546 * c-indentation.c: Likewise.
8547 * c-lex.c: Likewise.
8548 * c-omp.c: Likewise.
8549 * c-opts.c: Likewise.
8550 * c-pch.c: Likewise.
8551 * c-ppoutput.c: Likewise.
8552 * c-pragma.c: Likewise.
8553 * c-pretty-print.c: Likewise.
8554 * c-semantics.c: Likewise.
8555 * c-ubsan.c: Likewise.
8556 * cilk.c: Likewise.
8557 * stub-objc.c: Likewise.
8558
8559 2015-06-02 David Malcolm <dmalcolm@redhat.com>
8560
8561 PR c/66220:
8562 * c-indentation.c (should_warn_for_misleading_indentation): Use
8563 expand_location rather than expand_location_to_spelling_point.
8564 Don't warn if the guarding statement is more indented than the
8565 next/body stmts.
8566
8567 2015-06-02 David Malcolm <dmalcolm@redhat.com>
8568
8569 * c-indentation.c (warn_for_misleading_indentation): Bail out
8570 immediately if -Wmisleading-indentation isn't enabled.
8571
8572 2015-06-01 Martin Liska <mliska@suse.cz>
8573
8574 * c-format.c (check_format_arg):Use new type-based pool allocator.
8575 (check_format_info_main) Likewise.
8576
8577 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
8578
8579 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
8580 (has_nontrivial_methods): Likewise.
8581
8582 2015-05-25 Marek Polacek <polacek@redhat.com>
8583
8584 * c-ubsan.c (ubsan_instrument_shift): Use type0.
8585
8586 2015-05-22 Marek Polacek <polacek@redhat.com>
8587
8588 PR c/47043
8589 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
8590
8591 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
8592
8593 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
8594 STACK_GROWS_DOWNWARD.
8595
8596 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
8597
8598 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
8599 STACK_GROWS_DOWNWARD rather than if it is defined.
8600
8601 2015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
8602
8603 PR c/52952
8604 * c-format.c (location_column_from_byte_offset): New.
8605 (location_from_offset): New.
8606 (struct format_wanted_type): Add offset_loc field.
8607 (check_format_info): Move handling of location for extra arguments
8608 closer to the point of warning.
8609 (check_format_info_main): Pass the result of location_from_offset
8610 to warning_at.
8611 (format_type_warning): Pass the result of location_from_offset
8612 to warning_at.
8613
8614 2015-05-20 Marek Polacek <polacek@redhat.com>
8615
8616 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
8617
8618 2015-05-20 Marek Polacek <polacek@redhat.com>
8619
8620 * c-ada-spec.c (dump_sloc): Use DECL_P.
8621
8622 2015-05-20 Marek Polacek <polacek@redhat.com>
8623
8624 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
8625 * c-common.c: Likewise.
8626
8627 2015-05-19 David Malcolm <dmalcolm@redhat.com>
8628
8629 * c-common.h (fe_file_change): Strengthen param from
8630 const line_map * to const line_map_ordinary *.
8631 (pp_file_change): Likewise.
8632 * c-lex.c (fe_file_change): Likewise.
8633 (cb_define): Use linemap_check_ordinary when invoking
8634 SOURCE_LINE.
8635 (cb_undef): Likewise.
8636 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
8637 invoking cb_file_change.
8638 (c_finish_options): Likewise.
8639 (push_command_line_include): Likewise.
8640 (cb_file_change): Strengthen param "new_map" from
8641 const line_map * to const line_map_ordinary *.
8642 * c-ppoutput.c (cb_define): Likewise for local "map".
8643 (pp_file_change): Likewise for param "map" and local "from".
8644
8645 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
8646
8647 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
8648
8649 2015-05-18 Tom de Vries <tom@codesourcery.com>
8650
8651 * c-common.c (build_va_arg_1): New function.
8652 (build_va_arg): Add address operator to va_list operand if necessary.
8653
8654 2015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
8655
8656 PR c/48956
8657 * c-common.c (int_safely_convertible_to_real_p): Define.
8658 (unsafe_conversion_p): Check conversions involving complex types.
8659 (conversion_warning): Add new warning message for conversions which
8660 discard imaginary component.
8661 * c-common.h: (enum conversion_safety): Add new enumerator for such
8662 conversions.
8663
8664 2015-05-14 Marek Polacek <polacek@redhat.com>
8665
8666 PR c/66066
8667 PR c/66127
8668 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
8669 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
8670 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
8671 use it. If FOR_INT_CONST, require that all evaluated operands be
8672 INTEGER_CSTs.
8673
8674 2015-05-12 David Malcolm <dmalcolm@redhat.com>
8675
8676 * c-common.h (warn_for_misleading_indentation): New prototype.
8677 * c-indentation.c: New file.
8678 * c.opt (Wmisleading-indentation): New option.
8679
8680 2015-05-12 Tom de Vries <tom@codesourcery.com>
8681
8682 PR tree-optimization/66010
8683 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
8684
8685 2015-05-09 Jason Merrill <jason@redhat.com>
8686
8687 * c-opts.c (c_common_post_options): Also clear
8688 cpp_opts->cpp_warn_cxx11_compat.
8689
8690 * c-common.h (enum cxx_dialect): Add cxx_unset.
8691 * c-common.c (cxx_dialect): Initialize to cxx_unset.
8692 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
8693
8694 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
8695 (std=gnu++0x): Mark as Undocumented.
8696 (std=gnu++1y): Add deprecated message.
8697
8698 2015-05-08 Jason Merrill <jason@redhat.com>
8699
8700 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
8701 * c-opts.c: Adjust.
8702
8703 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
8704
8705 2015-05-08 Marek Polacek <polacek@redhat.com>
8706
8707 PR c/64918
8708 * c.opt (Woverride-init-side-effects): New option.
8709
8710 2015-05-07 Marek Polacek <polacek@redhat.com>
8711
8712 PR c/65179
8713 * c-common.c (c_fully_fold_internal): Warn when left shifting a
8714 negative value.
8715 * c.opt (Wshift-negative-value): New option.
8716 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
8717 when -Wextra and C99/C++11 mode.
8718
8719 2015-05-07 Marek Polacek <polacek@redhat.com>
8720 Martin Uecker <uecker@eecs.berkeley.edu>
8721
8722 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
8723 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
8724
8725 2015-05-05 Jason Merrill <jason@redhat.com>
8726
8727 * c.opt (Wterminate): New.
8728
8729 2015-04-30 Marek Polacek <polacek@redhat.com>
8730
8731 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
8732 require that the non-constant be of a boolean type.
8733
8734 2015-04-29 Josh Triplett <josh@joshtriplett.org>
8735
8736 * c-common.c (handle_section_attribute): Refactor to reduce
8737 nesting and distinguish between error cases.
8738
8739 2015-04-29 Marek Polacek <polacek@redhat.com>
8740
8741 PR c/64610
8742 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
8743 with 0/1.
8744
8745 2015-04-29 Jakub Jelinek <jakub@redhat.com>
8746
8747 * c-common.h (omp_clause_mask): Unconditionally define as a class.
8748 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
8749 HOST_BITS_PER_WIDE_INT.
8750
8751 2015-04-28 Tom de Vries <tom@codesourcery.com>
8752
8753 PR tree-optimization/65887
8754 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
8755
8756 2015-04-28 Eric Botcazou <ebotcazou@adacore.com>
8757 Pierre-Marie de Rodat <derodat@adacore.com>
8758
8759 * c-ada-spec.c (in_function): Delete.
8760 (dump_generic_ada_node): Do not change in_function and remove the
8761 redundant code dealing with it.
8762 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
8763 (print_ada_methods): Output the static member functions in a nested
8764 package after the regular methods as well as associated renamings.
8765
8766 2015-04-24 Marek Polacek <polacek@redhat.com>
8767
8768 PR c/65830
8769 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
8770 and OPT_Wshift_count_overflow.
8771
8772 PR c/63357
8773 * c-common.c (warn_logical_operator): Warn if the operands have the
8774 same expressions.
8775
8776 2015-04-24 Marek Polacek <polacek@redhat.com>
8777
8778 PR c/61534
8779 * c-common.c (warn_logical_operator): Bail if either operand comes
8780 from a macro expansion.
8781
8782 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
8783
8784 PR target/55143
8785 * c-common.c (c_default_pointer_mode): Add definition.
8786 * c-common.h (c_default_pointer_mode): Add declaration.
8787
8788 2015-03-11 Jakub Jelinek <jakub@redhat.com>
8789
8790 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
8791 on record_builtin_type argument.
8792
8793 2015-03-10 Jakub Jelinek <jakub@redhat.com>
8794
8795 PR c/65120
8796 * c-common.c (warn_logical_not_parentheses): Don't warn for
8797 !x == 0 or !x != 0.
8798
8799 2015-03-07 Marek Polacek <polacek@redhat.com>
8800
8801 PR sanitizer/65280
8802 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
8803 before trying to figure out whether we have a flexible array member.
8804
8805 2015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8806 Jonathan Wakely <jwakely.gcc@gmail.com>
8807
8808 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
8809
8810 2015-03-05 Eric Botcazou <ebotcazou@adacore.com>
8811
8812 PR ada/65319
8813 * c-ada-spec.c (print_destructor): Remove obsolete code.
8814
8815 2015-03-01 Eric Botcazou <ebotcazou@adacore.com>
8816
8817 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
8818 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
8819 DECL_TEMPLATE_RESULT emulations.
8820 (dump_ada_template)): Add guard for TYPE_METHODS.
8821
8822 2015-02-27 Marek Polacek <polacek@redhat.com>
8823
8824 PR c/65040
8825 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
8826
8827 2015-02-27 Kai Tietz <ktietz@redhat.com>
8828
8829 PR c/35330
8830 * c-pragma.c (handle_pragma_weak): Do not try to create
8831 weak/alias of declarations not being function, or variable
8832 declarations.
8833
8834 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
8835
8836 PR libgomp/64625
8837 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
8838 Remove macros.
8839 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
8840
8841 2015-02-16 Marek Polacek <polacek@redhat.com>
8842
8843 PR c/65066
8844 * c-format.c (check_format_types): Handle null param.
8845
8846 2015-02-13 Marek Polacek <polacek@redhat.com>
8847
8848 PR c/65040
8849 * c-format.c (check_format_types): Don't warn about different
8850 signedness if the original value is in the range of WANTED_TYPE.
8851
8852 2015-02-12 Jason Merrill <jason@redhat.com>
8853
8854 PR c++/64956
8855 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
8856 to the current highest version.
8857 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
8858
8859 2015-02-04 Jakub Jelinek <jakub@redhat.com>
8860
8861 PR c/64824
8862 PR c/64868
8863 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
8864 instead of RDIV_EXPR. Use build_binary_op instead of
8865 build2_loc.
8866
8867 2015-01-30 Joseph Myers <joseph@codesourcery.com>
8868
8869 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
8870 to pass input_location as first argument.
8871
8872 2015-01-23 Tom de Vries <tom@codesourcery.com>
8873
8874 PR libgomp/64672
8875 * c.opt (fopenacc): Mark as LTO option.
8876
8877 2015-01-23 Tom de Vries <tom@codesourcery.com>
8878
8879 PR libgomp/64707
8880 * c.opt (fopenmp): Mark as LTO option.
8881
8882 2015-01-21 Jakub Jelinek <jakub@redhat.com>
8883
8884 PR c/63307
8885 * cilk.c (fill_decls_vec): Only put decls into vector v.
8886 (compare_decls): Fix up formatting.
8887
8888 2015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
8889
8890 PR c/63307
8891 * cilk.c: Include vec.h.
8892 (struct cilk_decls): New structure.
8893 (wrapper_parm_cb): Split this function to...
8894 (fill_decls_vec): ...this...
8895 (create_parm_list): ...and this.
8896 (compare_decls): New function.
8897 (for_local_cb): Remove.
8898 (wrapper_local_cb): Ditto.
8899 (build_wrapper_type): For now first traverse and fill vector of
8900 declarations then sort it and then deal with sorted vector.
8901 (cilk_outline): Ditto.
8902 (declare_one_free_variable): Ditto.
8903
8904 2015-01-21 Jason Merrill <jason@redhat.com>
8905
8906 PR c++/64629
8907 * c-format.c (check_format_arg): Call decl_constant_value.
8908
8909 2015-01-19 Martin Liska <mliska@suse.cz>
8910
8911 * c-common.c (handle_noicf_attribute): New function.
8912
8913 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
8914 Bernd Schmidt <bernds@codesourcery.com>
8915 James Norris <jnorris@codesourcery.com>
8916 Cesar Philippidis <cesar@codesourcery.com>
8917 Ilmir Usmanov <i.usmanov@samsung.com>
8918 Jakub Jelinek <jakub@redhat.com>
8919
8920 * c.opt (fopenacc): New option.
8921 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
8922 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
8923 New macros.
8924 * c-common.h (c_finish_oacc_wait): New prototype.
8925 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
8926 (c_finish_oacc_wait): New function.
8927 * c-pragma.c (oacc_pragmas): New variable.
8928 (c_pp_lookup_pragma, init_pragma): Handle it.
8929 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
8930 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
8931 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
8932 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
8933 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
8934 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
8935 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
8936 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
8937 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
8938 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
8939 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
8940 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
8941 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
8942 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
8943 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
8944 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
8945 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
8946 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
8947 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
8948 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
8949 PRAGMA_OACC_CLAUSE_WORKER.
8950
8951 2015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
8952
8953 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
8954 for the new option fstack-protector_explicit.
8955 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
8956 (handle_stack_protect_attribute): New function.
8957
8958 2015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
8959
8960 * c.opt: New option -Warray-bounds=.
8961
8962 2015-01-09 Michael Collison <michael.collison@linaro.org>
8963
8964 * array-notation-common.c: Include hash-set.h, machmode.h,
8965 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8966 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
8967 * c-ada-spec.c: Ditto.
8968 * c-cilkplus.c: Ditto.
8969 * c-common.c: Include input.h due to flattening of tree.h.
8970 Define macro GCC_C_COMMON_C.
8971 * c-common.h: Flatten tree.h header files into c-common.h.
8972 Remove include of tree-core.h.
8973 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
8974 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8975 fold-const.h, wide-int.h, and inchash.h due to
8976 flattening of tree.h.
8977 * c-dump.c: Ditto.
8978 * c-format.c: Flatten tree.h header files into c-common.h.
8979 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
8980 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8981 fold-const.h, wide-int.h, and inchash.h due to
8982 flattening of tree.h.
8983 * c-dump.c: Include hash-set.h, machmode.h,
8984 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8985 fold-const.h, wide-int.h, and inchash.h due to
8986 flattening of tree.h.
8987 * c-format.c: Include hash-set.h, machmode.h,
8988 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8989 fold-const.h, wide-int.h, inchash.h and real.h due to
8990 flattening of tree.h.
8991 * c-gimplify.c: Include hash-set.h, machmode.h,
8992 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8993 fold-const.h, wide-int.h, and inchash.h due to
8994 flattening of tree.h.
8995 * cilk.c: Ditto.
8996 * c-lex.c: Ditto.
8997 * c-omp.c: Ditto.
8998 * c-opts.c: Ditto.
8999 * c-pch.c: Ditto.
9000 * c-ppoutput.c: Ditto.
9001 * c-pragma.c: Ditto.
9002 * c-pretty-print.c: Ditto.
9003 * c-semantics.c: Ditto.
9004 * c-ubsan.c: Ditto.
9005 * stub-objc.c: Ditto.
9006
9007 2015-01-08 Jason Merrill <jason@redhat.com>
9008
9009 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
9010 do_ubsan_in_current_function.
9011 (ubsan_maybe_instrument_reference_or_call): Likewise.
9012 * c-ubsan.h: Declare it.
9013
9014 2015-01-08 Mike Stump <mikestump@comcast.net>
9015
9016 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
9017
9018 2015-01-07 Marek Polacek <polacek@redhat.com>
9019
9020 PR c/64440
9021 * c-common.c (c_fully_fold_internal): Warn for division and modulo
9022 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
9023
9024 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
9025
9026 PR c++/31397
9027 * c.opt (Wsuggest-override): New option.
9028
9029 2015-01-05 Jakub Jelinek <jakub@redhat.com>
9030
9031 Update copyright years.
9032
9033 2015-01-05 Marek Polacek <polacek@redhat.com>
9034
9035 PR c/64423
9036 * c-common.c (warn_array_subscript_with_type_char): Add location_t
9037 parameter. Use it.
9038 * c-common.h (warn_array_subscript_with_type_char): Update
9039 declaration.
9040
9041 2014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
9042
9043 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
9044 Control macro with flag_sized_deallocation.
9045
9046 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
9047
9048 * c.opt (Wdiscarded-array-qualifiers): New option.
9049
9050 2014-12-19 Jakub Jelinek <jakub@redhat.com>
9051
9052 PR preprocessor/63831
9053 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
9054 and __has_cpp_attribute here.
9055 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
9056 c_common_has_attribute.
9057 * c-common.h (c_common_has_attribute): New prototype.
9058 * c-lex.c (init_c_lex): Set cb->has_attribute to
9059 c_common_has_attribute instead of cb_has_attribute.
9060 (get_token_no_padding): New function.
9061 (cb_has_attribute): Renamed to ...
9062 (c_common_has_attribute): ... this. No longer static. Use
9063 get_token_no_padding, require ()s, don't build TREE_LIST
9064 unnecessarily, fix up formatting, adjust diagnostics, call
9065 init_attributes.
9066
9067 2014-12-15 Jason Merrill <jason@redhat.com>
9068
9069 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
9070 (-Wsized-deallocation): New.
9071 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
9072 to on in C++14 and up.
9073
9074 2014-12-11 Jason Merrill <jason@redhat.com>
9075
9076 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
9077
9078 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
9079 we aren't complaining about VLAs.
9080
9081 2014-12-06 Marek Polacek <polacek@redhat.com>
9082
9083 PR tree-optimization/64183
9084 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
9085 shift-expression if it is integer_type_node. Use types_compatible_p.
9086
9087 2014-11-29 Jakub Jelinek <jakub@redhat.com>
9088
9089 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
9090 last argument from create_tmp_var_raw and create_tmp_var calls.
9091 * cilk.c (gimplify_cilk_spawn): Likewise.
9092 * c-omp.c (c_finish_omp_atomic): Likewise.
9093
9094 2014-11-28 Marek Polacek <polacek@redhat.com>
9095
9096 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
9097 instead of unsigned_type_node.
9098
9099 2014-11-28 Marek Polacek <polacek@redhat.com>
9100
9101 PR c/63862
9102 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
9103 to op1_utype.
9104 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
9105 expression to unsigned_type_node.
9106
9107 2014-11-20 Mark Wielaard <mjw@redhat.com>
9108
9109 PR debug/38757
9110 * c-opts.c (set_std_c89): Set lang_hooks.name.
9111 (set_std_c99): Likewise.
9112 (set_std_c11): Likewise.
9113 (set_std_cxx98): Likewise.
9114 (set_std_cxx11): Likewise.
9115 (set_std_cxx14): Likewise.
9116 (set_std_cxx1z): Likewise.
9117
9118 2014-11-21 Jakub Jelinek <jakub@redhat.com>
9119
9120 PR target/63764
9121 * c-common.h (convert_vector_to_pointer_for_subscript): Change
9122 return type to bool.
9123 * c-common.c: Include gimple-expr.h.
9124 (convert_vector_to_pointer_for_subscript): Change return type to
9125 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
9126 and copy it into a TARGET_EXPR and use that instead of *vecp
9127 directly.
9128
9129 2014-11-19 David Malcolm <dmalcolm@redhat.com>
9130
9131 Merger of git branch "gimple-classes-v2-option-3".
9132 * ChangeLog.gimple-classes: New.
9133 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
9134 from being just a vec<gimple> to a vec<gbind *>.
9135
9136 2014-11-18 Jakub Jelinek <jakub@redhat.com>
9137
9138 PR sanitizer/63813
9139 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
9140 argument to ptype, set type to TREE_TYPE (ptype). Don't call
9141 get_pointer_alignment for non-pointers. Use ptype, or if it is
9142 reference type, corresponding pointer type, as type of kind
9143 argument.
9144 (ubsan_maybe_instrument_reference,
9145 ubsan_maybe_instrument_member_call): Adjust callers.
9146
9147 2014-11-15 Marek Polacek <polacek@redhat.com>
9148
9149 PR middle-end/63884
9150 * array-notation-common.c (is_sec_implicit_index_fn): Return false
9151 for NULL fndecl.
9152 (extract_array_notation_exprs): Return for NULL node.
9153
9154 2014-11-12 Joseph Myers <joseph@codesourcery.com>
9155
9156 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
9157 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
9158
9159 2014-11-12 Jakub Jelinek <jakub@redhat.com>
9160
9161 PR c/59708
9162 * c-common.c (check_builtin_function_arguments): Handle
9163 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
9164
9165 2014-11-10 Andi Kleen <ak@linux.intel.com>
9166
9167 PR c/60804
9168 * c-common.h (check_no_cilk): Declare.
9169 * cilk.c (get_error_location): New function.
9170 (check_no_cilk): Dito.
9171
9172 2014-11-10 Andi Kleen <ak@linux.intel.com>
9173
9174 * cilk.c (recognize_spawn): Use expression location
9175 for error message.
9176
9177 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
9178
9179 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
9180
9181 2014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
9182
9183 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
9184 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
9185 (__cpp_range_based_for, __cpp_initializer_lists,
9186 __cpp_delegating_constructors, __cpp_nsdmi,
9187 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
9188 for C++11; (__cpp_attribute_deprecated): Remove in favor of
9189 __has_cpp_attribute.
9190 * c-lex.c (cb_has_attribute): New callback CPP function;
9191 (init_c_lex): Set has_attribute callback.
9192
9193 2014-11-04 Richard Biener <rguenther@suse.de>
9194
9195 * c-common.c (shorten_compare): Do not shorten mixed
9196 DFP and non-DFP compares.
9197
9198 2014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9199
9200 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
9201 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
9202 Commentary and rearrangement of tests.
9203 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
9204 Commentary and rearrangement of tests.
9205 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
9206 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
9207
9208 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
9209
9210 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
9211 enum from machine_mode.
9212
9213 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
9214
9215 * c-common.c: Adjust include files.
9216 * c-gimplify.c: Ditto.
9217 * cilk.c: Ditto.
9218 * c-pragma.c: Ditto.
9219 * c-ubsan.c: Ditto.
9220
9221 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
9222
9223 * c-gimplify.c: Adjust include files.
9224
9225 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
9226
9227 PR c++/53061
9228 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
9229 c_common_initialize_diagnostics.
9230 * c-common.h: Likewise.
9231
9232 2014-10-24 Marek Polacek <polacek@redhat.com>
9233
9234 PR c/56980
9235 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
9236 print "struct"/"union"/"enum" for typedefed names.
9237
9238 2014-10-23 Marek Polacek <polacek@redhat.com>
9239
9240 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
9241 in unsigned type.
9242
9243 2014-10-22 Jakub Jelinek <jakub@redhat.com>
9244 Yury Gribov <y.gribov@samsung.com>
9245
9246 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9247 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
9248 instead of flag_sanitize_recover as bool flag.
9249
9250 2014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
9251
9252 * cilk.c: Revert previous change.
9253
9254 2014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
9255
9256 PR c/63307
9257 * cilk.c: Include vec.h.
9258 (struct cilk_decls): New structure.
9259 (wrapper_parm_cb): Split this function to...
9260 (fill_decls_vec): ...this...
9261 (create_parm_list): ...and this.
9262 (compare_decls): New function.
9263 (for_local_cb): Remove.
9264 (wrapper_local_cb): Ditto.
9265 (build_wrapper_type): For now first traverse and fill vector of
9266 declarations then sort it and then deal with sorted vector.
9267 (cilk_outline): Ditto.
9268 (declare_one_free_variable): Ditto.
9269
9270 2014-10-17 Marek Polacek <polacek@redhat.com>
9271
9272 * c-opts.c (c_common_post_options): Set warn_implicit_int.
9273 * c.opt (Wimplicit-int): Initialize to -1.
9274
9275 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
9276
9277 * c-pragma.c: Adjust include files.
9278 * c-semantics.c: Likewise.
9279
9280 2014-10-16 DJ Delorie <dj@redhat.com>
9281
9282 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
9283 multiples of bytes.
9284
9285 2014-10-14 Jason Merrill <jason@redhat.com>
9286
9287 PR c++/63455
9288 * c-common.h (CPP_PREPARSED_EXPR): New.
9289 (N_CP_TTYPES): Adjust.
9290
9291 2014-10-15 Marek Polacek <polacek@redhat.com>
9292
9293 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
9294
9295 2014-10-14 DJ Delorie <dj@redhat.com>
9296
9297 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
9298 types, not just __int128.
9299 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
9300 types, not just __int128.
9301 (cpp_atomic_builtins): Round pointer sizes up.
9302 (type_suffix): Use type precision, not specific types.
9303 * c-common.c (c_common_reswords): Remove __int128 special case.
9304 (c_common_type_for_size): Check for all __intN types, not just
9305 __int128.
9306 (c_common_type_for_mode): Likewise.
9307 (c_common_signed_or_unsigned_type): Likewise.
9308 (c_build_bitfield_integer_type): Likewise.
9309 (c_common_nodes_and_builtins): Likewise.
9310 (keyword_begins_type_specifier): Likewise.
9311 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
9312 __intN variants.
9313
9314 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
9315
9316 * c-common.c: Use hash_table instead of hashtab.
9317
9318 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
9319
9320 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
9321 C++11 section.
9322
9323 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
9324
9325 PR c++/54427
9326 PR c++/57198
9327 PR c++/58845
9328 * c-common.c (warn_logical_operator): Punt for vectors.
9329
9330 2014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9331
9332 Implement SD-6: SG10 Feature Test Recommendations
9333 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
9334 macros and the __has_header macro.
9335
9336 2014-09-30 Jason Merrill <jason@redhat.com>
9337
9338 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
9339 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
9340 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9341
9342 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
9343 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9344
9345 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
9346 * c-common.c (c_common_reswords): Remove __is_convertible_to.
9347
9348 2014-09-24 Marek Polacek <polacek@redhat.com>
9349
9350 PR c/61405
9351 PR c/53874
9352 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
9353
9354 2014-09-23 Andi Kleen <ak@linux.intel.com>
9355
9356 * c-common.c (handle_no_reorder_attribute): New function.
9357 (c_common_attribute_table): Add no_reorder attribute.
9358
9359 2014-09-22 Joseph Myers <joseph@codesourcery.com>
9360
9361 * c-cppbuiltin.c (c_cpp_builtins): Define
9362 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
9363 modes.
9364
9365 2014-09-18 Joseph Myers <joseph@codesourcery.com>
9366
9367 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
9368 for supported floating-point modes.
9369
9370 2014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9371
9372 * c.opt (Wpsabi): Use LangEnabledBy.
9373 * c-opts.c (c_common_handle_option): Do not handle here.
9374
9375 2014-09-12 Joseph Myers <joseph@codesourcery.com>
9376
9377 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
9378 macros for floating-point modes.
9379
9380 2014-09-11 Marc Glisse <marc.glisse@inria.fr>
9381
9382 PR target/58757
9383 * c-cppbuiltin.c (builtin_define_float_constants): Correct
9384 __*_DENORM_MIN__ without denormals.
9385
9386 2014-09-10 Jakub Jelinek <jakub@redhat.com>
9387
9388 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9389 ubsan_instrument_vla, ubsan_instrument_return): Adjust
9390 ubsan_create_data callers.
9391 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
9392 index is constant or BIT_AND_EXPR with constant mask and is
9393 small enough for the bound.
9394 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
9395 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
9396
9397 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9398
9399 * c.opt: Add CppReason to various flags.
9400 (Wdate-time): Re-sort.
9401 * c-common.c: Include c-common.h earlier.
9402 (struct reason_option_codes_t): Delete.
9403 (c_option_controlling_cpp_error): Prefix global type and struct
9404 with cpp_.
9405
9406 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9407
9408 * c.opt (Wnormalized): New.
9409 (Wnormalized=): Use Enum and Reject Negative.
9410 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
9411
9412 2014-09-08 Joseph Myers <joseph@codesourcery.com>
9413
9414 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
9415 digits of floating-point modes if -fbuilding-libgcc.
9416
9417 2014-09-05 Joseph Myers <joseph@codesourcery.com>
9418
9419 * c-cppbuiltin.c (c_cpp_builtins): Also define
9420 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
9421 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
9422 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
9423 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
9424 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
9425 __LIBGCC_STACK_GROWS_DOWNWARD__,
9426 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
9427 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
9428 __LIBGCC_DWARF_FRAME_REGISTERS__,
9429 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
9430 __LIBGCC_STACK_POINTER_REGNUM__ and
9431 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
9432 (builtin_define_with_value): Handle backslash-escaping in string
9433 macro values.
9434
9435 2014-09-05 Richard Biener <rguenther@suse.de>
9436
9437 PR middle-end/63148
9438 * c-format.c (check_format_arg): Properly handle
9439 effectively signed POINTER_PLUS_EXPR offset.
9440
9441 2014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
9442
9443 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
9444 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
9445 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
9446 and Init.
9447 * c-opts.c (c_common_handle_option): Do not handle here.
9448 (sanitize_cpp_opts): Likewise.
9449 * c-common.c (struct reason_option_codes_t): Handle
9450 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
9451
9452 2014-09-03 Marek Polacek <polacek@redhat.com>
9453
9454 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
9455
9456 2014-09-02 Jakub Jelinek <jakub@redhat.com>
9457 Balaji V. Iyer <balaji.v.iyer@intel.com>
9458 Igor Zamyatin <igor.zamyatin@intel.com>
9459
9460 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
9461 * c-common.c (c_common_reswords): Added _Cilk_for.
9462 * c-common.h (enum rid): Added RID_CILK_FOR.
9463 (cilk_for_number_of_iterations): Add declaration.
9464 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
9465 CILK_FOR.
9466 * c-pragma.c (init_pragma): Register "grainsize" pragma.
9467 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
9468
9469 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9470
9471 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
9472 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
9473 Wundef): Use CPP, Var and Init.
9474 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
9475
9476 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9477
9478 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
9479 * c-opts.c (c_common_handle_option): Do not handle here.
9480
9481 2014-08-25 Jason Merrill <jason@redhat.com>
9482
9483 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
9484 -std=c++14 and -std=gnu++14, rather than the reverse.
9485 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
9486 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
9487 * c-common.h (cxx_dialect): Remove cxx1y.
9488
9489 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
9490
9491 * c-common.h (enum cxx_dialect): Add cxx14.
9492 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
9493 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
9494 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
9495
9496 2014-08-22 Jason Merrill <jason@redhat.com>
9497
9498 * c.opt (std=gnu++17): Fix alias.
9499
9500 2014-08-22 Marek Polacek <polacek@redhat.com>
9501
9502 PR c++/62199
9503 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
9504 check for vector types. Drop LHS argument.
9505 * c-common.h (warn_logical_not_parentheses): Adjust.
9506
9507 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
9508
9509 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
9510 (Wmultichar): Likewise.
9511 (Wdate-time): Use C-family languages instead of Common. Use CPP
9512 and Var.
9513 * c-opts.c (c_common_handle_option): Do not handle the above
9514 options here.
9515 (sanitize_cpp_opts): Likewise.
9516
9517 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
9518
9519 PR fortran/44054
9520 * c-opts.c: Include tree-diagnostics.h.
9521 (c_diagnostic_finalizer): New.
9522 (c_common_initialize_diagnostics): Use it.
9523
9524 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9525
9526 PR preprocessor/51303
9527 * c-common.c (struct reason_option_codes_t option_codes):
9528 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
9529
9530 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9531
9532 PR c/60975
9533 PR c/53063
9534 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
9535 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
9536 (c_common_post_options): Call init_global_opts_from_cpp.
9537 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
9538
9539 2014-08-19 Marek Polacek <polacek@redhat.com>
9540
9541 PR c++/62153
9542 * c-common.c (maybe_warn_bool_compare): New function.
9543 * c-common.h (maybe_warn_bool_compare): Declare.
9544 * c.opt (Wbool-compare): New option.
9545
9546 2014-08-19 Marek Polacek <polacek@redhat.com>
9547
9548 * c.opt (Wc99-c11-compat): New option.
9549
9550 2014-08-19 Marek Polacek <polacek@redhat.com>
9551
9552 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
9553 to warn_c90_c99_compat.
9554 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
9555 to -1.
9556
9557 2014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
9558 Steven Bosscher <steven@gcc.gnu.org>
9559
9560 PR c/52952
9561 * c-format.c: Add extra_arg_loc and format_string_loc to struct
9562 format_check_results.
9563 (check_function_format): Use true and add comment for boolean
9564 argument.
9565 (finish_dollar_format_checking): Use explicit location when warning.
9566 (check_format_info): Likewise.
9567 (check_format_arg): Set extra_arg_loc and format_string_loc.
9568 (check_format_info_main): Use explicit location when warning.
9569 (check_format_types): Pass explicit location.
9570 (format_type_warning): Likewise.
9571
9572 2014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9573
9574 PR fortran/44054
9575 * c-format.c: Handle Fortran flags.
9576
9577 2014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
9578
9579 PR other/61962
9580 * array-notation-common.c (find_rank): Added handling for other
9581 types of references.
9582
9583 2014-08-10 Marek Polacek <polacek@redhat.com>
9584
9585 PR c/51849
9586 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
9587 * c.opt (Wc90-c99-compat): Add option.
9588
9589 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
9590
9591 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
9592
9593 2014-08-03 Marek Polacek <polacek@redhat.com>
9594
9595 * c-common.c (check_case_value): Add location_t parameter. Use it.
9596 (c_add_case_label): Pass loc to check_case_value.
9597
9598 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
9599
9600 * cilk.c: Use hash_map instead of pointer_map.
9601
9602 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
9603
9604 * c-gimplify.c: Use hash_set instead of pointer_set.
9605
9606 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
9607
9608 PR middle-end/61455
9609 * array-notation-common.c (extract_array_notation_exprs): Handling
9610 of DECL_EXPR added.
9611
9612 2014-08-01 Jakub Jelinek <jakub@redhat.com>
9613
9614 * c-common.h (min_align_of_type): Removed prototype.
9615 * c-common.c (min_align_of_type): Removed.
9616 * c-ubsan.h (ubsan_maybe_instrument_reference,
9617 ubsan_maybe_instrument_member_call): New prototypes.
9618 * c-ubsan.c: Include stor-layout.h and builtins.h.
9619 (ubsan_maybe_instrument_reference_or_call,
9620 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
9621 functions.
9622
9623 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
9624
9625 PR c++/60517
9626 * c.opt (-Wreturn-local-addr): Move to common.opt.
9627
9628 2014-07-30 Jason Merrill <jason@redhat.com>
9629
9630 PR c++/61659
9631 PR c++/61687
9632 Revert:
9633 * c.opt (-fuse-all-virtuals): New.
9634
9635 2014-07-30 Tom Tromey <tromey@redhat.com>
9636
9637 PR c/59855
9638 * c.opt (Wdesignated-init): New option.
9639 * c-common.c (c_common_attribute_table): Add "designated_init".
9640 (handle_designated_init): New function.
9641
9642 2014-07-24 Marek Polacek <polacek@redhat.com>
9643
9644 PR c/57653
9645 * c-opts.c (c_finish_options): If -imacros is in effect, return.
9646
9647 2014-07-16 Dodji Seketeli <dodji@redhat.com>
9648
9649 PR preprocessor/60723 - missing system-ness marks for macro tokens
9650 * c-ppoutput.c (struct print::prev_was_system_token): New data
9651 member.
9652 (init_pp_output): Initialize it.
9653 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
9654 (do_line_change): Return a flag saying if a line marker was
9655 emitted or not.
9656 (scan_translation_unit): Detect if the system-ness of the token we
9657 are about to emit is different from the one of the previously
9658 emitted token. If so, emit a line marker. Avoid emitting useless
9659 adjacent line markers. Avoid emitting line markers for tokens
9660 originating from the expansion of built-in macros.
9661 (scan_translation_unit_directives_only): Adjust.
9662
9663 2014-07-15 Marek Polacek <polacek@redhat.com>
9664
9665 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
9666 TYPE_MAX_VALUE is NULL.
9667
9668 2014-07-14 Jakub Jelinek <jakub@redhat.com>
9669
9670 PR middle-end/61294
9671 * c.opt (Wmemset-transposed-args): New warning.
9672
9673 2014-07-10 Jason Merrill <jason@redhat.com>
9674
9675 PR c++/61659
9676 PR c++/61687
9677 * c.opt (-fuse-all-virtuals): New.
9678
9679 2014-07-09 Richard Biener <rguenther@suse.de>
9680
9681 PR c-family/61741
9682 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
9683 using unsigned arithmetic if overflow does not wrap instead of
9684 if overflow is undefined.
9685
9686 2014-07-06 Marek Polacek <polacek@redhat.com>
9687
9688 PR c/6940
9689 * c.opt (Wsizeof-array-argument): New option.
9690
9691 2014-07-03 Jakub Jelinek <jakub@redhat.com>
9692
9693 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
9694 comments->count <= 1, as comments->entries might be NULL.
9695
9696 2014-07-01 Marek Polacek <polacek@redhat.com>
9697
9698 * c.opt (Wint-conversion): New option.
9699
9700 2014-07-01 Marek Polacek <polacek@redhat.com>
9701
9702 PR c/58286
9703 * c.opt (Wincompatible-pointer-types): New option.
9704
9705 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
9706
9707 PR c++/51400
9708 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
9709 Do not discard TYPE_QUALS of type.
9710
9711 2014-06-26 Jason Merrill <jason@redhat.com>
9712
9713 * c-common.h (enum cxx_dialect): Add cxx1z.
9714 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
9715 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
9716
9717 2014-06-26 Teresa Johnson <tejohnson@google.com>
9718
9719 * c-common.h (get_dump_info): Declare.
9720 * c-gimplify.c (c_genericize): Use saved dump files.
9721 * c-opts.c (c_common_parse_file): Begin and end dumps
9722 once around parsing invocation.
9723 (get_dump_info): New function.
9724
9725 2014-06-23 Marek Polacek <polacek@redhat.com>
9726 Andrew MacLeod <amacleod@redhat.com>
9727
9728 PR c/61553
9729 * c-common.c (get_atomic_generic_size): Don't segfault if the
9730 type doesn't have a size.
9731
9732 2014-06-20 Marek Polacek <polacek@redhat.com>
9733
9734 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
9735 (ubsan_walk_array_refs_r): New function.
9736 (c_genericize): Instrument array bounds.
9737 * c-ubsan.c: Include "internal-fn.h".
9738 (ubsan_instrument_division): Mark instrumented arrays as having
9739 side effects. Adjust ubsan_type_descriptor call.
9740 (ubsan_instrument_shift): Likewise.
9741 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
9742 (ubsan_instrument_bounds): New function.
9743 (ubsan_array_ref_instrumented_p): New function.
9744 (ubsan_maybe_instrument_array_ref): New function.
9745 * c-ubsan.h (ubsan_instrument_bounds): Declare.
9746 (ubsan_array_ref_instrumented_p): Declare.
9747 (ubsan_maybe_instrument_array_ref): Declare.
9748
9749 2014-06-20 Hale Wang <hale.wang@arm.com>
9750
9751 PR lto/61123
9752 * c.opt (fshort-enums): Add to LTO.
9753 * c.opt (fshort-wchar): Likewise.
9754
9755 2014-06-16 Marek Polacek <polacek@redhat.com>
9756
9757 PR c/60439
9758 * c.opt (Wswitch-bool): Add Var.
9759
9760 2014-06-12 Jakub Jelinek <jakub@redhat.com>
9761
9762 PR middle-end/61486
9763 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
9764 #pragma omp target teams or
9765 #pragma omp {,target }teams distribute simd.
9766
9767 2014-06-12 Jason Merrill <jason@redhat.com>
9768
9769 * c.opt (Wabi=, fabi-compat-version): New.
9770 * c-opts.c (c_common_handle_option): Handle -Wabi=.
9771 (c_common_post_options): Handle flag_abi_compat_version default.
9772 Disallow -fabi-compat-version=1.
9773 * c-common.h (abi_version_crosses): New.
9774
9775 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
9776
9777 * c-common.c (handle_section_attribute): Update handling for
9778 section names that are no longer trees.
9779
9780 2014-06-10 Jakub Jelinek <jakub@redhat.com>
9781
9782 PR fortran/60928
9783 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
9784 (omp_pragmas): ... back here.
9785
9786 2014-06-05 Marek Polacek <polacek@redhat.com>
9787
9788 PR c/49706
9789 * c-common.c (warn_logical_not_parentheses): New function.
9790 * c-common.h (warn_logical_not_parentheses): Declare.
9791 * c.opt (Wlogical-not-parentheses): New option.
9792
9793 2014-06-04 Marek Polacek <polacek@redhat.com>
9794
9795 PR c/30020
9796 * c-common.c (check_case_bounds): Add location parameter.
9797 Use it.
9798 (c_add_case_label): Pass loc to check_case_bounds.
9799
9800 2014-06-03 Marek Polacek <polacek@redhat.com>
9801
9802 PR c/60439
9803 * c.opt (Wswitch-bool): New option.
9804
9805 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
9806
9807 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
9808 Remove prototypes.
9809 (record_types_used_by_current_var_decl): Move prototype to where
9810 it belongs.
9811
9812 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
9813 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
9814 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
9815
9816 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
9817
9818 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
9819 * c-common.c (c_common_nodes_and_builtins): Don't initialize
9820 void_zero_node.
9821 * c-pretty-print.c (pp_c_void_constant): New function.
9822 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
9823 (c_pretty_printer::expression): Handle VOID_CST.
9824 * cilk.c (extract_free_variables): Likewise.
9825 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
9826 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
9827
9828 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
9829
9830 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
9831 * c-pragma.c (push_alignment): Adjust.
9832 (handle_pragma_push_options): Likewise.
9833
9834 2014-05-09 Marek Polacek <polacek@redhat.com>
9835
9836 PR c/50459
9837 * c-common.c (check_user_alignment): Return -1 if alignment is error
9838 node.
9839 (handle_aligned_attribute): Don't call default_conversion on
9840 FUNCTION_DECLs.
9841 (handle_vector_size_attribute): Likewise.
9842 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
9843 (handle_sentinel_attribute): Call default_conversion and allow even
9844 integral types as an argument.
9845
9846 2014-05-08 Marek Polacek <polacek@redhat.com>
9847
9848 PR c/61053
9849 * c-common.c (min_align_of_type): New function factored out from...
9850 (c_sizeof_or_alignof_type): ...here.
9851 * c-common.h (min_align_of_type): Declare.
9852
9853 2014-05-08 Marek Polacek <polacek@redhat.com>
9854
9855 PR c/61077
9856 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
9857 parameter type of main.
9858
9859 2014-05-07 DJ Delorie <dj@redhat.com>
9860
9861 * c-cppbuiltin.c (print_bits_of_hex): New.
9862 (builtin_define_type_minmax): Print values using hex so as not to
9863 require a pre-computed list of string values.
9864
9865 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
9866 Mike Stump <mikestump@comcast.net>
9867 Richard Sandiford <rdsandiford@googlemail.com>
9868
9869 * c-ada-spec.c: Include wide-int.h.
9870 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
9871 (dump_generic_ada_node): Use wide-int interfaces.
9872 * c-common.c: Include wide-int-print.h.
9873 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
9874 (pointer_int_sum): Use wide-int interfaces.
9875 (c_common_nodes_and_builtins): Use make_int_cst.
9876 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
9877 (handle_alloc_size_attribute): Use wide-int interfaces.
9878 (get_nonnull_operand): Likewise.
9879 * c-format.c (get_constant): Use tree_fits_uhwi_p.
9880 * c-lex.c: Include wide-int.h.
9881 (narrowest_unsigned_type): Take a widest_int rather than two
9882 HOST_WIDE_INTs.
9883 (narrowest_signed_type): Likewise.
9884 (interpret_integer): Update accordingly. Use wide-int interfaces.
9885 (lex_charconst): Use wide-int interfaces.
9886 * c-pretty-print.c: Include wide-int.h.
9887 (pp_c_integer_constant): Use wide-int interfaces.
9888 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
9889 INT_CST_LT_UNSIGNED.
9890
9891 2014-05-06 Richard Biener <rguenther@suse.de>
9892
9893 * c-opts.c (c_common_post_options): For -freestanding,
9894 -fno-hosted and -fno-builtin disable pattern recognition
9895 if not enabled explicitely.
9896
9897 2014-05-02 Marek Polacek <polacek@redhat.com>
9898
9899 * c.opt (Wsizeof-pointer-memaccess): Describe option.
9900
9901 2014-05-01 Marek Polacek <polacek@redhat.com>
9902
9903 PR c/43245
9904 * c.opt (Wdiscarded-qualifiers): Add.
9905
9906 2014-04-30 Marek Polacek <polacek@redhat.com>
9907
9908 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
9909 INT_MIN / -1 sanitization only for integer types.
9910
9911 2014-04-25 Marek Polacek <polacek@redhat.com>
9912
9913 PR c/18079
9914 * c-common.c (handle_noinline_attribute): Warn if the attribute
9915 conflicts with always_inline attribute.
9916 (handle_always_inline_attribute): Warn if the attribute conflicts
9917 with noinline attribute.
9918
9919 2014-04-25 Marek Polacek <polacek@redhat.com>
9920
9921 PR c/60156
9922 * c-common.c (check_main_parameter_types): Warn about variadic main.
9923
9924 2014-04-24 Mike Stump <mikestump@comcast.net>
9925
9926 * c.opt (Wshadow-ivar): Default to on.
9927
9928 2014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
9929
9930 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
9931
9932 2014-04-23 Marek Polacek <polacek@redhat.com>
9933
9934 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
9935
9936 2014-04-22 Jakub Jelinek <jakub@redhat.com>
9937
9938 PR sanitizer/60275
9939 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
9940 if flag_sanitize_undefined_trap_on_error.
9941 (ubsan_instrument_division, ubsan_instrument_shift,
9942 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
9943 if !flag_sanitize_recover.
9944
9945 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
9946
9947 PR libstdc++/43622
9948 * c-common.c (registered_builtin_types): Make non-static.
9949 * c-common.h (registered_builtin_types): Declare.
9950
9951 2014-04-14 Richard Biener <rguenther@suse.de>
9952 Marc Glisse <marc.glisse@inria.fr>
9953
9954 PR c/60819
9955 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
9956 apply may-alias the scalar pointer type when applicable.
9957
9958 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
9959
9960 PR middle-end/60467
9961 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
9962 as possible argument for Cilk_spawn.
9963
9964 2014-04-11 Tobias Burnus <burnus@net-b.de>
9965
9966 PR c/60194
9967 * c.opt (Wformat-signedness): Add
9968 * c-format.c(check_format_types): Use it.
9969
9970 2014-04-11 Jason Merrill <jason@redhat.com>
9971
9972 PR c++/57926
9973 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
9974 default_conversion for an array argument.
9975
9976 2014-04-08 Marek Polacek <polacek@redhat.com>
9977
9978 PR sanitizer/60745
9979 * c-ubsan.c: Include asan.h.
9980 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
9981
9982 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
9983
9984 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
9985
9986 2014-04-02 Marek Polacek <polacek@redhat.com>
9987
9988 * c-common.h (c_expand_expr): Remove declaration.
9989
9990 2014-03-28 Jakub Jelinek <jakub@redhat.com>
9991
9992 PR c++/60689
9993 * c-common.c (add_atomic_size_parameter): When creating new
9994 params vector, push the size argument first.
9995
9996 2014-03-26 Jakub Jelinek <jakub@redhat.com>
9997
9998 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9999 ubsan_instrument_vla, ubsan_instrument_return): Adjust
10000 ubsan_create_data callers.
10001
10002 2014-03-22 Jakub Jelinek <jakub@redhat.com>
10003
10004 PR debug/60603
10005 * c-opts.c (c_finish_options): Restore cb_file_change call to
10006 <built-in>.
10007
10008 2014-03-13 Jakub Jelinek <jakub@redhat.com>
10009
10010 PR middle-end/36282
10011 * c-pragma.c (apply_pragma_weak): Only look at
10012 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
10013 DECL_ASSEMBLER_NAME_SET_P (decl).
10014 (maybe_apply_pending_pragma_weaks): Exit early if
10015 vec_safe_is_empty (pending_weaks) rather than only when
10016 !pending_weaks.
10017 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
10018 set assembler name back to NULL afterwards.
10019
10020 2014-03-11 Jason Merrill <jason@redhat.com>
10021
10022 * c.opt: Add -std=gnu++14.
10023
10024 2014-03-11 Ian Bolton <ian.bolton@arm.com>
10025
10026 * c-opts.c (c_common_post_options): Don't override
10027 -ffp-contract=fast if unsafe-math-optimizations is on.
10028
10029 2014-03-08 Paulo Matos <paulo@matos-sorge.com>
10030
10031 * c.opt: Enable LTO FE for fshort-double.
10032
10033 2014-03-07 Jason Merrill <jason@redhat.com>
10034
10035 * c.opt: Add -std=c++14.
10036
10037 2014-03-06 Marek Polacek <polacek@redhat.com>
10038
10039 PR c/60197
10040 * cilk.c (contains_cilk_spawn_stmt): New function.
10041 (contains_cilk_spawn_stmt_walker): Likewise.
10042 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
10043 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
10044
10045 2014-03-03 Jakub Jelinek <jakub@redhat.com>
10046
10047 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
10048 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
10049 even when flag_preprocess_only.
10050
10051 2014-02-26 Jason Merrill <jason@redhat.com>
10052
10053 PR c++/59231
10054 PR c++/11586
10055 * c-common.c (shorten_compare): Don't check
10056 c_inhibit_evaluation_warnings.
10057
10058 2014-02-19 Jakub Jelinek <jakub@redhat.com>
10059
10060 PR c/37743
10061 * c-common.c (c_common_nodes_and_builtins): When initializing
10062 c_uint{16,32,64}_type_node, also set corresponding
10063 uint{16,32,64}_type_node to the same value.
10064
10065 PR c++/60267
10066 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
10067 for PRAGMA_IVDEP if flag_preprocess_only.
10068
10069 2014-02-12 Jakub Jelinek <jakub@redhat.com>
10070
10071 PR c/60101
10072 * c-common.c (merge_tlist): If copy is true, call new_tlist,
10073 if false, add ADD itself, rather than vice versa.
10074 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
10075 copy. For SAVE_EXPR, only call merge_tlist once.
10076
10077 2014-02-08 Jakub Jelinek <jakub@redhat.com>
10078
10079 PR middle-end/60092
10080 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
10081 and tree_to_uhwi.
10082 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
10083 functions.
10084 (c_common_attribute_table): Add alloc_align and assume_aligned
10085 attributes.
10086
10087 2014-02-06 Marek Polacek <polacek@redhat.com>
10088
10089 PR c/60087
10090 * c-common.c (warn_for_sign_compare): Call warning_at with location
10091 instead of warning.
10092
10093 2014-02-05 Marek Polacek <polacek@redhat.com>
10094
10095 PR c/53123
10096 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
10097 statement.
10098
10099 2014-02-04 Marek Polacek <polacek@redhat.com>
10100
10101 PR c/60036
10102 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
10103 SAVE_EXPR.
10104
10105 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
10106
10107 PR c++/53017
10108 PR c++/59211
10109 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
10110 handle_vector_size_attribute, handle_nonnull_attribute): Call
10111 default_conversion on the attribute argument.
10112 (handle_nonnull_attribute): Increment the argument number.
10113
10114 2014-01-31 Marek Polacek <polacek@redhat.com>
10115
10116 PR c/59963
10117 * c-common.c (add_atomic_size_parameter): Pass vNULL to
10118 build_function_call_vec.
10119 (resolve_overloaded_builtin): Likewise.
10120 * c-common.h (build_function_call_vec): Adjust declaration.
10121
10122 2014-01-30 Marek Polacek <polacek@redhat.com>
10123
10124 PR c/59940
10125 * c-common.h (unsafe_conversion_p): Adjust declaration.
10126 (warnings_for_convert_and_check): Likewise.
10127 (convert_and_check): Likewise.
10128 * c-common.c (unsafe_conversion_p): Add location parameter. Call
10129 expansion_point_location_if_in_system_header on it.
10130 (warnings_for_convert_and_check): Add location parameter. Call
10131 expansion_point_location_if_in_system_header on it. Use it.
10132 (convert_and_check): Add location parameter. Use it.
10133 (conversion_warning): Likewise.
10134 (c_add_case_label): Adjust convert_and_check calls.
10135 (scalar_to_vector): Adjust unsafe_conversion_p calls.
10136
10137 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
10138
10139 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
10140 flag_cilkplus.
10141 * c-pragma.c (init_pragma): Likewise.
10142 * c.opt: Likewise.
10143
10144 2014-01-23 Marek Polacek <polacek@redhat.com>
10145
10146 PR c/59846
10147 * c-common.c (shorten_compare): Add location_t parameter.
10148 * c-common.h (shorten_binary_op): Adjust declaration.
10149
10150 2014-01-23 Marek Polacek <polacek@redhat.com>
10151
10152 PR c/58346
10153 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
10154 * c-common.h: Declare it.
10155
10156 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
10157
10158 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
10159 * c-ada-spec.c (dump_ads): Likewise.
10160 (cpp_check): Likewise.
10161 (dump_ada_specs): Likewise.
10162
10163 2014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
10164
10165 PR c++/49718
10166 * c-common.c (handle_no_instrument_function_attribute): Allow
10167 no_instrument_function attribute in class member
10168 definition/declaration.
10169
10170 2014-01-15 Jakub Jelinek <jakub@redhat.com>
10171
10172 PR c/58943
10173 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
10174 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
10175 being COMPOUND_EXPR.
10176 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
10177 operand a SAVE_EXPR and second MODIFY_EXPR.
10178
10179 2014-01-09 Jakub Jelinek <jakub@redhat.com>
10180
10181 PR target/58115
10182 * c-pch.c (c_common_write_pch): Call
10183 prepare_target_option_nodes_for_pch.
10184
10185 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10186
10187 Update copyright years
10188
10189 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10190
10191 * array-notation-common.c, c-cilkplus.c: Use the standard form for
10192 the copyright notice.
10193
10194 2013-12-28 Eric Botcazou <ebotcazou@adacore.com>
10195
10196 * c-ada-spec.c (print_constructor): New function.
10197 (print_destructor): Retrieve the origin of the destructor.
10198 (print_ada_declaration): Revamp handling of constructors/destructors.
10199
10200 2013-12-23 Stuart Hastings <stuart@apple.com>
10201 Bill Maddox <maddox@google.com>
10202 Jason Merrill <jason@redhat.com>
10203
10204 * c.opt: Add -fdeclone-ctor-dtor.
10205 * c-opts.c (c_common_post_options): Default to on iff -Os.
10206
10207 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
10208
10209 * c-common.c (c_common_attribute_table): Added "cilk simd function"
10210 attribute.
10211 * c-pragma.h (enum pragma_cilk_clause): Remove.
10212 (enum pragma_omp_clause): Added the following fields:
10213 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
10214 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
10215 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
10216 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
10217 PRAGMA_CILK_CLAUSE_UNIFORM.
10218
10219
10220 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
10221
10222 * cilk.c (cilk_outline): Made this function non-static.
10223 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
10224 (create_cilk_wrapper): Added a new parameter: a function pointer.
10225 (c_install_body_w_frame_cleanup): Remove
10226 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
10227 * c-common.h (cilk_outline): New prototype.
10228 (gimplify_cilk_spawn): Removed two parameters.
10229 (cilk_install_body_with_frame_cleanup): New prototype.
10230 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
10231 CILK_SPAWN_STMT case.
10232
10233 2013-12-11 Bernd Schmidt <bernds@codesourcery.com>
10234
10235 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
10236
10237 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
10238 (int_array_type_node): Remove.
10239 * c-common.c (c_common_nodes_and_builtins): Don't build it.
10240
10241 2013-12-05 Marek Polacek <polacek@redhat.com>
10242
10243 PR c/52023
10244 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
10245 [ADJUST_FIELD_ALIGN].
10246
10247 2013-12-04 Joseph Myers <joseph@codesourcery.com>
10248
10249 PR c/52023
10250 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
10251 and check field alignment if set.
10252 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
10253 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
10254
10255 2013-12-04 Jakub Jelinek <jakub@redhat.com>
10256 Marek Polacek <polacek@redhat.com>
10257
10258 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
10259 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
10260
10261 2013-11-29 H.J. Lu <hongjiu.lu@intel.com>
10262
10263 PR c/59309
10264 * cilk.c (gimplify_cilk_spawn): Properly handle function without
10265 arguments.
10266
10267 2013-11-29 Jakub Jelinek <jakub@redhat.com>
10268
10269 PR c/59280
10270 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
10271 goto invalid. If it is error_mark_node, don't issue further
10272 diagnostics.
10273
10274 2013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
10275
10276 * c.opt (Wopenmp-simd): New.
10277
10278 2013-11-22 Jakub Jelinek <jakub@redhat.com>
10279
10280 * c-ubsan.h (ubsan_instrument_return): New prototype.
10281 * c-ubsan.c (ubsan_instrument_return): New function.
10282
10283 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
10284
10285 * c-common.c: Add required include files from gimple.h.
10286 * c-gimplify.c: Likewise.
10287 * cilk.c: Likewise.
10288
10289 2013-11-22 David Malcolm <dmalcolm@redhat.com>
10290
10291 * c-common.c (unsafe_conversion_p): Remove use of
10292 EXPR_LOC_OR_HERE macro.
10293 (conversion_warning): Likewise.
10294 (warnings_for_convert_and_check): Likewise.
10295 (warn_for_collisions_1): Likewise.
10296 (shorten_compare): Likewise, and remove use of in_system_header
10297 macro, using the location from the former.
10298 * c-lex.c (dump_one_header): Remove use of input_filename macro.
10299 (cb_def_pragma): Remove use of in_system_header macro.
10300 (lex_string): Likewise.
10301 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
10302
10303 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10304 Mike Stump <mikestump@comcast.net>
10305 Richard Sandiford <rdsandiford@googlemail.com>
10306
10307 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
10308 instead of TREE_INT_CST_LOW, in cases where there is a protecting
10309 tree_fits_shwi_p or tree_fits_uhwi_p.
10310 (dump_generic_ada_node): Likewise.
10311 * c-format.c (check_format_arg): Likewise.
10312 * c-pretty-print.c (pp_c_integer_constant): Likewise.
10313
10314 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10315
10316 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
10317
10318 2013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
10319
10320 PR c/53001
10321 * c-common.c (unsafe_conversion_p): Make this function
10322 return an enumeration with more detail.
10323 (conversion_warning): Use the new return type of
10324 unsafe_conversion_p to separately warn either about conversions
10325 that lower floating point number precision or about the other
10326 kinds of conversions.
10327 * c-common.h (enum conversion_safety): New enumeration.
10328 (unsafe_conversion_p): switching return type to
10329 conversion_safety enumeration.
10330 * c.opt: Adding new warning -Wfloat-conversion and
10331 enabling it with -Wconversion.
10332
10333 2013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
10334
10335 * c-opts.c: Include plugin.h.
10336 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
10337
10338 2013-11-19 Marek Polacek <polacek@redhat.com>
10339
10340 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
10341 call.
10342 (ubsan_instrument_shift): Likewise.
10343 (ubsan_instrument_vla): Likewise.
10344
10345 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10346
10347 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
10348 cast to unsigned type.
10349
10350 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10351
10352 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
10353 tree_low_cst.
10354 (complete_array_type): Update comment to refer to tree_to_[su]hwi
10355 rather than tree_low_cst.
10356
10357 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10358
10359 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
10360 tree_to_uhwi throughout.
10361
10362 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10363
10364 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
10365 tree_low_cst (..., 0) with tree_to_shwi throughout.
10366
10367 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10368
10369 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
10370 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
10371
10372 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10373
10374 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
10375 host_integerp (..., 0) with tree_fits_shwi_p throughout.
10376
10377 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
10378
10379 * c-cilkplus.c: New file.
10380 * c-common.c (readonly_error): Add location argument.
10381 * c-common.h (readonly_error): Same.
10382 (c_finish_cilk_clauses): Protoize.
10383 (c_check_cilk_loop): Same.
10384 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
10385 Do not fail on error_mark_node.
10386 Abstract increment canonicalization to here...
10387 (c_omp_for_incr_canonicalize_ptr): New.
10388 c-pragma.c (init_pragma): Register "simd" pragma.
10389 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
10390 (enum pragma_cilk_clause): New.
10391
10392 2013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
10393
10394 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
10395 wchar_type and host_integerp checks.
10396
10397 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
10398
10399 * c-common.c: Likewise.
10400 * c-gimplify.c: Likewise.
10401 * cilk.c: Likewise.
10402
10403 2013-11-14 Diego Novillo <dnovillo@google.com>
10404
10405 * c-common.c: Include fold-const.h.
10406 Include stor-layout.h.
10407 Include calls.h.
10408 Include stringpool.h.
10409 Include attribs.h.
10410 Include varasm.h.
10411 Include trans-mem.h.
10412 * c-cppbuiltin.c: Include stor-layout.h.
10413 Include stringpool.h.
10414 * c-format.c: Include stringpool.h.
10415 * c-lex.c: Include stringpool.h.
10416 Include stor-layout.h.
10417 * c-pragma.c: Include stringpool.h.
10418 Include attribs.h.
10419 Include varasm.h.
10420 Include gcc-symtab.h.
10421 * c-pretty-print.c: Include stor-layout.h.
10422 Include attribs.h.
10423 * cilk.c: Include stringpool.h.
10424 Include calls.h.
10425
10426 2013-11-13 Joseph Myers <joseph@codesourcery.com>
10427
10428 * c-common.h (enum rid): Add RID_AUTO_TYPE.
10429 * c-common.c (c_common_reswords): Add __auto_type.
10430 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
10431
10432 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
10433
10434 * c-common.c: Include gimplify.h.
10435 * c-gimplify.c: Likewise.
10436 * cilk.c: Likewise.
10437 * c-omp.c: Include gimple-expr.h instead of gimple.h.
10438 * c-ubsan.c: Don't include gimple.h.
10439
10440 2013-11-12 Joseph Myers <joseph@codesourcery.com>
10441
10442 * c-common.c (c_common_reswords): Add _Thread_local.
10443
10444 2013-11-09 Joseph Myers <joseph@codesourcery.com>
10445
10446 * c-common.c (atomic_size_supported_p): New function.
10447 (resolve_overloaded_atomic_exchange)
10448 (resolve_overloaded_atomic_compare_exchange)
10449 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
10450 Use it instead of comparing size with a local list of sizes.
10451
10452 2013-11-07 Andrew MacLeod <amacleod@redhat.com>
10453 Joseph Myers <joseph@codesourcery.com>
10454
10455 * c-common.h (enum rid): Add RID_ATOMIC.
10456 * c-common.c (c_common_reswords): Add _Atomic.
10457 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
10458 (keyword_is_type_qualifier): Accept RID_ATOMIC.
10459 * c-format.c (check_format_types): Check for extra _Atomic
10460 qualifiers in format argument.
10461 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
10462 (pp_c_type_qualifier_list): Mention _Atomic in comment.
10463
10464 2013-11-06 Tobias Burnus <burnus@net-b.de>
10465
10466 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
10467
10468 2013-11-06 Joseph Myers <joseph@codesourcery.com>
10469
10470 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
10471 standards modes.
10472 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
10473 to mean lack of IEEE 754 support.
10474
10475 2013-11-05 Tobias Burnus <burnus@net-b.de>
10476
10477 * c.opt (-Wdate-time): New option
10478 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
10479
10480 2013-11-05 Joseph Myers <joseph@codesourcery.com>
10481
10482 * c-cppbuiltin.c (cpp_iec_559_value): Test
10483 flag_excess_precision_cmdline not flag_excess_precision.
10484
10485 2013-11-05 Tobias Burnus <burnus@net-b.de>
10486
10487 * c.opt (fopenmp-simd): New option.
10488 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
10489 (omp_pragmas): ... this new struct.
10490 (c_pp_lookup_pragma): Also walk omp_pragmas.
10491 (init_pragma): Init pragmas for -fopenmp-simd.
10492
10493 2013-11-04 Marek Polacek <polacek@redhat.com>
10494
10495 PR c++/58979
10496 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
10497
10498 2013-11-04 Joseph Myers <joseph@codesourcery.com>
10499
10500 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
10501 New functions.
10502 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
10503
10504 2013-11-04 Eric Botcazou <ebotcazou@adacore.com>
10505
10506 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
10507 (dump_ada_specs): Adjust prototype of second callback.
10508 * c-ada-spec.c (cpp_check): New global variable.
10509 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
10510 (print_generic_ada_decl): Likewise.
10511 (has_static_fields): Change return type to bool and add guard.
10512 (has_nontrivial_methods): New predicate.
10513 (is_tagged_type): Change return type to bool.
10514 (separate_class_package): Call has_nontrivial_methods.
10515 (pp_ada_tree_identifier): Minor tweaks.
10516 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
10517 (dump_ada_array_domains): Likewise.
10518 (dump_ada_array_type): Likewise.
10519 (dump_template_types): Remove cpp_check parameter and do not pass it to
10520 dump_generic_ada_node.
10521 (dump_ada_template): Likewise.
10522 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
10523 recursively.
10524 (print_ada_methods): Change return type to integer. Remove cpp_check
10525 parameter and do not pass it down.
10526 (dump_nested_types): Remove cpp_check parameter and do not pass it to
10527 dump_generic_ada_node.
10528 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
10529 accessing methods.
10530 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
10531 down. Use has_nontrivial_methods to recognize C++ classes. Use return
10532 value of print_ada_methods.
10533 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
10534 Set cpp_check to it before invoking dump_ada_nodes.
10535 (dump_ada_specs): Likewise.
10536
10537 2013-11-03 Marek Polacek <polacek@redhat.com>
10538
10539 * c-ubsan.c: Don't include hash-table.h.
10540 (ubsan_instrument_vla): New function.
10541 * c-ubsan.h: Declare it.
10542
10543 2013-10-31 David Malcolm <dmalcolm@redhat.com>
10544
10545 Automated part of renaming of symtab_node_base to symtab_node.
10546
10547 Patch autogenerated by rename_symtab.py from
10548 https://github.com/davidmalcolm/gcc-refactoring-scripts
10549 revision 58bb219cc090b2f4516a9297d868c245495ee622
10550
10551 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
10552 symtab_node_base to symtab_node.
10553
10554 2013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
10555
10556 Implement C++14 digit separators.
10557 * c-lex.c (interpret_float): Remove digit separators from scratch string
10558 before building real literal.
10559
10560 2013-10-30 Jakub Jelinek <jakub@redhat.com>
10561
10562 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
10563
10564 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
10565
10566 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
10567 fields.
10568 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
10569 enabled.
10570 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
10571 (insert_cilk_frame): New prototype.
10572 (cilk_init_builtins): Likewise.
10573 (gimplify_cilk_spawn): Likewise.
10574 (c_cilk_install_body_w_frame_cleanup): Likewise.
10575 (cilk_detect_spawn_and_unwrap): Likewise.
10576 (cilk_set_spawn_marker): Likewise.
10577 (build_cilk_sync): Likewise.
10578 (build_cilk_spawn): Likewise.
10579 * cilk.c: New file.
10580
10581 2013-10-29 David Malcolm <dmalcolm@redhat.com>
10582
10583 Patch autogenerated by refactor_symtab.py from
10584 https://github.com/davidmalcolm/gcc-refactoring-scripts
10585 revision 58bb219cc090b2f4516a9297d868c245495ee622
10586
10587 * c-gimplify.c (c_genericize): Update for conversion of symtab types
10588 to a true class hierarchy.
10589 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
10590
10591 2013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
10592
10593 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
10594
10595 2013-10-26 Jeff Law <law@redhat.com>
10596
10597 * c-common.c (c_define_builtins): Remove mudflap support.
10598 * c.opt: Ignore and warn for mudflap options.
10599
10600 2013-10-24 Tobias Burnus <burnus@net-b.de>
10601
10602 PR other/33426
10603 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
10604 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
10605
10606 2013-10-23 Jason Merrill <jason@redhat.com>
10607
10608 * c-format.c (gcc_cxxdiag_char_table): Add %X.
10609
10610 2013-10-11 Jakub Jelinek <jakub@redhat.com>
10611
10612 * c-common.h (omp_clause_mask::operator !=): New method.
10613 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
10614 instead of if (mask & something) tests everywhere.
10615
10616 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
10617 201307 instead of 201107.
10618 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
10619 (c_common_attribute_table): Add "omp declare target" and
10620 "omp declare simd" attributes.
10621 (handle_omp_declare_target_attribute,
10622 handle_omp_declare_simd_attribute): New functions.
10623 * c-omp.c: Include c-pragma.h.
10624 (c_finish_omp_taskgroup): New function.
10625 (c_finish_omp_atomic): Add swapped argument, if true,
10626 build the operation first with rhs, lhs arguments and use NOP_EXPR
10627 build_modify_expr.
10628 (c_finish_omp_for): Add code argument, pass it down to make_code.
10629 (c_omp_split_clauses): New function.
10630 (c_split_parallel_clauses): Removed.
10631 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
10632 c_omp_declare_simd_clauses_to_decls): New functions.
10633 * c-common.h (omp_clause_mask): New type.
10634 (OMP_CLAUSE_MASK_1): Define.
10635 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
10636 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
10637 omp_clause_mask::operator |, omp_clause_mask::operator &,
10638 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
10639 omp_clause_mask::operator ==): New methods.
10640 (enum c_omp_clause_split): New.
10641 (c_finish_omp_taskgroup): New prototype.
10642 (c_finish_omp_atomic): Add swapped argument.
10643 (c_finish_omp_for): Add code argument.
10644 (c_omp_split_clauses): New prototype.
10645 (c_split_parallel_clauses): Removed.
10646 (c_omp_declare_simd_clauses_to_numbers,
10647 c_omp_declare_simd_clauses_to_decls): New prototypes.
10648 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
10649 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
10650 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
10651 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
10652 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
10653 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
10654 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
10655 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
10656 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
10657 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
10658 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
10659 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
10660 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
10661 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
10662 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
10663 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
10664 PRAGMA_OMP_CLAUSE_UNIFORM.
10665
10666 2013-10-09 Marc Glisse <marc.glisse@inria.fr>
10667
10668 PR tree-optimization/20318
10669 * c-common.c (handle_returns_nonnull_attribute): New function.
10670 (c_common_attribute_table): Add returns_nonnull.
10671
10672 2013-10-03 Marc Glisse <marc.glisse@inria.fr>
10673
10674 PR c++/19476
10675 * c.opt (fcheck-new): Move to common.opt.
10676
10677 2013-09-25 Marek Polacek <polacek@redhat.com>
10678 Jakub Jelinek <jakub@redhat.com>
10679
10680 PR sanitizer/58413
10681 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
10682 an expression if we can prove it is correct.
10683 (ubsan_instrument_division): Likewise. Remove unnecessary
10684 check.
10685
10686 2013-09-18 Marek Polacek <polacek@redhat.com>
10687
10688 PR sanitizer/58411
10689 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
10690 Declare it.
10691 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
10692
10693 2013-09-14 Iain Sandoe <iain@codesourcery.com>
10694
10695 PR target/48094
10696 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
10697 fobjc-gc, freplace-objc-classes): Accept for LTO.
10698
10699 2013-09-13 Jacek Caban <jacek@codeweavers.com>
10700
10701 * c-target.def: New hook
10702
10703 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
10704
10705 PR c++/43452
10706 * c.opt (Wdelete-incomplete): Add.
10707
10708 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
10709
10710 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
10711 (vector_types_compatible_elements_p): New function.
10712 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
10713 declaration.
10714 (vector_types_compatible_elements_p): Declare.
10715
10716 2013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
10717
10718 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
10719 a virtual member function.
10720 (pp_simple_type_specifier): Remove.
10721 (pp_c_type_specifier): Likewise.
10722 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
10723 Rename from pp_c_type_specifier. Adjust.
10724 (c_pretty_printer::c_pretty_printer): Do not assign to
10725 simple_type_specifier.
10726
10727 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10728
10729 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
10730 member function.
10731 (c_pretty_printer::storage_class_specifier): Likewise.
10732 (c_pretty_printer::initializer): Likewise.
10733 (pp_declaration): Remove.
10734 (pp_declaration_specifiers): Likewise.
10735 (pp_abstract_declarator): Likewise.
10736 (pp_declarator): Likewise.
10737 (pp_type_id): Likewise.
10738 (pp_statement): Likewise.
10739 (pp_constant): Likewise.
10740 (pp_id_expression): Likewise.
10741 (pp_primary_expression): Likewise.
10742 (pp_unary_expression): Likewise.
10743 (pp_multiplicative_expression): Likewise.
10744 (pp_conditional_expression): Likewise.
10745 (pp_assignment_expression): Likewise.
10746 (pp_expression): Likewise.
10747 (pp_c_type_id): Likewise.
10748 (pp_c_storage_class_specifier): Likewise.
10749 * c-pretty-print.c (pp_c_type_cast): Tidy.
10750 (pp_c_pointer): Likewise.
10751 (pp_c_type_specifier): Likewise.
10752 (pp_c_parameter_type_list): Likewise.
10753 (pp_c_function_definition): Likewise.
10754 (pp_c_init_declarator): Likewise.
10755 (pp_c_initializer_list): Likewise.
10756 (pp_c_constructor_elts): Likewise.
10757 (c_pretty_printer::direct_abstract_declarator): Likewise.
10758 (c_pretty_printer::declaration_specifiers): Likewise.
10759 (c_pretty_printer::primary_expression): Likewise.
10760 (c_pretty_printer::postfix_expression): Likewise.
10761 (c_pretty_printer::type_id): Rename from pp_c_type_id.
10762 (c_pretty_printer::storage_class_specifier): Rename from
10763 pp_c_storage_class_specifier.
10764 (c_pretty_printer::initializer): Rename from pp_c_initializer.
10765 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
10766 storage_class_specifier, initializer, offset_list, flags.
10767
10768 2013-08-30 Marek Polacek <polacek@redhat.com>
10769
10770 * c-ubsan.c: New file.
10771 * c-ubsan.h: New file.
10772
10773 2013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
10774
10775 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
10776 member function.
10777 (c_pretty_printer::declaration_specifiers): Likewise.
10778 (c_pretty_printer::declarator): Likewise.
10779 (c_pretty_printer::abstract_declarator): Likewise.
10780 (c_pretty_printer::direct_abstract_declarator): Likewise.
10781 (c_pretty_printer::direct_declarator): Likewise.
10782 (c_pretty_printer::function_specifier): Likewise.
10783 (pp_declaration): Adjust.
10784 (pp_declaration_specifiers): Likewise.
10785 (pp_abstract_declarator): Likewise.
10786 (pp_direct_declarator): Likewise.
10787 (pp_function_specifier): Likewise.
10788 (pp_direct_abstract_declarator): Remove as unused.
10789 (pp_c_declaration): Remove.
10790 (pp_c_declaration_specifiers): Likewise.
10791 (pp_c_declarator): Likewise.
10792 (pp_c_direct_declarator): Likewise.
10793 (pp_c_function_specifier): Likewise.
10794 (pp_c_direct_abstract_declarator): Likewise.
10795 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
10796 from pp_c_abstract_declarator. Adjust.
10797 (c_pretty_printer::direct_abstract_declarator): Rename from
10798 pp_c_direct_abstract_declarator. Adjust.
10799 (c_pretty_printer::function_specifier): Rename from
10800 pp_c_function_specifier. Adjust.
10801 (c_pretty_printer::declaration_specifiers): Rename from
10802 pp_c_declaration_specifiers. Adjust.
10803 (c_pretty_printer::direct_declarator): Rename from
10804 pp_c_direct_declarator. Adjust.
10805 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
10806 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
10807 (c_pretty_printer::c_pretty_printer): Do not assign to
10808 declaration, declaration_specifiers, declarator,
10809 direct_declarator, direct_abstract_declarator, function_specifier.
10810
10811 2013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
10812
10813 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
10814 virtual member function.
10815 (c_pretty_printer::multiplicative_expression): Likewise.
10816 (c_pretty_printer::conditional_expression): Likewise.
10817 (c_pretty_printer::assignment_expression): Likewise.
10818 (c_pretty_printer::expression): Likewise.
10819 (pp_unary_expression): Adjust.
10820 (pp_multiplicative_expression): Likewise.
10821 (pp_assignment_expression): Likewise.
10822 (pp_conditional_expression): Likewise.
10823 (pp_expression): Likewise.
10824 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
10825 from pp_c_unary_expression. Adjust.
10826 (c_pretty_printer::multiplicative_expression): Rename from
10827 pp_c_multiplicative_expression. Adjust.
10828 (c_pretty_printer::conditional_expression): Rename from
10829 pp_c_conditional_expression. Adjust.
10830 (c_pretty_printer::assignment_expression): Rename from
10831 pp_c_assignment_expression. Adjust.
10832 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
10833 (c_pretty_printer::c_pretty_printer): Do not assign to
10834 unary_expression, multiplicative_expression,
10835 conditional_expression, expression.
10836
10837 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10838
10839 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
10840 virtual member function.
10841 (pp_postfix_expression): Adjust.
10842 (pp_c_postfix_expression): Remove.
10843 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
10844 from pp_c_postfix_expression. Adjust.
10845 (c_pretty_printer::c_pretty_printer): Do not assign to
10846 postfix_expression.
10847
10848 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10849
10850 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
10851 virtua member function.
10852 (pp_primary_expression): Adjust.
10853 (pp_c_primary_expression): Remove.
10854 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
10855 from pp_c_primary_expression. Adjust.
10856 (pp_c_initializer_list): Use pp_primary_expression.
10857 (c_pretty_printer::c_pretty_printer): Do not assign to
10858 primary_expression.
10859
10860 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10861
10862 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
10863 * c-pretty-print.c (M_): Remove.
10864 (c_pretty_printer::translate_string): Define.
10865 (pp_c_type_specifier): Use it.
10866 (pp_c_primary_expression): Likewise.
10867 (pp_c_expression): Likewise.
10868
10869 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
10870
10871 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
10872 virtual function.
10873 (pp_c_id_expression): Remove.
10874 (pp_id_expression): Adjust.
10875 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
10876 pp_c_id_expression. Adjust.
10877 (pp_c_postfix_expression): Use pp_id_expression.
10878 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
10879
10880 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
10881
10882 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
10883 member function.
10884 (pp_constant): Adjust.
10885 (pp_c_constant): Remove.
10886 * c-pretty-print.c (c_pretty_printer::constant): Rename from
10887 pp_c_constant. Adjust.
10888 (pp_c_constant)
10889 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
10890 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
10891
10892 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
10893
10894 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
10895 (c_pretty_printer::c_pretty_printer): Declare.
10896 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
10897 c_pretty_printer_init. Adjust.
10898 (print_c_tree): Do not call c_pretty_printer_init.
10899 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
10900
10901 2013-08-09 Arnaud Charlet <charlet@adacore.com>
10902
10903 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
10904
10905 2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
10906
10907 PR c++/58080
10908 * c-common.c (pointer_int_sum): Add bool parameter.
10909 * c-common.h (pointer_int_sum): Adjust declaration.
10910
10911 2013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
10912
10913 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
10914 c_pretty_printer variable.
10915
10916 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
10917
10918 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
10919 (pp_base): Remove.
10920 (pp_c_base): Likewise. Adjust users.
10921 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
10922 (pp_c_whitespace): Do not call pp_base.
10923 (pp_c_left_paren): Likewise.
10924 (pp_c_right_paren): Likewise.
10925 (pp_c_left_brace): Likewise.
10926 (pp_c_right_brace): Likewise.
10927 (pp_c_left_bracket): Likewise.
10928 (pp_c_right_bracket): Likewise.
10929 (pp_c_dot): Likewise.
10930 (pp_c_ampersand): Likewise.
10931 (pp_c_star): Likewise.
10932 (pp_c_arrow): Likewise.
10933 (pp_c_semicolon): Likewise.
10934 (pp_c_complement): Likewise.
10935 (pp_c_exclamation): Likewise.
10936 (pp_c_direct_declarator): Likewise.
10937 (pp_c_ws_string): Likewise.
10938 (pp_c_identifier): Likewise.
10939 (pp_c_statement): Likewise.
10940 (print_c_tree): Likewise.
10941
10942 2013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
10943
10944 PR c++/58072
10945 * c-common.c (c_parse_error): Catch user-defined literal tokens and
10946 provide useful error strings.
10947
10948 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10949
10950 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
10951 printer functions instead of pp_string or operators and punctuators.
10952 (dump_generic_ada_node): Likewise.
10953 * c-pretty-print.c (pp_c_type_specifier): Likewise.
10954 (pp_c_relational_expression): Likewise.
10955 (pp_c_logical_or_expression): Likewise.
10956
10957 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10958
10959 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
10960 functions instead of pp_character.
10961 (pp_ada_tree_identifier): Likewise.
10962 (dump_ada_double_name): Likewise.
10963 (dump_ada_function_declaration): Likewise.
10964 (dump_ada_array_domains): Likewise.
10965 (dump_template_types): Likewise.
10966 (dump_generic_ada_node): Likewise.
10967 (print_ada_declaration): Likewise.
10968 (print_ada_struct_decl): Likewise.
10969 * c-pretty-print.c (pp_c_integer_constant): Likewise.
10970
10971 2013-07-23 Tom Tromey <tromey@redhat.com>
10972
10973 * c-common.h (enum rid) <RID_GENERIC>: New constant.
10974 * c-common.c (c_common_reswords): Add _Generic.
10975
10976 2013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
10977
10978 * c-common.c: Fix typos.
10979 * c-common.h: Likewise.
10980
10981 2013-07-13 Lubos Lunak <l.lunak@suse.cz>
10982
10983 PR c++/55203
10984 * c-common.c (c_common_attribute_table): Add warn_unused.
10985 (handle_warn_unused_attribute): New.
10986
10987 2013-07-10 Jakub Jelinek <jakub@redhat.com>
10988
10989 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
10990 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
10991
10992 2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
10993
10994 PR c++/57869
10995 * c.opt: Add Wconditionally-supported.
10996
10997 2013-07-08 Graham Stott <graham.stott@btinternet.com>
10998
10999 * array-notation-common.c (length_mismatch_in_expr_p): Delete
11000 unused variables l_length and l_node.
11001
11002 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
11003
11004 PR c/57821
11005 * c-common.c (complete_array_type): Delay folding first index
11006 like other indices. When folding, check for index overflow.
11007
11008 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
11009
11010 PR c++/57509
11011 * c-common.h (c_build_vec_perm_expr): New complain argument.
11012 * c-common.c (c_build_vec_perm_expr): Likewise.
11013 Use save_expr also in C++.
11014
11015 2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
11016
11017 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
11018 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
11019 * c-opts.c (c_common_post_options): Likewise.
11020
11021 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
11022
11023 * array-notation-common.c (length_mismatch_in_expr): Changed the
11024 parameter type's from a dynamic array to a vec_tree. Also removed
11025 the size parameters.
11026 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
11027 the change above.
11028
11029 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
11030
11031 * c-common.h (struct cilkplus_an_parts): New structure.
11032 (struct cilkplus_an_loop_parts): Likewise.
11033 (cilkplus_extract_an_triplets): New prototype.
11034 (fix_sec_implicit_args): Likewise.
11035 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
11036 (fix_sec_implicit_args): Likewise.
11037
11038 2013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
11039
11040 * array-notation-common.c (find_inv_trees): Removed an unwanted
11041 typecasting.
11042 * c-common.h (struct inv_list::additional_tcodes): Changed type from
11043 enum rid to enum tree_code.
11044
11045 2013-06-11 Jan Hubicka <jh@suse.cz>
11046
11047 * c-common.c (handle_alias_ifunc_attribute): Do not set
11048 DECL_EXTERNAL for weakref variables.
11049 * c-pragma.c (handle_pragma_weak): Make sure aliases
11050 are not declared as external.
11051
11052 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
11053
11054 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
11055 function from c/c-array-notation.c.
11056 (is_cilkplus_reduce_builtin): Likewise.
11057 (find_rank): Likewise.
11058 (extract_array_notation_exprs): Likewise.
11059 (replace_array_notations): Likewise.
11060 (find_inv_trees): Likewise.
11061 (replace_inv_trees): Likewise.
11062 (contains_array_notation_expr): Likewise.
11063 (find_correct_array_notation_type): Likewise.
11064 * c-common.h (struct inv_list): Moved this struct from the file
11065 c/c-array-notation.c and added a new field called additional tcodes.
11066 (length_mismatch_in_expr_p): New prototype.
11067 (is_cilkplus_reduce_builtin): Likewise.
11068 (find_rank): Likewise.
11069 (extract_array_notation_exprs): Likewise.
11070 (replace_array_notation): Likewise.
11071 (find_inv_trees): Likewise.
11072 (replace_inv_trees): Likewise.
11073 (find_correct_array_notation_type): Likewise.
11074
11075 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
11076
11077 * c-common.c (c_define_builtins): When cilkplus is enabled, the
11078 function array_notation_init_builtins is called.
11079 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
11080 * c-common.def (ARRAY_NOTATION_REF): New tree.
11081 * c-common.h (build_array_notation_expr): New function declaration.
11082 (build_array_notation_ref): Likewise.
11083 (extract_sec_implicit_index_arg): New extern declaration.
11084 (is_sec_implicit_index_fn): Likewise.
11085 (ARRAY_NOTATION_CHECK): New define.
11086 (ARRAY_NOTATION_ARRAY): Likewise.
11087 (ARRAY_NOTATION_START): Likewise.
11088 (ARRAY_NOTATION_LENGTH): Likewise.
11089 (ARRAY_NOTATION_STRIDE): Likewise.
11090 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
11091 ARRAY_NOTATION_REF.
11092 (pp_c_expression): Likewise.
11093 * c.opt (flag_enable_cilkplus): New flag.
11094 * array-notation-common.c: New file.
11095
11096 2013-05-14 Jakub Jelinek <jakub@redhat.com>
11097
11098 PR c++/57274
11099 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
11100
11101 2013-05-10 Marc Glisse <marc.glisse@inria.fr>
11102
11103 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
11104 vectors.
11105
11106 2013-05-07 Han Shen <shenhan@google.com>
11107
11108 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
11109
11110 2013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
11111
11112 * c-common.c (check_user_alignment): Emit error for negative values.
11113
11114 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11115
11116 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
11117
11118 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11119
11120 * c-cppbuiltin.c (c_cpp_builtins): Do not define
11121 __GXX_EXPERIMENTAL_CXX1Y__.
11122
11123 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11124 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
11125
11126 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
11127 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
11128 to simply use OPT_Wpointer_arith.
11129 (c_sizeof_or_alignof_type): Likewise.
11130
11131 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11132
11133 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
11134
11135 2013-04-12 Jakub Jelinek <jakub@redhat.com>
11136
11137 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
11138 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
11139 specifiers.
11140
11141 2013-04-07 Steven Bosscher <steven@gcc.gnu.org>
11142
11143 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
11144
11145 2013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
11146
11147 * c-common.c (pointer_int_sum): Remove dead code.
11148
11149 2013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
11150
11151 PR middle-end/56524
11152 * c-common.c (handle_optimize_attribute): Don't call
11153 save_optabs_if_changed.
11154
11155 2013-03-05 Jakub Jelinek <jakub@redhat.com>
11156
11157 PR middle-end/56461
11158 * c-pch.c (pch_init): Free target_validity at the end.
11159
11160 2013-03-04 Jakub Jelinek <jakub@redhat.com>
11161
11162 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
11163
11164 2013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
11165 Jakub Jelinek <jakub@redhat.com>
11166
11167 PR sanitizer/56454
11168 * c-common.c (handle_no_sanitize_address_attribute): New function.
11169 (c_common_attribute_table): Add no_sanitize_address attribute.
11170 (handle_no_address_safety_analysis_attribute): Add
11171 no_sanitize_address attribute, not no_address_safety_analysis
11172 attribute.
11173
11174 2013-02-18 Aldy Hernandez <aldyh@redhat.com>
11175
11176 PR target/52555
11177 * c-common.c (handle_optimize_attribute): Call
11178 save_optabs_if_changed.
11179
11180 2013-02-18 Jakub Jelinek <jakub@redhat.com>
11181 Steven Bosscher <steven@gcc.gnu.org>
11182
11183 PR pch/54117
11184 * c-opts.c (c_common_post_options): If debug info is enabled
11185 and non-dwarf*, refuse to load PCH files and when writing PCH
11186 file warn.
11187
11188 2013-02-05 Jakub Jelinek <jakub@redhat.com>
11189
11190 PR middle-end/56167
11191 * c-common.c (handle_error_attribute): Fix condition.
11192
11193 2013-01-30 Jakub Jelinek <jakub@redhat.com>
11194
11195 PR c++/55742
11196 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
11197
11198 2013-01-18 Jason Merrill <jason@redhat.com>
11199
11200 PR target/54908
11201 * c.opt (-fextern-tls-init): New.
11202 * c-opts.c (c_common_post_options): Handle it.
11203
11204 2013-01-09 Jakub Jelinek <jakub@redhat.com>
11205
11206 PR c/48418
11207 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
11208 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
11209 and is either negative or bigger or equal to type precision
11210 of the first operand.
11211
11212 2012-12-03 Marek Polacek <polacek@redhat.com>
11213
11214 PR c/55570
11215 * c-common.c (check_user_alignment): Swap order of tests,
11216 check TREE_CODE first.
11217
11218 2012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
11219
11220 PR c++/52654
11221 * c-common.h (overflow_type): New enum.
11222 (build_userdef_literal): Add overflow_type argument.
11223 (tree_userdef_literal): Add overflow_type.
11224 (USERDEF_LITERAL_OVERFLOW): New access macro.
11225 * c-common.c (build_userdef_literal): Add overflow_type
11226 argument.
11227 * c-lex.c (c_lex_with_flags): Add overflow_type to
11228 build_userdef_literal calls.
11229 (interpret_integer, interpret_float): Add overflow_type argument.
11230
11231 2012-11-28 Richard Biener <rguenther@suse.de>
11232
11233 PR c/35634
11234 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
11235 here and use a type with proper overflow behavior for types that would
11236 need to be promoted for the arithmetic.
11237
11238 2012-11-23 Jakub Jelinek <jakub@redhat.com>
11239
11240 PR sanitizer/55435
11241 * c-common.c (handle_no_address_safety_analysis_attribute): New
11242 function.
11243 (c_common_attribute_table): Add no_address_safety_analysis.
11244
11245 2012-11-16 Simon Baldwin <simonb@google.com>
11246
11247 * c.opt: Add f[no-]canonical-system-headers.
11248 * c-opts.c (c_common_handle_option): Handle
11249 OPT_fcanonical_system_headers.
11250
11251 2012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
11252
11253 PR c++/54413
11254 * c-opts.c (c_common_handle_option): Set new flags.
11255 * c.opt: Describe new flags.
11256
11257 2012-11-09 Jason Merrill <jason@redhat.com>
11258
11259 * c.opt (Wabi-tag): New.
11260
11261 2012-11-09 Andi Kleen <ak@linux.intel.com>
11262
11263 PR 55139
11264 * c-common.c (get_atomic_generic_size): Mask with
11265 MEMMODEL_MASK
11266
11267 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11268
11269 PR c/53063
11270 * c.opt (Wformat): Make it Alias Wformat=1.
11271 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
11272 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
11273 LangEnabledBy.
11274 (Wformat=): RejectNegative. Use LangEnabledBy.
11275 (Wnonnull): Use LangEnabledBy.
11276 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
11277 * c-format.c (set_Wformat): Delete.
11278 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
11279 (maybe_read_dollar_number): Likewise.
11280 (avoid_dollar_number): Likewise.
11281 (finish_dollar_format_checking): Likewise.
11282 (check_format_info): Likewise.
11283 (check_format_info_main): Likewise.
11284 (check_format_types): Likewise.
11285 (format_type_warning): Likewise.
11286 * c-common.c (int): Likewise.
11287 (check_function_sentinel): Likewise.
11288 * c-common.h (warn_format,set_Wformat): Do not declare here.
11289
11290 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11291
11292 PR c/53063
11293 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
11294 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
11295 Use LangEnabledBy.
11296 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
11297 common.opt.
11298 (Wvariadic-macros): Init(1).
11299 * c-opts.c (c_common_handle_option): Do not handle them
11300 explicitly.
11301 (c_common_post_options): Likewise.
11302 (sanitize_cpp_opts): warn_unused_macros is now
11303 cpp_warn_unused_macros.
11304 (push_command_line_include): Likewise.
11305 * c-common.c (warn_unknown_pragmas): Do not define.
11306 * c-common.h (warn_unknown_pragmas): Do not declare.
11307
11308 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11309
11310 PR c/51294
11311 * c-common.c (conversion_warning): Handle conditional expressions.
11312
11313 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
11314
11315 PR c++/54930
11316 * c.opt (Wreturn_local_addr): Define new option.
11317
11318 2012-10-25 Jason Merrill <jason@redhat.com>
11319
11320 * c.opt (Wvirtual-move-assign): New.
11321
11322 * c.opt (Winherited-variadic-ctor): New.
11323
11324 2012-10-25 Marc Glisse <marc.glisse@inria.fr>
11325
11326 PR c++/54427
11327 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
11328
11329 2012-10-23 Joseph Myers <joseph@codesourcery.com>
11330
11331 * c-common.h (pch_cpp_save_state): Declare.
11332 * c-target.def (c_preinclude): New hook.
11333 * c-opts.c (done_preinclude): New.
11334 (push_command_line_include): Handle default preincluded header.
11335 (cb_file_change): Call pch_cpp_save_state when calling
11336 push_command_line_include.
11337 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
11338 (pch_cpp_save_state): New.
11339 (pch_init): Call pch_cpp_save_state conditionally, instead of
11340 calling cpp_save_state.
11341
11342 2012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
11343
11344 PR c/53063
11345 PR c/40989
11346 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
11347 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
11348 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
11349 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
11350 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
11351 * c-opts.c (c_common_handle_option): Remove explicit handling from
11352 here.
11353 (c_common_post_options): Likewise.
11354
11355 2012-10-18 Eric Botcazou <ebotcazou@adacore.com>
11356
11357 * c-ada-spec.c (LOCATION_COL): Delete.
11358 (compare_location): New function.
11359 (compare_node): Use it.
11360 (compare_comment): Likewise.
11361
11362 2012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
11363
11364 PR c/53063
11365 PR c/40989
11366 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
11367 * c-opts.c (c_common_handle_option): Do not set them here. Add
11368 comment.
11369 (c_common_post_options): Likewise.
11370
11371 2012-10-16 Eric Botcazou <ebotcazou@adacore.com>
11372
11373 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
11374 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
11375 Remove POINTER_TYPE handling, add large unsigned handling and use
11376 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
11377
11378 2012-10-12 Jakub Jelinek <jakub@redhat.com>
11379
11380 PR c/54381
11381 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
11382 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
11383 locs and array of 3 trees instead of just single loc and single
11384 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
11385 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
11386 For *cmp* builtins that take two sources strings report warnings
11387 about first and second source, not about destination and source.
11388
11389 2012-10-12 Marc Glisse <marc.glisse@inria.fr>
11390
11391 PR c++/53055
11392 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
11393
11394 2012-10-11 Eric Botcazou <ebotcazou@adacore.com>
11395
11396 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
11397 declaring something coming from another file.
11398
11399 2012-10-10 Arnaud Charlet <charlet@adacore.com>
11400
11401 PR ada/54845
11402 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
11403
11404 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
11405
11406 PR c++/54194
11407 * c-common.c (warn_about_parentheses): Add location_t parameter;
11408 use EXPR_LOC_OR_LOC.
11409 * c-common.h: Update declaration.
11410
11411 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
11412
11413 PR c++/54427
11414 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
11415 more operations. Make error messages optional.
11416 * c-common.h (enum stv_conv): Moved from c-typeck.c.
11417 (scalar_to_vector): Declare.
11418
11419 2012-10-08 Jason Merrill <jason@redhat.com>
11420
11421 * c-common.c (c_common_reswords): Add thread_local.
11422
11423 2012-10-08 Dodji Seketeli <dodji@redhat.com>
11424
11425 PR c++/53528 C++11 attribute support
11426 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
11427 new functions.
11428 * c-common.c (check_cxx_fundamental_alignment_constraints): New
11429 static function.
11430 (handle_aligned_attribute): In choose strictest alignment
11431 among many. Use new check_cxx_fundamental_alignment_constraints.
11432 (handle_transparent_union_attribute): In c++11 attribute syntax,
11433 don't look through typedefs.
11434
11435 2012-10-04 Arnaud Charlet <charlet@adacore.com>
11436
11437 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
11438 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
11439 out of dumpfile.h.
11440
11441 2012-09-25 Dehao Chen <dehao@google.com>
11442
11443 PR middle-end/54645
11444 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
11445 map when read in the pch.
11446
11447 2012-09-18 Arnaud Charlet <charlet@adacore.com>
11448
11449 * c-ada-spec.c: Style fixes.
11450
11451 2012-09-18 Thomas Quinot <quinot@adacore.com>
11452
11453 * c.opt (-fada-spec-parent): Define new command line switch.
11454 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
11455 is specified, generate binding spec as a child of the specified unit.
11456
11457 2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
11458 Manuel López-Ibáñez <manu@gcc.gnu.org>
11459
11460 PR c++/53210
11461 * c.opt ([Winit-self]): Enabled by -Wall in C++.
11462
11463 2012-08-23 Arnaud Charlet <charlet@adacore.com>
11464
11465 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
11466 for pointers, and add missing Convention C pragma.
11467 (print_ada_struct_decl): Add missing aliased keyword.
11468 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
11469
11470 2012-08-17 Jakub Jelinek <jakub@redhat.com>
11471
11472 * c-common.c (sizeof_pointer_memaccess_warning): New function.
11473 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
11474 * c-opts.c (c_common_handle_option): Enable it for -Wall.
11475 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
11476 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
11477
11478 2012-08-10 Richard Guenther <rguenther@suse.de>
11479
11480 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
11481
11482 2012-08-07 Steven Bosscher <steven@gcc.gnu.org>
11483
11484 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
11485 instead of separate pp_newline and pp_flush.
11486 (print_c_tree): Likewise.
11487
11488 2012-07-26 Richard Henderson <rth@redhat.com>
11489
11490 * c-common.c (handle_hot_attribute): Allow labels.
11491 (handle_cold_attribute): Likewise.
11492
11493 2012-07-20 Jakub Jelinek <jakub@redhat.com>
11494
11495 PR c++/28656
11496 * c-common.c (check_function_nonnull): Handle multiple nonnull
11497 attributes properly.
11498
11499 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
11500
11501 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
11502 * c-ada-spec.c: Likewise.
11503 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
11504
11505 2012-07-14 Steven Bosscher <steven@gcc.gnu.org>
11506
11507 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
11508 Remove code conditional on it.
11509
11510 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
11511
11512 * c-gimplify.c: Do not include basic-block.h.
11513 * c-common.c: Do not include linfuncs.h.
11514
11515 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
11516
11517 * c-common.h: Include tree.h.
11518
11519 2012-07-02 Jason Merrill <jason@redhat.com>
11520
11521 PR c++/53524
11522 * c-common.c (get_priority): Call default_conversion.
11523
11524 2012-07-01 Uros Bizjak <ubizjak@gmail.com>
11525
11526 * c-pch.c (c_common_write_pch): Remove unused variables.
11527
11528 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
11529
11530 * cppspec.c: Moved from gcc/ to here.
11531
11532 2012-06-27 Kai Tietz <ktietz@redhat.com>
11533
11534 PR preprocessor/37215
11535 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
11536
11537 2012-06-21 Steven Bosscher <steven@gcc.gnu.org>
11538
11539 * c-common.h (c_common_print_pch_checksum): Remove.
11540 * c-pch.c: Do not include output.h.
11541 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
11542 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
11543 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
11544 (struct c_pch_header): Remove.
11545 (get_ident): Update gpch version.
11546 (pch_init): Do not print executable_checksum to asm_out_file.
11547 Do not fail if there is no asm_out_file to read back from. Set
11548 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
11549 (c_common_write_pch): Verify that nothing was written to asm_out_file
11550 since pch_init was called. Do not write a c_pch_header, and do not
11551 copy from asm_out_file to the PCH.
11552 (c_common_read_pch): Do not read a c_pch_header, and do not restore
11553 the content of asm_out_file from the PCH.
11554 (c_common_print_pch_checksum): Remove.
11555 * c-opts.c (c_common_init): Print out executable_checksum directly.
11556
11557 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
11558
11559 * c-target.def (objc_declare_unresolved_class_reference,
11560 objc_declare_class_definition): Add new hooks.
11561
11562 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
11563
11564 * c-lex.c: Do not include output.h.
11565 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
11566 Remove uses of ASM_OUTPUT_IDENT.
11567
11568 2012-06-15 Marc Glisse <marc.glisse@inria.fr>
11569
11570 PR c++/51033
11571 * c-common.h (c_build_vec_perm_expr): Move decl here.
11572 * c-common.c (c_build_vec_perm_expr): Move definition
11573 here.
11574
11575 2012-06-06 Steven Bosscher <steven@gcc.gnu.org>
11576
11577 * c.opt (fconserve-space): Turn into a no-op.
11578
11579 2012-06-04 Sterling Augustine <saugustine@google.com>
11580
11581 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
11582 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
11583 both the start and end of the function.
11584
11585 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
11586
11587 * c-common.c: Do not include output.h.
11588 * c-pragma.c: Likewise.
11589
11590 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
11591
11592 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
11593 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
11594 (lang_decl_name): Handle namespace decls.
11595
11596 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
11597
11598 * c-ada-spec.c: Do not include output.h.
11599 * c-semantics.c: Likewise.
11600
11601 2012-05-29 Joseph Myers <joseph@codesourcery.com>
11602
11603 * c-common.c: Fix typo.
11604
11605 2012-05-29 Michael Matz <matz@suse.de>
11606
11607 * c-common.h (c_expand_decl): Remove prototype.
11608
11609 2012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
11610
11611 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
11612 * c-opts.c (c_common_handle_option): Remove code handling
11613 warn_missing_braces.
11614
11615 2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
11616
11617 PR c++/25137
11618 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
11619 -Wmissing_braces.
11620
11621 2012-05-22 Dodji Seketeli <dodji@redhat.com>
11622
11623 PR c++/53322
11624 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
11625
11626 2012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
11627
11628 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
11629 * c-opts.c (c_common_handle_option): Do not handle explicitly
11630 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
11631
11632 2012-05-16 Dodji Seketeli <dodji@redhat.com>
11633
11634 PR preprocessor/7263
11635 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
11636 to cpp_classify_number. For diagnostics, use the precise location
11637 instead of the global input_location.
11638
11639 2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
11640
11641 PR c++/11856
11642 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
11643
11644 2012-05-14 Bernd Schmidt <bernds@codesourcery.com>
11645
11646 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
11647
11648 2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
11649
11650 PR 53063
11651 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
11652 Wreorder): Use LangEnabledBy.
11653 * c-opts.c (c_common_handle_option): Do not enable them
11654 explicitly. Call lang-specific generated functions.
11655 (c_common_post_options): Do not set them here.
11656
11657 2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
11658
11659 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
11660 Wmissing-field-initializers,Wmissing-parameter-type,
11661 Wold-style-declaration,Woverride-init): Use EnabledBy.
11662 * c-opts.c (c_common_post_options): Do not set here explicitly.
11663
11664 2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
11665
11666 PR 53063
11667 * c-opts.c (c_common_handle_option): Use handle_generated_option
11668 to enable sub-options.
11669
11670 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
11671
11672 PR c++/53158
11673 * c-common.c (warnings_for_convert_and_check): Use warning_at.
11674
11675 2012-05-10 Richard Guenther <rguenther@suse.de>
11676
11677 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
11678 adjust commentary about TYPE_IS_SIZETYPE types.
11679
11680 2012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
11681
11682 PR c++/53261
11683 * c-common.c (warn_logical_operator): Check that argument of
11684 integer_zerop is not NULL.
11685
11686 2012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
11687
11688 PR c/43772
11689 * c-common.c (warn_logical_operator): Do not warn if either side
11690 is already true or false.
11691
11692 2012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
11693
11694 PR c/51712
11695 * c-common.c (expr_original_type): New.
11696 (shorten_compare): Do not warn for enumeration types.
11697
11698 2012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
11699
11700 * c.opt (fpermissive): Add Var(flag_permissive).
11701
11702 2012-04-30 Marc Glisse <marc.glisse@inria.fr>
11703
11704 PR c++/51033
11705 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
11706 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
11707
11708 2012-04-30 Dodji Seketeli <dodji@redhat.com>
11709
11710 Add -Wvarargs option
11711 * c.opt (Wvarargs): Define new option.
11712
11713 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11714
11715 * c-common.c (check_function_arguments): Replace
11716 Wmissing-format-attribute with Wsuggest-attribute=format.
11717
11718 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11719
11720 * c.opt (Wsuggest-attribute=format): New. Alias of
11721 Wmissing-format-attribute.
11722 * c-format.c (decode_format_type): Replace
11723 Wmissing-format-attribute with Wsuggest-attribute=format.
11724 (check_function_format): Likewise.
11725
11726 2012-04-27 Ollie Wild <aaw@google.com>
11727
11728 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
11729 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
11730 * c.opt: Add Wliteral-suffix.
11731
11732 2012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
11733
11734 PR c/44774
11735 * c.opt (Wpedantic): New.
11736 (pedantic): Alias Wpedantic.
11737 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
11738 (c_common_post_options): Likewise.
11739 (sanitize_cpp_opts): Likewise.
11740 * c-lex.c (interpret_float): Likewise.
11741 * c-format.c (check_format_types): Likewise.
11742 * c-common.c (pointer_int_sum): Likewise.
11743 (c_sizeof_or_alignof_type): Likewise.
11744 (c_add_case_label): Likewise.
11745 (c_do_switch_warnings): Likewise.
11746 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
11747
11748 2012-04-15 Jason Merrill <jason@redhat.com>
11749
11750 PR c++/52818
11751 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
11752 (C_STD_NAME): Distinguish between C++98 and C++11.
11753
11754 2012-04-11 Eric Botcazou <ebotcazou@adacore.com>
11755
11756 PR target/52624
11757 * c-common.h (uint16_type_node): Rename into...
11758 (c_uint16_type_node): ...this.
11759 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
11760 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
11761
11762 2012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
11763
11764 * c-common.c (warn_if_unused_value): Move definition to here.
11765 * c-common.h (warn_if_unused_value): Move declaration to here.
11766
11767 2012-03-23 William Bader <williambader@hotmail.com>
11768
11769 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
11770
11771 2012-03-20 Jason Merrill <jason@redhat.com>
11772
11773 * c-common.h (enum cxx_dialect): Add cxx1y.
11774 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
11775 test.
11776 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
11777 * c-opts.c (c_common_post_options): Likewise.
11778 (set_std_cxx1y): New.
11779 (c_common_handle_option): Call it.
11780 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
11781
11782 2012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
11783
11784 PR c++/14710
11785 * c.opt ([Wuseless-cast]): Add.
11786
11787 2012-03-16 Richard Guenther <rguenther@suse.de>
11788
11789 * c-pretty-print.c (pp_c_initializer_list): Adjust.
11790
11791 2012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
11792
11793 PR c++/44783
11794 * c.opt (ftemplate-backtrace-limit) Add.
11795
11796 2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11797
11798 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
11799 handling.
11800 * c-pragma.c (handle_pragma_extern_prefix): Remove.
11801 (init_pragma): Don't register extern_prefix.
11802
11803 2012-03-12 Richard Guenther <rguenther@suse.de>
11804
11805 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
11806 (builtin_type_for_size): Likewise.
11807
11808 2012-02-13 Jakub Jelinek <jakub@redhat.com>
11809
11810 PR c++/52215
11811 * c-common.c (sync_resolve_params): Don't decide whether to convert
11812 or not based on TYPE_SIZE comparison, convert whenever arg_type
11813 is unsigned INTEGER_TYPE.
11814
11815 2012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
11816
11817 PR c/52118
11818 * c.opt ([Wunused-local-typedefs]): Fix description.
11819
11820 2012-01-24 Mike Stump <mikestump@comcast.net>
11821
11822 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
11823 exactly.
11824
11825 2012-01-18 Richard Guenther <rguenther@suse.de>
11826
11827 * c-opts.c (c_common_post_options): Reset LTO flags if
11828 we are about to generate a PCH.
11829
11830 2012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
11831
11832 PR c++/51777
11833 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
11834 use pp_unsigned_wide_integer.
11835
11836 2012-01-10 Richard Guenther <rguenther@suse.de>
11837
11838 PR middle-end/51806
11839 * c-opts.c (c_common_handle_option): Move -Werror handling
11840 to language independent code.
11841
11842 2012-01-05 Richard Guenther <rguenther@suse.de>
11843
11844 PR middle-end/51764
11845 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
11846 from common.opt.
11847
11848 2011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
11849
11850 PR c++/51316
11851 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
11852 of array types with an unknown bound.
11853
11854 2011-12-20 Joseph Myers <joseph@codesourcery.com>
11855
11856 * c-common.c (flag_isoc99): Update comment to refer to C11.
11857 (flag_isoc1x): Change to flag_isoc11.
11858 * c-common.h (flag_isoc99): Update comment to refer to C11.
11859 (flag_isoc1x): Change to flag_isoc11.
11860 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
11861 C11.
11862 * c-opts.c (set_std_c1x): Change to set_std_c11.
11863 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
11864 Call set_std_c11.
11865 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
11866 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
11867 * c.opt (std=c1x): Change to std=c11. Document as non-draft
11868 standard.
11869 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
11870 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
11871 (std=gnu1x): Make alias of std=gnu11.
11872
11873 2011-12-19 Jason Merrill <jason@redhat.com>
11874
11875 PR c++/51228
11876 * c-common.c (handle_transparent_union_attribute): Check the first
11877 field if the type is complete.
11878
11879 2011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
11880
11881 PR libstdc++/51365
11882 * c-common.c (RID_IS_FINAL): Add.
11883 * c-common.h (RID_IS_FINAL): Add.
11884
11885 2011-11-30 Iain Sandoe <iains@gcc.gnu.org>
11886
11887 * c.opt (fgnu-runtime): Provide full description.
11888 (fnext-runtime): Likewise.
11889 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
11890
11891 2011-11-28 Andrew MacLeod <amacleod@redhat.com>
11892
11893 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
11894 predefines in one place. Add LOCK_FREE predefines.
11895 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
11896 new func.
11897
11898 2011-11-24 Andrew MacLeod <amacleod@redhat.com>
11899
11900 PR c/51256
11901 * c-common.c (get_atomic_generic_size): Check for various error
11902 conditions
11903 (resolve_overloaded_atomic_exchange,
11904 resolve_overloaded_atomic_compare_exchange,
11905 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
11906 error_mark_node for error conditions.
11907
11908 2011-11-08 Richard Guenther <rguenther@suse.de>
11909
11910 PR middle-end/51010
11911 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
11912
11913 2011-11-07 Richard Henderson <rth@redhat.com>
11914 Aldy Hernandez <aldyh@redhat.com>
11915 Torvald Riegel <triegel@redhat.com>
11916
11917 Merged from transactional-memory.
11918
11919 * c-common.c (handle_tm_wrap_attribute,
11920 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
11921 (struct c_common_reswords): Added __transaction* keywords.
11922 (struct c_common_attribute_table): Added transaction* and tm_regparm
11923 attributes.
11924 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
11925 masks.
11926 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
11927 find_tm_attribute): Declare.
11928
11929 2011-11-07 Jason Merrill <jason@redhat.com>
11930
11931 PR c++/35688
11932 * c-common.c, c-common.h: Revert yesterday's changes.
11933
11934 2011-11-06 Jason Merrill <jason@redhat.com>
11935
11936 PR c++/35688
11937 * c-common.c (decl_has_visibility_attr): Split out from...
11938 (c_determine_visibility): ...here.
11939 * c-common.h: Declare it.
11940
11941 2011-11-06 Joseph Myers <joseph@codesourcery.com>
11942
11943 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
11944 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
11945 type.
11946 (check_user_alignment): New. Split out of
11947 handle_aligned_attribute. Disallow integer constants with
11948 noninteger types. Conditionally allow zero.
11949 (handle_aligned_attribute): Use check_user_alignment.
11950 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
11951
11952 2011-11-06 Andrew MacLeod <amacleod@redhat.com>
11953 Richard Henderson <rth@redhat.com>
11954
11955 Merged from cxx-mem-model.
11956
11957 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
11958 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
11959 parameters that are the same type size.
11960 (get_atomic_generic_size): New. Find size of generic
11961 atomic function parameters and do typechecking.
11962 (add_atomic_size_parameter): New. Insert size into parameter list.
11963 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
11964 either __atomic_exchange_n or external library call.
11965 (resolve_overloaded_atomic_compare_exchange): Restructure
11966 __atomic_compare_exchange to either _n variant or external library call.
11967 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
11968 __atomic_load_n or an external library call.
11969 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
11970 __atomic_store_n or an external library call.
11971 (resolve_overloaded_builtin): Handle new __atomic builtins.
11972
11973 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
11974
11975 PR c++/50608
11976 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
11977 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
11978 <INDIRECT_REF>: Return the argument.
11979 <ARRAY_REF>: Remove special code for negative offset.
11980 Call fold_build_pointer_plus instead of size_binop.
11981 (fold_offsetof): Remove STOP_REF argument and adjust.
11982 * c-common.h (fold_offsetof_1): Declare.
11983 (fold_offsetof): Remove STOP_REF argument.
11984
11985 2011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
11986
11987 PR c++/50810
11988 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11989 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11990 Wnarrowing for C++0x and C++98.
11991 * c.opt ([Wnarrowing]): Update.
11992
11993 2011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
11994
11995 PR c++/44277
11996 * c.opt: Add Wzero-as-null-pointer-constant.
11997
11998 2011-10-31 Jason Merrill <jason@redhat.com>
11999
12000 * c.opt (-fdeduce-init-list): Off by default.
12001
12002 PR c++/50920
12003 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
12004 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
12005 and -Wc++11-compat.
12006 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
12007
12008 2011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
12009
12010 PR c++/30066
12011 * c.opt (fvisibility-inlines-hidden): Description change.
12012
12013 2011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
12014
12015 Implement C++11 user-defined literals.
12016 * c-common.c (build_userdef_literal): New.
12017 * c-common.def: New tree code.
12018 * c-common.h (tree_userdef_literal): New tree struct and accessors.
12019 * c-lex.c (interpret_float): Add suffix parm.
12020 (c_lex_with_flags): Build literal tokens.
12021
12022 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12023
12024 PR c++/50841
12025 Revert:
12026 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12027
12028 PR c++/50810
12029 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12030 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12031 Wnarrowing for C++0x and C++98.
12032 * c.opt ([Wnarrowing]): Update.
12033
12034 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12035
12036 PR c++/50810
12037 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12038 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12039 Wnarrowing for C++0x and C++98.
12040 * c.opt ([Wnarrowing]): Update.
12041
12042 2011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
12043
12044 PR c++/45385
12045 * c-common.c (conversion_warning): Remove code looking for
12046 artificial operands.
12047
12048 2011-10-18 Dodji Seketeli <dodji@redhat.com>
12049
12050 PR bootstrap/50760
12051 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
12052 !NO_IMPLICIT_EXTERN_C.
12053
12054 2011-10-17 Michael Spertus <mike_spertus@symantec.com>
12055
12056 * c-common.c (c_common_reswords): Add __bases,
12057 __direct_bases.
12058 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
12059
12060 2011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
12061
12062 PR c++/50757
12063 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
12064
12065 2011-10-15 Tom Tromey <tromey@redhat.com>
12066 Dodji Seketeli <dodji@redhat.com>
12067
12068 * c.opt (fdebug-cpp): New option.
12069 * c-opts.c (c_common_handle_option): Handle the option.
12070 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
12071 output stream in parameter. Factorized from ...
12072 (maybe_print_line): ... this. Dump location debug information when
12073 -fdebug-cpp is in effect.
12074 (print_line_1): New static function. Takes an output stream in
12075 parameter. Factorized from ...
12076 (print_line): ... here. Dump location information when -fdebug-cpp
12077 is in effect.
12078 (scan_translation_unit): Dump location information when
12079 -fdebug-cpp is in effect.
12080
12081 2011-10-15 Tom Tromey <tromey@redhat.com>
12082 Dodji Seketeli <dodji@redhat.com>
12083
12084 * c.opt (ftrack-macro-expansion): New option. Handle it with and
12085 without argument.
12086 * c-opts.c (c_common_handle_option)<case
12087 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
12088 cases. Handle -ftrack-macro-expansion with and without argument.
12089
12090 2011-10-15 Tom Tromey <tromey@redhat.com>
12091 Dodji Seketeli <dodji@redhat.com>
12092
12093 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
12094 (print_line, cb_define, do_line_change): Adjust to avoid touching
12095 the internals of struct line_map. Use the public API instead.
12096 * c-pch.c (c_common_read_pch): Likewise.
12097 * c-lex.c (fe_file_change): Likewise.
12098
12099 2011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
12100
12101 PR c++/17212
12102 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
12103
12104 2011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
12105
12106 PR c++/33067
12107 * c-pretty-print.c (pp_c_floating_constant): Output
12108 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
12109
12110 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
12111
12112 * c-common.c (def_builtin_1): Delete old interface with two
12113 parallel arrays to hold standard builtin declarations, and replace
12114 it with a function based interface that can support creating
12115 builtins on the fly in the future. Change all uses, and poison
12116 the old names. Make sure 0 is not a legitimate builtin index.
12117 * c-omp.c (c_finish_omp_barrier): Ditto.
12118 (c_finish_omp_taskwait): Ditto.
12119 (c_finish_omp_flush): Ditto.
12120
12121 2011-10-11 Tristan Gingold <gingold@adacore.com>
12122
12123 * c.opt: (fallow-parameterless-variadic-functions): New.
12124
12125 2011-09-08 Dodji Seketeli <dodji@redhat.com>
12126
12127 PR c++/33255 - Support -Wunused-local-typedefs warning
12128 * c-common.h (struct c_language_function::local_typedefs): New
12129 field.
12130 (record_locally_defined_typedef, maybe_record_typedef_use)
12131 (maybe_warn_unused_local_typedefs): Declare new functions.
12132 * c-common.c (record_locally_defined_typedef)
12133 (maybe_record_typedef_use)
12134 (maybe_warn_unused_local_typedefs): Define new functions.
12135 * c.opt: Declare new -Wunused-local-typedefs flag.
12136
12137 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
12138
12139 PR middle-end/50266
12140 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
12141 computations.
12142
12143 2011-09-05 Richard Guenther <rguenther@suse.de>
12144
12145 * c-common.c (complete_array_type): Use ssize_int (-1) instead
12146 of integer_minus_one_node for empty array upper bounds.
12147
12148 2011-08-28 Dodji Seketeli <dodji@redhat.com>
12149
12150 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
12151 it's the first time it's being called on this main TU.
12152
12153 2011-08-24 Richard Guenther <rguenther@suse.de>
12154
12155 PR c/49396
12156 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
12157
12158 2011-08-22 Gabriel Charette <gchare@google.com>
12159
12160 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
12161 defined in cpp_init_builtins and c_cpp_builtins.
12162
12163 2011-08-19 Joseph Myers <joseph@codesourcery.com>
12164
12165 * c-common.c (c_common_reswords): Add __builtin_complex.
12166 * c-common.h (RID_BUILTIN_COMPLEX): New.
12167
12168 2011-08-18 Joseph Myers <joseph@codesourcery.com>
12169
12170 * c-common.c (c_common_reswords): Add _Noreturn.
12171 (keyword_is_function_specifier): Handle RID_NORETURN.
12172 * c-common.h (RID_NORETURN): New.
12173
12174 2011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
12175
12176 * c-common.c (unsafe_conversion_p): New function. Check if it is
12177 unsafe to convert an expression to the type.
12178 (conversion_warning): Adjust, use unsafe_conversion_p.
12179 * c-common.h (unsafe_conversion_p): New function declaration.
12180
12181 2011-08-02 Jakub Jelinek <jakub@redhat.com>
12182
12183 * c-common.h (c_finish_omp_atomic): Adjust prototype.
12184 (c_finish_omp_taskyield): New prototype.
12185 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
12186 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
12187 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
12188 or RHS1 have side-effects, evaluate those too in the right spot,
12189 if it is a decl and LHS is also a decl, error out if they
12190 aren't the same.
12191 (c_finish_omp_taskyield): New function.
12192 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
12193 * c-pragma.c (omp_pragmas): Add taskyield.
12194 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
12195 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
12196 PRAGMA_OMP_CLAUSE_MERGEABLE.
12197
12198 2011-07-25 Dodji Seketeli <dodji@redhat.com>
12199
12200 * c-common.h (set_underlying_type): Remove parm name from
12201 declaration.
12202
12203 2011-07-25 Romain Geissler <romain.geissler@gmail.com>
12204
12205 * c-pretty-print.h: Search c-common.h in c-family.
12206
12207 2011-07-22 Jason Merrill <jason@redhat.com>
12208
12209 PR c++/49793
12210 * c.opt (Wnarrowing): New.
12211
12212 PR c++/30112
12213 * c-common.h: Declare c_linkage_bindings.
12214 * c-pragma.c (handle_pragma_redefine_extname): Use it.
12215
12216 PR c++/49813
12217 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
12218 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
12219 as flag_isoc99 for 'restrict'.
12220 (pp_c_specifier_qualifier_list): Likewise for _Complex.
12221
12222 2011-07-21 Ian Lance Taylor <iant@google.com>
12223
12224 PR middle-end/49705
12225 * c-common.c (c_disable_warnings): New static function.
12226 (c_enable_warnings): New static function.
12227 (c_fully_fold_internal): Change local unused_p to bool. Call
12228 c_disable_warnings and c_enable_warnings rather than change
12229 c_inhibit_evaluation_warnings.
12230
12231 2011-07-20 Jason Merrill <jason@redhat.com>
12232
12233 PR c++/6709 (DR 743)
12234 PR c++/42603 (DR 950)
12235 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
12236 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
12237 (CPP_DECLTYPE): New.
12238 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
12239
12240 2011-07-19 Richard Guenther <rguenther@suse.de>
12241
12242 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
12243 * c-omp.c (c_finish_omp_for): Likewise.
12244
12245 2011-07-12 Eric Botcazou <ebotcazou@adacore.com>
12246
12247 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
12248 body on the next line.
12249
12250 2011-07-08 Jason Merrill <jason@redhat.com>
12251
12252 PR c++/45437
12253 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
12254
12255 PR c++/49673
12256 * c-common.c (c_apply_type_quals_to_decl): Don't check
12257 TYPE_NEEDS_CONSTRUCTING.
12258
12259 2011-07-06 Richard Guenther <rguenther@suse.de>
12260
12261 * c-common.c (c_common_nodes_and_builtins):
12262 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
12263
12264 2011-07-05 Richard Guenther <rguenther@suse.de>
12265
12266 * c-common.c (c_common_nodes_and_builtins): Build all common
12267 tree nodes first.
12268
12269 2011-06-27 Jakub Jelinek <jakub@redhat.com>
12270
12271 * c-common.h (c_tree_chain_next): New static inline function.
12272
12273 * c-common.c (check_builtin_function_arguments): Handle
12274 BUILT_IN_ASSUME_ALIGNED.
12275
12276 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
12277
12278 * c-common.c: Add sync_ or SYNC__ to builtin names.
12279 * c-omp.c: Add sync_ or SYNC__ to builtin names.
12280
12281 2011-06-20 Pierre Vittet <piervit@pvittet.com>
12282
12283 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
12284 handler.
12285 (gen_pragma_handler): New union.
12286 (internal_pragma_handler): New type.
12287 (c_register_pragma_with_data)
12288 (c_register_pragma_with_expansion_and_data): New functions.
12289
12290 * c-pragma.c (registered_pragmas, c_register_pragma_1)
12291 (c_register_pragma, c_register_pragma_with_expansion)
12292 (c_invoke_pragma_handler): Changed to work with
12293 internal_pragma_handler.
12294 (c_register_pragma_with_data)
12295 (c_register_pragma_with_expansion_and_data): New functions.
12296
12297 2011-06-14 Joseph Myers <joseph@codesourcery.com>
12298
12299 * c-common.c: Include common/common-target.h.
12300 (handle_section_attribute): Use
12301 targetm_common.have_named_sections.
12302 * c-cppbuiltin.c: Include common/common-target.h.
12303 (c_cpp_builtins): Use targetm_common.except_unwind_info.
12304
12305 2011-06-10 Richard Guenther <rguenther@suse.de>
12306
12307 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
12308 to print a IDENTIFIER_NODE.
12309
12310 2011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12311 Joseph Myers <joseph@codesourcery.com>
12312
12313 * c.opt (fbuilding-libgcc): New option.
12314 * c-cppbuiltin.c (c_cpp_builtins): Define
12315 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
12316
12317 2011-06-07 Jason Merrill <jason@redhat.com>
12318
12319 * c-common.c (max_tinst_depth): Lower default to 900.
12320
12321 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
12322
12323 2011-06-07 Richard Guenther <rguenther@suse.de>
12324
12325 * c-common.c (c_common_nodes_and_builtins): Do not set
12326 size_type_node or call set_sizetype.
12327
12328 2011-06-07 Dodji Seketeli <dodji@redhat.com>
12329
12330 PR debug/49130
12331 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
12332 type when using pointer comparison to compare types.
12333
12334 2011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
12335
12336 * c.opt: Add -Wdelete-non-virtual-dtor.
12337 * c-opts.c (c_common_handle_option): Include it in -Wall.
12338
12339 2011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
12340
12341 PR bootstrap/49190
12342
12343 Revert:
12344 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12345
12346 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
12347 not tree_common.
12348
12349 2011-05-27 Jakub Jelinek <jakub@redhat.com>
12350
12351 PR c++/49165
12352 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
12353 C++ don't call c_common_truthvalue_conversion on void type arms.
12354
12355 2011-05-27 Nathan Froyd <froydnj@codesourcery.com>
12356
12357 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
12358 (stmt_list_stack): Define.
12359 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
12360 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
12361
12362 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12363
12364 * c-common.c (warning_candidate_p): Check for BLOCKs.
12365
12366 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12367
12368 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
12369 not tree_common.
12370
12371 2011-05-25 Jakub Jelinek <jakub@redhat.com>
12372
12373 * c-common.c (def_fn_type): Remove extra va_end.
12374
12375 2011-05-23 Jason Merrill <jason@redhat.com>
12376
12377 PR c++/48106
12378 * c-common.c (c_common_get_narrower): New.
12379 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
12380
12381 2011-05-23 Nathan Froyd <froydnj@codesourcery.com>
12382
12383 * c-common.h (check_function_arguments): Tweak prototype of
12384 check_function_arguments.
12385 * c-common.c (check_function_arguments): Likewise. Adjust
12386 calls to check_function_nonnull, check_function_format, and
12387 check_function_sentinel.
12388 (check_function_sentinel): Take a FUNCTION_TYPE rather than
12389 separate attributes and typelist arguments. Use
12390 FOREACH_FUNCTION_ARGS to iterate over argument types.
12391
12392 2011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
12393
12394 * c-common.c (c_common_reswords): Reorder.
12395 * c-common.h (rid): Likewise.
12396
12397 2011-05-10 Nathan Froyd <froydnj@codesourcery.com>
12398
12399 * c-common.c (def_fn_type): Don't call build_function_type, call
12400 build_function_type_array or build_varargs_function_type_array
12401 instead.
12402 (c_common_nodes_and_builtins): Likewise.
12403
12404 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12405
12406 * c-common.c (c_add_case_label): Omit the loc argument to
12407 build_case_label.
12408 * c-common.h (build_case_label): Remove.
12409 * c-semantics.c (build_case_label): Remove.
12410
12411 2011-05-05 Joseph Myers <joseph@codesourcery.com>
12412
12413 * c-objc.h (objc_start_method_definition): Update prototype.
12414 * stub-objc.c (objc_start_method_definition): Add extra parameter.
12415
12416 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
12417
12418 * c-common.c (check_main_parameter_types): Reindent. Don't use
12419 TYPE_ARG_TYPES directly.
12420 (handle_nonnull_attribute): Likewise.
12421 (sync_resolve_params): Likewise.
12422 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
12423 to check_format_string.
12424 (handle_format_attribute): Likewise.
12425 (check_format_string): Take a function type to examine instead of
12426 a type list. Use a function_arg_iterator to step through argument
12427 types.
12428
12429 2011-05-04 Richard Guenther <rguenther@suse.de>
12430
12431 * c-common.c (fix_string_type): Use size_int for index type bounds.
12432 (start_fname_decls): Do not pass NULL to build_int_cst.
12433 (c_init_attributes): Likewise.
12434 * c-lex.c (c_lex_with_flags): Likewise.
12435
12436 2011-04-27 Jason Merrill <jason@redhat.com>
12437
12438 * c-common.c (make_tree_vector_from_list): New.
12439 * c-common.h: Declare it.
12440
12441 2011-04-26 Richard Guenther <rguenther@suse.de>
12442
12443 PR preprocessor/48248
12444 * c-ppoutput.c (maybe_print_line): Always optimize newlines
12445 for output size with -P.
12446
12447 2011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
12448
12449 * c-common.c (struct c_common_resword): Add __underlying_type.
12450 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
12451
12452 2011-04-20 Jim Meyering <meyering@redhat.com>
12453
12454 * c-format.c (init_dollar_format_checking): Remove useless
12455 if-before-free.
12456
12457 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
12458
12459 * c-objc.h (objc_get_interface_ivars): Removed.
12460 (objc_detect_field_duplicates): New.
12461 * stub-objc.c: Likewise.
12462
12463 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12464
12465 * stub-objc.c (objc_declare_protocols): Renamed to
12466 objc_declare_protocol.
12467 * c-objc.h: Likewise.
12468
12469 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12470
12471 * stub-objc.c (objc_declare_class): Updated argument name.
12472
12473 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
12474
12475 * c-common.h (c_common_init_ts): Declare.
12476 * c-common.c (c_common_init_ts): Define.
12477
12478 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
12479
12480 * c-objc.h (objc_build_message_expr): Updated prototype.
12481 * stub-objc.c (objc_build_message_expr): Likewise.
12482
12483 2011-04-12 Martin Jambor <mjambor@suse.cz>
12484
12485 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
12486 of cgraph_node.
12487
12488 2011-04-11 Richard Guenther <rguenther@suse.de>
12489
12490 * c-common.c (complete_array_type): Build a range type of
12491 proper type.
12492
12493 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
12494
12495 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
12496 (handle_type_generic_attribute): Likewise.
12497
12498 2011-04-07 Jason Merrill <jason@redhat.com>
12499
12500 PR c++/48450
12501 * c-common.c (c_common_truthvalue_conversion): Don't ignore
12502 conversion from C++0x scoped enum.
12503
12504 2011-04-06 Joseph Myers <joseph@codesourcery.com>
12505
12506 * c-target-def.h: New file.
12507 * c-target.def: New file.
12508 * c-target.h: New file.
12509 * c-common.c (targetcm): Don't define here.
12510 * c-common.h (default_handle_c_option): Declare.
12511 * c-format.c: Include c-target.h instead of target.h.
12512 * c-opts.c: Include c-target.h instead of target.h. Explicitly
12513 include tm.h.
12514 (default_handle_c_option): Move from targhooks.c.
12515
12516 2011-03-29 Jakub Jelinek <jakub@redhat.com>
12517
12518 PR preprocessor/48248
12519 * c-ppoutput.c (print): Add src_file field.
12520 (init_pp_output): Initialize it.
12521 (maybe_print_line): Don't optimize by adding up to 8 newlines
12522 if map->to_file and print.src_file are different file.
12523 (print_line): Update print.src_file.
12524
12525 2011-03-25 Kai Tietz <ktietz@redhat.com>
12526
12527 * c-ada-spec.c (compare_comment): Use filename_cmp
12528 instead of strcmp for filename.
12529
12530 2011-03-25 Jeff Law <law@redhat.com>
12531
12532 * c-common.c (def_fn_type): Add missing va_end.
12533
12534 2011-03-25 Jason Merrill <jason@redhat.com>
12535
12536 * c.opt: Add -std=c++03.
12537
12538 2011-03-22 Eric Botcazou <ebotcazou@adacore.com>
12539
12540 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
12541
12542 2011-03-17 Kai Tietz <ktietz@redhat.com>
12543
12544 PR target/12171
12545 * c-pretty-print.c (pp_c_specifier_qualifier_list):
12546 Display allowed attributes for function pointer types.
12547 (pp_c_attributes_display): New function to display
12548 attributes having affects_type_identity flag set to true.
12549 * c-pretty-print.h (pp_c_attributes_display): New prototype.
12550
12551 * c-common.c (c_common_attribute_table):
12552 Add new element.
12553 (c_common_format_attribute_table): Likewise.
12554
12555 2011-03-18 Jason Merrill <jason@redhat.com>
12556
12557 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
12558 * c-common.h: Don't declare it here.
12559 * c-common.c: Or define it here.
12560 * c-opts.c (c_common_handle_option): Or set it here.
12561
12562 PR c++/35315
12563 * c-common.c (handle_transparent_union_attribute): Don't
12564 make a duplicate type in C++.
12565
12566 2011-03-15 Jason Merrill <jason@redhat.com>
12567
12568 * c-common.c (max_constexpr_depth): New.
12569 * c-common.h: Declare it.
12570 * c-opts.c (c_common_handle_option): Set it.
12571 * c.opt (fconstexpr-depth): New option.
12572
12573 2011-03-11 Jason Merrill <jason@redhat.com>
12574
12575 * c-common.c (attribute_takes_identifier_p): Add missing const.
12576
12577 PR c++/46803
12578 * c-common.c (attribute_takes_identifier_p): Assume that an
12579 unknown attribute takes an identifier.
12580
12581 2011-03-07 Nathan Froyd <froydnj@codesourcery.com>
12582
12583 PR c/47786
12584 * c-common.c (c_type_hash): Call list_length instead of iterating
12585 through DECL_CHAIN. Rename 'i' to 'n_elements'.
12586
12587 2011-02-19 Jakub Jelinek <jakub@redhat.com>
12588
12589 PR c/47809
12590 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
12591
12592 2011-02-17 Iain Sandoe <iains@gcc.gnu.org>
12593
12594 * c.opt (fobjc-abi-version=) New.
12595 (fobjc-nilcheck): New.
12596
12597 2011-02-03 Nathan Froyd <froydnj@codesourcery.com>
12598
12599 PR c++/46890
12600 * c-common.h (keyword_is_decl_specifier): Declare.
12601 * c-common.c (keyword_is_decl_specifier): Define.
12602 (keyword_is_function_specifier): New function.
12603
12604 2011-01-26 Jakub Jelinek <jakub@redhat.com>
12605
12606 PR c/47473
12607 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
12608 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
12609 REAL_TYPE.
12610
12611 2011-01-26 Arnaud Charlet <charlet@adacore.com>
12612
12613 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
12614
12615 2011-01-26 Jakub Jelinek <jakub@redhat.com>
12616
12617 PR pch/47430
12618 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
12619 after init_c_lex if pch_file is set.
12620
12621 2011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
12622
12623 PR c++/43601
12624 * c.opt (-fkeep-inline-dllexport): New switch.
12625
12626 2011-01-12 Richard Guenther <rguenther@suse.de>
12627
12628 PR middle-end/32511
12629 * c-common.c (handle_weak_attribute): Warn instead of error
12630 on declaring an inline function weak.
12631
12632 2011-01-05 Tom Tromey <tromey@redhat.com>
12633
12634 * c-common.h (lvalue_error): Update.
12635 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
12636 not error.
12637
12638 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
12639
12640 PR objc/47075
12641 * c-objc.h (objc_finish_message_expr): Added argument to
12642 prototype.
12643
12644 2010-12-22 Nathan Froyd <froydnj@codesourcery.com>
12645
12646 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
12647 Use prototype_p.
12648
12649 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
12650
12651 * c-objc.h (objc_maybe_warn_exceptions): New.
12652 * stub-objc.c (objc_maybe_warn_exceptions): New.
12653
12654 2010-12-10 Nathan Froyd <froydnj@codesourcery.com>
12655
12656 * c-common.h (readonly_error): Declare.
12657 * c-common.c (readonly_error): Define.
12658
12659 2010-12-09 Nathan Froyd <froydnj@codesourcery.com>
12660
12661 * c-common.h (invalid_indirection_error): Declare.
12662 * c-common.c (invalid_indirection_error): Define.
12663
12664 2010-12-03 Richard Guenther <rguenther@suse.de>
12665
12666 PR c/46745
12667 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
12668 (pp_c_unary_expression): Likewise.
12669 (pp_c_expression): Likewise.
12670
12671 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
12672
12673 * c-common.h (objc_finish_function): New.
12674 (objc_non_volatilized_type): Removed.
12675 (objc_type_quals_match): Removed.
12676 * stub-objc.c (objc_finish_function): New.
12677 (objc_non_volatilized_type): Removed.
12678 (objc_type_quals_match): Removed.
12679
12680 2010-11-30 Joseph Myers <joseph@codesourcery.com>
12681
12682 * c-common.h (parse_optimize_options): Declare.
12683 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
12684 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
12685
12686 2010-11-29 Joseph Myers <joseph@codesourcery.com>
12687
12688 * c-opts.c (check_deps_environment_vars): Use getenv instead of
12689 GET_ENVIRONMENT.
12690 * c-pch.c (O_BINARY): Don't define here.
12691 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
12692
12693 2010-11-25 Joseph Myers <joseph@codesourcery.com>
12694
12695 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
12696 targetm.except_unwind_info.
12697
12698 2010-11-23 Joseph Myers <joseph@codesourcery.com>
12699
12700 * c-opts.c (c_common_handle_option): Pass location to
12701 set_struct_debug_option.
12702
12703 2010-11-23 Joseph Myers <joseph@codesourcery.com>
12704
12705 * c-common.c (visibility_options): Move from ../opts.c.
12706 * c-common.h (struct visibility_flags, visibility_options):
12707 Declare here.
12708 * c-opts.c (finish_options): Rename to c_finish_options.
12709 (c_common_init): Update call to finish_options.
12710
12711 2010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
12712
12713 PR objc/34033
12714 * c-lex.c (lex_string): Check that each string in an Objective-C
12715 string concat sequence starts with either one or zero '@', and
12716 that there are no spurious '@' signs at the end.
12717
12718 2010-11-20 Joseph Myers <joseph@codesourcery.com>
12719
12720 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
12721 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
12722 HANDLE_PRAGMA_VISIBILITY.
12723 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
12724 HANDLE_PRAGMA_VISIBILITY): Don't define.
12725 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
12726
12727 2010-11-20 Nathan Froyd <froydnj@codesourcery.com>
12728
12729 PR c++/16189
12730 PR c++/36888
12731 PR c++/45331
12732 * c-common.h (keyword_begins_type_specifier): Declare.
12733 (keyword_is_storage_class_specifier): Declare.
12734 (keyword_is_type_qualifier): Declare.
12735 * c-common.c (keyword_begins_type_specifier): New function.
12736 (keyword_is_storage_class_specifier): New function.
12737 (keyword_is_type_qualifier): Declare.
12738
12739 2010-11-19 Joseph Myers <joseph@codesourcery.com>
12740
12741 PR c/46547
12742 * c-common.c (in_late_binary_op): Define.
12743 (c_common_truthvalue_conversion): Check in_late_binary_op before
12744 calling c_save_expr.
12745 * c-common.h (in_late_binary_op): Declare.
12746
12747 2010-11-19 Joseph Myers <joseph@codesourcery.com>
12748
12749 * c-opts.c (c_common_handle_option): Update calls to
12750 set_struct_debug_option.
12751
12752 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
12753
12754 * c-common.h (objc_declare_protocols): Added additional argument.
12755 * stub-objc.c (objc_declare_protocol): Same change.
12756
12757 2010-11-18 Nathan Froyd <froydnj@codesourcery.com>
12758
12759 PR c/33193
12760 * c-common.h (build_real_imag_expr): Declare.
12761 * c-semantics.c (build_real_imag_expr): Define.
12762
12763 2010-11-17 Joseph Myers <joseph@codesourcery.com>
12764
12765 * c-opts.c (c_common_parse_file): Take no arguments.
12766 * c-common.h (c_common_parse_file): Update prototype.
12767
12768 2010-11-16 Jakub Jelinek <jakub@redhat.com>
12769
12770 PR c++/46401
12771 * c-common.c (warning_candidate_p): Don't track non-const calls
12772 or STRING_CSTs.
12773
12774 2010-11-15 Ian Lance Taylor <iant@google.com>
12775
12776 * c-lex.c (init_c_lex): Set macro debug callbacks if
12777 flag_dump_go_spec is set.
12778
12779 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
12780
12781 * c-common.h (objc_build_incr_expr_for_property_ref): New.
12782 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
12783
12784 2010-11-15 Nathan Froyd <froydnj@codesourcery.com>
12785
12786 PR preprocessor/45038
12787 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
12788 dialects.
12789
12790 2010-11-12 Joseph Myers <joseph@codesourcery.com>
12791
12792 * c-common.h (c_family_lang_mask): Declare.
12793 * c-opts.c (c_family_lang_mask): Make extern.
12794 * c-pragma.c (handle_pragma_diagnostic): Use
12795 control_warning_option.
12796
12797 2010-11-12 Joseph Myers <joseph@codesourcery.com>
12798
12799 * c-common.c (parse_optimize_options): Update call to
12800 decode_options.
12801 * c-common.h (c_common_handle_option): Update prototype.
12802 * c-opts.c (c_common_handle_option): Take location_t parameter and
12803 pass it to other functions.
12804
12805 2010-11-11 Joseph Myers <joseph@codesourcery.com>
12806
12807 * c-opts.c (warning_as_error_callback): Remove.
12808 (c_common_initialize_diagnostics): Don't call
12809 register_warning_as_error_callback.
12810 (c_common_handle_option): Handle -Werror=normalized= here.
12811
12812 2010-11-10 Joseph Myers <joseph@codesourcery.com>
12813
12814 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
12815 in diagnostic.
12816 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
12817 letter.
12818 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
12819 Remove trailing '.' from diagnostics.
12820 * c.opt (Wwrite-strings_: Avoid '`' in help text.
12821
12822 2010-11-10 Joseph Myers <joseph@codesourcery.com>
12823
12824 * c-common.c (parse_optimize_options): Pass global_dc to
12825 decode_options.
12826 * c-opts.c (c_common_handle_option): Pass &global_options to
12827 set_Wstrict_aliasing.
12828 * c.opt (v): Don't mark Common or document here.
12829
12830 2010-11-06 Iain Sandoe <iains@gcc.gnu.org>
12831
12832 PR target/44981
12833 * c-format.c (format_type): New type gcc_objc_string_format_type.
12834 (valid_stringptr_type_p): New.
12835 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
12836 (check_format_string): Pass expected type, use
12837 valid_stringptr_type_p (), check that the format string types are
12838 consistent with the format specification.
12839 (decode_format_attr): Warn if NSString is used outside objective-c.
12840 (format_types_orig): Add NSString.
12841 (format_name): New.
12842 (format_flags): New.
12843 (check_format_arg): Handle format strings requiring an external parser.
12844 first_target_format_type: New variable.
12845 (handle_format_attribute): Set up first_target_format_type, pass the
12846 expected format arg string type to check_format_string().
12847 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
12848 * stub-objc.c (objc_string_ref_type_p): New.
12849 (objc_check_format_arg): New.
12850
12851 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
12852
12853 Fixed using the Objective-C 2.0 dot-syntax with class names.
12854 * c-common.h (objc_build_class_component_ref): New.
12855 * stub-objc.c (objc_build_class_component_ref): New.
12856
12857 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
12858
12859 * c.opt (Wproperty-assign-default): New option.
12860
12861 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
12862
12863 Implemented -fobjc-std=objc1 flag.
12864 * c.opt (fobjc-std=objc1): New option.
12865
12866 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
12867
12868 Implemented format and noreturn attributes for Objective-C methods.
12869 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
12870 attribute for Objective-C methods.
12871
12872 2010-10-31 Jason Merrill <jason@redhat.com>
12873
12874 * c-common.c (conversion_warning, warn_for_collisions_1): Use
12875 EXPR_LOC_OR_HERE.
12876
12877 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
12878
12879 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
12880 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
12881 (objc_add_property_declaration): Removed arguments for copies and
12882 ivar.
12883 (objc_build_getter_call): Renamed to
12884 objc_maybe_build_component_ref.
12885 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
12886 (objc_is_property_ref): New.
12887 * c-common.c (c_common_reswords): Removed copies and ivar.
12888 * stub-objc.c (objc_add_property_declaration): Removed arguments
12889 for copies and ivar.
12890 (objc_build_getter_call): Renamed to
12891 objc_maybe_build_component_ref.
12892 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
12893 (objc_is_property_ref): New.
12894
12895 2010-10-29 Arnaud Charlet <charlet@adacore.com>
12896 Matthew Gingell <gingell@adacore.com>
12897
12898 * c-ada-spec.c (separate_class_package): New function.
12899 (pp_ada_tree_identifier): Prefix references to C++ classes with the
12900 name of their enclosing package.
12901 (print_ada_declaration): Use separate_class_package.
12902
12903 2010-10-27 Jason Merrill <jason@redhat.com>
12904
12905 * c-common.c (c_common_reswords): Add __is_literal_type.
12906 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
12907
12908 * c-common.c (check_case_value): Remove special C++ code.
12909
12910 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
12911
12912 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
12913 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
12914 and RID_LAST_PATTR.
12915 (objc_add_property_declaration): Added additional arguments.
12916 (objc_property_attribute_kind): Removed.
12917 (objc_set_property_attr): Removed.
12918 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
12919 copy and nonatomic.
12920 * stub-objc.c (objc_add_property_declaration): Added additional
12921 arguments.
12922 (objc_set_property_attr): Removed.
12923
12924 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
12925
12926 * c-common.h (objc_add_property_variable): Renamed to
12927 objc_add_property_declaration. Added location argument.
12928 * stub-objc.c (objc_add_property_variable): Same change.
12929
12930 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
12931
12932 * c-common.h (objc_maybe_printable_name): New.
12933 * stub-objc.c (objc_maybe_printable_name): New.
12934
12935 2010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
12936 Andrew Pinski <pinskia@gmail.com>
12937
12938 * c-common.h (c_common_mark_addressable_vec): Declare.
12939 * c-common.c (c_common_mark_addressable_vec): New function.
12940
12941 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
12942
12943 * c-common.h (objc_set_method_type): Removed.
12944 (objc_add_method_declaration): Added boolean argument.
12945 (objc_start_method_definition): Same change.
12946 (objc_build_method_signature): Same change.
12947 * stub-objc.c (objc_set_method_type): Removed.
12948 (objc_add_method_declaration): Added boolean argument.
12949 (objc_start_method_definition): Same change.
12950 (objc_build_method_signature): Same change.
12951
12952 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
12953
12954 * c-common.h (finish_file): Removed.
12955 (objc_write_global_declarations): New.
12956 * c-opts.c (c_common_parse_file): Do not call finish_file.
12957 * stub-objc.c (objc_write_global_declarations): New.
12958
12959 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
12960
12961 Implemented parsing @synthesize and @dynamic for
12962 Objective-C/Objective-C++.
12963 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
12964 (objc_add_synthesize_declaration): New.
12965 (objc_add_dynamic_declaration): New.
12966 * c-common.c (c_common_reswords): Add synthesize and dynamic.
12967 * stub-objc.c (objc_add_synthesize_declaration): New.
12968 (objc_add_dynamic_declaration): New.
12969
12970 2010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
12971
12972 PR target/46041
12973 * c-cppbuiltin.c (mode_has_fma): Move function here from
12974 builtins.c. Don't use the fma optab, instead just use the
12975 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
12976 using -save-temps.
12977
12978 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
12979
12980 Merge from 'apple/trunk' branch on FSF servers.
12981
12982 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
12983
12984 Radar 4330422
12985 * c-common.h (objc_non_volatilized_type): New declaration
12986 * stub-objc.c (objc_non_volatilized_type): New stub.
12987
12988 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
12989
12990 Merge from 'apple/trunk' branch on FSF servers.
12991
12992 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
12993
12994 Radar 4133425
12995 * c-common.h (objc_diagnose_private_ivar): New decl.
12996 * stub-objc.c (objc_diagnose_private_ivar): New stub.
12997
12998 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
12999
13000 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
13001 * c-common.h (enum rid): Add RID_AT_PACKAGE.
13002 (objc_ivar_visibility_kind): New enum.
13003 (objc_set_visibility): Adjust prototype to use visibility enum.
13004 * stub-objc.c (objc_set_visibility): Adjust stub to use
13005 visibility enum.
13006
13007 2010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
13008
13009 * c-cppbuiltin.c (builtin_define_float_constants): Emit
13010 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
13011 has the appropriate fma builtins.
13012 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
13013
13014 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
13015
13016 merge from FSF apple 'trunk' branch.
13017 2006 Fariborz Jahanian <fjahanian@apple.com>
13018
13019 Radars 4436866, 4505126, 4506903, 4517826
13020 * c-common.c (c_common_resword): Define @property and its attributes.
13021 * c-common.h: Define property attribute enum entries.
13022 (OBJC_IS_PATTR_KEYWORD): New.
13023 (objc_property_attribute_kind): New enum.
13024 Declare objc_set_property_attr (), objc_add_property_variable (),
13025 objc_build_getter_call () and objc_build_setter_call ().
13026 * stub-objc.c (objc_set_property_attr): New stub.
13027 (objc_add_property_variable): Likewise.
13028 (objc_build_getter_call): Likewise.
13029 (objc_build_setter_call) Likewise.
13030
13031 2010-10-13 Iain Sandoe <iains@gcc.gnu.org>
13032
13033 merge from FSF apple 'trunk' branch.
13034 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
13035
13036 Radar 3803157 (method attributes)
13037 * c-common.c (handle_deprecated_attribute): Recognize
13038 objc methods as valid declarations.
13039 * c-common.h: Declare objc_method_decl ().
13040 * stub-objc.c (objc_method_decl): New stub.
13041
13042 2010-10-08 Joseph Myers <joseph@codesourcery.com>
13043
13044 * c-common.c (parse_optimize_options): Call
13045 decode_cmdline_options_to_array_default_mask before
13046 decode_options. Update arguments to decode_options.
13047 * c-common.h (c_common_init_options_struct): Declare.
13048 * c-opts.c (c_common_init_options_struct): New. Split out from
13049 c_common_init_options.
13050
13051 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
13052
13053 Implemented fast enumeration for Objective-C.
13054 * c-common.h (objc_finish_foreach_loop): New.
13055 * stub-objc.c (objc_finish_foreach_loop): New.
13056
13057 2010-10-05 Joseph Myers <joseph@codesourcery.com>
13058
13059 * c-common.h (struct diagnostic_context): Don't declare here.
13060 (c_common_initialize_diagnostics): Declare using
13061 diagnostic_context typedef.
13062 * c-opts.c (c_common_handle_option): Pass global_dc to
13063 handle_generated_option.
13064
13065 2010-10-04 Joseph Myers <joseph@codesourcery.com>
13066
13067 * c-opts.c (c_common_handle_option): Pass &global_options_set to
13068 handle_generated_option.
13069
13070 2010-10-03 Ian Lance Taylor <iant@google.com>
13071
13072 * c.opt (-fplan9-extensions): New option.
13073
13074 2010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
13075
13076 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
13077 Remove.
13078 (c_cpp_builtins): Call functions from cppbuiltin.c instead
13079 of duplicating code.
13080
13081 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
13082
13083 * c-common.c: Add two new entries for @optional
13084 and @required keywords.
13085
13086 merge from FSF 'apple/trunk' branch.
13087 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
13088
13089 Radar 4386773
13090 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
13091 objective-c keywords.
13092 (objc_set_method_opt): New declaration.
13093 * stub-objc.c (objc_set_method_opt): New stub.
13094
13095 2010-09-30 Joseph Myers <joseph@codesourcery.com>
13096
13097 * c-common.c (handle_optimize_attribute): Pass &global_options to
13098 cl_optimization_save and cl_optimization_restore.
13099 * c-opts.c (c_common_handle_option): Pass &global_options to
13100 handle_generated_option.
13101 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
13102 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
13103 &global_options to cl_optimization_restore.
13104
13105 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
13106
13107 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
13108 Objective-C/Objective-C++ keywords.
13109
13110 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
13111
13112 Merge from 'apple/trunk' branch on FSF servers.
13113
13114 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
13115
13116 Radar 4281748
13117 * c-common.h (objc_check_global_decl): New declaration.
13118 * stub-objc.c (objc_check_global_decl): New stub.
13119
13120 2010-09-29 Joseph Myers <joseph@codesourcery.com>
13121
13122 * c.opt: Don't use VarExists.
13123
13124 2010-09-29 Joseph Myers <joseph@codesourcery.com>
13125
13126 * c-common.c (c_cpp_error): Update names of diagnostic_context
13127 members.
13128 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
13129 cl_optimization members.
13130 * c-opts.c (warning_as_error_callback, c_common_handle_option,
13131 sanitize_cpp_opts, finish_options): Update names of cpp_options
13132 members.
13133
13134 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
13135
13136 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
13137 (objc_is_reserved_word): Removed.
13138 * c-common.c: Updated comments.
13139 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
13140 objc_is_reserved_word.
13141 * stub-objc.c (objc_is_reserved_word): Removed.
13142
13143 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13144
13145 * c-common.h (objc_add_method_declaration): Adjust prototype to
13146 include attributes.
13147 (objc_start_method_definition): Likewise.
13148 (objc_build_keyword_decl): Likewise.
13149 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
13150 (objc_start_method_definition): Likewise.
13151 (objc_build_keyword_decl): Likewise.
13152
13153 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13154
13155 * c-common.h (objc_start_class_interface): Adjust prototype.
13156 (objc_start_category_interface): Likewise.
13157 (objc_start_protocol): Likewise.
13158 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
13159 (objc_start_class_interface): Likewise.
13160 (objc_start_category_interface): Likewise.
13161
13162 2010-09-27 Ian Lance Taylor <iant@google.com>
13163
13164 * c-common.c (c_common_attribute_table): Add no_split_stack.
13165 (handle_no_split_stack_attribute): New static function.
13166
13167 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
13168
13169 Merge from 'apple/trunk' branch on FSF servers.
13170
13171 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
13172
13173 Radar 4229905
13174 * c-common.h (objc_have_common_type): New declaration.
13175 * stub-objc.c (objc_have_common_type): New stub.
13176
13177 2005-06-22 Ziemowit Laski <zlaski@apple.com>
13178
13179 Radar 4154928
13180 * c-common.h (objc_common_type): New prototype.
13181 * stub-objc.c (objc_common_type): New stub.
13182
13183 2010-09-24 Jan Hubicka <jh@suse.cz>
13184
13185 * c-common.c (handle_leaf_attribute): New function.
13186 (struct attribute_spec c_common_att): Add leaf.
13187
13188 2010-09-22 Joseph Myers <joseph@codesourcery.com>
13189
13190 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
13191 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
13192 -dump, -dump=, -imacros, -imacros=, -include, -include=,
13193 -include-barrier, -include-directory, -include-directory=,
13194 -include-directory-after, -include-directory-after=,
13195 -include-prefix, -include-prefix=, -include-with-prefix,
13196 -include-with-prefix=, -include-with-prefix-after,
13197 -include-with-prefix-after=, -include-with-prefix-before,
13198 -include-with-prefix-before=, -no-integrated-cpp,
13199 -no-line-commands, -no-standard-includes, -no-warnings, -output,
13200 -output=, -pedantic, -pedantic-errors, -preprocess,
13201 -print-missing-file-dependencies, -trace-includes, -traditional,
13202 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
13203 -user-dependencies, -verbose, -write-dependencies,
13204 -write-user-dependencies, no-integrated-cpp, traditional): New.
13205
13206 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13207
13208 PR objc/23710
13209 * c-common.h (objc_start_method_definition): Return bool instead
13210 of void.
13211 * stub-objc.c (objc_start_method_definition): Return bool instead
13212 of void.
13213
13214 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13215
13216 PR objc/25965
13217 * c-common.h (objc_get_interface_ivars): New declaration.
13218 * stub-objc.c (objc_get_interface_ivars): New stub.
13219
13220 2010-09-15 Ian Lance Taylor <iant@google.com>
13221
13222 * c-common.c (parse_optimize_options): Do not capitalize warning
13223 messages. Remove period at end of warning message.
13224
13225 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13226
13227 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
13228 (handle_alias_attribute): ... here.
13229 (handle_ifunc_attribute): New.
13230
13231 2010-09-06 Mark Mitchell <mark@codesourcery.com>
13232
13233 * c-common.h (do_warn_double_promotion): Declare.
13234 * c-common.c (do_warn_double_promotion): Define.
13235
13236 2010-09-05 Mark Mitchell <mark@codesourcery.com>
13237
13238 * c.opt (Wdouble-promotion): New.
13239
13240 2010-09-02 Joseph Myers <joseph@codesourcery.com>
13241
13242 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
13243 fvtable-thunks, fxref): Mark no longer supported in help text.
13244
13245 2010-09-02 Joseph Myers <joseph@codesourcery.com>
13246
13247 * c.opt (Wimport, fall-virtual, falt-external-templates,
13248 fdefault-inline, fenum-int-equiv, fexternal-templates,
13249 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
13250 fname-mangling-version-, fnew-abi, fnonnull-objects,
13251 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
13252 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
13253 applicable.
13254 (fhandle-exceptions): Mark with Alias and Warn.
13255 * c-opts.c (c_common_handle_option): Don't handle options marked
13256 as ignored.
13257
13258 2010-09-02 Joseph Myers <joseph@codesourcery.com>
13259
13260 * c.opt (Wcomments, Werror-implicit-function-declaration,
13261 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
13262 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
13263 aliases.
13264 * c-common.c (option_codes): Use OPT_Wcomment instead of
13265 OPT_Wcomments.
13266 * c-opts.c (warning_as_error_callback, c_common_handle_option):
13267 Don't handle options marked as aliases.
13268
13269 2010-08-25 Richard Guenther <rguenther@suse.de>
13270
13271 * c-common.c (c_common_get_alias_set): Remove special
13272 handling for pointers.
13273
13274 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
13275
13276 * c-common.c: Use FOR_EACH_VEC_ELT.
13277 * c-gimplify.c: Likewise.
13278 * c-pragma.c: Likewise.
13279
13280 2010-08-16 Joseph Myers <joseph@codesourcery.com>
13281
13282 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
13283 RejectDriver.
13284 (MMDX): Change back to MMD. Mark NoDriverArg instead of
13285 RejectDriver.
13286 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
13287 instead of OPT_MDX and OPT_MMDX.
13288
13289 2010-08-16 Joseph Myers <joseph@codesourcery.com>
13290
13291 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
13292
13293 2010-08-12 Joseph Myers <joseph@codesourcery.com>
13294
13295 * c.opt (MD, MMD): Change to MDX and MMDX.
13296 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
13297
13298 2010-08-11 Joseph Myers <joseph@codesourcery.com>
13299
13300 * c-opts.c (c_common_handle_option): Call handle_generated_option
13301 instead of handle_option.
13302
13303 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13304
13305 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
13306 (maybe_apply_renaming_pragma): Delete unneeded declarations.
13307
13308 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13309
13310 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
13311 (pending_redefine_extname): Change type to a VEC.
13312 (add_to_renaming_pragma_list): Update for new type of
13313 pending_redefine_extname.
13314 (maybe_apply_renaming_pragma): Likewise.
13315
13316 2010-08-04 Arnaud Charlet <charlet@adacore.com>
13317
13318 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
13319 visited.
13320 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
13321 decide whether a type has already been declared/seen.
13322 Do not go to the original type.
13323 (dump_nested_types): New parameter forward.
13324 Generate forward declaration if needed and mark type as visited.
13325 (print_ada_declaration): Call dump_nested_types if not already done.
13326 Mark types as visited.
13327
13328 2010-08-03 Joseph Myers <joseph@codesourcery.com>
13329
13330 * c.opt (-print-pch-checksum): Remove option.
13331 * c-opts.c (c_common_handle_option): Don't handle
13332 OPT_print_pch_checksum.
13333
13334 2010-07-27 Joseph Myers <joseph@codesourcery.com>
13335
13336 * c-common.h (c_common_handle_option): Update prototype and return
13337 value type.
13338 * c-opts.c (c_common_handle_option): Update prototype and return
13339 value type. Update calls to handle_option and
13340 enable_warning_as_error.
13341
13342 2010-07-27 Jakub Jelinek <jakub@redhat.com>
13343
13344 PR c/45079
13345 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
13346
13347 2010-07-27 Joseph Myers <joseph@codesourcery.com>
13348
13349 * c-common.h (c_common_missing_argument): Remove.
13350 * c-opts.c (c_common_missing_argument): Remove.
13351 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
13352 idirafter, imacros, include, isysroot, isystem, iquote): Add
13353 MissingArgError.
13354 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
13355
13356 2010-07-27 Joseph Myers <joseph@codesourcery.com>
13357
13358 * c-common.h (c_common_option_lang_mask,
13359 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
13360 New.
13361 (c_common_init_options): Update prototype.
13362 * c-opts.c (c_common_option_lang_mask): New.
13363 (c_common_initialize_diagnostics): Split out of
13364 c_common_init_options.
13365 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
13366 New.
13367 (c_common_init_options): Update prototype. Use decoded options in
13368 search for -lang-asm.
13369
13370 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
13371
13372 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
13373 * c-format.c: Likewise.
13374
13375 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
13376
13377 * c-common.h: Include diagnostic-core.h. Error if already
13378 included.
13379 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
13380
13381 2010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
13382
13383 * c-common.c (IN_GCC_FRONTEND): Do not undef.
13384 Do not include expr.h
13385 (vector_mode_valid_p): Move here.
13386
13387 2010-06-21 DJ Delorie <dj@redhat.com>
13388
13389 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
13390 allow these pragmas anywhere.
13391
13392 2010-06-14 Jakub Jelinek <jakub@redhat.com>
13393
13394 PR bootstrap/44509
13395 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
13396 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
13397 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
13398 ggc_strdup instead of xstrdup.
13399
13400 2010-06-10 Jakub Jelinek <jakub@redhat.com>
13401
13402 * c-cppbuiltin.c: Include cpp-id-data.h.
13403 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
13404 (lazy_hex_fp_value): New function.
13405 (builtin_define_with_hex_fp_value): Provide definitions lazily.
13406
13407 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
13408
13409 * c-gimplify.c: Do not include tree-flow.h
13410
13411 2010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
13412
13413 PR other/44034
13414 * c-common.c: Rename targetm member:
13415 targetm.enum_va_list -> targetm.enum_va_list_p
13416
13417 2010-06-28 Anatoly Sokolov <aesok@post.ru>
13418
13419 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
13420
13421 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
13422
13423 * c-cppbuiltin.c: Do not include except.h.
13424
13425 2010-06-24 Andi Kleen <ak@linux.intel.com>
13426
13427 * c-common.c (warn_for_omitted_condop): New.
13428 * c-common.h (warn_for_omitted_condop): Add prototype.
13429
13430 2010-06-21 Joseph Myers <joseph@codesourcery.com>
13431
13432 * c.opt (lang-objc): Remove.
13433 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
13434
13435 2010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
13436
13437 * c-opts.c: Include "tm_p.h".
13438
13439 2010-06-20 Joseph Myers <joseph@codesourcery.com>
13440
13441 * c-common.c (parse_optimize_options): Update call to
13442 decode_options.
13443
13444 2010-06-18 Nathan Froyd <froydnj@codesourcery.com>
13445
13446 * c-common.c (record_types_used_by_current_var_decl): Adjust for
13447 new type of types_used_by_cur_var_decl.
13448
13449 2010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
13450
13451 PR bootstrap/44512
13452 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
13453 for C++ standard compliance.
13454
13455 2010-06-16 Jason Merrill <jason@redhat.com>
13456
13457 * c.opt: Add -Wnoexcept.
13458
13459 2010-06-16 Richard Guenther <rguenther@suse.de>
13460
13461 PR c/44555
13462 * c-common.c (c_common_truthvalue_conversion): Remove
13463 premature and wrong optimization concering ADDR_EXPRs.
13464
13465 2010-06-15 Arnaud Charlet <charlet@adacore.com>
13466
13467 * c-ada-spec.c (dump_sloc): Remove column info.
13468 (is_simple_enum): New function.
13469 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
13470 enum types when relevant.
13471
13472 2010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
13473
13474 * c-common.c (conversion_warning): Warn at expression
13475 location.
13476
13477 2010-06-10 Joseph Myers <joseph@codesourcery.com>
13478
13479 * c-opts.c (c_common_handle_option): Don't handle
13480 OPT_fshow_column.
13481
13482 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
13483
13484 * c-pragma.c (push_alignment): Use typed GC allocation.
13485 (handle_pragma_push_options): Likewise.
13486
13487 * c-common.c (parse_optimize_options): Likewise.
13488
13489 * c-common.h (struct sorted_fields_type): Add variable_size GTY
13490 option.
13491
13492 2010-06-07 Joseph Myers <joseph@codesourcery.com>
13493
13494 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
13495 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
13496 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
13497 flag_signed_bitfields, warn_strict_null_sentinel,
13498 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
13499 flag_gen_declaration, flag_no_gnu_keywords,
13500 flag_implement_inlines, flag_implicit_templates,
13501 flag_implicit_inline_templates, flag_optional_diags,
13502 flag_elide_constructors, flag_default_inline, flag_rtti,
13503 flag_conserve_space, flag_access_control, flag_check_new,
13504 flag_new_for_scope, flag_weak, flag_working_directory,
13505 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
13506 flag_enforce_eh_specs, flag_threadsafe_statics,
13507 flag_pretty_templates): Remove.
13508 * c-common.h (flag_preprocess_only, flag_nil_receivers,
13509 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
13510 flag_replace_objc_classes, flag_undef, flag_no_builtin,
13511 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
13512 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
13513 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
13514 flag_no_gnu_keywords, flag_implement_inlines,
13515 flag_implicit_templates, flag_implicit_inline_templates,
13516 flag_optional_diags, flag_elide_constructors, flag_default_inline,
13517 flag_rtti, flag_conserve_space, flag_access_control,
13518 flag_check_new, flag_new_for_scope, flag_weak,
13519 flag_working_directory, flag_use_cxa_atexit,
13520 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
13521 flag_threadsafe_statics, flag_pretty_templates,
13522 warn_strict_null_sentinel): Remove.
13523 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
13524 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
13525 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
13526 fimplicit-inline-templates, fimplicit-templates,
13527 flax-vector-conversions, fms-extensions, fnil-receivers,
13528 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
13529 frtti, fshort-double, fshort-enums, fshort-wchar,
13530 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
13531 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
13532 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
13533 gen-decls, undef): Use Var.
13534 (fdefault-inline, foptional-diags): Document as doing nothing.
13535 * c-opts.c (c_common_handle_option): Remove cases for options now
13536 using Var. Mark ignored options as such.
13537
13538 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
13539
13540 * c-common.c: Moved to here from parent directory.
13541 * c-common.def: Likewise.
13542 * c-common.h: Likewise.
13543 * c-cppbuiltin.c: Likewise.
13544 * c-dump.c: Likewise.
13545 * c-format.c: Likewise.
13546 * c-format.h : Likewise.
13547 * c-gimplify.c: Likewise.
13548 * c-lex.c: Likewise.
13549 * c-omp.c: Likewise.
13550 * c.opt: Likewise.
13551 * c-opts.c: Likewise.
13552 * c-pch.c: Likewise.
13553 * c-ppoutput.c: Likewise.
13554 * c-pragma.c: Likewise.
13555 * c-pragma.h: Likewise.
13556 * c-pretty-print.c: Likewise.
13557 * c-pretty-print.h: Likewise.
13558 * c-semantics.c: Likewise.
13559 * stub-objc.c: Likewise.
13560
13561 * c-common.c: Include gt-c-family-c-common.h.
13562 * c-pragma.c: Include gt-c-family-c-pragma.h.
13563 \f
13564 Copyright (C) 2010-2022 Free Software Foundation, Inc.
13565
13566 Copying and distribution of this file, with or without modification,
13567 are permitted in any medium without royalty provided the copyright
13568 notice and this notice are preserved.
This page took 0.6202 seconds and 5 git commands to generate.