]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
analyzer: fixes to file-descriptor handling
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
87f9c4a4
GA
12022-10-19 Joseph Myers <joseph@codesourcery.com>
2
3 * c-format.h (enum format_lengths): Add FMT_LEN_w8, FMT_LEN_w16,
4 FMT_LEN_w32, FMT_LEN_w64, FMT_LEN_wf8, FMT_LEN_wf16, FMT_LEN_wf32
5 and FMT_LEN_wf64.
6 (NOARGUMENTS, NOLENGTHS): Update definitions.
7 (T_I8, T2X_I8, T_I16, T2X_I16, T_I32, T2X_I32, T_I64, T2X_I64)
8 (T_U8, T2X_U8, T_U16, T2X_U16, T_U32, T2X_U32, T_U64, T2X_U64)
9 (T_IF8, T2X_IF8, T_IF16, T2X_IF16, T_IF32, T2X_IF32, T_IF64)
10 (T2X_IF64, T_UF8, T2X_UF8, T_UF16, T2X_UF16, T_UF32, T2X_UF32)
11 (T_UF64, T2X_UF64): New macros.
12 * c-format.cc (printf_length_specs, scanf_length_specs): Add wN
13 and wfN length modifiers.
14 (print_char_table, scan_char_table): Add entries using wN and wfN
15 length modifiers.
16
21de009f
GA
172022-10-18 Joseph Myers <joseph@codesourcery.com>
18
19 PR c/36113
20 * c-common.cc (c_common_type_for_size): Add fallback to
21 widest_unsigned_literal_type_node or
22 widest_integer_literal_type_node for precision that may not
23 exactly match the precision of those types.
24
baeec7cc
GA
252022-10-14 Jakub Jelinek <jakub@redhat.com>
26
27 * c-cppbuiltin.cc (c_cpp_builtins): If bfloat16_type_node,
28 predefine __BFLT16_*__ macros and for C++23 also
29 __STDCPP_BFLOAT16_T__. Predefine bfloat16_type_node related
30 macros for -fbuilding-libgcc.
31 * c-lex.cc (interpret_float): Handle CPP_N_BFLOAT16.
32
332022-10-14 Jakub Jelinek <jakub@redhat.com>
34
35 PR middle-end/323
36 PR c++/107097
37 * c-common.def (EXCESS_PRECISION_EXPR): Remove comment part about
38 the tree being specific to C/ObjC.
39 * c-opts.cc (c_common_post_options): Handle flag_excess_precision
40 in C++ the same as in C.
41 * c-lex.cc (interpret_float): Set const_type to excess_precision ()
42 even for C++.
43
621a911d
GA
442022-10-13 Joseph Myers <joseph@codesourcery.com>
45
46 * c-cppbuiltin.cc (builtin_define_float_constants): Do not use
47 value 2 for *_IS_IEC_60559.
48
781f477a
GA
492022-10-12 Lewis Hyatt <lhyatt@gmail.com>
50
51 PR preprocessor/60014
52 PR preprocessor/60723
53 * c-ppoutput.cc (class token_streamer): Remove member
54 line_marker_emitted to...
55 (token_streamer::stream): ...a local variable here. Set
56 print.prev_was_system_token on all code paths.
57
27bfe54e
GA
582022-10-10 Nathan Sidwell <nathan@acm.org>
59
60 * c-opts.cc (c_common_post_options): Bump abi to 18.
61
622022-10-10 Marek Polacek <polacek@redhat.com>
63
64 PR c++/106937
65 * c-pretty-print.cc (pp_c_specifier_qualifier_list): Print only GNU
66 attributes here.
67 (c_pretty_printer::direct_abstract_declarator): Print the standard [[]]
68 attributes here.
69 (pp_c_attributes): Remove.
70 (pp_c_attributes_display): Print the [[]] form if appropriate. Use
71 get_attribute_name. Don't print a trailing space when printing the
72 [[]] form.
73 * c-pretty-print.h (pp_c_attributes): Remove.
74
9ff6c33e
GA
752022-10-07 Qing Zhao <qing.zhao@oracle.com>
76
77 * c-attribs.cc (handle_strict_flex_array_attribute): New function.
78 (c_common_attribute_table): New item for strict_flex_array.
79 * c.opt: (fstrict-flex-arrays): New option.
80 (fstrict-flex-arrays=): New option.
81
822022-10-07 Martin Liska <mliska@suse.cz>
83
84 * name-hint.h: Use std::move.
85
862022-10-07 Jakub Jelinek <jakub@redhat.com>
87
88 * c-common.cc (attribute_fallthrough_p): Lookup fallthrough attribute
89 only in gnu namespace or as standard attribute, treat fallthrough
90 attributes in other namespaces like any other unknown attribute.
91
629d04d3
GA
922022-10-06 Joseph Myers <joseph@codesourcery.com>
93
94 * c-common.cc (c_common_reswords): Mark typeof as D_EXT11. Add
95 typeof_unqual.
96 * c-common.h (enum rid): Add RID_TYPEOF_UNQUAL.
97 (D_EXT11): New macro. Values of subsequent macros updated.
98
992022-10-06 Jakub Jelinek <jakub@redhat.com>
100
101 PR c++/106654
102 * c-attribs.cc (handle_assume_attribute): New function.
103 (c_common_attribute_table): Add entry for assume attribute.
104 * c-lex.cc (c_common_has_attribute): Handle
105 __have_cpp_attribute (assume).
106
85872a69
GA
1072022-10-04 Jakub Jelinek <jakub@redhat.com>
108
109 * c-omp.cc (c_omp_directives): Uncomment begin declare target
110 entry.
111
69fd6dcc
GA
1122022-10-03 Patrick Palka <ppalka@redhat.com>
113
114 * c-common.cc (c_common_reswords): Use RID_IS_SAME instead of
115 RID_IS_SAME_AS.
116
1172022-10-03 Joseph Myers <joseph@codesourcery.com>
118
119 * c-cppbuiltin.cc (builtin_define_float_constants): Do not
120 special-case __*_EPSILON__ setting for IBM long double for C2x.
121
3a221b73
GA
1222022-09-30 Patrick Palka <ppalka@redhat.com>
123
124 * c-common.cc (c_common_reswords): Use cp/cp-trait.def to handle
125 C++ traits.
126 * c-common.h (enum rid): Likewise.
127
bbdcdf5c
GA
1282022-09-29 Joseph Myers <joseph@codesourcery.com>
129
130 * c-lex.cc (c_common_has_attribute): Handle noreturn attribute for
131 C.
132
1332022-09-29 Patrick Palka <ppalka@redhat.com>
134
135 * c-common.cc (c_common_reswords): Add __remove_cv,
136 __remove_reference and __remove_cvref.
137 * c-common.h (enum rid): Add RID_REMOVE_CV, RID_REMOVE_REFERENCE
138 and RID_REMOVE_CVREF.
139
1f16a020
GA
1402022-09-27 Marek Polacek <polacek@redhat.com>
141
142 PR c++/101165
143 PR c++/106882
144 * c-cppbuiltin.cc (c_cpp_builtins): Define __cpp_implicit_move.
145
1462022-09-27 Marek Polacek <polacek@redhat.com>
147
148 * c-format.cc (c_keywords): Drop nothrow.
149
1502022-09-27 Jakub Jelinek <jakub@redhat.com>
151
152 PR c++/106651
153 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
154 __cpp_static_call_operator=202207L for C++23.
155
1562022-09-27 Jakub Jelinek <jakub@redhat.com>
157
158 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ASSUME,
159 PRAGMA_OMP_ASSUMES and PRAGMA_OMP_BEGIN. Rename
160 PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
161 * c-pragma.cc (omp_pragmas): Add assumes and begin.
162 For end rename PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
163 (omp_pragmas_simd): Add assume.
164 * c-common.h (c_omp_directives): Declare.
165 * c-omp.cc (omp_directives): Rename to ...
166 (c_omp_directives): ... this. No longer static. Uncomment
167 assume, assumes, begin assumes and end assumes entries.
168 In end declare target entry rename PRAGMA_OMP_END_DECLARE_TARGET
169 to PRAGMA_OMP_END.
170 (c_omp_categorize_directive): Adjust for omp_directives to
171 c_omp_directives renaming.
172
1732022-09-27 Jakub Jelinek <jakub@redhat.com>
174
175 PR c++/106652
176 PR c++/85518
177 * c-common.cc (c_common_reswords): Change _Float{16,32,64,128} and
178 _Float{32,64,128}x flags from D_CONLY to 0.
179 (shorten_binary_op): Punt if common_type returns error_mark_node.
180 (shorten_compare): Likewise.
181 (c_common_nodes_and_builtins): For C++ record _Float{16,32,64,128}
182 and _Float{32,64,128}x builtin types if available. For C++
183 clear float128t_type_node.
184 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
185 __STDCPP_FLOAT{16,32,64,128}_T__ for C++23 if supported.
186 * c-lex.cc (interpret_float): For q/Q suffixes prefer
187 float128t_type_node over float128_type_node. Allow
188 {f,F}{16,32,64,128} suffixes for C++ if supported with pedwarn
189 for C++20 and older. Allow {f,F}{32,64,128}x suffixes for C++
190 with pedwarn. Don't call excess_precision_type for C++.
191
220c4d8e
GA
1922022-09-26 Marek Polacek <polacek@redhat.com>
193
194 PR c++/106656
195 * c-cppbuiltin.cc (c_cpp_builtins): Update value of __cpp_char8_t
196 for C++20.
197
4afaeaab
GA
1982022-09-23 Marek Polacek <polacek@redhat.com>
199
200 PR c++/106784
201 * c-common.cc (c_common_reswords): Add __is_convertible and
202 __is_nothrow_convertible.
203 * c-common.h (enum rid): Add RID_IS_CONVERTIBLE and
204 RID_IS_NOTHROW_CONVERTIBLE.
205
279c6715
GA
2062022-09-22 David Malcolm <dmalcolm@redhat.com>
207
208 PR c/106830
209 * c-warn.cc (check_for_xor_used_as_pow): Don't try checking
210 values that don't fit in uhwi.
211
d0fc05e8
GA
2122022-09-15 Richard Biener <rguenther@suse.de>
213
214 * c-common.h (build_void_list_node): Remove.
215 * c-common.cc (c_common_nodes_and_builtins): Do not initialize
216 void_list_node.
217
861d1a11
GA
2182022-09-09 Jan-Benedict Glaw <jbglaw@lug-owl.de>
219
220 * c-format.cc (convert_format_name_to_system_name): Fix warning.
221
fe2a8ce9
GA
2222022-09-07 Joseph Myers <joseph@codesourcery.com>
223
224 * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY
225 for alignas, alignof, bool, false, static_assert, thread_local and
226 true.
227
2282022-09-07 Jakub Jelinek <jakub@redhat.com>
229
230 * c.opt (Winvalid-utf8): Use ObjC instead of objC. Remove
231 " in comments" from description.
232 (Wunicode): New option.
233
25aeb922
GA
2342022-09-06 Jakub Jelinek <jakub@redhat.com>
235
236 PR c/106836
237 * c-omp.cc (c_omp_split_clauses): Handle OMP_CLAUSE_DOACROSS.
238
83f2f228
GA
2392022-09-03 Jakub Jelinek <jakub@redhat.com>
240
241 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DOACROSS.
242 * c-omp.cc (c_finish_omp_depobj): Check also for OMP_CLAUSE_DOACROSS
243 clause and diagnose it. Don't handle OMP_CLAUSE_DEPEND_SOURCE and
244 OMP_CLAUSE_DEPEND_SINK. Assert kind is not OMP_CLAUSE_DEPEND_INVALID.
245
c64b0947
GA
2462022-09-02 David Malcolm <dmalcolm@redhat.com>
247
248 PR c/90885
249 * c-common.h (check_for_xor_used_as_pow): New decl.
250 * c-lex.cc (c_lex_with_flags): Add DECIMAL_INT to flags as appropriate.
251 * c-warn.cc (check_for_xor_used_as_pow): New.
252 * c.opt (Wxor-used-as-pow): New.
253
bb0a1556
GA
2542022-09-01 Jason Merrill <jason@redhat.com>
255
256 * c-common.cc (c_common_nodes_and_builtins): Set TREE_STRING_FLAG on
257 char8_t.
258 (braced_list_to_string): Check for char-sized elements.
259
2602022-09-01 Jakub Jelinek <jakub@redhat.com>
261
262 PR c++/106655
263 * c.opt (-Winvalid-utf8): New warning.
264 * c-opts.cc (c_common_handle_option) <case OPT_finput_charset_>:
265 Set cpp_opts->cpp_input_charset_explicit.
266 (c_common_post_options): If -finput-charset=UTF-8 is explicit
267 in C++23, enable -Winvalid-utf8 by default and if -pedantic
268 or -pedantic-errors, make it a pedwarn.
269
542c60c4
GA
2702022-08-31 Joseph Myers <joseph@codesourcery.com>
271
272 * c-attribs.cc (handle_deprecated_attribute): Check and pedwarn
273 for LABEL_DECL.
274 * c-common.cc (c_add_case_label): Add argument ATTRS. Call
275 decl_attributes.
276 * c-common.h (do_case, c_add_case_label): Update declarations.
277 * c-lex.cc (c_common_has_attribute): For C, produce a result of
278 201910 for fallthrough and 202106 for maybe_unused.
279
16f542d6
GA
2802022-08-26 Marek Polacek <polacek@redhat.com>
281
282 PR c++/81159
283 * c.opt (Wself-move): New option.
284
2852022-08-26 Jakub Jelinek <jakub@redhat.com>
286
287 * c-common.cc (check_builtin_function_arguments): Handle
288 BUILT_IN_ISSIGNALING.
289
2902022-08-26 Jakub Jelinek <jakub@redhat.com>
291
292 PR c++/106648
293 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
294 __cpp_named_character_escapes to 202207L.
295
5d4389dc
GA
2962022-08-25 Marek Polacek <polacek@redhat.com>
297
298 * c-common.cc (c_common_reswords): Enable nullptr in C2X.
299 (c_common_nodes_and_builtins): Create the built-in node for nullptr.
300 * c-common.h (enum c_tree_index): Add CTI_NULLPTR, CTI_NULLPTR_TYPE.
301 (struct c_common_resword): Resize the disable member.
302 (D_C2X): Add.
303 (nullptr_node): Define.
304 (nullptr_type_node): Define.
305 (NULLPTR_TYPE_P): Define.
306 * c-pretty-print.cc (c_pretty_printer::simple_type_specifier): Handle
307 NULLPTR_TYPE.
308 (c_pretty_printer::direct_abstract_declarator): Likewise.
309 (c_pretty_printer::constant): Likewise.
310
47a61e65
GA
3112022-08-16 Tom Honermann <tom@honermann.net>
312
313 PR c++/106423
314 * c-opts.cc (c_common_post_options): Disable -Wc++20-compat
315 diagnostics in C++20 and later.
316 * c.opt (Wc++20-compat): Enable hooks for the preprocessor.
317
5cd525f0
GA
3182022-08-11 Marek Polacek <polacek@redhat.com>
319
320 PR middle-end/102633
321 * c-gimplify.cc (c_gimplify_expr) <case DECL_EXPR>: Don't call
322 suppress_warning here.
323
5f17badb
GA
3242022-08-08 Tom Honermann <tom@honermann.net>
325
326 PR preprocessor/106426
327 * c-opts.cc (c_common_post_options): Assign cpp_opts->unsigned_utf8char
328 subject to -fchar8_t, -fsigned-char, and/or -funsigned-char.
329
3302022-08-08 Tom Honermann <tom@honermann.net>
331
332 * c-lex.cc (lex_string, lex_charconst): Use char8_t as the type
333 of CPP_UTF8CHAR and CPP_UTF8STRING when char8_t support is
334 enabled.
335 * c-opts.cc (c_common_post_options): Set flag_char8_t if
336 targeting C2x.
337
4a7274dd
GA
3382022-07-31 Lewis Hyatt <lhyatt@gmail.com>
339
340 PR c++/66290
341 * c-common.h: Rename global done_lexing to
342 override_libcpp_locations.
343 * c-common.cc (c_cpp_diagnostic): Likewise.
344 * c-opts.cc (c_common_finish): Set override_libcpp_locations
345 (formerly done_lexing) immediately prior to calling cpp_finish ().
346
1e2c5f4c
GA
3472022-07-27 Lewis Hyatt <lhyatt@gmail.com>
348
349 * c-ppoutput.cc (token_streamer::stream): Update input_location
350 prior to streaming each token.
351
0e6fa997
GA
3522022-07-23 Immad Mir <mirimmad@outlook.com>
353
354 * c-attribs.cc: (c_common_attribute_table): add three new attributes
355 namely: fd_arg, fd_arg_read and fd_arg_write.
356 (handle_fd_arg_attribute): New.
357
bdc7b765
GA
3582022-07-15 Marek Polacek <polacek@redhat.com>
359
360 PR c++/104477
361 * c-common.cc (c_common_reswords): Add
362 __reference_constructs_from_temporary and
363 __reference_converts_from_temporary.
364 * c-common.h (enum rid): Add RID_REF_CONSTRUCTS_FROM_TEMPORARY and
365 RID_REF_CONVERTS_FROM_TEMPORARY.
366
3672022-07-15 Jonathan Wakely <jwakely@redhat.com>
368
369 * c-format.cc (class range_label_for_format_type_mismatch):
370 Adjust to new label_text API.
371
c72d4714
GA
3722022-07-11 Lewis Hyatt <lhyatt@gmail.com>
373
374 PR preprocessor/106252
375 * c-pragma.cc (handle_pragma_diagnostic_impl): Don't look up the
376 option argument prior to verifying the option was found.
377
6345c414
GA
3782022-07-07 David Malcolm <dmalcolm@redhat.com>
379
380 * c-format.cc (range_label_for_format_type_mismatch::get_text):
381 Update for removal of label_text::maybe_free in favor of automatic
382 memory management.
383
4bc92c3b
GA
3842022-07-06 Lewis Hyatt <lhyatt@gmail.com>
385
386 PR preprocessor/53920
387 PR c++/53431
388 * c-common.cc (c_option_is_from_cpp_diagnostics): New function.
389 * c-common.h (c_option_is_from_cpp_diagnostics): Declare.
390 (c_pp_stream_token): Declare.
391 * c-ppoutput.cc (init_pp_output): Refactor logic about skipping
392 pragmas to...
393 (should_output_pragmas): ...here. New function.
394 (token_streamer::stream): Support handling early pragmas.
395 (do_line_change): Likewise.
396 (c_pp_stream_token): New function.
397 * c-pragma.cc (struct pragma_diagnostic_data): New helper class.
398 (pragma_diagnostic_lex_normal): New function. Moved logic for
399 interpreting GCC diagnostic pragmas here.
400 (pragma_diagnostic_lex_pp): New function for parsing diagnostic pragmas
401 directly from libcpp.
402 (handle_pragma_diagnostic): Refactor into helper function...
403 (handle_pragma_diagnostic_impl): ...here. New function.
404 (handle_pragma_diagnostic_early): New function.
405 (handle_pragma_diagnostic_early_pp): New function.
406 (struct pragma_ns_name): Renamed to...
407 (struct pragma_pp_data): ...this. Add new "early_handler" member.
408 (c_register_pragma_1): Support early pragmas in the preprocessor.
409 (c_register_pragma_with_early_handler): New function.
410 (c_register_pragma): Support the new early handlers in struct
411 internal_pragma_handler.
412 (c_register_pragma_with_data): Likewise.
413 (c_register_pragma_with_expansion): Likewise.
414 (c_register_pragma_with_expansion_and_data): Likewise.
415 (c_invoke_early_pragma_handler): New function.
416 (c_pp_invoke_early_pragma_handler): New function.
417 (init_pragma): Add early pragma support for diagnostic pragmas.
418 * c-pragma.h (struct internal_pragma_handler): Add new early handler
419 members.
420 (c_register_pragma_with_early_handler): Declare.
421 (c_invoke_early_pragma_handler): Declare.
422 (c_pp_invoke_early_pragma_handler): Declare.
423
d1f3a3ff
GA
4242022-07-05 Marek Polacek <polacek@redhat.com>
425
426 PR c++/105626
427 * c-format.cc (check_format_arg): Don't emit -Wformat warnings with
428 u8 strings.
429
ed974488
GA
4302022-07-01 Marek Polacek <polacek@redhat.com>
431
432 PR c++/106111
433 * c-common.h (enum rid): Update RID_LAST_CXX20.
434
976196b3
GA
4352022-06-30 Jonathan Wakely <jwakely@redhat.com>
436
437 * known-headers.cc (get_stdlib_header_for_name): Add <time.h>
438 names.
439
84c2131d
GA
4402022-06-24 Jason Merrill <jason@redhat.com>
441
442 PR c++/87729
443 PR c++/20423
444 * c.opt (Woverloaded-virtual): Add levels, include in -Wall.
445
4390e7bf
GA
4462022-06-18 Jakub Jelinek <jakub@redhat.com>
447
448 * c-ubsan.cc (ubsan_instrument_division, ubsan_instrument_shift):
449 Use flag_sanitize_trap & SANITIZE_??? instead of
450 flag_sanitize_undefined_trap_on_error. If 2 sanitizers are involved
451 and flag_sanitize_trap differs for them, emit __builtin_trap only
452 for the comparison where trap is requested.
453 (ubsan_instrument_vla, ubsan_instrument_return): Use
454 lag_sanitize_trap & SANITIZE_??? instead of
455 flag_sanitize_undefined_trap_on_error.
456
c3642271
GA
4572022-06-13 Jason Merrill <jason@redhat.com>
458
459 * c-ubsan.cc (ubsan_instrument_return): Use BUILTINS_LOCATION.
460
d9176e64
GA
4612022-05-27 Marek Polacek <polacek@redhat.com>
462
463 PR c/90658
464 * c-attribs.cc (get_priority): Check FUNCTION_DECL.
465
4662022-05-27 Jakub Jelinek <jakub@redhat.com>
467
468 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ENTER.
469
57f2ce6a
GA
4702022-05-20 David Malcolm <dmalcolm@redhat.com>
471
472 * c-format.cc: Replace uses of "FINAL" and "OVERRIDE" with "final"
473 and "override".
474 * c-pretty-print.h: Likewise.
475
1cda629f
GA
4762022-05-18 Marek Polacek <polacek@redhat.com>
477
478 PR c/105131
479 * c.opt (Wenum-int-mismatch): New.
480
4812022-05-18 Marek Polacek <polacek@redhat.com>
482
483 PR c++/105497
484 * c-warn.cc (c_do_switch_warnings): Don't warn about unhandled
485 enumerator when it was marked with attribute unused.
486
4872022-05-18 Eric Botcazou <ebotcazou@adacore.com>
488
489 * c-ada-spec.cc (dump_ada_node) <COMPLEX_TYPE>: Deal with usual
490 floating-point complex types.
491 <POINTER_TYPE>: Do not use limited_with clause if the designated
492 type is a scalar type.
493
3d9439b1
GA
4942022-05-17 Jakub Jelinek <jakub@redhat.com>
495
496 * c-omp.cc (c_finish_omp_depobj): Handle
497 OMP_CLAUSE_DEPEND_INOUTSET.
498
702bd11f
GA
4992022-05-16 Jason Merrill <jason@redhat.com>
500
501 PR c/105492
502 * c-attribs.cc (handle_mode_attribute): Don't fix broken typedefs
503 here.
504
5052022-05-16 Martin Liska <mliska@suse.cz>
506
507 * c-common.cc (ARRAY_SIZE): Use ARRAY_SIZE.
508 (c_common_nodes_and_builtins): Likewise.
509 * c-format.cc (check_tokens): Likewise.
510 (check_plain): Likewise.
511 * c-pragma.cc (c_pp_lookup_pragma): Likewise.
512 (init_pragma): Likewise.
513 * known-headers.cc (get_string_macro_hint): Likewise.
514 (get_stdlib_header_for_name): Likewise.
515 * c-attribs.cc: Likewise.
516
9df4ffe4
GA
5172022-05-13 Richard Biener <rguenther@suse.de>
518
519 * c-omp.cc: Remove gimple-fold.h include.
520
49ace834
GA
5212022-05-12 Jakub Jelinek <jakub@redhat.com>
522
523 * c-common.h (enum rid): Add RID_OMP_ALL_MEMORY.
524 * c-omp.cc (c_finish_omp_depobj): Don't build_fold_addr_expr
525 if null_pointer_node.
526
d0d513b5
GA
5272022-05-11 Martin Liska <mliska@suse.cz>
528
529 PR target/105355
530 * c-opts.cc (c_common_handle_option): Change option name.
531 * c.opt: Remove Joined and use Separate option.
532
bd022ff9
GA
5332022-05-09 Alex Coplan <alex.coplan@arm.com>
534
535 * c-common.h (get_dump_info): Delete.
536 * c-gimplify.cc (c_genericize): Get TDI_original dump file info
537 from the global dump_manager instead of the (now obsolete)
538 get_dump_info.
539 * c-opts.cc (original_dump_file): Delete.
540 (original_dump_flags): Delete.
541 (c_common_parse_file): Switch to using global dump_manager to
542 manage the original dump file; fix leak of dump file.
543 (get_dump_info): Delete.
544
a1947c92
GA
5452022-05-07 Marek Polacek <polacek@redhat.com>
546
547 PR c++/101833
548 PR c++/47634
549 * c-attribs.cc (positional_argument): Pass POS by reference. Deal
550 with FN being either a function declaration or function type. Use
551 maybe_adjust_arg_pos_for_attribute.
552 * c-common.cc (check_function_arguments): Maybe pass FNDECL down to
553 check_function_format.
554 * c-common.h (maybe_adjust_arg_pos_for_attribute): Declare.
555 (positional_argument): Adjust.
556 * c-format.cc (get_constant): Rename to ...
557 (validate_constant): ... this. Take EXPR by reference. Return bool
558 instead of tree.
559 (handle_format_arg_attribute): Don't overwrite FORMAT_NUM_EXPR by the
560 return value of validate_constant.
561 (decode_format_attr): Don't overwrite FORMAT_NUM_EXPR and
562 FIRST_ARG_NUM_EXPR by the return value of validate_constant.
563 (check_function_format): Adjust a parameter name.
564 (handle_format_attribute): Maybe pass FNDECL down to decode_format_attr.
565
3e7db517
GA
5662022-05-04 Marek Polacek <polacek@redhat.com>
567
568 * c-warn.cc (warnings_for_convert_and_check): Convert constants of type
569 char to int.
570
95874f95
GA
5712022-04-30 Jason Merrill <jason@redhat.com>
572
573 PR c/100545
574 * c-attribs.cc (handle_mode_attribute): Copy attributes, aligned,
575 and typedef.
576 * c-common.cc (set_underlying_type): Add assert.
577
01ad093b
GA
5782022-04-26 Patrick Palka <ppalka@redhat.com>
579
580 PR c++/105304
581 * c-common.cc (verify_tree) [restart]: Move up to before the
582 NULL test.
583
da066c42
GA
5842022-04-11 Jakub Jelinek <jakub@redhat.com>
585
586 PR c++/105186
587 * c-common.cc (c_common_nodes_and_builtins): After registering __int%d
588 and __int%d__ builtin types, initialize corresponding ridpointers
589 entry.
590
150ab50f
GA
5912022-03-30 Marek Polacek <polacek@redhat.com>
592
593 PR c++/101030
594 * c-warn.cc (conversion_warning) <case COND_EXPR>: Don't call
595 conversion_warning when OP1 is null.
596
5972022-03-30 Thomas Schwinge <thomas@codesourcery.com>
598
599 * c.opt (Wc++11-extensions, Wc++14-extensions, Wc++17-extensions)
600 (Wc++20-extensions, Wc++23-extensions): Remove 'LangEnabledBy'
601 option properties.
602
6032022-03-30 Thomas Schwinge <thomas@codesourcery.com>
604
605 * c.opt (Wuse-after-free): Remove.
606
6072022-03-30 Thomas Schwinge <thomas@codesourcery.com>
608
609 * c.opt (Warray-bounds): Remove.
610
d2906412
GA
6112022-03-26 Thomas Schwinge <thomas@codesourcery.com>
612
613 * c.opt: Properly quote comment.
614
31e989a2
GA
6152022-03-25 Eric Botcazou <ebotcazou@adacore.com>
616
617 * c-ada-spec.cc (dump_ada_import): Deal with the "section" attribute
618 (dump_ada_node) <POINTER_TYPE>: Do not modify and pass the name, but
619 the referenced type instead. Deal with the anonymous original type
620 of a typedef'ed type. In the actual access case, follow the chain
621 of external subtypes.
622 <TYPE_DECL>: Tidy up control flow.
623
d156bb87
GA
6242022-03-21 Qian Jianhua <qianjh@cn.fujitsu.com>
625
626 * c-ada-spec.cc: Change array length
627
d7f00da1
GA
6282022-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
629
630 * c-common.cc (c_family_tests): Call the new tests.
631 * c-common.h (c_diagnostic_tests): Declare.
632 (c_opt_problem_cc_tests): Likewise.
633
6342022-03-19 Jakub Jelinek <jakub@redhat.com>
635
636 PR c++/101515
637 * c-pretty-print.cc (c_fold_indirect_ref_for_warn): For C++ don't
638 return COMPONENT_REFs with FIELD_DECLs whose containing scope can't
639 be printed.
640
9fc8f278
GA
6412022-03-16 Christophe Lyon <christophe.lyon@arm.com>
642 Roger Sayle <roger@nextmovesoftware.com>
643
644 PR c/98198
645 * c-attribs.cc (decl_or_type_attrs): Add error_mark_node check.
646
6472022-03-16 Patrick Palka <ppalka@redhat.com>
648
649 PR c++/96780
650 * c.opt: Add -ffold-simple-inlines.
651
b9756c08
GA
6522022-03-13 Tobias Burnus <tobias@codesourcery.com>
653
654 * c-target.def (check_string_object_format_arg): Fix description typo.
655
57eeedda
GA
6562022-03-12 Thomas Schwinge <thomas@codesourcery.com>
657
658 PR other/65095
659 * c-common.h (c_omp_map_clause_name): Remove.
660 * c-omp.cc (c_omp_map_clause_name): Remove.
661
8cc4f9cd
GA
6622022-03-09 Jakub Jelinek <jakub@redhat.com>
663
664 PR c/104711
665 * c-opts.cc (c_common_post_options): Don't enable
666 -Wshift-negative-value from -Wextra for C++20 or later.
667 * c-ubsan.cc (ubsan_instrument_shift): Adjust comments.
668 * c-warn.cc (maybe_warn_shift_overflow): Use TYPE_OVERFLOW_WRAPS
669 instead of TYPE_UNSIGNED.
670
e6533e2e
GA
6712022-03-07 Jakub Jelinek <jakub@redhat.com>
672
673 * c-attribs.cc: Fix up duplicated word issue in a comment.
674
12d4552e
GA
6752022-03-01 Martin Liska <mliska@suse.cz>
676
677 PR ipa/104533
678 * c-attribs.cc (handle_target_clones_attribute): Use
679 get_target_clone_attr_len and report warning soon.
680
0bdb0498
GA
6812022-02-17 Jonathan Wakely <jwakely@redhat.com>
682
683 * c-pragma.cc (handle_pragma_pack): Remove parameter name.
684 (handle_pragma_weak): Likewise.
685 (handle_pragma_scalar_storage_order): Likewise.
686 (handle_pragma_redefine_extname): Likewise.
687 (handle_pragma_visibility): Likewise.
688 (handle_pragma_diagnostic): Likewise.
689 (handle_pragma_target): Likewise.
690 (handle_pragma_optimize): Likewise.
691 (handle_pragma_push_options): Likewise.
692 (handle_pragma_pop_options): Likewise.
693 (handle_pragma_reset_options): Likewise.
694 (handle_pragma_message): Likewise.
695 (handle_pragma_float_const_decimal64): Likewise.
696
cb3afcd2
GA
6972022-02-16 Jakub Jelinek <jakub@redhat.com>
698
699 PR c/104531
700 * c-omp.cc (c_finish_omp_atomic): For MIN_EXPR/MAX_EXPR, try first
701 build_binary_op with LT_EXPR and only if that doesn't return
702 error_mark_node call build_modify_expr.
703
7042022-02-16 Jakub Jelinek <jakub@redhat.com>
705
706 PR c/104510
707 * c-common.cc (shorten_compare): Convert original arguments to
708 the original *restype_ptr when mixing binary and decimal float.
709
1f8a09d2
GA
7102022-02-14 Richard Biener <rguenther@suse.de>
711
712 PR c/104505
713 * c-pretty-print.cc (c_pretty_printer::postfix_expression): Handle
714 internal function calls.
715
e8d68f0a
GA
7162022-02-11 Richard Biener <rguenther@suse.de>
717
718 * c-attribs.cc (c_common_attribute_table): Add entry for
719 vector_mask.
720 (handle_vector_mask_attribute): New.
721
a645583d
GA
7222022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
723
724 * c-omp.cc (c_omp_split_clauses): Added OMP_CLAUSE_HAS_DEVICE_ADDR case.
725 * c-pragma.h (enum pragma_kind): Added 5.1 in comment.
726 (enum pragma_omp_clause): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR.
727
3adf509f
GA
7282022-02-09 Jason Merrill <jason@redhat.com>
729
730 * c-cppbuiltin.cc (c_cpp_builtins): Update values
731 of __cpp_constexpr and __cpp_concepts for C++20.
732
bb99171b
GA
7332022-01-24 Marek Polacek <polacek@redhat.com>
734
735 PR preprocessor/104030
736 * c.opt (Wbidi-chars): Mark as EnumSet. Also accept =ucn.
737
9dd44357
GA
7382022-01-21 Jakub Jelinek <jakub@redhat.com>
739
740 PR c++/104148
741 * c-common.h (check_function_arguments_recurse): Add for_format
742 arg.
743 * c-common.cc (check_function_nonnull): Pass false to
744 check_function_arguments_recurse's last argument.
745 (check_function_arguments_recurse): Add for_format argument,
746 if true, don't stop on warning_suppressed_p.
747 * c-format.cc (check_format_info): Pass true to
748 check_function_arguments_recurse's last argument.
749
fe1ad141
GA
7502022-01-19 David Malcolm <dmalcolm@redhat.com>
751
752 * c-common.cc (c_common_c_tests): Rename to...
753 (c_common_cc_tests): ...this.
754 (c_family_tests): Update calls for .c to .cc renaming.
755 * c-common.h (c_format_c_tests): Rename to...
756 (c_format_cc_tests): ...this.
757 (c_indentation_c_tests): Rename to...
758 (c_indentation_cc_tests): ...this.
759 (c_pretty_print_c_tests): Rename to...
760 (c_pretty_print_cc_tests): ...this.
761 * c-format.cc (c_format_c_tests): Rename to...
762 (c_format_cc_tests): ...this.
763 * c-indentation.cc (c_indentation_c_tests): Rename to...
764 (c_indentation_cc_tests): ...this.
765 * c-pretty-print.cc (c_pretty_print_c_tests): Rename to...
766 (c_pretty_print_cc_tests): ...this.
767
fc829782
GA
7682022-01-17 Martin Liska <mliska@suse.cz>
769
770 * c-ada-spec.cc: Rename .c names to .cc.
771 * c-ada-spec.h: Likewise.
772 * c-common.cc (c_build_vec_convert): Likewise.
773 (warning_candidate_p): Likewise.
774 * c-common.h (enum rid): Likewise.
775 (build_real_imag_expr): Likewise.
776 (finish_label_address_expr): Likewise.
777 (c_get_substring_location): Likewise.
778 (c_build_bind_expr): Likewise.
779 (conflict_marker_get_final_tok_kind): Likewise.
780 (c_parse_error): Likewise.
781 (check_missing_format_attribute): Likewise.
782 (invalid_array_size_error): Likewise.
783 (warn_for_multistatement_macros): Likewise.
784 (build_attr_access_from_parms): Likewise.
785 * c-cppbuiltin.cc (c_cpp_builtins): Likewise.
786 * c-format.cc: Likewise.
787 * c-gimplify.cc (c_gimplify_expr): Likewise.
788 * c-indentation.h: Likewise.
789 * c-objc.h (objc_prop_attr_kind_for_rid): Likewise.
790 * c-omp.cc (c_omp_predetermined_mapping): Likewise.
791 * c-opts.cc (c_common_post_options): Likewise.
792 (set_std_cxx23): Likewise.
793 * c-pragma.cc (handle_pragma_redefine_extname): Likewise.
794 * c-pretty-print.h: Likewise.
795
7962022-01-17 Martin Liska <mliska@suse.cz>
797
798 * c-ada-spec.c: Moved to...
799 * c-ada-spec.cc: ...here.
800 * c-attribs.c: Moved to...
801 * c-attribs.cc: ...here.
802 * c-common.c: Moved to...
803 * c-common.cc: ...here.
804 * c-cppbuiltin.c: Moved to...
805 * c-cppbuiltin.cc: ...here.
806 * c-dump.c: Moved to...
807 * c-dump.cc: ...here.
808 * c-format.c: Moved to...
809 * c-format.cc: ...here.
810 * c-gimplify.c: Moved to...
811 * c-gimplify.cc: ...here.
812 * c-indentation.c: Moved to...
813 * c-indentation.cc: ...here.
814 * c-lex.c: Moved to...
815 * c-lex.cc: ...here.
816 * c-omp.c: Moved to...
817 * c-omp.cc: ...here.
818 * c-opts.c: Moved to...
819 * c-opts.cc: ...here.
820 * c-pch.c: Moved to...
821 * c-pch.cc: ...here.
822 * c-ppoutput.c: Moved to...
823 * c-ppoutput.cc: ...here.
824 * c-pragma.c: Moved to...
825 * c-pragma.cc: ...here.
826 * c-pretty-print.c: Moved to...
827 * c-pretty-print.cc: ...here.
828 * c-semantics.c: Moved to...
829 * c-semantics.cc: ...here.
830 * c-ubsan.c: Moved to...
831 * c-ubsan.cc: ...here.
832 * c-warn.c: Moved to...
833 * c-warn.cc: ...here.
834 * cppspec.c: Moved to...
835 * cppspec.cc: ...here.
836 * stub-objc.c: Moved to...
837 * stub-objc.cc: ...here.
838
9248ee41
GA
8392022-01-15 Martin Sebor <msebor@redhat.com>
840
841 PR c/63272
842 * c.opt (-Wdangling-pointer): New option.
843
8442022-01-15 Martin Sebor <msebor@redhat.com>
845
846 PR tree-optimization/80532
847 * c.opt (-Wuse-after-free): New options.
848
617db51d
GA
8492022-01-14 David Malcolm <dmalcolm@redhat.com>
850
851 * c-attribs.c (c_common_attribute_table): Add "tainted_args".
852 (handle_tainted_args_attribute): New.
853
ad3f0d08
GA
8542022-01-13 Anthony Sharp <anthonysharp15@gmail.com>
855 Jason Merrill <jason@redhat.com>
856
857 PR c++/70417
858 * c.opt: Added -Wmissing-template-keyword.
859
8602022-01-13 Richard Biener <rguenther@suse.de>
861
862 PR c/104002
863 * c-common.c (c_common_mark_addressable_vec): Handle TARGET_EXPR.
864
02a8a01b
GA
8652022-01-12 Martin Liska <mliska@suse.cz>
866
867 PR target/103804
868 * c-attribs.c (handle_optimize_attribute): Do not call
869 cl_optimization_compare if we seen an error.
870
01a254e3
GA
8712022-01-11 Jakub Jelinek <jakub@redhat.com>
872
873 PR c/101537
874 PR c/103881
875 * c-warn.c (conversion_warning): Handle BIT_AND_EXPR, BIT_IOR_EXPR
876 and BIT_XOR_EXPR.
877
d9450aa0
GA
8782022-01-10 Richard Biener <rguenther@suse.de>
879
880 PR middle-end/101530
881 * c-common.c (c_build_shufflevector): Wrap the BIT_FIELD_REF
882 in a TARGET_EXPR to force a temporary.
883
11ce8d04
GA
8842022-01-06 Marek Polacek <polacek@redhat.com>
885
886 PR c++/103758
887 * c-pragma.c (handle_pragma_scalar_storage_order): Use %< %> in
888 diagnostic messages.
889 (handle_pragma_diagnostic): Likewise.
890
a4ae8c37
GA
8912022-01-03 Marek Polacek <polacek@redhat.com>
892
893 PR c++/103758
894 * c-format.c (check_tokens): Accept "decl-specifier*".
895
8962022-01-03 Jakub Jelinek <jakub@redhat.com>
897
898 PR c++/103600
899 * c-attribs.c (handle_non_overlapping_attribute): New function.
900 (c_common_attribute_table): Add "non overlapping" attribute.
901
84790a9d
GA
9022021-12-30 Jakub Jelinek <jakub@redhat.com>
903
904 PR c++/103012
905 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Perform
906 cpp_define_unused/cpp_undef calls with forced token locations
907 BUILTINS_LOCATION.
908
d1e111da
GA
9092021-12-27 Patrick Palka <ppalka@redhat.com>
910
911 PR c++/103700
912 * c-common.c (pointer_int_sum): When quiet, return
913 error_mark_node for an incomplete pointed-to type and don't
914 call size_in_bytes_loc.
915
2554e2da
GA
9162021-12-17 Jason Merrill <jason@redhat.com>
917
918 PR c++/103681
919 * c-opts.c (c_common_post_options): Update defaults.
920
774269aa
GA
9212021-12-16 Martin Liska <mliska@suse.cz>
922
923 PR target/103709
924 * c-pragma.c (handle_pragma_pop_options): Do not check
925 global options modification when an error is seen in parsing
926 of options (pragmas or attributes).
927
c8dcf64b
GA
9282021-12-12 Jonathan Wakely <jwakely@redhat.com>
929
930 * known-headers.cc: Define INCLUDE_MEMORY instead of
931 INCLUDE_UNIQUE_PTR.
932 * name-hint.h: Likewise.
933 (class name_hint): Use std::unique_ptr instead of gnu::unique_ptr.
934
4b4839e3
GA
9352021-12-09 Jakub Jelinek <jakub@redhat.com>
936
937 PR pch/71934
938 * c-pch.c (c_common_no_more_pch): Pass a temporary void * var
939 with NULL value instead of NULL to host_hooks.gt_pch_use_address.
940
03a9bd05
GA
9412021-12-03 Jakub Jelinek <jakub@redhat.com>
942
943 PR pch/71934
944 * c-pch.c (struct c_pch_validity): Remove pch_init member.
945 (pch_init): Don't initialize v.pch_init.
946 (c_common_valid_pch): Don't warn and punt if .text addresses change.
947
40fa651e
GA
9482021-12-01 Jason Merrill <jason@redhat.com>
949
950 PR c++/103310
951 * c.opt: Add -fconstexpr-fp-except.
952
87cd82c8
GA
9532021-11-29 Richard Biener <rguenther@suse.de>
954
955 * c-format.c (check_format_string): Remove spurious
956 gcc_unreachable.
957
9582021-11-29 Richard Biener <rguenther@suse.de>
959
960 * c-opts.c (c_common_post_options): Remove unreachable return.
961 * c-pragma.c (handle_pragma_target): Likewise.
962 (handle_pragma_optimize): Likewise.
963
091ccc06
GA
9642021-11-25 Jakub Jelinek <jakub@redhat.com>
965
966 PR c++/102611
967 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
968 default for C++23 regardless of warn_deprecated.
969 * c-cppbuiltin.c (c_cpp_builtins): Predefine
970 __cpp_multidimensional_subscript=202110L for C++23.
971
e1d43592
GA
9722021-11-23 Martin Sebor <msebor@redhat.com>
973
974 PR middle-end/88232
975 * c.opt: Add -Winfinite-recursion.
976
9c077398
GA
9772021-11-19 Martin Sebor <msebor@redhat.com>
978
979 PR c++/33925
980 PR c/102867
981 * c-common.c (decl_with_nonnull_addr_p): Call maybe_nonzero_address
982 and improve handling tof defined symbols.
983
9842021-11-19 Martin Liska <mliska@suse.cz>
985
986 Revert:
987 2021-11-18 Martin Liska <mliska@suse.cz>
988
989 * c-gimplify.c (genericize_c_loop): Use option directly.
990
483092d3
GA
9912021-11-18 Matthias Kretz <m.kretz@gsi.de>
992
993 * c-common.c (c_common_reswords): Add __builtin_assoc_barrier.
994 * c-common.h (enum rid): Add RID_BUILTIN_ASSOC_BARRIER.
995
9962021-11-18 Martin Liska <mliska@suse.cz>
997
998 * c-gimplify.c (genericize_c_loop): Use option directly.
999
280d2838
GA
10002021-11-17 Martin Uecker <uecker@gcc.gnu.org>
1001
1002 PR c/91038
1003 PR c/29970
1004 * c-common.c (pointer_int_sum): Make sure pointer expressions
1005 are evaluated first when the size expression depends on for
1006 variably-modified types.
1007
10082021-11-17 Marek Polacek <polacek@redhat.com>
1009
1010 PR preprocessor/103026
1011 * c.opt (Wbidi-chars, Wbidi-chars=): New option.
1012
6b1695f4
GA
10132021-11-16 Jason Merrill <jason@redhat.com>
1014
1015 * c-common.c (release_tree_vector): Only cache vecs smaller than
1016 16 elements.
1017
e2b57363
GA
10182021-11-15 Jason Merrill <jason@redhat.com>
1019
1020 * c.opt: Add -fimplicit-constexpr.
1021 * c-cppbuiltin.c: Define __cpp_implicit_constexpr.
1022 * c-opts.c (c_common_post_options): Disable below C++14.
1023
10242021-11-15 Jakub Jelinek <jakub@redhat.com>
1025
1026 * c-omp.c (c_omp_split_clauses) <case OMP_CLAUSE_THREAD_LIMIT>:
1027 Duplicate to both OMP_TARGET and OMP_TEAMS.
1028
8d36a0d2
GA
10292021-11-10 Marek Polacek <polacek@redhat.com>
1030
1031 PR c++/101940
1032 * c-pragma.c (handle_pragma_diagnostic): Handle #pragma GCC diagnostic
1033 ignored_attributes.
1034
c9b1334e
GA
10352021-11-09 David Malcolm <dmalcolm@redhat.com>
1036
1037 * c-pragma.c (GCC_BAD_AT): New macro.
1038 (GCC_BAD2_AT): New macro.
1039 (handle_pragma_pack): Use the location of the pertinent token when
1040 issuing diagnostics about invalid constants/actions, and trailing
1041 junk.
1042 (handle_pragma_target): Likewise for non-string "GCC option".
1043 (handle_pragma_message): Likewise for trailing junk.
1044
18ae471f
GA
10452021-11-03 Joseph Myers <joseph@codesourcery.com>
1046
1047 PR c/103031
1048 * c-common.c (convert_and_check): Add argument init_const. Call
1049 convert_init if init_const.
1050 * c-common.h (convert_and_check): Update prototype.
1051 (convert_init): New prototype.
1052
cf82e8d9
GA
10532021-11-01 David Malcolm <dmalcolm@redhat.com>
1054
1055 * c-lex.c (c_lex_with_flags): When complaining about non-printable
1056 CPP_OTHER tokens, set the "escape on output" flag.
1057
04a2cf3f
GA
10582021-10-27 Jakub Jelinek <jakub@redhat.com>
1059
1060 * c-omp.c (c_omp_check_loop_iv_r): Don't clear 3rd bit for
1061 POINTER_PLUS_EXPR.
1062 (c_omp_check_nonrect_loop_iv): Handle POINTER_PLUS_EXPR.
1063 (c_omp_check_loop_iv): Set kind even if the iterator is non-integral.
1064
10652021-10-27 Jakub Jelinek <jakub@redhat.com>
1066
1067 PR c++/102854
1068 * c-common.h (c_omp_check_loop_iv_exprs): Add enum tree_code argument.
1069 * c-omp.c (c_omp_check_loop_iv_r): For trees other than decls,
1070 TREE_VEC, PLUS_EXPR, MINUS_EXPR, MULT_EXPR, POINTER_PLUS_EXPR or
1071 conversions temporarily clear the 3rd bit from d->kind while walking
1072 subtrees.
1073 (c_omp_check_loop_iv_exprs): Add CODE argument. Or in 4 into data.kind
1074 if possibly non-rectangular.
1075
ae5c5406
GA
10762021-10-21 Jakub Jelinek <jakub@redhat.com>
1077
1078 PR middle-end/64888
1079 * c-omp.c (c_omp_predefined_variable): Return true also for
1080 ubsan_create_data created artificial variables.
1081
5d5885c9
GA
10822021-10-14 Joseph Myers <joseph@codesourcery.com>
1083
1084 * c-format.c (printf_length_specs, scanf_length_specs)
1085 (print_char_table, scan_char_table): Support DFP formats for C2X.
1086 * c-format.h (TEX_D32, TEX_D64, TEX_D128): Remove.
1087 (T2X_D32, T2X_D64, T2X_D128): New macros.
1088
10892021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
1090
1091 * c-omp.c (c_omp_check_context_selector): Rename to
1092 omp_check_context_selector and move to omp-general.c.
1093 (c_omp_mark_declare_variant): Rename to omp_mark_declare_variant and
1094 move to omp-general.c.
1095
52055987
GA
10962021-10-12 Joseph Myers <joseph@codesourcery.com>
1097
1098 * c-format.c (print_char_table): Add %b and %B formats.
1099 (scan_char_table): Add %b format.
1100 * c-format.h (T2X_UI, T2X_UL, T2X_ULL, T2X_US, T2X_UC, T2X_ST)
1101 (T2X_UPD, T2X_UIM): New macros.
1102
11032021-10-12 Jakub Jelinek <jakub@redhat.com>
1104
1105 * c-omp.c (c_finish_omp_atomic): Use
1106 clear_padding_type_may_have_padding_p.
1107
ce6eec39
GA
11082021-10-08 Martin Liska <mliska@suse.cz>
1109
1110 * c-opts.c (c_common_post_options): Use new macro
1111 OPTION_SET_P.
1112
50e20ee6
GA
11132021-10-07 Martin Liska <mliska@suse.cz>
1114
1115 * c-common.c (parse_optimize_options): Make
1116 save_opt_decoded_options a pointer type.
1117
57c7ec62
GA
11182021-10-06 Jakub Jelinek <jakub@redhat.com>
1119
1120 PR tree-optimization/102571
1121 * c-omp.c (c_finish_omp_atomic): Optimize the case where type has
1122 padding, but the non-padding bits are contiguous set of bytes
1123 by adjusting the memcmp call arguments instead of emitting
1124 __builtin_clear_padding and then comparing all the type's bytes.
1125
11262021-10-06 Jakub Jelinek <jakub@redhat.com>
1127
1128 PR c++/102612
1129 * c-cppbuiltin.c (c_cpp_builtins): For -std=c++23 predefine
1130 __cpp_constexpr to 202110L rather than 201907L.
1131
da9c5f78
GA
11322021-10-04 Marek Polacek <polacek@redhat.com>
1133
1134 PR c++/97573
1135 * c-common.h (do_warn_array_compare): Declare.
1136 * c-warn.c (do_warn_array_compare): New.
1137 * c.opt (Warray-compare): New option.
1138
e3e07b89
GA
11392021-10-02 Iain Sandoe <iain@sandoe.co.uk>
1140
1141 * c-format.c: Remove a test of TARGET_FORMAT_TYPES with
1142 NULL, this is not needed.
1143
9d116bcc
GA
11442021-10-01 Martin Sebor <msebor@redhat.com>
1145
1146 PR c/102103
1147 * c-common.c (decl_with_nonnull_addr_p): Handle members.
1148 Check and perform warning suppression.
1149 (c_common_truthvalue_conversion): Enhance warning suppression.
1150
11512021-10-01 Martin Liska <mliska@suse.cz>
1152
1153 PR target/102552
1154 * c-common.c (parse_optimize_options): decoded_options[0] is
1155 used for program name, so merged_decoded_options should also
1156 respect that.
1157
11582021-10-01 Jakub Jelinek <jakub@redhat.com>
1159 Richard Biener <rguenther@suse.de>
1160
1161 PR sanitizer/102515
1162 * c-ubsan.c (ubsan_instrument_division): Check the right
1163 flag_sanitize_recover bit, depending on which sanitization
1164 is done. Sanitize INT_MIN / -1 under SANITIZE_SI_OVERFLOW
1165 rather than SANITIZE_DIVIDE. If both SANITIZE_SI_OVERFLOW
1166 and SANITIZE_DIVIDE is enabled, neither check is known
1167 to be false and flag_sanitize_recover bits for those two
1168 aren't the same, emit both __ubsan_handle_divrem_overflow
1169 and __ubsan_handle_divrem_overflow_abort calls.
1170
11712021-10-01 Martin Liska <mliska@suse.cz>
1172
1173 * c-common.c (parse_optimize_options): Combine optimize
1174 options with what was provided on the command line.
1175
11762021-10-01 Jakub Jelinek <jakub@redhat.com>
1177
1178 * c-omp.c (c_omp_split_clauses): Also copy
1179 OMP_CLAUSE_ORDER_REPRODUCIBLE.
1180
cf966403
GA
11812021-09-27 Martin Liska <mliska@suse.cz>
1182
1183 * c-opts.c (c_common_init_options_struct): Set also
1184 x_flag_default_complex_method.
1185
e4777439
GA
11862021-09-22 Jakub Jelinek <jakub@redhat.com>
1187
1188 * c-omp.c (c_omp_split_clauses): Copy over OMP_CLAUSE_ALLOCATE_ALIGN.
1189
62498024
GA
11902021-09-20 Matthias Kretz <m.kretz@gsi.de>
1191
1192 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define or
1193 undefine __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
1194 __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
1195 __ROUNDING_MATH__ according to the new optimization flags.
1196
cf74e7b5
GA
11972021-09-18 Jakub Jelinek <jakub@redhat.com>
1198
1199 * c-omp.c (c_omp_split_clauses): Split order clause also to
1200 distribute construct. Copy over OMP_CLAUSE_ORDER_UNCONSTRAINED.
1201
0a4cb439
GA
12022021-09-17 Jakub Jelinek <jakub@redhat.com>
1203
1204 * c-omp.c (c_finish_omp_atomic): Avoid creating
1205 TARGET_EXPR if test is true, use create_tmp_var_raw instead of
1206 create_tmp_var and add a zero initializer to TARGET_EXPRs that
1207 had NULL initializer. When omitting operands after v = x,
1208 use type of v rather than type of x. Fix type of vtmp
1209 TARGET_EXPR.
1210
07985c47
GA
12112021-09-13 Jason Merrill <jason@redhat.com>
1212
1213 * c.opt: Add -Winterference-size.
1214 * c-cppbuiltin.c (cpp_atomic_builtins): Add __GCC_DESTRUCTIVE_SIZE
1215 and __GCC_CONSTRUCTIVE_SIZE.
1216
a26206ec
GA
12172021-09-10 Jakub Jelinek <jakub@redhat.com>
1218
1219 * c-common.h (c_finish_omp_atomic): Add r and weak arguments.
1220 * c-omp.c: Include gimple-fold.h.
1221 (c_finish_omp_atomic): Add r and weak arguments. Add support for
1222 OpenMP 5.1 atomics.
1223
f84e2f0b
GA
12242021-09-09 qing zhao <qing.zhao@oracle.com>
1225
1226 * c-attribs.c (handle_uninitialized_attribute): New function.
1227 (c_common_attribute_table): Add "uninitialized" attribute.
1228
b6db7cd4
GA
12292021-09-08 liuhongt <hongtao.liu@intel.com>
1230
1231 * c-common.c (excess_precision_mode_join): Update below comments.
1232 (c_ts18661_flt_eval_method): Set excess_precision_type to
1233 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1234 * c-cppbuiltin.c (cpp_atomic_builtins): Update below comments.
1235 (c_cpp_flt_eval_method_iec_559): Set excess_precision_type to
1236 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1237
b2748138
GA
12382021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
1239
1240 * c-omp.c (c_finish_omp_flush): Handle MEMMODEL_SEQ_CST.
1241
7b739540
GA
12422021-09-03 Eric Botcazou <ebotcazou@adacore.com>
1243
1244 * c-ada-spec.c (dump_ads): Generate pragmas to disable style checks
1245 and -gnatwu warning for the package specification.
1246
e11c6046
GA
12472021-09-01 Iain Sandoe <iain@sandoe.co.uk>
1248
1249 * c-attribs.c (handle_unavailable_attribute): New.
1250
1e2f030b
GA
12512021-08-30 Jason Merrill <jason@redhat.com>
1252
1253 * c.opt: Add -Wmissing-requires.
1254
85d77ac4
GA
12552021-08-25 Lewis Hyatt <lhyatt@gmail.com>
1256
1257 PR other/93067
1258 * c-opts.c (c_common_input_charset_cb): New function.
1259 (c_common_post_options): Call new function
1260 diagnostic_initialize_input_context().
1261
7c9e1645
GA
12622021-08-20 Tobias Burnus <tobias@codesourcery.com>
1263
1264 * c-format.c (gcc_gfc_length_specs): Add 'll' and 'w'.
1265 (gcc_gfc_char_table): Add T9L_LL and T9L_ULL to
1266 "di" and "u", respecitively; fill with BADLEN to match
1267 size of 'types'.
1268 (get_init_dynamic_hwi): Split off from ...
1269 (init_dynamic_diag_info): ... here. Call it.
1270 (init_dynamic_gfc_info): Call it.
1271
12722021-08-20 Jakub Jelinek <jakub@redhat.com>
1273
1274 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ERROR.
1275 * c-pragma.c (omp_pragmas): Add error directive.
1276 * c-omp.c (omp_directives): Uncomment error directive entry.
1277
6e529985
GA
12782021-08-18 Jakub Jelinek <jakub@redhat.com>
1279
1280 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_NOTHING.
1281 * c-pragma.c (omp_pragmas): Add nothing directive.
1282 * c-omp.c (omp_directives): Uncomment nothing directive entry.
1283
2d14d64b
GA
12842021-08-17 Jakub Jelinek <jakub@redhat.com>
1285
1286 PR c++/101539
1287 * c-common.h (enum rid): Add RID_IS_LAYOUT_COMPATIBLE.
1288 * c-common.c (c_common_reswords): Add __is_layout_compatible.
1289
12902021-08-17 Matt Jacobson <mhjacobson@me.com>
1291
1292 * c-opts.c (c_common_post_options): Default to
1293 flag_objc_sjlj_exceptions = 1 only when flag_objc_abi < 2.
1294
12952021-08-17 Jakub Jelinek <jakub@redhat.com>
1296
1297 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCOPE.
1298 * c-pragma.c (omp_pragmas): Add scope construct.
1299 * c-omp.c (omp_directives): Uncomment scope directive entry.
1300
9d1d9fc8
GA
13012021-08-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
1302
1303 * c-cppbuiltin.c (c_cpp_builtins): Define
1304 __LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
1305
72be20e2
GA
13062021-08-12 Jakub Jelinek <jakub@redhat.com>
1307
1308 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_MASKED.
1309 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FILTER.
1310 * c-pragma.c (omp_pragmas_simd): Add masked construct.
1311 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_MASKED
1312 enumerator.
1313 (c_finish_omp_masked): Declare.
1314 * c-omp.c (c_finish_omp_masked): New function.
1315 (c_omp_split_clauses): Handle combined masked constructs.
1316
4d17ca1b
GA
13172021-07-30 Jakub Jelinek <jakub@redhat.com>
1318
1319 PR c++/101539
1320 * c-common.h (enum rid): Add RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
1321 * c-common.c (c_common_reswords): Add
1322 __is_pointer_interconvertible_base_of.
1323
13242021-07-29 Richard Biener <rguenther@suse.de>
1325
1326 PR c/101512
1327 * c-common.c (c_common_mark_addressable_vec): Look through
1328 C_MAYBE_CONST_EXPR even if not at the toplevel.
1329
af3f12e6
GA
13302021-07-27 Martin Sebor <msebor@redhat.com>
1331
1332 PR c/101585
1333 * c-warn.c (warn_parm_ptrarray_mismatch): Use OEP_DECL_NAME.
1334
ead235f6
GA
13352021-07-23 Jakub Jelinek <jakub@redhat.com>
1336
1337 * c-lex.c (c_common_has_attribute): Call canonicalize_attr_name also
1338 on attr_id. Return 1 for omp::directive or omp::sequence in C++11
1339 and later.
1340
13412021-07-23 Jakub Jelinek <jakub@redhat.com>
1342
1343 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP__START_ and
1344 PRAGMA_OMP__LAST_ enumerators.
1345
419c6c68
GA
13462021-07-21 Thomas Schwinge <thomas@codesourcery.com>
1347 Joseph Myers <joseph@codesourcery.com>
1348 Cesar Philippidis <cesar@codesourcery.com>
1349
1350 * c-pragma.h (pragma_omp_clause): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
1351
92d45509
GA
13522021-07-20 Martin Sebor <msebor@redhat.com>
1353
1354 * c-common.c (c_build_shufflevector): Adjust by-value argument to
1355 by-const-reference.
1356 * c-common.h (c_build_shufflevector): Same.
1357
87277b6a
GA
13582021-07-16 Andrew Pinski <apinski@marvell.com>
1359
1360 PR c/101453
1361 * c-common.c (parse_optimize_options): Use the correct
1362 size for buffer.
1363
d97d71a1
GA
13642021-07-15 Martin Sebor <msebor@redhat.com>
1365
1366 PR c/101289
1367 PR c/97548
1368 * c-warn.c (warn_parm_array_mismatch): Use OEP_DECL_NAME.
1369
c4fee1c6
GA
13702021-07-14 Jason Merrill <jason@redhat.com>
1371
1372 * c-opts.c (c_common_post_options): Set -fdelete-dead-exceptions.
1373
6fba0eea
GA
13742021-07-06 Martin Sebor <msebor@redhat.com>
1375
1376 * c-format.c (gcc_tdiag_char_table): Remove support for %G and %K.
1377 (gcc_cdiag_char_table): Same.
1378 (gcc_cxxdiag_char_table): Same.
1379
7a60a6e8
GA
13802021-07-02 Jakub Jelinek <jakub@redhat.com>
1381
1382 * c-common.h (enum c_omp_directive_kind): New enum.
1383 (struct c_omp_directive): New type.
1384 (c_omp_categorize_directive): Declare.
1385 * c-omp.c (omp_directives): New variable.
1386 (c_omp_categorize_directive): New function.
1387
bea7c16a
GA
13882021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1389
1390 * c-ada-spec.c (packed_layout): New global variable.
1391 (dump_ada_declaration): Set it upon seeing a packed record type.
1392 Do not put the "aliased" keyword if it is set.
1393 (dump_ada_structure): Add Pack aspect if it is set and clear it.
1394
13952021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1396
1397 * c-ada-spec.c (check_name): Rename into...
1398 (check_type_name_conflict): ...this. Minor tweak.
1399 (dump_ada_function_declaration): Adjust to above renaming.
1400 (dump_ada_array_domains): Fix oversight.
1401 (dump_ada_declaration): Call check_type_name_conflict for variables.
1402
90708f87
GA
14032021-06-25 Martin Sebor <msebor@redhat.com>
1404
1405 * c-common.c (c_wrap_maybe_const): Remove TREE_NO_WARNING.
1406 (c_common_truthvalue_conversion): Replace direct uses of
1407 TREE_NO_WARNING with warning_suppressed_p, suppress_warning, and
1408 copy_no_warning.
1409 (check_function_arguments_recurse): Same.
1410 * c-gimplify.c (c_gimplify_expr): Same.
1411 * c-warn.c (overflow_warning): Same.
1412 (warn_logical_operator): Same.
1413 (warn_if_unused_value): Same.
1414 (do_warn_unused_parameter): Same.
1415
9aa8327e
GA
14162021-06-24 Jakub Jelinek <jakub@redhat.com>
1417
1418 * c-common.h (enum c_omp_region_type): Add C_ORT_TARGET and
1419 C_ORT_OMP_TARGET.
1420 * c-omp.c (c_omp_split_clauses): For OMP_CLAUSE_IN_REDUCTION on
1421 combined target constructs also add map (always, tofrom:) clause.
1422
ede6c356
GA
14232021-06-15 Robin Dapp <rdapp@linux.ibm.com>
1424
1425 * c-attribs.c (common_handle_aligned_attribute): Remove short
1426 circuit and dead code.
1427
8dc48181
GA
14282021-06-14 Jonathan Wakely <jwakely@redhat.com>
1429
1430 PR c++/101052
1431 * known-headers.cc (get_stdlib_header_for_name): Add known
1432 headers for EXIT_FAILURE, EXIT_SUCCESS, abort, atexit, calloc,
1433 exit, and getenv.
1434
8b8c3912
GA
14352021-06-12 Jason Merrill <jason@redhat.com>
1436
1437 * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL.
1438
f16f65f8
GA
14392021-06-11 Jakub Jelinek <jakub@redhat.com>
1440
1441 PR c++/100974
1442 * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_if_consteval for
1443 -std=c++2b for P1938R3 consteval if support.
1444
4f625f47
GA
14452021-06-09 Jason Merrill <jason@redhat.com>
1446
1447 PR c++/100879
1448 * c-warn.c (warn_for_sign_compare): Remove C++ enum mismatch
1449 warning.
1450
438aac59
GA
14512021-06-07 Martin Liska <mliska@suse.cz>
1452
1453 * c-target.def: Split long lines and replace them
1454 with '\n\'.
1455
600f90cb
GA
14562021-06-04 Martin Sebor <msebor@redhat.com>
1457
1458 PR c/100783
1459 * c-attribs.c (positional_argument): Bail on erroneous types.
1460
14612021-06-04 Martin Sebor <msebor@redhat.com>
1462
1463 * c-warn.c (warn_parm_array_mismatch): Check TREE_PURPOSE to test
1464 for element presence.
1465
440c8a0a
GA
14662021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1467
1468 * c-ada-spec.c (dump_ada_macros): Minor tweaks.
1469 (dump_ada_decl_name): Likewise.
1470 (dump_anonymous_type_name): Remove parent parameter and adjust.
1471 (dump_sloc): Minor tweak.
1472 (dump_ada_array_type): Remove type parameter and adjust.
1473 (dump_ada_enum_type): Remove parent parameter and adjust.
1474 (dump_ada_node): Adjust calls to above functions.
1475 (dumped_anonymous_types): New global variable.
1476 (dump_nested_types_1): Rename into...
1477 (dump_nested_types): ...this.
1478 (dump_nested_type): Remove parent and dumped_types parameters.
1479 <ARRAY_TYPE>: Replace dumped_types with dumped_anonymous_types.
1480 Adjust calls to dump_anonymous_type_name and dump_ada_array_type.
1481 (dump_ada_specs): Initialize and free dumped_anonymous_types.
1482
14832021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1484
1485 * c-ada-spec.c (pp_ada_tree_identifier): Tidy up.
1486 (dump_ada_node) <POINTER_TYPE>: Deal specially with external subtypes.
1487
14882021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1489
1490 * c-ada-spec.c (dump_ada_enum_type): Dump a prefix for constants.
1491 (htable_t): New typedef.
1492 (overloaded_names): Use it.
1493 (add_name): New function.
1494 (init_overloaded_names): Use add_name to populate the table and add
1495 special cases for sigaction and stat.
1496 (overloaded_name_p): Rename into...
1497 (overloading_index): ...this. Do not initialize overloaded_names table
1498 here. Return the index or zero.
1499 (dump_ada_declaration): Minor tweaks. Do not skip overloaded functions
1500 but add an overloading suffix instead.
1501 (dump_ada_specs): Initialize overloaded_names tables here.
1502
b75978d1
GA
15032021-06-01 Martin Liska <mliska@suse.cz>
1504
1505 PR other/100759
1506 * c-attribs.c (handle_optimize_attribute): Limit sanity check
1507 to a situation where we are not in processing of an optimize
1508 pragma.
1509 * c-pragma.c (handle_pragma_pop_options): Restore target
1510 options.
1511
ee682192
GA
15122021-05-31 Indu Bhagat <indu.bhagat@oracle.com>
1513
1514 PR testsuite/100749
1515 * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names.
1516
15172021-05-31 Richard Biener <rguenther@suse.de>
1518
1519 PR c++/88601
1520 * c-common.c: Include tree-vector-builder.h and
1521 vec-perm-indices.h.
1522 (c_common_reswords): Add __builtin_shufflevector.
1523 (c_build_shufflevector): New funtion.
1524 * c-common.h (enum rid): Add RID_BUILTIN_SHUFFLEVECTOR.
1525 (c_build_shufflevector): Declare.
1526
48166757
GA
15272021-05-28 Jakub Jelinek <jakub@redhat.com>
1528
1529 PR middle-end/99928
1530 * c-omp.c (c_omp_split_clauses): For reduction clause if combined with
1531 target add a map tofrom clause with OMP_CLAUSE_MAP_IMPLICIT.
1532
15332021-05-28 Tobias Burnus <tobias@codesourcery.com>
1534
1535 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_AFFINITY.
1536
2bc6dace
GA
15372021-05-25 Martin Liska <mliska@suse.cz>
1538
1539 PR tree-optimization/92860
1540 PR target/99592
1541 * c-attribs.c (handle_optimize_attribute): Save target node
1542 before calling parse_optimize_options and save it in case
1543 it changes.
1544 * c-pragma.c (handle_pragma_target): Similarly for pragma.
1545 (handle_pragma_pop_options): Likewise here.
1546
15472021-05-25 Martin Liska <mliska@suse.cz>
1548
1549 * c-attribs.c (handle_no_sanitize_coverage_attribute): New.
1550
15512021-05-25 Jakub Jelinek <jakub@redhat.com>
1552
1553 PR middle-end/99928
1554 * c-omp.c (c_omp_split_clauses): Copy reduction to teams when teams is
1555 combined with simd and not with taskloop or for.
1556
2832d51b
GA
15572021-05-21 Jakub Jelinek <jakub@redhat.com>
1558
1559 PR middle-end/99928
1560 * c-omp.c (c_omp_split_clauses): Set OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
1561 on firstprivate clause copy going to target construct, and for
1562 target simd set also OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET bit.
1563
ea34e2ed
GA
15642021-05-20 Jonathan Wakely <jwakely@redhat.com>
1565
1566 * c.opt (Wc++11-extensions, Wc++14-extensions)
1567 (Wc++17-extensions, Wc++20-extensions, Wc++23-extensions): New
1568 options.
1569
15702021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1571
1572 * c-lex.c (init_c_lex): Use dwarf_debuginfo_p.
1573
15742021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1575
1576 * c-opts.c (c_common_post_options): Adjust access to debug_type_names.
1577 * c-pch.c (struct c_pch_validity): Use type uint32_t.
1578 (pch_init): Renamed member.
1579 (c_common_valid_pch): Adjust access to debug_type_names.
1580
65f32e5d
GA
15812021-05-19 Martin Sebor <msebor@redhat.com>
1582
1583 PR c/100619
1584 * c-attribs.c (build_attr_access_from_parms): Handle arbitrarily many
1585 bounds.
1586
a8daf9a1
GA
15872021-05-18 Richard Biener <rguenther@suse.de>
1588
1589 PR c/100547
1590 * c-attribs.c (type_valid_for_vector_size): Reject too large nunits.
1591 Reword existing nunit diagnostic.
1592
a7ffc1ef
GA
15932021-05-17 Joern Rennecke <joern.rennecke@embecosm.com>
1594
1595 * c-common.c (braced_list_to_string): Return CTOR unchanged
1596 if host and target character sizes don't match.
1597
87a7d10c
GA
15982021-05-14 Martin Liska <mliska@suse.cz>
1599
1600 * c.opt: Add Warning keyword for 2 options.
1601
f9af11c7
GA
16022021-05-13 Martin Liska <mliska@suse.cz>
1603
1604 PR middle-end/100504
1605 * c-attribs.c (handle_target_clones_attribute): Expect a string
1606 argument to target_clone argument.
1607
037e3661
GA
16082021-05-11 Joseph Myers <joseph@codesourcery.com>
1609
1610 * c-lex.c (interpret_float): Handle digit separators for C2X.
1611
aa891c56
GA
16122021-05-10 Martin Liska <mliska@suse.cz>
1613
1614 * c-ada-spec.c (print_destructor): Use startswith
1615 function instead of strncmp.
1616 (dump_ada_declaration): Likewise.
1617 * c-common.c (disable_builtin_function): Likewise.
1618 (def_builtin_1): Likewise.
1619 * c-format.c (check_tokens): Likewise.
1620 (check_plain): Likewise.
1621 (convert_format_name_to_system_name): Likewise.
1622
e4ff4ffb
GA
16232021-04-28 Patrick McGehearty <patrick.mcgehearty@oracle.com>
1624
1625 * c-cppbuiltin.c (c_cpp_builtins): Add supporting macros for new
1626 complex divide
1627
c0fa3f2f
GA
16282021-04-26 Thomas Schwinge <thomas@codesourcery.com>
1629 Nathan Sidwell <nathan@codesourcery.com>
1630 Tom de Vries <vries@codesourcery.com>
1631 Julian Brown <julian@codesourcery.com>
1632 Kwok Cheung Yeung <kcy@codesourcery.com>
1633
1634 * c.opt (Wopenacc-parallelism): New.
1635
6e81e015
GA
16362021-04-19 Thomas Schwinge <thomas@codesourcery.com>
1637
1638 * c.opt (fopenacc-kernels=): Remove.
1639
019a9220
GA
16402021-04-08 Jakub Jelinek <jakub@redhat.com>
1641
1642 * c-warn.c (do_warn_double_promotion): Fix comment typo,
1643 occured -> occurred.
1644 (check_alignment_of_packed_member): Fix a comment typo,
1645 memeber -> member.
1646 (warn_parm_ptrarray_mismatch): Fix comment typos, os -> of
1647 and onless -> unless.
1648 (warn_parm_array_mismatch): Fix comment typos, declaratation
1649 -> declaration and woud -> would. Fix up comment indentation.
1650
16512021-04-08 Martin Sebor <msebor@redhat.com>
1652
1653 PR middle-end/99883
1654 * c.opt (Wmismatched-new-delete): Correct spelling.
1655
b1da9916
GA
16562021-04-05 Eric Botcazou <ebotcazou@adacore.com>
1657
1658 * c-ada-spec.c (is_simple_enum): Minor tweaks.
1659 (dump_ada_enum_type): Add TYPE and PARENT parameters. For non-simple
1660 enumeral types use again the type name for the enumeration constants.
1661 (dump_ada_node): Adjust call to dump_ada_enum_type.
1662 (dump_nested_type): Likewise.
1663
f1607029
GA
16642021-04-01 Jason Merrill <jason@redhat.com>
1665
1666 PR c++/98481
1667 * c-opts.c (c_common_post_options): Bump latest_abi_version.
1668
4493b1c1
GA
16692021-03-25 Jakub Jelinek <jakub@redhat.com>
1670
1671 PR c++/99565
1672 * c-warn.c (do_warn_duplicated_branches): Pass also
1673 OEP_ADDRESS_OF_SAME_FIELD to operand_equal_p.
1674
6af7b307
GA
16752021-03-20 Jakub Jelinek <jakub@redhat.com>
1676
1677 PR debug/99230
1678 * c-gimplify.c (c_genericize_control_stmt): Handle STATEMENT_LIST.
1679
ceae9533
GA
16802021-03-05 Eric Botcazou <ebotcazou@adacore.com>
1681
1682 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types
1683 after entering the separate class package, if any.
1684
67f10d28
GA
16852021-03-04 Richard Biener <rguenther@suse.de>
1686
1687 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
1688 Handle ERROR_MARK.
1689
16902021-03-04 Jakub Jelinek <jakub@redhat.com>
1691
1692 PR c/99325
1693 * c-ppoutput.c (print): Change src_line type from int to unsigned.
1694 (token_streamer::stream) Likewise.
1695 (maybe_print_line_1): Likewise. Don't strcmp src_file if src_loc is
1696 UNKNOWN_LOCATION.
1697
f3641ac7
GA
16982021-03-03 Jakub Jelinek <jakub@redhat.com>
1699
1700 PR c/99324
1701 * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
1702 instead of mark_addressable. Fix a comment typo -
1703 neutrallly -> neutrally.
1704
2c83c3fb
GA
17052021-02-28 Jakub Jelinek <jakub@redhat.com>
1706
1707 PR c/99304
1708 * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
1709 message - refernced -> referenced. Remove superfluous space before
1710 closing paren of function calls.
1711
daa68844
GA
17122021-02-25 Nathan Sidwell <nathan@acm.org>
1713
1714 PR c++/99166
1715 * c.opt (-flang-info-module-cmi): Renamed option.
1716
50352c6c
GA
17172021-02-19 Nathan Sidwell <nathan@acm.org>
1718
1719 * c.opt (flang-info-module-read, flang-info-module-read=): New.
1720
bf81237e
GA
17212021-02-18 H.J. Lu <hjl.tools@gmail.com>
1722
1723 PR target/99113
1724 * c-attribs.c (c_common_attribute_table): Add the "retain"
1725 attribute.
1726 (handle_retain_attribute): New function.
1727
0e804ce3
GA
17282021-02-16 Marek Polacek <polacek@redhat.com>
1729
1730 PR c++/99062
1731 * c-attribs.c (handle_assume_aligned_attribute): Check that the
1732 alignment argument is non-negative. Tweak a warning message.
1733
fab095da
GA
17342021-02-12 Martin Sebor <msebor@redhat.com>
1735
1736 PR c/99055
1737 * c-warn.c (warn_parm_array_mismatch): Free strings returned from
1738 print_generic_expr_to_str.
1739
4b37c3ea
GA
17402021-02-10 Richard Biener <rguenther@suse.de>
1741
1742 * c-common.c (parse_optimize_options): Free decoded_options.
1743
a19dd5e6
GA
17442021-02-04 emsr <3dw4rd@verizon.net>
1745
1746 * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
1747
9faaa807
GA
17482021-02-03 Ed Smith-Rowland <3dw4rd@verizon.net>
1749
1750 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
1751 * c-lex.c (interpret_integer): Set node type for size literal.
1752
85d04a2e
GA
17532021-01-28 Jakub Jelinek <jakub@redhat.com>
1754
1755 * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
1756 draft from description.
1757 (-std=c++2b): Fix a pasto, 2020 -> 2023.
1758
e62bb7f0
GA
17592021-01-26 Paul Fee <paul.f.fee@gmail.com>
1760
1761 * c-common.h (cxx_dialect): Add cxx23 as a dialect.
1762 * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
1763 and -std=gnu++2b
1764 * c-opts.c (set_std_cxx23): New.
1765 (c_common_handle_option): Set options when -std=c++23 is enabled.
1766 (c_common_post_options): Adjust comments.
1767 (set_std_cxx20): Likewise.
1768
161e4c08
GA
17692021-01-25 Martin Sebor <msebor@redhat.com>
1770
1771 PR c++/98646
1772 * c-common.c (check_nonnull_arg): Adjust warning text.
1773
4c9bcd5c
GA
17742021-01-17 Martin Sebor <msebor@redhat.com>
1775
1776 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
1777 assume SSA_NAME_IDENTIFIER evaluates to nonzero.
1778
59cf67d1
GA
17792021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
1780
1781 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
1782 Redefine PRAGMA_OACC_CLAUSE_DETACH.
1783
2f7f0d32
GA
17842021-01-15 Jakub Jelinek <jakub@redhat.com>
1785
1786 PR tree-optimization/98597
1787 * c-pretty-print.c: Include options.h.
1788 (c_fold_indirect_ref_for_warn): New function.
1789 (print_mem_ref): Use it. If it returns something that has compatible
1790 type and is TBAA compatible with zero offset, print it and return,
1791 otherwise print it using offsetof syntax or array ref syntax. Fix up
1792 printing if MEM_REFs first operand is ADDR_EXPR, or when the first
1793 argument has pointer to array type. Print pointers using the standard
1794 formatting.
1795
6851dda2
GA
17962021-01-12 Martin Sebor <msebor@redhat.com>
1797
1798 PR c/98597
1799 PR c/98592
1800 * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
1801 has pointer type. Remove redundant code. Avoid calling
1802 gimple_canonical_types_compatible_p.
1803
7d187e4f
GA
18042021-01-07 Martin Sebor <msebor@redhat.com>
1805
1806 PR middle-end/98578
1807 * c-pretty-print.c (print_mem_ref): Strip array from access type.
1808 Avoid assuming acces type's size is constant. Correct condition
1809 guarding the printing of a parenthesis.
1810
942ae5be
GA
18112021-01-06 Martin Sebor <msebor@redhat.com>
1812
1813 PR c++/95768
1814 * c-pretty-print.c (c_pretty_printer::primary_expression): For
1815 SSA_NAMEs print VLA names and GIMPLE defining statements.
1816 (print_mem_ref): New function.
1817 (c_pretty_printer::unary_expression): Call it.
1818
18192021-01-06 Richard Biener <rguenther@suse.de>
1820
1821 PR tree-optimization/95582
1822 * c-attribs.c (c_common_attribute_table): Add entry for
1823 signed_bool_precision.
1824 (handle_signed_bool_precision_attribute): New.
1825
8daa719b
GA
18262020-12-24 Iain Sandoe <iain@sandoe.co.uk>
1827
1828 * c.opt: Add -stdlib= option and enumerations for
1829 libstdc++ and libc++.
1830
eefe499f
GA
18312020-12-16 Martin Liska <mliska@suse.cz>
1832
1833 * c.opt: Remove usage of Report.
1834
d52945ce
GA
18352020-12-14 Martin Sebor <msebor@redhat.com>
1836
1837 PR middle-end/98166
1838 PR c++/57111
1839 PR middle-end/98160
1840 * c-attribs.c (maybe_add_noinline): New function.
1841 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
1842 Implicitly add attribute noinline to functions not declared inline
1843 and warn on those.
1844
ca2bd949
GA
18452020-12-09 Tobias Burnus <tobias@codesourcery.com>
1846
1847 * c-pragma.c (omp_pragmas): Add 'allocate'.
1848 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
1849
f6e8e279
GA
18502020-12-08 Jakub Jelinek <jakub@redhat.com>
1851
1852 PR c++/98187
1853 * c-pragma.c (omp_pragmas): Remove "master".
1854 (omp_pragmas_simd): Add "master".
1855
bc8a7013
GA
18562020-12-07 Marek Polacek <polacek@redhat.com>
1857
1858 PR c++/98126
1859 * c-common.c (verify_tree_lim_r): New function.
1860 (verify_sequence_points): Use it. Use nullptr instead of 0.
1861
b8dd0ef7
GA
18622020-12-03 Martin Sebor <msebor@redhat.com>
1863
1864 PR c++/90629
1865 PR middle-end/94527
1866 * c-attribs.c (handle_dealloc_attribute): New function.
1867 (handle_malloc_attribute): Handle argument forms of attribute.
1868 * c.opt (-Wmismatched-dealloc): New option.
1869 (-Wmismatched-new-delete): New option.
1870
18712020-12-03 Jakub Jelinek <jakub@redhat.com>
1872
1873 PR libstdc++/93121
1874 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
1875 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
1876
e0f5e792
GA
18772020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
1878
1879 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
1880 {__GNUC_EXECUTION_CHARSET_NAME} and
1881 _WIDE_EXECUTION_CHARSET_NAME} macros.
1882
18832020-12-01 Nathan Sidwell <nathan@acm.org>
1884
1885 * c-common.c (module, import, export): New internal tokens (with
1886 trailing space).
1887 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
1888 them.
1889 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
1890 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
1891
18922020-12-01 Nathan Sidwell <nathan@acm.org>
1893
1894 * c-opts.c (c_common_init_options): Ask for module dependencies.
1895 (c_common_handle_option): Handle -Mmodules -Mno-modules.
1896 * c-pch.c (c_common_valid_pch): ... does not play with C++
1897 modules.
1898 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
1899 options.
1900 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
1901 (fmodule-only, fmodule-mapper, fmodule-lazy)
1902 (fmodule-version-ignore, Winvalid-imported-macros)
1903 (flang-info-include-translate, flang-info-include-translate-not):
1904 New options
1905
5fbf0ecb
GA
19062020-11-28 Eric Botcazou <ebotcazou@adacore.com>
1907
1908 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
1909 (dump_ada_structure): Also deal with convention, unchecked union and
1910 bit-field for nested types. In the latter case, print an Alignment
1911 aspect along with the Pack aspect.
1912
360258da
GA
19132020-11-25 Martin Sebor <msebor@redhat.com>
1914
1915 PR bootstrap/94982
1916 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
1917 -Wformat-diag.
1918
1e2c9a27
GA
19192020-11-24 Martin Sebor <msebor@redhat.com>
1920
1921 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
1922
8e6198d0
GA
19232020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1924
1925 * c-attribs.c (handle_special_var_sec_attribute): New.
1926 (handle_noinit_attribute): Remove.
1927 (attr_noinit_exclusions): Rename to...
1928 (attr_section_exclusions): ...this, and add "persistent" attribute
1929 exclusion.
1930 (c_common_attribute_table): Add "persistent" attribute.
1931
7a97e2fc
GA
19322020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
1933
1934 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
1935 Treat opaque types like other types.
1936 (c_pretty_printer::direct_abstract_declarator): Opaque types are
1937 supported types.
1938
82e5048e
GA
19392020-11-20 Martin Sebor <msebor@redhat.com>
1940
1941 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
1942 with fewer arguments.
1943
19442020-11-20 Martin Sebor <msebor@redhat.com>
1945
1946 PR middle-end/97879
1947 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
1948 Error out on invalid modes.
1949
19502020-11-20 Jakub Jelinek <jakub@redhat.com>
1951
1952 PR libstdc++/88101
1953 * c-common.c (check_builtin_function_arguments): Handle
1954 BUILT_IN_CLEAR_PADDING.
1955
25bb75f8
GA
19562020-11-18 Nathan Sidwell <nathan@acm.org>
1957
1958 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
1959
4dabb037
GA
19602020-11-17 Nathan Sidwell <nathan@acm.org>
1961
1962 * c-common.h (enum c_tree_index): Reorder to place lazy fields
1963 after newly-added CTI_MODULE_HWM.
1964
19652020-11-17 Joseph Myers <joseph@codesourcery.com>
1966
1967 * c-cppbuiltin.c (builtin_define_float_constants): Define
1968 "*_IS_IEC_60559__" macros.
1969
19702020-11-17 Nathan Sidwell <nathan@acm.org>
1971
1972 * c-lex.c: #include "langhooks.h".
1973 (cb_undef): Maybe call preprocess_undef lang hook.
1974 * c-opts.c (c_common_post_options): Maybe call preprocess_options
1975 lang hook.
1976 (push_command_line_include): Maybe call preprocess_main_file lang
1977 hook.
1978 (cb_file_change): Likewise.
1979 * c-ppoutput.c: #include "langhooks.h.
1980 (scan_translation_unit): Maybe call preprocess_token lang hook.
1981 (class do_streamer): New, derive from token_streamer.
1982 (directives_only_cb): Data pointer is do_streamer, call
1983 preprocess_token lang hook.
1984 (scan_translation_unit_directives_only): Use do_streamer.
1985 (print_line_1): Move src_line recording to after string output.
1986 (cb_undef): Maybe call preprocess_undef lang hook.
1987
19882020-11-17 Nathan Sidwell <nathan@acm.org>
1989
1990 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
1991 code duplicating that functionality.
1992
19932020-11-17 Jakub Jelinek <jakub@redhat.com>
1994
1995 PR c/90628
1996 * c-common.c (check_builtin_function_arguments)
1997 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
1998 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
1999 for more builtins and argument positions.
2000
29c5d9ce
GA
20012020-11-16 Iain Sandoe <iain@sandoe.co.uk>
2002
2003 PR objc/97854
2004 * stub-objc.c: Include c-common.h to declare enum rid.
2005
77f67db2
GA
20062020-11-13 Jakub Jelinek <jakub@redhat.com>
2007
2008 PR c++/63287
2009 * c-cppbuiltin.c: Include configargs.h.
2010 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
2011 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
2012 "single".
2013
20142020-11-13 Gergö Barany <gergo@codesourcery.com>
2015 Thomas Schwinge <thomas@codesourcery.com>
2016
2017 * c.opt (fopenacc-kernels): Add.
2018
20192020-11-13 Jason Merrill <jason@redhat.com>
2020
2021 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
2022
20232020-11-13 Piotr H. Dabrowski <phd@phd.re>
2024
2025 PR c++/91318
2026 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
2027
20282020-11-13 Martin Liska <mliska@suse.cz>
2029
2030 * c-attribs.c (build_attr_access_from_parms): Format properly.
2031
20322020-11-13 Iain Sandoe <iain@sandoe.co.uk>
2033
2034 PR objc/90707
2035 * c-common.c (c_common_reswords): null_unspecified, nullable,
2036 nonnull, null_resettable: New keywords.
2037 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
2038 RID_NONNULL, RID_NULL_RESETTABLE: New.
2039 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
2040 ranges accepted for property attributes.
2041 * c-attribs.c (handle_objc_nullability_attribute): New.
2042 * c-objc.h (enum objc_property_attribute_group): Add
2043 OBJC_PROPATTR_GROUP_NULLABLE.
2044 (enum objc_property_attribute_kind):Add
2045 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
2046 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
2047
20482020-11-13 Iain Sandoe <iain@sandoe.co.uk>
2049
2050 PR objc/77404
2051 * c-attribs.c (handle_objc_root_class_attribute): New
2052 * c-objc.h (objc_start_class_interface): Add a location
2053 value for the position of the class name.
2054 * c.opt: Add Wobjc-root-class.
2055 * stub-objc.c (objc_start_class_interface): Add a location
2056 value for the position of the class name.
2057
a5a11525
GA
20582020-11-12 Joseph Myers <joseph@codesourcery.com>
2059
2060 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
2061 Allow scope for C. Handle standard attributes for C. Do not
2062 accept unscoped attributes if std_syntax and not handled as
2063 standard attributes.
2064 * c-common.h (c_common_has_attribute): Update prototype.
2065
20662020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
2067
2068 PR pch/86674
2069 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
2070 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
2071
0f5f9ed5
GA
20722020-11-11 Patrick Palka <ppalka@redhat.com>
2073
2074 PR c++/88115
2075 * c-opts.c (c_common_post_options): Update latest_abi_version.
2076
bb622641
GA
20772020-11-10 Jakub Jelinek <jakub@redhat.com>
2078
2079 PR c/97748
2080 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
2081 to false.
2082 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
2083 recursively and just return true instead of warning if it is true.
2084 Handle COMPLEX_EXPR.
2085
20862020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
2087
2088 * c-common.h (c_omp_adjust_map_clauses): New declaration.
2089 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
2090 (c_omp_adjust_map_clauses): New function.
2091
2bee28dd
GA
20922020-11-09 Marek Polacek <polacek@redhat.com>
2093
2094 DR 1914
2095 * c-common.c (attribute_fallthrough_p): Tweak the warning
2096 message.
2097
20982020-11-09 Patrick Palka <ppalka@redhat.com>
2099
2100 * c-pragma.c (handle_pragma_diagnostic): Split the
2101 unknown-option -Wpragmas diagnostic into a warning and a
2102 subsequent note containing a spelling suggestion. Avoid
2103 computing the suggestion if -Wpragmas warnings are being
2104 suppressed.
2105
21062020-11-09 Patrick Palka <ppalka@redhat.com>
2107
2108 PR testsuite/97117
2109 * c-indentation.c (get_visual_column): Remove location_t
2110 parameter. Move the column-tracking diagnostic code from here
2111 to ...
2112 (should_warn_for_misleading_indentation): ... here, before the
2113 early exit for when the loci are not all distinct. Don't pass a
2114 location_t argument to get_visual_column.
2115 (assert_get_visual_column_succeeds): Don't pass a location_t
2116 argument to get_visual_column.
2117 (assert_get_visual_column_fails): Likewise.
2118
fb95de7a
GA
21192020-11-08 Iain Sandoe <iain@sandoe.co.uk>
2120
2121 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
2122 of keywords accepted in @property attribute contexts.
2123 * c-objc.h (enum objc_property_attribute_group): Add
2124 OBJC_PROPATTR_GROUP_CLASS.
2125 (enum objc_property_attribute_kind): Add
2126 OBJC_PROPERTY_ATTR_CLASS.
2127
2da7ee05
GA
21282020-11-07 Iain Sandoe <iain@sandoe.co.uk>
2129
2130 * c-common.c (c_common_reswords): Add 'atomic' property
2131 attribute.
2132 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
2133 property attributes.
2134
21352020-11-07 Iain Sandoe <iain@sandoe.co.uk>
2136
2137 * c-attribs.c (handle_nsobject_attribute): New.
2138 * c.opt: Add WNSObject-attribute.
2139
44cab2d8
GA
21402020-11-06 Iain Sandoe <iain@sandoe.co.uk>
2141
2142 * c-objc.h (enum objc_property_attribute_group): New
2143 (enum objc_property_attribute_kind): New.
2144 (OBJC_PROPATTR_GROUP_MASK): New.
2145 (struct property_attribute_info): Small class encapsulating
2146 parser output from property attributes.
2147 (objc_prop_attr_kind_for_rid): New
2148 (objc_add_property_declaration): Simplify interface.
2149 * stub-objc.c (enum rid): Dummy type.
2150 (objc_add_property_declaration): Simplify interface.
2151 (objc_prop_attr_kind_for_rid): New.
2152
21532020-11-06 Nathan Sidwell <nathan@acm.org>
2154
2155 * c-ada-spec.c (collect_ada_nodes): Rename
2156 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2157 (collect_ada_node): Likewise.
2158 (dump_forward_type): Likewise.
2159 * c-common.c (set_underlying_type): Rename
2160 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2161 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
2162
21632020-11-06 Jakub Jelinek <jakub@redhat.com>
2164
2165 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
2166
0cfd9109
GA
21672020-11-05 Marek Polacek <polacek@redhat.com>
2168
2169 PR c++/97675
2170 * c.opt (Wexceptions): New option.
2171
21722020-11-05 Marek Polacek <polacek@redhat.com>
2173
2174 PR c++/25814
2175 * c.opt (Wvexing-parse): New option.
2176
35c125cb
GA
21772020-11-04 Jakub Jelinek <jakub@redhat.com>
2178
2179 PR c++/97670
2180 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
2181 underlying decl to clear in the allocate_head bitmap.
2182
21832020-11-04 Iain Sandoe <iain@sandoe.co.uk>
2184
2185 * c-objc.h (objc_non_constant_expr_p): New.
2186 * stub-objc.c (objc_non_constant_expr_p): New.
2187
fd2325ea
GA
21882020-11-03 Nathan Sidwell <nathan@acm.org>
2189
2190 * c.opt (MQ,MT): Reword description to be make-agnostic.
2191
88ce3d5f
GA
21922020-11-02 Nathan Sidwell <nathan@acm.org>
2193
2194 * c-opts.c (c_common_post_options): Move var decl to its
2195 initialization point.
2196
21972020-11-01 Iain Sandoe <iain@sandoe.co.uk>
2198
2199 * c-lex.c (c_lex_with_flags): When combining '@' with a
2200 keyword for Objective-C, combine the location ranges too.
2201
22022020-10-30 Qing Zhao <qing.zhao@oracle.com>
2203 H.J.Lu <hjl.tools@gmail.com>
2204
2205 * c-attribs.c (c_common_attribute_table): Add new attribute
2206 zero_call_used_regs.
2207 (handle_zero_call_used_regs_attribute): New function.
2208
e93aae4a
GA
22092020-10-28 Marek Polacek <polacek@redhat.com>
2210
2211 PR c++/97573
2212 * c-opts.c (c_common_post_options): In C++20, turn on
2213 -Wdeprecated-enum-enum-conversion and
2214 -Wdeprecated-enum-float-conversion.
2215 * c.opt (Wdeprecated-enum-enum-conversion,
2216 Wdeprecated-enum-float-conversion): New options.
2217 (Wenum-conversion): Allow for C++ too.
2218
22192020-10-28 Jakub Jelinek <jakub@redhat.com>
2220
2221 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
2222 * c-omp.c: Include bitmap.h.
2223 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
2224
f19e7c8d
GA
22252020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2226
2227 * c-common.c (__is_nothrow_assignable): New.
2228 (__is_nothrow_constructible): Likewise.
2229 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
2230 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
2231
efe71fcc
GA
22322020-10-23 Jan Hubicka <hubicka@ucw.cz>
2233
2234 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
2235
22362020-10-23 Marek Polacek <polacek@redhat.com>
2237
2238 PR c++/91741
2239 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
2240 (c_common_init_ts): Likewise.
2241 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
2242 * c-common.h (maybe_warn_sizeof_array_div): Declare.
2243 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
2244 (maybe_warn_sizeof_array_div): New function.
2245 * c.opt (Wsizeof-array-div): New option.
2246
22472020-10-23 Martin Sebor <msebor@redhat.com>
2248
2249 PR c/97463
2250 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
2251
56ddd5e2
GA
22522020-10-22 Martin Liska <mliska@suse.cz>
2253
2254 PR c/94722
2255 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
2256 (handle_stack_protect_attribute): Add error message for a
2257 no_stack_protector function.
2258
22592020-10-22 Martin Liska <mliska@suse.cz>
2260
2261 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
2262
22632020-10-22 Jan Hubicka <hubicka@ucw.cz>
2264
2265 * c-gimplify.c: Include tree-nested.h
2266 (c_genericize): Update for new nested function info.
2267
b2698c21
GA
22682020-10-14 Martin Sebor <msebor@redhat.com>
2269
2270 PR c/97413
2271 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
2272 bounds in an extra list.
2273
7e9282ae
GA
22742020-10-05 Richard Biener <rguenther@suse.de>
2275 Jakub Jelinek <jakub@redhat.com>
2276
2277 PR c++/97197
2278 * c-pretty-print.c: Include langhooks.h.
2279 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
2280 expression.
2281 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
2282 unary_expression.
2283 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
2284
660bfe61
GA
22852020-09-30 Martin Sebor <msebor@redhat.com>
2286
2287 PR middle-end/97189
2288 * c-attribs.c (append_access_attr): Use the function declaration
2289 location for a warning about an attribute access argument.
2290
93bca37c
GA
22912020-09-29 Marek Polacek <polacek@redhat.com>
2292
2293 PR c++/94695
2294 * c.opt (Wrange-loop-construct): New option.
2295
82b77dee
GA
22962020-09-23 Martin Sebor <msebor@redhat.com>
2297
2298 PR c/97131
2299 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
2300
23012020-09-23 Marek Polacek <polacek@redhat.com>
2302
2303 PR c/97125
2304 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
2305 after loops and other structured control constructs have been lowered.
2306
521d2711
GA
23072020-09-22 Jakub Jelinek <jakub@redhat.com>
2308
2309 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
2310 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
2311
44135373
GA
23122020-09-21 Marek Polacek <polacek@redhat.com>
2313
2314 * c.opt (Wctad-maybe-unsupported): New option.
2315
2fe5b7d1
GA
23162020-09-19 Martin Sebor <msebor@redhat.com>
2317
2318 PR c/50584
2319 * c-common.h (warn_parm_array_mismatch): Declare new function.
2320 (has_attribute): Move declaration of an existing function.
2321 (build_attr_access_from_parms): Declare new function.
2322 * c-warn.c (parm_array_as_string): Define new function.
2323 (plus_one): Define new function.
2324 (warn_parm_ptrarray_mismatch): Define new function.
2325 (warn_parm_array_mismatch): Define new function.
2326 (vla_bound_parm_decl): New function.
2327 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
2328 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
2329 qualifiers here...
2330 (c_pretty_printer::direct_abstract_declarator): ...but instead print
2331 them in brackets here. Also print [static]. Strip extraneous
2332 expressions from VLA bounds.
2333
23342020-09-19 Martin Sebor <msebor@redhat.com>
2335
2336 PR c/50584
2337 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
2338 (handle_argspec_attribute): New function.
2339 (get_argument, get_argument_type): New functions.
2340 (append_access_attrs): Add overload. Handle internal attribute
2341 representation in addition to external.
2342 (handle_access_attribute): Handle internal attribute representation
2343 in addition to external.
2344 (build_attr_access_from_parms): New function.
2345
23462020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2347
2348 * c-gimplify.c (genericize_c_loop): Rewrite to match
2349 c_finish_loop in c-typeck.c.
2350
23512020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2352
2353 * c-common.c (c_block_may_fallthrough): New, split from
2354 cxx_block_may_fallthrough in the cp front end.
2355 (c_common_init_ts): Move handling of loop and switch-related
2356 statements here from the cp front end.
2357 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
2358 cp front end.
2359 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
2360 * c-common.h (c_block_may_fallthru): Declare.
2361 (bc_state_t): Move here from cp front end.
2362 (save_bc_state, restore_bc_state): Declare.
2363 (c_genericize_control_stmt): Declare.
2364 (WHILE_COND, WHILE_BODY): Likewise.
2365 (DO_COND, DO_BODY): Likewise.
2366 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
2367 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
2368 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
2369 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
2370 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
2371 * c-dump.c (dump_stmt): Copy from cp front end.
2372 (c_dump_tree): Move code to handle structured loop and switch
2373 tree nodes here from cp front end.
2374 * c-gimplify.c: Adjust includes.
2375 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
2376 cp front end.
2377 (save_bc_state, restore_bc_state): New functions using old code
2378 from cp front end.
2379 (get_bc_label, expr_loc_or_loc): Move from cp front end.
2380 (genericize_c_loop): Move from cp front end.
2381 (genericize_for_stmt, genericize_while_stmt): Likewise.
2382 (genericize_do_stmt, genericize_switch_stmt): Likewise.
2383 (genericize_continue_stmt, genericize_break_stmt): Likewise.
2384 (genericize_omp_for_stmt): Likewise.
2385 (c_genericize_control_stmt): New function using code split from
2386 cp front end.
2387 (c_genericize_control_r): New.
2388 (c_genericize): Call walk_tree with c_genericize_control_r.
2389 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
2390 structured loop and switch tree nodes here from cp front end.
2391
2aad20c0
GA
23922020-09-17 Patrick Palka <ppalka@redhat.com>
2393
2394 PR c/80076
2395 * c-indentation.c (should_warn_for_misleading_indentation): Move
2396 declarations of local variables closer to their first use.
2397 Handle virtual token locations by resolving them to their
2398 respective macro expansion points. If all three tokens are
2399 produced from the same macro expansion, then instead use their
2400 loci within the macro definition.
2401
ecde1b0a
GA
24022020-09-16 Martin Sebor <msebor@redhat.com>
2403
2404 PR c/78666
2405 PR c/96126
2406 * c-attribs.c (validate_attr_args): New function.
2407 (validate_attr_arg): Same.
2408 (handle_section_attribute): Call it. Introduce a local variable.
2409 (handle_alloc_size_attribute): Same.
2410 (handle_alloc_align_attribute): Same.
2411
50a71cd0
GA
24122020-09-14 Jakub Jelinek <jakub@redhat.com>
2413
2414 * c-attribs.c (handle_optimize_attribute): Adjust
2415 cl_optimization_save, cl_optimization_restore and
2416 build_optimization_node callers.
2417 * c-pragma.c (handle_pragma_optimize): Adjust
2418 build_optimization_node caller.
2419 (handle_pragma_push_options): Adjust
2420 build_optimization_node and build_target_option_node callers.
2421 (handle_pragma_pop_options, handle_pragma_reset_options):
2422 Adjust cl_optimization_restore callers.
2423
8f7ea26a
GA
24242020-08-28 Martin Sebor <msebor@redhat.com>
2425
2426 * c.opt (Wstringop-overread): New option.
2427
a6493809
GA
24282020-08-11 Jakub Jelinek <jakub@redhat.com>
2429
2430 PR c/96545
2431 * c-common.c (get_atomic_generic_size): Require that first argument's
2432 type points to a complete type and use tree_fits_uhwi_p instead of
2433 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
2434
48cc2e46
GA
24352020-07-31 Martin Sebor <msebor@redhat.com>
2436
2437 PR c++/96003
2438 * c-common.c (check_function_arguments_recurse): Return early when
2439 no-warning bit is set.
2440
24412020-07-31 Richard Biener <rguenther@suse.de>
2442
2443 PR debug/96383
2444 * c-common.h (c_common_finalize_early_debug): Declare.
2445 * c-common.c: Include debug.h.
2446 (c_common_finalize_early_debug): finalize_early_debug langhook
2447 implementation generating debug for extern declarations.
2448
e71dab87
GA
24492020-07-27 Nathan Sidwell <nathan@acm.org>
2450
2451 * c-common.c (try_to_locate_new_include_insertion_point): Use
2452 strcmp, not pointer equality.
2453
ae2e0bc1
GA
24542020-07-25 Martin Sebor <msebor@redhat.com>
2455
2456 PR c++/96310
2457 * c-common.c (check_nonnull_arg): Print note only when warning was
2458 issued.
2459
3ea9abca
GA
24602020-07-22 Tobias Burnus <tobias@codesourcery.com>
2461
2462 * c-omp.c (c_finish_omp_critical): Check for no name but
2463 nonzero hint provided.
2464
0933f508
GA
24652020-07-20 Jason Merrill <jason@redhat.com>
2466
2467 * c-cppbuiltin.c (c_cpp_builtins): Update
2468 __cpp_nontype_template_args for C++20.
2469
24702020-07-20 Martin Sebor <msebor@redhat.com>
2471
2472 PR c/96249
2473 * c.opt: Remove stray text.
2474
8ca07a30
GA
24752020-07-14 Lewis Hyatt <lhyatt@gmail.com>
2476
2477 PR other/86904
2478 * c-indentation.c (should_warn_for_misleading_indentation): Get
2479 global tabstop from the new source.
2480 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
2481 is now a common option.
2482 * c.opt: Likewise.
2483
a82c4c4c 24842020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
2485
2486 * c.opt (Wscalar-storage-order): Add explicit variable.
2487
f60ee68d
GA
24882020-07-07 Nathan Sidwell <nathan@acm.org>
2489
2490 * c-opts.c (c_common_post_options): Add 'injecting' arg to
2491 cpp_read_main_file.
2492 (c_finish_options): Add linemap_line_start calls for builtin and cmd
2493 maps. Force token position to line_table's highest line.
2494 * c-ppoutput.c (print_line_1): Refactor, print line zero.
2495 (cb_define): Always increment source line.
2496
4077d74c
GA
24972020-07-06 Martin Sebor <msebor@redhat.com>
2498
2499 PR c++/95984
2500 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
2501 to stub lambda objects with null this pointer.
2502 (check_nonnull_arg): Handle C++ nullptr.
2503
b5f24739
GA
25042020-07-02 Jason Merrill <jason@redhat.com>
2505 Jakub Jelinek <jakub@redhat.com>
2506
2507 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
2508
46fbb6c6
GA
25092020-06-30 Jakub Jelinek <jakub@redhat.com>
2510
2511 PR c++/95963
2512 * c-common.c (check_function_arguments_recurse): Don't crash on
2513 calls to internal functions.
2514
69273534
GA
25152020-06-28 Martin Sebor <msebor@redhat.com>
2516
2517 PR c++/86568
2518 * c-common.c (struct nonnull_arg_ctx): Add members.
2519 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
2520 C++ member functions specially. Consider the this pointer implicitly
2521 nonnull.
2522 (check_nonnull_arg): Use location of argument when available.
2523 (check_function_arguments): Use nonnull_arg_ctx as argument.
2524
9a33c41f
GA
25252020-06-27 Jakub Jelinek <jakub@redhat.com>
2526
2527 PR middle-end/95903
2528 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
2529 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
2530 smaller precision intop operands separately.
2531
c9c05f73
GA
25322020-06-26 Marek Polacek <polacek@redhat.com>
2533
2534 * c-opts.c (c_common_init_options): Default to gnu++17.
2535
aff95ee7
GA
25362020-06-17 Jonathan Wakely <jwakely@redhat.com>
2537
bd0a89dc 2538 PR c/95378
aff95ee7
GA
2539 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
2540 pointer arguments.
2541
56638b9b
GA
25422020-06-16 Jakub Jelinek <jakub@redhat.com>
2543
2544 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
2545 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
2546 idx members.
2547 (c_omp_is_loop_iterator): New function.
2548 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
2549 if outer loop iterator is present. Perform duplicate checking through
2550 hash_set in the function rather than expecting caller to do that.
2551 Pass NULL instead of d->ppset to walk_tree_1.
2552 (c_omp_check_nonrect_loop_iv): New function.
2553 (c_omp_check_loop_iv): Use it. Fill in new members, allow
2554 non-rectangular loop forms, diagnose multiple associated loops with
2555 the same iterator. Pass NULL instead of &pset to walk_tree_1.
2556 (c_omp_check_loop_iv_exprs): Likewise.
2557
ec6ffbb9
GA
25582020-06-10 Martin Liska <mliska@suse.cz>
2559
2560 PR tree-optimization/92860
2561 * c-attribs.c (handle_optimize_attribute):
2562 Save global options and compare it after parsing of function
2563 attribute.
2564 * c-pragma.c (opt_stack::saved_global_options): New field.
2565 (handle_pragma_push_options): Save global_options.
2566 (handle_pragma_pop_options): Compare them after pop.
2567
b952c2cf
GA
25682020-06-09 Jakub Jelinek <jakub@redhat.com>
2569
2570 PR c/95580
2571 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
2572 case when MEM_REF's first argument has type pointer to incomplete type.
2573
1a59f3db
GA
25742020-06-05 Jason Merrill <jason@redhat.com>
2575
2576 * c-pretty-print.c (pp_c_additive_expression): Handle negative
2577 operand to POINTER_PLUS_EXPR.
2578
3add3425
GA
25792020-06-04 Martin Sebor <msebor@redhat.com>
2580
2581 PR middle-end/10138
2582 PR middle-end/95136
2583 * c-attribs.c (append_access_attrs): Handle attr_access::none.
2584 (handle_access_attribute): Same.
2585
9a5b7438
GA
25862020-06-03 Mark Wielaard <mark@klomp.org>
2587
2588 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
2589 New function.
2590 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
2591 New function declaration.
2592
25932020-06-03 Mark Wielaard <mark@klomp.org>
2594
2595 * known-headers.cc (get_string_macro_hint): New function.
2596 (get_stdlib_header_for_name): Use get_string_macro_hint.
2597 (get_c_stdlib_header_for_string_macro_name): New function.
2598 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
2599 New function declaration.
2600
26012020-06-03 Tobias Burnus <tobias@codesourcery.com>
2602
2603 * c-common.h (c_omp_predetermined_mapping): Declare.
2604 * c-omp.c (c_omp_predetermined_mapping): New.
2605
af114c38
MW
26062020-05-22 Mark Wielaard <mark@klomp.org>
2607
2608 * known-headers.cc (get_stdlib_header_for_name): Add a new
2609 stdlib_hint array for stdbool and stdint.
2610
45c50b6a
MW
26112020-05-22 Mark Wielaard <mark@klomp.org>
2612
2613 * known-headers.cc (get_stdlib_header_for_name): Return
2614 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
2615 flag_isoc99.
2616
c22027a0
NS
26172020-05-20 Nathan Sidwell <nathan@acm.org>
2618
38a4db21
NS
2619 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
2620
c22027a0
NS
2621 * c-common.c (try_to_locate_new_include_insertion_point): Use
2622 strcmp to compare filenames.
2623 * c-lex.c (init_c_lex): Move declaration to initialization.
2624 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
2625 deferred count loop.
2626
29f0e90d
JM
26272020-05-15 Jason Merrill <jason@redhat.com>
2628
2629 * c-opts.c (set_std_cxx20): Set flag_coroutines.
2630
b04445d4
JM
26312020-05-13 Jason Merrill <jason@redhat.com>
2632
2633 * c.opt (std=c++20): Make c++2a the alias.
2634 (std=gnu++20): Likewise.
2635 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
2636 * c-opts.c: Adjust.
2637 * c-cppbuiltin.c: Adjust.
2638 * c-ubsan.c: Adjust.
2639 * c-warn.c: Adjust.
2640
11dd3be5
EB
26412020-05-12 Eric Botcazou <ebotcazou@adacore.com>
2642
2643 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
2644
b224c376
NS
26452020-05-08 Nathan Sidwell <nathan@acm.org>
2646
2647 Reimplement directives only processing.
2648 * c-ppoutput.c (token_streamer): Ne.
2649 (directives_only_cb): New. Swallow ...
2650 (print_lines_directives_only): ... this.
2651 (scan_translation_unit_directives_only): Reimplment using the
2652 published interface.
2653
f1d94677
MP
26542020-05-07 Marek Polacek <polacek@redhat.com>
2655
2656 * c-format.c (badwords): Add "nonstatic".
2657
9b95bb52
JJ
2658202-05-07 Jakub Jelinek <jakub@redhat.com>
2659
2660 PR c/94968
2661 * c-common.c (speculation_safe_value_resolve_params): Return false if
2662 error_operand_p (val2).
2663 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
2664 Remove extraneous semicolon.
2665
530b4409 26662020-05-06 qing zhao <qing.zhao@oracle.com>
2667
2668 PR c/94230
2669 * c-indentation.c (get_visual_column): Add a hint to use the new
2670 -flarge-source-files option.
2671
b776bdca
SSF
26722020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
2673
2674 * c-attribs.c (handle_vector_size_attribute): Add attribute
2675 nonnull for argument args in order to silence warning of
2676 uninitialized variable usage. Since this is local to the
2677 compilation unit and thus cannot be checked at call sides by the
2678 compiler, added an assert statement in order to verify this.
2679
6607bdd9
L
26802020-05-01 H.J. Lu <hongjiu.lu@intel.com>
2681
2682 PR target/93492
2683 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
2684 value to USHRT_MAX (65535).
2685
691eeb65
JJ
26862020-04-29 Jakub Jelinek <jakub@redhat.com>
2687
2688 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
2689
26d76be7
JJ
26902020-04-27 Jakub Jelinek <jakub@redhat.com>
2691
2692 PR c/94755
2693 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
2694 fncode == BUILT_IN_NONE before initialization of first_param.
2695
7291b2ed
MP
26962020-04-23 Marek Polacek <polacek@redhat.com>
2697
2698 PR c++/94733
2699 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
2700 TREE_PURPOSE.
2701
58a29af8
PP
27022020-04-14 Patrick Palka <ppalka@redhat.com>
2703
2704 PR c++/85278
2705 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
2706 ampersand if it's an rvalue reference type.
2707
09f04139
MS
27082020-04-13 Martin Sebor <msebor@redhat.com>
2709
2710 PR c/92326
2711 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
2712 printing array bound for flexible array members.
2713
ee26baf4
IS
27142020-04-13 Iain Sandoe <iain@sandoe.co.uk>
2715
2716 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
2717 define, per n4861.
2718
75efe9cb
RB
27192020-04-02 Richard Biener <rguenther@suse.de>
2720
2721 PR c/94392
2722 * c-opts.c (c_common_post_options): Enable -ffinite-loops
2723 for -O2 and C++11 or newer.
2724
75defde9
PP
27252020-03-28 Patrick Palka <ppalka@redhat.com>
2726
2727 * c.opt: Add -fconcepts-diagnostics-depth.
2728
52f24a9e
MS
27292020-03-27 Martin Sebor <msebor@redhat.com>
2730
2731 PR c++/94346
2732 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
2733 to decl_attributes. Make handling of different kinds of entities
2734 more robust.
2735
ccacf77b
MS
27362020-03-27 Martin Sebor <msebor@redhat.com>
2737
2738 PR c++/94098
2739 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
2740 here.
2741
ca6c7225
JJ
27422020-03-23 Jakub Jelinek <jakub@redhat.com>
2743
2744 PR c++/91993
2745 * c-warn.c (warnings_for_convert_and_check): For expr and/or
2746 result being COMPOUND_EXPRs, skip to ultimate rhs.
2747
1aa22b19
RS
27482020-03-20 Richard Sandiford <richard.sandiford@arm.com>
2749
2750 PR middle-end/94072
2751 * c-common.c (c_common_type_for_mode): Before using a registered
2752 built-in type, check that the vectorness of the type matches
2753 the vectorness of the mode.
2754
700d4cb0
JJ
27552020-03-17 Jakub Jelinek <jakub@redhat.com>
2756
2757 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
2758 issue in a diagnostic message.
2759
b408e010
LH
27602020-03-15 Lewis Hyatt <lhyatt@gmail.com>
2761
2762 * c.opt: Avoid redundancy in the help text.
2763
e78e50d5
MP
27642020-03-02 Marek Polacek <polacek@redhat.com>
2765
2766 PR c++/93958 - add missing -std=gnu++20.
2767 * c.opt: Add -std=gnu++20.
2768
649e1741
MS
27692020-03-01 Martin Sebor <msebor@redhat.com>
2770
2771 PR c++/92721
2772 * c-attribs.c (append_access_attrs): Correctly handle attribute.
2773 (handle_access_attribute): Same.
2774
7b60f3ba
JJ
27752020-02-25 Jakub Jelinek <jakub@redhat.com>
2776
2777 PR c/93858
2778 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
2779 "did you mean" hint in diagnostics.
2780
fb260504
JM
27812020-02-15 Jason Merrill <jason@redhat.com>
2782
2783 * c.opt: Add -std=c++20.
2784
1d757b09
EB
27852020-02-14 Eric Botcazou <ebotcazou@adacore.com>
2786
2787 * c-ada-spec.c: Include bitmap.h.
2788 (dump_ada_double_name): Rename into...
2789 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
2790 (dump_ada_array_type): Adjust to above renaming. Robustify.
2791 (dump_nested_types_1): New function copied from... Add dumped_types
2792 parameter and pass it down to dump_nested_type.
2793 (dump_nested_types): ...this. Remove parent parameter. Just call
2794 dump_nested_types_1 on an automatic bitmap.
2795 (dump_nested_type): Add dumped_types parameter.
2796 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
2797 Adjust recursive calls and adjust to above renaming.
2798 (dump_ada_declaration): Adjust call to dump_nested_types.
2799 Tidy up and adjust to above renaming.
2800 (dump_ada_specs): Initialize and release bitmap obstack.
2801
0cc575e4
MS
28022020-02-10 Martin Sebor <msebor@redhat.com>
2803
2804 PR c/93640
2805 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
2806
a59aa302
JJ
28072020-02-10 Jakub Jelinek <jakub@redhat.com>
2808
2809 PR other/93641
2810 * c-format.c (check_plain): Fix up last argument of strncasecmp.
2811 Remove useless extra test.
2812
e464fc90
TB
28132020-02-03 Julian Brown <julian@codesourcery.com>
2814 Tobias Burnus <tobias@codesourcery.com>
2815
2816 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
2817
e3b6c052
JM
28182020-01-29 Jason Merrill <jason@redhat.com>
2819
2820 PR c++/89357
2821 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
2822
6d00f052
JM
28232020-01-23 Jason Merrill <jason@redhat.com>
2824
2825 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
2826
8a990ffa
MS
28272020-01-23 Martin Sebor <msebor@redhat.com>
2828
2829 PR c/84919
2830 * c-common.c (check_function_arguments): Avoid overlap checking
2831 of sprintf functions.
2832
55b7df8b
JM
28332020-01-22 Jason Merrill <jason@redhat.com>
2834
2835 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
2836 PR c++/40752
2837 * c-warn.c (conversion_warning): Check operands only after checking
2838 the whole expression. Don't check second operand of + for sign.
2839
c77074d0
JM
28402020-01-21 Jason Merrill <jason@redhat.com>
2841 Manuel López-Ibáñez <manu@gcc.gnu.org>
2842
2843 PR c++/40752 - useless -Wconversion with short +=.
2844 * c.opt (-Warith-conversion): New.
2845 * c-warn.c (conversion_warning): Recurse for operands of
2846 operators. Only warn about the whole expression with
2847 -Warith-conversion.
2848
731dbfc3
JM
28492020-01-21 Jason Merrill <jason@redhat.com>
2850
2851 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
2852 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
2853
ad1a3914
NS
28542020-01-20 Nathan Sidwell <nathan@acm.org>
2855
2856 PR preprocessor/80005
2857 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
2858
49789fd0
IS
28592020-01-18 Iain Sandoe <iain@sandoe.co.uk>
2860
2861 * c-common.c (co_await, co_yield, co_return): New.
2862 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
2863 RID_CO_RETURN): New enumeration values.
2864 (D_CXX_COROUTINES): Bit to identify coroutines are active.
2865 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
2866 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
2867 * c.opt (fcoroutines): New command-line switch.
2868
4bc1899b
DM
28692020-01-10 David Malcolm <dmalcolm@redhat.com>
2870
2871 * c-format.c (local_event_ptr_node): New.
2872 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
2873 (init_dynamic_diag_info): Initialize local_event_ptr_node.
2874 * c-format.h (T_EVENT_PTR): New define.
2875
f25e33fa
MS
28762020-01-10 Martin Sebor <msebor@redhat.com>
2877
2878 PR c/93132
2879 * c-attribs.c (append_access_attrs): Validate against the translated
2880 access string rather than the human-readable representation.
2881
8d9254fc
JJ
28822020-01-01 Jakub Jelinek <jakub@redhat.com>
2883
2884 Update copyright years.
2885
39292e25
EB
28862019-12-20 Eric Botcazou <ebotcazou@adacore.com>
2887
2888 * c-ada-spec.h (decl_sloc): Delete.
2889 * c-ada-spec.c (decl_sloc): Make static.
2890
519d7496
JB
28912019-12-19 Julian Brown <julian@codesourcery.com>
2892
2893 * c-common.h (c_omp_map_clause_name): Add prototype.
2894 * c-omp.c (c_omp_map_clause_name): New function.
2895 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
2896 PRAGMA_OACC_CLAUSE_DETACH.
2897
a6163563
JB
28982019-12-19 Julian Brown <julian@codesourcery.com>
2899 Maciej W. Rozycki <macro@codesourcery.com>
2900 Tobias Burnus <tobias@codesourcery.com>
2901 Thomas Schwinge <thomas@codesourcery.com>
2902
2903 * c-pragma.h (pragma_omp_clause): Add
2904 PRAGMA_OACC_CLAUSE_NO_CREATE.
2905
e8f1ade2
MS
29062019-12-17 Martin Sebor <msebor@redhat.com>
2907
2908 PR c++/61339
2909 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
2910
368877a1
DM
29112019-12-11 David Malcolm <dmalcolm@redhat.com>
2912
2913 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
2914 implementation.
2915 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
2916
d68f5d45
DM
29172019-12-09 David Malcolm <dmalcolm@redhat.com>
2918
2919 * c-format.c (range_label_for_format_type_mismatch::get_text):
2920 Replace label_text ctor called with true with label_text::take.
2921
d3e28653
DM
29222019-12-09 David Malcolm <dmalcolm@redhat.com>
2923
2924 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
2925 initial newline from expected outputs.
2926 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
2927 call to diagnostic_show_locus.
2928
abd6d8cc
JJ
29292019-12-06 Jakub Jelinek <jakub@redhat.com>
2930
2931 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
2932 now.
2933
7906797e
MP
29342019-12-05 Marek Polacek <polacek@redhat.com>
2935 Jakub Jelinek <jakub@redhat.com>
2936
2937 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
2938 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
2939
5c04da88
MP
29402019-12-05 Marek Polacek <polacek@redhat.com>
2941
2942 PR c++/92271 - make __is_same alias for __is_same_as.
2943 * c-common.c: Add __is_same, an alias for __is_same_as.
2944
43aae289
MP
29452019-12-03 Marek Polacek <polacek@redhat.com>
2946
2947 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
2948 * c-cppbuiltin.c (c_cpp_builtins): Predefine
2949 __cpp_aggregate_paren_init=201902 for -std=c++2a.
2950
d7ddfbcb
JH
29512019-11-30 Jan Hubicka <hubicka@ucw.cz>
2952
2953 * c-attribs.c (handle_symver_attribute): New function
2954 (c_common_attributes): Add symver.
2955
65ef05d0
RS
29562019-11-30 Richard Sandiford <richard.sandiford@arm.com>
2957
2958 * c-common.c (pointer_int_sum): Use verify_type_context to check
2959 whether the target allows pointer arithmetic for the types involved.
2960 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
2961 to check whether the target allows sizeof and alignof operations
2962 for the types involved.
2963
1a291106
JM
29642019-11-27 Jason Merrill <jason@redhat.com>
2965
2966 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
2967
05d6cb1a
JJ
29682019-11-26 Jakub Jelinek <jakub@redhat.com>
2969
2970 PR c++/61414
2971 * c-attribs.c (handle_mode_attribute): Add mode attribute to
2972 ENUMERAL_TYPEs.
2973
5b8d9367
JM
29742019-11-25 Joseph Myers <joseph@codesourcery.com>
2975
2976 PR c/91985
2977 * c-common.c (c_common_type_for_mode): Handle decimal
2978 floating-point types being NULL_TREE.
2979 * c-format.c (get_format_for_type_1): Handle specified types being
2980 NULL_TREE.
2981 * c-lex.c (interpret_float): Give an error for decimal
2982 floating-point constants when decimal floating-point not
2983 supported.
2984
1fbf51cb
JJ
29852019-11-23 Jakub Jelinek <jakub@redhat.com>
2986
2987 PR middle-end/83859
2988 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
2989 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
2990 group warning with inform together.
2991 (handle_access_attribute): Formatting fix.
2992
761df906
JJ
29932019-11-22 Jakub Jelinek <jakub@redhat.com>
2994
bdaf8be1
JJ
2995 PR c/90677
2996 * c-common.h (identifier_global_tag): Declare.
2997 * c-format.c (get_pointer_to_named_type): Renamed to ...
2998 (get_named_type): ... this. Use identifier_global_tag instead of
2999 identifier_global_value, handle the return value being a TYPE_P.
3000 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
3001 to call get_named_type instead. Formatting fixes.
3002
c2ecce6d 3003 Implement P1902R1, Missing feature-test macros 2017-2019.
761df906
JJ
3004 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
3005 and __cpp_generic_lambdas for -std=c++2a. Define
3006 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
3007 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
3008 __cpp_concepts for -std=c++2a.
3009
54aa6b58
MS
30102019-11-22 Martin Sebor <msebor@redhat.com>
3011
3012 PR middle-end/83859
3013 * c-attribs.c (handle_access_attribute): New function.
3014 (c_common_attribute_table): Add new attribute.
3015 (get_argument_type): New function.
3016 (append_access_attrs): New function.
3017 (get_nonnull_operand): Rename...
3018 (get_attribute_operand): ...to this.
3019 * c-common.c (get_nonnull_operand): Rename...
3020 (get_attribute_operand): ...to this.
3021
6c80b1b5
JM
30222019-11-21 Joseph Myers <joseph@codesourcery.com>
3023
3024 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
3025 of warning.
3026
192961ff
JM
30272019-11-19 Joseph Myers <joseph@codesourcery.com>
3028
3029 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
3030 warning for standard attributes mixed with fallthrough attributes.
3031
f8aea5e3
JM
30322019-11-15 Joseph Myers <joseph@codesourcery.com>
3033
3034 * c-attribs.c (handle_fallthrough_attribute): Remove static.
3035 * c-common.h (handle_fallthrough_attribute): Declare.
3036
2cc94aa8
JM
30372019-11-15 Joseph Myers <joseph@codesourcery.com>
3038
3039 * c-attribs.c (handle_deprecated_attribute): Remove static.
3040 * c-common.h (handle_deprecated_attribute): Declare.
3041
7c5890cc
JM
30422019-11-14 Joseph Myers <joseph@codesourcery.com>
3043
3044 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
3045 char for C.
3046
b2417b59
JJ
30472019-11-14 Jakub Jelinek <jakub@redhat.com>
3048
d0ec7c93
JJ
3049 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
3050 valid vendors.
3051
b2417b59
JJ
3052 * c-omp.c (c_omp_check_context_selector): Handle name lists
3053 containing string literals. Don't diagnose atomic_default_mem_order
3054 with multiple props.
3055
00be2a5f
JM
30562019-11-13 Joseph Myers <joseph@codesourcery.com>
3057
3058 * c-cppbuiltin.c (builtin_define_float_constants): Also define
3059 NORM_MAX constants. Update call to get_max_float.
3060 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
3061 constants.
3062
2dbad62d
EB
30632019-11-13 Eric Botcazou <ebotcazou@adacore.com>
3064
3065 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
3066 (dump_forward_type): Do not generate a declaration for function types.
3067 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
3068 of the component type if it is declared in another file.
3069
6ed76044
ML
30702019-11-12 Martin Liska <mliska@suse.cz>
3071
3072 * c-opts.c (c_common_post_options):
3073 Use SET_OPTION_IF_UNSET.
3074
62aee289
MR
30752019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
3076 Frederik Harwath <frederik@codesourcery.com>
3077
3078 gcc/c-family/
3079 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
3080 constant.
3081 * c-pragma.c (oacc_pragmas): Add "serial" entry.
3082
f486280c
RS
30832019-11-08 Richard Sandiford <richard.sandiford@arm.com>
3084
3085 * c-common.h (gnu_vector_type_p): New function.
3086 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
3087 vectors to satisfy gnu_vector_type_p.
3088 (c_build_vec_convert): Likewise __builtin_convertvector.
3089 (convert_vector_to_array_for_subscript): Likewise when applying
3090 implicit vector to array conversion.
3091 (scalar_to_vector): Likewise when converting vector-scalar
3092 operations to vector-vector operations.
3093
017c6491
JM
30942019-11-08 Joseph Myers <joseph@codesourcery.com>
3095
3096 * c.opt (Wold-style-definition): Initialize to -1.
3097 * c-opts.c (c_common_post_options): Set warn_old_style_definition
3098 to flag_isoc2x if not set explicitly.
3099
c01bd174
JM
31002019-11-07 Joseph Myers <joseph@codesourcery.com>
3101
3102 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
3103
0df65305
JM
31042019-11-05 Jason Merrill <jason@redhat.com>
3105
3106 * c-opts.c (c_common_post_options): -fconcepts-ts implies
3107 -fconcepts.
3108
e0c866dd
KK
31092019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
3110
3111 * c-opts.c (c_common_post_options): Update
3112 latest_abi_version.
3113
f968ef9b
JJ
31142019-11-02 Jakub Jelinek <jakub@redhat.com>
3115
d0c464d2
JJ
3116 * c-common.h (c_omp_get_context_selector): Remove.
3117 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
3118 and renamed to omp_get_context_selector.
3119
917dd789
JJ
3120 * c-omp.c (c_omp_mark_declare_variant): Use
3121 omp_context_selector_set_compare.
3122
f968ef9b
JJ
3123 PR c++/88335 - Implement P1073R3: Immediate functions
3124 * c-common.h (enum rid): Add RID_CONSTEVAL.
3125 * c-common.c (c_common_reswords): Add consteval.
3126
5f6705b7
JJ
31272019-11-01 Martin Sebor <msebor@redhat.com>
3128
3129 PR middle-end/91679
3130 PR middle-end/91647
3131 PR middle-end/91463
3132 PR middle-end/92312
3133 * c-pretty-print.c (direct_abstract_declarator): Print
3134 bound in zero-length arrays.
3135 * c.opt (-Wzero-length-bounds): New option.
3136
43f1814c
NS
31372019-10-30 Nathan Sidwell <nathan@acm.org>
3138
3139 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
3140 macros.
3141
ad1539d5
MS
31422019-10-28 Martin Sebor <msebor@redhat.com>
3143
3144 PR c/66970
3145 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
3146 even when only preprocessing.
3147 * c-common.h (names_builtin_p): Declare new function.
3148 * c-lex.c (init_c_lex): Set has_builtin.
3149 (c_common_has_builtin): Define a new function.
3150 * c-ppoutput.c (init_pp_output): Set has_builtin.
3151
135df52c
JJ
31522019-10-24 Jakub Jelinek <jakub@redhat.com>
3153
3154 * c-common.h (c_omp_context_selector_matches): Remove.
3155 * c-omp.c (c_omp_context_selector_matches): Remove.
3156 * c-attribs.c (c_common_attribute_table): Add
3157 "omp declare target {host,nohost,block}" attributes.
3158
8ad0c477
JM
31592019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
3160
3161 * c-lex.c (c_common_has_attribute): Update nodiscard value.
3162
56898e43
RS
31632019-10-14 Richard Sandiford <richard.sandiford@arm.com>
3164
3165 * c-common.h (user_facing_original_type_p): Declare.
3166 * c-common.c: Include c-spellcheck.h.
3167 (user_facing_original_type_p): New function.
3168
20de9568
JJ
31692019-10-12 Jakub Jelinek <jakub@redhat.com>
3170
3171 * c-common.h (c_omp_mark_declare_variant,
3172 c_omp_context_selector_matches): Declare.
3173 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
3174 and hsa-common.h.
3175 (c_omp_get_context_selector): Support second argument NULL.
3176 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
3177 functions.
3178 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
3179 attribute, add "omp declare variant base" and
3180 "omp declare variant variant" attributes.
3181
175a85b2
JM
31822019-10-11 Joseph Myers <joseph@codesourcery.com>
3183
3184 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
3185 CppReason(CPP_W_C11_C2X_COMPAT).
3186
fe2bc27c
JM
31872019-10-11 Joseph Myers <joseph@codesourcery.com>
3188
3189 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
3190 _Decimal64 and _Decimal128.
3191
27dfdc0f
JM
31922019-10-10 Joseph Myers <joseph@codesourcery.com>
3193
3194 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
3195 types if DFP not supported.
3196
94e7f906
JJ
31972019-10-10 Jakub Jelinek <jakub@redhat.com>
3198
3199 * c-common.h (c_omp_check_context_selector,
3200 c_omp_get_context_selector): Declare.
3201 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
3202 in diagnostic message.
3203 (c_omp_check_context_selector, c_omp_get_context_selector): New
3204 functions.
3205 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
3206 attribute.
3207 (handle_omp_declare_variant_attribute): New function.
3208
a7160771
MS
32092019-10-09 Martin Sebor <msebor@redhat.com>
3210
3211 PR tree-optimization/90879
3212 * c.opt (-Wstring-compare): New option.
3213
cb57504a
JM
32142019-10-08 Andrew Sutton <asutton@lock3software.com>
3215 Jason Merrill <jason@redhat.com>
3216
3217 Update the concepts implementation to conform to the C++20
3218 specification, improve compile times, and generally clean up
3219 the implementation.
3220
3221 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
3222 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
3223 * c.opt: Add -Wconcepts-ts.
3224 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
3225 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
3226 (set_std_cxx2a): Enable concepts by default.
3227
fbb2a6dc
JM
32282019-10-08 Joseph Myers <joseph@codesourcery.com>
3229
3230 * c-opts.c (c_common_post_options): Set
3231 -fno-fp-int-builtin-inexact for C2X.
3232
8e007055
JJ
32332019-10-05 Jakub Jelinek <jakub@redhat.com>
3234
3235 PR c++/91369 - Implement P0784R7: constexpr new
3236 * c-cppbuiltin.c (c_cpp_builtins): Predefine
3237 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
3238
843f104d
JM
32392019-10-04 Joseph Myers <joseph@codesourcery.com>
3240
3241 PR c/82752
3242 * c-format.c (C_STD_VER): Handle C2x.
3243 (C_STD_NAME): Likewise.
3244 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
3245 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
3246 modifier allowed and 'p' flag.
3247 * c-format.h (enum format_std_version): Add STD_C2X.
3248 (struct format_char_info): Mention 'p' in comment on flags2.
3249
e9c9a142
DM
32502019-10-01 David Malcolm <dmalcolm@redhat.com>
3251
3252 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
3253 calling diagnostic_show_locus, rather than destroying it afterwards.
3254
7552c36a
JJ
32552019-10-01 Jakub Jelinek <jakub@redhat.com>
3256
3257 PR c++/91925
3258 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
3259 with NULL DECL_FIELD_OFFSET.
3260
8209db25
RS
32612019-10-01 Richard Sandiford <richard.sandiford@arm.com>
3262
3263 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
3264 has a type name, use it in preference to the __vector syntax.
3265
9343bf99
RS
32662019-09-30 Richard Sandiford <richard.sandiford@arm.com>
3267
3268 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
3269 two spaces between a comma and "...".
3270
59bc434a
JJ
32712019-09-27 Jakub Jelinek <jakub@redhat.com>
3272
3273 PR c++/88203
3274 * c-common.h (c_omp_predefined_variable): Declare.
3275 * c-omp.c (c_omp_predefined_variable): New function.
3276 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
3277 for predefined variables.
3278
c6447c20
RS
32792019-09-27 Richard Sandiford <richard.sandiford@arm.com>
3280
3281 * c-common.h (build_function_call_vec): Take the original
3282 function decl as an optional final parameter.
3283 (check_builtin_function_arguments): Take the original function decl.
3284 * c-common.c (check_builtin_function_arguments): Likewise.
3285 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
3286 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
3287
c4438114
JM
32882019-09-15 Jason Merrill <jason@redhat.com>
3289
3290 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
3291 fold_for_warn in "|| mask" warning.
3292
68a57628
ML
32932019-09-10 Martin Liska <mliska@suse.cz>
3294
3295 * c.opt: Use newly added WarnRemoved.
3296
f48ef52e
ML
32972019-09-09 Martin Liska <mliska@suse.cz>
3298
3299 * c.opt: Update comment of removed
3300 options that are preserved only for backward
3301 compatibility.
3302
67f6e649
ML
33032019-09-06 Martin Liska <mliska@suse.cz>
3304
3305 PR c++/91125
3306 * c-common.c: Remove definition of flag_use_repository.
3307 * c-common.h: Likewise.
3308 * c-opts.c (c_common_handle_option):
3309 Do not handle OPT_frepo option.
3310 * c.opt: Mark the option with Deprecated.
3311
db9d2274
MP
33122019-09-04 Marek Polacek <polacek@redhat.com>
3313
3314 * c.opt (fdeduce-init-list): Ignored.
3315
68e2c199
PK
33162019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3317
3318 PR c/78736
3319 * c.opt (Wenum-conversion): New option.
3320
7a4418a5
JL
33212019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3322
3323 * c-attribs.c (handle_section_attribute): Call the
3324 handle_generic_attribute target hook after performing target
3325 independent processing.
3326 (handle_noinit_attribute): Likewise.
3327
5f76ab15
ILT
33282019-09-03 Ian Lance Taylor <iant@golang.org>
3329
3330 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
3331 when using -fgo-dump-spec.
3332
ae0d3f6a
ML
33332019-09-02 Martin Liska <mliska@suse.cz>
3334
3335 PR c++/91155
3336 * c-common.c (fname_as_string): Use cxx_printable_name for
3337 __PRETTY_FUNCTION__ same as was used before r265711.
3338
8a902edb
MP
33392019-08-28 Marek Polacek <polacek@redhat.com>
3340
3341 Implement P1152R4: Deprecating some uses of volatile.
3342 PR c++/91361
3343 * c-opts.c (c_common_post_options): Enable -Wvolatile by
3344 default for C++2a, unless -Wno-deprecated.
3345 * c.opt (Wvolatile): New warning.
3346
4742dbe7
MP
33472019-08-28 Marek Polacek <polacek@redhat.com>
3348
3349 PR c++/91360 - Implement C++20 P1143R2: constinit.
3350 * c-common.c (c_common_reswords): Add constinit and __constinit.
3351 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
3352 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
3353 RID_LAST_CXX20.
3354 (D_CXX20): Define.
3355 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
3356 * c-format.c (cxx_keywords): Add "constinit".
3357 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
3358
6a074892
JJ
33592019-08-27 Jakub Jelinek <jakub@redhat.com>
3360
3361 PR c++/91415
3362 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
3363 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
3364 like COMPOUND_EXPR rather than normal expression.
3365
22f8849d
IS
33662019-08-23 Iain Sandoe <iain@sandoe.co.uk>
3367
3368 PR pch/61250
3369 * c-lex.c (c_lex_with_flags): Don't call
3370 c_common_no_more_pch () from here.
3371
df375b03
JJ
33722019-08-23 Jakub Jelinek <jakub@redhat.com>
3373
3374 PR middle-end/91283
3375 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
3376 instead of flag_excess_precision_cmdline.
3377 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
3378 * c-opts.c (c_common_post_options): Likewise.
3379
14b7950f
MS
33802019-08-22 Martin Sebor <msebor@redhat.com>
3381
3382 PR middle-end/91490
3383 * c-common.c (braced_list_to_string): Add argument and overload.
3384 Handle flexible length arrays and unions.
3385
8bb2ee59
EB
33862019-08-21 Eric Botcazou <ebotcazou@adacore.com>
3387
3388 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
3389 function declarations where arguments are missing. Rename variables.
3390
21c1e205
RB
33912019-08-15 Richard Biener <rguenther@suse.de>
3392
3393 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
3394 enabled, define __SIZETYPE__.
3395
f0033821
CL
33962019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
3397
3398 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
3399 exclusion with "section" attribute.
3400 (attr_noinit_exclusions): New table.
3401 (handle_noinit_attribute): New function.
3402
4d732405
RS
34032019-08-13 Richard Sandiford <richard.sandiford@arm.com>
3404
3405 PR middle-end/91421
3406 * c-common.c (resolve_overloaded_builtin): Use
3407 copy_decl_built_in_function.
3408
51ad8481
MS
34092019-08-13 Martin Sebor <msebor@redhat.com>
3410
3411 PR c/80619
3412 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
3413 (asm_fprintf_length_spec): Same.
3414 * c-format.h (format_lengths): Add FMT_LEN_w.
3415
77eb117f
JJ
34162019-08-10 Jakub Jelinek <jakub@redhat.com>
3417
3418 * c-pragma.h (enum pragma_omp_clause): Add
3419 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3420
398e3feb
JJ
34212019-08-07 Jakub Jelinek <jakub@redhat.com>
3422
3423 * c-pragma.h (enum pragma_omp_clause): Add
3424 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
3425 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
3426 enumeration value.
3427
ab574db6
MP
34282019-08-05 Marek Polacek <polacek@redhat.com>
3429
3430 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
3431 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
3432 default for C++2a, unless -Wno-deprecated.
3433 * c.opt (Wcomma-subscript): New warning.
3434
554a530f
JJ
34352019-07-20 Jakub Jelinek <jakub@redhat.com>
3436
3437 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
3438 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
3439 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
3440 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
3441 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
3442 constructs with the loop construct.
3443
1a888209
JJ
34442019-07-13 Jakub Jelinek <jakub@redhat.com>
3445
3446 PR c/91149
3447 * c-omp.c (c_omp_split_clauses): Fix a pasto in
3448 OMP_CLAUSE_REDUCTION_TASK handling.
3449
1fdd6f04
JJ
34502019-07-12 Jakub Jelinek <jakub@redhat.com>
3451
3452 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
3453 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
3454
99b1c316
MS
34552019-07-09 Martin Sebor <msebor@redhat.com>
3456
3457 PR c++/61339
1fdd6f04 3458 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
3459 and others to class.
3460 * c-pretty-print.h: Same.
3461
6c1dae73
MS
34622019-07-09 Martin Sebor <msebor@redhat.com>
3463
3464 PR c++/61339
3465 * c-format.c (check_argument_type): Change class-key from class to
3466 struct and vice versa to match convention and avoid -Wclass-is-pod
3467 and -Wstruct-no-pod.
3468 * c-pretty-print.h: Same.
3469
8ba6ea87
ML
34702019-07-03 Martin Liska <mliska@suse.cz>
3471
3472 * c-common.c (try_to_locate_new_include_insertion_point): Remove
3473 dead assignemts.
3474
83eb9522
JJ
34752019-07-03 Jakub Jelinek <jakub@redhat.com>
3476
3477 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
3478 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
3479 with OMP_PARALLEL.
3480
1c6ffbab
QZ
34812019-07-02 qing zhao <qing.zhao@oracle.com>
3482
3483 PR preprocessor/90581
3484 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
3485 * c.opt: Add new option -fmax-include-depth.
3486
7ffc7de5
JM
34872019-06-26 Jason Merrill <jason@redhat.com>
3488
3489 PR c++/55442 - memory-hog with highly recursive constexpr.
3490 * c.opt (fconstexpr-loop-limit): New.
3491
361af3e4
JJ
34922019-06-25 Jakub Jelinek <jakub@redhat.com>
3493
3494 PR sanitizer/90954
3495 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
3496 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
3497
ab20d992
JJ
34982019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3499
3500 * c-common.c (c_common_nodes_and_builtins): Define
3501 alternate "__intN__" name for "__intN" types.
3502
f4af4019
JH
35032019-06-24 Jan Hubicka <jh@suse.cz>
3504
3505 * c-common.c (braced_lists_to_strings): Check that
3506 type is array or integer prior checking string flag.
3507
da9e9b57
MB
35082019-06-21 Matthew Beliveau <mbelivea@redhat.com>
3509
3510 PR c++/90875 - added -Wswitch-outside-range option
3511 * c.opt (Wswitch-outside-range): Added new option.
3512 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
3513
3f3d6a6f
MP
35142019-06-21 Marek Polacek <polacek@redhat.com>
3515
3516 PR c++/90953 - ICE with -Wmissing-format-attribute.
3517 * c-common.c (check_function_arguments_recurse): Use
3518 get_attribute_name.
3519 (check_missing_format_attribute): Likewise.
3520
1bf32c11
MP
35212019-06-19 Marek Polacek <polacek@redhat.com>
3522
3523 PR c++/60364 - noreturn after first decl not diagnosed.
3524 * c-attribs.c (handle_noreturn_attribute): No longer static.
3525 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
3526 Declare.
3527 * c-format.c (check_function_format): Use get_attribute_name.
3528
a04c0734
MS
35292019-06-19 Martin Sebor <msebor@redhat.com>
3530
3531 PR translation/90156
3532 * c-format.c (function_format_info::format_type): Adjust type.
3533 (function_format_info::is_raw): New member.
3534 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
3535 (decode_format_attr): Adjust call to decode_format_type.
3536 Avoid a redundant call to convert_format_name_to_system_name.
3537 Avoid abbreviating the word "arguments" in a diagnostic.
3538 (format_warning_substr): New function.
3539 (avoid_dollar_number): Quote dollar sign in a diagnostic.
3540 (finish_dollar_format_checking): Same.
3541 (check_format_info): Same.
3542 (struct baltoks_t): New.
3543 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
3544 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
3545 functions.
3546 (check_format_info_main): Call check_plain. Use baltoks_t. Call
3547 maybe_diag_unbalanced_tokens.
3548 (handle_format_attribute): Spell out the word "arguments" in
3549 a diagnostic.
3550
d3786ebb
MB
35512019-06-11 Matthew Beliveau <mbelivea@redhat.com>
3552
3553 PR c++/90449 - add -Winaccessible-base option.
3554 * c.opt (Winaccessible-base): New option.
3555
bf38f7e9
JJ
35562019-06-10 Jakub Jelinek <jakub@redhat.com>
3557
3558 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
3559 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
3560 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
3561 combined/composite constructs where it is not allowed. Copy over
3562 OMP_CLAUSE_REDUCTION_INSCAN.
3563
0ecf545c
MS
35642019-06-05 Martin Sebor <msebor@redhat.com>
3565
3566 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
3567 (handle_alias_ifunc_attribute): Same.
3568 (handle_copy_attribute): Same.
3569 (handle_weakref_attribute): Same.
3570 (handle_nonnull_attribute): Same.
3571 * c-warn.c (warn_for_sign_compare): Same.
3572 (warn_for_restrict): Same.
3573 * c.opt: Same.
3574
36b34127
MS
35752019-06-05 Martin Sebor <msebor@redhat.com>
3576
3577 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
3578 * c.opt (-Wformat-diag): Remove a spurious period.
3579
357a352f
JJ
35802019-05-29 Jakub Jelinek <jakub@redhat.com>
3581
3582 PR c/90628
3583 * c-common.c (check_builtin_function_arguments)
3584 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
3585 as last argument.
3586
2b8235ea
EB
35872019-05-23 Eric Botcazou <ebotcazou@adacore.com>
3588
3589 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
3590
6d86ddc4
ML
35912019-05-22 Martin Liska <mliska@suse.cz>
3592
3593 PR lto/90500
3594 * c-attribs.c (handle_copy_attribute): Do not copy
3595 target_clones attribute.
3596
419ba5b9
EB
35972019-05-21 Eric Botcazou <ebotcazou@adacore.com>
3598
3599 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
3600 * c-ada-spec.c (print_assignment_operator): New function.
3601 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
3602 assignment operators declared as methods and filter out the others.
3603
e03436e7
TS
36042019-05-17 Thomas Schwinge <thomas@codesourcery.com>
3605
3606 PR c/89433
3607 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
3608 "omp declare target".
3609
a9c697b8
MS
36102019-05-16 Martin Sebor <msebor@redhat.com>
3611
ab20d992
JJ
3612 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
3613 keywords, operators, and types in diagnostics.
3614 (handle_scalar_storage_order_attribute): Same.
3615 (handle_mode_attribute): Same.
3616 (handle_visibility_attribute): Same.
3617 (handle_assume_aligned_attribute): Same.
3618 (handle_no_split_stack_attribute): Same.
3619 * c-common.c (shorten_compare): Same.
3620 (c_common_truthvalue_conversion): Same.
3621 (cb_get_source_date_epoch): Same.
3622 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
3623 in diagnostics.
3624 (interpret_float): Same.
3625 * c-omp.c (c_finish_omp_for): Same.
3626 * c-opts.c (c_common_post_options): Same.
3627 * c-pch.c (c_common_pch_pragma): Same.
3628 * c-pragma.c (pop_alignment): Same.
3629 (handle_pragma_pack): Same.
3630 (apply_pragma_weak): Same.
3631 (handle_pragma_weak): Same.
3632 (handle_pragma_scalar_storage_order): Same.
3633 (handle_pragma_redefine_extname): Same.
3634 (add_to_renaming_pragma_list): Same.
3635 (maybe_apply_renaming_pragma): Same.
3636 (push_visibility): Same.
3637 (handle_pragma_visibility): Same.
3638 (handle_pragma_optimize): Same.
3639 (handle_pragma_message): Same.
3640 * c-warn.c (warn_for_omitted_condop): Same.
3641 (lvalue_error): Same.
a9c697b8 3642
6b943512
RB
36432019-05-15 Richard Biener <rguenther@suse.de>
3644
3645 PR c/90474
3646 * c-common.c (c_common_mark_addressable_vec): Also mark
3647 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
3648 c_mark_addressable.
ab20d992 3649
b744fc85
NS
36502019-05-06 Nathan Sidwell <nathan@acm.org>
3651
3652 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
3653
598f50d7
NS
36542019-04-30 Nathan Sidwell <nathan@acm.org>
3655
3656 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
3657
5bcc5a3b
ML
36582019-04-30 Martin Liska <mliska@suse.cz>
3659
3660 * c-pragma.c (handle_pragma_diagnostic): Provide hints
3661 for unknown options.
3662
e78a87f7
RS
36632019-04-26 Richard Sandiford <richard.sandiford@arm.com>
3664
3665 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
3666 the pointer target rather than the pointer itself.
3667
c280b7ee
JJ
36682019-04-19 Jakub Jelinek <jakub@redhat.com>
3669
3670 PR c/89888
3671 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
3672 arguments.
3673 (c_do_switch_warnings): Remove outside_range_p argument.
3674 * c-common.c (check_case_bounds): Removed.
3675 (c_add_case_label): Remove orig_type and outside_range_p arguments.
3676 Don't call check_case_bounds. Fold low_value as well as high_value.
3677 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
3678 Check for case labels outside of range of original type here and
3679 adjust them.
3680
8e8225e6
JJ
36812019-04-12 Jakub Jelinek <jakub@redhat.com>
3682
63b8a166
JJ
3683 PR translation/90041
3684 * c.opt (-fhandle-exceptions): Use %< and %> around option names
3685 in the Warn diagnostics.
3686
8e8225e6
JJ
3687 PR c/89946
3688 * c-attribs.c (handle_patchable_function_entry_attribute): Add
3689 function comment. Warn if arguments of the attribute are not positive
3690 integer constants.
3691
53a3f614
EB
36922019-04-09 Eric Botcazou <ebotcazou@adacore.com>
3693
3694 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
3695 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
3696
22be5873
EB
36972019-04-07 Eric Botcazou <ebotcazou@adacore.com>
3698
3699 * c-ada-spec.c (is_float128): New predicate extracted from...
3700 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
3701 <REAL_TYPE>: ...here. Call it.
3702
34facf20
DM
37032019-04-05 David Malcolm <dmalcolm@redhat.com>
3704
3705 PR c/89985
3706 * c-warn.c (check_address_or_pointer_of_packed_member): Add
3707 auto_diagnostic_group. Guard inform calls by result of
3708 warning_at call.
3709
05564120
MP
37102019-04-05 Marek Polacek <polacek@redhat.com>
3711
ab20d992 3712 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
05564120
MP
3713 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
3714 of RHS.
3715
7a506c3c
JM
37162019-04-03 Jason Merrill <jason@redhat.com>
3717
3718 PR c++/86586 - -fcompare-debug=-Wsign-compare.
3719 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
3720
ddeae8c8
MS
37212019-04-01 Martin Sebor <msebor@redhat.com>
3722
3723 PR c/89685
3724 * c-attribs.c (handle_copy_attribute): Handle references and
3725 non-constant expressions.
3726
a15ffa22
JJ
37272019-03-22 Jakub Jelinek <jakub@redhat.com>
3728
3729 PR c++/87481
3730 * c.opt (-fconstexpr-ops-limit=): New option.
3731
36a3a7a3
JJ
37322019-03-21 Jakub Jelinek <jakub@redhat.com>
3733
3734 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
3735 template param.
3736
bec1da64
MS
37372019-03-19 Martin Sebor <msebor@redhat.com>
3738
3739 PR tree-optimization/89688
3740 * c-common.c (braced_list_to_string): Make static.
3741 (braced_lists_to_strings): Define new function.
3742 * c-common.h (braced_list_to_string): Remove.
3743 (braced_lists_to_strings): Declare.
3744
1fe61adf
ML
37452019-03-12 Martin Liska <mliska@suse.cz>
3746
3747 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
3748
93964ebd
ML
37492019-03-11 Martin Liska <mliska@suse.cz>
3750
3751 * c-opts.c (c_common_post_options): Wrap apostrophes
3752 in gcc internal format with %'.
3753
a3f9f006
ML
37542019-03-11 Martin Liska <mliska@suse.cz>
3755
3756 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
3757 in a string format message and fix GNU coding style.
3758 * c-common.c (vector_types_convertible_p): Likewise.
3759 (c_build_vec_perm_expr): Likewise.
3760 * c-indentation.c (get_visual_column): Likewise.
3761 * c-opts.c (c_common_handle_option): Likewise.
3762 (c_common_post_options): Likewise.
3763 (sanitize_cpp_opts): Likewise.
3764 * c-pch.c (c_common_pch_pragma): Likewise.
3765 * c-pragma.c (handle_pragma_pack): Likewise.
3766
1db01ff9
JJ
37672019-03-08 Jakub Jelinek <jakub@redhat.com>
3768
3769 PR tree-optimization/89550
3770 * c-common.c (c_common_truthvalue_conversion): Only set
3771 TREE_NO_WARNING if warning_at returned true.
3772 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
3773
ba790e6f
JJ
37742019-02-25 Sandra Loosemore <sandra@codesourcery.com>
3775 Martin Sebor <msebor@gmail.com>
3776
3777 * c.opt (Wmissing-attributes): Clean up doc string.
3778
7da73ba7
JJ
37792019-02-25 Jakub Jelinek <jakub@redhat.com>
3780
3781 PR c/89495
3782 * c-format.c (maybe_read_dollar_number): Compute nargnum in
3783 HOST_WIDE_INT type to avoid overflows and change overflow_flag
3784 checking.
3785
921bb9d1
RB
37862019-02-22 Richard Biener <rguenther@suse.de>
3787
3788 * c-pch.c (no_checksum): Remove.
3789 (pch_init): Remove assertion that executable_checksum is not
3790 all zero.
3791 (c_common_valid_pch): Likewise.
3792
e2ebb05c
MS
37932019-02-18 Martin Sebor <msebor@redhat.com>
3794
3795 PR middle-end/89294
3796 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
3797
3fe53000
DM
37982019-02-16 David Malcolm <dmalcolm@redhat.com>
3799
3800 PR c++/88680
3801 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
3802 implementing -Wtype-limits.
3803
28a8cef1
MS
38042019-02-11 Martin Sebor <msebor@redhat.com>
3805
3806 PR c++/87996
3807 * c-common.c (invalid_array_size_error): New function.
3808 (valid_array_size_p): Call it. Handle size as well as type.
3809 * c-common.h (valid_constant_size_p): New function.
3810 (enum cst_size_error): New type.
3811
ec2be203
DM
38122019-01-31 David Malcolm <dmalcolm@redhat.com>
3813
3814 PR c/89122
3815 * known-headers.cc (get_stdlib_header_for_name): Add
3816 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
3817
8936f047
JJ
38182019-01-31 Jakub Jelinek <jakub@redhat.com>
3819
3820 PR libstdc++/88170
3821 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
3822 a C cast in pp_c_flag_gnu_v3 mode.
3823
6a335b96
JJ
38242019-01-29 Jakub Jelinek <jakub@redhat.com>
3825
3826 PR c/86125
3827 * c-common.c (c_common_nodes_and_builtins): Build type variants for
3828 builtin_structptr_types types even for C.
3829
2a06eba5
BE
38302019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
3831
3832 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
3833 when rhs is of array type correctly. Fix handling of nested structures.
3834 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
3835 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
3836 type casts within nested compound expressions.
3837
18a23298
JJ
38382019-01-22 Jakub Jelinek <jakub@redhat.com>
3839
3840 PR middle-end/88968
3841 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
3842 variable after using BIT_FIELD_REF.
3843
420183d9
L
38442019-01-18 H.J. Lu <hongjiu.lu@intel.com>
3845
3846 PR c/51628
3847 PR c/88664
3848 * c-common.h (warn_for_address_or_pointer_of_packed_member):
3849 Remove the boolean argument.
3850 * c-warn.c (check_address_of_packed_member): Renamed to ...
3851 (check_address_or_pointer_of_packed_member): This. Also
3852 warn pointer conversion.
3853 (check_and_warn_address_of_packed_member): Renamed to ...
3854 (check_and_warn_address_or_pointer_of_packed_member): This.
3855 Also warn pointer conversion.
3856 (warn_for_address_or_pointer_of_packed_member): Remove the
3857 boolean argument. Don't check pointer conversion here.
3858
99063eee
RS
38592019-01-15 Richard Sandiford <richard.sandiford@arm.com>
3860
3861 PR inline-asm/52813
3862 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
3863
a30d0196
JJ
38642019-01-14 Jakub Jelinek <jakub@redhat.com>
3865
3866 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
3867 and __cpp_nontype_template_parameter_auto. Add a comment that
3868 __cpp_template_auto is deprecated.
3869
2d91f79d
TH
38702019-01-14 Tom Honermann <tom@honermann.net>
3871
3872 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
3873 * c-common.c (c_common_reswords): Add char8_t.
3874 (fix_string_type): Use char8_t for the type of u8 string literals.
3875 (c_common_get_alias_set): char8_t doesn't alias.
3876 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
3877 C++.
3878 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
3879 (keyword_begins_type_specifier): Add RID_CHAR8.
3880 * c-common.h (rid): Add RID_CHAR8.
3881 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
3882 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
3883 Define char8_type_node and char8_array_type_node.
3884 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
3885 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
3886 (c_cpp_builtins): Predefine __cpp_char8_t.
3887 * c-lex.c (lex_string): Use char8_array_type_node as the type of
3888 CPP_UTF8STRING.
3889 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
3890 * c-opts.c: If not otherwise specified, enable -fchar8_t when
3891 targeting C++2a.
3892 * c.opt: Add the -fchar8_t command line option.
3893
23db6ced
MS
38942019-01-14 Martin Sebor <msebor@redhat.com>
3895
3896 PR target/88638
3897 * c-attribs.c (positional_argument): Call valid_format_string_type_p
3898 and issue errors if it fails.
3899 * c-common.h (valid_format_string_type_p): Declare.
3900 * c-format.c (valid_stringptr_type_p): Rename...
3901 (valid_format_string_type_p): ...to this and make extern.
3902 (handle_format_arg_attribute): Adjust to new name.
3903 (check_format_string): Same.
3904
234c3818
L
39052019-01-13 H.J. Lu <hongjiu.lu@intel.com>
3906
3907 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
3908 Replace "may may" with "may" in warning message.
3909
d8fcab68
JJ
39102019-01-07 Jakub Jelinek <jakub@redhat.com>
3911
3912 PR c++/85052
3913 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
3914 (c_build_vec_convert): Declare.
3915 * c-common.c (c_build_vec_convert): New function.
3916
29d24852
MS
39172019-01-04 Martin Sebor <msebor@redhat.com>
3918
3919 PR c/88546
3920 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
3921 Handle C++ empty throw specification and C11 _Noreturn.
3922 (has_attribute): Also handle C11 _Noreturn.
3923
9069a4c9
MS
39242019-01-04 Martin Sebor <msebor@redhat.com>
3925
3926 PR c/88363
3927 * c-attribs.c (positional_argument): Also accept enumerated types.
3928
a5544970
JJ
39292019-01-01 Jakub Jelinek <jakub@redhat.com>
3930
3931 Update copyright years.
3932
da77eace
L
39332018-12-20 H.J. Lu <hongjiu.lu@intel.com>
3934
3935 PR c/51628
3936 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
3937 * c-warn.c (check_alignment_of_packed_member): New function.
3938 (check_address_of_packed_member): Likewise.
3939 (check_and_warn_address_of_packed_member): Likewise.
3940 (warn_for_address_or_pointer_of_packed_member): Likewise.
3941 * c.opt: Add -Wno-address-of-packed-member.
3942
573767d4
DM
39432018-12-20 David Malcolm <dmalcolm@redhat.com>
3944
3945 PR c++/87504
3946 * c-warn.c (get_outermost_macro_expansion): New function.
3947 (spelled_the_same_p): Use it to unwind the macro expansions, and
3948 compare the outermost macro in each nested expansion, rather than
3949 the innermost.
3950
a14feb3c
DM
39512018-12-19 David Malcolm <dmalcolm@redhat.com>
3952
3953 PR c++/87504
3954 * c-common.h (warn_tautological_cmp): Convert 1st param from
3955 location_t to const op_location_t &.
3956 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
3957 when testing for INTEGER_CST.
3958 (warn_tautological_bitwise_comparison): Convert 1st param from
3959 location_t to const op_location_t &; use it to build a
3960 binary_op_rich_location, and use this.
3961 (spelled_the_same_p): New function.
3962 (warn_tautological_cmp): Convert 1st param from location_t to
3963 const op_location_t &. Warn for macro expansions if
3964 spelled_the_same_p. Use binary_op_rich_location.
3965
dfd7fdca
DM
39662018-12-19 David Malcolm <dmalcolm@redhat.com>
3967
3968 PR c++/43064
3969 PR c++/43486
3970 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
3971 (verify_tree): Handle location wrappers.
3972 (c_common_truthvalue_conversion): Strip any location wrapper.
3973 Handle CONST_DECL.
3974 (fold_offsetof): Strip any location wrapper.
3975 (complete_array_type): Likewise for initial_value.
3976 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
3977 index before checking for INTEGER_CST.
3978 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
3979 print parentheses around location wrappers.
3980 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
3981 before checking for INTEGER_CST.
3982 (warn_tautological_bitwise_comparison): Call
3983 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
3984 before checking for INTEGER_CST.
3985 (readonly_error): Strip any location wrapper.
3986 (warn_array_subscript_with_type_char): Strip location wrappers
3987 before checking for INTEGER_CST. Use the location of the index if
3988 available.
3989
5c8b3702
JM
39902018-12-06 Jason Merrill <jason@redhat.com>
3991
3992 PR c++/88136 - -Wdeprecated-copy false positives
3993 * c.opt (Wdeprecated-copy-dtor): New.
3994 (Wdeprecated-copy): Move to -Wextra.
3995
673670da
MS
39962018-11-29 Martin Sebor <msebor@redhat.com>
3997
3998 PR c/88172
3999 PR testsuite/88208
4000 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
4001 alignments to values less than the target requires.
4002 (has_attribute): For attribute aligned consider both the attribute
4003 and the alignment bits.
4004 * c-common.c (c_init_attributes): Optionally issue a warning for
4005 zero alignment.
4006
04864ec8
MS
40072018-11-28 Martin Sebor <msebor@redhat.com>
4008
4009 PR c/88065
4010 PR c/87297
4011 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
4012 or destination is an error.
4013
ace83db0
JJ
40142018-11-28 Jakub Jelinek <jakub@redhat.com>
4015
4016 PR c++/88215
4017 * c-ubsan.c: Include langhooks.h.
4018 (ubsan_instrument_division): Change gcc_assert that main variants
4019 of op0 and op1 types are equal to gcc_checking_assert that the
4020 main variants are compatible types.
4021
da193a27
EB
40222018-11-27 Eric Botcazou <ebotcazou@adacore.com>
4023
4024 * c-ada-spec.c: Include stringpool.h.
4025 (has_static_fields): Return false for incomplete types.
4026 (is_tagged_type): Likewise.
4027 (has_nontrivial_methods): Likewise.
4028 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
4029 (struct overloaded_name_hash): New structure.
4030 (struct overloaded_name_hasher): Likewise.
4031 (overloaded_names): New global variable.
4032 (init_overloaded_names): New static function.
4033 (overloaded_name_p): New predicate.
4034 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
4035 on the TYPE_STUB_DECL of the original type of a typedef, if any.
4036 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
4037 Remove always-true condition and dump forward types.
4038 (dump_ada_specs): Delete overloaded_names.
4039
98f08eb8
MS
40402018-11-20 Martin Sebor <msebor@redhat.com>
4041
4042 * c-attribs.c (type_for_vector_size): New function.
4043 (type_valid_for_vector_size): Same.
4044 (handle_vector_size_attribute): Move code to the functions above
4045 and call them.
4046 (validate_attribute, has_attribute): New functions.
4047 * c-common.h (has_attribute): Declare.
4048 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
4049 * c-common.c (c_common_resword): Same.
4050
2674fa47
JM
40512018-11-16 Jason Merrill <jason@redhat.com>
4052
4053 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
4054 * c-attribs.c (attr_cold_hot_exclusions): Make public.
4055
258b3854
JJ
40562018-11-16 Jakub Jelinek <jakub@redhat.com>
4057
4058 PR middle-end/87854
4059 * c-common.c (fix_string_type): Reject string literals larger than
4060 TYPE_MAX_VALUE (ssizetype) bytes.
4061
1d249509
MS
40622018-11-15 Martin Sebor <msebor@redhat.com>
4063
4064 PR c++/87541
4065 PR c++/87542
4066 * c-attribs.c (positional_argument): New function.
4067 (handle_alloc_size_attribute): Use it and simplify.
4068 (handle_alloc_align_attribute): Same.
4069 (handle_assume_aligned_attribute): Same.
4070 (handle_nonnull_attribute): Same.
4071 * c-common.c (check_function_arguments): Pass fntype to
4072 check_function_format.
4073 * c-common.h (check_function_format): Add an argument.
4074 (PosArgFlags, positional_argument): Declare new type and function.
4075 * c-format.c (decode_format_attr): Add arguments.
4076 (check_format_string, get_constant): Same.
4077 (convert_format_name_to_system_name): Adjust.
4078
478dd60d
DM
40792018-11-15 David Malcolm <dmalcolm@redhat.com>
4080
4081 PR other/19165
4082 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
4083
8cca0163
JJ
40842018-11-14 Jakub Jelinek <jakub@redhat.com>
4085
8ee09943
JJ
4086 P1236R1 - Signed integers are two's complement
4087 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
4088 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
4089 with in-range second operand well defined for -std=c++2a.
4090
8cca0163
JJ
4091 PR other/88007
4092 * c-common.c (parse_optimize_options): Allocate option string from
4093 opts_obstack rather than as GC memory. Move the allocation after
4094 warning for invalid option.
4095
620e594b
DM
40962018-11-13 David Malcolm <dmalcolm@redhat.com>
4097
4098 * c-common.c (c_get_substring_location): Update for renaming of
4099 get_source_location_for_substring to get_location_within_string.
4100 * c-lex.c: Replace "source_location" with "location_t".
4101 * c-opts.c: Likewise.
4102 * c-ppoutput.c: Likewise.
4103
f9731de3
MS
41042018-11-13 Martin Sebor <msebor@redhat.com>
4105
4106 PR middle-end/81824
4107 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
4108 (handle_tls_model_attribute): Improve diagnostics.
4109
e4bd6d5e
JM
41102018-11-12 Jason Merrill <jason@redhat.com>
4111
a6bb6b07
JM
4112 * c-cppbuiltin.c (c_cpp_builtins): Define
4113 __cpp_impl_destroying_delete.
4114
e4bd6d5e
JM
4115 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
4116 __cpp_conditional_explicit.
4117
79a2c428
MS
41182018-11-09 Martin Sebor <msebor@redhat.com>
4119
4120 PR middle-end/81824
4121 * c-attribs.c (handle_copy_attribute): New function.
4122
4c7bd361
MS
41232018-11-09 Martin Sebor <msebor@redhat.com>
4124
4125 PR c/87795
4126 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
4127
28567c40
JJ
41282018-11-08 Jakub Jelinek <jakub@redhat.com>
4129
4130 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
4131 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
4132 enum omp_memory_order MEMORY_ORDER.
4133 (c_finish_omp_flush): Add MO argument.
4134 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
4135 (c_finish_omp_for): Add FINAL_P argument.
4136 * c-omp.c: Include memmodel.h.
4137 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
4138 OMP_TASKGROUP_CLAUSES to it.
4139 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
4140 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
4141 instead of OMP_ATOMIC_SEQ_CST.
4142 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
4143 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
4144 __atomic_thread_fence call with the given value.
4145 (check_omp_for_incr_expr): Formatting fixes.
4146 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
4147 even in OpenMP loops, diagnose if NE_EXPR and incr expression
4148 is not constant expression 1 or -1. Transform NE_EXPR loops
4149 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
4150 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
4151 loops too.
4152 (c_omp_split_clauses): Add support for combined
4153 #pragma omp parallel master and
4154 #pragma omp {,parallel }master taskloop{, simd} constructs.
4155 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
4156 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
4157 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
4158 (c_omp_predetermined_sharing): Don't return
4159 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
4160 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
4161 PRAGMA_OMP_REQUIRES.
4162 * c-pragma.h (enum pragma_kind): Likewise.
4163 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
4164 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
4165
204839e7
DM
41662018-11-08 David Malcolm <dmalcolm@redhat.com>
4167
4168 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
4169
d8010ee4
DM
41702018-11-08 David Malcolm <dmalcolm@redhat.com>
4171
4172 * c-format.c (local_cgraph_node_ptr_node): New variable.
4173 (gcc_dump_printf_char_table): Add entry for %C.
4174 (get_pointer_to_named_type): New function, taken from the handling
4175 code for "gimple *" from...
4176 (init_dynamic_diag_info): ...here. Add handling for
4177 "cgraph_node *".
4178 * c-format.h (T_CGRAPH_NODE): New.
4179
4be5c72c
JM
41802018-10-19 Jason Merrill <jason@redhat.com>
4181
4182 * c-cppbuiltin.c (c_cpp_builtins): Add
4183 __cpp_nontype_template_parameter_class.
4184
f3f6029d
NS
41852018-10-31 Nathan Sidwell <nathan@acm.org>
4186
ab5324fb
NS
4187 * c-opts.c (c_finish_options): Force command line macro
4188 location. Refactor to avoid repeating main debug hook.
4189 (push_command_line_include): Clarify comment.
4190
f3f6029d
NS
4191 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
4192
91e3ec29
MS
41932018-10-30 Martin Sebor <msebor@redhat.com>
4194
4195 PR middle-end/87041
4196 * c-format.c (check_format_types): Avoid diagnosing null pointer
4197 arguments to printf-family of functions.
4198
b5ff4f5c
MP
41992018-10-30 Marek Polacek <polacek@redhat.com>
4200
4201 Implement P0892R2, explicit(bool).
4202 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
4203
7e2de6df
DM
42042018-10-29 David Malcolm <dmalcolm@redhat.com>
4205
4206 * name-hint.h (name_hint::take_deferred): New member function.
4207
b2bf438c
DM
42082018-10-29 David Malcolm <dmalcolm@redhat.com>
4209
4210 PR c++/56856
4211 * c-common.c (check_function_sentinel): Call fold_for_warn on the
4212 argument.
4213 (check_function_restrict): Rename param "argarray" to
4214 "unfolded_argarray", and make a copy named "argarray", calling
4215 fold_for_warn on each argument.
4216 (check_function_arguments): Add note about responsibility for
4217 folding the arguments.
4218
9f936c86
JM
42192018-10-17 Joseph Myers <joseph@codesourcery.com>
4220
4221 * c-common.c (flag_isoc2x): New variable.
4222 * c-common.h (clk_c): Update comment to reference C2X.
4223 (flag_isoc99, flag_isoc11): Update comments to reference future
4224 standard versions in general.
4225 (flag_isoc2x): Declare.
4226 * c-opts.c (set_std_c2x): New function.
4227 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
4228 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
4229 flag_isoc2x to 0.
4230 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
4231
7a8a92c4
JM
42322018-10-17 Joseph Myers <joseph@codesourcery.com>
4233
4234 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
4235 (std=iso9899:2018): Document C17 as published in 2018.
4236
4dc003ff
CL
42372018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
4238
4239 PR c++/87364
4240 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
4241
79371671
WW
42422018-10-11 Will Wray <wjwray@gmail.com>
4243
4244 PR c++/87364
4245 * c-pretty-print.h (pp_c_type_cast): Prototype.
4246 (pp_c_integer_constant): Likewise.
4247 * c-pretty-print.c (pp_c_type_cast): No longer static.
4248 (pp_c_integer_constant): Likewise.
4249 (pp_c_enumeration_constant): Fix loop termination when finding
4250 name of constant. No longer returns a value. Call
4251 pp_c_integer_constant.
4252 (c_pretty_printer::constant): Update for changes to
4253 pp_c_enumeration_constant.
4254
46c62690
JJ
42552018-10-11 Jakub Jelinek <jakub@redhat.com>
4256
4257 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
4258 for no_unique_address.
4259
c24300ba
DM
42602018-10-09 David Malcolm <dmalcolm@redhat.com>
4261
4262 * c-common.c (c_option_controlling_cpp_error): Rename to...
4263 (c_option_controlling_cpp_diagnostic): ...this, and convert
4264 "reason" from int to enum.
4265 (c_cpp_error): Rename to...
4266 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4267 * c-common.h (c_cpp_error): Rename to...
4268 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4269 * c-opts.c (c_common_init_options): Update for renaming.
4270
8656dafa
RS
42712018-10-08 Richard Sandiford <richard.sandiford@arm.com>
4272
4273 PR c/87286
4274 * c-common.c (vector_types_compatible_elements_p): Use
4275 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
4276
8cff0652
VK
42772018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
4278
4279 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
4280 to generate constructor destructor priority warning.
4281 * c.opt (-Wprio-ctor-dtor): New option.
4282
bedf03a2
JM
42832018-10-01 Jason Merrill <jason@redhat.com>
4284
4285 * c-lex.c (c_common_has_attribute): Add no_unique_address.
4286
6cc430c1
EB
42872018-10-01 Eric Botcazou <ebotcazou@adacore.com>
4288
4289 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
4290 (dump_ada_node): Add const keyword.
4291
87677ac7
ML
42922018-09-25 Martin Liska <mliska@suse.cz>
4293
4294 * c-common.c (c_common_truthvalue_conversion):
4295 Remove Pascal from documentation.
4296
518196cb
EB
42972018-09-21 Eric Botcazou <ebotcazou@adacore.com>
4298
4299 * c-ada-spec.c: Include diagnostic.h.
4300 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
4301
a599af84
MP
43022018-09-19 Marek Polacek <polacek@redhat.com>
4303
4304 * c.opt (Wclass-conversion): New.
4305
9c4a4b3c
DM
43062018-09-17 David Malcolm <dmalcolm@redhat.com>
4307
4308 * c-format.c (range_label_for_format_type_mismatch::get_text):
4309 Update for new param.
4310
c896ecfe
DM
43112018-09-17 David Malcolm <dmalcolm@redhat.com>
4312
4313 * c-format.c (format_warning_at_char): Update for introduction of
4314 format_string_diagnostic_t.
4315 (format_type_warning): Likewise.
4316
80c6d1f4
MJ
43172018-09-17 Martin Jambor <mjambor@suse.cz>
4318
4319 PR c/63886
4320 * c.opt (Wabsolute-value): New.
4321
6d900107
BE
43222018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
4323
4324 * c-common.c (complete_flexible_array_elts): New helper function.
4325 * c-common.h (complete_flexible_array_elts): Declare.
4326
b5764229
BE
43272018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4328
4329 * c-common.c (braced_list_to_string): Remove eval parameter.
4330 Add some more checks. Always create zero-terminated STRING_CST.
4331 * c-common.h (braced_list_to_string): Adjust prototype.
4332
85204e23
DM
43332018-08-27 David Malcolm <dmalcolm@redhat.com>
4334
4335 PR 87091
4336 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
4337 to a tri-state.
4338 (maybe_suggest_missing_token_insertion): Likewise.
4339 (maybe_add_include_fixit): Add param "override_location". If set,
4340 and source-printing is enabled, then override the rich_location's
4341 primary location with that of the insertion point for the fix-it
4342 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
4343 * c-common.h (extern void maybe_add_include_fixit): Add bool
4344 param.
4345 * c-format.c (selftest::test_type_mismatch_range_labels): Update
4346 for conversion of show_caret_p to a tri-state.
4347 * c-warn.c (warn_for_restrict): Likewise.
4348 * known-headers.cc
4349 (suggest_missing_header::~suggest_missing_header): Update call to
4350 maybe_add_include_fixit to suggest overriding the location, as it
4351 is for a note.
4352
3d78e008
ML
43532018-08-27 Martin Liska <mliska@suse.cz>
4354
4355 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
4356 fndecl_built_in_p and remove check for FUNCTION_DECL if
4357 possible.
3d78e008
ML
4358 (check_builtin_function_arguments): Likewise.
4359 (reject_gcc_builtin): Likewise.
4360 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
4361
b5be6d0c
MP
43622018-08-26 Marek Polacek <polacek@redhat.com>
4363
4364 PR c++/87029, Implement -Wredundant-move.
4365 * c.opt (Wredundant-move): New option.
4366
79ca9c35
MP
43672018-08-21 Marek Polacek <polacek@redhat.com>
4368
4369 PR c++/86981, Implement -Wpessimizing-move.
4370 * c.opt (Wpessimizing-move): New option.
4371
097f82ec
DM
43722018-08-20 David Malcolm <dmalcolm@redhat.com>
4373
4374 PR other/84889
4375 * c-attribs.c (common_handle_aligned_attribute): Add
4376 auto_diagnostic_group instance.
4377 * c-indentation.c (warn_for_misleading_indentation): Likewise.
4378 * c-opts.c (c_common_post_options): Likewise.
4379 * c-warn.c (warn_logical_not_parentheses): Likewise.
4380 (warn_duplicated_cond_add_or_warn): Likewise.
4381 (warn_for_multistatement_macros): Likewise.
4382
3fb558b1
NS
43832018-08-20 Nathan Sidwell <nathan@acm.org>
4384
4385 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
4386 access.
4387
800c0e98
NS
43882018-08-17 Nathan Sidwell <nathan@acm.org>
4389
4390 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
4391 field.
4392 (laxy_hex_fp_value_count): Make unsigned.
4393 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
4394 manipulate the macro.
4395 (builtin_defin_with_hex_fp_value): Adjust callback name, use
4396 cpp_define_lazily.
4397
6f795a92
DM
43982018-08-17 David Malcolm <dmalcolm@redhat.com>
4399
4400 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
4401 (gcc_dump_printf_length_specs): New.
4402 (gcc_dump_printf_flag_pairs): New.
4403 (gcc_dump_printf_flag_specs): New.
4404 (gcc_dump_printf_char_table): New.
4405 (format_types_orig): Add entry for "gcc_dump_printf".
4406 (init_dynamic_diag_info): Set up length_char_specs and
4407 conversion_specs for gcc_dump_printf_format_type.
4408 (handle_format_attribute): Handle gcc_dump_printf_format_type.
4409
c5d725c0
NS
44102018-08-17 Nathan Sidwell <nathan@acm.org>
4411
10f04917
NS
4412 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
4413
c5d725c0
NS
4414 * c-ada-spec.c: Don't #include "cpp-id-data.h"
4415 * c-cppbuiltin.c: Likewise.
4416
c0c12356
ML
44172018-08-17 Martin Liska <mliska@suse.cz>
4418
4419 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
4420 Ignore/Deprecated flag. Warning is done automatically for
4421 Deprecated flags.
c0c12356 4422
10fcc142
DM
44232018-08-16 David Malcolm <dmalcolm@redhat.com>
4424
4425 PR c++/70693
4426 * c-common.c (selftest::c_family_tests): Call
4427 selftest::c_indentation_c_tests.
4428 * c-common.h (selftest::c_indentation_c_tests): New decl.
4429 * c-indentation.c: Include "selftest.h".
4430 (next_tab_stop): Add "tab_width" param, rather than accessing
4431 cpp_opts.
4432 (get_visual_column): Likewise. Clarify comment. Bulletproof
4433 against reading past the end of the line.
4434 (get_first_nws_vis_column): Add "tab_width" param.
4435 (detect_intervening_unindent): Likewise.
4436 (should_warn_for_misleading_indentation): Read tab width from
4437 cpp_opts and pass around.
4438 (selftest::test_next_tab_stop): New test.
4439 (selftest::assert_get_visual_column_succeeds): New function.
4440 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
4441 (selftest::assert_get_visual_column_fails): New function.
4442 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
4443 (selftest::test_get_visual_column): New test.
4444 (selftest::c_indentation_c_tests): New function.
4445
3f6677f4
NS
44462018-08-16 Nathan Sidwell <nathan@acm.org>
4447
4448 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
4449 (store_ada_macro): Likewise.
4450 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
4451 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
4452
96e6ae57
DM
44532018-08-15 David Malcolm <dmalcolm@redhat.com>
4454
4455 * c-format.c: Include "selftest-diagnostic.h" and
4456 "gcc-rich-location.h".
4457 (format_warning_at_char): Pass NULL for new label params of
4458 format_warning_va.
4459 (class indirection_suffix): New class.
4460 (class range_label_for_format_type_mismatch): New class.
4461 (format_type_warning): Move logic for generating "*" suffix to
4462 class indirection_suffix. Create "fmt_label" and "param_label"
4463 to show their types, and pass them to the
4464 format_warning_at_substring calls.
4465 (selftest::test_type_mismatch_range_labels): New test.
4466 (selftest::c_format_c_tests): Call it.
4467
23aa9f7c
MS
44682018-08-13 Martin Sebor <msebor@redhat.com>
4469
4470 PR tree-optimization/71625
4471 * c-common.c (braced_list_to_string): New function.
4472 * c-common.h (braced_list_to_string): Declare it.
4473
f10a9135
NS
44742018-08-08 Nathan Sidwell <nathan@acm.org>
4475
4476 * c-common.c (try_to_locate_new_include_inertion_point): Use
4477 linemap_included_from_linemap.
4478 * c-lex.c (fe_file_change): Use linemap_included_from.
4479 * c-ppoutput.c (pp_file_change): Likewise.
4480
8a45b051
MS
44812018-08-01 Martin Sebor <msebor@redhat.com>
4482
4483 PR tree-optimization/86650
ab20d992 4484 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
8a45b051
MS
4485 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
4486 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
4487 * c-format.h (T89_G): Update to be "gimple *" rather than
4488 "gcall *".
4489 (local_gcall_ptr_node): Rename...
4490 (local_gimple_ptr_node): ...to this.
4491
e540ccc0
DM
44922018-07-31 David Malcolm <dmalcolm@redhat.com>
4493
4494 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
4495 table entries for gcc_diag_char_table, and the 'Z' entry from
4496 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
4497 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
4498 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
4499 adding missing "Z" for this table. Remove erroneous "G" and "K"
4500 entries.
4501 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4502 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
4503 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4504
425fc685
RE
45052018-07-31 Richard Earnshaw <rearnsha@arm.com>
4506
4507 * c-common.c (speculation_safe_resolve_call): New function.
4508 (speculation_safe_resolve_params): New function.
4509 (speculation_safe_resolve_return): New function.
4510 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
4511 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
4512 __HAVE_SPECULATION_SAFE_VALUE.
4513
181463c2
DM
45142018-07-20 David Malcolm <dmalcolm@redhat.com>
4515
4516 * c-common.c (c_cpp_error): Remove redundant "line_table"
4517 parameter from call to rich_location::set_range.
4518 (maybe_suggest_missing_token_insertion): Likewise.
4519
0d7f9065
MS
45202018-07-20 Martin Sebor <msebor@redhat.com>
4521
4522 PR middle-end/82063
ab20d992 4523 * c.opt (-Warray-bounds): Remove redundant -Wall.
0d7f9065 4524
00abf86c
MS
45252018-07-20 Martin Sebor <msebor@redhat.com>
4526
4527 PR middle-end/82063
4528 * c-common.h (c_common_handle_option): Change function argument
4529 to HOST_WIDE_INT.
4530 * c-opts.c (c_common_init_options): Same.
4531 (c_common_handle_option): Same. Remove special handling of
4532 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
4533 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
4534 options to take a HOST_WIDE_INT argument and accept a byte-size
4535 suffix. Initialize.
4536 (-Wvla-larger-than): Same.
4537 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
4538 (-Wno-vla-larger-than): Same.
4539
9b452033
JJ
45402018-07-12 Jakub Jelinek <jakub@redhat.com>
4541
4542 * c-attribs.c (c_common_attribute_table): Add
4543 "omp declare target implicit" attribute.
4544
cd0762f3
RB
45452018-07-12 Richard Biener <rguenther@suse.de>
4546
4547 PR c/86453
4548 * c-attribs.c (handle_packed_attribute): Do not build a variant
4549 type with TYPE_PACKED, instead ignore the attribute if we may
4550 not apply to the original type.
4551
0b27c3ed
JJ
45522018-07-10 Jakub Jelinek <jakub@redhat.com>
4553
4554 PR c++/86443
4555 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
4556 to contain TREE_LIST for both the original class iterator and the
4557 "last" helper var.
4558
e730a0ef
EB
45592018-07-07 Eric Botcazou <ebotcazou@adacore.com>
4560
4561 * c-ada-spec.c (to_ada_name): Remove index parameter.
4562 (pp_ada_tree_identifier): Likewise.
4563 (dump_ada_macros): Adjust call to to_ada_name.
4564 (struct overloaded_name_hash): Delete.
4565 (struct overloaded_name_hasher): Likewise.
4566 (overloaded_names): Likewise.
4567 (compute_overloading_index): Likewise.
4568 (dump_ada_decl_name): Do not call compute_overloading_index and
4569 adjust calls to pp_ada_tree_identifier.
4570 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
4571 (dump_ada_import): Add spc parameter and switch to aspect syntax.
4572 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
4573 (dump_ada_enum_type): Remove type and display_convention parameters.
4574 Adjust calls to pp_ada_tree_identifier.
4575 (dump_ada_node): Likewise and for dump_ada_structure.
4576 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
4577 and tidy up.
4578 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
4579 syntax.
4580 (print_constructor): Adjust call to pp_ada_tree_identifier.
4581 (print_destructor): Likewise.
4582 (dump_ada_declaration): Switch to aspect syntax.
4583 (dump_ada_structure): Likewise and tidy up. Replace display_convention
4584 parameter with nested parameter.
4585 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
4586 (dump_ada_specs): Do not delete overloaded_names table.
4587
8de583fc
PB
45882018-07-06 Peter Bergner <bergner@linux.ibm.com>
4589
4590 PR target/86324
e730a0ef 4591 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
4592 target hook.
4593
09cff37b
NS
45942018-07-05 Nathan Sidwell <nathan@acm.org>
4595
4596 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
4597 NO_IMPLICIT_EXTERN_C.
4598
98086b2b
ML
45992018-06-28 Martin Liska <mliska@suse.cz>
4600
4601 * cppspec.c: Include opt-suggestions.h.
4602
ab20d992
JJ
46032018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4604 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
4605 Cesar Philippidis <cesar@codesourcery.com>
4606
4607 * c-pragma.h (enum pragma_omp_clause): Add
4608 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
4609 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
4610
f41b7612
JJ
46112018-06-20 Jakub Jelinek <jakub@redhat.com>
4612
4613 PR c++/86210
4614 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
4615 comment.
4616
4252ccd7
MS
46172018-06-18 Martin Sebor <msebor@redhat.com>
4618
4619 PR middle-end/85602
4620 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
4621 nonstring.
4622
e197e64e
KV
46232018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4624
4625 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
4626
34a7a230
JM
46272018-06-13 Jason Merrill <jason@redhat.com>
4628
5cef3733
JM
4629 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
4630 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
4631 handling.
4632
34a7a230
JM
4633 PR c++/86094 - wrong code with defaulted move ctor.
4634 * c-opts.c (c_common_post_options): Bump the current ABI version to
4635 13. Set warn_abi_version and flag_abi_compat_version to the current
4636 version rather than 0. Fix defaulting flag_abi_compat_version from
4637 warn_abi_version.
4638
bb0f14ae
MS
46392018-06-12 Martin Sebor <msebor@redhat.com>
4640
4641 PR c/85931
4642 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
4643 sizeof source and destination yields the same value.
4644
3713f2e2
ML
46452018-06-12 Martin Liska <mliska@suse.cz>
4646
4647 * c.opt: Make MPX-related options as Deprecated.
4648
4af78ef8
DM
46492018-06-08 David Malcolm <dmalcolm@redhat.com>
4650
4651 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
4652 rather than 0.
4653
31db0fe0
ML
46542018-06-08 Martin Liska <mliska@suse.cz>
4655
4656 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
4657 for MPX (macros, related functions, fields in cgraph_node, ...).
4658 (handle_bnd_legacy): Likewise.
4659 (handle_bnd_instrument): Likewise.
4660 * c.opt: Likewise.
4661
fe16acf2
JJ
46622018-06-06 Jakub Jelinek <jakub@redhat.com>
4663
4664 PR c++/86068
4665 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
4666 __cpp_transactional_memory to 201500 instead of 210500.
4667
4dbdb49b
JM
46682018-06-06 Jason Merrill <jason@redhat.com>
4669
4670 PR c++/85710 - ICE with -Wmemset-elt-size.
4671 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
4672
f8ad043f
JM
46732018-06-01 Jason Merrill <jason@redhat.com>
4674
4675 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
4676 201703.
4677
abc24d93
EB
46782018-06-01 Eric Botcazou <ebotcazou@adacore.com>
4679
4680 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
4681 declaration for a typedef independently of whether the declaration of
4682 the subtype is generated.
4683
d258f4aa
MS
46842018-05-31 Martin Sebor <msebor@redhat.com>
4685
4686 PR c/82063
4687 * c.opt (-Wno-alloc-size-larger-than): New option.
4688
b67b9225
DP
46892018-04-22 David Pagan <dave.pagan@oracle.com>
4690
4691 PR c/55976
4692 * c-opts.c (c_common_post_options): Set default for warn_return_type
ab20d992 4693 for C++/C++ with ObjC extensions only. For C, makes it possible to
b67b9225
DP
4694 differentiate between default (no option), -Wreturn-type, and
4695 -Wno-return-type.
4696
04eb9c55
JM
46972018-05-29 Jason Merrill <jason@redhat.com>
4698
4699 * c.opt (Winit-list-lifetime): New flag.
4700
b0c31bc6
BE
47012018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
4702
4703 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
4704 splay_tree_delete_pointers.
4705
44284983
JJ
47062018-05-26 Jakub Jelinek <jakub@redhat.com>
4707
4708 PR bootstrap/85921
4709 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
4710 noinline variable to workaround broken kernel headers.
4711
b46b715d
JM
47122018-05-18 Jason Merrill <jason@redhat.com>
4713
4714 * c.opt (Wdeprecated-copy): New flag.
4715
40659769
ML
47162018-05-17 Martin Liska <mliska@suse.cz>
4717
4718 * c-warn.c (overflow_warning): Do not use
4719 space in between 'G_' and '('.
4720
403962ea
JM
47212018-05-09 Jason Merrill <jason@redhat.com>
4722
4723 * c-common.c (valid_array_size_p): Add complain parameter.
4724 * c-common.h: ...which defaults to true.
4725
1c9ee609
JJ
47262018-05-11 Jakub Jelinek <jakub@redhat.com>
4727
4728 PR c/85696
4729 * c-omp.c (c_omp_predetermined_sharing): Return
4730 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
4731
19916065
ML
47322018-05-11 Martin Liska <mliska@suse.cz>
4733
92a285c1 4734 PR sanitizer/85556
19916065
ML
4735 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
4736 TREE_LIST values.
4737
79e7b1fe
JJ
47382018-05-10 Jakub Jelinek <jakub@redhat.com>
4739
4740 PR c++/85662
4741 * c-common.h (fold_offsetof_1): Removed.
4742 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
4743 CTX argument defaulted to ERROR_MARK.
4744 * c-common.c (fold_offsetof_1): Renamed to ...
4745 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
4746 argument, convert the pointer constant to TYPE and use size_binop
4747 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
4748 a pointer type. Adjust recursive calls.
4749
86c12f76
EB
47502018-05-10 Eric Botcazou <ebotcazou@adacore.com>
4751
4752 PR c++/85400
4753 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
4754
ee336e84
NS
47552018-05-07 Nathan Sidwell <nathan@acm.org>
4756
4757 * c.opt (ffor-scope): Remove functionality, issue warning.
4758
6c072e21
NS
47592018-05-03 Nathan Sidwell <nathan@acm.org>
4760
4761 * c.opt (ffriend-injection): Remove functionality, issue warning.
4762
2cc7d3a7
DM
47632018-05-01 David Malcolm <dmalcolm@redhat.com>
4764
4765 PR c/84258
4766 * c-format.c (struct format_check_results): Add field
4767 "number_non_char".
4768 (check_format_info): Initialize it, and warn if encountered.
4769 (check_format_arg): Distinguish between wide char and
4770 everything else when detecting arrays of non-char.
4771
7761dfbe
DM
47722018-04-30 David Malcolm <dmalcolm@redhat.com>
4773
4774 * c-format.c (get_corrected_substring): Update for
4775 location_get_source_line returning a char_span. Use a char_span
4776 when handling the prefix of the correction.
4777 * c-indentation.c (get_visual_column): Update for
4778 location_get_source_line returning a char_span.
4779 (get_first_nws_vis_column): Likewise.
4780
62e98ef1
DM
47812018-03-29 David Malcolm <dmalcolm@redhat.com>
4782
4783 PR c++/84269
4784 * known-headers.cc (get_stdlib_header_for_name): Add various names
4785 from <assert.h>, <string.h>, and <memory.h>; add more names from
4786 <stdio.h>.
4787
a7dea617
JJ
47882018-03-27 Jakub Jelinek <jakub@redhat.com>
4789
4790 PR c++/85061
4791 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
4792 get_base_address of the second operand is a VAR_P, rather than the
4793 operand itself, and use gcc_checking_assert instead of gcc_assert.
4794
889a3a30
MP
47952018-03-23 Marek Polacek <polacek@redhat.com>
4796
4797 PR c++/85045
4798 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
4799 <case RDIV_EXPR>: Tweak condition.
4800
452154b9
EB
48012018-03-20 Eric Botcazou <ebotcazou@adacore.com>
4802
4803 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
4804
63ecb626
JJ
48052018-03-16 Jakub Jelinek <jakub@redhat.com>
4806
ce811fc4
JJ
4807 PR c/84909
4808 * c-warn.c (conversion_warning): Replace "to to" with "to" in
4809 diagnostics.
4810
63ecb626
JJ
4811 PR c/84910
4812 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
4813 diagnostics.
4814
a1295eec
RB
48152018-03-16 Richard Biener <rguenther@suse.de>
4816
4817 PR c/84873
4818 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
4819 unshare the possibly folded expression.
4820
919674fb
RB
48212018-03-15 Richard Biener <rguenther@suse.de>
4822
4823 PR c/84873
4824 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
4825
f99309b2
MS
48262018-03-13 Martin Sebor <msebor@redhat.com>
4827
4828 PR tree-optimization/84725
4829 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
4830 with all three narrow character types, including their qualified forms.
4831
e9b9fa4c
MS
48322018-03-12 Martin Sebor <msebor@redhat.com>
4833
4834 PR tree-optimization/83456
ab20d992 4835 * c-common.c (check_function_restrict): Return bool.
e9b9fa4c
MS
4836 Restore checking of bounded built-in functions.
4837 (check_function_arguments): Also return the result
4838 of warn_for_restrict.
ab20d992
JJ
4839 * c-common.c (check_function_restrict): Return bool.
4840 * c-warn.c (warn_for_restrict): Return bool.
e9b9fa4c 4841
0805d020
MP
48422018-03-02 Marek Polacek <polacek@redhat.com>
4843
4844 PR c++/84171
4845 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
4846 is erroneous.
4847
ed2a2f08
TS
48482018-03-02 Thomas Schwinge <thomas@codesourcery.com>
4849
4850 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
4851 function".
4852
90abdde0
MP
48532018-03-01 Marek Polacek <polacek@redhat.com>
4854
4855 PR c++/84639
4856 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
4857 alignment in computation.
4858
c6db43fa
EB
48592018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4860
4861 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
4862 <REAL_TYPE>: Deal specifically with _Float128/__float128.
4863
9e25c7ed
EB
48642018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4865
4866 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
4867 (is_char_array): Take a type instead of a declaration.
4868 (dump_ada_array_type): Likewise.
4869 (is_simple_enum): Minor tweak.
4870 (dump_ada_enum_type): New function extracted from...
4871 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
4872 <INTEGER_TYPE>: Remove unreachable code.
4873 <RECORD_TYPE>: Likewise. Minor tweaks.
4874 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
4875 <ENUMERAL_TYPE>: New case.
4876 <RECORD_TYPE>: Factor out common code.
4877 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
4878 Minor tweaks. Deal with enumeral types.
4879 (dump_ada_structure): Minor tweaks.
4880
09de3550
EB
48812018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4882
4883 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
4884 address for incomplete structures.
4885 (dump_forward_type): Do not bail out for incomplete structures.
4886 (dump_ada_declaration): Do not special-case incomplete structures
4887 for subtypes. Dump them as null records for types.
4888
095d8d4b
EB
48892018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4890
4891 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
4892 (is_char_array): Fix formatting.
4893 (dump_template_types): Likewise.
4894 (dump_generic_ada_node): Rename into...
4895 (dump_ada_node): ...this.
4896 <POINTER_TYPE>: Remove superfluous space. Use generic address for
4897 incomplete structures and not for empty structures. Do not use it
4898 when forward declarations are needed.
4899 (dump_forward_type): New function.
4900 (dump_nested_types): Remove FORWARD parameter. Do not consider
4901 TREE_VISITED and do not generate a forward declaration. Only dump
4902 original nested types for nested declaration.
4903 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
4904 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
4905 <RECORD_TYPE>: Do not consider TREE_VISITED.
4906 (dump_ada_declaration): Use booleans and fix formatting throughout.
4907 <TYPE_DECL>: Skip incomplete structures and not empty structures.
4908 Call dump_forward_type instead of dump_nested_types for a typedef.
4909 Remove superfluous check and adjust call to dump_nested_types.
4910 <POINTER_TYPE>: Call dump_forward_type and fall through.
4911 (dump_ada_struct_decl): Rename into...
4912 (dump_ada_structure): ...this. Do not special-case empty structures.
4913
d4cfd486
MS
49142018-02-27 Martin Sebor <msebor@redhat.com>
4915
4916 PR c++/83871
4917 * c.opt (-Wmissing-attributes): New option.
4918
b22dbd03
ML
49192018-02-21 Martin Liska <mliska@suse.cz>
4920
4921 * c.opt (Wcatch-value=): Add IntegerRange.
4922
883dfe2a
JM
49232018-02-15 Jason Merrill <jason@redhat.com>
4924
4925 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
4926
0444aa9c
NS
49272018-02-09 Nathan Sidwell <nathan@acm.org>
4928
4929 PR c/84293
4930 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
4931 arg.
4932 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
4933 arg. Adjust.
4934
cea71f0a
MS
49352018-02-09 Martin Sebor <msebor@redhat.com>
4936
4937 PR lto/84212
4938 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
4939 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
4940 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
4941 (-Wstrict-overflow, -Wsuggest-attribute): Same.
4942 (-Wuninitialized): Same.
4943
8c8b7be5
EB
49442018-02-09 Eric Botcazou <ebotcazou@adacore.com>
4945
4946 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
4947 keyword for components.
4948
7c30b12a
PC
49492018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
4950
4951 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
4952
eece7fe5
JK
49532018-02-02 Julia Koval <julia.koval@intel.com>
4954
4955 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
4956
7d07a93a
MP
49572018-01-29 Marek Polacek <polacek@redhat.com>
4958
4959 PR c/83966
4960 * c-format.c (check_function_format): Check current_function_decl.
4961
53723269
JJ
49622018-01-27 Jakub Jelinek <jakub@redhat.com>
4963
4964 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
4965 argument.
4966 (LAZY_HEX_FP_VALUES_CNT): Define.
4967 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
4968 values rather than just 12.
4969 (builtin_define_with_hex_fp_value): Likewise.
4970
7365279f
BK
49712018-01-18 Boris Kolpackov <boris@codesynthesis.com>
4972
92a285c1
ML
4973 PR other/70268
4974 * c.opt (-fmacro-prefix-map): New option.
4975 * c-opts.c (c_common_handle_option): Handle it.
4976 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
4977 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 4978
bb9869d5
DM
49792018-01-17 David Malcolm <dmalcolm@redhat.com>
4980
4981 PR c++/83814
4982 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
4983
68dc87c3
EB
49842018-01-10 Eric Botcazou <ebotcazou@adacore.com>
4985
4986 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
4987 Skip 'f' and 'F' characters if it is true.
4988 (store_ada_macro): Minor tweak.
4989 (dump_ada_macros) <CPP_COMMENT>: Likewise.
4990 <CPP_WSTRING>: Likewise.
4991 <CPP_STRING>: Output '&' in the buffer if not the first string.
4992 <CPP_NUMBER>: Adjust calls to dump_number.
4993
9a004410
DM
49942018-01-10 David Malcolm <dmalcolm@redhat.com>
4995
4996 PR c++/43486
4997 * c-common.c: Include "selftest.h".
4998 (get_atomic_generic_size): Perform the test for integral type
4999 before the range test for any integer constant, fixing indentation
5000 of braces. Call fold_for_warn before testing for an INTEGER_CST.
5001 (reject_gcc_builtin): Strip any location wrapper from EXPR.
5002 (selftest::test_fold_for_warn): New function.
5003 (selftest::c_common_c_tests): New function.
5004 (selftest::c_family_tests): Call it, and
5005 selftest::c_pretty_print_c_tests.
5006 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
5007 * c-format.c (check_format_arg): Convert VAR_P check to a
5008 fold_for_warn.
5009 * c-pretty-print.c: Include "selftest.h".
5010 (pp_c_cast_expression): Don't print casts for location wrappers.
5011 (selftest::assert_c_pretty_printer_output): New function.
5012 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
5013 (selftest::test_location_wrappers): New function.
5014 (selftest::c_pretty_print_c_tests): New function.
5015 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
5016
5c0caeb3
RS
50172018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5018 Alan Hayward <alan.hayward@arm.com>
5019 David Sherwood <david.sherwood@arm.com>
5020
5021 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
5022
73a699ae
RS
50232018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5024 Alan Hayward <alan.hayward@arm.com>
5025 David Sherwood <david.sherwood@arm.com>
5026
5027 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
5028 as polynomial.
5029
928686b1
RS
50302018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5031 Alan Hayward <alan.hayward@arm.com>
5032 David Sherwood <david.sherwood@arm.com>
5033
5034 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
5035 (convert_vector_to_array_for_subscript): Handle polynomial
5036 TYPE_VECTOR_SUBPARTS.
5037 (c_common_type_for_mode): Check valid_vector_subparts_p.
5038 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
5039 VECTOR_CST_NELTS.
5040
85ec4feb
JJ
50412018-01-03 Jakub Jelinek <jakub@redhat.com>
5042
5043 Update copyright years.
5044
170a8bd6 50452017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 5046 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
5047
5048 * c-pragma.c (init_pragma): Register pragma GCC unroll.
5049 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
5050
ab20d992 50512017-12-22 Alexandre Oliva <aoliva@redhat.com>
18408e96
AO
5052
5053 PR debug/83527
5054 PR debug/83419
5055 * c-semantics.c (only_debug_stmts_after_p): New.
5056 (pop_stmt_list): Clear side effects in debug-only stmt list.
5057 Check for single nondebug stmt followed by debug stmts only.
5058
c12d20d4
AO
50592017-12-21 Alexandre Oliva <aoliva@redhat.com>
5060
5061 PR debug/83419
5062 * c-semantics.c (pop_stmt_list): Propagate side effects from
5063 single nondebug stmt to container list.
5064
01512446
JJ
50652017-12-19 Jakub Jelinek <jakub@redhat.com>
5066
5067 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
5068 conditions with typical order conditions.
5069
82cfbd01
MP
50702017-12-18 Marek Polacek <polacek@redhat.com>
5071
5072 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
5073 not in effect.
5074
99da11ec
MS
50752017-12-17 Martin Sebor <msebor@redhat.com>
5076
5077 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
5078 an error for attribute warn_if_not_aligned.
5079
cc8bea0a
MS
50802017-12-16 Martin Sebor <msebor@redhat.com>
5081
5082 PR tree-optimization/78918
5083 * c-common.c (check_function_restrict): Avoid checking built-ins.
5084 * c.opt (-Wrestrict): Include in -Wall.
5085
4849deb1
JJ
50862017-12-15 Jakub Jelinek <jakub@redhat.com>
5087
5088 * c-attribs.c (c_common_attribute_table,
5089 c_common_format_attribute_table): Swap affects_type_identity
5090 and handler fields, adjust comments.
5091
c65e18d3
BE
50922017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
5093
5094 * c.opt (Wcast-function-type): New warning option.
5095 * c-lex.c (get_fileinfo): Avoid warning.
5096 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
5097
2004617a
QZ
50982017-12-14 Qing Zhao <qing.zhao@oracle.com>
5099
7365279f 5100 PR middle_end/79538
2004617a
QZ
5101 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
5102 Adjust the size of buf1 and buf2, add a new buf to avoid
5103 format-overflow warning.
5104
ab20d992 51052017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
5106
5107 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
5108 subsequent statement list.
5109
5d9ae53d
MS
51102017-12-07 Martin Sebor <msebor@redhat.com>
5111
5112 PR c/81544
5113 PR c/81566
5114 * c-attribs.c (attr_aligned_exclusions): New array.
5115 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
5116 (attr_common_exclusions, attr_const_pure_exclusions): Same.
5117 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
5118 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
5119 (attr_warn_unused_result_exclusions): Same.
5120 (handle_hot_attribute, handle_cold_attribute): Simplify.
5121 (handle_const_attribute): Warn on function returning void.
5122 (handle_pure_attribute): Same.
5123 (handle_aligned_attribute): Diagnose conflicting attribute
5124 specifications.
5125 * c-warn.c (diagnose_mismatched_attributes): Simplify.
5126
c79144f8
DM
51272017-12-06 David Malcolm <dmalcolm@redhat.com>
5128
5129 PR c/83236
5130 * c-common.c (selftest::c_family_tests): Call
5131 selftest::c_spellcheck_cc_tests.
5132 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
5133 * c-spellcheck.cc: Include "selftest.h".
5134 (name_reserved_for_implementation_p): New function.
5135 (should_suggest_as_macro_p): New function.
5136 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
5137 should_suggest_as_macro_p and call it.
5138 (selftest::test_name_reserved_for_implementation_p): New function.
5139 (selftest::c_spellcheck_cc_tests): New function.
5140 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
5141
613bc14f
DM
51422017-12-06 David Malcolm <dmalcolm@redhat.com>
5143
5144 * c-spellcheck.cc: New file, taken from macro-handling code in
5145 spellcheck-tree.c.
5146 * c-spellcheck.h: New file, taken from macro-handling code in
5147 spellcheck-tree.h.
5148
e76c7157
JJ
51492017-12-01 Jakub Jelinek <jakub@redhat.com>
5150
5151 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
5152 attribute.
5153 (handle_simd_attribute): Don't check for "cilk simd function"
5154 attribute. Reindent, formatting changes.
5155
b0da4034
JK
51562017-11-30 Julia Koval <julia.koval@intel.com>
5157
5158 * c-common.h (inv_list): Remove.
5159
058f0b9e
JJ
51602017-11-28 Jakub Jelinek <jakub@redhat.com>
5161
5162 PR sanitizer/81275
5163 * c-common.c (c_switch_covers_all_cases_p_1,
5164 c_switch_covers_all_cases_p): New functions.
5165 * c-common.h (c_switch_covers_all_cases_p): Declare.
5166
5e9d6aa4 51672017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 5168 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
5169
5170 * array-notation-common.c: Delete.
5171 * c-cilkplus.c: Ditto.
5172 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
5173 * c-common.def (ARRAY_NOTATION_REF): Remove.
5174 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
5175 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
5176 c_validate_cilk_plus_loop, cilkplus_an_parts,
5177 cilk_ignorable_spawn_rhs_op,
5178 cilk_recognize_spawn): Remove.
5179 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
5180 * c-omp.c: Remove CILK_SIMD check.
5181 * c-pragma.c: Ditto.
5182 * c-pragma.h: Remove CILK related pragmas.
5183 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
5184 ARRAY_NOTATION_REF condition.
5185 (c_pretty_printer::expression): Ditto.
5186 * c.opt (fcilkplus): Remove.
5187 * cilk.c: Delete.
5188
1af4ebf5
MG
51892017-11-21 Marc Glisse <marc.glisse@inria.fr>
5190
5191 * c-pretty-print.c (pp_c_additive_expression,
5192 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
5193
d44ed508
JJ
51942017-11-21 Jakub Jelinek <jakub@redhat.com>
5195
7d2f0f9b
JJ
5196 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
5197
d44ed508
JJ
5198 PR c++/83059
5199 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
5200 instead of tree_to_uhwi, formatting fix.
5201
26edace6
DM
52022017-11-20 David Malcolm <dmalcolm@redhat.com>
5203
5204 PR c/81404
5205 * known-headers.cc: New file, based on material from c/c-decl.c.
5206 (suggest_missing_header): Copied as-is.
5207 (get_stdlib_header_for_name): New, based on get_c_name_hint but
5208 heavily edited to add C++ support. Add some knowledge about
5209 <limits.h>, <stdint.h>, and <wchar.h>.
5210 * known-headers.h: Likewise.
5211
6c7a259b
DM
52122017-11-20 David Malcolm <dmalcolm@redhat.com>
5213
5214 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
5215 (lookup_name_fuzzy): Likewise. Convert return type from
5216 const char * to name_hint. Add location_t param.
5217 * name-hint.h: New header.
5218
f9c59f7e
JJ
52192017-11-19 Jakub Jelinek <jakub@redhat.com>
5220
5221 PR c/66618
5222 PR c/69960
5223 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
5224
1e39313a
JM
52252017-11-16 Joseph Myers <joseph@codesourcery.com>
5226
5227 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
5228 expected publication date of C17.
5229 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
5230
3ca0dc60
JM
52312017-11-15 Joseph Myers <joseph@codesourcery.com>
5232
5233 PR c/81156
5234 * c-common.c (c_common_reswords): Add __builtin_tgmath.
5235 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
5236
025d57f0
MS
52372017-11-10 Martin Sebor <msebor@redhat.com>
5238
5239 PR c/81117
5240 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
5241 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
5242 * c.opt (-Wstringop-truncation): New option.
5243
1b6fa695
ML
52442017-11-06 Martin Liska <mliska@suse.cz>
5245
5246 PR middle-end/82404
5247 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
5248 FE.
5249 * c.opt: Set default value of warn_return_type.
5250
64a5912c
DM
52512017-10-31 David Malcolm <dmalcolm@redhat.com>
5252
5253 * c-common.c (binary_op_error): Update for renaming of
5254 error_at_rich_loc.
5255 (c_parse_error): Likewise.
5256 * c-warn.c (warn_logical_not_parentheses): Likewise for
5257 renaming of inform_at_rich_loc.
5258 (warn_for_restrict): Likewise for renaming of
5259 warning_at_rich_loc_n.
5260
c76dc9c3
JM
52612017-10-30 Joseph Myers <joseph@codesourcery.com>
5262
5263 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
5264 * c-opts.c (set_std_c17): New function.
5265 (c_common_init_options): Use gnu17 as default C version.
5266 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
5267
ee5fd23a
MM
52682017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
5269
5270 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
5271 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
5272 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
5273 __FP_FAST_FMA<N>X.
5274
d1047465
MP
52752017-10-23 Marek Polacek <polacek@redhat.com>
5276
5277 PR c/82681
5278 * c-warn.c (warnings_for_convert_and_check): Fix typos.
5279
9e878cf1
EB
52802017-10-19 Eric Botcazou <ebotcazou@adacore.com>
5281
5282 * c-common.c (check_builtin_function_arguments): Also check arguments
5283 of __builtin_alloca_with_align_and_max.
5284
89b6abbb
DM
52852017-10-17 David Malcolm <dmalcolm@redhat.com>
5286
5287 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
5288 rather than NULL to format_warning_va.
5289 (check_format_types): Likewise when calling format_type_warning.
5290 Remove code to extract source_ranges and source_range * in favor
5291 of just a location_t.
5292 (format_type_warning): Convert source_range * param to a
5293 location_t.
5294
39382c09
JJ
52952017-10-13 Jakub Jelinek <jakub@redhat.com>
5296
5297 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
5298 [LR]SHIFT_EXPR.
5299
62e1c678
DM
53002017-10-12 David Malcolm <dmalcolm@redhat.com>
5301
5302 * c-common.c (enum missing_token_insertion_kind): New enum.
5303 (get_missing_token_insertion_kind): New function.
5304 (maybe_suggest_missing_token_insertion): New function.
5305 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
5306
b90c9338
NS
53072017-10-11 Nathan Sidwell <nathan@acm.org>
5308
5309 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
5310 (c_common_handle_option): Update incpath_kind names.
5311
3a266bcd
ML
53122017-10-11 Martin Liska <mliska@suse.cz>
5313
5314 PR sanitizer/82490
5315 * c-attribs.c (handle_no_sanitize_attribute): Report directly
5316 Wattributes warning.
5317
8e6cdc90
RS
53182017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
5319
5320 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
5321 operating on trees as wide_ints.
5322 * c-common.c (pointer_int_sum): Likewise.
5323 * c-pretty-print.c (pp_c_integer_constant): Likewise.
5324 * c-warn.c (match_case_to_enum_1): Likewise.
5325 (c_do_switch_warnings): Likewise.
5326 (maybe_warn_shift_overflow): Likewise.
5327
802b38c9
JJ
53282017-10-10 Jakub Jelinek <jakub@redhat.com>
5329
5330 PR c/82437
5331 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
5332 instead of wide_int::from.
5333
4e34b338
JJ
53342017-10-06 Jakub Jelinek <jakub@redhat.com>
5335
5336 PR c/82437
5337 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
5338 using to_widest use wide_int with the larger of the two precisions.
5339
4bc4b2b4
BE
53402017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
5341
5342 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
5343 functions.
5344
a1488398
RS
53452017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
5346
5347 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
5348 when combining the original unconverted comparison operands.
5349
01c9fb68
JJ
53502017-09-29 Jakub Jelinek <jakub@redhat.com>
5351
5352 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
5353 attribute.
5354
6e3e8419
EB
53552017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5356
5357 * c-ada-spec.c (to_ada_name): Add index parameter.
5358 (pp_ada_tree_identifier): Likewise.
5359 (dump_ada_macros): Adjust call to to_ada_name.
5360 (struct overloaded_name_hash): New type.
5361 (struct overloaded_name_hasher): Likewise.
5362 (overloaded_names): New hash table.
5363 (compute_overloading_index): New function.
5364 (dump_ada_decl_name): Call it and pass the result to
5365 pp_ada_tree_identifier.
5366 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
5367 (dump_ada_function_declaration): Likewise.
5368 (dump_generic_ada_node): Likewise.
5369 (print_constructor): Likewise.
5370 (print_destructor): Likewise.
5371 (dump_ada_specs): Delete overloaded_names table.
5372
79310774
EB
53732017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5374
5375 * c-ada-spec.c (max_ada_macros): Move around.
5376 (store_ada_macro_index): Likewise.
5377 (source_file): Rename into...
5378 (macro_source_file): ...this.
5379 (count_ada_macro): Move around.
5380 (store_ada_macro): Likewise.
5381 (compare_macro): Likewise.
5382 (print_ada_macros): Merge in...
5383 (dump_ada_macros): ...this.
5384 (source_file_base): Rename into...
5385 (current_source_file): ...this.
5386 (print_comment): Move around.
5387 (dump_ada_nodes): Call dump_ada_declaration directly.
5388 (struct with): Change type of limited field to bool.
5389 (append_withs): Change type of limited_access parameter to bool.
5390 (pp_ada_tree_identifie): Likewise.
5391 (dump_ada_decl_nam): Likewise.
5392 (dump_generic_ada_node): Likewise. Do not print the return type.
5393 (to_ada_name): Change type of space_found parameter to bool.
5394 (dump_ada_function_declaration): Return void and change type of
5395 parameters to bool. Also print the return type for a function.
5396 (print_ada_methods): Rename into...
5397 (dump_ada_methods): ...this.
5398 (print_ada_declaration): Rename into ...
5399 (dump_ada_declaration): ...this. Do not print the return type.
5400 (print_ada_struct_decl): Rename into...
5401 (dump_ada_struct_decl): ...this.
5402
7d386d45
JJ
54032017-09-29 Jakub Jelinek <jakub@redhat.com>
5404
5405 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
5406 rather than DECL_INITIAL.
5407 (common_handle_aligned_attribute): Likewise.
5408
ab20d992 54092017-09-20 Alexandre Oliva <aoliva@redhat.com>
9ed32e27
AO
5410
5411 * c.opt (gen-decls): Add RejectNegative.
5412
026a79f7
AS
54132017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
5414 Jakub Jelinek <jakub@redhat.com>
5415
5416 Add support for -std=c++2a.
5417 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
5418 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
5419 * c-opts.c (set_std_cxx2a): New.
5420 (c_common_handle_option): Set options when -std=c++2a is enabled.
5421 (c_common_post_options): Adjust comments.
5422 (set_std_cxx14, set_std_cxx17): Likewise.
5423
4a8ca690
EB
54242017-09-15 Eric Botcazou <ebotcazou@adacore.com>
5425
5426 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
5427 message for non-uniform endianness and issue a warning in C++.
5428
7b936140
JJ
54292017-09-15 Jakub Jelinek <jakub@redhat.com>
5430
5431 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
5432 (Wc++17-compat): Change from undocumented alias to option.
5433 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
5434 change C++1z to C++17 in description.
5435 (std=c++1z, std=gnu++1z): Change from option to undocumented
5436 deprecated alias.
5437 (std=c++17, std=gnu++17): Change from undocumented alias to option.
5438 Adjust description.
5439 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
5440 * c-opts.c (set_std_cxx1z): Rename to ...
5441 (set_std_cxx17): ... this.
5442 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
5443 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 5444 caller.
7b936140
JJ
5445 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
5446 comments.
5447
12263f13
L
54482017-09-12 H.J. Lu <hongjiu.lu@intel.com>
5449
5450 * c-attribs.c (common_handle_aligned_attribute): Don't warn
5451 function alignment if warn_if_not_aligned_p is true.
5452
6836632e
NS
54532017-09-12 Nathan Sidwell <nathan@acm.org>
5454
5455 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
5456 resort_sorted_fields): Move to c/c-decl.c.
5457 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
5458 (struct sorted_fields_type): Move to c/c-lang.h.
5459
019bf9ad
JW
54602017-09-09 Jonathan Wakely <jwakely@redhat.com>
5461
5462 PR c++/81852
5463 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
5464
bc7fe952
MP
54652017-09-04 Marek Polacek <polacek@redhat.com>
5466
5467 PR c/81783
5468 * c-warn.c (warn_tautological_bitwise_comparison): New function.
5469 (warn_tautological_cmp): Call it.
5470
ab20d992 54712017-09-01 Boris Kolpackov <boris@codesynthesis.com>
de7c2c6a
BK
5472
5473 * c-opts.c (c_common_finish): Write dependency information even if
5474 there are errors.
5475
d2e05fcb
JJ
54762017-09-01 Jakub Jelinek <jakub@redhat.com>
5477
5478 PR c/81887
5479 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
5480 (omp_pragmas_simd): ... here.
5481 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
5482 create new clauses list containing just simd clause.
5483
18e2a8b8
RS
54842017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5485 Alan Hayward <alan.hayward@arm.com>
5486 David Sherwood <david.sherwood@arm.com>
5487
5488 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
5489 into scalar_mode_supported_p call.
5490 (handle_mode_attribute): Update call to scalar_mode_supported_p.
5491
16d22000
RS
54922017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5493 Alan Hayward <alan.hayward@arm.com>
5494 David Sherwood <david.sherwood@arm.com>
5495
5496 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
5497 for the mode iterator.
5498
b397965c
RS
54992017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5500 Alan Hayward <alan.hayward@arm.com>
5501 David Sherwood <david.sherwood@arm.com>
5502
5503 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
5504 * c-common.c (c_build_vec_perm_expr): Likewise.
5505
357b7604
RS
55062017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5507 Alan Hayward <alan.hayward@arm.com>
5508 David Sherwood <david.sherwood@arm.com>
5509
5510 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
5511
e05c94ba
RS
55122017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5513 Alan Hayward <alan.hayward@arm.com>
5514 David Sherwood <david.sherwood@arm.com>
5515
5516 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
5517 before calling targetm.addr_space.valid_pointer_mode.
5518
5c20c4af
RS
55192017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5520 Alan Hayward <alan.hayward@arm.com>
5521 David Sherwood <david.sherwood@arm.com>
5522
5523 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
5524
c94843d2 55252017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
5526 Alan Hayward <alan.hayward@arm.com>
5527 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
5528
5529 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
5530 iterators.
5531 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
5532
4e10a5a7
RS
55332017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5534 Alan Hayward <alan.hayward@arm.com>
5535 David Sherwood <david.sherwood@arm.com>
5536
5537 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
5538 case statements.
5539
130fcab0
ML
55402017-08-29 Martin Liska <mliska@suse.cz>
5541
5542 PR other/39851
5543 * c-common.c (parse_optimize_options): Add argument to function
5544 call.
5545 * c-pragma.c (handle_pragma_diagnostic): Likewise.
5546
14e18d71
DM
55472017-08-24 David Malcolm <dmalcolm@redhat.com>
5548
5549 * c-lex.c (interpret_float): Use token location
5550 when building an EXCESS_PRECISION_EXPR.
5551
2f687306
DM
55522017-08-21 David Malcolm <dmalcolm@redhat.com>
5553
5554 * c-common.c (check_function_arguments): Add "arglogs" param; pass
5555 it to check_function_format.
5556 * c-common.h (check_function_arguments): Add vec<location_t> *
5557 param.
5558 (check_function_format): Likewise.
5559 * c-format.c (struct format_check_context): Add field "arglocs".
5560 (check_function_format): Add param "arglocs"; pass it to
5561 check_format_info.
ab20d992 5562 (check_format_info): Add param "arglocs"; use it to initialize
2f687306
DM
5563 new field of format_ctx.
5564 (check_format_arg): Pass format_ctx->arglocs to new param of
5565 check_format_info_main.
5566 (class argument_parser): New field "arglocs".
5567 (argument_parser::argument_parser): Add "arglocs_" param and use
5568 it to initialize new field.
5569 (argument_parser::check_argument_type): Pass new arglocs field to
5570 check_format_types.
5571 (check_format_info_main): Add param "arglocs", and use it when
5572 constructing arg_parser.
5573 (check_format_types): Add param "arglocs"; use it if non-NULL when
5574 !EXPR_HAS_LOCATION (cur_param) to get at location information.
5575
00aa1fa2
L
55762017-08-18 H.J. Lu <hongjiu.lu@intel.com>
5577
5578 PR c/53037
5579 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
5580 (c_common_attribute_table): Add warn_if_not_aligned.
5581 (handle_aligned_attribute): Renamed to ...
5582 (common_handle_aligned_attribute): Remove argument, name, and add
5583 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
5584 (handle_aligned_attribute): New.
5585 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
5586
27be025d
MS
55872017-08-14 Martin Sebor <msebor@redhat.com>
5588
5589 PR c/81117
5590 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
5591 (handle_nonstring_attribute): New function.
5592
da67acb9
MS
55932017-08-14 Martin Sebor <msebor@redhat.com>
5594
5595 PR c/81117
5596 * c-format.h (T89_G): New macro.
5597 * c-format.c (local_gcall_ptr_node): New variable.
5598 (init_dynamic_diag_info): Initialize it.
5599
a8b522b4
ML
56002017-08-11 Martin Liska <mliska@suse.cz>
5601
5602 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
5603 TARGET_SUPPORTS_ALIASES.
5604
32129a17
DM
56052017-08-10 David Malcolm <dmalcolm@redhat.com>
5606
5607 * c-common.c (c_parse_error): Add rich_location * param, using it
5608 rather implicitly using input_location.
5609 * c-common.h (c_parse_error): Add rich_location * param.
5610
30af3a2b
MP
56112017-08-09 Marek Polacek <polacek@redhat.com>
5612
5613 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
5614 (c_common_truthvalue_conversion): Likewise.
5615 * c-omp.c (c_finish_omp_atomic): Likewise.
5616 * c-common.h (build_binary_op): Update declaration.
5617
314e6352
ML
56182017-08-08 Martin Liska <mliska@suse.cz>
5619
5620 * c-ada-spec.c: Include header files.
5621 * c-ubsan.c: Likewise.
5622 * c-warn.c: Likewise.
5623
56b5041c
JJ
56242017-08-07 Jakub Jelinek <jakub@redhat.com>
5625
5626 PR c/69389
5627 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
5628
db440138
EB
56292017-08-07 Eric Botcazou <ebotcazou@adacore.com>
5630
5631 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
5632 (print_ada_methods): Likewise.
5633 (print_ada_declaration): Likewise.
5634
577eec56
ML
56352017-08-07 Martin Liska <mliska@suse.cz>
5636
5637 * array-notation-common.c: Add new includes.
5638 * c-format.c( handle_format_attribute): Canonicalize a format
5639 function name.
5640 * c-lex.c (c_common_has_attribute): Canonicalize name of an
5641 attribute.
5642 * c-pretty-print.c: Add new include.
5643
b854df3c
EB
56442017-08-05 Eric Botcazou <ebotcazou@adacore.com>
5645
5646 * c-ada-spec.c (has_static_fields): Look only into variables.
5647 (print_constructor): Add TYPE parameter and use it for the name.
5648 (print_destructor): Likewise.
5649 (print_ada_declaration): Adjust to new constructor/destructor names.
5650 Adjust calls to print_constructor and print_destructor.
5651 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
5652 Look only into variables in the final loop.
5653
9f2cb25e
EB
56542017-08-01 Eric Botcazou <ebotcazou@adacore.com>
5655
5656 * c-ada-spec.c (has_static_fields): Look only into fields.
5657 (dump_generic_ada_node): Small tweak.
5658 (dump_nested_types): Look only into fields.
5659 (print_ada_declaration): Look only into methods. Small tweak.
5660 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
5661
f4bcd9eb
EB
56622017-08-01 Eric Botcazou <ebotcazou@adacore.com>
5663
5664 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
5665 (dump_ada_function_declaration): Likewise.
5666 (dump_generic_ada_node): Likewise.
5667 (print_ada_declaration): Add support for const-qualified variables.
5668
f34ebeb2
ML
56692017-07-31 Martin Liska <mliska@suse.cz>
5670
5671 PR sanitize/81530
5672 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
5673 Guard condition with flag_sanitize_p also with current_function_decl
5674 non-null equality.
5675 (ubsan_maybe_instrument_reference_or_call): Likewise.
5676
218e5d04
UB
56772017-07-30 Uros Bizjak <ubizjak@gmail.com>
5678
5679 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
5680
942047f2
EB
56812017-07-29 Eric Botcazou <ebotcazou@adacore.com>
5682
5683 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
5684 for enumeral types.
5685 (print_ada_declaration): Add missing guard for record types.
5686
a40ff0ae
JJ
56872017-07-27 Jakub Jelinek <jakub@redhat.com>
5688
5689 PR c/45784
5690 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
5691 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
5692 new COMPOUND_EXPRs around the rhs of the comparison.
5693
06bd22f6
MP
56942017-07-27 Marek Polacek <polacek@redhat.com>
5695
5696 PR c/81417
5697 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
5698 the types.
5699
036ea399
JJ
57002017-07-27 Jakub Jelinek <jakub@redhat.com>
5701
5702 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
5703 (handle_noipa_attribute): New function.
5704
417ca011
TD
57052017-07-07 Torsten Duwe <duwe@suse.de>
5706
5707 * c-attribs.c (c_common_attribute_table): Add entry for
5708 "patchable_function_entry".
5709
5aaa8fb4
NS
57102017-07-20 Nathan Sidwell <nathan@acm.org>
5711
5712 Remove TYPE_METHODS.
5713 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
5714 dump_ada_template, print_ada_methods,
5715 print_ada_declaration): Member fns are on TYPE_FIELDS.
5716
ff22eb12
NS
57172017-07-18 Nathan Sidwell <nathan@acm.org>
5718
5719 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
5720
eea77d1f
DM
57212017-07-14 David Malcolm <dmalcolm@redhat.com>
5722
5723 * c-common.c (try_to_locate_new_include_insertion_point): New
5724 function.
5725 (per_file_includes_t): New typedef.
5726 (added_includes_t): New typedef.
5727 (added_includes): New variable.
5728 (maybe_add_include_fixit): New function.
5729 * c-common.h (maybe_add_include_fixit): New decl.
5730
281ac396
MS
57312017-07-10 Martin Sebor <msebor@redhat.com>
5732
5733 PR other/81345
5734 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
5735
b6f43128
DM
57362017-07-06 David Malcolm <dmalcolm@redhat.com>
5737
5738 * c-common.c (selftest::c_family_tests): New.
5739 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
5740 (selftest::c_family_tests): New decl.
5741
efbf55b0
MP
57422017-07-04 Marek Polacek <polacek@redhat.com>
5743
5744 PR c/81231
5745 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
5746 types.
5747
6c86bd88
MP
57482017-07-04 Marek Polacek <polacek@redhat.com>
5749
5750 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
5751
17a7218b
ML
57522017-06-28 Martin Liska <mliska@suse.cz>
5753
5754 PR ipa/81128
5755 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
5756 to a function declaration.
5757
63010089
ML
57582017-06-28 Martin Liska <mliska@suse.cz>
5759
5760 PR driver/79659
5761 * c.opt: Add IntegerRange to various options.
5762
3e2becc4
MP
57632017-06-26 Marek Polacek <polacek@redhat.com>
5764
5765 PR c/80116
5766 * c-common.h (warn_for_multistatement_macros): Declare.
5767 * c-warn.c: Include "c-family/c-indentation.h".
5768 (warn_for_multistatement_macros): New function.
5769 * c.opt (Wmultistatement-macros): New option.
5770 * c-indentation.c (guard_tinfo_to_string): No longer static.
5771 Change the parameter type to "enum rid". Handle RID_SWITCH.
5772 * c-indentation.h (guard_tinfo_to_string): Declare.
5773
2db9b7cd
MG
57742017-06-23 Marc Glisse <marc.glisse@inria.fr>
5775
5776 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
5777
c3684b7b
MS
57782017-06-15 Martin Sebor <msebor@redhat.com>
5779
5780 PR c++/80560
5781 * c.opt (-Wclass-memaccess): New option.
5782
e72c4afd
BK
57832017-06-14 Boris Kolpackov <boris@codesynthesis.com>
5784
5785 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
5786
8a516588
MP
57872017-06-13 Marek Polacek <polacek@redhat.com>
5788
5789 PR objc/80949
5790 * c-warn.c (do_warn_duplicated_branches): Return if any of the
5791 branches is null.
5792
45b2222a
ML
57932017-06-13 Martin Liska <mliska@suse.cz>
5794
5795 PR sanitize/78204
5796 * c-attribs.c (add_no_sanitize_value): New function.
5797 (handle_no_sanitize_attribute): Likewise.
5798 (handle_no_sanitize_address_attribute): Use the function.
5799 (handle_no_sanitize_thread_attribute): New function.
5800 (handle_no_address_safety_analysis_attribute): Use
5801 add_no_sanitize_value.
5802 (handle_no_sanitize_undefined_attribute): Likewise.
5803 * c-common.h: Declare new functions.
5804 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
5805 (ubsan_instrument_shift): Likewise.
5806 (ubsan_instrument_bounds): Likewise.
5807 (ubsan_maybe_instrument_array_ref): Likewise.
5808 (ubsan_maybe_instrument_reference_or_call): Likewise.
5809
a01f151f
JM
58102017-06-11 Jason Merrill <jason@redhat.com>
5811
5812 * c-ada-spec.c, c-pragma.c: Use id_equal.
5813
3de4ac6d
MP
58142017-06-04 Marek Polacek <polacek@redhat.com>
5815
5816 PR c/80919
5817 * c-format.c (matching_type_p): Return false if any of the types
5818 requires structural equality.
5819
2474f48f
MS
58202017-06-02 Martin Sebor <msebor@redhat.com>
5821
5822 PR c/80892
5823 * c-warn.c (conversion_warning): Use -Wconversion for integer
5824 conversion and -Wfloat-conversion for floating one.
5825
40ffd95f
BE
58262017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
5827
5828 * c.opt (Wsizeof-pointer-div): New warning option.
5829
3fa4634c
VR
58302017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
5831
5832 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
5833 (Wcatch-value=1): Enable by -Wall.
5834
f012c8ef
DM
58352017-05-30 David Malcolm <dmalcolm@redhat.com>
5836
5837 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
5838 format_chars.
5839 * c.opt (fdiagnostics-show-template-tree): New option.
5840 (felide-type): New option.
5841
63dbcd13
VR
58422017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
5843
5844 * c.opt (Wcatch-value=): New C++ warning flag.
5845
be136b5c
NS
58462017-05-24 Nathan Sidwell <nathan@acm.org>
5847
5848 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
5849 const casts to avoid warning.
5850
3cd211af
MS
58512017-05-24 Martin Sebor <msebor@redhat.com>
5852
5853 PR c/80731
5854 * c-common.h (unsafe_conversion_p): Add a function argument.
5855 * c-common.c (unsafe_conversion_p): Same.
5856 Add type names and values to diagnostics.
5857 (scalar_to_vector): Adjust.
5858 * c-warn.c (constant_expression_error): Add a function argument.
5859 Add type names and values to diagnostics.
5860 (conversion_warning): Add a function argument.
5861 Add type names and values to diagnostics.
5862 (warnings_for_convert_and_check): Same.
5863
1ff7be5a
JM
58642017-05-19 Jason Merrill <jason@redhat.com>
5865
5866 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
5867 enumerators.
5868
ff502317
BE
58692017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5870
5871 * c-format.c (locus): Move out of function scope,
5872 add GTY attribute.
5873
2a8a8d7b
NS
58742017-05-19 Nathan Sidwell <nathan@acm.org>
5875
5876 * c-opts.c (class_dump_file, class_dump_flags): Delete.
5877 (c_common_parse_file): Remove class dump handling.
5878 (get_dump_info): Likewise.
5879
39aac208
RB
58802017-05-19 Richard Biener <rguenther@suse.de>
5881
5882 PR c++/80593
5883 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
5884 to alias-set zero memory.
5885
6ecd2339
BE
58862017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
5887
5888 * c-format.c (local_tree_type_node): Add GTY attribute.
5889
6574d78e
MP
58902017-05-18 Marek Polacek <polacek@redhat.com>
5891
5892 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
5893 (c_common_fixed_point_type_for_size): Likewise.
5894 (c_common_type_for_mode): Likewise.
5895 (shorten_compare): Likewise.
5896 (c_promoting_integer_type_p): Use false/true instead of 0/1.
5897 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
5898
e3455240
MP
58992017-05-18 Marek Polacek <polacek@redhat.com>
5900
5901 * c-common.c (self_promoting_args_p): Change the return type to bool.
5902 Use false/true instead of 0/1.
5903 * c-common.h (self_promoting_args_p): Update.
5904
3fa8871b
MP
59052017-05-17 Marek Polacek <polacek@redhat.com>
5906
5907 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
5908 * c-warn.c: Likewise.
5909
b42cc3ca
VV
59102017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
5911
5912 Implement new C++ intrinsics __is_assignable and __is_constructible.
5913 * c-common.c (__is_assignable, __is_constructible): New.
5914 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
5915
1a817418
ML
59162017-05-17 Martin Liska <mliska@suse.cz>
5917
5918 * c-common.h: Introduce dump_flags_t type and
5919 use it instead of int type.
5920 * c-gimplify.c (c_genericize): Likewise.
5921 * c-opts.c: Likewise.
5922
b2fa0a8b
MP
59232017-05-17 Marek Polacek <polacek@redhat.com>
5924
5925 * c-common.c (c_save_expr): Remove.
5926 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
5927 * c-common.h (c_save_expr): Remove declaration.
5928
31c2d57d
VR
59292017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
5930
5931 PR c/35441
5932 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
5933 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
5934 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
5935 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
5936 RDIV_EXPR.
5937 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
5938
684f84de
MP
59392017-05-09 Marek Polacek <polacek@redhat.com>
5940
5941 PR c/80525
5942 * c-warn.c (unwrap_c_maybe_const): New.
5943 (warn_logical_operator): Call it.
5944
641da50a
NS
59452017-05-09 Nathan Sidwell <nathan@acm.org>
5946
5947 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
5948 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
5949
631238ac
MS
59502017-05-08 Martin Sebor <msebor@redhat.com>
5951
5952 PR translation/80280
5953 * c-format.h (struct format_flag_spec): Add new member.
5954 (T89_T): New macro.
5955 * c-format.c (local_tree_type_node): New global.
5956 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
5957 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
5958 (strfmon_flag_specs): Likewise.
5959 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
5960 with distinct quoting properties.
5961 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
5962 (flag_chars_t::validate): Add argument and handle bad quoting.
5963 (check_format_info_main): Handle quoting problems.
5964 (init_dynamic_diag_info): Simplify.
5965
49f0c04c
JM
59662017-05-08 Jason Merrill <jason@redhat.com>
5967
5968 * c-opts.c (c_common_post_options): Update defaults for
5969 flag_abi_version and flag_abi_compat_version.
5970
56d35585
DM
59712017-05-05 David Malcolm <dmalcolm@redhat.com>
5972
5973 * c-common.c (c_cpp_error): Replace report_diagnostic
5974 with diagnostic_report_diagnostic.
5975
0f2c4a8f
MS
59762017-05-04 Martin Sebor <msebor@redhat.com>
5977
5978 PR translation/80280
5979 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
5980 (handle_weakref_attribute): Same.
5981
6fe63fb4
NS
59822017-05-03 Nathan Sidwell <nathan@acm.org>
5983
5984 Canonicalize canonical type hashing
5985 * c-common.c (complete_array_type): Use type_hash_canon.
5986
815d9cc6
XR
59872017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
5988
92a285c1 5989 PR c++/80038
815d9cc6
XR
5990 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
5991 prototype.
5992 (cilk_install_body_pedigree_operations): Likewise.
5993 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
5994 detatched.
5995 (cilk_gimplify_call_params_in_spawned_fn): Remove.
5996 (cilk_install_body_pedigree_operations): Likewise.
5997 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
5998 unwrapping.
5999
f8a36447
JJ
60002017-04-27 Jakub Jelinek <jakub@redhat.com>
6001
6002 PR c++/80534
6003 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
6004 flag on non-aggregate element types.
6005
7c145456
BE
60062017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
6007
6008 * c-common.c (c_type_hasher, type_hash_table): Remove.
6009 (c_common_get_alias_set): Remove unreachable code.
6010 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
6011
c3cbcd45
VR
60122017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
6013
6014 * c.opt (Wextra-semi): New C++ warning flag.
6015
8a59d466
JJ
60162017-04-20 Jakub Jelinek <jakub@redhat.com>
6017
6018 PR middle-end/80423
6019 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
6020
8487c9a5
JJ
60212017-04-18 Jakub Jelinek <jakub@redhat.com>
6022
6023 PR middle-end/79788
6024 PR middle-end/80375
6025 * c-common.c (c_common_type_for_mode): Don't handle
6026 widest_*_literal_type_node here.
6027 c_common_signed_or_unsigned_type): Likewise.
6028 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
6029 to *intTI_type_node or *intDI_type_node depending on whether
6030 TImode is supported by the target or not.
6031
3ee0fb02
ML
60322017-04-10 Martin Liska <mliska@suse.cz>
6033
6034 PR sanitizer/80350
6035 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
6036 doing an UBSAN check.
6037
5764ee3c
JW
60382017-04-03 Jonathan Wakely <jwakely@redhat.com>
6039
6040 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
6041
6f3af356
JJ
60422017-03-31 Jakub Jelinek <jakub@redhat.com>
6043
6044 PR c++/79572
6045 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
6046 tree *.
6047 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
6048 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
6049 REFERENCE_TYPE.
6050
f6a7a9d5
DM
60512017-03-31 David Malcolm <dmalcolm@redhat.com>
6052
6053 PR documentation/78732
6054 * c.opt (Wendif-labels): Fix description to refer to
6055 #else rather than #elif.
6056
af88f557
JJ
60572017-03-31 Jakub Jelinek <jakub@redhat.com>
6058
6059 PR libstdc++/80251
6060 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
6061 * c-common.c (c_common_reswords): Add __is_aggregate trait.
6062
a9e4a1a5
JJ
60632017-03-27 Jakub Jelinek <jakub@redhat.com>
6064
6065 PR middle-end/80162
6066 * c-common.c (c_common_mark_addressable_vec): Don't set
6067 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
6068
3f01b620
MS
60692017-03-21 Martin Sebor <msebor@redhat.com>
6070
6071 PR c++/79548
6072 * c-common.c (set_underlying_type): Mark type used only when
6073 original del is declared unused.
6074
2f6f187a
DM
60752017-03-10 David Malcolm <dmalcolm@redhat.com>
6076
6077 PR translation/79848
6078 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
6079 "%qs".
6080
a02fa805
DM
60812017-03-10 David Malcolm <dmalcolm@redhat.com>
6082
6083 PR c/79921
6084 * c-indentation.c (warn_for_misleading_indentation): Remove parens
6085 from inform's message, so that xgettext can locate it.
6086
822a132c
MP
60872017-03-09 Marek Polacek <polacek@redhat.com>
6088
6089 PR c++/79962
6090 PR c++/79984
6091 * c-attribs.c (handle_nonnull_attribute): Save the result of default
6092 conversion to the attribute list.
6093
bba81f1c
ML
60942017-03-09 Martin Liska <mliska@suse.cz>
6095
6096 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
6097
108154ff
JM
60982017-03-03 Jason Merrill <jason@redhat.com>
6099
6100 * c.opt (Wnoexcept-type): New.
6101
eb0e7c34
RB
61022017-03-02 Richard Biener <rguenther@suse.de>
6103
6104 PR c/79756
6105 * c-common.c (c_common_mark_addressable_vec): Look through
6106 C_MAYBE_CONST_EXPR.
6107
9453ba0a
ML
61082017-02-28 Martin Liska <mliska@suse.cz>
6109
6110 * c.opt: Replace space with tabular for options of <number>
6111 type.
6112
6a825afe
ML
61132017-02-28 Martin Liska <mliska@suse.cz>
6114
6115 * c.opt: Fix --help=option -Q for options which are of
6116 an enum type.
6117
4227c9ad
JJ
61182017-02-24 Jakub Jelinek <jakub@redhat.com>
6119
6120 PR c++/79588
6121 * c-common.c (check_function_restrict): New function.
6122 (check_function_arguments): Add FNDECL argument. Call
6123 check_function_restrict if -Wrestrict.
6124 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
6125 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
6126 * c-common.h (check_function_arguments): Add FNDECL argument.
6127 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
6128
59909673
EB
61292017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6130
6131 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
6132 treatment of parameters with pointer-to-tagged type and tidy up.
6133 (print_ada_methods): Remove the special treatment of C++ static member
6134 functions.
6135
54dcd526
ML
61362017-02-22 Martin Liska <mliska@suse.cz>
6137
6138 * c.opt: Replace inequality signs with square brackets
6139 for -Wnornalized.
6140
00bc9de3
JJ
61412017-02-21 Jakub Jelinek <jakub@redhat.com>
6142
6143 PR c++/79641
6144 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
6145 preserve quals.
6146
97fcf744
JM
61472017-02-17 Joseph Myers <joseph@codesourcery.com>
6148
6149 * c-cppbuiltin.c (builtin_define_float_constants): Define
6150 __DECIMAL_DIG__ to the value for long double.
6151
c7545f1c
MP
61522017-02-15 Marek Polacek <polacek@redhat.com>
6153
6154 PR c/79515
6155 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
6156 conversion has occured.
6157
c2e84327
DM
61582017-01-24 David Malcolm <dmalcolm@redhat.com>
6159
6160 * c-common.c (c_common_reswords): Add "__RTL".
6161 * c-common.h (enum rid): Add RID_RTL.
6162
2ebd93e1
MP
61632017-01-20 Marek Polacek <polacek@redhat.com>
6164
6165 PR c/64279
6166 * c-common.h (do_warn_duplicated_branches_r): Declare.
6167 * c-gimplify.c (c_genericize): Walk the function tree calling
6168 do_warn_duplicated_branches_r.
6169 * c-warn.c (expr_from_macro_expansion_r): New.
6170 (do_warn_duplicated_branches): New.
6171 (do_warn_duplicated_branches_r): New.
6172 * c.opt (Wduplicated-branches): New option.
6173
0d80ab91
DM
61742017-01-17 David Malcolm <dmalcolm@redhat.com>
6175
6176 PR c++/71497
6177 * c-indentation.c (warn_for_misleading_indentation): Use the past
6178 subjunctive in the note.
6179
7f991c36
AH
61802017-01-17 Aldy Hernandez <aldyh@redhat.com>
6181
6182 PR c/79116
6183 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
6184 start type to integer_type.
6185
1c70261c
JJ
61862017-01-16 Jakub Jelinek <jakub@redhat.com>
6187
6188 PR driver/49726
6189 * c.opt (gen-decls): Add Driver flag.
6190
1ddca3f3
PC
61912017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6192
6193 Revert:
6194 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6195
6196 PR c++/71737
6197 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
6198
7d2f3f1d
PC
61992017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6200
6201 PR c++/71737
6202 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
6203
bce6f760
MS
62042017-01-12 Martin Sebor <msebor@redhat.com>
6205
6206 (-Wformat-overflow): ...to this.
6207
bf5fbf46
MS
62082017-01-11 Martin Sebor <msebor@redhat.com>
6209
6210 PR c/78768
6211 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
6212 Also enable for LTO.
6213
e363df3f
JM
62142017-01-10 Jason Merrill <jason@redhat.com>
6215
6216 Implement P0195R2, C++17 variadic using.
6217 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
6218
bd2c6270
JJ
62192017-01-09 Jakub Jelinek <jakub@redhat.com>
6220
6221 PR translation/79019
6222 PR translation/79020
6223 * c.opt (Wnormalized=): Fix typo in description.
6224
efcc8d38
MS
62252017-01-08 Martin Sebor <msebor@redhat.com>
6226
6227 PR middle-end/77708
6228 * c.opt (-Wformat-truncation): New option.
6229
ab20d992 62302017-01-06 Alexandre Oliva <aoliva@redhat.com>
435f3f7a
AO
6231
6232 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
6233 value to unsigned short to fit in 4 hex digits without
6234 warnings.
6235
4e89adf9
EB
62362017-01-05 Eric Botcazou <ebotcazou@adacore.com>
6237
6238 * c.opt (fsso-struct): Add 'native' value.
6239
cd445b54
ML
62402017-01-05 Martin Liska <mliska@suse.cz>
6241
6242 PR pch/78970
6243 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
6244 header.
6245
a9342885
MP
62462017-01-04 Marek Polacek <polacek@redhat.com>
6247
6248 PR c++/64767
6249 * c.opt (Wpointer-compare): New option.
6250
fc73e60c
JJ
62512017-01-04 Jakub Jelinek <jakub@redhat.com>
6252
6253 PR driver/78957
6254 * c.opt (fsso-struct=): Add RejectNegative.
6255
cbe34bb5
JJ
62562017-01-01 Jakub Jelinek <jakub@redhat.com>
6257
6258 Update copyright years.
6259
d4a6c0ea
ML
62602016-12-29 Martin Liska <mliska@suse.cz>
6261
6262 PR c/78933
6263 * c.opt (strong-eval-order): Add RejectNegative keyword.
6264
67a5ad7c
JM
62652016-12-22 Jason Merrill <jason@redhat.com>
6266
6267 Implement P0522R0, matching of template template arguments.
6268 * c-cppbuiltin.c (c_cpp_builtins): Define
6269 __cpp_template_template_args.
6270
0dba7960
JJ
62712016-12-21 Jakub Jelinek <jakub@redhat.com>
6272
6273 PR bootstrap/78817
6274 * c-common.c (struct nonnull_arg_ctx): New type.
6275 (check_function_nonnull): Return bool instead of void. Use
6276 nonnull_arg_ctx as context rather than just location_t.
6277 (check_nonnull_arg): Adjust for the new context type, set
6278 warned_p to true if a warning has been diagnosed.
6279 (check_function_arguments): Return bool instead of void.
6280 * c-common.h (check_function_arguments): Adjust prototype.
6281
31bfc9b9
JM
62822016-12-21 Jason Merrill <jason@redhat.com>
6283
6284 * c.opt (-fnew-ttp-matching): New flag.
6285 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
6286
629b3d75
MJ
62872016-12-14 Martin Jambor <mjambor@suse.cz>
6288
6289 * c-omp.c: Include omp-general.h instead of omp-low.h.
6290 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
6291 name.
6292
474da67e
MS
62932016-12-14 Martin Sebor <msebor@redhat.com>
6294
6295 PR c/17308
6296 * c-common.c (check_nonnull_arg): Disable when optimization
6297 is enabled.
6298
fe366b87
MP
62992016-12-12 Marek Polacek <polacek@redhat.com>
6300
6301 PR c++/78647
6302 * c-common.c (attribute_fallthrough_p): Return false for
6303 error_mark_node.
6304
8bd9f164
MS
63052016-12-08 Martin Sebor <msebor@redhat.com>
6306
6307 PR c/78284
6308 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
6309
060162e0
MS
63102016-12-08 Martin Sebor <msebor@redhat.com>
6311
6312 PR c/78165
92a285c1
ML
6313 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
6314 suffix.
060162e0 6315
ee92e7ba
MS
63162016-12-07 Martin Sebor <msebor@redhat.com>
6317
6318 PR c/53562
6319 PR middle-end/77784
6320 PR middle-end/78149
6321 PR middle-end/78138
6322 * c.opt (-Wstringop-overflow): New option.
6323
84b0769e
MO
63242016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
6325
6326 * c-attribs.c (asan odr indicator): New attribute.
6327 (handle_asan_odr_indicator_attribute): New function.
6328
7fa6a965
PK
63292016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6330
6331 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
6332 ptrdiff_type_node;
6333
56d8ffc1
JG
63342016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6335
6336 * c-common.c (excess_precision_mode_join): New.
6337 (c_ts18661_flt_eval_method): New.
6338 (c_c11_flt_eval_method): Likewise.
6339 (c_flt_eval_method): Likewise.
6340 * c-common.h (excess_precision_mode_join): New.
6341 (c_flt_eval_method): Likewise.
6342 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
6343 (cpp_iec_559_value): Call it.
6344 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
6345 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
6346 __FLT_EVAL_METHOD_TS_18661_3__.
6347
04f0fcf7
JG
63482016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6349
6350 * c-opts.c (c_common_post_options): Add logic to handle the default
6351 case for -fpermitted-flt-eval-methods.
6352
fb2675cb
PB
63532016-11-23 Paolo Bonzini <bonzini@gnu.org>
6354
6355 * c.opt (Wexpansion-to-defined): New.
6356
ec1c5694
JJ
63572016-11-23 Jakub Jelinek <jakub@redhat.com>
6358
6359 PR target/78451
6360 * c-pragma.c (handle_pragma_target): Don't replace
6361 current_target_pragma, but chainon the new args to the current one.
6362
730c9e75
NS
63632016-11-22 Nathan Sidwell <nathan@acm.org>
6364
6365 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 6366 indentation and formatting.
730c9e75 6367
89990732
MS
63682016-11-21 Martin Sebor <msebor@redhat.com>
6369
6370 * c.opt (-fprintf-return-value): Enable by default.
6371
48330c93
BE
63722016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6373
6374 PR c++/71973
6375 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
6376 * c-common.c (c_common_nodes_and_builtins): Initialize
6377 const_tm_ptr_type_node.
6378
0d939c95
MP
63792016-11-16 Marek Polacek <polacek@redhat.com>
6380
6381 PR c/78285
6382 * c-common.c (c_add_case_label): Turn error_at calls into inform.
6383
8e745a17
JJ
63842016-11-14 Jakub Jelinek <jakub@redhat.com>
6385
6386 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
6387
1ee62b92 63882016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
6389 Richard Biener <rguenther@suse.de>
6390
6391 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
6392 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
6393 * c.opt (fgimple): New option.
1ee62b92 6394
22b15758
UB
63952016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6396
6397 PR c/35503
6398 * c-common.h (warn_for_restrict): Declare.
6399 * c-warn.c: Include gcc-rich-location.h.
6400 (warn_for_restrict): New function.
6401 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
6402 (gcc_cdiag_char_table): Likewise.
6403 (gcc_cxxdiag_char_table): Likewise.
6404 * c.opt (Wrestrict): New option.
6405
4be719cd
EB
64062016-11-13 Eric Botcazou <ebotcazou@adacore.com>
6407
6408 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
6409 for nested types only if the type is a record or union and dump SLOC.
6410
4a826ca6
JM
64112016-11-09 Jason Merrill <jason@redhat.com>
6412
6413 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
6414
2e955d50
JJ
64152016-11-09 Jakub Jelinek <jakub@redhat.com>
6416
6417 * c-ubsan.c (ubsan_instrument_shift): Handle split
6418 -fsanitize=shift-base and -fsanitize=shift-exponent.
6419
51dc6603
JM
64202016-11-07 Jason Merrill <jason@redhat.com>
6421
6422 * c.opt (Wc++1z-compat): New.
6423 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
6424
6dc4a604
ML
64252016-11-07 Martin Liska <mliska@suse.cz>
6426
6427 * c-warn.c (warn_for_unused_label): Save all labels used
6428 in goto or in &label.
6429
b302001e
JM
64302016-11-03 Jason Merrill <jason@redhat.com>
6431
6432 * c-cppbuiltin.c (c_cpp_builtins): Correct
6433 __cpp_inheriting_constructors.
6434
31f7f784
JM
64352016-11-01 Jason Merrill <jason@redhat.com>
6436
2bc78e3c
JM
6437 * c-cppbuiltin.c (c_cpp_builtins): Update
6438 __cpp_inheriting_constructors.
6439
31f7f784
JM
6440 * c.opt (-fnew-inheriting-ctors): New.
6441 * c-opts.c: Default to on for ABI 11+.
6442
dcb466ec
JJ
64432016-10-31 Jakub Jelinek <jakub@redhat.com>
6444
6445 PR c++/77948
6446 * c.opt (fext-numeric-literals): Add Var and Init.
6447 * c-opts.c (c_common_handle_option): Don't clear
6448 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
6449 (c_common_post_options): Clear it here if not set
6450 explicitly.
6451
52e1b91e
AH
64522016-10-28 Aldy Hernandez <aldyh@redhat.com>
6453
6454 PR debug/77773
6455 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
6456 if NULL.
6457
e16f1cc7
JJ
64582016-10-25 Jakub Jelinek <jakub@redhat.com>
6459
6460 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
6461 * c-common.c (c_common_reswords): Add __builtin_launder.
6462
f8348061
BE
64632016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
6464
6465 * c-common.c (c_common_truthvalue_conversion): Warn for
6466 multiplications in boolean context. Fix the quoting of '<<' and '<'
6467 in the shift warning.
6468
eff89e01
BE
64692016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6470
6471 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
6472
24bc7bf4
JM
64732016-10-20 Jason Merrill <jason@redhat.com>
6474
6475 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
6476
4c712374
BE
64772016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6478
6479 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
6480 integer shift ops in boolean context.
6481
64822016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
6483
6484 * c.opt (Walloca): New.
6485 (Walloca-larger-than=): New.
6486 (Wvla-larger-than=): New.
6487
8fa18c06
MP
64882016-10-17 Marek Polacek <polacek@redhat.com>
6489
6490 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
6491 Return immediately when finding a match.
6492 (warn_tautological_cmp): Remove a boolean variable that is no longer
6493 needed.
6494
b12b1915
MP
64952016-10-17 Marek Polacek <polacek@redhat.com>
6496
6497 * c-attribs.c: New file.
6498 * c-common.c: Move attributes handling to c-attribs.c.
6499 (get_nonnull_operand): No longer static.
6500 * c-common.h: Move the declarations from c-attribs.c to its own section.
6501
2045acd9
JM
65022016-10-14 Jason Merrill <jason@redhat.com>
6503
6504 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
6505 and __cpp_deduction_guides.
6506
14a2c9aa
JM
65072016-10-13 Jason Merrill <jason@redhat.com>
6508
6509 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
6510
4d0cdd0c
TP
65112016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
6512
6513 * c-cppbuiltin.c: Include memmodel.h.
6514 * c-opts.c: Likewise.
6515 * c-pragma.c: Likewise.
6516 * c-warn.c: Likewise.
6517
70f6d5e1
JJ
65182016-10-12 Jakub Jelinek <jakub@redhat.com>
6519
6520 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
6521 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
6522 * c-opts.c (sanitize_cpp_opts): Initialize
6523 cpp_opts->cpp_warn_implicit_fallthrough.
6524
78f61294
MP
65252016-10-11 Marek Polacek <polacek@redhat.com>
6526
6527 * c-common.c (warning_candidate_p): Change the return type to bool
6528 and return true/false instead of 1/0.
6529 (vector_mode_valid_p): Likewise.
6530
038b5cc0
MP
65312016-10-11 Marek Polacek <polacek@redhat.com>
6532
6533 * c-common.c (fold_for_warn): No longer static.
6534 (bool_promoted_to_int_p): Likewise.
6535 (c_common_get_narrower): Likewise.
6536 (constant_expression_warning): Move to c-warn.c.
6537 (constant_expression_error): Likewise.
6538 (overflow_warning): Likewise.
6539 (warn_logical_operator): Likewise.
6540 (find_array_ref_with_const_idx_r): Likewise.
6541 (warn_tautological_cmp): Likewise.
6542 (expr_has_boolean_operands_p): Likewise.
6543 (warn_logical_not_parentheses): Likewise.
6544 (warn_if_unused_value): Likewise.
6545 (strict_aliasing_warning): Likewise.
6546 (sizeof_pointer_memaccess_warning): Likewise.
6547 (check_main_parameter_types): Likewise.
6548 (conversion_warning): Likewise.
6549 (warnings_for_convert_and_check): Likewise.
6550 (match_case_to_enum_1): Likewise.
6551 (match_case_to_enum): Likewise.
6552 (c_do_switch_warnings): Likewise.
6553 (warn_for_omitted_condop): Likewise.
6554 (readonly_error): Likewise.
6555 (lvalue_error): Likewise.
6556 (invalid_indirection_error): Likewise.
6557 (warn_array_subscript_with_type_char): Likewise.
6558 (warn_about_parentheses): Likewise.
6559 (warn_for_unused_label): Likewise.
6560 (warn_for_div_by_zero): Likewise.
6561 (warn_for_memset): Likewise.
6562 (warn_for_sign_compare): Likewise.
6563 (do_warn_double_promotion): Likewise.
6564 (do_warn_unused_parameter): Likewise.
6565 (record_locally_defined_typedef): Likewise.
6566 (maybe_record_typedef_use): Likewise.
6567 (maybe_warn_unused_local_typedefs): Likewise.
6568 (maybe_warn_bool_compare): Likewise.
6569 (maybe_warn_shift_overflow): Likewise.
6570 (warn_duplicated_cond_add_or_warn): Likewise.
6571 (diagnose_mismatched_attributes): Likewise.
6572 * c-common.h: Move the declarations from c-warn.c to its own section.
6573 * c-warn.c: New file.
6574
627be19f
JM
65752016-10-08 Jason Merrill <jason@redhat.com>
6576
6577 * c-common.c (c_common_truthvalue_conversion): Don't distribute
6578 into COND_EXPR in C++.
6579
7bad794a
JJ
65802016-10-08 Jakub Jelinek <jakub@redhat.com>
6581
6582 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
6583 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
6584 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
6585
be845b04
JJ
65862016-10-07 Jakub Jelinek <jakub@redhat.com>
6587
6588 Implement LWG2296 helper intrinsic
6589 * c-common.h (enum rid): Add RID_ADDRESSOF.
6590 * c-common.c (c_common_reswords): Add __builtin_addressof.
6591
c09c4992
BE
65922016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
6593
6594 PR c++/77700
6595 * c-common.c (c_common_truthvalue_conversion): Warn also for
6596 suspicious enum values in boolean context.
6597
342cfb3e
JJ
65982016-10-06 Jakub Jelinek <jakub@redhat.com>
6599
6600 Implement P0258R2 - helper for C++17
6601 std::has_unique_object_representations trait
6602 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
6603 * c-common.c (c_common_reswords): Add
6604 __has_unique_object_representations.
6605
2e69f143
JJ
66062016-10-05 Jakub Jelinek <jakub@redhat.com>
6607
6608 PR sanitizer/66343
6609 * c-ubsan.c (ubsan_instrument_return): Don't call
6610 initialize_sanitizer_builtins here.
6611
700fff34
BE
66122016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
6613
6614 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
6615 conditional expression in boolean context when only one arm is
6616 non-boolean.
6617
9563bfcd
JJ
66182016-10-05 Jakub Jelinek <jakub@redhat.com>
6619
04a32443
JJ
6620 PR sanitizer/77823
6621 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
6622 is not integral.
6623
9563bfcd
JJ
6624 * c-common.c (c_common_reswords): Update comment for C++11.
6625
f1644724
JM
66262016-10-04 Jason Merrill <jason@redhat.com>
6627
6628 * c-common.c (make_tree_vector_from_ctor): New.
6629 * c-common.h: Declare it.
6630
5a79befb
JJ
66312016-10-04 Jakub Jelinek <jakub@redhat.com>
6632
6633 * c-cppbuiltin.c (c_cpp_builtins): Don't define
6634 __LIBGCC_JCR_SECTION_NAME__.
6635
1633d3b9
BE
66362016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
6637
6638 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
6639 left shift in boolean context.
6640
a2c6e7f2
JJ
66412016-09-29 Jakub Jelinek <jakub@redhat.com>
6642
6643 Implement P0001R1 - C++17 removal of register storage class specifier
6644 * c.opt (Wregister): New warning.
6645 * c-opts.c (c_common_post_options): Enable -Wregister by
6646 default for C++17.
6647
75304c87
JG
66482016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
6649
6650 * c-opts.c (c_common_post_options): Remove special case for
6651 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
6652 in C++.
6653
bbfac6da
JJ
66542016-09-27 Jakub Jelinek <jakub@redhat.com>
6655
6e39060a
JJ
6656 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
6657 -std=c++1z.
6658
bbfac6da
JJ
6659 * c-ada-spec.c (print_ada_declaration): Remove break after return.
6660
e73cf9a2
TP
66612016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
6662
6663 * c-common.c: Include memmodel.h.
6664
c6147dc4
MP
66652016-09-26 Marek Polacek <polacek@redhat.com>
6666
6667 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
6668
81fea426
MP
66692016-09-26 Marek Polacek <polacek@redhat.com>
6670
6671 PR c/7652
6672 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
6673 (handle_fallthrough_attribute): New function.
6674 (attribute_fallthrough_p): New function.
6675 * c-common.h (attribute_fallthrough_p): Declare.
6676
9a2300e9
MP
66772016-09-24 Marek Polacek <polacek@redhat.com>
6678
6679 PR c/77490
6680 * c.opt (Wbool-operation): New.
6681
a09e9e35
BE
66822016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6683
6684 * c-common.c (c_common_truthvalue_conversion): Inhibit
6685 Wint-in-bool-context warning with from_macro_definition_at.
6686 Mention the expression will always evaluate to true.
6687
d43b4ccc
MS
66882016-09-21 Martin Sebor <msebor@redhat.com>
6689
6690 PR bootstrap/77676
6691 * c.opt (fprintf-return-value): Temporarily initialize to zero
6692 to unblock bootstrap failures.
6693
2e1c20b1
JJ
66942016-09-21 Jakub Jelinek <jakub@redhat.com>
6695
6696 PR c++/77651
6697 * c.opt (Waligned-new=): Add RejectNegative.
6698 (faligned-new=): Likewise. Spelling fix - change
6699 aligned_new_threshhold to aligned_new_threshold.
6700 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
6701 to aligned_new_threshold.
6702
88d0c3f0
MS
67032016-09-20 Martin Sebor <msebor@redhat.com>
6704
6705 PR middle-end/49905
6706 * c.opt: Add -Wformat-length and -fprintf-return-value.
6707
144a96e4
BE
67082016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6709
6710 PR c++/77434
6711 * c.opt (Wint-in-bool-context): New warning.
6712 * c-common.c (c_common_truthvalue_conversion): Warn on integer
6713 constants in boolean context.
6714
63012d9a
JM
67152016-09-19 Joseph Myers <joseph@codesourcery.com>
6716
6717 * c-common.c (max_align_t_align): Also consider alignment of
6718 float128_type_node.
6719
931388ce
JM
67202016-09-15 Jason Merrill <jason@redhat.com>
6721
6722 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
6723 DECL_EXTERNAL.
6724
38711381
JM
67252016-09-14 Jason Merrill <jason@redhat.com>
6726
6727 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
6728 limit FIELD_DECL, either.
6729
e51fbec3
MP
67302016-09-14 Marek Polacek <polacek@redhat.com>
6731
6732 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
6733 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
6734 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
6735
254830ba
DM
67362016-09-13 David Malcolm <dmalcolm@redhat.com>
6737
6738 * c-common.c (warn_logical_not_parentheses): Replace
6739 rich_location::add_fixit_insert calls with add_fixit_insert_before
6740 and add_fixit_insert_after, eliminating the "next_loc" calculation.
6741
42763690
JM
67422016-09-13 Jason Merrill <jason@redhat.com>
6743 Tom de Vries <tom@codesourcery.com>
6744
6745 PR c++/77427
6746 * c-common.c (set_underlying_type): Don't treat array as builtin type.
6747
9453eee9
JM
67482016-09-13 Jason Merrill <jason@redhat.com>
6749
6750 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
6751 limit types at all.
6752
e96809e3
JM
67532016-09-12 Jason Merrill <jason@redhat.com>
6754
6755 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
6756 bit/byte confusion, allow large alignment for types.
6757
54dcdb88
BE
67582016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
6759
6760 PR c++/77496
6761 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
6762
d1463eb9
DM
67632016-09-12 David Malcolm <dmalcolm@redhat.com>
6764
6765 PR c/72858
6766 * c-format.c (argument_parser::check_argument_type): Add params
6767 "type_start" and "conversion_char". Use the former to generate
6768 offset_to_type_start and pass it and conversion_char to
6769 check_format_types.
6770 (check_format_info_main): Capture the start of the type
6771 information as "type_start", and pass it an format_char
6772 to arg_parser.check_argument_type.
6773 (check_format_types): Provide an example in the leading comment.
6774 Add params "offset_to_type_start" and "conversion_char"; pass
6775 them to format_type_warning calls.
6776 (test_get_modifier_for_format_len): Likewise.
6777 (matching_type_p): New function.
6778 (get_format_for_type): Add param "conversion_char" and move
6779 implementation into...
6780 (get_format_for_type_1): ...new function, called twice.
6781 Use new function matching_type_p rather than checking for
6782 TYPE_CANONICAL equality.
6783 (get_corrected_substring): New function.
6784 (format_type_warning): Provide an example in the leading comment.
6785 Add params "offset_to_type_start" and "conversion_char". Replace
6786 call to get_format_for_type with call to get_corrected_substring
6787 and move rejection of hints for widths/precisions there.
6788 (assert_format_for_type_streq): Add param "conversion_char".
6789 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
6790 (test_get_format_for_type_printf): Add conversion chars to the
6791 tests, adding coverage for various combinations of integer
6792 vs double conversions, and for preserving octal and hexadecimal
6793 conversions.
6794 (test_get_format_for_type_scanf): Add conversion chars to the
6795 tests.
6796
5b28efbb
TV
67972016-09-10 Tom de Vries <tom@codesourcery.com>
6798
6799 PR C/71602
6800 * c-common.c (build_va_arg): Handle more strict
6801 targetm.canonical_va_list_type. Replace first argument type error with
6802 assert.
6803
3f0177e7
MS
68042016-09-09 Martin Sebor <msebor@redhat.com>
6805
6806 PR c/77520
6807 PR c/77521
6808 * c-format.c (argument_parser::find_format_char_info): Use %qc
6809 format directive unconditionally.
6810
af63ba4b
JM
68112016-09-09 Jason Merrill <jason@redhat.com>
6812
6813 Implement C++17 new of over-aligned types.
6814 * c.opt: Add -faligned-new and -Waligned-new.
6815 * c-common.c (max_align_t_align): Split out from...
6816 (cxx_fundamental_alignment_p): ...here.
6817 * c-common.h: Declare it.
6818 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
6819
c65248cb
JM
68202016-09-09 Joseph Myers <joseph@codesourcery.com>
6821
6822 * c-cppbuiltin.c (builtin_define_type_width): New function.
6823 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
6824 macros.
6825
e5106e27
DM
68262016-09-07 David Malcolm <dmalcolm@redhat.com>
6827
6828 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
6829 a POINTER_TYPE.
6830 (substring_loc::get_location): Move to substring-locations.c,
6831 keeping implementation as...
6832 (c_get_substring_location): New function, from the above, reworked
6833 to use accessors rather than member lookup.
6834 * c-common.h (class substring_loc): Move to substring-locations.h,
6835 replacing with a forward decl.
6836 (c_get_substring_location): New decl.
6837 * c-format.c: Include "substring-locations.h".
6838 (format_warning_va): Move to substring-locations.c.
6839 (format_warning_at_substring): Likewise.
6840
ab20d992 68412016-09-06 Martin Sebor <msebor@redhat.com>
a42e7952
MS
6842
6843 PR c/77336
6844 * c-format.c (check_function_format): Avoid issuing warnings for
6845 functions unless they call format functions with non-constant
6846 format strings.
6847
b772a565
RB
68482016-09-06 Richard Biener <rguenther@suse.de>
6849
6850 PR c/77450
6851 * c-common.c (c_common_mark_addressable_vec): Handle
6852 COMPOUND_LITERAL_EXPR.
6853
25ff5dd3
MP
68542016-09-05 Marek Polacek <polacek@redhat.com>
6855
6856 PR c/77423
6857 * c-common.c (bool_promoted_to_int_p): New function.
6858 (expr_has_boolean_operands_p): New function.
6859 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
6860 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
6861
21234eb5
TV
68622016-09-04 Tom de Vries <tom@codesourcery.com>
6863
6864 revert:
6865 2016-08-29 Tom de Vries <tom@codesourcery.com>
6866
6867 * c-common.c (build_va_arg): Replace first argument type error
6868 with assert.
6869
9dc5773f
JJ
68702016-09-02 Jakub Jelinek <jakub@redhat.com>
6871
6872 PR c/65467
6873 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
6874 (c_finish_omp_for): Reject _Atomic qualified iterators.
6875
68762016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
6877
6878 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
6879 size to guarantee it fits the output of the formatted function
6880 regardless of its arguments.
6881
295844f6
MP
68822016-09-01 Marek Polacek <polacek@redhat.com>
6883
6884 PR c/7652
6885 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
6886 FALLTHRU comments.
6887
3d06b6f2
MP
68882016-08-29 Marek Polacek <polacek@redhat.com>
6889
6890 PR c/77292
6891 * c-common.c (warn_logical_not_parentheses): Don't warn for
6892 a comparison or a logical operator.
6893
34cedad5
TV
68942016-08-29 Tom de Vries <tom@codesourcery.com>
6895
6896 * c-common.c (build_va_arg): Fix type comparison assert.
6897
f162d717
TV
68982016-08-29 Tom de Vries <tom@codesourcery.com>
6899
6900 * c-common.c (build_va_arg): Replace first argument type error
6901 with assert.
6902
ba9bbd6f
TV
69032016-08-29 Tom de Vries <tom@codesourcery.com>
6904
6905 PR c/77398
6906 * c-common.c (build_va_arg): Add first argument error. Build va_arg
6907 with error_mark_node as va_list instead of with illegal va_list.
6908
ebef225f
MP
69092016-08-25 Marek Polacek <polacek@redhat.com>
6910 David Malcolm <dmalcolm@redhat.com>
6911
6912 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
6913 * c-common.h (warn_logical_not_parentheses): Update declaration.
6914
b00e6e75
MP
69152016-08-22 Marek Polacek <polacek@redhat.com>
6916
6917 PR c++/77321
6918 * c-common.c (warn_for_memset): Check type for null.
6919
6dc198e3
JM
69202016-08-22 Joseph Myers <joseph@codesourcery.com>
6921
14ec014e 6922 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
6923 _FloatNx types for suffixes for built-in functions.
6924
c65699ef
JM
69252016-08-19 Joseph Myers <joseph@codesourcery.com>
6926
6927 PR c/32187
6928 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
6929 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
6930 (RID_FLOAT128X): New enum rid values.
6931 (CASE_RID_FLOATN_NX): New macro.
6932 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
6933 keywords.
6934 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
6935 corresponding complex types.
6936 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
6937 _FloatNx and corresponding complex types.
6938 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
6939 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
6940 and _FloatNx types for the widest type for determining
6941 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
6942 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
6943 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
6944 and _FloatNx types.
6945 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
6946 constants.
6947 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
6948 _FloatNx types.
6949
cc015f3a
DM
69502016-08-18 David Malcolm <dmalcolm@redhat.com>
6951
6952 * c-opts.c (c_diagnostic_finalizer): Update for change to
6953 diagnostic_show_locus.
6954
cb18fd07
DM
69552016-08-18 David Malcolm <dmalcolm@redhat.com>
6956
6957 * c-common.c: Include "spellcheck.h".
6958 (cb_get_suggestion): New function.
6959 * c-common.h (cb_get_suggestion): New decl.
6960 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
6961 cb_get_suggestion.
6962
a76989dc
MP
69632016-08-18 Marek Polacek <polacek@redhat.com>
6964
6965 PR c/71514
6966 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
6967 and pointer-to-VLA.
6968
65e736c0
DM
69692016-08-16 David Malcolm <dmalcolm@redhat.com>
6970
6971 PR c/72857
6972 * c-common.c (substring_loc::get_range): Rename to...
6973 (substring_loc::get_location): ...this, converting param from a
6974 source_range * to a location_t *. Call
6975 get_source_location_for_substring rather than
6976 get_source_range_for_substring, and pass in m_caret_idx.
6977 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
6978 (substring_loc::get_range): Replace with...
6979 (substring_loc::get_location): ...this.
6980 (substring_loc::set_caret_index): New method.
6981 (substring_loc): Add field m_caret_idx.
6982 * c-format.c (format_warning_va): Update for above changes.
6983 Rename local "substring_loc" to "fmt_substring_loc" to avoid
6984 clashing with type name.
6985 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
6986 (check_argument_type): Likewise.
6987 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
6988 Use a copy when emitting warnings, setting the caret index from TYPE.
6989
7e1dde14 69902016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 6991 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
6992
6993 * c-ada-spec.c (dump_number): New function.
6994 (handle_escape_character): Likewise.
6995 (print_ada_macros): Add handling of constant integers and strings.
6996
191816a3
MP
69972016-08-12 Marek Polacek <polacek@redhat.com>
6998
6999 PR c/7652
7000 * c-common.c (scalar_to_vector): Adjust fall through comment.
7001 * c-opts.c (c_common_handle_option): Likewise.
7002 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
7003 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
7004 fall through comment.
7005 * cilk.c (extract_free_variables): Add FALLTHRU.
7006
452df4a4
JM
70072016-08-10 Jason Merrill <jason@redhat.com>
7008
7009 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
7010
f3365c12
JM
70112016-08-09 Jason Merrill <jason@redhat.com>
7012
7013 * c-common.c (c_common_attribute_table): vector_size affects type
7014 identity.
7015
f0bc3323
MP
70162016-08-09 Marek Polacek <polacek@redhat.com>
7017
7018 PR c/7652
7019 * c-ada-spec.c (dump_generic_ada_node): Add return.
7020
98e5a19a
JM
70212016-08-09 Jason Merrill <jason@redhat.com>
7022
7023 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
7024 C++17 constexpr lambdas.
7025
895aa8e1
DM
70262016-08-08 David Malcolm <dmalcolm@redhat.com>
7027
7028 PR c/64955
7029 * c-common.h (selftest::c_format_c_tests): New declaration.
7030 (selftest::run_c_tests): New declaration.
7031 * c-format.c: Include "selftest.h.
7032 (format_warning_va): Add param "corrected_substring" and use
7033 it to add a replacement fix-it hint.
7034 (format_warning_at_substring): Likewise.
7035 (format_warning_at_char): Update for new param of
7036 format_warning_va.
7037 (argument_parser::check_argument_type): Pass "fki" to
7038 check_format_types.
7039 (check_format_types): Add param "fki" and pass it to
7040 format_type_warning.
7041 (deref_n_times): New function.
7042 (get_modifier_for_format_len): New function.
7043 (selftest::test_get_modifier_for_format_len): New function.
7044 (get_format_for_type): New function.
7045 (format_type_warning): Add param "fki" and use it to attempt
7046 to provide hints for argument types when calling
7047 format_warning_at_substring.
7048 (selftest::get_info): New function.
7049 (selftest::assert_format_for_type_streq): New function.
7050 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
7051 (selftest::test_get_format_for_type_printf): New function.
7052 (selftest::test_get_format_for_type_scanf): New function.
7053 (selftest::c_format_c_tests): New function.
7054
e52ed3fe
DM
70552016-08-08 David Malcolm <dmalcolm@redhat.com>
7056
7057 PR c/52952
7058 * c-format.c: Include "diagnostic.h".
7059 (location_column_from_byte_offset): Delete.
7060 (location_from_offset): Delete.
7061 (format_warning_va): New function.
7062 (format_warning_at_substring): New function.
7063 (format_warning_at_char): New function.
7064 (check_format_arg): Capture location of format_tree and pass to
7065 check_format_info_main.
7066 (argument_parser): Add fields "start_of_this_format" and
7067 "format_string_cst".
7068 (flag_chars_t::validate): Add param "format_string_cst". Convert
7069 warning_at call using location_from_offset to call to
7070 format_warning_at_char.
7071 (argument_parser::argument_parser): Add param "format_string_cst_"
7072 and use use it to initialize field "format_string_cst".
7073 Initialize new field "start_of_this_format".
7074 (argument_parser::read_format_flags): Convert warning_at call
7075 using location_from_offset to a call to format_warning_at_char.
7076 (argument_parser::read_any_format_left_precision): Likewise.
7077 (argument_parser::read_any_format_precision): Likewise.
7078 (argument_parser::read_any_other_modifier): Likewise.
7079 (argument_parser::find_format_char_info): Likewise, in three places.
7080 (argument_parser::parse_any_scan_set): Likewise, in one place.
7081 (argument_parser::handle_conversions): Likewise, in two places.
7082 (argument_parser::check_argument_type): Add param "fmt_param_loc"
7083 and use it to make a substring_loc. Pass the latter to
7084 check_format_types.
7085 (check_format_info_main): Add params "fmt_param_loc" and
7086 "format_string_cst". Convert warning_at calls using
7087 location_from_offset to calls to format_warning_at_char. Pass the
7088 new params to the arg_parser ctor. Pass "format_string_cst" to
7089 flag_chars.validate. Pass "fmt_param_loc" to
7090 arg_parser.check_argument_type.
7091 (check_format_types): Convert first param from a location_t
7092 to a const substring_loc & and rename to "fmt_loc". Attempt
7093 to extract the range of the relevant parameter and pass it
7094 to format_type_warning.
7095 (format_type_warning): Convert first param from a location_t
7096 to a const substring_loc & and rename to "fmt_loc". Add
7097 params "param_range" and "type". Replace calls to warning_at
7098 with calls to format_warning_at_substring.
7099
1c4d457e
DM
71002016-08-08 David Malcolm <dmalcolm@redhat.com>
7101
7102 * c-format.c (class flag_chars_t): New class.
7103 (struct length_modifier): New struct.
7104 (class argument_parser): New class.
7105 (flag_chars_t::flag_chars_t): New ctor.
7106 (flag_chars_t::has_char_p): New method.
7107 (flag_chars_t::add_char): New method.
7108 (flag_chars_t::validate): New method.
7109 (flag_chars_t::get_alloc_flag): New method.
7110 (flag_chars_t::assignment_suppression_p): New method.
7111 (argument_parser::argument_parser): New ctor.
7112 (argument_parser::read_any_dollar): New method.
7113 (argument_parser::read_format_flags): New method.
7114 (argument_parser::read_any_format_width): New method.
7115 (argument_parser::read_any_format_left_precision): New method.
7116 (argument_parser::read_any_format_precision): New method.
7117 (argument_parser::handle_alloc_chars): New method.
7118 (argument_parser::read_any_length_modifier): New method.
7119 (argument_parser::read_any_other_modifier): New method.
7120 (argument_parser::find_format_char_info): New method.
7121 (argument_parser::validate_flag_pairs): New method.
7122 (argument_parser::give_y2k_warnings): New method.
7123 (argument_parser::parse_any_scan_set): New method.
7124 (argument_parser::handle_conversions): New method.
7125 (argument_parser::check_argument_type): New method.
7126 (check_format_info_main): Introduce classes argument_parser
7127 and flag_chars_t, moving the code within the loop into methods
7128 of these classes. Make various locals "const".
7129
88fa5555
DM
71302016-08-05 David Malcolm <dmalcolm@redhat.com>
7131
7132 * c-common.c: Include "substring-locations.h".
7133 (get_cpp_ttype_from_string_type): New function.
7134 (g_string_concat_db): New global.
7135 (substring_loc::get_range): New method.
7136 * c-common.h (g_string_concat_db): New declaration.
7137 (class substring_loc): New class.
7138 * c-lex.c (lex_string): When concatenating strings, capture the
7139 locations of all tokens using a new obstack, and record the
7140 concatenation locations within g_string_concat_db.
7141 * c-opts.c (c_common_init_options): Construct g_string_concat_db
7142 on the ggc-heap.
7143
78169471
MP
71442016-07-29 Marek Polacek <polacek@redhat.com>
7145
638fc14f
MP
7146 PR c/71926
7147 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
7148 parentheses warning.
7149
78169471
MP
7150 PR c/71574
7151 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
7152
1225d6b1
ML
71532016-07-28 Martin Liska <mliska@suse.cz>
7154
7155 PR gcov-profile/68025
7156 * c-common.c (handle_no_profile_instrument_function_attribute):
7157
ec1e2a40
BE
71582016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
7159
7160 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
7161 BITS_PER_UNIT_LOG.
7162
5ec2cd9f
JM
71632016-07-25 Jason Merrill <jason@redhat.com>
7164
7165 PR c++/65970
7166 * c.opt (fconstexpr-loop-limit): New.
7167
9dc5773f 71682016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
7169
7170 PR c++/71675
7171 * c-common.c (resolve_overloaded_builtin): Avoid converting
7172 __atomic_compare_exchange_n return type to that of what its
7173 first argument points to.
7174
e3fe09c1
UB
71752016-07-22 Uros Bizjak <ubizjak@gmail.com>
7176
7177 * c-common.c: Use HOST_WIDE_INT_M1U instead of
7178 ~(unsigned HOST_WIDE_INT) 0.
7179
bc91c436
ML
71802016-07-22 Martin Liska <mliska@suse.cz>
7181
7182 PR gcov-profile/69028
7183 PR gcov-profile/62047
7184 * cilk.c (create_cilk_helper_decl): Set location of a new decl
7185 to the current_function_decl.
7186
451dcc66
JM
71872016-07-21 Jason Merrill <jason@redhat.com>
7188
7189 PR c++/65168
7190 * c-common.c (c_common_truthvalue_conversion): Check
7191 c_inhibit_evaluation_warnings for warning about address of
7192 reference.
7193
de6a69ee
DM
71942016-07-20 David Malcolm <dmalcolm@redhat.com>
7195
7196 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
7197 const char *.
7198
d022c55a
JM
71992016-07-15 Jason Merrill <jason@redhat.com>
7200
7201 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
7202
ddbbcb19
JJ
72032016-07-15 Jakub Jelinek <jakub@redhat.com>
7204
7205 PR c/71858
7206 * c-common.h (enum lookup_name_fuzzy_kind): Add
7207 FUZZY_LOOKUP_FUNCTION_NAME.
7208
d0cf395a
JM
72092016-07-08 Jason Merrill <jason@redhat.com>
7210
7211 P0145: Refining Expression Order for C++.
7212 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
7213 * c-opts.c: Adjust.
7214
98d44e93
MT
72152016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
7216
7217 PR c++/71214
7218 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
7219
f9d8d994
TS
72202016-06-29 Thomas Schwinge <thomas@codesourcery.com>
7221
7222 * c-pragma.h (enum pragma_kind): Rename
7223 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
7224 users.
7225
4aa83879
RB
72262016-06-29 Richard Biener <rguenther@suse.de>
7227
7228 PR middle-end/71002
7229 * c-common.c (c_common_get_alias_set): Remove union type punning case.
7230
a25bd9e6
JM
72312016-06-24 Jason Merrill <jason@redhat.com>
7232
7233 P0145R2: Refining Expression Order for C++.
7234 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
7235 MODIFY_EXPR.
7236
a86451b9
JJ
72372016-06-24 Jakub Jelinek <jakub@redhat.com>
7238
7239 * c-common.c (check_builtin_function_arguments): Require last
7240 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
7241 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
7242 if the last argument is pointer to enumerated or boolean type.
7243
1a4f11c8
DM
72442016-06-22 David Malcolm <dmalcolm@redhat.com>
7245
7246 PR c/70339
7247 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
7248 (lookup_name_fuzzy): New prototype.
7249
fe55692c
JDA
72502016-06-21 John David Anglin <danglin@gcc.gnu.org>
7251
7252 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
7253
4eb24e01
JM
72542016-06-14 Jason Merrill <jason@redhat.com>
7255
7256 P0145R2: Refining Expression Order for C++.
7257 * c.opt (fargs-in-order): New.
7258 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
7259
ef7cf206
JJ
72602016-06-13 Jakub Jelinek <jakub@redhat.com>
7261
0dda258b
JJ
7262 PR sanitizer/71498
7263 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
7264 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
7265
ef7cf206
JJ
7266 PR preprocessor/71183
7267 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
7268 to cb_get_source_date_epoch.
7269
50b15873
JJ
72702016-06-10 Jakub Jelinek <jakub@redhat.com>
7271
7272 PR c/68657
7273 * c.opt (Wpsabi): Add Warning flag.
7274
4d926e34
MS
72752016-06-10 Martin Sebor <msebor@redhat.com>
7276
7277 PR c/71392
14ec014e 7278 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
7279 the nonnull attribute in type-generic builtins.
7280
e01b4e16
MS
72812016-06-09 Martin Sebor <msebor@redhat.com>
7282
7283 PR c/70883
7284 * c-common.c (builtin_function_validate_nargs): Make text of error
7285 message consistent with others like it.
7286
44a845ca
MS
72872016-06-08 Martin Sebor <msebor@redhat.com>
7288 Jakub Jelinek <jakub@redhat.com>
7289
7290 PR c++/70507
7291 PR c/68120
7292 * c-common.c (check_builtin_function_arguments): Handle
7293 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
7294
a80a7051
RB
72952016-06-08 Richard Biener <rguenther@suse.de>
7296
7297 * c-common.c (parse_optimize_options): Improve diagnostic messages.
7298
bfd67b47
RB
72992016-06-07 Richard Biener <rguenther@suse.de>
7300
7301 PR c/61564
7302 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
7303 options and warn about others.
7304
15c98b2e
ES
73052016-06-01 Eduard Sanou <dhole@openmailbox.org>
7306
7307 * c-common.c (get_source_date_epoch): Rename to
7308 cb_get_source_date_epoch.
7309 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
7310 message when the parsing fails. Use error_at instead of fatal_error.
7311 * c-common.h (get_source_date_epoch): Rename to
7312 cb_get_source_date_epoch.
7313 * c-common.h (cb_get_source_date_epoch): Prototype.
7314 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
7315 * c-common.h (c_omp_region_type): Remove trailing comma.
7316 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
7317 * c-lex.c (c_lex_with_flags): Remove initialization of
7318 pfile->source_date_epoch.
7319
00631022
JJ
73202016-05-30 Jakub Jelinek <jakub@redhat.com>
7321
7322 PR c++/71349
7323 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
7324 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
7325 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
7326 instead of C_OMP_CLAUSE_SPLIT_FOR.
7327
f17a223d
RB
73282016-05-24 Richard Biener <rguenther@suse.de>
7329
7330 PR middle-end/70434
7331 PR c/69504
7332 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
7333 (convert_vector_to_array_for_subscript): ... this.
7334 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
7335 VIEW_CONVERT_EXPR to an array type. Rename to ...
7336 (convert_vector_to_array_for_subscript): ... this.
7337
4f2e1536
MP
73382016-05-12 Marek Polacek <polacek@redhat.com>
7339
7340 PR c/70756
7341 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
7342 size_in_bytes and pass LOC to it.
7343
d6e83a8d
MM
73442016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
7345
7346 PR c/43651
7347 * c.opt (Wduplicate-decl-specifier): New option.
7348
5c3a10fb
MP
73492016-05-11 Marek Polacek <polacek@redhat.com>
7350
7351 PR c++/71024
7352 * c-common.c (diagnose_mismatched_attributes): New function.
7353 * c-common.h (diagnose_mismatched_attributes): Declare.
7354
deef7113
MP
73552016-05-04 Marek Polacek <polacek@redhat.com>
7356
7357 * c.opt (Wdangling-else): New option.
7358
79ce98bc
MP
73592016-05-03 Marek Polacek <polacek@redhat.com>
7360
7361 PR c/70859
7362 * c-common.c (builtin_function_validate_nargs): Add location
7363 parameter. Use it.
7364 (check_builtin_function_arguments): Add location and arguments
7365 parameters. Use them.
7366 * c-common.h (check_builtin_function_arguments): Update declaration.
7367
381cdae4
RB
73682016-05-03 Richard Biener <rguenther@suse.de>
7369
7370 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
7371 allow call args to gimplify to SSA names.
7372
1d793c34
MP
73732016-05-03 Marek Polacek <polacek@redhat.com>
7374
7375 * c-common.h (enum c_omp_region_type): Remove stray comma.
7376
77886428
CP
73772016-05-02 Cesar Philippidis <cesar@codesourcery.com>
7378
7379 * c-common.h (enum c_omp_region_type): Define.
7380
697e0b28
RS
73812016-05-02 Richard Sandiford <richard.sandiford@arm.com>
7382
7383 * c-common.c (shorten_compare): Use wi::to_wide.
7384
e7ff0319
CP
73852016-04-29 Cesar Philippidis <cesar@codesourcery.com>
7386
7387 PR middle-end/70626
7388 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
7389 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
7390 reduction clauses in acc parallel loops.
7391
2fff3db8
MP
73922016-04-29 Marek Polacek <polacek@redhat.com>
7393
7394 PR c/70852
7395 * c-common.c (warn_for_memset): Check domain before accessing it.
7396
509063eb
DV
73972016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
7398
7399 PR/69089
7400 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
7401 "aligned" attribute.
7402
b632761d
JM
74032016-04-28 Jason Merrill <jason@redhat.com>
7404
7405 * c-lex.c (c_common_has_attribute): Handle nodiscard.
7406
174f6622
ES
74072016-04-28 Eduard Sanou <dhole@openmailbox.org>
7408 Matthias Klose <doko@debian.org>
7409
7410 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 7411 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
7412 handling.
7413 * c-common.h (get_source_date_epoch): Prototype.
7414 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
7415
6bc2bb18
RB
74162015-04-27 Ryan Burn <contact@rnburn.com>
7417
7418 PR c++/69024
7419 PR c++/68997
7420 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
7421 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
7422 external linkage.
7423 (cilk_detect_and_unwrap): Corresponding changes.
7424 (extract_free_variables): Don't extract free variables from
7425 AGGR_INIT_EXPR slot.
7426 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
7427 (cilk_recognize_spawn): Likewise.
7428
c1e1f433
BS
74292016-04-27 Bernd Schmidt <bschmidt@redhat.com>
7430
7431 * c.opt (Wmemset-elt-size): New option.
7432 * c-common.c (warn_for_memset): New function.
7433 * c-common.h (warn_for_memset): Declare.
7434
d067e05f
JM
74352016-04-25 Jason Merrill <jason@redhat.com>
7436
7437 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
7438 No longer static.
7439 * c-common.h: Declare it.
7440 * c-lex.c (c_common_has_attribute): Add maybe_unused.
7441
9aa36ae5
JM
74422016-04-22 Jason Merrill <jason@redhat.com>
7443
7444 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
7445
477d4906
IV
74462016-04-20 Ilya Verbin <ilya.verbin@intel.com>
7447
7448 PR c++/69363
7449 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
7450 * c-common.h (c_finish_cilk_clauses): Remove declaration.
7451
fe37c7af
MM
74522016-04-18 Michael Matz <matz@suse.de>
7453
7454 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
7455 and SET_DECL_ALIGN.
7456
23f2660f
EB
74572016-04-17 Eric Botcazou <ebotcazou@adacore.com>
7458
7459 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
7460 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
7461 to incomplete types.
7462 (dump_nested_type): Remove redundant tests and tidy up.
7463 (print_ada_declaration): Also set TREE_VISITED on the declaration of
7464 a type which is the typedef of an original type.
7465
1e77281b
MP
74662016-04-15 Marek Polacek <polacek@redhat.com>
7467
7468 PR c/70651
7469 * c-common.c (build_va_arg): Change two asserts into errors and return
7470 error_mark_node.
7471
b3a77f21
MP
74722016-04-13 Marek Polacek <polacek@redhat.com>
7473
7474 PR c++/70639
7475 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
7476 for switch statements, too.
7477
322b8466
JM
74782016-03-28 Jason Merrill <jason@redhat.com>
7479
7480 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
7481
fbdb6baf
MP
74822016-03-23 Marek Polacek <polacek@redhat.com>
7483
7484 PR c++/69884
7485 * c.opt (Wignored-attributes): New option.
7486
5c240f4d
DM
74872016-03-22 David Malcolm <dmalcolm@redhat.com>
7488
7489 PR c/69993
7490 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
7491 diagnostic text, reversing the order of the warning and note so
7492 that they appear in source order.
7493
14ba7b28
MP
74942016-03-17 Marek Polacek <polacek@redhat.com>
7495
7496 PR c/69407
7497 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
7498 operations.
7499
08a1cadc
JM
75002016-03-14 Jason Merrill <jason@redhat.com>
7501
2aaeea19
JM
7502 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
7503
08a1cadc
JM
7504 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
7505
c06d25bb
RB
75062016-03-09 Richard Biener <rguenther@suse.de>
7507
7508 PR c/70143
7509 * c-common.c (strict_aliasing_warning): Add back
7510 alias_sets_conflict_p check.
7511
80aac5c8
JM
75122016-03-08 Jason Merrill <jason@redhat.com>
7513
7514 * c-opts.c (set_std_cxx1z): Don't enable concepts.
7515
64b23c13
DM
75162016-03-04 David Malcolm <dmalcolm@redhat.com>
7517
7518 PR c/68187
7519 * c-indentation.c (get_visual_column): Move code to determine next
7520 tab stop to...
7521 (next_tab_stop): ...this new function.
7522 (line_contains_hash_if): Delete function.
7523 (detect_preprocessor_logic): Delete function.
7524 (get_first_nws_vis_column): New function.
7525 (detect_intervening_unindent): New function.
7526 (should_warn_for_misleading_indentation): Replace call to
7527 detect_preprocessor_logic with a call to
7528 detect_intervening_unindent.
7529
729526f5
DM
75302016-03-04 David Malcolm <dmalcolm@redhat.com>
7531
7532 PR c/68187
7533 * c-indentation.c (should_warn_for_misleading_indentation): When
7534 suppressing warnings about cases where the guard and body are on
7535 the same column, only use the first non-whitespace column in place
7536 of the guard token column when dealing with "else" clauses.
7537 When rejecting aligned BODY and NEXT, loosen the requirement
7538 from equality with the first non-whitespace of guard to simply
7539 that they not be indented relative to it.
7540
e9a35493
RB
75412016-03-04 Richard Biener <rguenther@suse.de>
7542
7543 PR c++/70054
7544 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
7545 instead of alias_sets_conflict_p.
7546
1be56bc5
MP
75472016-03-01 Marek Polacek <polacek@redhat.com>
7548
7549 PR c++/69795
7550 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
7551 any DECL.
7552
35886f0b
MS
75532016-02-22 Martin Sebor <msebor@redhat.com>
7554
7555 PR middle-end/69780
7556 * c-common.c (check_builtin_function_arguments): Validate and
7557 reject invalid arguments to __builtin_alloca_with_align.
7558
4246c8da
MW
75592016-02-20 Mark Wielaard <mjw@redhat.com>
7560
7561 PR c/28901
7562 * c.opt (Wunused-const-variable): Turn into Alias for...
7563 (Wunused-const-variable=): New option.
7564
268be88c
BE
75652016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
7566
7567 PR c++/69865
7568 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
7569 here...
7570 (c_common_init_options): ...to here.
7571 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
7572
871b3f47
JJ
75732016-02-19 Jakub Jelinek <jakub@redhat.com>
7574
7575 PR c++/69826
7576 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
7577 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
7578 flag_preprocess_only.
7579
bf14eba2
JJ
75802016-02-16 Jakub Jelinek <jakub@redhat.com>
7581
7582 PR c/69835
7583 * c.opt (Wnonnull-compare): Enable for -Wall.
7584
ba6b3795
JJ
75852016-02-15 Jakub Jelinek <jakub@redhat.com>
7586
7587 PR c++/69797
7588 * c-common.c (sync_resolve_size): Diagnose too few arguments
7589 even when params is non-NULL empty vector.
7590
a011cd92
BS
75912016-02-08 Bernd Schmidt <bschmidt@redhat.com>
7592
7593 PR target/60410
7594 * c.opt (fshort-double): Remove.
7595
46cb9332
MS
75962016-02-05 Martin Sebor <msebor@redhat.com>
7597
7598 PR c++/69662
7599 * c.opt (Warning options): Update -Wplacement-new to take
7600 an optional argument.
7601
e1b81f2b
JJ
76022016-02-01 Jakub Jelinek <jakub@redhat.com>
7603
7604 PR preprocessor/69543
7605 PR c/69558
7606 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
7607 instead of loc to control_warning_option.
7608
b6adbb9f
NS
76092016-02-01 Nathan Sidwell <nathan@codesourcery.com>
7610
7611 * c.opt (fopenacc-dim=): New option.
7612
5d70666e
RB
76132016-01-27 Ryan Burn <contact@rnburn.com>
7614
7615 PR cilkplus/69267
7616 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
7617 gimplify_arg. Removed superfluous post_p argument.
7618 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
7619 superfluous post_p argument.
7620 * c-gimplify.c (c_gimplify_expr): Likewise.
7621
01e1dea3
DM
76222016-01-26 David Malcolm <dmalcolm@redhat.com>
7623
7624 PR other/69006
7625 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
7626 pp_newline_and_flush with pp_flush.
7627
9f04a53e
MS
76282016-01-20 Martin Sebor <msebor@redhat.com>
7629
7630 PR c/69405
7631 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
7632 an incompatible argument when the argument isn't a valid tree node.
7633
7f26f7df
JM
76342016-01-18 Jason Merrill <jason@redhat.com>
7635
7636 PR c++/68767
7637 * c-common.c (check_function_arguments_recurse): Fold the whole
7638 COND_EXPR, not just the condition.
7639
f62bf092
TV
76402016-01-18 Tom de Vries <tom@codesourcery.com>
7641
7642 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
7643 classify as loop clause.
7644
e0a575ff
JJ
76452016-01-15 Jakub Jelinek <jakub@redhat.com>
7646
7647 PR bootstrap/68271
7648 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
7649 C++ FE no longer has limit on number of pragmas.
7650
76512015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
7652
7653 PR c++/69048
7654 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 7655 to add missing cleanup point.
b6e3db06 7656
c7df95d8
DM
76572016-01-14 David Malcolm <dmalcolm@redhat.com>
7658
7659 PR c++/68819
7660 * c-indentation.c (get_visual_column): Add location_t param.
7661 Handle the column number being zero by effectively disabling the
7662 warning, with an "inform".
7663 (should_warn_for_misleading_indentation): Add location_t argument
7664 for all uses of get_visual_column.
7665
21efdd80
PP
76662016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
7667
7668 PR c++/69029
7669 * c-indentation.c (should_warn_for_misleading_indentation):
7670 Don't warn about do-while statements.
7671
7a127fa7
MS
76722016-01-07 Martin Sebor <msebor@redhat.com>
7673
7674 PR c/68966
7675 * c-common.c (sync_resolve_size): Reject first argument when it's
7676 a pointer to _Bool.
7677
c589e975
DM
76782016-01-05 David Malcolm <dmalcolm@redhat.com>
7679
7680 PR c/69122
7681 * c-indentation.c (get_visual_column): Remove default argument.
7682 (should_warn_for_misleading_indentation): For the multiline case,
7683 update call to get_visual_column for next_stmt_exploc so that it
7684 captures the location of the first non-whitespace character in the
7685 relevant line. Don't issue warnings if there is non-whitespace
7686 before the next statement.
7687
818ab71a
JJ
76882016-01-04 Jakub Jelinek <jakub@redhat.com>
7689
7690 Update copyright years.
7691
745e411d
DM
76922015-12-21 David Malcolm <dmalcolm@redhat.com>
7693
7694 * c-common.c (binary_op_error): Convert first param from
7695 location_t to rich_location * and use it when emitting an error.
7696 * c-common.h (binary_op_error): Convert first param from
7697 location_t to rich_location *.
7698
de67c4c3
DM
76992015-12-16 David Malcolm <dmalcolm@redhat.com>
7700
7701 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
7702 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
7703
4a38b02b
IV
77042015-12-15 Ilya Verbin <ilya.verbin@intel.com>
7705
7706 * c-common.c (c_common_attribute_table): Handle "omp declare target
7707 link" attribute.
7708
54d62f51
JJ
77092015-12-14 Jakub Jelinek <jakub@redhat.com>
7710
7711 PR c/68833
7712 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
7713
8d4227c8
TB
77142014-12-12 Tobias Burnus <burnus@net-b.de>
7715
7716 PR fortran/68815
7717 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
7718 specifiers (%d, %i,%u and %c).
7719
f6069ccc
DM
77202015-12-10 David Malcolm <dmalcolm@redhat.com>
7721
7722 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
7723
63bbf46d
JJ
77242015-12-08 Jakub Jelinek <jakub@redhat.com>
7725
7726 PR c/48088
7727 PR c/68657
7728 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
7729 * c-pragma.c (handle_pragma_diagnostic): Adjust
7730 control_warning_option caller.
7731
f79520bb
DM
77322015-12-07 David Malcolm <dmalcolm@redhat.com>
7733
7734 * c-common.c (c_cpp_error): Update for change to
7735 rich_location::set_range.
7736
b3d5bc62
JJ
77372015-12-04 Paolo Bonzini <bonzini@gnu.org>
7738
7739 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
7740 shifting 1 out of the sign bit.
7741
77422015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
7743
7744 * c-common.c (c_common_attribute_table[]): Update max arguments
7745 count for "simd" attribute.
7746 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
7747
6eb4a537
JJ
77482015-12-03 Jakub Jelinek <jakub@redhat.com>
7749
7750 PR preprocessor/57580
7751 * c-ppoutput.c (print): Change printed field to bool.
7752 Move src_file last for smaller padding.
7753 (init_pp_output): Set print.printed to false instead of 0.
7754 (scan_translation_unit): Fix up formatting. Set print.printed
7755 to true after printing something other than newline.
7756 (scan_translation_unit_trad): Set print.printed to true instead of 1.
7757 (maybe_print_line_1): Set print.printed to false instead of 0.
7758 (print_line_1): Likewise.
7759 (do_line_change): Set print.printed to true instead of 1.
7760 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
7761 dump_macro): Set print.printed to false after printing newline.
7762
4250754e
JM
77632015-12-02 Jason Merrill <jason@redhat.com>
7764
f479b43d
JM
7765 * c-common.c (fold_for_warn): New.
7766 (warn_logical_operator, warn_tautological_cmp)
7767 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
7768
4250754e
JM
7769 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
7770 (c_fully_fold_internal, decl_constant_value_for_optimization):
7771 Move to c/c-fold.c.
7772 * c-common.h: Don't declare decl_constant_value_for_optimization.
7773
e9e32ee6
JM
77742015-12-02 Joseph Myers <joseph@codesourcery.com>
7775
7776 PR c/68162
7777 * c-common.h (c_build_qualified_type): Add extra default
7778 arguments.
7779
37d5ad46
JB
77802015-12-01 Julian Brown <julian@codesourcery.com>
7781 Cesar Philippidis <cesar@codesourcery.com>
7782 James Norris <James_Norris@mentor.com>
7783
7784 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
7785 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
7786 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
7787
f07862c7
EB
77882015-11-30 Eric Botcazou <ebotcazou@adacore.com>
7789
7790 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
7791 (decl_sloc_common): Delete and move bulk of processing to...
7792 (decl_sloc): ...here.
7793 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
7794 (dump_ada_double_name): Remove S parameter and compute the suffix.
7795 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
7796 element type and deal with an anonymous one.
7797 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
7798 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
7799 and remove reference to QUAL_UNION_TYPE.
7800 (dump_nested_types): Make 2 passes on the fields and move bulk to...
7801 (dump_nested_type): ...here. New function extracted from above.
7802 Generate a full declaration for anonymous element type of arrays.
7803 (print_ada_declaration): Really skip anonymous declarations. Remove
7804 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
7805 Clean up processing of declarations of array types and objects.
7806 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
7807 Remove obsolete code and tidy up.
7808
75c8aac3
JH
78092015-11-29 Jan Hubicka <hubicka@ucw.cz>
7810
7811 PR c/67581
7812 * c-common.c (handle_transparent_union_attribute): Update
7813 also type variants.
7814
b58d3df2
ML
78152015-11-27 Martin Liska <mliska@suse.cz>
7816
7817 PR c++/68312
7818 * array-notation-common.c (cilkplus_extract_an_triplets):
7819 Release vector of vectors.
7820 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
7821
89a01fcf
EB
78222015-11-26 Eric Botcazou <ebotcazou@adacore.com>
7823
7824 PR c++/68527
7825 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
7826 (print_ada_struct_decl): Likewise.
7827
cc5c5226
IZ
78282015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
7829
7830 PR c++/68001
7831 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
7832 * cilk.c (recognize_spawn): Determine location in a more precise
7833 way.
7834
269adb9d
JM
78352015-11-19 Jason Merrill <jason@redhat.com>
7836
7837 * c-common.c (shorten_compare): But look through macros from
7838 system headers.
7839
d0eccfcd
JM
78402015-11-18 Jason Merrill <jason@redhat.com>
7841
7842 * c-common.c (shorten_compare): Don't -Wtype-limits if the
7843 non-constant operand comes from a macro.
7844
3e44547c
JM
78452015-11-17 Jason Merrill <jason@redhat.com>
7846
7847 PR bootstrap/68346
7848 * c-common.c (warn_tautological_cmp): Fold before checking for
7849 constants.
7850
0f62c7a0
MP
78512015-11-16 Marek Polacek <polacek@redhat.com>
7852
7853 PR c++/68362
7854 * c-common.c (check_case_bounds): Fold low and high cases.
7855
a868811e
MP
78562015-11-16 Marek Polacek <polacek@redhat.com>
7857
7858 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
7859 * c-common.c (c_common_get_alias_set): Likewise.
7860 (handle_visibility_attribute): Likewise.
7861
fff77217
KY
78622015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
7863
7864 * c-common.c (handle_simd_attribute): New.
7865 (struct attribute_spec): Add entry for "simd".
7866 (handle_simd_attribute): New.
7867
269e63b7
KT
78682015-11-13 Kai Tietz <ktietz70@googlemail.com>
7869
7870 * c-lex.c (interpret_float): Use fold_convert.
7871
ebedc9a3
DM
78722015-11-13 David Malcolm <dmalcolm@redhat.com>
7873
7874 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
7875 and store it on the result.
7876 * c-opts.c (c_common_init_options): Set
7877 global_dc->colorize_source_p.
7878
6e232ba4
JN
78792015-11-12 James Norris <jnorris@codesourcery.com>
7880 Joseph Myers <joseph@codesourcery.com>
7881
7365279f 7882 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
7883 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
7884 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
7885 PRAGMA_OACC_CLAUSE_LINK.
7886
e78bede6
MP
78872015-11-11 Marek Polacek <polacek@redhat.com>
7888
7889 PR c/68107
7890 PR c++/68266
7891 * c-common.c (valid_array_size_p): New function.
7892 * c-common.h (valid_array_size_p): Declare.
7893
3f8257db 78942015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
7895
7896 PR bootstrap/68271
7897 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
7898
69f293c9
AM
78992015-11-11 Andrew MacLeod <amacleod@redhat.com>
7900
7901 * array-notation-common.c: Remove unused header files.
7902 * c-ada-spec.c: Likewise.
7903 * c-cilkplus.c: Likewise.
7904 * c-common.c: Likewise.
7905 * c-cppbuiltin.c: Likewise.
7906 * c-dump.c: Likewise.
7907 * c-format.c: Likewise.
7908 * c-gimplify.c: Likewise.
7909 * c-indentation.c: Likewise.
7910 * c-lex.c: Likewise.
7911 * c-omp.c: Likewise.
7912 * c-opts.c: Likewise.
7913 * c-pch.c: Likewise.
7914 * c-ppoutput.c: Likewise.
7915 * c-pragma.c: Likewise.
7916 * c-pretty-print.c: Likewise.
7917 * c-semantics.c: Likewise.
7918 * c-ubsan.c: Likewise.
7919 * cilk.c: Likewise.
7920 * stub-objc.c: Likewise.
7921
3a40d81d
NS
79222015-11-09 Thomas Schwinge <thomas@codesourcery.com>
7923 Cesar Philippidis <cesar@codesourcery.com>
7924 James Norris <jnorris@codesourcery.com>
7925 Julian Brown <julian@codesourcery.com>
7926 Nathan Sidwell <nathan@codesourcery.com>
7927
7928 * c-pragma.c (oacc_pragmas): Add "routine".
7929 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
7930
ee45a32d
EB
79312015-11-08 Eric Botcazou <ebotcazou@adacore.com>
7932
7933 * c-common.c (c_common_attributes): Add scalar_storage_order.
7934 (handle_scalar_storage_order_attribute): New function.
7935 * c-pragma.c (global_sso): New variable.
7936 (maybe_apply_pragma_scalar_storage_order): New function.
7937 (handle_pragma_scalar_storage_order): Likewise.
7938 (init_pragma): Register scalar_storage_order.
7939 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
7940 * c.opt (Wscalar-storage-order): New warning.
7941 (fsso-struct=): New option.
7942
eb11eb15
MS
79432015-11-08 Martin Sebor <msebor@redhat.com>
7944
7945 * c.opt (Wplacement-new): Add a period to the end of a sentence.
7946
0aad0198
RS
79472015-11-07 Richard Sandiford <richard.sandiford@arm.com>
7948
7949 * c-common.c: Don't undef DEF_BUILTIN.
7950
8a645150
DM
79512015-11-06 David Malcolm <dmalcolm@redhat.com>
7952
7953 * c-common.c (c_cpp_error): Convert parameter from location_t to
7954 rich_location *. Eliminate the "column_override" parameter and
7955 the call to diagnostic_override_column.
7956 Update the "done_lexing" clause to set range 0
7957 on the rich_location, rather than overwriting a location_t.
7958 * c-common.h (c_cpp_error): Convert parameter from location_t to
7959 rich_location *. Eliminate the "column_override" parameter.
7960
7a5e4956
CP
79612015-11-05 Cesar Philippidis <cesar@codesourcery.com>
7962 Thomas Schwinge <thomas@codesourcery.com>
7963 James Norris <jnorris@codesourcery.com>
7964
7965 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
7966 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
7967 clauses with parallel and kernels and loops.
7968 * c-pragma.h (enum pragma_omp_clause): Add entries for
7969 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
7970 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
7971 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
7972 INDEPENDENT,SEQ}.
7973 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
7974
e2f5cc96
MS
79752015-11-05 Martin Sebor <msebor@redhat.com>
7976
7977 PR c++/67942
7978 * c.opt (-Wplacement-new): New option.
7979
e01d41e5
JJ
79802015-11-05 Jakub Jelinek <jakub@redhat.com>
7981
7982 * c-common.h (c_finish_omp_atomic): Add TEST argument.
7983 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
7984 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
7985 save_expr or create_tmp_var* if TEST is true.
7986 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
7987 Don't call add_stmt here.
7988 (struct c_omp_check_loop_iv_data): New type.
7989 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
7990 c_omp_check_loop_iv_exprs): New functions.
7991 (c_omp_split_clauses): Adjust for lastprivate being allowed on
7992 distribute.
7993 (c_omp_declare_simd_clauses_to_numbers): Change
7994 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
7995 (c_omp_declare_simd_clauses_to_decls): Similarly change those
7996 from numbers to PARM_DECLs.
7997
595278be
MM
79982015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
7999
8000 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
8001 flag_checking.
8002
3f8257db 80032015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
8004
8005 PR c++-common/67882
b3d5bc62
JJ
8006 * c-common.h (fold_offsetof_1): Add argument.
8007 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
8008 offsetof expressions that reference elements past the end of
8009 an array.
8010
4bf9e5a8
TS
80112015-11-03 Thomas Schwinge <thomas@codesourcery.com>
8012 Chung-Lin Tang <cltang@codesourcery.com>
8013
8014 * c-pragma.c (oacc_pragmas): Add "atomic".
8015 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
8016
3b1661a9
ES
80172015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
8018
8019 * c-common.c (handle_target_clones_attribute): New.
8020 (c_common_attribute_table): Add handle_target_clones_attribute.
8021 (handle_always_inline_attribute): Add check on target_clones attribute.
8022 (handle_target_attribute): Ditto.
8023
2adfab87
AM
80242015-10-29 Andrew MacLeod <amacleod@redhat.com>
8025
8026 * array-notation-common.c: Reorder #include's and remove duplicates.
8027 * c-ada-spec.c: Likewise.
8028 * c-cilkplus.c: Likewise.
8029 * c-common.c: Likewise.
8030 * c-cppbuiltin.c: Likewise.
8031 * c-dump.c: Likewise.
8032 * c-format.c: Likewise.
8033 * c-gimplify.c: Likewise.
8034 * c-indentation.c: Likewise.
8035 * c-lex.c: Likewise.
8036 * c-omp.c: Likewise.
8037 * c-opts.c: Likewise.
8038 * c-pch.c: Likewise.
8039 * c-ppoutput.c: Likewise.
8040 * c-pragma.c: Likewise.
8041 * c-pretty-print.c: Likewise.
8042 * c-semantics.c: Likewise.
8043 * c-ubsan.c: Likewise.
8044 * cilk.c: Likewise.
8045 * stub-objc.c: Likewise.
8046
d90ec4f2
JM
80472015-10-28 Jason Merrill <jason@redhat.com>
8048
8049 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
8050
88bae6f4
TS
80512015-10-27 Thomas Schwinge <thomas@codesourcery.com>
8052 James Norris <jnorris@codesourcery.com>
8053 Cesar Philippidis <cesar@codesourcery.com>
8054
8055 PR c/64765
8056 PR c/64880
8057 * c-common.h (c_oacc_split_loop_clauses): Declare function.
8058 * c-omp.c (c_oacc_split_loop_clauses): New function.
8059
b1726d6c
MS
80602015-10-21 Martin Sebor <msebor@redhat.com>
8061
8062 PR driver/68043
8063 * c.opt: End each sentence that describes an option with a period.
8064
fa60eeb9
MP
80652015-10-20 Marek Polacek <polacek@redhat.com>
8066
8067 * array-notation-common.c (is_cilkplus_vector_p): Define.
8068 * c-common.h (is_cilkplus_vector_p): Declare.
8069
95979049
MP
80702015-10-20 Marek Polacek <polacek@redhat.com>
8071
8072 * c.opt (std=gnu++11): Do not describe as experimental.
8073 (std=gnu++14): Likewise.
8074
2a9fb712
JM
80752015-10-19 Jason Merrill <jason@redhat.com>
8076
8077 * c-cppbuiltin.c (c_cpp_builtins): Define
8078 __cpp_nontype_template_args.
8079
13b380a3
JM
80802015-10-19 Jason Merrill <jason@redhat.com>
8081
8082 * c-cppbuiltin.c (c_cpp_builtins): Define
8083 __cpp_enumerator_attributes, __cpp_fold_expressions,
8084 __cpp_unicode_characters.
8085
d9a6bd32
JJ
80862015-10-13 Jakub Jelinek <jakub@redhat.com>
8087 Aldy Hernandez <aldyh@redhat.com>
8088
8089 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
8090 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
8091 (c_define_builtins): Likewise.
8092 * c-common.h (enum c_omp_clause_split): Add
8093 C_OMP_CLAUSE_SPLIT_TASKLOOP.
8094 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
8095 (c_finish_omp_for): Add ORIG_DECLV argument.
8096 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
8097 201511 instead of 201307.
8098 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
8099 OMP_CRITICAL_CLAUSES to it.
8100 (c_finish_omp_ordered): Add CLAUSES argument, set
8101 OMP_ORDERED_CLAUSES to it.
8102 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
8103 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
8104 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
8105 constructs and new OpenMP 4.5 clauses. Clear
8106 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
8107 verification code.
8108 * c-pragma.c (omp_pragmas_simd): Add taskloop.
8109 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
8110 (enum pragma_omp_clause): Add
8111 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
8112 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
8113
624d31fe
RS
81142015-10-05 Richard Sandiford <richard.sandiford@arm.com>
8115
8116 * c-lex.c (interpret_float): Use real_equal instead of
8117 REAL_VALUES_EQUAL.
8118
b8fd7909
JM
81192015-10-04 Jason Merrill <jason@redhat.com>
8120
8121 Implement N4514, C++ Extensions for Transactional Memory.
8122 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
8123 (c_common_attribute_table): Add transaction_safe_dynamic.
8124 transaction_safe now affects type identity.
8125 (handle_tm_attribute): Handle transaction_safe_dynamic.
8126 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
8127 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
8128 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
8129 (D_TRANSMEM): New.
8130 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
8131 * c-pretty-print.c (pp_c_attributes_display): Don't print
8132 transaction_safe in C++.
8133
12651878
MP
81342015-10-02 Marek Polacek <polacek@redhat.com>
8135
8136 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
8137
3e3b8d63
MP
81382015-10-02 Marek Polacek <polacek@redhat.com>
8139
8140 PR c/64249
8141 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
8142 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
8143 * c.opt (Wduplicated-cond): New option.
8144
0d1a8f75
JM
81452015-10-01 Joseph Myers <joseph@codesourcery.com>
8146
8147 * c.opt (std=c11): Do not describe as experimental.
8148 (std=gnu11): Likewise.
8149 (std=iso9899:2011): Likewise.
8150
3e32ee19
NS
81512015-09-28 Nathan Sidwell <nathan@codesourcery.com>
8152
8153 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
8154 (DEF_FUNCTION_TYPE_VAR_11): Delete.
8155
974348ee
MP
81562015-09-25 Marek Polacek <polacek@redhat.com>
8157
8158 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
8159 (ubsan_instrument_shift): Likewise.
8160
15dbc1a6
MP
81612015-09-25 Marek Polacek <polacek@redhat.com>
8162
8163 PR sanitizer/64906
8164 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
8165
6b95d7cc
PP
81662015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
8167
8168 * c-indentation.c (should_warn_for_misleading_indentation):
8169 Compare next_stmt_vis_column with guard_line_first_nws instead
8170 of with guard_line_vis_column.
8171
c1822f9c
MLI
81722015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
8173
8174 PR c/49654
8175 PR c/49655
8176 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
8177 options and options not valid for the current language.
8178
d5398058
PP
81792015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
8180
8181 * c-indentation.c (should_warn_for_misleading_indentation):
8182 Float out and consolidate the calls to get_visual_column that
8183 are passed guard_exploc as an argument. Compare
8184 next_stmt_vis_column with guard_line_first_nws instead of with
8185 body_line_first_nws.
8186
6b333269
NS
81872015-09-22 Nathan Sidwell <nathan@codesourcery.com>
8188
8189 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
8190 Wnamespaces): New C++ warnings.
8191
a75f1574
JM
81922015-09-22 Jason Merrill <jason@redhat.com>
8193
8194 * c-common.h (abi_compat_version_crosses): New.
8195 (warn_abi_version): Declare.
8196 * c-common.c: Define it.
8197 * c-opts.c (c_common_post_options): Handle it.
8198 flag_abi_compat_version defaults to 8.
8199
bdaaa8b7
VV
82002015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
8201
8202 Complete the implementation of N4230, Nested namespace definition.
8203 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
8204 __cpp_nested_namespace_definitions.
8205
eaa797e8
MLI
82062015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8207
8208 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
8209
c4914de6
MLI
82102015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8211
8212 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
8213 when warning.
8214 * c-pragma.h (pragma_lex): Add optional loc argument.
8215
fcb87c50
MM
82162015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
8217
8218 * c-format.c (check_format_arg): Adjust to use common block size in all
8219 object pools.
8220
31bdd08a
DM
82212015-09-15 David Malcolm <dmalcolm@redhat.com>
8222
8223 * c-format.c (location_from_offset): Update for change in
8224 signature of location_get_source_line.
8225 * c-indentation.c (get_visual_column): Likewise.
8226 (line_contains_hash_if): Likewise.
8227
aa9f4b4c
MP
82282015-09-14 Marek Polacek <polacek@redhat.com>
8229
8230 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
8231 setting various warnings.
8232
aa256c4a
MP
82332015-09-14 Marek Polacek <polacek@redhat.com>
8234
8235 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
8236 a negative value.
8237
0f876f22
MW
82382015-09-11 Mark Wielaard <mjw@redhat.com>
8239
8240 PR c/28901
8241 * c.opt (Wunused-variable): Option from common.opt.
8242 (Wunused-const-variable): New option.
8243
273aa49e
PC
82442015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
8245
8246 PR c++/53184
8247 * c.opt ([Wsubobject-linkage]): Add.
8248
1807ffc1
MS
82492015-09-03 Martin Sebor <msebor@redhat.com>
8250
8251 PR c/66516
8252 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
8253 functions.
8254 * c-common.c (reject_gcc_builtin): Define.
8255
38942840
BI
82562015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
8257
8258 PR middle-end/60586
8259 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
8260 prototype.
8261 * c-gimplify.c (c_gimplify_expr): Added a call to the function
8262 cilk_gimplify_call_params_in_spawned_fn.
8263 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
8264 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
8265 unwrapping.
8266
c316b5e4
MP
82672015-08-25 Marek Polacek <polacek@redhat.com>
8268
8269 PR middle-end/67330
8270 * c-common.c (handle_weak_attribute): Don't check whether the
8271 visibility can be changed here.
8272
584a7c46
MLI
82732015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8274
8275 * c-lex.c (c_lex_with_flags): Use explicit locations.
8276
a79683d5
TS
82772015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
8278
8279 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
8280 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
8281
61717a45
FXC
82822015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
8283
8284 PR middle-end/36757
8285 * c-common.c (check_builtin_function_arguments): Add check
8286 for BUILT_IN_SIGNBIT argument.
8287
329524f5
PC
82882015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
8289
8290 PR c++/67160
8291 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
8292 in c++1z mode.
8293
4ee55665
MP
82942015-08-17 Marek Polacek <polacek@redhat.com>
8295
8296 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
8297 with whitespaces before qualifier names.
8298
b893e375
MP
82992015-08-12 Marek Polacek <polacek@redhat.com>
8300
8301 PR c++/55095
8302 * c-common.c (maybe_warn_shift_overflow): Properly handle
8303 left-shifting 1 into the sign bit.
8304
c2d89095
MLI
83052015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8306
8307 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
8308
971e17ff
AS
83092015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
8310 Braden Obrzut <admin@maniacsvault.net>
8311 Jason Merrill <jason@redhat.com>
8312
8313 Add C++ Concepts TS support.
8314 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
8315 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
8316 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
8317 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
8318 * c-opts.c (set_std_cxx1z): Set flag_concepts.
8319 * c.opt (fconcepts): New.
8320
b3d5bc62
JJ
83212015-08-02 Martin Sebor <msebor@redhat.com>
8322
8323 * c.opt (-Wframe-address): New warning option.
8324
8ebca419
PP
83252015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8326
8327 * c-indentation.c (should_warn_for_misleading_indentation):
8328 Improve heuristics.
8329
1a1e101f
PP
83302015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8331
8332 * c-indentation.c (get_visual_column): Add parameter first_nws,
8333 use it. Update comment documenting the function.
8334 (is_first_nonwhitespace_on_line): Remove.
8335 (should_warn_for_misleading_indentation): Replace usage of
8336 of is_first_nonwhitespace_on_line with get_visual_column.
8337
992118a1
PP
83382015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8339
8340 * c-indentation.h (struct token_indent_info): Define.
8341 (get_token_indent_info): Define.
8342 (warn_for_misleading_information): Declare.
8343 * c-common.h (warn_for_misleading_information): Remove.
8344 * c-identation.c (warn_for_misleading_indentation):
8345 Change declaration to take three token_indent_infos. Adjust
8346 accordingly.
8347 * c-identation.c (should_warn_for_misleading_indentation):
8348 Likewise. Bail out early if the body is a compound statement.
8349 (guard_tinfo_to_string): Define.
8350
e8fa3817
JM
83512015-07-30 Jason Merrill <jason@redhat.com>
8352
8353 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
8354 '*' for reference decay.
8355
173864e8
MP
83562015-07-30 Marek Polacek <polacek@redhat.com>
8357
8358 * c-common.c (warn_tautological_cmp): Bail for float types.
8359
f2afe6dd
MP
83602015-07-27 Marek Polacek <polacek@redhat.com>
8361
8362 PR bootstrap/67030
8363 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
8364
05b28fd6
MP
83652015-07-27 Marek Polacek <polacek@redhat.com>
8366
8367 PR c++/66555
8368 PR c/54979
8369 * c-common.c (find_array_ref_with_const_idx_r): New function.
8370 (warn_tautological_cmp): New function.
8371 * c-common.h (warn_tautological_cmp): Declare.
8372 * c.opt (Wtautological-compare): New option.
8373
5a5062b8
MP
83742015-07-23 Marek Polacek <polacek@redhat.com>
8375
8376 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
8377 (ubsan_instrument_shift): Likewise.
8378
dc891fe7
MP
83792015-07-23 Marek Polacek <polacek@redhat.com>
8380
8381 PR sanitizer/66908
8382 * c-ubsan.c: Include gimplify.h.
8383 (ubsan_instrument_division): Unshare OP0 and OP1.
8384 (ubsan_instrument_shift): Likewise.
8385
451b5e48
MP
83862015-07-20 Marek Polacek <polacek@redhat.com>
8387 Richard Sandiford <richard.sandiford@arm.com>
8388
8389 PR c++/55095
8390 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
8391 Use EXPR_LOC_OR_LOC.
8392 (maybe_warn_shift_overflow): New function.
8393 * c-common.h (maybe_warn_shift_overflow): Declare.
8394 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
8395 * c.opt (Wshift-overflow): New option.
8396
fb0b2914
ML
83972015-07-16 Martin Liska <mliska@suse.cz>
8398
8399 * c-format.c (static void check_format_info_main): Use
8400 object_allocator instead of pool_allocator.
8401 (check_format_arg): Likewise.
8402 (check_format_info_main): Likewise.
8403
903f5c23
AM
84042015-07-15 Andrew MacLeod <amacleod@redhat.com>
8405
8406 * c-opts.c: Remove multiline #include comment.
8407
026c3cfd
AH
84082015-07-12 Aldy Hernandez <aldyh@redhat.com>
8409
8410 * c-common.c: Fix double word typos.
8411
bb49ee66
EB
84122015-07-10 Eric Botcazou <ebotcazou@adacore.com>
8413
8414 * c-ada-spec.h (cpp_operation): Revert latest change.
8415 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
8416 constructors and destructors.
8417
1916bcb5
AM
84182015-07-09 Andrew MacLeod <amacleod@redhat.com>
8419
8420 * c-common.h: Adjust includes for flags.h changes.
8421 * stub-objc.c: Likewise.
026c3cfd 8422
a9dcd529
EB
84232015-07-08 Eric Botcazou <ebotcazou@adacore.com>
8424
8425 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
8426 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
8427
b03b462f
JJ
84282015-07-08 Jakub Jelinek <jakub@redhat.com>
8429
8430 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
8431 are to be removed, return NULL rather than original clauses list.
8432
c7131fb2
AM
84332015-07-07 Andrew MacLeod <amacleod@redhat.com>
8434
8435 * array-notation-common.c: Adjust includes.
8436 * c-ada-spec.c: Likewise.
8437 * c-cilkplus.c: Likewise.
8438 * c-common.h: Likewise.
8439 * c-cppbuiltin.c: Likewise.
8440 * c-dump.c: Likewise.
8441 * c-format.c: Likewise.
8442 * c-gimplify.c: Likewise.
8443 * c-indentation.c: Likewise.
8444 * c-lex.c: Likewise.
8445 * c-omp.c: Likewise.
8446 * c-opts.c: Likewise.
8447 * c-pch.c: Likewise.
8448 * c-ppoutput.c: Likewise.
8449 * c-pragma.c: Likewise.
8450 * c-pretty-print.c: Likewise.
8451 * c-semantics.c: Likewise.
8452 * c-ubsan.c: Likewise.
8453 * cilk.c: Likewise.
8454 * stub-objc.c: Likewise.
8455
2a7fb83f
EB
84562015-07-07 Eric Botcazou <ebotcazou@adacore.com>
8457
8458 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
8459 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
8460
a03c9bf1
JM
84612015-07-01 Jason Merrill <jason@redhat.com>
8462
36a85135
JM
8463 * c-common.h (D_CXX11): Rename from D_CXX0X.
8464 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
8465 * c-common.c: Adjust.
8466
e7fa68d5
JM
8467 * c-opts.c (c_common_post_options): Default to C++14.
8468
a03c9bf1
JM
8469 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
8470
fe95b036
ESR
84712015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
8472
8473 Implement N4197 - Adding u8 character literals
b3d5bc62 8474 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 8475 CPP_CHAR.
b3d5bc62 8476 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 8477 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 8478 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
8479 and CPP_UTF8CHAR tokens.
8480 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 8481
da2e71c9
MLI
84822015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8483
8484 PR fortran/66605
8485 * c-common.c (do_warn_unused_parameter): Move here.
8486 * c-common.h (do_warn_unused_parameter): Declare.
8487
b155cfd9
MP
84882015-06-29 Marek Polacek <polacek@redhat.com>
8489
8490 PR c/66322
8491 * c-common.c (check_case_bounds): Add bool * parameter. Set
8492 OUTSIDE_RANGE_P.
8493 (c_add_case_label): Add bool * parameter. Pass it down to
8494 check_case_bounds.
8495 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
8496 warning here.
8497 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
8498 declarations.
8499
31521951
MP
85002015-06-27 Marek Polacek <polacek@redhat.com>
8501
8502 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
8503 or VECTOR_INTEGER_TYPE_P throughout.
8504 * c-gimplify.c: Likewise.
8505
22d03525
MP
85062015-06-26 Marek Polacek <polacek@redhat.com>
8507
8508 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
8509 * c-common.c (c_fully_fold_internal): Likewise.
8510 (c_alignof_expr): Likewise.
8511 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
8512 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 8513 * cilk.c (create_parm_list): Likewise.
22d03525 8514
af05e6e5
MP
85152015-06-26 Marek Polacek <polacek@redhat.com>
8516
8517 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
8518
f0889939
AM
85192015-06-25 Andrew MacLeod <amacleod@redhat.com>
8520
8521 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
8522 * c-gimplify.c: Likewise.
8523 * c-pragma.c: Likewise.
8524 * c-ubsan.c: Likewise.
8525 * cilk.c: Likewise.
8526
ca752f39
RS
85272015-06-25 Richard Sandiford <richard.sandiford@arm.com>
8528
8529 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
8530 ggc_hasher.
8531
16a16ec7
AM
85322015-06-25 Andrew MacLeod <amacleod@redhat.com>
8533
8534 * cilk.c: Move calls.h after tm.h in the include chain.
8535
0ae9bd27
MP
85362015-06-25 Marek Polacek <polacek@redhat.com>
8537
8538 * array-notation-common.c: Use VAR_P throughout.
8539 * c-ada-spec.c: Likewise.
8540 * c-common.c: Likewise.
8541 * c-format.c: Likewise.
8542 * c-gimplify.c: Likewise.
8543 * c-omp.c: Likewise.
8544 * c-pragma.c: Likewise.
8545 * c-pretty-print.c: Likewise.
8546 * cilk.c: Likewise.
8547
62f9079a
MP
85482015-06-25 Marek Polacek <polacek@redhat.com>
8549
8550 * cilk.c (extract_free_variables): Use is_global_var.
8551
0fa16060
RS
85522015-06-23 Richard Sandiford <richard.sandiford@arm.com>
8553
8554 * c-common.c: Don't include target-def.h.
8555
a68ae2e1
MP
85562015-06-23 Marek Polacek <polacek@redhat.com>
8557
8558 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
8559 when comparing INTEGER_CSTs.
8560
c6a2f2d9
PMR
85612015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
8562
8563 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
8564 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
8565 (dump_ada_template): Skip partially specialized types.
8566
6b4db501
MM
85672015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
8568
8569 * c-common.c (scalar_to_vector): Use std::swap instead of manually
8570 swapping.
8571
abb226c9
AM
85722015-06-17 Andrew MacLeod <amacleod@redhat.com>
8573
8574 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
8575 * c-ada-spec.c: Likewise.
8576 * c-cilkplus.c: Likewise.
8577 * c-common.c: Likewise.
8578 * c-common.h: Likewise.
8579 * c-cppbuiltin.c: Likewise.
8580 * c-dump.c: Likewise.
8581 * c-format.c: Likewise.
8582 * c-gimplify.c: Likewise.
8583 * c-indentation.c: Likewise.
8584 * c-lex.c: Likewise.
8585 * c-omp.c: Likewise.
8586 * c-opts.c: Likewise.
8587 * c-pch.c: Likewise.
8588 * c-ppoutput.c: Likewise.
8589 * c-pragma.c: Likewise.
8590 * c-pretty-print.c: Likewise.
8591 * c-semantics.c: Likewise.
8592 * c-ubsan.c: Likewise.
8593 * cilk.c: Likewise.
8594 * stub-objc.c: Likewise.
8595
076fecad
PP
85962015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
8597
8598 PR c++/65168
8599 * c-common.c (c_common_truthvalue_conversion): Warn when
8600 converting an address of a reference to a truth value.
8601
13fdf2e2
AM
86022015-06-08 Andrew MacLeod <amacleod@redhat.com>
8603
8604 * array-notation-common.c : Adjust include files.
8605 * c-ada-spec.c : Likewise.
8606 * c-cilkplus.c : Likewise.
8607 * c-common.c : Likewise.
8608 * c-common.h : Likewise.
8609 * c-cppbuiltin.c : Likewise.
8610 * c-dump.c : Likewise.
8611 * c-format.c : Likewise.
8612 * c-gimplify.c : Likewise.
8613 * c-indentation.c : Likewise.
8614 * c-lex.c : Likewise.
8615 * c-omp.c : Likewise.
8616 * c-opts.c : Likewise.
8617 * c-pch.c : Likewise.
8618 * c-ppoutput.c : Likewise.
8619 * c-pragma.c : Likewise.
8620 * c-pretty-print.c : Likewise.
8621 * c-semantics.c : Likewise.
8622 * c-ubsan.c : Likewise.
8623 * cilk.c : Likewise.
8624 * stub-objc.c : Likewise.
8625
a1661b90
MP
86262015-06-08 Marek Polacek <polacek@redhat.com>
8627
8628 PR c/66415
8629 * c-format.c (location_from_offset): Return LOC if LINE is null.
8630
d7438551
AH
86312015-06-05 Aldy Hernandez <aldyh@redhat.com>
8632
8633 * c-common.h (c_parse_final_cleanups): New prototype.
8634 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
8635
b3d5bc62
JJ
86362015-06-04 Sriraman Tallam <tmsriram@google.com>
8637
8638 * c-common.c (noplt): New attribute.
8639 (handle_noplt_attribute): New handler.
8640
ecb9f223
AM
86412015-06-04 Andrew MacLeod <amacleod@redhat.com>
8642
8643 * array-notation-common.c: Adjust includes for restructured coretypes.h.
8644 * c-ada-spec.c: Likewise.
8645 * c-cilkplus.c: Likewise.
8646 * c-common.c: Likewise.
8647 * c-common.h: Likewise.
8648 * c-cppbuiltin.c: Likewise.
8649 * c-dump.c: Likewise.
8650 * c-format.c: Likewise.
8651 * c-gimplify.c: Likewise.
8652 * c-indentation.c: Likewise.
8653 * c-lex.c: Likewise.
8654 * c-omp.c: Likewise.
8655 * c-opts.c: Likewise.
8656 * c-pch.c: Likewise.
8657 * c-ppoutput.c: Likewise.
8658 * c-pragma.c: Likewise.
8659 * c-pretty-print.c: Likewise.
8660 * c-semantics.c: Likewise.
8661 * c-ubsan.c: Likewise.
8662 * cilk.c: Likewise.
8663 * stub-objc.c: Likewise.
8664
6ac48155
DM
86652015-06-02 David Malcolm <dmalcolm@redhat.com>
8666
8667 PR c/66220:
8668 * c-indentation.c (should_warn_for_misleading_indentation): Use
8669 expand_location rather than expand_location_to_spelling_point.
8670 Don't warn if the guarding statement is more indented than the
8671 next/body stmts.
8672
773ce42e
DM
86732015-06-02 David Malcolm <dmalcolm@redhat.com>
8674
8675 * c-indentation.c (warn_for_misleading_indentation): Bail out
8676 immediately if -Wmisleading-indentation isn't enabled.
8677
4fef8379
ML
86782015-06-01 Martin Liska <mliska@suse.cz>
8679
8680 * c-format.c (check_format_arg):Use new type-based pool allocator.
8681 (check_format_info_main) Likewise.
8682
1edfb384
EB
86832015-05-31 Eric Botcazou <ebotcazou@adacore.com>
8684
8685 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
8686 (has_nontrivial_methods): Likewise.
8687
9677ef52
MP
86882015-05-25 Marek Polacek <polacek@redhat.com>
8689
8690 * c-ubsan.c (ubsan_instrument_shift): Use type0.
8691
fd5c817a
MP
86922015-05-22 Marek Polacek <polacek@redhat.com>
8693
8694 PR c/47043
8695 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
8696
a2f45fe6 86972015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
8698
8699 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
8700 STACK_GROWS_DOWNWARD.
8701
a2f45fe6 87022015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
8703
8704 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
8705 STACK_GROWS_DOWNWARD rather than if it is defined.
8706
0fee2ac2 87072015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 8708
0fee2ac2
MLI
8709 PR c/52952
8710 * c-format.c (location_column_from_byte_offset): New.
8711 (location_from_offset): New.
8712 (struct format_wanted_type): Add offset_loc field.
8713 (check_format_info): Move handling of location for extra arguments
8714 closer to the point of warning.
8715 (check_format_info_main): Pass the result of location_from_offset
8716 to warning_at.
8717 (format_type_warning): Pass the result of location_from_offset
8718 to warning_at.
8719
cf4ef6f7
MP
87202015-05-20 Marek Polacek <polacek@redhat.com>
8721
8722 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
8723
3a65ee74
MP
87242015-05-20 Marek Polacek <polacek@redhat.com>
8725
8726 * c-ada-spec.c (dump_sloc): Use DECL_P.
8727
21b634ae
MP
87282015-05-20 Marek Polacek <polacek@redhat.com>
8729
8730 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
8731 * c-common.c: Likewise.
8732
0e50b624
DM
87332015-05-19 David Malcolm <dmalcolm@redhat.com>
8734
8735 * c-common.h (fe_file_change): Strengthen param from
8736 const line_map * to const line_map_ordinary *.
8737 (pp_file_change): Likewise.
8738 * c-lex.c (fe_file_change): Likewise.
8739 (cb_define): Use linemap_check_ordinary when invoking
8740 SOURCE_LINE.
8741 (cb_undef): Likewise.
8742 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
8743 invoking cb_file_change.
8744 (c_finish_options): Likewise.
8745 (push_command_line_include): Likewise.
8746 (cb_file_change): Strengthen param "new_map" from
8747 const line_map * to const line_map_ordinary *.
8748 * c-ppoutput.c (cb_define): Likewise for local "map".
8749 (pp_file_change): Likewise for param "map" and local "from".
8750
fab27f52
MM
87512015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
8752
8753 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
8754
2fe1d762
TV
87552015-05-18 Tom de Vries <tom@codesourcery.com>
8756
8757 * c-common.c (build_va_arg_1): New function.
8758 (build_va_arg): Add address operator to va_list operand if necessary.
8759
7a37fa90
MM
87602015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
8761
8762 PR c/48956
8763 * c-common.c (int_safely_convertible_to_real_p): Define.
8764 (unsafe_conversion_p): Check conversions involving complex types.
8765 (conversion_warning): Add new warning message for conversions which
8766 discard imaginary component.
8767 * c-common.h: (enum conversion_safety): Add new enumerator for such
8768 conversions.
8769
3aa3c9fc
MP
87702015-05-14 Marek Polacek <polacek@redhat.com>
8771
8772 PR c/66066
8773 PR c/66127
8774 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
8775 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
8776 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
8777 use it. If FOR_INT_CONST, require that all evaluated operands be
8778 INTEGER_CSTs.
8779
c3388e62
DM
87802015-05-12 David Malcolm <dmalcolm@redhat.com>
8781
8782 * c-common.h (warn_for_misleading_indentation): New prototype.
8783 * c-indentation.c: New file.
8784 * c.opt (Wmisleading-indentation): New option.
8785
c7b38fd5
TV
87862015-05-12 Tom de Vries <tom@codesourcery.com>
8787
8788 PR tree-optimization/66010
8789 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
8790
381bf11e
JM
87912015-05-09 Jason Merrill <jason@redhat.com>
8792
edff0c06
JM
8793 * c-opts.c (c_common_post_options): Also clear
8794 cpp_opts->cpp_warn_cxx11_compat.
8795
129211bc
JM
8796 * c-common.h (enum cxx_dialect): Add cxx_unset.
8797 * c-common.c (cxx_dialect): Initialize to cxx_unset.
8798 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
8799
381bf11e
JM
8800 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
8801 (std=gnu++0x): Mark as Undocumented.
8802 (std=gnu++1y): Add deprecated message.
8803
fe191308
JM
88042015-05-08 Jason Merrill <jason@redhat.com>
8805
765189ff
JM
8806 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
8807 * c-opts.c: Adjust.
8808
fe191308
JM
8809 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
8810
755e528f
MP
88112015-05-08 Marek Polacek <polacek@redhat.com>
8812
8813 PR c/64918
8814 * c.opt (Woverride-init-side-effects): New option.
8815
0173bd2a
MP
88162015-05-07 Marek Polacek <polacek@redhat.com>
8817
8818 PR c/65179
8819 * c-common.c (c_fully_fold_internal): Warn when left shifting a
8820 negative value.
8821 * c.opt (Wshift-negative-value): New option.
8822 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
8823 when -Wextra and C99/C++11 mode.
8824
e0f0d3b9
MP
88252015-05-07 Marek Polacek <polacek@redhat.com>
8826 Martin Uecker <uecker@eecs.berkeley.edu>
8827
8828 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
8829 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
8830
8243e2a9
JM
88312015-05-05 Jason Merrill <jason@redhat.com>
8832
8833 * c.opt (Wterminate): New.
8834
577cd070
MP
88352015-04-30 Marek Polacek <polacek@redhat.com>
8836
8837 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
8838 require that the non-constant be of a boolean type.
8839
0373796b
JT
88402015-04-29 Josh Triplett <josh@joshtriplett.org>
8841
e0f0d3b9
MP
8842 * c-common.c (handle_section_attribute): Refactor to reduce
8843 nesting and distinguish between error cases.
0373796b 8844
716c0ba6
MP
88452015-04-29 Marek Polacek <polacek@redhat.com>
8846
8847 PR c/64610
8848 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
8849 with 0/1.
8850
8848828b
JJ
88512015-04-29 Jakub Jelinek <jakub@redhat.com>
8852
8853 * c-common.h (omp_clause_mask): Unconditionally define as a class.
8854 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
8855 HOST_BITS_PER_WIDE_INT.
8856
ecd0e562
TV
88572015-04-28 Tom de Vries <tom@codesourcery.com>
8858
8859 PR tree-optimization/65887
8860 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
8861
2a877204 88622015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 8863 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
8864
8865 * c-ada-spec.c (in_function): Delete.
8866 (dump_generic_ada_node): Do not change in_function and remove the
8867 redundant code dealing with it.
8868 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
8869 (print_ada_methods): Output the static member functions in a nested
8870 package after the regular methods as well as associated renamings.
8871
4853031e
MP
88722015-04-24 Marek Polacek <polacek@redhat.com>
8873
8874 PR c/65830
8875 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
8876 and OPT_Wshift_count_overflow.
8877
8c2b7f79
MP
8878 PR c/63357
8879 * c-common.c (warn_logical_operator): Warn if the operands have the
8880 same expressions.
8881
b8787813
MP
88822015-04-24 Marek Polacek <polacek@redhat.com>
8883
8884 PR c/61534
8885 * c-common.c (warn_logical_operator): Bail if either operand comes
8886 from a macro expansion.
8887
8fba1830
BRF
88882015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
8889
8890 PR target/55143
8891 * c-common.c (c_default_pointer_mode): Add definition.
8892 * c-common.h (c_default_pointer_mode): Add declaration.
8893
17958621
JJ
88942015-03-11 Jakub Jelinek <jakub@redhat.com>
8895
8896 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
8897 on record_builtin_type argument.
8898
7ccb1a11
JJ
88992015-03-10 Jakub Jelinek <jakub@redhat.com>
8900
8901 PR c/65120
8902 * c-common.c (warn_logical_not_parentheses): Don't warn for
8903 !x == 0 or !x != 0.
8904
04fd785e
MP
89052015-03-07 Marek Polacek <polacek@redhat.com>
8906
8907 PR sanitizer/65280
8908 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
8909 before trying to figure out whether we have a flexible array member.
8910
a4e26206 89112015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 8912 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
8913
8914 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
8915
0d2489f4
EB
89162015-03-05 Eric Botcazou <ebotcazou@adacore.com>
8917
8918 PR ada/65319
8919 * c-ada-spec.c (print_destructor): Remove obsolete code.
8920
83ed54d7
EB
89212015-03-01 Eric Botcazou <ebotcazou@adacore.com>
8922
8923 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
8924 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
8925 DECL_TEMPLATE_RESULT emulations.
8926 (dump_ada_template)): Add guard for TYPE_METHODS.
8927
7631f0e2
MP
89282015-02-27 Marek Polacek <polacek@redhat.com>
8929
8930 PR c/65040
8931 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
8932
d1783ae5
KT
89332015-02-27 Kai Tietz <ktietz@redhat.com>
8934
8935 PR c/35330
8936 * c-pragma.c (handle_pragma_weak): Do not try to create
8937 weak/alias of declarations not being function, or variable
8938 declarations.
8939
56a9f6bc
TS
89402015-02-24 Thomas Schwinge <thomas@codesourcery.com>
8941
8942 PR libgomp/64625
8943 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
8944 Remove macros.
8945 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
8946
3d5cb23d
MP
89472015-02-16 Marek Polacek <polacek@redhat.com>
8948
8949 PR c/65066
8950 * c-format.c (check_format_types): Handle null param.
8951
fa008882
MP
89522015-02-13 Marek Polacek <polacek@redhat.com>
8953
8954 PR c/65040
8955 * c-format.c (check_format_types): Don't warn about different
8956 signedness if the original value is in the range of WANTED_TYPE.
8957
785f21af
JM
89582015-02-12 Jason Merrill <jason@redhat.com>
8959
8960 PR c++/64956
8961 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
8962 to the current highest version.
8963 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
8964
4886ec8e
JJ
89652015-02-04 Jakub Jelinek <jakub@redhat.com>
8966
8967 PR c/64824
8968 PR c/64868
8969 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
8970 instead of RDIV_EXPR. Use build_binary_op instead of
8971 build2_loc.
8972
40fecdd6
JM
89732015-01-30 Joseph Myers <joseph@codesourcery.com>
8974
8975 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
8976 to pass input_location as first argument.
8977
a0c88d06
TV
89782015-01-23 Tom de Vries <tom@codesourcery.com>
8979
8980 PR libgomp/64672
8981 * c.opt (fopenacc): Mark as LTO option.
8982
1506ae0e
TV
89832015-01-23 Tom de Vries <tom@codesourcery.com>
8984
8985 PR libgomp/64707
8986 * c.opt (fopenmp): Mark as LTO option.
8987
31be63ab
JJ
89882015-01-21 Jakub Jelinek <jakub@redhat.com>
8989
8990 PR c/63307
b1726d6c 8991 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
8992 (compare_decls): Fix up formatting.
8993
89942015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
8995
8996 PR c/63307
8997 * cilk.c: Include vec.h.
8998 (struct cilk_decls): New structure.
8999 (wrapper_parm_cb): Split this function to...
9000 (fill_decls_vec): ...this...
9001 (create_parm_list): ...and this.
9002 (compare_decls): New function.
9003 (for_local_cb): Remove.
9004 (wrapper_local_cb): Ditto.
9005 (build_wrapper_type): For now first traverse and fill vector of
9006 declarations then sort it and then deal with sorted vector.
9007 (cilk_outline): Ditto.
9008 (declare_one_free_variable): Ditto.
9009
6875457f
JM
90102015-01-21 Jason Merrill <jason@redhat.com>
9011
9012 PR c++/64629
9013 * c-format.c (check_format_arg): Call decl_constant_value.
9014
185c9e56
ML
90152015-01-19 Martin Liska <mliska@suse.cz>
9016
9017 * c-common.c (handle_noicf_attribute): New function.
9018
41dbbb37
TS
90192015-01-15 Thomas Schwinge <thomas@codesourcery.com>
9020 Bernd Schmidt <bernds@codesourcery.com>
9021 James Norris <jnorris@codesourcery.com>
9022 Cesar Philippidis <cesar@codesourcery.com>
9023 Ilmir Usmanov <i.usmanov@samsung.com>
9024 Jakub Jelinek <jakub@redhat.com>
9025
9026 * c.opt (fopenacc): New option.
9027 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
9028 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
9029 New macros.
9030 * c-common.h (c_finish_oacc_wait): New prototype.
9031 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
9032 (c_finish_oacc_wait): New function.
9033 * c-pragma.c (oacc_pragmas): New variable.
9034 (c_pp_lookup_pragma, init_pragma): Handle it.
9035 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
9036 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
9037 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
9038 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
9039 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
9040 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
9041 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
9042 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
9043 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
9044 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
9045 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
9046 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
9047 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
9048 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
9049 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
9050 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
9051 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
9052 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
9053 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
9054 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
9055 PRAGMA_OACC_CLAUSE_WORKER.
9056
3f8257db 90572015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
9058
9059 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
9060 for the new option fstack-protector_explicit.
9061 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
9062 (handle_stack_protect_attribute): New function.
9063
3f8257db 90642015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
9065
9066 * c.opt: New option -Warray-bounds=.
9067
adfac8df
JJ
90682015-01-09 Michael Collison <michael.collison@linaro.org>
9069
9070 * array-notation-common.c: Include hash-set.h, machmode.h,
9071 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9072 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
9073 * c-ada-spec.c: Ditto.
9074 * c-cilkplus.c: Ditto.
9075 * c-common.c: Include input.h due to flattening of tree.h.
9076 Define macro GCC_C_COMMON_C.
9077 * c-common.h: Flatten tree.h header files into c-common.h.
9078 Remove include of tree-core.h.
9079 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
9080 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9081 fold-const.h, wide-int.h, and inchash.h due to
9082 flattening of tree.h.
9083 * c-dump.c: Ditto.
9084 * c-format.c: Flatten tree.h header files into c-common.h.
9085 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
9086 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9087 fold-const.h, wide-int.h, and inchash.h due to
9088 flattening of tree.h.
9089 * c-dump.c: Include hash-set.h, machmode.h,
9090 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9091 fold-const.h, wide-int.h, and inchash.h due to
9092 flattening of tree.h.
9093 * c-format.c: Include hash-set.h, machmode.h,
9094 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9095 fold-const.h, wide-int.h, inchash.h and real.h due to
9096 flattening of tree.h.
9097 * c-gimplify.c: Include hash-set.h, machmode.h,
9098 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9099 fold-const.h, wide-int.h, and inchash.h due to
9100 flattening of tree.h.
9101 * cilk.c: Ditto.
9102 * c-lex.c: Ditto.
9103 * c-omp.c: Ditto.
9104 * c-opts.c: Ditto.
9105 * c-pch.c: Ditto.
9106 * c-ppoutput.c: Ditto.
9107 * c-pragma.c: Ditto.
9108 * c-pretty-print.c: Ditto.
9109 * c-semantics.c: Ditto.
9110 * c-ubsan.c: Ditto.
9111 * stub-objc.c: Ditto.
9112
f5481fc4
JM
91132015-01-08 Jason Merrill <jason@redhat.com>
9114
9115 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
9116 do_ubsan_in_current_function.
9117 (ubsan_maybe_instrument_reference_or_call): Likewise.
9118 * c-ubsan.h: Declare it.
9119
de35aa66
MS
91202015-01-08 Mike Stump <mikestump@comcast.net>
9121
9122 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
9123
4a9a42ab
MP
91242015-01-07 Marek Polacek <polacek@redhat.com>
9125
9126 PR c/64440
9127 * c-common.c (c_fully_fold_internal): Warn for division and modulo
9128 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
9129
2f42e5de
TS
91302015-01-05 Trevor Saunders <tsaunders@mozilla.com>
9131
9132 PR c++/31397
9133 * c.opt (Wsuggest-override): New option.
9134
5624e564
JJ
91352015-01-05 Jakub Jelinek <jakub@redhat.com>
9136
9137 Update copyright years.
9138
5bd012f8
MP
91392015-01-05 Marek Polacek <polacek@redhat.com>
9140
9141 PR c/64423
9142 * c-common.c (warn_array_subscript_with_type_char): Add location_t
9143 parameter. Use it.
9144 * c-common.h (warn_array_subscript_with_type_char): Update
9145 declaration.
9146
a7fa8d18
ESR
91472014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
9148
9149 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
9150 Control macro with flag_sized_deallocation.
9151
3f8257db 91522014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
9153
9154 * c.opt (Wdiscarded-array-qualifiers): New option.
9155
1f8d3e84
JJ
91562014-12-19 Jakub Jelinek <jakub@redhat.com>
9157
9158 PR preprocessor/63831
9159 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
9160 and __has_cpp_attribute here.
9161 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
9162 c_common_has_attribute.
9163 * c-common.h (c_common_has_attribute): New prototype.
9164 * c-lex.c (init_c_lex): Set cb->has_attribute to
9165 c_common_has_attribute instead of cb_has_attribute.
9166 (get_token_no_padding): New function.
9167 (cb_has_attribute): Renamed to ...
9168 (c_common_has_attribute): ... this. No longer static. Use
9169 get_token_no_padding, require ()s, don't build TREE_LIST
9170 unnecessarily, fix up formatting, adjust diagnostics, call
9171 init_attributes.
9172
20b06add
JM
91732014-12-15 Jason Merrill <jason@redhat.com>
9174
9175 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
9176 (-Wsized-deallocation): New.
9177 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
9178 to on in C++14 and up.
9179
94a073b2
JM
91802014-12-11 Jason Merrill <jason@redhat.com>
9181
acaa5911
JM
9182 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
9183
94a073b2
JM
9184 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
9185 we aren't complaining about VLAs.
9186
7fb66c15
MP
91872014-12-06 Marek Polacek <polacek@redhat.com>
9188
9189 PR tree-optimization/64183
9190 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
9191 shift-expression if it is integer_type_node. Use types_compatible_p.
9192
b731b390
JJ
91932014-11-29 Jakub Jelinek <jakub@redhat.com>
9194
9195 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
9196 last argument from create_tmp_var_raw and create_tmp_var calls.
9197 * cilk.c (gimplify_cilk_spawn): Likewise.
9198 * c-omp.c (c_finish_omp_atomic): Likewise.
9199
6a4da643
MP
92002014-11-28 Marek Polacek <polacek@redhat.com>
9201
9202 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
9203 instead of unsigned_type_node.
9204
541e35a6
MP
92052014-11-28 Marek Polacek <polacek@redhat.com>
9206
9207 PR c/63862
9208 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
9209 to op1_utype.
9210 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
9211 expression to unsigned_type_node.
9212
dcc97066
MW
92132014-11-20 Mark Wielaard <mjw@redhat.com>
9214
9215 PR debug/38757
9216 * c-opts.c (set_std_c89): Set lang_hooks.name.
9217 (set_std_c99): Likewise.
9218 (set_std_c11): Likewise.
9219 (set_std_cxx98): Likewise.
9220 (set_std_cxx11): Likewise.
9221 (set_std_cxx14): Likewise.
9222 (set_std_cxx1z): Likewise.
9223
aa7da51a
JJ
92242014-11-21 Jakub Jelinek <jakub@redhat.com>
9225
9226 PR target/63764
9227 * c-common.h (convert_vector_to_pointer_for_subscript): Change
9228 return type to bool.
009a3480 9229 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
9230 (convert_vector_to_pointer_for_subscript): Change return type to
9231 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
9232 and copy it into a TARGET_EXPR and use that instead of *vecp
9233 directly.
9234
538dd0b7
DM
92352014-11-19 David Malcolm <dmalcolm@redhat.com>
9236
9237 Merger of git branch "gimple-classes-v2-option-3".
9238 * ChangeLog.gimple-classes: New.
9239 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
9240 from being just a vec<gimple> to a vec<gbind *>.
9241
c39a5e99
JJ
92422014-11-18 Jakub Jelinek <jakub@redhat.com>
9243
9244 PR sanitizer/63813
9245 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
9246 argument to ptype, set type to TREE_TYPE (ptype). Don't call
9247 get_pointer_alignment for non-pointers. Use ptype, or if it is
9248 reference type, corresponding pointer type, as type of kind
9249 argument.
9250 (ubsan_maybe_instrument_reference,
9251 ubsan_maybe_instrument_member_call): Adjust callers.
9252
8537a4a9
MP
92532014-11-15 Marek Polacek <polacek@redhat.com>
9254
9255 PR middle-end/63884
9256 * array-notation-common.c (is_sec_implicit_index_fn): Return false
9257 for NULL fndecl.
9258 (extract_array_notation_exprs): Return for NULL node.
9259
2079956a
JM
92602014-11-12 Joseph Myers <joseph@codesourcery.com>
9261
9262 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
9263 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
9264
1304953e
JJ
92652014-11-12 Jakub Jelinek <jakub@redhat.com>
9266
9267 PR c/59708
9268 * c-common.c (check_builtin_function_arguments): Handle
9269 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
9270
e5e44252
AK
92712014-11-10 Andi Kleen <ak@linux.intel.com>
9272
9273 PR c/60804
9274 * c-common.h (check_no_cilk): Declare.
9275 * cilk.c (get_error_location): New function.
9276 (check_no_cilk): Dito.
9277
e64b984d
AK
92782014-11-10 Andi Kleen <ak@linux.intel.com>
9279
9280 * cilk.c (recognize_spawn): Use expression location
9281 for error message.
9282
13c21655
PC
92832014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
9284
9285 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
9286
42fd12b1
ESR
92872014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
9288
9289 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
9290 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
9291 (__cpp_range_based_for, __cpp_initializer_lists,
9292 __cpp_delegating_constructors, __cpp_nsdmi,
9293 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
9294 for C++11; (__cpp_attribute_deprecated): Remove in favor of
9295 __has_cpp_attribute.
9296 * c-lex.c (cb_has_attribute): New callback CPP function;
9297 (init_c_lex): Set has_attribute callback.
9298
6f450181
RB
92992014-11-04 Richard Biener <rguenther@suse.de>
9300
9301 * c-common.c (shorten_compare): Do not shorten mixed
9302 DFP and non-DFP compares.
9303
26f0e1d6
ESR
93042014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9305
9306 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
9307 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
9308 Commentary and rearrangement of tests.
9309 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
9310 Commentary and rearrangement of tests.
ab20d992 9311 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
26f0e1d6
ESR
9312 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
9313
ef4bddc2
RS
93142014-10-29 Richard Sandiford <richard.sandiford@arm.com>
9315
9316 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
9317 enum from machine_mode.
9318
c582198b
AM
93192014-10-28 Andrew MacLeod <amacleod@redhat.com>
9320
adfac8df
JJ
9321 * c-common.c: Adjust include files.
9322 * c-gimplify.c: Ditto.
9323 * cilk.c: Ditto.
9324 * c-pragma.c: Ditto.
9325 * c-ubsan.c: Ditto.
c582198b 9326
60393bbc
AM
93272014-10-27 Andrew MacLeod <amacleod@redhat.com>
9328
9329 * c-gimplify.c: Adjust include files.
9330
d723bb7c
MLI
93312014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
9332
9333 PR c++/53061
9334 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
9335 c_common_initialize_diagnostics.
9336 * c-common.h: Likewise.
9337
90f3520e
MP
93382014-10-24 Marek Polacek <polacek@redhat.com>
9339
9340 PR c/56980
9341 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
9342 print "struct"/"union"/"enum" for typedefed names.
9343
59d7607a
MP
93442014-10-23 Marek Polacek <polacek@redhat.com>
9345
9346 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
9347 in unsigned type.
9348
d95a2703
JJ
93492014-10-22 Jakub Jelinek <jakub@redhat.com>
9350 Yury Gribov <y.gribov@samsung.com>
9351
9352 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9353 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
9354 instead of flag_sanitize_recover as bool flag.
9355
8e6ef852
KY
93562014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
9357
9358 * cilk.c: Revert previous change.
9359
948cf550
IZ
93602014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
9361
9362 PR c/63307
9363 * cilk.c: Include vec.h.
9364 (struct cilk_decls): New structure.
9365 (wrapper_parm_cb): Split this function to...
9366 (fill_decls_vec): ...this...
9367 (create_parm_list): ...and this.
9368 (compare_decls): New function.
9369 (for_local_cb): Remove.
9370 (wrapper_local_cb): Ditto.
9371 (build_wrapper_type): For now first traverse and fill vector of
9372 declarations then sort it and then deal with sorted vector.
9373 (cilk_outline): Ditto.
9374 (declare_one_free_variable): Ditto.
9375
92574c7c
MP
93762014-10-17 Marek Polacek <polacek@redhat.com>
9377
9378 * c-opts.c (c_common_post_options): Set warn_implicit_int.
9379 * c.opt (Wimplicit-int): Initialize to -1.
9380
83685514
AM
93812014-10-16 Andrew MacLeod <amacleod@redhat.com>
9382
9383 * c-pragma.c: Adjust include files.
9384 * c-semantics.c: Likewise.
9385
5b8300ea
DD
93862014-10-16 DJ Delorie <dj@redhat.com>
9387
9388 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
9389 multiples of bytes.
9390
5f83e90b
JM
93912014-10-14 Jason Merrill <jason@redhat.com>
9392
9393 PR c++/63455
9394 * c-common.h (CPP_PREPARSED_EXPR): New.
9395 (N_CP_TTYPES): Adjust.
9396
d73326ca
MP
93972014-10-15 Marek Polacek <polacek@redhat.com>
9398
9399 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
9400
78a7c317
DD
94012014-10-14 DJ Delorie <dj@redhat.com>
9402
9403 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
9404 types, not just __int128.
9405 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
9406 types, not just __int128.
9407 (cpp_atomic_builtins): Round pointer sizes up.
9408 (type_suffix): Use type precision, not specific types.
9409 * c-common.c (c_common_reswords): Remove __int128 special case.
9410 (c_common_type_for_size): Check for all __intN types, not just
9411 __int128.
9412 (c_common_type_for_mode): Likewise.
9413 (c_common_signed_or_unsigned_type): Likewise.
9414 (c_build_bitfield_integer_type): Likewise.
9415 (c_common_nodes_and_builtins): Likewise.
9416 (keyword_begins_type_specifier): Likewise.
9417 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
9418 __intN variants.
9419
2a22f99c
TS
94202014-10-12 Trevor Saunders <tsaunders@mozilla.com>
9421
9422 * c-common.c: Use hash_table instead of hashtab.
9423
2a8ef767
ESR
94242014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
9425
adfac8df 9426 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
9427 C++11 section.
9428
3c9aabbd
MG
94292014-10-03 Marc Glisse <marc.glisse@inria.fr>
9430
9431 PR c++/54427
9432 PR c++/57198
9433 PR c++/58845
9434 * c-common.c (warn_logical_operator): Punt for vectors.
9435
a15f7cb8
ESR
94362014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9437
9438 Implement SD-6: SG10 Feature Test Recommendations
9439 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
9440 macros and the __has_header macro.
9441
8d0cf15e
JM
94422014-09-30 Jason Merrill <jason@redhat.com>
9443
dd5d5481
JM
9444 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
9445 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
9446 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9447
b752325e
JM
9448 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
9449 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9450
8d0cf15e
JM
9451 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
9452 * c-common.c (c_common_reswords): Remove __is_convertible_to.
9453
083e891e
MP
94542014-09-24 Marek Polacek <polacek@redhat.com>
9455
9456 PR c/61405
9457 PR c/53874
9458 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
9459
7861b648
AK
94602014-09-23 Andi Kleen <ak@linux.intel.com>
9461
9462 * c-common.c (handle_no_reorder_attribute): New function.
9463 (c_common_attribute_table): Add no_reorder attribute.
9464
9a79452d
JM
94652014-09-22 Joseph Myers <joseph@codesourcery.com>
9466
9467 * c-cppbuiltin.c (c_cpp_builtins): Define
9468 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
9469 modes.
9470
dd69f047
JM
94712014-09-18 Joseph Myers <joseph@codesourcery.com>
9472
9473 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
9474 for supported floating-point modes.
9475
737a4826
MLI
94762014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9477
9478 * c.opt (Wpsabi): Use LangEnabledBy.
9479 * c-opts.c (c_common_handle_option): Do not handle here.
9480
8cc4b7a2
JM
94812014-09-12 Joseph Myers <joseph@codesourcery.com>
9482
9483 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
9484 macros for floating-point modes.
9485
179b5a55
MG
94862014-09-11 Marc Glisse <marc.glisse@inria.fr>
9487
9488 PR target/58757
9489 * c-cppbuiltin.c (builtin_define_float_constants): Correct
9490 __*_DENORM_MIN__ without denormals.
9491
570a11fe
JJ
94922014-09-10 Jakub Jelinek <jakub@redhat.com>
9493
9494 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9495 ubsan_instrument_vla, ubsan_instrument_return): Adjust
9496 ubsan_create_data callers.
9497 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
9498 index is constant or BIT_AND_EXPR with constant mask and is
9499 small enough for the bound.
9500 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
9501 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
9502
b559c810
MLI
95032014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9504
9505 * c.opt: Add CppReason to various flags.
9506 (Wdate-time): Re-sort.
9507 * c-common.c: Include c-common.h earlier.
9508 (struct reason_option_codes_t): Delete.
9509 (c_option_controlling_cpp_error): Prefix global type and struct
9510 with cpp_.
9511
1ef33fd4
MLI
95122014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9513
9514 * c.opt (Wnormalized): New.
9515 (Wnormalized=): Use Enum and Reject Negative.
9516 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
9517
66bb34c0
JM
95182014-09-08 Joseph Myers <joseph@codesourcery.com>
9519
9520 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
9521 digits of floating-point modes if -fbuilding-libgcc.
9522
53d68b9f
JM
95232014-09-05 Joseph Myers <joseph@codesourcery.com>
9524
9525 * c-cppbuiltin.c (c_cpp_builtins): Also define
9526 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
9527 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
9528 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
9529 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
9530 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
9531 __LIBGCC_STACK_GROWS_DOWNWARD__,
9532 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
9533 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
9534 __LIBGCC_DWARF_FRAME_REGISTERS__,
9535 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
9536 __LIBGCC_STACK_POINTER_REGNUM__ and
9537 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
9538 (builtin_define_with_value): Handle backslash-escaping in string
9539 macro values.
9540
f65586dc
RB
95412014-09-05 Richard Biener <rguenther@suse.de>
9542
9543 PR middle-end/63148
9544 * c-format.c (check_format_arg): Properly handle
9545 effectively signed POINTER_PLUS_EXPR offset.
9546
2b71f4a4
MLI
95472014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
9548
9549 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
9550 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
9551 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
9552 and Init.
9553 * c-opts.c (c_common_handle_option): Do not handle here.
9554 (sanitize_cpp_opts): Likewise.
9555 * c-common.c (struct reason_option_codes_t): Handle
9556 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
9557
d2e4feca
MP
95582014-09-03 Marek Polacek <polacek@redhat.com>
9559
9560 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
9561
9a771876
JJ
95622014-09-02 Jakub Jelinek <jakub@redhat.com>
9563 Balaji V. Iyer <balaji.v.iyer@intel.com>
9564 Igor Zamyatin <igor.zamyatin@intel.com>
9565
9566 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
9567 * c-common.c (c_common_reswords): Added _Cilk_for.
9568 * c-common.h (enum rid): Added RID_CILK_FOR.
9569 (cilk_for_number_of_iterations): Add declaration.
9570 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
9571 CILK_FOR.
9572 * c-pragma.c (init_pragma): Register "grainsize" pragma.
9573 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
9574
81b5d104
MLI
95752014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9576
9577 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
9578 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
9579 Wundef): Use CPP, Var and Init.
9580 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
9581
b753b37b
MLI
95822014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9583
9584 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
9585 * c-opts.c (c_common_handle_option): Do not handle here.
9586
028aee17
JM
95872014-08-25 Jason Merrill <jason@redhat.com>
9588
9589 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
9590 -std=c++14 and -std=gnu++14, rather than the reverse.
9591 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
9592 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
9593 * c-common.h (cxx_dialect): Remove cxx1y.
9594
e4276ba5
ESR
95952014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
9596
9597 * c-common.h (enum cxx_dialect): Add cxx14.
9598 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
9599 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
9600 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
9601
a545cacd
JM
96022014-08-22 Jason Merrill <jason@redhat.com>
9603
9604 * c.opt (std=gnu++17): Fix alias.
9605
59ea0364
MP
96062014-08-22 Marek Polacek <polacek@redhat.com>
9607
9608 PR c++/62199
9609 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
9610 check for vector types. Drop LHS argument.
9611 * c-common.h (warn_logical_not_parentheses): Adjust.
9612
596e808c
MLI
96132014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
9614
9615 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
9616 (Wmultichar): Likewise.
9617 (Wdate-time): Use C-family languages instead of Common. Use CPP
9618 and Var.
9619 * c-opts.c (c_common_handle_option): Do not handle the above
9620 options here.
9621 (sanitize_cpp_opts): Likewise.
9622
18767f65
MLI
96232014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
9624
9625 PR fortran/44054
9626 * c-opts.c: Include tree-diagnostics.h.
9627 (c_diagnostic_finalizer): New.
9628 (c_common_initialize_diagnostics): Use it.
9629
b4413594
MLI
96302014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9631
9632 PR preprocessor/51303
9633 * c-common.c (struct reason_option_codes_t option_codes):
9634 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
9635
43f9a13c
MLI
96362014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9637
9638 PR c/60975
9639 PR c/53063
9640 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
9641 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
9642 (c_common_post_options): Call init_global_opts_from_cpp.
9643 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
9644
04159acf
MP
96452014-08-19 Marek Polacek <polacek@redhat.com>
9646
9647 PR c++/62153
9648 * c-common.c (maybe_warn_bool_compare): New function.
9649 * c-common.h (maybe_warn_bool_compare): Declare.
9650 * c.opt (Wbool-compare): New option.
9651
35aff4fb
MP
96522014-08-19 Marek Polacek <polacek@redhat.com>
9653
9654 * c.opt (Wc99-c11-compat): New option.
9655
177cce46
MP
96562014-08-19 Marek Polacek <polacek@redhat.com>
9657
9658 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
9659 to warn_c90_c99_compat.
9660 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
9661 to -1.
9662
6ae9194f
MLI
96632014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
9664 Steven Bosscher <steven@gcc.gnu.org>
9665
9666 PR c/52952
9667 * c-format.c: Add extra_arg_loc and format_string_loc to struct
9668 format_check_results.
9669 (check_function_format): Use true and add comment for boolean
9670 argument.
9671 (finish_dollar_format_checking): Use explicit location when warning.
9672 (check_format_info): Likewise.
9673 (check_format_arg): Set extra_arg_loc and format_string_loc.
9674 (check_format_info_main): Use explicit location when warning.
9675 (check_format_types): Pass explicit location.
9676 (format_type_warning): Likewise.
9677
8e54f6d3
MLI
96782014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9679
9680 PR fortran/44054
9681 * c-format.c: Handle Fortran flags.
9682
cd4e76fc
IZ
96832014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
9684
9685 PR other/61962
9686 * array-notation-common.c (find_rank): Added handling for other
9687 types of references.
9688
f3bede71
MP
96892014-08-10 Marek Polacek <polacek@redhat.com>
9690
9691 PR c/51849
9692 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
9693 * c.opt (Wc90-c99-compat): Add option.
9694
9f25a338
TS
96952014-08-07 Trevor Saunders <tsaunders@mozilla.com>
9696
9697 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
9698
62e4eb35
MP
96992014-08-03 Marek Polacek <polacek@redhat.com>
9700
ab20d992 9701 * c-common.c (check_case_value): Add location_t parameter. Use it.
62e4eb35
MP
9702 (c_add_case_label): Pass loc to check_case_value.
9703
b787e7a2
TS
97042014-08-02 Trevor Saunders <tsaunders@mozilla.com>
9705
9706 * cilk.c: Use hash_map instead of pointer_map.
9707
6e2830c3
TS
97082014-08-02 Trevor Saunders <tsaunders@mozilla.com>
9709
9710 * c-gimplify.c: Use hash_set instead of pointer_set.
9711
a7ee52fb
IZ
97122014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
9713
9714 PR middle-end/61455
9715 * array-notation-common.c (extract_array_notation_exprs): Handling
9716 of DECL_EXPR added.
9717
944fa280
JJ
97182014-08-01 Jakub Jelinek <jakub@redhat.com>
9719
9720 * c-common.h (min_align_of_type): Removed prototype.
9721 * c-common.c (min_align_of_type): Removed.
9722 * c-ubsan.h (ubsan_maybe_instrument_reference,
9723 ubsan_maybe_instrument_member_call): New prototypes.
9724 * c-ubsan.c: Include stor-layout.h and builtins.h.
9725 (ubsan_maybe_instrument_reference_or_call,
9726 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
9727 functions.
9728
b4dfdc11
MG
97292014-07-31 Marc Glisse <marc.glisse@inria.fr>
9730
9731 PR c++/60517
9732 * c.opt (-Wreturn-local-addr): Move to common.opt.
9733
a41844e5
JM
97342014-07-30 Jason Merrill <jason@redhat.com>
9735
9736 PR c++/61659
9737 PR c++/61687
9738 Revert:
9739 * c.opt (-fuse-all-virtuals): New.
9740
976d5a22
TT
97412014-07-30 Tom Tromey <tromey@redhat.com>
9742
9743 PR c/59855
9744 * c.opt (Wdesignated-init): New option.
9745 * c-common.c (c_common_attribute_table): Add "designated_init".
9746 (handle_designated_init): New function.
9747
cdc94aca
MP
97482014-07-24 Marek Polacek <polacek@redhat.com>
9749
9750 PR c/57653
9751 * c-opts.c (c_finish_options): If -imacros is in effect, return.
9752
f41373b6
DS
97532014-07-16 Dodji Seketeli <dodji@redhat.com>
9754
9755 PR preprocessor/60723 - missing system-ness marks for macro tokens
9756 * c-ppoutput.c (struct print::prev_was_system_token): New data
9757 member.
9758 (init_pp_output): Initialize it.
9759 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
9760 (do_line_change): Return a flag saying if a line marker was
9761 emitted or not.
9762 (scan_translation_unit): Detect if the system-ness of the token we
9763 are about to emit is different from the one of the previously
9764 emitted token. If so, emit a line marker. Avoid emitting useless
9765 adjacent line markers. Avoid emitting line markers for tokens
9766 originating from the expansion of built-in macros.
9767 (scan_translation_unit_directives_only): Adjust.
9768
4d661eaa
MP
97692014-07-15 Marek Polacek <polacek@redhat.com>
9770
9771 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
9772 TYPE_MAX_VALUE is NULL.
9773
b108f48f
JJ
97742014-07-14 Jakub Jelinek <jakub@redhat.com>
9775
9776 PR middle-end/61294
9777 * c.opt (Wmemset-transposed-args): New warning.
9778
c0221884
JM
97792014-07-10 Jason Merrill <jason@redhat.com>
9780
9781 PR c++/61659
9782 PR c++/61687
9783 * c.opt (-fuse-all-virtuals): New.
9784
63dfbb95
RB
97852014-07-09 Richard Biener <rguenther@suse.de>
9786
9787 PR c-family/61741
9788 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
9789 using unsigned arithmetic if overflow does not wrap instead of
9790 if overflow is undefined.
9791
773ec47f
MP
97922014-07-06 Marek Polacek <polacek@redhat.com>
9793
9794 PR c/6940
9795 * c.opt (Wsizeof-array-argument): New option.
9796
00a7ba58
JJ
97972014-07-03 Jakub Jelinek <jakub@redhat.com>
9798
b1726d6c 9799 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
9800 comments->count <= 1, as comments->entries might be NULL.
9801
52ec0ea3
MP
98022014-07-01 Marek Polacek <polacek@redhat.com>
9803
9804 * c.opt (Wint-conversion): New option.
9805
d5c3d343
MP
98062014-07-01 Marek Polacek <polacek@redhat.com>
9807
9808 PR c/58286
9809 * c.opt (Wincompatible-pointer-types): New option.
9810
6e7ceb17
PC
98112014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
9812
9813 PR c++/51400
9814 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
9815 Do not discard TYPE_QUALS of type.
9816
da73100b
JM
98172014-06-26 Jason Merrill <jason@redhat.com>
9818
9819 * c-common.h (enum cxx_dialect): Add cxx1z.
9820 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
9821 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
9822
08eedf75
TJ
98232014-06-26 Teresa Johnson <tejohnson@google.com>
9824
9825 * c-common.h (get_dump_info): Declare.
9826 * c-gimplify.c (c_genericize): Use saved dump files.
9827 * c-opts.c (c_common_parse_file): Begin and end dumps
9828 once around parsing invocation.
9829 (get_dump_info): New function.
9830
7b56b2f8
MP
98312014-06-23 Marek Polacek <polacek@redhat.com>
9832 Andrew MacLeod <amacleod@redhat.com>
9833
9834 PR c/61553
9835 * c-common.c (get_atomic_generic_size): Don't segfault if the
9836 type doesn't have a size.
9837
0e37a2f3
MP
98382014-06-20 Marek Polacek <polacek@redhat.com>
9839
9840 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
9841 (ubsan_walk_array_refs_r): New function.
9842 (c_genericize): Instrument array bounds.
9843 * c-ubsan.c: Include "internal-fn.h".
9844 (ubsan_instrument_division): Mark instrumented arrays as having
9845 side effects. Adjust ubsan_type_descriptor call.
9846 (ubsan_instrument_shift): Likewise.
9847 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
9848 (ubsan_instrument_bounds): New function.
9849 (ubsan_array_ref_instrumented_p): New function.
9850 (ubsan_maybe_instrument_array_ref): New function.
9851 * c-ubsan.h (ubsan_instrument_bounds): Declare.
9852 (ubsan_array_ref_instrumented_p): Declare.
9853 (ubsan_maybe_instrument_array_ref): Declare.
9854
98552014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
9856
9857 PR lto/61123
9858 * c.opt (fshort-enums): Add to LTO.
9859 * c.opt (fshort-wchar): Likewise.
9860
5c3d09f7
MP
98612014-06-16 Marek Polacek <polacek@redhat.com>
9862
9863 PR c/60439
9864 * c.opt (Wswitch-bool): Add Var.
9865
9cf32741
JJ
98662014-06-12 Jakub Jelinek <jakub@redhat.com>
9867
9868 PR middle-end/61486
9869 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
9870 #pragma omp target teams or
9871 #pragma omp {,target }teams distribute simd.
9872
62984918
JM
98732014-06-12 Jason Merrill <jason@redhat.com>
9874
9875 * c.opt (Wabi=, fabi-compat-version): New.
9876 * c-opts.c (c_common_handle_option): Handle -Wabi=.
9877 (c_common_post_options): Handle flag_abi_compat_version default.
9878 Disallow -fabi-compat-version=1.
9879 * c-common.h (abi_version_crosses): New.
9880
f961457f
JH
98812014-06-11 Jan Hubicka <hubicka@ucw.cz>
9882
adfac8df 9883 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
9884 section names that are no longer trees.
9885
92d28cbb
JJ
98862014-06-10 Jakub Jelinek <jakub@redhat.com>
9887
9888 PR fortran/60928
9889 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
9890 (omp_pragmas): ... back here.
9891
742938c9
MP
98922014-06-05 Marek Polacek <polacek@redhat.com>
9893
9894 PR c/49706
9895 * c-common.c (warn_logical_not_parentheses): New function.
9896 * c-common.h (warn_logical_not_parentheses): Declare.
9897 * c.opt (Wlogical-not-parentheses): New option.
9898
9d548dfb
MP
98992014-06-04 Marek Polacek <polacek@redhat.com>
9900
9901 PR c/30020
9902 * c-common.c (check_case_bounds): Add location parameter.
9903 Use it.
9904 (c_add_case_label): Pass loc to check_case_bounds.
9905
fedfecef
MP
99062014-06-03 Marek Polacek <polacek@redhat.com>
9907
9908 PR c/60439
9909 * c.opt (Wswitch-bool): New option.
9910
f6a7cffc
TS
99112014-05-22 Thomas Schwinge <thomas@codesourcery.com>
9912
040d18b6
TS
9913 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
9914 Remove prototypes.
9915 (record_types_used_by_current_var_decl): Move prototype to where
9916 it belongs.
9917
f6a7cffc
TS
9918 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
9919 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
9920 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
9921
632f2871
RS
99222014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
9923
9924 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
9925 * c-common.c (c_common_nodes_and_builtins): Don't initialize
9926 void_zero_node.
9927 * c-pretty-print.c (pp_c_void_constant): New function.
9928 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
9929 (c_pretty_printer::expression): Handle VOID_CST.
9930 * cilk.c (extract_free_variables): Likewise.
9931 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
9932 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
9933
766090c2
TS
99342014-05-17 Trevor Saunders <tsaunders@mozilla.com>
9935
9936 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
9937 * c-pragma.c (push_alignment): Adjust.
9938 (handle_pragma_push_options): Likewise.
9939
661a0813
MP
99402014-05-09 Marek Polacek <polacek@redhat.com>
9941
9942 PR c/50459
9943 * c-common.c (check_user_alignment): Return -1 if alignment is error
9944 node.
9945 (handle_aligned_attribute): Don't call default_conversion on
9946 FUNCTION_DECLs.
9947 (handle_vector_size_attribute): Likewise.
9948 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
9949 (handle_sentinel_attribute): Call default_conversion and allow even
9950 integral types as an argument.
9951
2793eeab
MP
99522014-05-08 Marek Polacek <polacek@redhat.com>
9953
9954 PR c/61053
9955 * c-common.c (min_align_of_type): New function factored out from...
9956 (c_sizeof_or_alignof_type): ...here.
9957 * c-common.h (min_align_of_type): Declare.
9958
f827930a
MP
99592014-05-08 Marek Polacek <polacek@redhat.com>
9960
9961 PR c/61077
9962 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
9963 parameter type of main.
9964
ca49b74e
DD
99652014-05-07 DJ Delorie <dj@redhat.com>
9966
9967 * c-cppbuiltin.c (print_bits_of_hex): New.
9968 (builtin_define_type_minmax): Print values using hex so as not to
9969 require a pre-computed list of string values.
9970
1d60af08
KZ
99712014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
9972 Mike Stump <mikestump@comcast.net>
9973 Richard Sandiford <rdsandiford@googlemail.com>
9974
9975 * c-ada-spec.c: Include wide-int.h.
9976 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
9977 (dump_generic_ada_node): Use wide-int interfaces.
9978 * c-common.c: Include wide-int-print.h.
9979 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
9980 (pointer_int_sum): Use wide-int interfaces.
9981 (c_common_nodes_and_builtins): Use make_int_cst.
9982 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
9983 (handle_alloc_size_attribute): Use wide-int interfaces.
9984 (get_nonnull_operand): Likewise.
9985 * c-format.c (get_constant): Use tree_fits_uhwi_p.
9986 * c-lex.c: Include wide-int.h.
9987 (narrowest_unsigned_type): Take a widest_int rather than two
9988 HOST_WIDE_INTs.
9989 (narrowest_signed_type): Likewise.
9990 (interpret_integer): Update accordingly. Use wide-int interfaces.
9991 (lex_charconst): Use wide-int interfaces.
9992 * c-pretty-print.c: Include wide-int.h.
9993 (pp_c_integer_constant): Use wide-int interfaces.
9994 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
9995 INT_CST_LT_UNSIGNED.
9996
b15458be
RB
99972014-05-06 Richard Biener <rguenther@suse.de>
9998
9999 * c-opts.c (c_common_post_options): For -freestanding,
10000 -fno-hosted and -fno-builtin disable pattern recognition
10001 if not enabled explicitely.
10002
6577374e
MP
100032014-05-02 Marek Polacek <polacek@redhat.com>
10004
10005 * c.opt (Wsizeof-pointer-memaccess): Describe option.
10006
d00887e8
MP
100072014-05-01 Marek Polacek <polacek@redhat.com>
10008
10009 PR c/43245
10010 * c.opt (Wdiscarded-qualifiers): Add.
10011
f8ed5150
MP
100122014-04-30 Marek Polacek <polacek@redhat.com>
10013
10014 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
10015 INT_MIN / -1 sanitization only for integer types.
10016
45484dcf
MP
100172014-04-25 Marek Polacek <polacek@redhat.com>
10018
10019 PR c/18079
10020 * c-common.c (handle_noinline_attribute): Warn if the attribute
10021 conflicts with always_inline attribute.
10022 (handle_always_inline_attribute): Warn if the attribute conflicts
10023 with noinline attribute.
10024
38e514c0
MP
100252014-04-25 Marek Polacek <polacek@redhat.com>
10026
10027 PR c/60156
10028 * c-common.c (check_main_parameter_types): Warn about variadic main.
10029
44875f92
MS
100302014-04-24 Mike Stump <mikestump@comcast.net>
10031
10032 * c.opt (Wshadow-ivar): Default to on.
10033
dcaaa5a0
DP
100342014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
10035
10036 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
10037
c07d7c02
MP
100382014-04-23 Marek Polacek <polacek@redhat.com>
10039
10040 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
10041
1c33c9b7
JJ
100422014-04-22 Jakub Jelinek <jakub@redhat.com>
10043
10044 PR sanitizer/60275
10045 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
10046 if flag_sanitize_undefined_trap_on_error.
10047 (ubsan_instrument_division, ubsan_instrument_shift,
10048 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
10049 if !flag_sanitize_recover.
10050
793c625f
MG
100512014-04-22 Marc Glisse <marc.glisse@inria.fr>
10052
10053 PR libstdc++/43622
10054 * c-common.c (registered_builtin_types): Make non-static.
10055 * c-common.h (registered_builtin_types): Declare.
10056
b0f1bf36 100572014-04-14 Richard Biener <rguenther@suse.de>
ab20d992 10058 Marc Glisse <marc.glisse@inria.fr>
b0f1bf36
RB
10059
10060 PR c/60819
10061 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
10062 apply may-alias the scalar pointer type when applicable.
10063
3b07fa4a
IZ
100642014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
10065
10066 PR middle-end/60467
10067 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
10068 as possible argument for Cilk_spawn.
10069
cbbd2b1c
TB
100702014-04-11 Tobias Burnus <burnus@net-b.de>
10071
10072 PR c/60194
10073 * c.opt (Wformat-signedness): Add
10074 * c-format.c(check_format_types): Use it.
10075
6415bd5d
JM
100762014-04-11 Jason Merrill <jason@redhat.com>
10077
10078 PR c++/57926
10079 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
10080 default_conversion for an array argument.
10081
6525783a
MP
100822014-04-08 Marek Polacek <polacek@redhat.com>
10083
10084 PR sanitizer/60745
10085 * c-ubsan.c: Include asan.h.
10086 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
10087
880a467b
NS
100882014-04-03 Nathan Sidwell <nathan@codesourcery.com>
10089
10090 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
10091
7b59ff2d
MP
100922014-04-02 Marek Polacek <polacek@redhat.com>
10093
10094 * c-common.h (c_expand_expr): Remove declaration.
10095
8edbfaa6
JJ
100962014-03-28 Jakub Jelinek <jakub@redhat.com>
10097
10098 PR c++/60689
10099 * c-common.c (add_atomic_size_parameter): When creating new
10100 params vector, push the size argument first.
10101
07d72e1d
JJ
101022014-03-26 Jakub Jelinek <jakub@redhat.com>
10103
10104 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
10105 ubsan_instrument_vla, ubsan_instrument_return): Adjust
10106 ubsan_create_data callers.
10107
b35e0fa0
JJ
101082014-03-22 Jakub Jelinek <jakub@redhat.com>
10109
10110 PR debug/60603
10111 * c-opts.c (c_finish_options): Restore cb_file_change call to
10112 <built-in>.
10113
39a1ebb3
JJ
101142014-03-13 Jakub Jelinek <jakub@redhat.com>
10115
10116 PR middle-end/36282
10117 * c-pragma.c (apply_pragma_weak): Only look at
10118 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
10119 DECL_ASSEMBLER_NAME_SET_P (decl).
10120 (maybe_apply_pending_pragma_weaks): Exit early if
10121 vec_safe_is_empty (pending_weaks) rather than only when
10122 !pending_weaks.
10123 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
10124 set assembler name back to NULL afterwards.
10125
a07f6ed2
JM
101262014-03-11 Jason Merrill <jason@redhat.com>
10127
10128 * c.opt: Add -std=gnu++14.
10129
75b107f5
IB
101302014-03-11 Ian Bolton <ian.bolton@arm.com>
10131
10132 * c-opts.c (c_common_post_options): Don't override
10133 -ffp-contract=fast if unsafe-math-optimizations is on.
10134
f42c637e
PM
101352014-03-08 Paulo Matos <paulo@matos-sorge.com>
10136
22b15758 10137 * c.opt: Enable LTO FE for fshort-double.
f42c637e 10138
70e24808
JM
101392014-03-07 Jason Merrill <jason@redhat.com>
10140
10141 * c.opt: Add -std=c++14.
10142
3af9c5e9
MP
101432014-03-06 Marek Polacek <polacek@redhat.com>
10144
10145 PR c/60197
10146 * cilk.c (contains_cilk_spawn_stmt): New function.
10147 (contains_cilk_spawn_stmt_walker): Likewise.
10148 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
10149 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
10150
b3bdf019
JJ
101512014-03-03 Jakub Jelinek <jakub@redhat.com>
10152
10153 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
10154 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
10155 even when flag_preprocess_only.
10156
ca7e759d
JM
101572014-02-26 Jason Merrill <jason@redhat.com>
10158
10159 PR c++/59231
10160 PR c++/11586
10161 * c-common.c (shorten_compare): Don't check
10162 c_inhibit_evaluation_warnings.
10163
28e41874
JJ
101642014-02-19 Jakub Jelinek <jakub@redhat.com>
10165
cca615af
JJ
10166 PR c/37743
10167 * c-common.c (c_common_nodes_and_builtins): When initializing
10168 c_uint{16,32,64}_type_node, also set corresponding
10169 uint{16,32,64}_type_node to the same value.
10170
28e41874
JJ
10171 PR c++/60267
10172 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
10173 for PRAGMA_IVDEP if flag_preprocess_only.
10174
c2bf53a1
JJ
101752014-02-12 Jakub Jelinek <jakub@redhat.com>
10176
10177 PR c/60101
10178 * c-common.c (merge_tlist): If copy is true, call new_tlist,
10179 if false, add ADD itself, rather than vice versa.
10180 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
10181 copy. For SAVE_EXPR, only call merge_tlist once.
10182
8fcbce72
JJ
101832014-02-08 Jakub Jelinek <jakub@redhat.com>
10184
10185 PR middle-end/60092
10186 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
10187 and tree_to_uhwi.
10188 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
10189 functions.
10190 (c_common_attribute_table): Add alloc_align and assume_aligned
10191 attributes.
10192
0a756a3f
MP
101932014-02-06 Marek Polacek <polacek@redhat.com>
10194
10195 PR c/60087
10196 * c-common.c (warn_for_sign_compare): Call warning_at with location
10197 instead of warning.
10198
7ec4847a
MP
101992014-02-05 Marek Polacek <polacek@redhat.com>
10200
10201 PR c/53123
10202 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
10203 statement.
10204
66f20604
MP
102052014-02-04 Marek Polacek <polacek@redhat.com>
10206
10207 PR c/60036
10208 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
10209 SAVE_EXPR.
10210
5d77fb19
MG
102112014-02-03 Marc Glisse <marc.glisse@inria.fr>
10212
10213 PR c++/53017
10214 PR c++/59211
10215 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
10216 handle_vector_size_attribute, handle_nonnull_attribute): Call
10217 default_conversion on the attribute argument.
10218 (handle_nonnull_attribute): Increment the argument number.
10219
81e5eca8
MP
102202014-01-31 Marek Polacek <polacek@redhat.com>
10221
10222 PR c/59963
10223 * c-common.c (add_atomic_size_parameter): Pass vNULL to
10224 build_function_call_vec.
10225 (resolve_overloaded_builtin): Likewise.
10226 * c-common.h (build_function_call_vec): Adjust declaration.
10227
68fca595
MP
102282014-01-30 Marek Polacek <polacek@redhat.com>
10229
10230 PR c/59940
10231 * c-common.h (unsafe_conversion_p): Adjust declaration.
10232 (warnings_for_convert_and_check): Likewise.
10233 (convert_and_check): Likewise.
10234 * c-common.c (unsafe_conversion_p): Add location parameter. Call
10235 expansion_point_location_if_in_system_header on it.
10236 (warnings_for_convert_and_check): Add location parameter. Call
10237 expansion_point_location_if_in_system_header on it. Use it.
10238 (convert_and_check): Add location parameter. Use it.
10239 (conversion_warning): Likewise.
10240 (c_add_case_label): Adjust convert_and_check calls.
10241 (scalar_to_vector): Adjust unsafe_conversion_p calls.
10242
b72271b9
BI
102432014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
10244
10245 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
10246 flag_cilkplus.
10247 * c-pragma.c (init_pragma): Likewise.
10248 * c.opt: Likewise.
10249
393e8e8b
MP
102502014-01-23 Marek Polacek <polacek@redhat.com>
10251
10252 PR c/59846
10253 * c-common.c (shorten_compare): Add location_t parameter.
10254 * c-common.h (shorten_binary_op): Adjust declaration.
10255
f04dda30
MP
102562014-01-23 Marek Polacek <polacek@redhat.com>
10257
10258 PR c/58346
10259 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
10260 * c-common.h: Declare it.
10261
621955cb
EB
102622014-01-20 Eric Botcazou <ebotcazou@adacore.com>
10263
10264 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
10265 * c-ada-spec.c (dump_ads): Likewise.
10266 (cpp_check): Likewise.
10267 (dump_ada_specs): Likewise.
10268
102692014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
10270
10271 PR c++/49718
10272 * c-common.c (handle_no_instrument_function_attribute): Allow
10273 no_instrument_function attribute in class member
10274 definition/declaration.
10275
241f845a
JJ
102762014-01-15 Jakub Jelinek <jakub@redhat.com>
10277
10278 PR c/58943
10279 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
10280 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
10281 being COMPOUND_EXPR.
10282 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
10283 operand a SAVE_EXPR and second MODIFY_EXPR.
10284
e83b8e2e
JJ
102852014-01-09 Jakub Jelinek <jakub@redhat.com>
10286
10287 PR target/58115
10288 * c-pch.c (c_common_write_pch): Call
10289 prepare_target_option_nodes_for_pch.
10290
23a5b65a
RS
102912014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10292
10293 Update copyright years
10294
f9030485
RS
102952014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10296
10297 * array-notation-common.c, c-cilkplus.c: Use the standard form for
10298 the copyright notice.
10299
f2aa696b
EB
103002013-12-28 Eric Botcazou <ebotcazou@adacore.com>
10301
10302 * c-ada-spec.c (print_constructor): New function.
10303 (print_destructor): Retrieve the origin of the destructor.
10304 (print_ada_declaration): Revamp handling of constructors/destructors.
10305
3f8257db 103062013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
10307 Bill Maddox <maddox@google.com>
10308 Jason Merrill <jason@redhat.com>
10309
10310 * c.opt: Add -fdeclone-ctor-dtor.
10311 * c-opts.c (c_common_post_options): Default to on iff -Os.
10312
41958c28
BI
103132013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
10314
10315 * c-common.c (c_common_attribute_table): Added "cilk simd function"
10316 attribute.
10317 * c-pragma.h (enum pragma_cilk_clause): Remove.
ab20d992 10318 (enum pragma_omp_clause): Added the following fields:
41958c28
BI
10319 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
10320 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
10321 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
10322 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
10323 PRAGMA_CILK_CLAUSE_UNIFORM.
10324
b1726d6c 10325
12893402
BI
103262013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
10327
10328 * cilk.c (cilk_outline): Made this function non-static.
10329 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
10330 (create_cilk_wrapper): Added a new parameter: a function pointer.
10331 (c_install_body_w_frame_cleanup): Remove
10332 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
10333 * c-common.h (cilk_outline): New prototype.
10334 (gimplify_cilk_spawn): Removed two parameters.
10335 (cilk_install_body_with_frame_cleanup): New prototype.
10336 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
10337 CILK_SPAWN_STMT case.
10338
085b42ed
BS
103392013-12-11 Bernd Schmidt <bernds@codesourcery.com>
10340
2ce064c3
BS
10341 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
10342
085b42ed
BS
10343 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
10344 (int_array_type_node): Remove.
10345 * c-common.c (c_common_nodes_and_builtins): Don't build it.
10346
9e36c9ed
MP
103472013-12-05 Marek Polacek <polacek@redhat.com>
10348
10349 PR c/52023
10350 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
10351 [ADJUST_FIELD_ALIGN].
10352
296674db
JM
103532013-12-04 Joseph Myers <joseph@codesourcery.com>
10354
10355 PR c/52023
10356 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
10357 and check field alignment if set.
10358 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
10359 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
10360
b1726d6c 103612013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
10362 Marek Polacek <polacek@redhat.com>
10363
10364 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
10365 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
10366
d7947e19
L
103672013-11-29 H.J. Lu <hongjiu.lu@intel.com>
10368
10369 PR c/59309
10370 * cilk.c (gimplify_cilk_spawn): Properly handle function without
10371 arguments.
10372
fad7652e
JJ
103732013-11-29 Jakub Jelinek <jakub@redhat.com>
10374
10375 PR c/59280
10376 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
10377 goto invalid. If it is error_mark_node, don't issue further
10378 diagnostics.
10379
8b5e1202
SO
103802013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
10381
10382 * c.opt (Wopenmp-simd): New.
10383
0a508bb6
JJ
103842013-11-22 Jakub Jelinek <jakub@redhat.com>
10385
10386 * c-ubsan.h (ubsan_instrument_return): New prototype.
10387 * c-ubsan.c (ubsan_instrument_return): New function.
10388
2fb9a547
AM
103892013-11-22 Andrew MacLeod <amacleod@redhat.com>
10390
10391 * c-common.c: Add required include files from gimple.h.
ab20d992
JJ
10392 * c-gimplify.c: Likewise.
10393 * cilk.c: Likewise.
2fb9a547 10394
8400e75e
DM
103952013-11-22 David Malcolm <dmalcolm@redhat.com>
10396
10397 * c-common.c (unsafe_conversion_p): Remove use of
10398 EXPR_LOC_OR_HERE macro.
10399 (conversion_warning): Likewise.
10400 (warnings_for_convert_and_check): Likewise.
10401 (warn_for_collisions_1): Likewise.
10402 (shorten_compare): Likewise, and remove use of in_system_header
10403 macro, using the location from the former.
10404 * c-lex.c (dump_one_header): Remove use of input_filename macro.
10405 (cb_def_pragma): Remove use of in_system_header macro.
10406 (lex_string): Likewise.
10407 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
10408
eb1ce453
KZ
104092013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10410 Mike Stump <mikestump@comcast.net>
10411 Richard Sandiford <rdsandiford@googlemail.com>
10412
10413 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
10414 instead of TREE_INT_CST_LOW, in cases where there is a protecting
10415 tree_fits_shwi_p or tree_fits_uhwi_p.
10416 (dump_generic_ada_node): Likewise.
10417 * c-format.c (check_format_arg): Likewise.
10418 * c-pretty-print.c (pp_c_integer_constant): Likewise.
10419
6b3b8c27
KZ
104202013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10421
10422 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
10423
49b0aa18
JC
104242013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
10425
10426 PR c/53001
10427 * c-common.c (unsafe_conversion_p): Make this function
10428 return an enumeration with more detail.
10429 (conversion_warning): Use the new return type of
10430 unsafe_conversion_p to separately warn either about conversions
10431 that lower floating point number precision or about the other
10432 kinds of conversions.
10433 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
10434 (unsafe_conversion_p): switching return type to
10435 conversion_safety enumeration.
49b0aa18
JC
10436 * c.opt: Adding new warning -Wfloat-conversion and
10437 enabling it with -Wconversion.
10438
b826515a
BS
104392013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
10440
8e745a17
JJ
10441 * c-opts.c: Include plugin.h.
10442 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 10443
b9a55b13
MP
104442013-11-19 Marek Polacek <polacek@redhat.com>
10445
10446 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
10447 call.
10448 (ubsan_instrument_shift): Likewise.
10449 (ubsan_instrument_vla): Likewise.
10450
7d362f6c
RS
104512013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10452
10453 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
10454 cast to unsigned type.
10455
386b1f1f
RS
104562013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10457
10458 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
10459 tree_low_cst.
10460 (complete_array_type): Update comment to refer to tree_to_[su]hwi
10461 rather than tree_low_cst.
10462
ae7e9ddd
RS
104632013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10464
10465 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
10466 tree_to_uhwi throughout.
10467
9439e9a1
RS
104682013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10469
10470 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
10471 tree_low_cst (..., 0) with tree_to_shwi throughout.
10472
cc269bb6
RS
104732013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10474
10475 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
10476 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
10477
9541ffee
RS
104782013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10479
10480 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
10481 host_integerp (..., 0) with tree_fits_shwi_p throughout.
10482
c02065fc
AH
104832013-11-15 Aldy Hernandez <aldyh@redhat.com>
10484
10485 * c-cilkplus.c: New file.
10486 * c-common.c (readonly_error): Add location argument.
10487 * c-common.h (readonly_error): Same.
10488 (c_finish_cilk_clauses): Protoize.
10489 (c_check_cilk_loop): Same.
10490 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
10491 Do not fail on error_mark_node.
10492 Abstract increment canonicalization to here...
10493 (c_omp_for_incr_canonicalize_ptr): New.
10494 c-pragma.c (init_pragma): Register "simd" pragma.
10495 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
10496 (enum pragma_cilk_clause): New.
10497
9cc65f15
RS
104982013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
10499
10500 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
10501 wchar_type and host_integerp checks.
10502
18f429e2
AM
105032013-11-14 Andrew MacLeod <amacleod@redhat.com>
10504
10505 * c-common.c: Likewise.
10506 * c-gimplify.c: Likewise.
10507 * cilk.c: Likewise.
10508
d8a2d370
DN
105092013-11-14 Diego Novillo <dnovillo@google.com>
10510
10511 * c-common.c: Include fold-const.h.
10512 Include stor-layout.h.
10513 Include calls.h.
10514 Include stringpool.h.
10515 Include attribs.h.
10516 Include varasm.h.
10517 Include trans-mem.h.
10518 * c-cppbuiltin.c: Include stor-layout.h.
10519 Include stringpool.h.
10520 * c-format.c: Include stringpool.h.
10521 * c-lex.c: Include stringpool.h.
10522 Include stor-layout.h.
10523 * c-pragma.c: Include stringpool.h.
10524 Include attribs.h.
10525 Include varasm.h.
10526 Include gcc-symtab.h.
10527 * c-pretty-print.c: Include stor-layout.h.
10528 Include attribs.h.
10529 * cilk.c: Include stringpool.h.
10530 Include calls.h.
10531
38b7bc7f
JM
105322013-11-13 Joseph Myers <joseph@codesourcery.com>
10533
10534 * c-common.h (enum rid): Add RID_AUTO_TYPE.
10535 * c-common.c (c_common_reswords): Add __auto_type.
10536 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
10537
45b0be94
AM
105382013-11-12 Andrew MacLeod <amacleod@redhat.com>
10539
18f429e2
AM
10540 * c-common.c: Include gimplify.h.
10541 * c-gimplify.c: Likewise.
10542 * cilk.c: Likewise.
10543 * c-omp.c: Include gimple-expr.h instead of gimple.h.
10544 * c-ubsan.c: Don't include gimple.h.
45b0be94 10545
582d9b50
JM
105462013-11-12 Joseph Myers <joseph@codesourcery.com>
10547
10548 * c-common.c (c_common_reswords): Add _Thread_local.
10549
6b28e197
JM
105502013-11-09 Joseph Myers <joseph@codesourcery.com>
10551
10552 * c-common.c (atomic_size_supported_p): New function.
10553 (resolve_overloaded_atomic_exchange)
10554 (resolve_overloaded_atomic_compare_exchange)
10555 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
10556 Use it instead of comparing size with a local list of sizes.
10557
267bac10
JM
105582013-11-07 Andrew MacLeod <amacleod@redhat.com>
10559 Joseph Myers <joseph@codesourcery.com>
10560
10561 * c-common.h (enum rid): Add RID_ATOMIC.
10562 * c-common.c (c_common_reswords): Add _Atomic.
10563 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
10564 (keyword_is_type_qualifier): Accept RID_ATOMIC.
10565 * c-format.c (check_format_types): Check for extra _Atomic
10566 qualifiers in format argument.
10567 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
10568 (pp_c_type_qualifier_list): Mention _Atomic in comment.
10569
5157b91e
TB
105702013-11-06 Tobias Burnus <burnus@net-b.de>
10571
10572 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
10573
6dbe0958
JM
105742013-11-06 Joseph Myers <joseph@codesourcery.com>
10575
10576 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
10577 standards modes.
10578 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
10579 to mean lack of IEEE 754 support.
10580
e8ff5196
TB
105812013-11-05 Tobias Burnus <burnus@net-b.de>
10582
10583 * c.opt (-Wdate-time): New option
10584 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
10585
254a0760
JM
105862013-11-05 Joseph Myers <joseph@codesourcery.com>
10587
10588 * c-cppbuiltin.c (cpp_iec_559_value): Test
10589 flag_excess_precision_cmdline not flag_excess_precision.
10590
6d7f7e0a
TB
105912013-11-05 Tobias Burnus <burnus@net-b.de>
10592
10593 * c.opt (fopenmp-simd): New option.
10594 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
10595 (omp_pragmas): ... this new struct.
10596 (c_pp_lookup_pragma): Also walk omp_pragmas.
10597 (init_pragma): Init pragmas for -fopenmp-simd.
10598
55a7f02f
MP
105992013-11-04 Marek Polacek <polacek@redhat.com>
10600
10601 PR c++/58979
10602 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
10603
9193fb05
JM
106042013-11-04 Joseph Myers <joseph@codesourcery.com>
10605
10606 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
10607 New functions.
10608 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
10609
94159ecf
EB
106102013-11-04 Eric Botcazou <ebotcazou@adacore.com>
10611
10612 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
10613 (dump_ada_specs): Adjust prototype of second callback.
10614 * c-ada-spec.c (cpp_check): New global variable.
10615 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
10616 (print_generic_ada_decl): Likewise.
10617 (has_static_fields): Change return type to bool and add guard.
10618 (has_nontrivial_methods): New predicate.
10619 (is_tagged_type): Change return type to bool.
10620 (separate_class_package): Call has_nontrivial_methods.
10621 (pp_ada_tree_identifier): Minor tweaks.
10622 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
10623 (dump_ada_array_domains): Likewise.
10624 (dump_ada_array_type): Likewise.
10625 (dump_template_types): Remove cpp_check parameter and do not pass it to
10626 dump_generic_ada_node.
10627 (dump_ada_template): Likewise.
10628 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
10629 recursively.
10630 (print_ada_methods): Change return type to integer. Remove cpp_check
10631 parameter and do not pass it down.
10632 (dump_nested_types): Remove cpp_check parameter and do not pass it to
10633 dump_generic_ada_node.
10634 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
10635 accessing methods.
10636 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
10637 down. Use has_nontrivial_methods to recognize C++ classes. Use return
10638 value of print_ada_methods.
10639 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
10640 Set cpp_check to it before invoking dump_ada_nodes.
10641 (dump_ada_specs): Likewise.
10642
b906f4ca
MP
106432013-11-03 Marek Polacek <polacek@redhat.com>
10644
10645 * c-ubsan.c: Don't include hash-table.h.
10646 (ubsan_instrument_vla): New function.
10647 * c-ubsan.h: Declare it.
10648
5e20cdc9
DM
106492013-10-31 David Malcolm <dmalcolm@redhat.com>
10650
10651 Automated part of renaming of symtab_node_base to symtab_node.
10652
10653 Patch autogenerated by rename_symtab.py from
10654 https://github.com/davidmalcolm/gcc-refactoring-scripts
10655 revision 58bb219cc090b2f4516a9297d868c245495ee622
10656
10657 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
10658 symtab_node_base to symtab_node.
10659
7057e645
ESR
106602013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
10661
8e745a17 10662 Implement C++14 digit separators.
7057e645
ESR
10663 * c-lex.c (interpret_float): Remove digit separators from scratch string
10664 before building real literal.
10665
193ea7bc
JJ
106662013-10-30 Jakub Jelinek <jakub@redhat.com>
10667
10668 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
10669
939b37da
BI
106702013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
10671
10672 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
10673 fields.
10674 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
10675 enabled.
10676 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
10677 (insert_cilk_frame): New prototype.
10678 (cilk_init_builtins): Likewise.
10679 (gimplify_cilk_spawn): Likewise.
10680 (c_cilk_install_body_w_frame_cleanup): Likewise.
10681 (cilk_detect_spawn_and_unwrap): Likewise.
10682 (cilk_set_spawn_marker): Likewise.
10683 (build_cilk_sync): Likewise.
10684 (build_cilk_spawn): Likewise.
10685 * cilk.c: New file.
10686
67348ccc
DM
106872013-10-29 David Malcolm <dmalcolm@redhat.com>
10688
10689 Patch autogenerated by refactor_symtab.py from
10690 https://github.com/davidmalcolm/gcc-refactoring-scripts
10691 revision 58bb219cc090b2f4516a9297d868c245495ee622
10692
10693 * c-gimplify.c (c_genericize): Update for conversion of symtab types
10694 to a true class hierarchy.
10695 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
10696
d570872d
RS
106972013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
10698
10699 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
10700
98906124
JL
107012013-10-26 Jeff Law <law@redhat.com>
10702
adfac8df
JJ
10703 * c-common.c (c_define_builtins): Remove mudflap support.
10704 * c.opt: Ignore and warn for mudflap options.
98906124 10705
d73749df 107062013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
10707
10708 PR other/33426
10709 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
10710 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
10711
3f04b1bb
JM
107122013-10-23 Jason Merrill <jason@redhat.com>
10713
10714 * c-format.c (gcc_cxxdiag_char_table): Add %X.
10715
acf0174b
JJ
107162013-10-11 Jakub Jelinek <jakub@redhat.com>
10717
acd15a28
JJ
10718 * c-common.h (omp_clause_mask::operator !=): New method.
10719 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
10720 instead of if (mask & something) tests everywhere.
10721
acf0174b
JJ
10722 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
10723 201307 instead of 201107.
10724 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
10725 (c_common_attribute_table): Add "omp declare target" and
10726 "omp declare simd" attributes.
10727 (handle_omp_declare_target_attribute,
10728 handle_omp_declare_simd_attribute): New functions.
10729 * c-omp.c: Include c-pragma.h.
10730 (c_finish_omp_taskgroup): New function.
10731 (c_finish_omp_atomic): Add swapped argument, if true,
10732 build the operation first with rhs, lhs arguments and use NOP_EXPR
10733 build_modify_expr.
10734 (c_finish_omp_for): Add code argument, pass it down to make_code.
10735 (c_omp_split_clauses): New function.
10736 (c_split_parallel_clauses): Removed.
10737 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
10738 c_omp_declare_simd_clauses_to_decls): New functions.
10739 * c-common.h (omp_clause_mask): New type.
10740 (OMP_CLAUSE_MASK_1): Define.
10741 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
10742 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
10743 omp_clause_mask::operator |, omp_clause_mask::operator &,
10744 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
10745 omp_clause_mask::operator ==): New methods.
10746 (enum c_omp_clause_split): New.
10747 (c_finish_omp_taskgroup): New prototype.
10748 (c_finish_omp_atomic): Add swapped argument.
10749 (c_finish_omp_for): Add code argument.
10750 (c_omp_split_clauses): New prototype.
10751 (c_split_parallel_clauses): Removed.
10752 (c_omp_declare_simd_clauses_to_numbers,
10753 c_omp_declare_simd_clauses_to_decls): New prototypes.
10754 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
10755 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
10756 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
10757 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
10758 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
10759 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
10760 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
10761 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
10762 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
10763 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
10764 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
10765 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
10766 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
10767 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
10768 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
10769 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
10770 PRAGMA_OMP_CLAUSE_UNIFORM.
10771
826cacfe
MG
107722013-10-09 Marc Glisse <marc.glisse@inria.fr>
10773
10774 PR tree-optimization/20318
10775 * c-common.c (handle_returns_nonnull_attribute): New function.
10776 (c_common_attribute_table): Add returns_nonnull.
10777
2284b034
MG
107782013-10-03 Marc Glisse <marc.glisse@inria.fr>
10779
10780 PR c++/19476
10781 * c.opt (fcheck-new): Move to common.opt.
10782
b56e9788
MP
107832013-09-25 Marek Polacek <polacek@redhat.com>
10784 Jakub Jelinek <jakub@redhat.com>
10785
10786 PR sanitizer/58413
10787 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
10788 an expression if we can prove it is correct.
10789 (ubsan_instrument_division): Likewise. Remove unnecessary
10790 check.
10791
ce6923c5
MP
107922013-09-18 Marek Polacek <polacek@redhat.com>
10793
10794 PR sanitizer/58411
10795 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
10796 Declare it.
10797 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
10798
fb5610fb
IS
107992013-09-14 Iain Sandoe <iain@codesourcery.com>
10800
10801 PR target/48094
10802 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
10803 fobjc-gc, freplace-objc-classes): Accept for LTO.
10804
88b0e79e
JC
108052013-09-13 Jacek Caban <jacek@codeweavers.com>
10806
10807 * c-target.def: New hook
10808
c9b0866a
PC
108092013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
10810
10811 PR c++/43452
10812 * c.opt (Wdelete-incomplete): Add.
10813
0af94e6f
JR
108142013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
10815
10816 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
10817 (vector_types_compatible_elements_p): New function.
10818 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
10819 declaration.
10820 (vector_types_compatible_elements_p): Declare.
10821
7c26172c
GDR
108222013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
10823
10824 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
10825 a virtual member function.
10826 (pp_simple_type_specifier): Remove.
10827 (pp_c_type_specifier): Likewise.
10828 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
10829 Rename from pp_c_type_specifier. Adjust.
10830 (c_pretty_printer::c_pretty_printer): Do not assign to
10831 simple_type_specifier.
10832
20059c8b
GDR
108332013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10834
10835 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
10836 member function.
10837 (c_pretty_printer::storage_class_specifier): Likewise.
10838 (c_pretty_printer::initializer): Likewise.
10839 (pp_declaration): Remove.
10840 (pp_declaration_specifiers): Likewise.
10841 (pp_abstract_declarator): Likewise.
10842 (pp_declarator): Likewise.
10843 (pp_type_id): Likewise.
10844 (pp_statement): Likewise.
10845 (pp_constant): Likewise.
10846 (pp_id_expression): Likewise.
10847 (pp_primary_expression): Likewise.
10848 (pp_unary_expression): Likewise.
10849 (pp_multiplicative_expression): Likewise.
10850 (pp_conditional_expression): Likewise.
10851 (pp_assignment_expression): Likewise.
10852 (pp_expression): Likewise.
10853 (pp_c_type_id): Likewise.
10854 (pp_c_storage_class_specifier): Likewise.
10855 * c-pretty-print.c (pp_c_type_cast): Tidy.
10856 (pp_c_pointer): Likewise.
10857 (pp_c_type_specifier): Likewise.
10858 (pp_c_parameter_type_list): Likewise.
10859 (pp_c_function_definition): Likewise.
10860 (pp_c_init_declarator): Likewise.
10861 (pp_c_initializer_list): Likewise.
10862 (pp_c_constructor_elts): Likewise.
10863 (c_pretty_printer::direct_abstract_declarator): Likewise.
10864 (c_pretty_printer::declaration_specifiers): Likewise.
10865 (c_pretty_printer::primary_expression): Likewise.
10866 (c_pretty_printer::postfix_expression): Likewise.
10867 (c_pretty_printer::type_id): Rename from pp_c_type_id.
10868 (c_pretty_printer::storage_class_specifier): Rename from
10869 pp_c_storage_class_specifier.
10870 (c_pretty_printer::initializer): Rename from pp_c_initializer.
10871 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
10872 storage_class_specifier, initializer, offset_list, flags.
10873
de5a5fa1
MP
108742013-08-30 Marek Polacek <polacek@redhat.com>
10875
10876 * c-ubsan.c: New file.
10877 * c-ubsan.h: New file.
10878
8f0e4d72
GDR
108792013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
10880
10881 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
10882 member function.
10883 (c_pretty_printer::declaration_specifiers): Likewise.
10884 (c_pretty_printer::declarator): Likewise.
10885 (c_pretty_printer::abstract_declarator): Likewise.
10886 (c_pretty_printer::direct_abstract_declarator): Likewise.
10887 (c_pretty_printer::direct_declarator): Likewise.
10888 (c_pretty_printer::function_specifier): Likewise.
10889 (pp_declaration): Adjust.
10890 (pp_declaration_specifiers): Likewise.
10891 (pp_abstract_declarator): Likewise.
10892 (pp_direct_declarator): Likewise.
10893 (pp_function_specifier): Likewise.
10894 (pp_direct_abstract_declarator): Remove as unused.
10895 (pp_c_declaration): Remove.
10896 (pp_c_declaration_specifiers): Likewise.
10897 (pp_c_declarator): Likewise.
10898 (pp_c_direct_declarator): Likewise.
10899 (pp_c_function_specifier): Likewise.
10900 (pp_c_direct_abstract_declarator): Likewise.
10901 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
10902 from pp_c_abstract_declarator. Adjust.
ab20d992 10903 (c_pretty_printer::direct_abstract_declarator): Rename from
8f0e4d72
GDR
10904 pp_c_direct_abstract_declarator. Adjust.
10905 (c_pretty_printer::function_specifier): Rename from
10906 pp_c_function_specifier. Adjust.
10907 (c_pretty_printer::declaration_specifiers): Rename from
10908 pp_c_declaration_specifiers. Adjust.
10909 (c_pretty_printer::direct_declarator): Rename from
10910 pp_c_direct_declarator. Adjust.
10911 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
10912 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
10913 (c_pretty_printer::c_pretty_printer): Do not assign to
10914 declaration, declaration_specifiers, declarator,
10915 direct_declarator, direct_abstract_declarator, function_specifier.
10916
00d34d3a
GDR
109172013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
10918
10919 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
10920 virtual member function.
10921 (c_pretty_printer::multiplicative_expression): Likewise.
10922 (c_pretty_printer::conditional_expression): Likewise.
10923 (c_pretty_printer::assignment_expression): Likewise.
10924 (c_pretty_printer::expression): Likewise.
10925 (pp_unary_expression): Adjust.
10926 (pp_multiplicative_expression): Likewise.
10927 (pp_assignment_expression): Likewise.
10928 (pp_conditional_expression): Likewise.
10929 (pp_expression): Likewise.
10930 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
10931 from pp_c_unary_expression. Adjust.
10932 (c_pretty_printer::multiplicative_expression): Rename from
10933 pp_c_multiplicative_expression. Adjust.
10934 (c_pretty_printer::conditional_expression): Rename from
10935 pp_c_conditional_expression. Adjust.
10936 (c_pretty_printer::assignment_expression): Rename from
10937 pp_c_assignment_expression. Adjust.
10938 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
10939 (c_pretty_printer::c_pretty_printer): Do not assign to
10940 unary_expression, multiplicative_expression,
10941 conditional_expression, expression.
10942
fb22178f
GDR
109432013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10944
10945 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
10946 virtual member function.
10947 (pp_postfix_expression): Adjust.
10948 (pp_c_postfix_expression): Remove.
10949 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
10950 from pp_c_postfix_expression. Adjust.
10951 (c_pretty_printer::c_pretty_printer): Do not assign to
10952 postfix_expression.
10953
7ecc2600
GDR
109542013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10955
10956 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
10957 virtua member function.
10958 (pp_primary_expression): Adjust.
10959 (pp_c_primary_expression): Remove.
10960 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
10961 from pp_c_primary_expression. Adjust.
10962 (pp_c_initializer_list): Use pp_primary_expression.
10963 (c_pretty_printer::c_pretty_printer): Do not assign to
10964 primary_expression.
10965
0691175f
GDR
109662013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10967
10968 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
10969 * c-pretty-print.c (M_): Remove.
10970 (c_pretty_printer::translate_string): Define.
10971 (pp_c_type_specifier): Use it.
10972 (pp_c_primary_expression): Likewise.
10973 (pp_c_expression): Likewise.
10974
66dfe4c4
GDR
109752013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
10976
10977 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
10978 virtual function.
10979 (pp_c_id_expression): Remove.
10980 (pp_id_expression): Adjust.
10981 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
10982 pp_c_id_expression. Adjust.
10983 (pp_c_postfix_expression): Use pp_id_expression.
10984 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
10985
ca43e9d5
GDR
109862013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
10987
10988 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
10989 member function.
10990 (pp_constant): Adjust.
10991 (pp_c_constant): Remove.
10992 * c-pretty-print.c (c_pretty_printer::constant): Rename from
10993 pp_c_constant. Adjust.
10994 (pp_c_constant)
10995 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
10996 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
10997
da6ca2b5
GDR
109982013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
10999
11000 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
11001 (c_pretty_printer::c_pretty_printer): Declare.
11002 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
11003 c_pretty_printer_init. Adjust.
11004 (print_c_tree): Do not call c_pretty_printer_init.
11005 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
11006
65a372f4
AC
110072013-08-09 Arnaud Charlet <charlet@adacore.com>
11008
11009 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
11010
fd9b0f32
PC
110112013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
11012
11013 PR c++/58080
11014 * c-common.c (pointer_int_sum): Add bool parameter.
11015 * c-common.h (pointer_int_sum): Adjust declaration.
11016
e0aec1e9
GDR
110172013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
11018
11019 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
11020 c_pretty_printer variable.
11021
b066401f
GDR
110222013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
11023
11024 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
11025 (pp_base): Remove.
11026 (pp_c_base): Likewise. Adjust users.
11027 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
11028 (pp_c_whitespace): Do not call pp_base.
11029 (pp_c_left_paren): Likewise.
11030 (pp_c_right_paren): Likewise.
11031 (pp_c_left_brace): Likewise.
11032 (pp_c_right_brace): Likewise.
11033 (pp_c_left_bracket): Likewise.
11034 (pp_c_right_bracket): Likewise.
11035 (pp_c_dot): Likewise.
11036 (pp_c_ampersand): Likewise.
11037 (pp_c_star): Likewise.
11038 (pp_c_arrow): Likewise.
11039 (pp_c_semicolon): Likewise.
11040 (pp_c_complement): Likewise.
11041 (pp_c_exclamation): Likewise.
11042 (pp_c_direct_declarator): Likewise.
11043 (pp_c_ws_string): Likewise.
11044 (pp_c_identifier): Likewise.
11045 (pp_c_statement): Likewise.
11046 (print_c_tree): Likewise.
11047
65e5a578
ESR
110482013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
11049
11050 PR c++/58072
11051 * c-common.c (c_parse_error): Catch user-defined literal tokens and
11052 provide useful error strings.
11053
137a1a27
GDR
110542013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11055
11056 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
11057 printer functions instead of pp_string or operators and punctuators.
11058 (dump_generic_ada_node): Likewise.
11059 * c-pretty-print.c (pp_c_type_specifier): Likewise.
11060 (pp_c_relational_expression): Likewise.
11061 (pp_c_logical_or_expression): Likewise.
11062
07838b13
GDR
110632013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11064
11065 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
11066 functions instead of pp_character.
11067 (pp_ada_tree_identifier): Likewise.
11068 (dump_ada_double_name): Likewise.
11069 (dump_ada_function_declaration): Likewise.
11070 (dump_ada_array_domains): Likewise.
11071 (dump_template_types): Likewise.
11072 (dump_generic_ada_node): Likewise.
11073 (print_ada_declaration): Likewise.
11074 (print_ada_struct_decl): Likewise.
11075 * c-pretty-print.c (pp_c_integer_constant): Likewise.
11076
433cc7b0
TT
110772013-07-23 Tom Tromey <tromey@redhat.com>
11078
11079 * c-common.h (enum rid) <RID_GENERIC>: New constant.
11080 * c-common.c (c_common_reswords): Add _Generic.
11081
688010ba
OB
110822013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
11083
11084 * c-common.c: Fix typos.
11085 * c-common.h: Likewise.
11086
2a99e5e6
LL
110872013-07-13 Lubos Lunak <l.lunak@suse.cz>
11088
11089 PR c++/55203
11090 * c-common.c (c_common_attribute_table): Add warn_unused.
11091 (handle_warn_unused_attribute): New.
11092
c26302d5
JJ
110932013-07-10 Jakub Jelinek <jakub@redhat.com>
11094
11095 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
11096 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
11097
dfeadaa0
PC
110982013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
11099
11100 PR c++/57869
11101 * c.opt: Add Wconditionally-supported.
11102
6a2fa4b2
GS
111032013-07-08 Graham Stott <graham.stott@btinternet.com>
11104
adfac8df 11105 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
11106 unused variables l_length and l_node.
11107
ecdbd01a 111082013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
11109
11110 PR c/57821
11111 * c-common.c (complete_array_type): Delay folding first index
11112 like other indices. When folding, check for index overflow.
11113
bedc293e
MG
111142013-06-27 Marc Glisse <marc.glisse@inria.fr>
11115
11116 PR c++/57509
11117 * c-common.h (c_build_vec_perm_expr): New complain argument.
11118 * c-common.c (c_build_vec_perm_expr): Likewise.
11119 Use save_expr also in C++.
11120
604b2bfc
GDR
111212013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
11122
11123 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
11124 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
11125 * c-opts.c (c_common_post_options): Likewise.
11126
dfeadaa0 111272013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
11128
11129 * array-notation-common.c (length_mismatch_in_expr): Changed the
11130 parameter type's from a dynamic array to a vec_tree. Also removed
11131 the size parameters.
11132 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
11133 the change above.
11134
2ce86d2e
BI
111352013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
11136
11137 * c-common.h (struct cilkplus_an_parts): New structure.
11138 (struct cilkplus_an_loop_parts): Likewise.
11139 (cilkplus_extract_an_triplets): New prototype.
11140 (fix_sec_implicit_args): Likewise.
11141 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
11142 (fix_sec_implicit_args): Likewise.
604b2bfc 11143
07a6825b
BI
111442013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
11145
11146 * array-notation-common.c (find_inv_trees): Removed an unwanted
11147 typecasting.
11148 * c-common.h (struct inv_list::additional_tcodes): Changed type from
11149 enum rid to enum tree_code.
11150
08346abd
JH
111512013-06-11 Jan Hubicka <jh@suse.cz>
11152
11153 * c-common.c (handle_alias_ifunc_attribute): Do not set
11154 DECL_EXTERNAL for weakref variables.
11155 * c-pragma.c (handle_pragma_weak): Make sure aliases
11156 are not declared as external.
11157
d60f1706
BI
111582013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
11159
11160 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
11161 function from c/c-array-notation.c.
11162 (is_cilkplus_reduce_builtin): Likewise.
11163 (find_rank): Likewise.
11164 (extract_array_notation_exprs): Likewise.
11165 (replace_array_notations): Likewise.
11166 (find_inv_trees): Likewise.
11167 (replace_inv_trees): Likewise.
11168 (contains_array_notation_expr): Likewise.
11169 (find_correct_array_notation_type): Likewise.
11170 * c-common.h (struct inv_list): Moved this struct from the file
11171 c/c-array-notation.c and added a new field called additional tcodes.
11172 (length_mismatch_in_expr_p): New prototype.
11173 (is_cilkplus_reduce_builtin): Likewise.
11174 (find_rank): Likewise.
11175 (extract_array_notation_exprs): Likewise.
11176 (replace_array_notation): Likewise.
11177 (find_inv_trees): Likewise.
11178 (replace_inv_trees): Likewise.
11179 (find_correct_array_notation_type): Likewise.
dfeadaa0 11180
36536d79
BI
111812013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
11182
11183 * c-common.c (c_define_builtins): When cilkplus is enabled, the
11184 function array_notation_init_builtins is called.
11185 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
11186 * c-common.def (ARRAY_NOTATION_REF): New tree.
11187 * c-common.h (build_array_notation_expr): New function declaration.
11188 (build_array_notation_ref): Likewise.
11189 (extract_sec_implicit_index_arg): New extern declaration.
11190 (is_sec_implicit_index_fn): Likewise.
11191 (ARRAY_NOTATION_CHECK): New define.
11192 (ARRAY_NOTATION_ARRAY): Likewise.
11193 (ARRAY_NOTATION_START): Likewise.
11194 (ARRAY_NOTATION_LENGTH): Likewise.
11195 (ARRAY_NOTATION_STRIDE): Likewise.
11196 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
11197 ARRAY_NOTATION_REF.
11198 (pp_c_expression): Likewise.
11199 * c.opt (flag_enable_cilkplus): New flag.
11200 * array-notation-common.c: New file.
11201
f7716d57
JJ
112022013-05-14 Jakub Jelinek <jakub@redhat.com>
11203
11204 PR c++/57274
11205 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
11206
a5e0cd1d
MG
112072013-05-10 Marc Glisse <marc.glisse@inria.fr>
11208
11209 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
11210 vectors.
11211
f6bc1c4a
HS
112122013-05-07 Han Shen <shenhan@google.com>
11213
11214 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
11215
3f12f6e9
SKS
112162013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
11217
11218 * c-common.c (check_user_alignment): Emit error for negative values.
11219
61949153
PC
112202013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11221
11222 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
11223
e93e18e9
PC
112242013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11225
11226 * c-cppbuiltin.c (c_cpp_builtins): Do not define
11227 __GXX_EXPERIMENTAL_CXX1Y__.
11228
44d90fe1 112292013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 11230 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
11231
11232 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
11233 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
11234 to simply use OPT_Wpointer_arith.
11235 (c_sizeof_or_alignof_type): Likewise.
11236
13f39b2e
PC
112372013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11238
11239 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
11240
4b84d650
JJ
112412013-04-12 Jakub Jelinek <jakub@redhat.com>
11242
11243 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
11244 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
11245 specifiers.
11246
fb037b5d
SB
112472013-04-07 Steven Bosscher <steven@gcc.gnu.org>
11248
11249 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
11250
4e856798
PC
112512013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
11252
11253 * c-common.c (pointer_int_sum): Remove dead code.
11254
4b1baac8
RS
112552013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
11256
11257 PR middle-end/56524
11258 * c-common.c (handle_optimize_attribute): Don't call
11259 save_optabs_if_changed.
11260
0b50e654
JJ
112612013-03-05 Jakub Jelinek <jakub@redhat.com>
11262
11263 PR middle-end/56461
11264 * c-pch.c (pch_init): Free target_validity at the end.
11265
48c41403
JJ
112662013-03-04 Jakub Jelinek <jakub@redhat.com>
11267
11268 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
11269
e664c61c
KS
112702013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
11271 Jakub Jelinek <jakub@redhat.com>
11272
11273 PR sanitizer/56454
11274 * c-common.c (handle_no_sanitize_address_attribute): New function.
11275 (c_common_attribute_table): Add no_sanitize_address attribute.
11276 (handle_no_address_safety_analysis_attribute): Add
11277 no_sanitize_address attribute, not no_address_safety_analysis
11278 attribute.
11279
a475fd3d 112802013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
11281
11282 PR target/52555
11283 * c-common.c (handle_optimize_attribute): Call
11284 save_optabs_if_changed.
11285
f6007d99
JJ
112862013-02-18 Jakub Jelinek <jakub@redhat.com>
11287 Steven Bosscher <steven@gcc.gnu.org>
11288
11289 PR pch/54117
11290 * c-opts.c (c_common_post_options): If debug info is enabled
11291 and non-dwarf*, refuse to load PCH files and when writing PCH
11292 file warn.
11293
cf35e2b1
JJ
112942013-02-05 Jakub Jelinek <jakub@redhat.com>
11295
11296 PR middle-end/56167
11297 * c-common.c (handle_error_attribute): Fix condition.
11298
32887460
JJ
112992013-01-30 Jakub Jelinek <jakub@redhat.com>
11300
11301 PR c++/55742
11302 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
11303
5af057d8
JM
113042013-01-18 Jason Merrill <jason@redhat.com>
11305
11306 PR target/54908
11307 * c.opt (-fextern-tls-init): New.
11308 * c-opts.c (c_common_post_options): Handle it.
11309
cc83c823
JJ
113102013-01-09 Jakub Jelinek <jakub@redhat.com>
11311
11312 PR c/48418
11313 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
11314 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
11315 and is either negative or bigger or equal to type precision
11316 of the first operand.
11317
a859517f
MP
113182012-12-03 Marek Polacek <polacek@redhat.com>
11319
11320 PR c/55570
11321 * c-common.c (check_user_alignment): Swap order of tests,
11322 check TREE_CODE first.
11323
2d7aa578
ESR
113242012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
11325
11326 PR c++/52654
11327 * c-common.h (overflow_type): New enum.
11328 (build_userdef_literal): Add overflow_type argument.
11329 (tree_userdef_literal): Add overflow_type.
11330 (USERDEF_LITERAL_OVERFLOW): New access macro.
11331 * c-common.c (build_userdef_literal): Add overflow_type
11332 argument.
11333 * c-lex.c (c_lex_with_flags): Add overflow_type to
11334 build_userdef_literal calls.
11335 (interpret_integer, interpret_float): Add overflow_type argument.
11336
cc3c4f62
RB
113372012-11-28 Richard Biener <rguenther@suse.de>
11338
11339 PR c/35634
11340 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
11341 here and use a type with proper overflow behavior for types that would
11342 need to be promoted for the arithmetic.
11343
77bc5132
JJ
113442012-11-23 Jakub Jelinek <jakub@redhat.com>
11345
11346 PR sanitizer/55435
11347 * c-common.c (handle_no_address_safety_analysis_attribute): New
11348 function.
11349 (c_common_attribute_table): Add no_address_safety_analysis.
11350
5dc99c46
SB
113512012-11-16 Simon Baldwin <simonb@google.com>
11352
11353 * c.opt: Add f[no-]canonical-system-headers.
11354 * c-opts.c (c_common_handle_option): Handle
11355 OPT_fcanonical_system_headers.
11356
a4a0016d
ESR
113572012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
11358
11359 PR c++/54413
11360 * c-opts.c (c_common_handle_option): Set new flags.
11361 * c.opt: Describe new flags.
11362
7dbb85a7
JM
113632012-11-09 Jason Merrill <jason@redhat.com>
11364
11365 * c.opt (Wabi-tag): New.
11366
ad7bac31
AK
113672012-11-09 Andi Kleen <ak@linux.intel.com>
11368
11369 PR 55139
11370 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 11371 MEMMODEL_MASK
ad7bac31 11372
7332899a
MLI
113732012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11374
11375 PR c/53063
11376 * c.opt (Wformat): Make it Alias Wformat=1.
11377 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
11378 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
11379 LangEnabledBy.
11380 (Wformat=): RejectNegative. Use LangEnabledBy.
11381 (Wnonnull): Use LangEnabledBy.
11382 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
11383 * c-format.c (set_Wformat): Delete.
11384 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
ab20d992
JJ
11385 (maybe_read_dollar_number): Likewise.
11386 (avoid_dollar_number): Likewise.
11387 (finish_dollar_format_checking): Likewise.
11388 (check_format_info): Likewise.
11389 (check_format_info_main): Likewise.
11390 (check_format_types): Likewise.
11391 (format_type_warning): Likewise.
11392 * c-common.c (int): Likewise.
11393 (check_function_sentinel): Likewise.
8e745a17 11394 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 11395
34a180a6
MLI
113962012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11397
11398 PR c/53063
11399 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
11400 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
11401 Use LangEnabledBy.
11402 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
11403 common.opt.
11404 (Wvariadic-macros): Init(1).
11405 * c-opts.c (c_common_handle_option): Do not handle them
11406 explicitly.
11407 (c_common_post_options): Likewise.
11408 (sanitize_cpp_opts): warn_unused_macros is now
11409 cpp_warn_unused_macros.
11410 (push_command_line_include): Likewise.
11411 * c-common.c (warn_unknown_pragmas): Do not define.
11412 * c-common.h (warn_unknown_pragmas): Do not declare.
11413
3f46d6a5
MLI
114142012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11415
11416 PR c/51294
11417 * c-common.c (conversion_warning): Handle conditional expressions.
11418
880661a4
JW
114192012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
11420
11421 PR c++/54930
11422 * c.opt (Wreturn_local_addr): Define new option.
11423
4514a96b
JM
114242012-10-25 Jason Merrill <jason@redhat.com>
11425
f14edc1a
JM
11426 * c.opt (Wvirtual-move-assign): New.
11427
4514a96b
JM
11428 * c.opt (Winherited-variadic-ctor): New.
11429
93100c6b
MG
114302012-10-25 Marc Glisse <marc.glisse@inria.fr>
11431
11432 PR c++/54427
11433 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
11434
1efcb8c6
JM
114352012-10-23 Joseph Myers <joseph@codesourcery.com>
11436
11437 * c-common.h (pch_cpp_save_state): Declare.
11438 * c-target.def (c_preinclude): New hook.
11439 * c-opts.c (done_preinclude): New.
11440 (push_command_line_include): Handle default preincluded header.
11441 (cb_file_change): Call pch_cpp_save_state when calling
11442 push_command_line_include.
11443 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
11444 (pch_cpp_save_state): New.
11445 (pch_init): Call pch_cpp_save_state conditionally, instead of
11446 calling cpp_save_state.
11447
4a0ae68e
MLI
114482012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
11449
11450 PR c/53063
11451 PR c/40989
11452 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
11453 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
11454 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
11455 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
11456 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
11457 * c-opts.c (c_common_handle_option): Remove explicit handling from
11458 here.
11459 (c_common_post_options): Likewise.
11460
67e4210b
EB
114612012-10-18 Eric Botcazou <ebotcazou@adacore.com>
11462
11463 * c-ada-spec.c (LOCATION_COL): Delete.
11464 (compare_location): New function.
11465 (compare_node): Use it.
11466 (compare_comment): Likewise.
11467
65d4f2cd
MLI
114682012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
11469
11470 PR c/53063
11471 PR c/40989
11472 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
11473 * c-opts.c (c_common_handle_option): Do not set them here. Add
11474 comment.
11475 (c_common_post_options): Likewise.
11476
909881cb
EB
114772012-10-16 Eric Botcazou <ebotcazou@adacore.com>
11478
11479 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
11480 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
11481 Remove POINTER_TYPE handling, add large unsigned handling and use
11482 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
11483
3a785c97
JJ
114842012-10-12 Jakub Jelinek <jakub@redhat.com>
11485
11486 PR c/54381
11487 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
11488 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
11489 locs and array of 3 trees instead of just single loc and single
11490 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
11491 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
11492 For *cmp* builtins that take two sources strings report warnings
11493 about first and second source, not about destination and source.
11494
5e54f81d
MG
114952012-10-12 Marc Glisse <marc.glisse@inria.fr>
11496
11497 PR c++/53055
11498 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
11499
f5b02f1e
EB
115002012-10-11 Eric Botcazou <ebotcazou@adacore.com>
11501
11502 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
11503 declaring something coming from another file.
11504
b46dbc6c
AC
115052012-10-10 Arnaud Charlet <charlet@adacore.com>
11506
f5b02f1e 11507 PR ada/54845
b46dbc6c
AC
11508 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
11509
5d9de0d0
PC
115102012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
11511
11512 PR c++/54194
11513 * c-common.c (warn_about_parentheses): Add location_t parameter;
11514 use EXPR_LOC_OR_LOC.
11515 * c-common.h: Update declaration.
11516
a212e43f
MG
115172012-10-09 Marc Glisse <marc.glisse@inria.fr>
11518
11519 PR c++/54427
11520 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
11521 more operations. Make error messages optional.
11522 * c-common.h (enum stv_conv): Moved from c-typeck.c.
11523 (scalar_to_vector): Declare.
11524
b1db7f91
JM
115252012-10-08 Jason Merrill <jason@redhat.com>
11526
11527 * c-common.c (c_common_reswords): Add thread_local.
11528
e28d52cf
DS
115292012-10-08 Dodji Seketeli <dodji@redhat.com>
11530
11531 PR c++/53528 C++11 attribute support
11532 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
11533 new functions.
11534 * c-common.c (check_cxx_fundamental_alignment_constraints): New
11535 static function.
11536 (handle_aligned_attribute): In choose strictest alignment
11537 among many. Use new check_cxx_fundamental_alignment_constraints.
11538 (handle_transparent_union_attribute): In c++11 attribute syntax,
11539 don't look through typedefs.
11540
3b78de56
AC
115412012-10-04 Arnaud Charlet <charlet@adacore.com>
11542
11543 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
11544 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
11545 out of dumpfile.h.
11546
6040bb5f
DC
115472012-09-25 Dehao Chen <dehao@google.com>
11548
11549 PR middle-end/54645
3b78de56 11550 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
11551 map when read in the pch.
11552
3f8257db 115532012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
11554
11555 * c-ada-spec.c: Style fixes.
11556
3f8257db 115572012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
11558
11559 * c.opt (-fada-spec-parent): Define new command line switch.
11560 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
11561 is specified, generate binding spec as a child of the specified unit.
11562
0ccb505d
PC
115632012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
11564 Manuel López-Ibáñez <manu@gcc.gnu.org>
11565
11566 PR c++/53210
11567 * c.opt ([Winit-self]): Enabled by -Wall in C++.
11568
c583af79
AC
115692012-08-23 Arnaud Charlet <charlet@adacore.com>
11570
11571 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
11572 for pointers, and add missing Convention C pragma.
11573 (print_ada_struct_decl): Add missing aliased keyword.
11574 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
11575
1a4049e7
JJ
115762012-08-17 Jakub Jelinek <jakub@redhat.com>
11577
11578 * c-common.c (sizeof_pointer_memaccess_warning): New function.
11579 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
11580 * c-opts.c (c_common_handle_option): Enable it for -Wall.
11581 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
11582 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
11583
70b5e7dc
RG
115842012-08-10 Richard Guenther <rguenther@suse.de>
11585
11586 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
11587
f8923f7e
SB
115882012-08-07 Steven Bosscher <steven@gcc.gnu.org>
11589
11590 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
11591 instead of separate pp_newline and pp_flush.
11592 (print_c_tree): Likewise.
11593
e45abe1f
RH
115942012-07-26 Richard Henderson <rth@redhat.com>
11595
11596 * c-common.c (handle_hot_attribute): Allow labels.
11597 (handle_cold_attribute): Likewise.
11598
332f1d24
JJ
115992012-07-20 Jakub Jelinek <jakub@redhat.com>
11600
11601 PR c++/28656
11602 * c-common.c (check_function_nonnull): Handle multiple nonnull
11603 attributes properly.
11604
7ee2468b
SB
116052012-07-16 Steven Bosscher <steven@gcc.gnu.org>
11606
11607 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
11608 * c-ada-spec.c: Likewise.
11609 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
11610
ee7b28eb
SB
116112012-07-14 Steven Bosscher <steven@gcc.gnu.org>
11612
11613 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
11614 Remove code conditional on it.
11615
6bdf3519
SB
116162012-07-11 Steven Bosscher <steven@gcc.gnu.org>
11617
11618 * c-gimplify.c: Do not include basic-block.h.
11619 * c-common.c: Do not include linfuncs.h.
11620
532aafad
SB
116212012-07-08 Steven Bosscher <steven@gcc.gnu.org>
11622
11623 * c-common.h: Include tree.h.
11624
8d0d1915
JM
116252012-07-02 Jason Merrill <jason@redhat.com>
11626
11627 PR c++/53524
11628 * c-common.c (get_priority): Call default_conversion.
11629
fbc873ad
UB
116302012-07-01 Uros Bizjak <ubizjak@gmail.com>
11631
11632 * c-pch.c (c_common_write_pch): Remove unused variables.
11633
d4a10d0a
SB
116342012-06-29 Steven Bosscher <steven@gcc.gnu.org>
11635
11636 * cppspec.c: Moved from gcc/ to here.
11637
6f3a2e23
KT
116382012-06-27 Kai Tietz <ktietz@redhat.com>
11639
11640 PR preprocessor/37215
11641 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
11642
8ca92d04
SB
116432012-06-21 Steven Bosscher <steven@gcc.gnu.org>
11644
11645 * c-common.h (c_common_print_pch_checksum): Remove.
11646 * c-pch.c: Do not include output.h.
11647 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
11648 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
11649 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
11650 (struct c_pch_header): Remove.
11651 (get_ident): Update gpch version.
11652 (pch_init): Do not print executable_checksum to asm_out_file.
11653 Do not fail if there is no asm_out_file to read back from. Set
11654 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
11655 (c_common_write_pch): Verify that nothing was written to asm_out_file
11656 since pch_init was called. Do not write a c_pch_header, and do not
11657 copy from asm_out_file to the PCH.
11658 (c_common_read_pch): Do not read a c_pch_header, and do not restore
11659 the content of asm_out_file from the PCH.
11660 (c_common_print_pch_checksum): Remove.
11661 * c-opts.c (c_common_init): Print out executable_checksum directly.
11662
70f42967
SB
116632012-06-19 Steven Bosscher <steven@gcc.gnu.org>
11664
11665 * c-target.def (objc_declare_unresolved_class_reference,
11666 objc_declare_class_definition): Add new hooks.
11667
a8781821
SB
116682012-06-19 Steven Bosscher <steven@gcc.gnu.org>
11669
11670 * c-lex.c: Do not include output.h.
11671 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
11672 Remove uses of ASM_OUTPUT_IDENT.
11673
9e1a8dd1
RR
116742012-06-15 Marc Glisse <marc.glisse@inria.fr>
11675
11676 PR c++/51033
11677 * c-common.h (c_build_vec_perm_expr): Move decl here.
11678 * c-common.c (c_build_vec_perm_expr): Move definition
11679 here.
11680
6f07a821
SB
116812012-06-06 Steven Bosscher <steven@gcc.gnu.org>
11682
11683 * c.opt (fconserve-space): Turn into a no-op.
11684
9faeb493 116852012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
11686
11687 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
11688 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
11689 both the start and end of the function.
11690
a4b7d13c
SB
116912012-06-04 Steven Bosscher <steven@gcc.gnu.org>
11692
11693 * c-common.c: Do not include output.h.
11694 * c-pragma.c: Likewise.
11695
c265f413
SA
116962012-06-04 Steven Bosscher <steven@gcc.gnu.org>
11697
11698 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
11699 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
11700 (lang_decl_name): Handle namespace decls.
11701
be7a421e
SB
117022012-05-31 Steven Bosscher <steven@gcc.gnu.org>
11703
11704 * c-ada-spec.c: Do not include output.h.
11705 * c-semantics.c: Likewise.
11706
65de6659
JM
117072012-05-29 Joseph Myers <joseph@codesourcery.com>
11708
11709 * c-common.c: Fix typo.
11710
ca5f4331
MM
117112012-05-29 Michael Matz <matz@suse.de>
11712
11713 * c-common.h (c_expand_decl): Remove prototype.
11714
4f7f7aca
MLI
117152012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
11716
11717 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
11718 * c-opts.c (c_common_handle_option): Remove code handling
11719 warn_missing_braces.
11720
4a792f9b
PC
117212012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
11722
11723 PR c++/25137
11724 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
11725 -Wmissing_braces.
11726
650dc14a
DS
117272012-05-22 Dodji Seketeli <dodji@redhat.com>
11728
11729 PR c++/53322
11730 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
11731
9b095bf1
MLI
117322012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
11733
11734 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
11735 * c-opts.c (c_common_handle_option): Do not handle explicitly
11736 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
11737
0b2c4be5
DS
117382012-05-16 Dodji Seketeli <dodji@redhat.com>
11739
11740 PR preprocessor/7263
ab20d992 11741 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
0b2c4be5
DS
11742 to cpp_classify_number. For diagnostics, use the precise location
11743 instead of the global input_location.
11744
a1bde5af
PC
117452012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
11746
d02924ef 11747 PR c++/11856
a1bde5af
PC
11748 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
11749
d1ede5f4
BS
117502012-05-14 Bernd Schmidt <bernds@codesourcery.com>
11751
a1bde5af 11752 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 11753
f2bc201f
MLI
117542012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
11755
11756 PR 53063
11757 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
11758 Wreorder): Use LangEnabledBy.
11759 * c-opts.c (c_common_handle_option): Do not enable them
11760 explicitly. Call lang-specific generated functions.
11761 (c_common_post_options): Do not set them here.
11762
95744782
MLI
117632012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
11764
11765 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
11766 Wmissing-field-initializers,Wmissing-parameter-type,
11767 Wold-style-declaration,Woverride-init): Use EnabledBy.
11768 * c-opts.c (c_common_post_options): Do not set here explicitly.
11769
7d5a5747
MLI
117702012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
11771
11772 PR 53063
11773 * c-opts.c (c_common_handle_option): Use handle_generated_option
11774 to enable sub-options.
11775
5a3c9cf2
PC
117762012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
11777
11778 PR c++/53158
11779 * c-common.c (warnings_for_convert_and_check): Use warning_at.
11780
3ac8781c
RG
117812012-05-10 Richard Guenther <rguenther@suse.de>
11782
11783 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
11784 adjust commentary about TYPE_IS_SIZETYPE types.
11785
1e537948
MLI
117862012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
11787
11788 PR c++/53261
11789 * c-common.c (warn_logical_operator): Check that argument of
11790 integer_zerop is not NULL.
11791
f2c4a785
MLI
117922012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
11793
11794 PR c/43772
11795 * c-common.c (warn_logical_operator): Do not warn if either side
11796 is already true or false.
11797
50f305ca
MLI
117982012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
11799
11800 PR c/51712
11801 * c-common.c (expr_original_type): New.
11802 (shorten_compare): Do not warn for enumeration types.
11803
0c3641b0
MLI
118042012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
11805
11806 * c.opt (fpermissive): Add Var(flag_permissive).
11807
7edaa4d2
MG
118082012-04-30 Marc Glisse <marc.glisse@inria.fr>
11809
11810 PR c++/51033
11811 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
11812 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
11813
b9c8da34
DS
118142012-04-30 Dodji Seketeli <dodji@redhat.com>
11815
11816 Add -Wvarargs option
ab20d992 11817 * c.opt (Wvarargs): Define new option.
b9c8da34 11818
e6c69da0
MLI
118192012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11820
11821 * c-common.c (check_function_arguments): Replace
11822 Wmissing-format-attribute with Wsuggest-attribute=format.
11823
90137d8f
MLI
118242012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11825
11826 * c.opt (Wsuggest-attribute=format): New. Alias of
11827 Wmissing-format-attribute.
11828 * c-format.c (decode_format_type): Replace
11829 Wmissing-format-attribute with Wsuggest-attribute=format.
11830 (check_function_format): Likewise.
11831
9faeb493 118322012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
11833
11834 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
11835 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
11836 * c.opt: Add Wliteral-suffix.
11837
c1771a20
MLI
118382012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
11839
11840 PR c/44774
11841 * c.opt (Wpedantic): New.
11842 (pedantic): Alias Wpedantic.
11843 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
11844 (c_common_post_options): Likewise.
11845 (sanitize_cpp_opts): Likewise.
11846 * c-lex.c (interpret_float): Likewise.
11847 * c-format.c (check_format_types): Likewise.
11848 * c-common.c (pointer_int_sum): Likewise.
11849 (c_sizeof_or_alignof_type): Likewise.
11850 (c_add_case_label): Likewise.
11851 (c_do_switch_warnings): Likewise.
11852 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
11853
04b391c1
JM
118542012-04-15 Jason Merrill <jason@redhat.com>
11855
11856 PR c++/52818
11857 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
11858 (C_STD_NAME): Distinguish between C++98 and C++11.
11859
ac868f29
EB
118602012-04-11 Eric Botcazou <ebotcazou@adacore.com>
11861
11862 PR target/52624
11863 * c-common.h (uint16_type_node): Rename into...
11864 (c_uint16_type_node): ...this.
11865 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
11866 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
11867
fd4116f4
MLI
118682012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
11869
11870 * c-common.c (warn_if_unused_value): Move definition to here.
11871 * c-common.h (warn_if_unused_value): Move declaration to here.
11872
573ac65e
WB
118732012-03-23 William Bader <williambader@hotmail.com>
11874
11875 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
11876
552b8185
JM
118772012-03-20 Jason Merrill <jason@redhat.com>
11878
11879 * c-common.h (enum cxx_dialect): Add cxx1y.
11880 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
11881 test.
11882 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
11883 * c-opts.c (c_common_post_options): Likewise.
11884 (set_std_cxx1y): New.
11885 (c_common_handle_option): Call it.
11886 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
11887
04398fa8
PC
118882012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
11889
11890 PR c++/14710
11891 * c.opt ([Wuseless-cast]): Add.
11892
d2a12ae7
RG
118932012-03-16 Richard Guenther <rguenther@suse.de>
11894
11895 * c-pretty-print.c (pp_c_initializer_list): Adjust.
11896
a12bf402
MLI
118972012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
11898
11899 PR c++/44783
11900 * c.opt (ftemplate-backtrace-limit) Add.
11901
5c30094f
RO
119022012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11903
11904 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
11905 handling.
11906 * c-pragma.c (handle_pragma_extern_prefix): Remove.
11907 (init_pragma): Don't register extern_prefix.
11908
21fa2faf
RG
119092012-03-12 Richard Guenther <rguenther@suse.de>
11910
11911 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
11912 (builtin_type_for_size): Likewise.
11913
e3793c6f
JJ
119142012-02-13 Jakub Jelinek <jakub@redhat.com>
11915
11916 PR c++/52215
11917 * c-common.c (sync_resolve_params): Don't decide whether to convert
11918 or not based on TYPE_SIZE comparison, convert whenever arg_type
11919 is unsigned INTEGER_TYPE.
11920
93286335
PC
119212012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
11922
11923 PR c/52118
11924 * c.opt ([Wunused-local-typedefs]): Fix description.
11925
7a421706
MS
119262012-01-24 Mike Stump <mikestump@comcast.net>
11927
11928 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
11929 exactly.
11930
ba9b1f11
RG
119312012-01-18 Richard Guenther <rguenther@suse.de>
11932
11933 * c-opts.c (c_common_post_options): Reset LTO flags if
11934 we are about to generate a PCH.
11935
465406be
PC
119362012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
11937
11938 PR c++/51777
11939 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
11940 use pp_unsigned_wide_integer.
11941
aee15221
RG
119422012-01-10 Richard Guenther <rguenther@suse.de>
11943
11944 PR middle-end/51806
11945 * c-opts.c (c_common_handle_option): Move -Werror handling
11946 to language independent code.
11947
5720c0dc
RG
119482012-01-05 Richard Guenther <rguenther@suse.de>
11949
11950 PR middle-end/51764
11951 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
11952 from common.opt.
11953
73ac190a
PC
119542011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
11955
11956 PR c++/51316
11957 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
11958 of array types with an unknown bound.
11959
48b0b196
JM
119602011-12-20 Joseph Myers <joseph@codesourcery.com>
11961
11962 * c-common.c (flag_isoc99): Update comment to refer to C11.
11963 (flag_isoc1x): Change to flag_isoc11.
11964 * c-common.h (flag_isoc99): Update comment to refer to C11.
11965 (flag_isoc1x): Change to flag_isoc11.
11966 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
11967 C11.
11968 * c-opts.c (set_std_c1x): Change to set_std_c11.
11969 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
11970 Call set_std_c11.
11971 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
11972 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
11973 * c.opt (std=c1x): Change to std=c11. Document as non-draft
11974 standard.
11975 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
11976 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
11977 (std=gnu1x): Make alias of std=gnu11.
11978
d58d6eb5
JM
119792011-12-19 Jason Merrill <jason@redhat.com>
11980
11981 PR c++/51228
11982 * c-common.c (handle_transparent_union_attribute): Check the first
11983 field if the type is complete.
11984
b3908fcc
JW
119852011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
11986
11987 PR libstdc++/51365
11988 * c-common.c (RID_IS_FINAL): Add.
11989 * c-common.h (RID_IS_FINAL): Add.
11990
fea3ca91
IS
119912011-11-30 Iain Sandoe <iains@gcc.gnu.org>
11992
11993 * c.opt (fgnu-runtime): Provide full description.
11994 (fnext-runtime): Likewise.
11995 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
11996
62bad7cd
AM
119972011-11-28 Andrew MacLeod <amacleod@redhat.com>
11998
11999 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
12000 predefines in one place. Add LOCK_FREE predefines.
12001 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
12002 new func.
12003
c466c4ff
AM
120042011-11-24 Andrew MacLeod <amacleod@redhat.com>
12005
12006 PR c/51256
9faeb493 12007 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 12008 conditions
9faeb493
UB
12009 (resolve_overloaded_atomic_exchange,
12010 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
12011 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
12012 error_mark_node for error conditions.
9faeb493 12013
a5952633
RG
120142011-11-08 Richard Guenther <rguenther@suse.de>
12015
12016 PR middle-end/51010
ab20d992 12017 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
a5952633 12018
0a35513e
AH
120192011-11-07 Richard Henderson <rth@redhat.com>
12020 Aldy Hernandez <aldyh@redhat.com>
12021 Torvald Riegel <triegel@redhat.com>
12022
12023 Merged from transactional-memory.
12024
12025 * c-common.c (handle_tm_wrap_attribute,
12026 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
12027 (struct c_common_reswords): Added __transaction* keywords.
12028 (struct c_common_attribute_table): Added transaction* and tm_regparm
12029 attributes.
12030 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
12031 masks.
12032 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
12033 find_tm_attribute): Declare.
12034
6d87092d
JM
120352011-11-07 Jason Merrill <jason@redhat.com>
12036
12037 PR c++/35688
12038 * c-common.c, c-common.h: Revert yesterday's changes.
12039
8e7860a1
JM
120402011-11-06 Jason Merrill <jason@redhat.com>
12041
12042 PR c++/35688
12043 * c-common.c (decl_has_visibility_attr): Split out from...
12044 (c_determine_visibility): ...here.
12045 * c-common.h: Declare it.
12046
d19fa6b5
JM
120472011-11-06 Joseph Myers <joseph@codesourcery.com>
12048
12049 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
12050 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
12051 type.
12052 (check_user_alignment): New. Split out of
12053 handle_aligned_attribute. Disallow integer constants with
12054 noninteger types. Conditionally allow zero.
12055 (handle_aligned_attribute): Use check_user_alignment.
12056 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
12057
86951993
AM
120582011-11-06 Andrew MacLeod <amacleod@redhat.com>
12059 Richard Henderson <rth@redhat.com>
12060
12061 Merged from cxx-mem-model.
12062
12063 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 12064 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
12065 parameters that are the same type size.
12066 (get_atomic_generic_size): New. Find size of generic
12067 atomic function parameters and do typechecking.
12068 (add_atomic_size_parameter): New. Insert size into parameter list.
12069 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
12070 either __atomic_exchange_n or external library call.
9faeb493 12071 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 12072 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 12073 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
12074 __atomic_load_n or an external library call.
12075 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
12076 __atomic_store_n or an external library call.
12077 (resolve_overloaded_builtin): Handle new __atomic builtins.
12078
cf9e9959
EB
120792011-11-04 Eric Botcazou <ebotcazou@adacore.com>
12080
12081 PR c++/50608
12082 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
12083 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
12084 <INDIRECT_REF>: Return the argument.
12085 <ARRAY_REF>: Remove special code for negative offset.
12086 Call fold_build_pointer_plus instead of size_binop.
12087 (fold_offsetof): Remove STOP_REF argument and adjust.
12088 * c-common.h (fold_offsetof_1): Declare.
12089 (fold_offsetof): Remove STOP_REF argument.
12090
25339f10
JM
120912011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
12092
12093 PR c++/50810
12094 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12095 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12096 Wnarrowing for C++0x and C++98.
12097 * c.opt ([Wnarrowing]): Update.
12098
89401152
PC
120992011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
12100
12101 PR c++/44277
12102 * c.opt: Add Wzero-as-null-pointer-constant.
12103
97e3ad20
JM
121042011-10-31 Jason Merrill <jason@redhat.com>
12105
15694fdd
JM
12106 * c.opt (-fdeduce-init-list): Off by default.
12107
97e3ad20
JM
12108 PR c++/50920
12109 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
12110 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
12111 and -Wc++11-compat.
12112 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
12113
fb9120e3
RAV
121142011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
12115
12116 PR c++/30066
12117 * c.opt (fvisibility-inlines-hidden): Description change.
12118
3ce4f9e4
ESR
121192011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
12120
12121 Implement C++11 user-defined literals.
12122 * c-common.c (build_userdef_literal): New.
12123 * c-common.def: New tree code.
12124 * c-common.h (tree_userdef_literal): New tree struct and accessors.
12125 * c-lex.c (interpret_float): Add suffix parm.
12126 (c_lex_with_flags): Build literal tokens.
12127
5f53c243
PC
121282011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12129
12130 PR c++/50841
12131 Revert:
12132 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12133
12134 PR c++/50810
12135 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12136 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12137 Wnarrowing for C++0x and C++98.
12138 * c.opt ([Wnarrowing]): Update.
12139
263734e1
PC
121402011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12141
12142 PR c++/50810
12143 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12144 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12145 Wnarrowing for C++0x and C++98.
12146 * c.opt ([Wnarrowing]): Update.
12147
d2e312d7
PC
121482011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
12149
12150 PR c++/45385
12151 * c-common.c (conversion_warning): Remove code looking for
12152 artificial operands.
12153
d17687f6
DS
121542011-10-18 Dodji Seketeli <dodji@redhat.com>
12155
12156 PR bootstrap/50760
12157 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 12158 !NO_IMPLICIT_EXTERN_C.
d17687f6 12159
fc8396e9
PC
121602011-10-17 Michael Spertus <mike_spertus@symantec.com>
12161
12162 * c-common.c (c_common_reswords): Add __bases,
12163 __direct_bases.
12164 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
12165
121662011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
12167
12168 PR c++/50757
12169 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
12170
847e697a
TT
121712011-10-15 Tom Tromey <tromey@redhat.com>
12172 Dodji Seketeli <dodji@redhat.com>
12173
12174 * c.opt (fdebug-cpp): New option.
12175 * c-opts.c (c_common_handle_option): Handle the option.
12176 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
12177 output stream in parameter. Factorized from ...
12178 (maybe_print_line): ... this. Dump location debug information when
12179 -fdebug-cpp is in effect.
12180 (print_line_1): New static function. Takes an output stream in
12181 parameter. Factorized from ...
12182 (print_line): ... here. Dump location information when -fdebug-cpp
12183 is in effect.
12184 (scan_translation_unit): Dump location information when
12185 -fdebug-cpp is in effect.
12186
92582b75
TT
121872011-10-15 Tom Tromey <tromey@redhat.com>
12188 Dodji Seketeli <dodji@redhat.com>
12189
12190 * c.opt (ftrack-macro-expansion): New option. Handle it with and
12191 without argument.
12192 * c-opts.c (c_common_handle_option)<case
12193 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
12194 cases. Handle -ftrack-macro-expansion with and without argument.
12195
46427374
TT
121962011-10-15 Tom Tromey <tromey@redhat.com>
12197 Dodji Seketeli <dodji@redhat.com>
12198
12199 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
12200 (print_line, cb_define, do_line_change): Adjust to avoid touching
12201 the internals of struct line_map. Use the public API instead.
12202 * c-pch.c (c_common_read_pch): Likewise.
12203 * c-lex.c (fe_file_change): Likewise.
12204
fc8396e9
PC
122052011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
12206
12207 PR c++/17212
12208 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
12209
122102011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
12211
12212 PR c++/33067
12213 * c-pretty-print.c (pp_c_floating_constant): Output
12214 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
12215
e79983f4
MM
122162011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
12217
12218 * c-common.c (def_builtin_1): Delete old interface with two
12219 parallel arrays to hold standard builtin declarations, and replace
12220 it with a function based interface that can support creating
12221 builtins on the fly in the future. Change all uses, and poison
12222 the old names. Make sure 0 is not a legitimate builtin index.
12223 * c-omp.c (c_finish_omp_barrier): Ditto.
12224 (c_finish_omp_taskwait): Ditto.
12225 (c_finish_omp_flush): Ditto.
12226
6637388f
TG
122272011-10-11 Tristan Gingold <gingold@adacore.com>
12228
12229 * c.opt: (fallow-parameterless-variadic-functions): New.
12230
3797cb21
DS
122312011-09-08 Dodji Seketeli <dodji@redhat.com>
12232
12233 PR c++/33255 - Support -Wunused-local-typedefs warning
12234 * c-common.h (struct c_language_function::local_typedefs): New
12235 field.
9faeb493
UB
12236 (record_locally_defined_typedef, maybe_record_typedef_use)
12237 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 12238 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
12239 (maybe_record_typedef_use)
12240 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
12241 * c.opt: Declare new -Wunused-local-typedefs flag.
12242
693ddb1b
EB
122432011-09-06 Eric Botcazou <ebotcazou@adacore.com>
12244
12245 PR middle-end/50266
12246 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
12247 computations.
12248
830c740f
RG
122492011-09-05 Richard Guenther <rguenther@suse.de>
12250
12251 * c-common.c (complete_array_type): Use ssize_int (-1) instead
12252 of integer_minus_one_node for empty array upper bounds.
12253
892a371f
DS
122542011-08-28 Dodji Seketeli <dodji@redhat.com>
12255
12256 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
12257 it's the first time it's being called on this main TU.
12258
0e3fdb48
RB
122592011-08-24 Richard Guenther <rguenther@suse.de>
12260
12261 PR c/49396
12262 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
12263
122642011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
12265
12266 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
12267 defined in cpp_init_builtins and c_cpp_builtins.
12268
d4a83c10
JM
122692011-08-19 Joseph Myers <joseph@codesourcery.com>
12270
12271 * c-common.c (c_common_reswords): Add __builtin_complex.
12272 * c-common.h (RID_BUILTIN_COMPLEX): New.
12273
bbceee64
JM
122742011-08-18 Joseph Myers <joseph@codesourcery.com>
12275
12276 * c-common.c (c_common_reswords): Add _Noreturn.
12277 (keyword_is_function_specifier): Handle RID_NORETURN.
12278 * c-common.h (RID_NORETURN): New.
12279
3f8257db 122802011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
12281
12282 * c-common.c (unsafe_conversion_p): New function. Check if it is
12283 unsafe to convert an expression to the type.
12284 (conversion_warning): Adjust, use unsafe_conversion_p.
12285 * c-common.h (unsafe_conversion_p): New function declaration.
12286
20906c66
JJ
122872011-08-02 Jakub Jelinek <jakub@redhat.com>
12288
12289 * c-common.h (c_finish_omp_atomic): Adjust prototype.
12290 (c_finish_omp_taskyield): New prototype.
12291 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
12292 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
12293 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
12294 or RHS1 have side-effects, evaluate those too in the right spot,
12295 if it is a decl and LHS is also a decl, error out if they
12296 aren't the same.
12297 (c_finish_omp_taskyield): New function.
12298 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
12299 * c-pragma.c (omp_pragmas): Add taskyield.
12300 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
12301 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
12302 PRAGMA_OMP_CLAUSE_MERGEABLE.
12303
770e5a2e
DS
123042011-07-25 Dodji Seketeli <dodji@redhat.com>
12305
12306 * c-common.h (set_underlying_type): Remove parm name from
12307 declaration.
12308
1baae426
RG
123092011-07-25 Romain Geissler <romain.geissler@gmail.com>
12310
12311 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 12312
fcb21722
JM
123132011-07-22 Jason Merrill <jason@redhat.com>
12314
76f86d00
JM
12315 PR c++/49793
12316 * c.opt (Wnarrowing): New.
12317
3a636414
JM
12318 PR c++/30112
12319 * c-common.h: Declare c_linkage_bindings.
12320 * c-pragma.c (handle_pragma_redefine_extname): Use it.
12321
fcb21722
JM
12322 PR c++/49813
12323 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
12324 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
12325 as flag_isoc99 for 'restrict'.
12326 (pp_c_specifier_qualifier_list): Likewise for _Complex.
12327
02614448
ILT
123282011-07-21 Ian Lance Taylor <iant@google.com>
12329
12330 PR middle-end/49705
12331 * c-common.c (c_disable_warnings): New static function.
12332 (c_enable_warnings): New static function.
12333 (c_fully_fold_internal): Change local unused_p to bool. Call
12334 c_disable_warnings and c_enable_warnings rather than change
12335 c_inhibit_evaluation_warnings.
12336
34429675
JM
123372011-07-20 Jason Merrill <jason@redhat.com>
12338
12339 PR c++/6709 (DR 743)
12340 PR c++/42603 (DR 950)
12341 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
12342 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
12343 (CPP_DECLTYPE): New.
12344 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
12345
5d49b6a7
RG
123462011-07-19 Richard Guenther <rguenther@suse.de>
12347
12348 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
12349 * c-omp.c (c_finish_omp_for): Likewise.
12350
e84a58ff
EB
123512011-07-12 Eric Botcazou <ebotcazou@adacore.com>
12352
12353 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
12354 body on the next line.
12355
329af3c7
JM
123562011-07-08 Jason Merrill <jason@redhat.com>
12357
4063e61b
JM
12358 PR c++/45437
12359 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
12360
329af3c7
JM
12361 PR c++/49673
12362 * c-common.c (c_apply_type_quals_to_decl): Don't check
12363 TYPE_NEEDS_CONSTRUCTING.
12364
1a072294
RG
123652011-07-06 Richard Guenther <rguenther@suse.de>
12366
12367 * c-common.c (c_common_nodes_and_builtins):
12368 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
12369
fce5dddd
RG
123702011-07-05 Richard Guenther <rguenther@suse.de>
12371
12372 * c-common.c (c_common_nodes_and_builtins): Build all common
12373 tree nodes first.
12374
45d439ac
JJ
123752011-06-27 Jakub Jelinek <jakub@redhat.com>
12376
56300785
JJ
12377 * c-common.h (c_tree_chain_next): New static inline function.
12378
45d439ac
JJ
12379 * c-common.c (check_builtin_function_arguments): Handle
12380 BUILT_IN_ASSUME_ALIGNED.
12381
e0a8ecf2
AM
123822011-06-21 Andrew MacLeod <amacleod@redhat.com>
12383
12384 * c-common.c: Add sync_ or SYNC__ to builtin names.
12385 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
12386
123872011-06-20 Pierre Vittet <piervit@pvittet.com>
12388
12389 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
12390 handler.
12391 (gen_pragma_handler): New union.
12392 (internal_pragma_handler): New type.
12393 (c_register_pragma_with_data)
12394 (c_register_pragma_with_expansion_and_data): New functions.
12395
12396 * c-pragma.c (registered_pragmas, c_register_pragma_1)
12397 (c_register_pragma, c_register_pragma_with_expansion)
12398 (c_invoke_pragma_handler): Changed to work with
12399 internal_pragma_handler.
12400 (c_register_pragma_with_data)
12401 (c_register_pragma_with_expansion_and_data): New functions.
12402
677f3fa8
JM
124032011-06-14 Joseph Myers <joseph@codesourcery.com>
12404
12405 * c-common.c: Include common/common-target.h.
12406 (handle_section_attribute): Use
12407 targetm_common.have_named_sections.
12408 * c-cppbuiltin.c: Include common/common-target.h.
12409 (c_cpp_builtins): Use targetm_common.except_unwind_info.
12410
d7fc8c14
RG
124112011-06-10 Richard Guenther <rguenther@suse.de>
12412
12413 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
12414 to print a IDENTIFIER_NODE.
12415
10e48e39
RO
124162011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12417 Joseph Myers <joseph@codesourcery.com>
12418
12419 * c.opt (fbuilding-libgcc): New option.
12420 * c-cppbuiltin.c (c_cpp_builtins): Define
12421 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
12422
6976ae51
JM
124232011-06-07 Jason Merrill <jason@redhat.com>
12424
3ff60975
JM
12425 * c-common.c (max_tinst_depth): Lower default to 900.
12426
6976ae51
JM
12427 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
12428
009db074
RG
124292011-06-07 Richard Guenther <rguenther@suse.de>
12430
12431 * c-common.c (c_common_nodes_and_builtins): Do not set
12432 size_type_node or call set_sizetype.
12433
b4592b92
DS
124342011-06-07 Dodji Seketeli <dodji@redhat.com>
12435
12436 PR debug/49130
12437 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 12438 type when using pointer comparison to compare types.
b4592b92 12439
014ab419
JW
124402011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
12441
12442 * c.opt: Add -Wdelete-non-virtual-dtor.
12443 * c-opts.c (c_common_handle_option): Include it in -Wall.
12444
4f60111f
NF
124452011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
12446
12447 PR bootstrap/49190
12448
12449 Revert:
12450 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12451
12452 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
12453 not tree_common.
12454
4cc4f2f4
JJ
124552011-05-27 Jakub Jelinek <jakub@redhat.com>
12456
12457 PR c++/49165
12458 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
12459 C++ don't call c_common_truthvalue_conversion on void type arms.
12460
38e01f9e
NF
124612011-05-27 Nathan Froyd <froydnj@codesourcery.com>
12462
12463 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
12464 (stmt_list_stack): Define.
12465 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
12466 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
12467
92e948a8
NF
124682011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12469
12470 * c-common.c (warning_candidate_p): Check for BLOCKs.
12471
a2fc3e63
NF
124722011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12473
12474 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
12475 not tree_common.
12476
0957c029
JJ
124772011-05-25 Jakub Jelinek <jakub@redhat.com>
12478
12479 * c-common.c (def_fn_type): Remove extra va_end.
12480
828fb3ba
JM
124812011-05-23 Jason Merrill <jason@redhat.com>
12482
12483 PR c++/48106
12484 * c-common.c (c_common_get_narrower): New.
12485 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
12486
dde05067
NF
124872011-05-23 Nathan Froyd <froydnj@codesourcery.com>
12488
12489 * c-common.h (check_function_arguments): Tweak prototype of
12490 check_function_arguments.
12491 * c-common.c (check_function_arguments): Likewise. Adjust
12492 calls to check_function_nonnull, check_function_format, and
12493 check_function_sentinel.
12494 (check_function_sentinel): Take a FUNCTION_TYPE rather than
12495 separate attributes and typelist arguments. Use
12496 FOREACH_FUNCTION_ARGS to iterate over argument types.
12497
3c0d13bf
PC
124982011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
12499
12500 * c-common.c (c_common_reswords): Reorder.
12501 * c-common.h (rid): Likewise.
12502
8242dd04
NF
125032011-05-10 Nathan Froyd <froydnj@codesourcery.com>
12504
12505 * c-common.c (def_fn_type): Don't call build_function_type, call
12506 build_function_type_array or build_varargs_function_type_array
12507 instead.
12508 (c_common_nodes_and_builtins): Likewise.
12509
3d528853
NF
125102011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12511
12512 * c-common.c (c_add_case_label): Omit the loc argument to
12513 build_case_label.
12514 * c-common.h (build_case_label): Remove.
12515 * c-semantics.c (build_case_label): Remove.
12516
a04a722b
JM
125172011-05-05 Joseph Myers <joseph@codesourcery.com>
12518
12519 * c-objc.h (objc_start_method_definition): Update prototype.
12520 * stub-objc.c (objc_start_method_definition): Add extra parameter.
12521
e19a18d4
NF
125222011-05-04 Nathan Froyd <froydnj@codesourcery.com>
12523
12524 * c-common.c (check_main_parameter_types): Reindent. Don't use
12525 TYPE_ARG_TYPES directly.
12526 (handle_nonnull_attribute): Likewise.
12527 (sync_resolve_params): Likewise.
12528 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
12529 to check_format_string.
12530 (handle_format_attribute): Likewise.
12531 (check_format_string): Take a function type to examine instead of
12532 a type list. Use a function_arg_iterator to step through argument
12533 types.
12534
c62c040f
RG
125352011-05-04 Richard Guenther <rguenther@suse.de>
12536
12537 * c-common.c (fix_string_type): Use size_int for index type bounds.
12538 (start_fname_decls): Do not pass NULL to build_int_cst.
12539 (c_init_attributes): Likewise.
12540 * c-lex.c (c_lex_with_flags): Likewise.
12541
c12ff9d8
JM
125422011-04-27 Jason Merrill <jason@redhat.com>
12543
12544 * c-common.c (make_tree_vector_from_list): New.
12545 * c-common.h: Declare it.
12546
304dfbe3
RG
125472011-04-26 Richard Guenther <rguenther@suse.de>
12548
12549 PR preprocessor/48248
12550 * c-ppoutput.c (maybe_print_line): Always optimize newlines
12551 for output size with -P.
12552
3c0d13bf
PC
125532011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
12554
12555 * c-common.c (struct c_common_resword): Add __underlying_type.
12556 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
12557
04695783
JM
125582011-04-20 Jim Meyering <meyering@redhat.com>
12559
12560 * c-format.c (init_dollar_format_checking): Remove useless
12561 if-before-free.
12562
0dc33c3c
NP
125632011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
12564
12565 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 12566 (objc_detect_field_duplicates): New.
0dc33c3c 12567 * stub-objc.c: Likewise.
3c0d13bf 12568
c59633d9
NP
125692011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12570
12571 * stub-objc.c (objc_declare_protocols): Renamed to
12572 objc_declare_protocol.
12573 * c-objc.h: Likewise.
3c0d13bf 12574
32dabdaf
NP
125752011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12576
12577 * stub-objc.c (objc_declare_class): Updated argument name.
12578
81f653d6
NF
125792011-04-12 Nathan Froyd <froydnj@codesourcery.com>
12580
12581 * c-common.h (c_common_init_ts): Declare.
12582 * c-common.c (c_common_init_ts): Define.
12583
eb345401
NP
125842011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
12585
12586 * c-objc.h (objc_build_message_expr): Updated prototype.
12587 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 12588
a358e188
MJ
125892011-04-12 Martin Jambor <mjambor@suse.cz>
12590
12591 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
12592 of cgraph_node.
12593
e6313a78
RG
125942011-04-11 Richard Guenther <rguenther@suse.de>
12595
12596 * c-common.c (complete_array_type): Build a range type of
12597 proper type.
12598
dcf0c47e
NF
125992011-04-08 Nathan Froyd <froydnj@codesourcery.com>
12600
12601 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
12602 (handle_type_generic_attribute): Likewise.
12603
1ee44b26
JM
126042011-04-07 Jason Merrill <jason@redhat.com>
12605
12606 PR c++/48450
12607 * c-common.c (c_common_truthvalue_conversion): Don't ignore
12608 conversion from C++0x scoped enum.
12609
acce4e77
JM
126102011-04-06 Joseph Myers <joseph@codesourcery.com>
12611
12612 * c-target-def.h: New file.
12613 * c-target.def: New file.
12614 * c-target.h: New file.
12615 * c-common.c (targetcm): Don't define here.
12616 * c-common.h (default_handle_c_option): Declare.
12617 * c-format.c: Include c-target.h instead of target.h.
12618 * c-opts.c: Include c-target.h instead of target.h. Explicitly
12619 include tm.h.
12620 (default_handle_c_option): Move from targhooks.c.
12621
e2eefb55
JJ
126222011-03-29 Jakub Jelinek <jakub@redhat.com>
12623
12624 PR preprocessor/48248
12625 * c-ppoutput.c (print): Add src_file field.
12626 (init_pp_output): Initialize it.
12627 (maybe_print_line): Don't optimize by adding up to 8 newlines
12628 if map->to_file and print.src_file are different file.
12629 (print_line): Update print.src_file.
12630
ba78087b
KT
126312011-03-25 Kai Tietz <ktietz@redhat.com>
12632
12633 * c-ada-spec.c (compare_comment): Use filename_cmp
12634 instead of strcmp for filename.
12635
0edf1bb2
JL
126362011-03-25 Jeff Law <law@redhat.com>
12637
adfac8df 12638 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 12639
c7dc8804
JM
126402011-03-25 Jason Merrill <jason@redhat.com>
12641
12642 * c.opt: Add -std=c++03.
12643
d1d879b1
EB
126442011-03-22 Eric Botcazou <ebotcazou@adacore.com>
12645
12646 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
12647
3f8257db 126482011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
12649
12650 PR target/12171
5050afdf
KT
12651 * c-pretty-print.c (pp_c_specifier_qualifier_list):
12652 Display allowed attributes for function pointer types.
12653 (pp_c_attributes_display): New function to display
12654 attributes having affects_type_identity flag set to true.
12655 * c-pretty-print.h (pp_c_attributes_display): New prototype.
12656
62d784f7
KT
12657 * c-common.c (c_common_attribute_table):
12658 Add new element.
12659 (c_common_format_attribute_table): Likewise.
12660
82d37118
JM
126612011-03-18 Jason Merrill <jason@redhat.com>
12662
49a000c3
JM
12663 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
12664 * c-common.h: Don't declare it here.
12665 * c-common.c: Or define it here.
12666 * c-opts.c (c_common_handle_option): Or set it here.
12667
82d37118
JM
12668 PR c++/35315
12669 * c-common.c (handle_transparent_union_attribute): Don't
12670 make a duplicate type in C++.
12671
17bc631c
JM
126722011-03-15 Jason Merrill <jason@redhat.com>
12673
12674 * c-common.c (max_constexpr_depth): New.
12675 * c-common.h: Declare it.
12676 * c-opts.c (c_common_handle_option): Set it.
12677 * c.opt (fconstexpr-depth): New option.
12678
1b9b91a6
JM
126792011-03-11 Jason Merrill <jason@redhat.com>
12680
f231b5ff
JM
12681 * c-common.c (attribute_takes_identifier_p): Add missing const.
12682
1b9b91a6
JM
12683 PR c++/46803
12684 * c-common.c (attribute_takes_identifier_p): Assume that an
12685 unknown attribute takes an identifier.
12686
a19e4d44
NF
126872011-03-07 Nathan Froyd <froydnj@codesourcery.com>
12688
12689 PR c/47786
12690 * c-common.c (c_type_hash): Call list_length instead of iterating
12691 through DECL_CHAIN. Rename 'i' to 'n_elements'.
12692
982d62f6
JJ
126932011-02-19 Jakub Jelinek <jakub@redhat.com>
12694
12695 PR c/47809
12696 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
12697
0a256240
NP
126982011-02-17 Iain Sandoe <iains@gcc.gnu.org>
12699
12700 * c.opt (fobjc-abi-version=) New.
12701 (fobjc-nilcheck): New.
12702
ba9e6dd5
NF
127032011-02-03 Nathan Froyd <froydnj@codesourcery.com>
12704
12705 PR c++/46890
12706 * c-common.h (keyword_is_decl_specifier): Declare.
12707 * c-common.c (keyword_is_decl_specifier): Define.
12708 (keyword_is_function_specifier): New function.
12709
7273813a
JJ
127102011-01-26 Jakub Jelinek <jakub@redhat.com>
12711
12712 PR c/47473
12713 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
12714 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
12715 REAL_TYPE.
12716
908ef79b
AC
127172011-01-26 Arnaud Charlet <charlet@adacore.com>
12718
12719 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
12720
237e9384
JJ
127212011-01-26 Jakub Jelinek <jakub@redhat.com>
12722
12723 PR pch/47430
12724 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
12725 after init_c_lex if pch_file is set.
12726
47ea1edf
DK
127272011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
12728
d4dba752 12729 PR c++/43601
47ea1edf
DK
12730 * c.opt (-fkeep-inline-dllexport): New switch.
12731
2aa9c6ae
RG
127322011-01-12 Richard Guenther <rguenther@suse.de>
12733
12734 PR middle-end/32511
12735 * c-common.c (handle_weak_attribute): Warn instead of error
12736 on declaring an inline function weak.
12737
7bd11157
TT
127382011-01-05 Tom Tromey <tromey@redhat.com>
12739
12740 * c-common.h (lvalue_error): Update.
12741 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
12742 not error.
12743
0e66e494 127442010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 12745
b4f588c4
NP
12746 PR objc/47075
12747 * c-objc.h (objc_finish_message_expr): Added argument to
12748 prototype.
12749
f4da8dce
NF
127502010-12-22 Nathan Froyd <froydnj@codesourcery.com>
12751
12752 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
12753 Use prototype_p.
12754
46270f14
NP
127552010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
12756
12757 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 12758 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 12759
4816c593
NF
127602010-12-10 Nathan Froyd <froydnj@codesourcery.com>
12761
12762 * c-common.h (readonly_error): Declare.
12763 * c-common.c (readonly_error): Define.
12764
7a6daeb0
NF
127652010-12-09 Nathan Froyd <froydnj@codesourcery.com>
12766
12767 * c-common.h (invalid_indirection_error): Declare.
12768 * c-common.c (invalid_indirection_error): Define.
12769
892f6119
RG
127702010-12-03 Richard Guenther <rguenther@suse.de>
12771
12772 PR c/46745
12773 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
12774 (pp_c_unary_expression): Likewise.
12775 (pp_c_expression): Likewise.
12776
6c39e757
NP
127772010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
12778
12779 * c-common.h (objc_finish_function): New.
12780 (objc_non_volatilized_type): Removed.
12781 (objc_type_quals_match): Removed.
12782 * stub-objc.c (objc_finish_function): New.
12783 (objc_non_volatilized_type): Removed.
12784 (objc_type_quals_match): Removed.
9faeb493 12785
7c475d11
JM
127862010-11-30 Joseph Myers <joseph@codesourcery.com>
12787
12788 * c-common.h (parse_optimize_options): Declare.
12789 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
12790 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
12791
71f3e391
JM
127922010-11-29 Joseph Myers <joseph@codesourcery.com>
12793
12794 * c-opts.c (check_deps_environment_vars): Use getenv instead of
12795 GET_ENVIRONMENT.
12796 * c-pch.c (O_BINARY): Don't define here.
12797 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
12798
d5fabb58
JM
127992010-11-25 Joseph Myers <joseph@codesourcery.com>
12800
12801 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
12802 targetm.except_unwind_info.
12803
299404a1
JM
128042010-11-23 Joseph Myers <joseph@codesourcery.com>
12805
12806 * c-opts.c (c_common_handle_option): Pass location to
12807 set_struct_debug_option.
12808
c98cd5bf
JM
128092010-11-23 Joseph Myers <joseph@codesourcery.com>
12810
12811 * c-common.c (visibility_options): Move from ../opts.c.
12812 * c-common.h (struct visibility_flags, visibility_options):
12813 Declare here.
12814 * c-opts.c (finish_options): Rename to c_finish_options.
12815 (c_common_init): Update call to finish_options.
12816
a9546771
NP
128172010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
12818
12819 PR objc/34033
12820 * c-lex.c (lex_string): Check that each string in an Objective-C
12821 string concat sequence starts with either one or zero '@', and
12822 that there are no spurious '@' signs at the end.
12823
24a57808
JM
128242010-11-20 Joseph Myers <joseph@codesourcery.com>
12825
12826 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
12827 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
12828 HANDLE_PRAGMA_VISIBILITY.
12829 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
12830 HANDLE_PRAGMA_VISIBILITY): Don't define.
12831 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
12832
a9aa2c3a
NF
128332010-11-20 Nathan Froyd <froydnj@codesourcery.com>
12834
12835 PR c++/16189
12836 PR c++/36888
12837 PR c++/45331
12838 * c-common.h (keyword_begins_type_specifier): Declare.
12839 (keyword_is_storage_class_specifier): Declare.
12840 (keyword_is_type_qualifier): Declare.
12841 * c-common.c (keyword_begins_type_specifier): New function.
12842 (keyword_is_storage_class_specifier): New function.
12843 (keyword_is_type_qualifier): Declare.
12844
5386338c
JM
128452010-11-19 Joseph Myers <joseph@codesourcery.com>
12846
12847 PR c/46547
12848 * c-common.c (in_late_binary_op): Define.
12849 (c_common_truthvalue_conversion): Check in_late_binary_op before
12850 calling c_save_expr.
12851 * c-common.h (in_late_binary_op): Declare.
12852
69ccdddb
JM
128532010-11-19 Joseph Myers <joseph@codesourcery.com>
12854
12855 * c-opts.c (c_common_handle_option): Update calls to
12856 set_struct_debug_option.
12857
6b192a09
NP
128582010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
12859
12860 * c-common.h (objc_declare_protocols): Added additional argument.
12861 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 12862
fb52b50a
NF
128632010-11-18 Nathan Froyd <froydnj@codesourcery.com>
12864
12865 PR c/33193
12866 * c-common.h (build_real_imag_expr): Declare.
12867 * c-semantics.c (build_real_imag_expr): Define.
12868
b37421c6
JM
128692010-11-17 Joseph Myers <joseph@codesourcery.com>
12870
12871 * c-opts.c (c_common_parse_file): Take no arguments.
12872 * c-common.h (c_common_parse_file): Update prototype.
12873
07078664
JJ
128742010-11-16 Jakub Jelinek <jakub@redhat.com>
12875
12876 PR c++/46401
12877 * c-common.c (warning_candidate_p): Don't track non-const calls
12878 or STRING_CSTs.
12879
c6a13190
ILT
128802010-11-15 Ian Lance Taylor <iant@google.com>
12881
12882 * c-lex.c (init_c_lex): Set macro debug callbacks if
12883 flag_dump_go_spec is set.
12884
925e8657
NP
128852010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
12886
12887 * c-common.h (objc_build_incr_expr_for_property_ref): New.
12888 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
12889
bb0a9581
NF
128902010-11-15 Nathan Froyd <froydnj@codesourcery.com>
12891
12892 PR preprocessor/45038
12893 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
12894 dialects.
12895
c5fa0890
JM
128962010-11-12 Joseph Myers <joseph@codesourcery.com>
12897
12898 * c-common.h (c_family_lang_mask): Declare.
12899 * c-opts.c (c_family_lang_mask): Make extern.
12900 * c-pragma.c (handle_pragma_diagnostic): Use
12901 control_warning_option.
12902
a4d8c676
JM
129032010-11-12 Joseph Myers <joseph@codesourcery.com>
12904
12905 * c-common.c (parse_optimize_options): Update call to
12906 decode_options.
12907 * c-common.h (c_common_handle_option): Update prototype.
12908 * c-opts.c (c_common_handle_option): Take location_t parameter and
12909 pass it to other functions.
12910
f954bd2c
JM
129112010-11-11 Joseph Myers <joseph@codesourcery.com>
12912
12913 * c-opts.c (warning_as_error_callback): Remove.
12914 (c_common_initialize_diagnostics): Don't call
12915 register_warning_as_error_callback.
12916 (c_common_handle_option): Handle -Werror=normalized= here.
12917
d8a07487
JM
129182010-11-10 Joseph Myers <joseph@codesourcery.com>
12919
12920 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
12921 in diagnostic.
12922 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
12923 letter.
12924 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
12925 Remove trailing '.' from diagnostics.
12926 * c.opt (Wwrite-strings_: Avoid '`' in help text.
12927
d5478783
JM
129282010-11-10 Joseph Myers <joseph@codesourcery.com>
12929
12930 * c-common.c (parse_optimize_options): Pass global_dc to
12931 decode_options.
12932 * c-opts.c (c_common_handle_option): Pass &global_options to
12933 set_Wstrict_aliasing.
12934 * c.opt (v): Don't mark Common or document here.
12935
91ebb981
IS
129362010-11-06 Iain Sandoe <iains@gcc.gnu.org>
12937
12938 PR target/44981
12939 * c-format.c (format_type): New type gcc_objc_string_format_type.
12940 (valid_stringptr_type_p): New.
12941 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 12942 (check_format_string): Pass expected type, use
91ebb981
IS
12943 valid_stringptr_type_p (), check that the format string types are
12944 consistent with the format specification.
12945 (decode_format_attr): Warn if NSString is used outside objective-c.
12946 (format_types_orig): Add NSString.
12947 (format_name): New.
12948 (format_flags): New.
12949 (check_format_arg): Handle format strings requiring an external parser.
12950 first_target_format_type: New variable.
12951 (handle_format_attribute): Set up first_target_format_type, pass the
12952 expected format arg string type to check_format_string().
ab20d992 12953 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
91ebb981
IS
12954 * stub-objc.c (objc_string_ref_type_p): New.
12955 (objc_check_format_arg): New.
12956
bede2adc
NP
129572010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
12958
9faeb493 12959 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
12960 * c-common.h (objc_build_class_component_ref): New.
12961 * stub-objc.c (objc_build_class_component_ref): New.
12962
9a179d01
NP
129632010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
12964
12965 * c.opt (Wproperty-assign-default): New option.
12966
22d8d616
NP
129672010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
12968
12969 Implemented -fobjc-std=objc1 flag.
12970 * c.opt (fobjc-std=objc1): New option.
12971
2debdb4f
NP
129722010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
12973
12974 Implemented format and noreturn attributes for Objective-C methods.
12975 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
12976 attribute for Objective-C methods.
12977
ec52b111
JM
129782010-10-31 Jason Merrill <jason@redhat.com>
12979
12980 * c-common.c (conversion_warning, warn_for_collisions_1): Use
12981 EXPR_LOC_OR_HERE.
12982
46a88c12
NP
129832010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
12984
12985 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
12986 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
12987 (objc_add_property_declaration): Removed arguments for copies and
12988 ivar.
12989 (objc_build_getter_call): Renamed to
12990 objc_maybe_build_component_ref.
12991 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
12992 (objc_is_property_ref): New.
12993 * c-common.c (c_common_reswords): Removed copies and ivar.
12994 * stub-objc.c (objc_add_property_declaration): Removed arguments
12995 for copies and ivar.
12996 (objc_build_getter_call): Renamed to
12997 objc_maybe_build_component_ref.
12998 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
12999 (objc_is_property_ref): New.
9faeb493 13000
1e4bf85b
AC
130012010-10-29 Arnaud Charlet <charlet@adacore.com>
13002 Matthew Gingell <gingell@adacore.com>
13003
13004 * c-ada-spec.c (separate_class_package): New function.
13005 (pp_ada_tree_identifier): Prefix references to C++ classes with the
13006 name of their enclosing package.
13007 (print_ada_declaration): Use separate_class_package.
13008
81f0bab2
JM
130092010-10-27 Jason Merrill <jason@redhat.com>
13010
2b08f2c5
JM
13011 * c-common.c (c_common_reswords): Add __is_literal_type.
13012 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
13013
81f0bab2
JM
13014 * c-common.c (check_case_value): Remove special C++ code.
13015
200290f2
NP
130162010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
13017
13018 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
13019 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
13020 and RID_LAST_PATTR.
13021 (objc_add_property_declaration): Added additional arguments.
13022 (objc_property_attribute_kind): Removed.
13023 (objc_set_property_attr): Removed.
13024 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
13025 copy and nonatomic.
13026 * stub-objc.c (objc_add_property_declaration): Added additional
13027 arguments.
13028 (objc_set_property_attr): Removed.
9faeb493 13029
f614132b
NP
130302010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
13031
13032 * c-common.h (objc_add_property_variable): Renamed to
13033 objc_add_property_declaration. Added location argument.
13034 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 13035
b8a18805
NP
130362010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
13037
13038 * c-common.h (objc_maybe_printable_name): New.
13039 * stub-objc.c (objc_maybe_printable_name): New.
13040
3f8257db
JJ
130412010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
13042 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
13043
13044 * c-common.h (c_common_mark_addressable_vec): Declare.
13045 * c-common.c (c_common_mark_addressable_vec): New function.
13046
249a82c4
NP
130472010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
13048
13049 * c-common.h (objc_set_method_type): Removed.
13050 (objc_add_method_declaration): Added boolean argument.
13051 (objc_start_method_definition): Same change.
13052 (objc_build_method_signature): Same change.
13053 * stub-objc.c (objc_set_method_type): Removed.
13054 (objc_add_method_declaration): Added boolean argument.
13055 (objc_start_method_definition): Same change.
13056 (objc_build_method_signature): Same change.
13057
977e30bc
NP
130582010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
13059
13060 * c-common.h (finish_file): Removed.
13061 (objc_write_global_declarations): New.
13062 * c-opts.c (c_common_parse_file): Do not call finish_file.
13063 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 13064
da57d1b9
NP
130652010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
13066
13067 Implemented parsing @synthesize and @dynamic for
13068 Objective-C/Objective-C++.
13069 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
13070 (objc_add_synthesize_declaration): New.
13071 (objc_add_dynamic_declaration): New.
13072 * c-common.c (c_common_reswords): Add synthesize and dynamic.
13073 * stub-objc.c (objc_add_synthesize_declaration): New.
13074 (objc_add_dynamic_declaration): New.
9faeb493 13075
0069111f
MM
130762010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
13077
13078 PR target/46041
13079 * c-cppbuiltin.c (mode_has_fma): Move function here from
13080 builtins.c. Don't use the fma optab, instead just use the
13081 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
13082 using -save-temps.
13083
e426b47b
NP
130842010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
13085
13086 Merge from 'apple/trunk' branch on FSF servers.
0069111f 13087
3f8257db 13088 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 13089
9faeb493 13090 Radar 4330422
e426b47b
NP
13091 * c-common.h (objc_non_volatilized_type): New declaration
13092 * stub-objc.c (objc_non_volatilized_type): New stub.
13093
90fbfdc3
NP
130942010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
13095
e426b47b 13096 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 13097
ab20d992 13098 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 13099
9faeb493 13100 Radar 4133425
90fbfdc3 13101 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 13102 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 13103
c37d8c30
IS
131042010-10-17 Iain Sandoe <iains@gcc.gnu.org>
13105
13106 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
13107 * c-common.h (enum rid): Add RID_AT_PACKAGE.
13108 (objc_ivar_visibility_kind): New enum.
13109 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 13110 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
13111 visibility enum.
13112
1b1562a5
MM
131132010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
13114
13115 * c-cppbuiltin.c (builtin_define_float_constants): Emit
13116 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
13117 has the appropriate fma builtins.
13118 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
13119
668ea4b1
IS
131202010-10-14 Iain Sandoe <iains@gcc.gnu.org>
13121
1b1562a5 13122 merge from FSF apple 'trunk' branch.
3f8257db 13123 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 13124
668ea4b1
IS
13125 Radars 4436866, 4505126, 4506903, 4517826
13126 * c-common.c (c_common_resword): Define @property and its attributes.
13127 * c-common.h: Define property attribute enum entries.
13128 (OBJC_IS_PATTR_KEYWORD): New.
13129 (objc_property_attribute_kind): New enum.
13130 Declare objc_set_property_attr (), objc_add_property_variable (),
13131 objc_build_getter_call () and objc_build_setter_call ().
13132 * stub-objc.c (objc_set_property_attr): New stub.
13133 (objc_add_property_variable): Likewise.
13134 (objc_build_getter_call): Likewise.
13135 (objc_build_setter_call) Likewise.
1b1562a5 13136
a1178b30
IS
131372010-10-13 Iain Sandoe <iains@gcc.gnu.org>
13138
1b1562a5 13139 merge from FSF apple 'trunk' branch.
ab20d992 13140 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
13141
13142 Radar 3803157 (method attributes)
13143 * c-common.c (handle_deprecated_attribute): Recognize
13144 objc methods as valid declarations.
13145 * c-common.h: Declare objc_method_decl ().
1b1562a5 13146 * stub-objc.c (objc_method_decl): New stub.
a1178b30 13147
a75bfaa6
JM
131482010-10-08 Joseph Myers <joseph@codesourcery.com>
13149
13150 * c-common.c (parse_optimize_options): Call
13151 decode_cmdline_options_to_array_default_mask before
13152 decode_options. Update arguments to decode_options.
13153 * c-common.h (c_common_init_options_struct): Declare.
13154 * c-opts.c (c_common_init_options_struct): New. Split out from
13155 c_common_init_options.
13156
f05b9d93
NP
131572010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
13158
13159 Implemented fast enumeration for Objective-C.
13160 * c-common.h (objc_finish_foreach_loop): New.
13161 * stub-objc.c (objc_finish_foreach_loop): New.
13162
1ebe4b4f
JM
131632010-10-05 Joseph Myers <joseph@codesourcery.com>
13164
13165 * c-common.h (struct diagnostic_context): Don't declare here.
13166 (c_common_initialize_diagnostics): Declare using
13167 diagnostic_context typedef.
13168 * c-opts.c (c_common_handle_option): Pass global_dc to
13169 handle_generated_option.
13170
d4d24ba4
JM
131712010-10-04 Joseph Myers <joseph@codesourcery.com>
13172
13173 * c-opts.c (c_common_handle_option): Pass &global_options_set to
13174 handle_generated_option.
13175
478a1c5b
ILT
131762010-10-03 Ian Lance Taylor <iant@google.com>
13177
13178 * c.opt (-fplan9-extensions): New option.
13179
82a1c2fe
FXC
131802010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
13181
13182 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
13183 Remove.
13184 (c_cpp_builtins): Call functions from cppbuiltin.c instead
13185 of duplicating code.
13186
92902b1b
IS
131872010-09-30 Iain Sandoe <iains@gcc.gnu.org>
13188
13189 * c-common.c: Add two new entries for @optional
13190 and @required keywords.
13191
13192 merge from FSF 'apple/trunk' branch.
3f8257db 13193 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
13194
13195 Radar 4386773
13196 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
13197 objective-c keywords.
13198 (objc_set_method_opt): New declaration.
13199 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 13200
46625112
JM
132012010-09-30 Joseph Myers <joseph@codesourcery.com>
13202
13203 * c-common.c (handle_optimize_attribute): Pass &global_options to
13204 cl_optimization_save and cl_optimization_restore.
13205 * c-opts.c (c_common_handle_option): Pass &global_options to
13206 handle_generated_option.
13207 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
13208 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
13209 &global_options to cl_optimization_restore.
13210
49b91f05
NP
132112010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
13212
13213 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
13214 Objective-C/Objective-C++ keywords.
13215
13ed556f 132162010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 13217
9faeb493
UB
13218 Merge from 'apple/trunk' branch on FSF servers.
13219
3f8257db 13220 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
13221
13222 Radar 4281748
13223 * c-common.h (objc_check_global_decl): New declaration.
13224 * stub-objc.c (objc_check_global_decl): New stub.
13225
f0036cca
JM
132262010-09-29 Joseph Myers <joseph@codesourcery.com>
13227
13228 * c.opt: Don't use VarExists.
13229
e3339d0f
JM
132302010-09-29 Joseph Myers <joseph@codesourcery.com>
13231
13232 * c-common.c (c_cpp_error): Update names of diagnostic_context
13233 members.
13234 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
13235 cl_optimization members.
13236 * c-opts.c (warning_as_error_callback, c_common_handle_option,
13237 sanitize_cpp_opts, finish_options): Update names of cpp_options
13238 members.
13239
1973201f
NP
132402010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
13241
13242 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
13243 (objc_is_reserved_word): Removed.
13244 * c-common.c: Updated comments.
13245 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
13246 objc_is_reserved_word.
13247 * stub-objc.c (objc_is_reserved_word): Removed.
13248
f7e71da5
IS
132492010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13250
9faeb493 13251 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
13252 include attributes.
13253 (objc_start_method_definition): Likewise.
13254 (objc_build_keyword_decl): Likewise.
13255 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
13256 (objc_start_method_definition): Likewise.
13257 (objc_build_keyword_decl): Likewise.
13258
c165dca7
IS
132592010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13260
13261 * c-common.h (objc_start_class_interface): Adjust prototype.
13262 (objc_start_category_interface): Likewise.
13263 (objc_start_protocol): Likewise.
13264 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
13265 (objc_start_class_interface): Likewise.
13266 (objc_start_category_interface): Likewise.
13267
7458026b
ILT
132682010-09-27 Ian Lance Taylor <iant@google.com>
13269
13270 * c-common.c (c_common_attribute_table): Add no_split_stack.
13271 (handle_no_split_stack_attribute): New static function.
13272
b581b85b
NP
132732010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
13274
9faeb493 13275 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 13276
3f8257db 13277 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 13278
9faeb493 13279 Radar 4229905
b581b85b
NP
13280 * c-common.h (objc_have_common_type): New declaration.
13281 * stub-objc.c (objc_have_common_type): New stub.
13282
13283 2005-06-22 Ziemowit Laski <zlaski@apple.com>
13284
13285 Radar 4154928
13286 * c-common.h (objc_common_type): New prototype.
9faeb493 13287 * stub-objc.c (objc_common_type): New stub.
b581b85b 13288
46a4da10
JH
132892010-09-24 Jan Hubicka <jh@suse.cz>
13290
13291 * c-common.c (handle_leaf_attribute): New function.
13292 (struct attribute_spec c_common_att): Add leaf.
13293
e200444e
JM
132942010-09-22 Joseph Myers <joseph@codesourcery.com>
13295
13296 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
13297 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
13298 -dump, -dump=, -imacros, -imacros=, -include, -include=,
13299 -include-barrier, -include-directory, -include-directory=,
13300 -include-directory-after, -include-directory-after=,
13301 -include-prefix, -include-prefix=, -include-with-prefix,
13302 -include-with-prefix=, -include-with-prefix-after,
13303 -include-with-prefix-after=, -include-with-prefix-before,
13304 -include-with-prefix-before=, -no-integrated-cpp,
13305 -no-line-commands, -no-standard-includes, -no-warnings, -output,
13306 -output=, -pedantic, -pedantic-errors, -preprocess,
13307 -print-missing-file-dependencies, -trace-includes, -traditional,
13308 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
13309 -user-dependencies, -verbose, -write-dependencies,
13310 -write-user-dependencies, no-integrated-cpp, traditional): New.
13311
29a80ea6
NP
133122010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13313
13314 PR objc/23710
ac1fc2fc
NP
13315 * c-common.h (objc_start_method_definition): Return bool instead
13316 of void.
13317 * stub-objc.c (objc_start_method_definition): Return bool instead
13318 of void.
13319
133202010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13321
13322 PR objc/25965
13323 * c-common.h (objc_get_interface_ivars): New declaration.
13324 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 13325
de621752
ILT
133262010-09-15 Ian Lance Taylor <iant@google.com>
13327
13328 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 13329 messages. Remove period at end of warning message.
de621752 13330
ba885ec5
NS
133312010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13332
13333 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
13334 (handle_alias_attribute): ... here.
13335 (handle_ifunc_attribute): New.
13336
c5ee1358
MM
133372010-09-06 Mark Mitchell <mark@codesourcery.com>
13338
13339 * c-common.h (do_warn_double_promotion): Declare.
13340 * c-common.c (do_warn_double_promotion): Define.
13341
0a0b3574
MM
133422010-09-05 Mark Mitchell <mark@codesourcery.com>
13343
13344 * c.opt (Wdouble-promotion): New.
13345
d1779886
JM
133462010-09-02 Joseph Myers <joseph@codesourcery.com>
13347
13348 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
13349 fvtable-thunks, fxref): Mark no longer supported in help text.
13350
2d2bd949
JM
133512010-09-02 Joseph Myers <joseph@codesourcery.com>
13352
13353 * c.opt (Wimport, fall-virtual, falt-external-templates,
13354 fdefault-inline, fenum-int-equiv, fexternal-templates,
13355 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
13356 fname-mangling-version-, fnew-abi, fnonnull-objects,
13357 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
13358 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
13359 applicable.
13360 (fhandle-exceptions): Mark with Alias and Warn.
13361 * c-opts.c (c_common_handle_option): Don't handle options marked
13362 as ignored.
13363
5de8299c
JM
133642010-09-02 Joseph Myers <joseph@codesourcery.com>
13365
13366 * c.opt (Wcomments, Werror-implicit-function-declaration,
13367 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
13368 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
13369 aliases.
13370 * c-common.c (option_codes): Use OPT_Wcomment instead of
13371 OPT_Wcomments.
13372 * c-opts.c (warning_as_error_callback, c_common_handle_option):
13373 Don't handle options marked as aliases.
13374
0ceb0201
RG
133752010-08-25 Richard Guenther <rguenther@suse.de>
13376
13377 * c-common.c (c_common_get_alias_set): Remove special
13378 handling for pointers.
13379
ac47786e
NF
133802010-08-20 Nathan Froyd <froydnj@codesourcery.com>
13381
13382 * c-common.c: Use FOR_EACH_VEC_ELT.
13383 * c-gimplify.c: Likewise.
13384 * c-pragma.c: Likewise.
13385
c878765b
JM
133862010-08-16 Joseph Myers <joseph@codesourcery.com>
13387
13388 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
13389 RejectDriver.
13390 (MMDX): Change back to MMD. Mark NoDriverArg instead of
13391 RejectDriver.
13392 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
13393 instead of OPT_MDX and OPT_MMDX.
13394
603349bf
JM
133952010-08-16 Joseph Myers <joseph@codesourcery.com>
13396
13397 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
13398
644fa7ac
JM
133992010-08-12 Joseph Myers <joseph@codesourcery.com>
13400
13401 * c.opt (MD, MMD): Change to MDX and MMDX.
13402 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
13403
481e1176
JM
134042010-08-11 Joseph Myers <joseph@codesourcery.com>
13405
13406 * c-opts.c (c_common_handle_option): Call handle_generated_option
13407 instead of handle_option.
13408
ac8dc9f7
NF
134092010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13410
13411 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
13412 (maybe_apply_renaming_pragma): Delete unneeded declarations.
13413
4f8c876d
NF
134142010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13415
13416 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
13417 (pending_redefine_extname): Change type to a VEC.
13418 (add_to_renaming_pragma_list): Update for new type of
13419 pending_redefine_extname.
ac8dc9f7 13420 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 13421
3b0c690e
AC
134222010-08-04 Arnaud Charlet <charlet@adacore.com>
13423
13424 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
13425 visited.
13426 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
13427 decide whether a type has already been declared/seen.
13428 Do not go to the original type.
13429 (dump_nested_types): New parameter forward.
13430 Generate forward declaration if needed and mark type as visited.
13431 (print_ada_declaration): Call dump_nested_types if not already done.
13432 Mark types as visited.
13433
1890bccc
JM
134342010-08-03 Joseph Myers <joseph@codesourcery.com>
13435
13436 * c.opt (-print-pch-checksum): Remove option.
13437 * c-opts.c (c_common_handle_option): Don't handle
13438 OPT_print_pch_checksum.
13439
5f20c657
JM
134402010-07-27 Joseph Myers <joseph@codesourcery.com>
13441
13442 * c-common.h (c_common_handle_option): Update prototype and return
13443 value type.
13444 * c-opts.c (c_common_handle_option): Update prototype and return
13445 value type. Update calls to handle_option and
13446 enable_warning_as_error.
13447
f551f80c
JJ
134482010-07-27 Jakub Jelinek <jakub@redhat.com>
13449
13450 PR c/45079
13451 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
13452
61ff2bdc
JM
134532010-07-27 Joseph Myers <joseph@codesourcery.com>
13454
13455 * c-common.h (c_common_missing_argument): Remove.
13456 * c-opts.c (c_common_missing_argument): Remove.
13457 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
13458 idirafter, imacros, include, isysroot, isystem, iquote): Add
13459 MissingArgError.
13460 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
13461
7a9bf9a4
JM
134622010-07-27 Joseph Myers <joseph@codesourcery.com>
13463
13464 * c-common.h (c_common_option_lang_mask,
13465 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
13466 New.
13467 (c_common_init_options): Update prototype.
13468 * c-opts.c (c_common_option_lang_mask): New.
13469 (c_common_initialize_diagnostics): Split out of
13470 c_common_init_options.
13471 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
13472 New.
13473 (c_common_init_options): Update prototype. Use decoded options in
13474 search for -lang-asm.
13475
910ad8de
NF
134762010-07-15 Nathan Froyd <froydnj@codesourcery.com>
13477
13478 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
13479 * c-format.c: Likewise.
13480
718f9c0f
MLI
134812010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
13482
13483 * c-common.h: Include diagnostic-core.h. Error if already
13484 included.
13485 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
13486
4d451982
MLI
134872010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
13488
adfac8df 13489 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
13490 Do not include expr.h
13491 (vector_mode_valid_p): Move here.
13492
119fe915
SB
134932010-06-21 DJ Delorie <dj@redhat.com>
13494
13495 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
13496 allow these pragmas anywhere.
13497
134982010-06-14 Jakub Jelinek <jakub@redhat.com>
13499
13500 PR bootstrap/44509
13501 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
13502 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
13503 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
13504 ggc_strdup instead of xstrdup.
13505
135062010-06-10 Jakub Jelinek <jakub@redhat.com>
13507
13508 * c-cppbuiltin.c: Include cpp-id-data.h.
13509 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
13510 (lazy_hex_fp_value): New function.
13511 (builtin_define_with_hex_fp_value): Provide definitions lazily.
13512
6662d794
MLI
135132010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
13514
13515 * c-gimplify.c: Do not include tree-flow.h
13516
38f8b050
JR
135172010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
13518
13519 PR other/44034
13520 * c-common.c: Rename targetm member:
13521 targetm.enum_va_list -> targetm.enum_va_list_p
13522
9589f23e
AS
135232010-06-28 Anatoly Sokolov <aesok@post.ru>
13524
13525 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
13526
3b06d379
SB
135272010-06-28 Steven Bosscher <steven@gcc.gnu.org>
13528
13529 * c-cppbuiltin.c: Do not include except.h.
13530
d166d4c3
AK
135312010-06-24 Andi Kleen <ak@linux.intel.com>
13532
9faeb493
UB
13533 * c-common.c (warn_for_omitted_condop): New.
13534 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 13535
70cb8be6
JM
135362010-06-21 Joseph Myers <joseph@codesourcery.com>
13537
13538 * c.opt (lang-objc): Remove.
13539 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
13540
a4c97feb
JR
135412010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
13542
13543 * c-opts.c: Include "tm_p.h".
13544
6e2f1956
JM
135452010-06-20 Joseph Myers <joseph@codesourcery.com>
13546
13547 * c-common.c (parse_optimize_options): Update call to
13548 decode_options.
13549
bc87224e
NF
135502010-06-18 Nathan Froyd <froydnj@codesourcery.com>
13551
13552 * c-common.c (record_types_used_by_current_var_decl): Adjust for
13553 new type of types_used_by_cur_var_decl.
13554
b49cf425
JR
135552010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
13556
13557 PR bootstrap/44512
13558 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
13559 for C++ standard compliance.
13560
59f9c2ed
JM
135612010-06-16 Jason Merrill <jason@redhat.com>
13562
13563 * c.opt: Add -Wnoexcept.
13564
33766b66
RG
135652010-06-16 Richard Guenther <rguenther@suse.de>
13566
13567 PR c/44555
13568 * c-common.c (c_common_truthvalue_conversion): Remove
13569 premature and wrong optimization concering ADDR_EXPRs.
13570
eff7e30c
AC
135712010-06-15 Arnaud Charlet <charlet@adacore.com>
13572
13573 * c-ada-spec.c (dump_sloc): Remove column info.
13574 (is_simple_enum): New function.
13575 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
13576 enum types when relevant.
13577
6312e84d
MLI
135782010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
13579
9faeb493 13580 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
13581 location.
13582
1cb42611
JM
135832010-06-10 Joseph Myers <joseph@codesourcery.com>
13584
13585 * c-opts.c (c_common_handle_option): Don't handle
13586 OPT_fshow_column.
13587
a9429e29
LB
135882010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
13589
13590 * c-pragma.c (push_alignment): Use typed GC allocation.
13591 (handle_pragma_push_options): Likewise.
13592
13593 * c-common.c (parse_optimize_options): Likewise.
13594
13595 * c-common.h (struct sorted_fields_type): Add variable_size GTY
13596 option.
13597
5498f011
JM
135982010-06-07 Joseph Myers <joseph@codesourcery.com>
13599
13600 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
13601 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
13602 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
13603 flag_signed_bitfields, warn_strict_null_sentinel,
13604 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
13605 flag_gen_declaration, flag_no_gnu_keywords,
13606 flag_implement_inlines, flag_implicit_templates,
13607 flag_implicit_inline_templates, flag_optional_diags,
13608 flag_elide_constructors, flag_default_inline, flag_rtti,
13609 flag_conserve_space, flag_access_control, flag_check_new,
13610 flag_new_for_scope, flag_weak, flag_working_directory,
13611 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
13612 flag_enforce_eh_specs, flag_threadsafe_statics,
13613 flag_pretty_templates): Remove.
13614 * c-common.h (flag_preprocess_only, flag_nil_receivers,
13615 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
13616 flag_replace_objc_classes, flag_undef, flag_no_builtin,
13617 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
13618 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
13619 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
13620 flag_no_gnu_keywords, flag_implement_inlines,
13621 flag_implicit_templates, flag_implicit_inline_templates,
13622 flag_optional_diags, flag_elide_constructors, flag_default_inline,
13623 flag_rtti, flag_conserve_space, flag_access_control,
13624 flag_check_new, flag_new_for_scope, flag_weak,
13625 flag_working_directory, flag_use_cxa_atexit,
13626 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
13627 flag_threadsafe_statics, flag_pretty_templates,
13628 warn_strict_null_sentinel): Remove.
13629 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
13630 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
13631 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
13632 fimplicit-inline-templates, fimplicit-templates,
13633 flax-vector-conversions, fms-extensions, fnil-receivers,
13634 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
13635 frtti, fshort-double, fshort-enums, fshort-wchar,
13636 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
13637 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
13638 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
13639 gen-decls, undef): Use Var.
13640 (fdefault-inline, foptional-diags): Document as doing nothing.
13641 * c-opts.c (c_common_handle_option): Remove cases for options now
13642 using Var. Mark ignored options as such.
13643
39dabefd
SB
136442010-06-05 Steven Bosscher <steven@gcc.gnu.org>
13645
9faeb493 13646 * c-common.c: Moved to here from parent directory.
39dabefd
SB
13647 * c-common.def: Likewise.
13648 * c-common.h: Likewise.
13649 * c-cppbuiltin.c: Likewise.
13650 * c-dump.c: Likewise.
13651 * c-format.c: Likewise.
13652 * c-format.h : Likewise.
13653 * c-gimplify.c: Likewise.
13654 * c-lex.c: Likewise.
13655 * c-omp.c: Likewise.
13656 * c.opt: Likewise.
13657 * c-opts.c: Likewise.
13658 * c-pch.c: Likewise.
13659 * c-ppoutput.c: Likewise.
13660 * c-pragma.c: Likewise.
13661 * c-pragma.h: Likewise.
13662 * c-pretty-print.c: Likewise.
13663 * c-pretty-print.h: Likewise.
13664 * c-semantics.c: Likewise.
13665 * stub-objc.c: Likewise.
13666
13667 * c-common.c: Include gt-c-family-c-common.h.
13668 * c-pragma.c: Include gt-c-family-c-pragma.h.
13669\f
877e3c2a 13670Copyright (C) 2010-2022 Free Software Foundation, Inc.
39dabefd
SB
13671
13672Copying and distribution of this file, with or without modification,
13673are permitted in any medium without royalty provided the copyright
13674notice and this notice are preserved.