]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
c-family: avoid compile-time-hog in c_genericize [PR108880]
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
0263e9d5
GA
12023-02-18 Martin Uecker <uecker@tugraz.at>
2
3 PR c/105660
4 * c-attribs.cc (append_access_attr): Use order of arguments when
5 construction string.
6 (append_access_attr_idxs): Rename and make static.
7 * c-warn.cc (warn_parm_array_mismatch): Add assertion.
8
88cc4495
GA
92023-02-16 Patrick Palka <ppalka@redhat.com>
10
11 * c-common.h: Mechanically drop static from static inline
12 functions via s/^static inline/inline/g.
13
0a251e74
GA
142023-02-01 Jason Merrill <jason@redhat.com>
15
16 * c.opt: Add -Wno-changes-meaning.
17
317525b0
GA
182023-01-31 Marek Polacek <polacek@redhat.com>
19
20 PR c++/107593
21 PR c++/108597
22 * c-common.h (instantiation_dependent_expression_p): Declare.
23 * c-warn.cc (warn_duplicated_cond_add_or_warn): If the condition
24 is dependent, invalidate the chain.
25
2371d100
GA
262023-01-26 Marek Polacek <polacek@redhat.com>
27
28 PR c++/105300
29 * c-pragma.cc (handle_pragma_message): Warn for CPP_STRING_USERDEF.
30
9f98cfa5
GA
312023-01-18 Marek Polacek <polacek@redhat.com>
32
33 PR c/108424
34 * c-common.cc (check_case_value): Check INTEGRAL_TYPE_P.
35
5013c3bb
GA
362023-01-14 Jakub Jelinek <jakub@redhat.com>
37
38 PR c++/108365
39 * c-common.h (may_shorten_divmod): New static inline function.
40
412023-01-13 Eric Botcazou <ebotcazou@adacore.com>
42
43 * c-ada-spec.cc (is_float32): New function.
44 (is_float64): Likewise.
45 (is_float128): Tweak.
46 (dump_ada_node) <REAL_TYPE>: Call them to recognize more types.
47
81ed98bc
GA
482023-01-12 Lewis Hyatt <lhyatt@gmail.com>
49
50 PR preprocessor/108244
51 * c-pragma.cc (c_register_pragma_1): Don't attempt to register any
52 deferred pragmas if -fdirectives-only.
53 (init_pragma): Likewise.
54
84723aca
GA
552023-01-09 Martin Liska <mliska@suse.cz>
56
57 PR c/107993
58 * c-attribs.cc (handle_target_clones_attribute): Check for
59 string constant for all target_clone attribute values.
60
0f8fbb57
GA
612023-01-03 Florian Weimer <fweimer@redhat.com>
62
63 * c-cppbuiltin.cc (c_cpp_builtins): Define
64 __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.
65
662023-01-03 Florian Weimer <fweimer@redhat.com>
67
68 Revert:
69 2023-01-03 Florian Weimer <fweimer@redhat.com>
70
71 * c-cppbuiltin.cc (__LIBGCC_DWARF_REG_SIZES_CONSTANT__):
72 Define if constant is known.
73
742023-01-03 Florian Weimer <fweimer@redhat.com>
75
76 Revert:
77 2023-01-02 Florian Weimer <fweimer@redhat.com>
78
79 * c-cppbuiltin.cc (c_cpp_builtins): Define
80 __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.
81
fee53a31
GA
822023-01-02 Florian Weimer <fweimer@redhat.com>
83
84 * c-cppbuiltin.cc (c_cpp_builtins): Define
85 __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.
86
872023-01-02 Florian Weimer <fweimer@redhat.com>
88
89 * c-cppbuiltin.cc (__LIBGCC_DWARF_REG_SIZES_CONSTANT__):
90 Define if constant is known.
91
d2ef2327
GA
922022-12-19 Marek Polacek <polacek@redhat.com>
93
94 PR c/98487
95 * c-format.cc (check_function_format): Use get_attribute_name.
96
5fb1e674
GA
972022-12-16 Qing Zhao <qing.zhao@oracle.com>
98
99 * c.opt (Wstrict-flex-arrays): New option.
100
596dbfff
GA
1012022-12-02 Andrew MacLeod <amacleod@redhat.com>
102
103 * c-attribs.cc (handle_deprecated_attribute): Use type when
104 using TYPE_NAME.
105
b35680ec
GA
1062022-12-02 Jakub Jelinek <jakub@redhat.com>
107
108 PR c++/84469
109 * c-omp.cc (c_omp_is_loop_iterator): For range for with structured
110 binding return TREE_VEC_LENGTH (d->declv) even if decl is equal
111 to any of the structured binding decls.
112
6eea85a9
GA
1132022-11-30 Iskander Shakirzyanov <iskander@ispras.ru>
114 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
115
116 PR driver/107787
117 * c-common.cc (fold_offsetof,
118 convert_vector_to_array_for_subscript): Use OPT_Warray_bounds_
119 instead of OPT_Warray_bounds.
120
9a1b4f1d
GA
1212022-11-24 Jakub Jelinek <jakub@redhat.com>
122
123 * c.opt (fcontract-role=, fcontract-semantic=): Terminate descriptions
124 with a dot.
125
8761284f
GA
1262022-11-23 Andrew Pinski <apinski@marvell.com>
127 Jakub Jelinek <jakub@redhat.com>
128
129 PR c/107127
130 * c-gimplify.cc (c_genericize): Use walk_tree_without_duplicates
131 instead of walk_tree for c_genericize_control_r.
132
1332022-11-23 Jakub Jelinek <jakub@redhat.com>
134
135 * c.opt (fcontract-assumption-mode=, fcontract-continuation-mode=,
136 fcontract-role=, fcontract-semantic=): Add RejectNegative.
137 (fcontract-build-level=): Terminate description with dot.
138
fb98ede8
GA
1392022-11-19 Jakub Jelinek <jakub@redhat.com>
140
141 * c-cppbuiltin.cc (c_cpp_builtins): Bump __cpp_constexpr
142 value from 202207L to 202211L.
143
1442022-11-19 Jeff Chapman II <jchapman@lock3software.com>
145 Andrew Sutton <asutton@lock3software.com>
146 Andrew Marmaduke <amarmaduke@lock3software.com>
147 Michael Lopez <mlopez@lock3software.com>
148 Jason Merrill <jason@redhat.com>
149
150 * c.opt: Add contracts flags.
151 * c-cppbuiltin.cc (c_cpp_builtins): Add contracts feature-test
152 macros.
153
80909529
GA
1542022-11-16 Marek Polacek <polacek@redhat.com>
155
156 PR c++/106649
157 * c-cppbuiltin.cc (c_cpp_builtins): Update value of __cpp_constexpr for
158 C++23.
159 * c-opts.cc (c_common_post_options): Set warn_invalid_constexpr
160 depending on cxx_dialect.
161 * c.opt (Winvalid-constexpr): New option.
162
1632022-11-16 Jakub Jelinek <jakub@redhat.com>
164
165 * c-common.def (CONCEPT_DECL): New tree, moved here from
166 cp-tree.def.
167 * c-common.cc (c_common_init_ts): Handle CONCEPT_DECL.
168 * c-attribs.cc (handle_deprecated_attribute): Allow deprecated
169 attribute on CONCEPT_DECL.
170
cdc34229
GA
1712022-11-15 Lewis Hyatt <lhyatt@gmail.com>
172
173 * c-opts.cc (c_finish_options): Use special_fname_builtin () rather
174 than a hard-coded string.
175
83d400bd
GA
1762022-11-15 Jakub Jelinek <jakub@redhat.com>
177
178 * c-cppbuiltin.cc (c_cpp_builtins): Bump C++23
179 __cpp_multidimensional_subscript macro value to 202211L.
180
1812022-11-15 Patrick Palka <ppalka@redhat.com>
182
183 PR c++/107638
184 * c-lex.cc (c_common_has_attribute): Return 1 for init_priority
185 iff SUPPORTS_INIT_PRIORITY.
186
1872022-11-14 Martin Liska <mliska@suse.cz>
188
189 Revert:
190 2022-11-09 Martin Liska <mliska@suse.cz>
191
192 * c-target.def: Port to RST.
193
30d77d49
GA
1942022-11-12 Joseph Myers <joseph@codesourcery.com>
195
196 * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY.
197
5b6ce16a
GA
1982022-11-11 Jonathan Wakely <jwakely@redhat.com>
199
200 PR c/85487
201 * c-pragma.cc (handle_pragma_ignore): New function.
202 (init_pragma): Register region and endregion pragmas.
203
1cdfd0e5
GA
2042022-11-09 Martin Liska <mliska@suse.cz>
205
206 * c-target.def: Port to RST.
207
05788e9b
GA
2082022-11-05 Lewis Hyatt <lhyatt@gmail.com>
209
210 PR preprocessor/55971
211 * c-ppoutput.cc (adjust_for_newlines): Update comment.
212
d29260ce
GA
2132022-11-03 Jason Merrill <jason@redhat.com>
214
215 * c-opts.cc (c_common_post_options): -fconcepts no longer implies
216 -fconcepts-ts before C++20.
217
3055829a
GA
2182022-10-28 Joseph Myers <joseph@codesourcery.com>
219
220 * c-common.cc (def_fn_type): Call build_function_type for
221 zero-argument variable-argument function.
222 (c_common_nodes_and_builtins): Build default_function_type with
223 build_function_type.
224 * c.opt (fallow-parameterless-variadic-functions): Mark as ignored
225 option.
226
2272022-10-28 Joseph Myers <joseph@codesourcery.com>
228
229 PR c/61469
230 * c-common.h (ENUM_UNDERLYING_TYPE, ENUM_FIXED_UNDERLYING_TYPE_P):
231 New. Moved from cp/cp-tree.h.
232 * c-warn.cc (warnings_for_convert_and_check): Do not consider
233 conversions to enum with underlying type bool to overflow.
234
486a5037
GA
2352022-10-26 Marek Polacek <polacek@redhat.com>
236
237 PR c++/106393
238 * c.opt (Wdangling-reference): New.
239
87f9c4a4
GA
2402022-10-19 Joseph Myers <joseph@codesourcery.com>
241
242 * c-format.h (enum format_lengths): Add FMT_LEN_w8, FMT_LEN_w16,
243 FMT_LEN_w32, FMT_LEN_w64, FMT_LEN_wf8, FMT_LEN_wf16, FMT_LEN_wf32
244 and FMT_LEN_wf64.
245 (NOARGUMENTS, NOLENGTHS): Update definitions.
246 (T_I8, T2X_I8, T_I16, T2X_I16, T_I32, T2X_I32, T_I64, T2X_I64)
247 (T_U8, T2X_U8, T_U16, T2X_U16, T_U32, T2X_U32, T_U64, T2X_U64)
248 (T_IF8, T2X_IF8, T_IF16, T2X_IF16, T_IF32, T2X_IF32, T_IF64)
249 (T2X_IF64, T_UF8, T2X_UF8, T_UF16, T2X_UF16, T_UF32, T2X_UF32)
250 (T_UF64, T2X_UF64): New macros.
251 * c-format.cc (printf_length_specs, scanf_length_specs): Add wN
252 and wfN length modifiers.
253 (print_char_table, scan_char_table): Add entries using wN and wfN
254 length modifiers.
255
21de009f
GA
2562022-10-18 Joseph Myers <joseph@codesourcery.com>
257
258 PR c/36113
259 * c-common.cc (c_common_type_for_size): Add fallback to
260 widest_unsigned_literal_type_node or
261 widest_integer_literal_type_node for precision that may not
262 exactly match the precision of those types.
263
baeec7cc
GA
2642022-10-14 Jakub Jelinek <jakub@redhat.com>
265
266 * c-cppbuiltin.cc (c_cpp_builtins): If bfloat16_type_node,
267 predefine __BFLT16_*__ macros and for C++23 also
268 __STDCPP_BFLOAT16_T__. Predefine bfloat16_type_node related
269 macros for -fbuilding-libgcc.
270 * c-lex.cc (interpret_float): Handle CPP_N_BFLOAT16.
271
2722022-10-14 Jakub Jelinek <jakub@redhat.com>
273
274 PR middle-end/323
275 PR c++/107097
276 * c-common.def (EXCESS_PRECISION_EXPR): Remove comment part about
277 the tree being specific to C/ObjC.
278 * c-opts.cc (c_common_post_options): Handle flag_excess_precision
279 in C++ the same as in C.
280 * c-lex.cc (interpret_float): Set const_type to excess_precision ()
281 even for C++.
282
621a911d
GA
2832022-10-13 Joseph Myers <joseph@codesourcery.com>
284
285 * c-cppbuiltin.cc (builtin_define_float_constants): Do not use
286 value 2 for *_IS_IEC_60559.
287
781f477a
GA
2882022-10-12 Lewis Hyatt <lhyatt@gmail.com>
289
290 PR preprocessor/60014
291 PR preprocessor/60723
292 * c-ppoutput.cc (class token_streamer): Remove member
293 line_marker_emitted to...
294 (token_streamer::stream): ...a local variable here. Set
295 print.prev_was_system_token on all code paths.
296
27bfe54e
GA
2972022-10-10 Nathan Sidwell <nathan@acm.org>
298
299 * c-opts.cc (c_common_post_options): Bump abi to 18.
300
3012022-10-10 Marek Polacek <polacek@redhat.com>
302
303 PR c++/106937
304 * c-pretty-print.cc (pp_c_specifier_qualifier_list): Print only GNU
305 attributes here.
306 (c_pretty_printer::direct_abstract_declarator): Print the standard [[]]
307 attributes here.
308 (pp_c_attributes): Remove.
309 (pp_c_attributes_display): Print the [[]] form if appropriate. Use
310 get_attribute_name. Don't print a trailing space when printing the
311 [[]] form.
312 * c-pretty-print.h (pp_c_attributes): Remove.
313
9ff6c33e
GA
3142022-10-07 Qing Zhao <qing.zhao@oracle.com>
315
316 * c-attribs.cc (handle_strict_flex_array_attribute): New function.
317 (c_common_attribute_table): New item for strict_flex_array.
318 * c.opt: (fstrict-flex-arrays): New option.
319 (fstrict-flex-arrays=): New option.
320
3212022-10-07 Martin Liska <mliska@suse.cz>
322
323 * name-hint.h: Use std::move.
324
3252022-10-07 Jakub Jelinek <jakub@redhat.com>
326
327 * c-common.cc (attribute_fallthrough_p): Lookup fallthrough attribute
328 only in gnu namespace or as standard attribute, treat fallthrough
329 attributes in other namespaces like any other unknown attribute.
330
629d04d3
GA
3312022-10-06 Joseph Myers <joseph@codesourcery.com>
332
333 * c-common.cc (c_common_reswords): Mark typeof as D_EXT11. Add
334 typeof_unqual.
335 * c-common.h (enum rid): Add RID_TYPEOF_UNQUAL.
336 (D_EXT11): New macro. Values of subsequent macros updated.
337
3382022-10-06 Jakub Jelinek <jakub@redhat.com>
339
340 PR c++/106654
341 * c-attribs.cc (handle_assume_attribute): New function.
342 (c_common_attribute_table): Add entry for assume attribute.
343 * c-lex.cc (c_common_has_attribute): Handle
344 __have_cpp_attribute (assume).
345
85872a69
GA
3462022-10-04 Jakub Jelinek <jakub@redhat.com>
347
348 * c-omp.cc (c_omp_directives): Uncomment begin declare target
349 entry.
350
69fd6dcc
GA
3512022-10-03 Patrick Palka <ppalka@redhat.com>
352
353 * c-common.cc (c_common_reswords): Use RID_IS_SAME instead of
354 RID_IS_SAME_AS.
355
3562022-10-03 Joseph Myers <joseph@codesourcery.com>
357
358 * c-cppbuiltin.cc (builtin_define_float_constants): Do not
359 special-case __*_EPSILON__ setting for IBM long double for C2x.
360
3a221b73
GA
3612022-09-30 Patrick Palka <ppalka@redhat.com>
362
363 * c-common.cc (c_common_reswords): Use cp/cp-trait.def to handle
364 C++ traits.
365 * c-common.h (enum rid): Likewise.
366
bbdcdf5c
GA
3672022-09-29 Joseph Myers <joseph@codesourcery.com>
368
369 * c-lex.cc (c_common_has_attribute): Handle noreturn attribute for
370 C.
371
3722022-09-29 Patrick Palka <ppalka@redhat.com>
373
374 * c-common.cc (c_common_reswords): Add __remove_cv,
375 __remove_reference and __remove_cvref.
376 * c-common.h (enum rid): Add RID_REMOVE_CV, RID_REMOVE_REFERENCE
377 and RID_REMOVE_CVREF.
378
1f16a020
GA
3792022-09-27 Marek Polacek <polacek@redhat.com>
380
381 PR c++/101165
382 PR c++/106882
383 * c-cppbuiltin.cc (c_cpp_builtins): Define __cpp_implicit_move.
384
3852022-09-27 Marek Polacek <polacek@redhat.com>
386
387 * c-format.cc (c_keywords): Drop nothrow.
388
3892022-09-27 Jakub Jelinek <jakub@redhat.com>
390
391 PR c++/106651
392 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
393 __cpp_static_call_operator=202207L for C++23.
394
3952022-09-27 Jakub Jelinek <jakub@redhat.com>
396
397 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ASSUME,
398 PRAGMA_OMP_ASSUMES and PRAGMA_OMP_BEGIN. Rename
399 PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
400 * c-pragma.cc (omp_pragmas): Add assumes and begin.
401 For end rename PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
402 (omp_pragmas_simd): Add assume.
403 * c-common.h (c_omp_directives): Declare.
404 * c-omp.cc (omp_directives): Rename to ...
405 (c_omp_directives): ... this. No longer static. Uncomment
406 assume, assumes, begin assumes and end assumes entries.
407 In end declare target entry rename PRAGMA_OMP_END_DECLARE_TARGET
408 to PRAGMA_OMP_END.
409 (c_omp_categorize_directive): Adjust for omp_directives to
410 c_omp_directives renaming.
411
4122022-09-27 Jakub Jelinek <jakub@redhat.com>
413
414 PR c++/106652
415 PR c++/85518
416 * c-common.cc (c_common_reswords): Change _Float{16,32,64,128} and
417 _Float{32,64,128}x flags from D_CONLY to 0.
418 (shorten_binary_op): Punt if common_type returns error_mark_node.
419 (shorten_compare): Likewise.
420 (c_common_nodes_and_builtins): For C++ record _Float{16,32,64,128}
421 and _Float{32,64,128}x builtin types if available. For C++
422 clear float128t_type_node.
423 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
424 __STDCPP_FLOAT{16,32,64,128}_T__ for C++23 if supported.
425 * c-lex.cc (interpret_float): For q/Q suffixes prefer
426 float128t_type_node over float128_type_node. Allow
427 {f,F}{16,32,64,128} suffixes for C++ if supported with pedwarn
428 for C++20 and older. Allow {f,F}{32,64,128}x suffixes for C++
429 with pedwarn. Don't call excess_precision_type for C++.
430
220c4d8e
GA
4312022-09-26 Marek Polacek <polacek@redhat.com>
432
433 PR c++/106656
434 * c-cppbuiltin.cc (c_cpp_builtins): Update value of __cpp_char8_t
435 for C++20.
436
4afaeaab
GA
4372022-09-23 Marek Polacek <polacek@redhat.com>
438
439 PR c++/106784
440 * c-common.cc (c_common_reswords): Add __is_convertible and
441 __is_nothrow_convertible.
442 * c-common.h (enum rid): Add RID_IS_CONVERTIBLE and
443 RID_IS_NOTHROW_CONVERTIBLE.
444
279c6715
GA
4452022-09-22 David Malcolm <dmalcolm@redhat.com>
446
447 PR c/106830
448 * c-warn.cc (check_for_xor_used_as_pow): Don't try checking
449 values that don't fit in uhwi.
450
d0fc05e8
GA
4512022-09-15 Richard Biener <rguenther@suse.de>
452
453 * c-common.h (build_void_list_node): Remove.
454 * c-common.cc (c_common_nodes_and_builtins): Do not initialize
455 void_list_node.
456
861d1a11
GA
4572022-09-09 Jan-Benedict Glaw <jbglaw@lug-owl.de>
458
459 * c-format.cc (convert_format_name_to_system_name): Fix warning.
460
fe2a8ce9
GA
4612022-09-07 Joseph Myers <joseph@codesourcery.com>
462
463 * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY
464 for alignas, alignof, bool, false, static_assert, thread_local and
465 true.
466
4672022-09-07 Jakub Jelinek <jakub@redhat.com>
468
469 * c.opt (Winvalid-utf8): Use ObjC instead of objC. Remove
470 " in comments" from description.
471 (Wunicode): New option.
472
25aeb922
GA
4732022-09-06 Jakub Jelinek <jakub@redhat.com>
474
475 PR c/106836
476 * c-omp.cc (c_omp_split_clauses): Handle OMP_CLAUSE_DOACROSS.
477
83f2f228
GA
4782022-09-03 Jakub Jelinek <jakub@redhat.com>
479
480 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DOACROSS.
481 * c-omp.cc (c_finish_omp_depobj): Check also for OMP_CLAUSE_DOACROSS
482 clause and diagnose it. Don't handle OMP_CLAUSE_DEPEND_SOURCE and
483 OMP_CLAUSE_DEPEND_SINK. Assert kind is not OMP_CLAUSE_DEPEND_INVALID.
484
c64b0947
GA
4852022-09-02 David Malcolm <dmalcolm@redhat.com>
486
487 PR c/90885
488 * c-common.h (check_for_xor_used_as_pow): New decl.
489 * c-lex.cc (c_lex_with_flags): Add DECIMAL_INT to flags as appropriate.
490 * c-warn.cc (check_for_xor_used_as_pow): New.
491 * c.opt (Wxor-used-as-pow): New.
492
bb0a1556
GA
4932022-09-01 Jason Merrill <jason@redhat.com>
494
495 * c-common.cc (c_common_nodes_and_builtins): Set TREE_STRING_FLAG on
496 char8_t.
497 (braced_list_to_string): Check for char-sized elements.
498
4992022-09-01 Jakub Jelinek <jakub@redhat.com>
500
501 PR c++/106655
502 * c.opt (-Winvalid-utf8): New warning.
503 * c-opts.cc (c_common_handle_option) <case OPT_finput_charset_>:
504 Set cpp_opts->cpp_input_charset_explicit.
505 (c_common_post_options): If -finput-charset=UTF-8 is explicit
506 in C++23, enable -Winvalid-utf8 by default and if -pedantic
507 or -pedantic-errors, make it a pedwarn.
508
542c60c4
GA
5092022-08-31 Joseph Myers <joseph@codesourcery.com>
510
511 * c-attribs.cc (handle_deprecated_attribute): Check and pedwarn
512 for LABEL_DECL.
513 * c-common.cc (c_add_case_label): Add argument ATTRS. Call
514 decl_attributes.
515 * c-common.h (do_case, c_add_case_label): Update declarations.
516 * c-lex.cc (c_common_has_attribute): For C, produce a result of
517 201910 for fallthrough and 202106 for maybe_unused.
518
16f542d6
GA
5192022-08-26 Marek Polacek <polacek@redhat.com>
520
521 PR c++/81159
522 * c.opt (Wself-move): New option.
523
5242022-08-26 Jakub Jelinek <jakub@redhat.com>
525
526 * c-common.cc (check_builtin_function_arguments): Handle
527 BUILT_IN_ISSIGNALING.
528
5292022-08-26 Jakub Jelinek <jakub@redhat.com>
530
531 PR c++/106648
532 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
533 __cpp_named_character_escapes to 202207L.
534
5d4389dc
GA
5352022-08-25 Marek Polacek <polacek@redhat.com>
536
537 * c-common.cc (c_common_reswords): Enable nullptr in C2X.
538 (c_common_nodes_and_builtins): Create the built-in node for nullptr.
539 * c-common.h (enum c_tree_index): Add CTI_NULLPTR, CTI_NULLPTR_TYPE.
540 (struct c_common_resword): Resize the disable member.
541 (D_C2X): Add.
542 (nullptr_node): Define.
543 (nullptr_type_node): Define.
544 (NULLPTR_TYPE_P): Define.
545 * c-pretty-print.cc (c_pretty_printer::simple_type_specifier): Handle
546 NULLPTR_TYPE.
547 (c_pretty_printer::direct_abstract_declarator): Likewise.
548 (c_pretty_printer::constant): Likewise.
549
47a61e65
GA
5502022-08-16 Tom Honermann <tom@honermann.net>
551
552 PR c++/106423
553 * c-opts.cc (c_common_post_options): Disable -Wc++20-compat
554 diagnostics in C++20 and later.
555 * c.opt (Wc++20-compat): Enable hooks for the preprocessor.
556
5cd525f0
GA
5572022-08-11 Marek Polacek <polacek@redhat.com>
558
559 PR middle-end/102633
560 * c-gimplify.cc (c_gimplify_expr) <case DECL_EXPR>: Don't call
561 suppress_warning here.
562
5f17badb
GA
5632022-08-08 Tom Honermann <tom@honermann.net>
564
565 PR preprocessor/106426
566 * c-opts.cc (c_common_post_options): Assign cpp_opts->unsigned_utf8char
567 subject to -fchar8_t, -fsigned-char, and/or -funsigned-char.
568
5692022-08-08 Tom Honermann <tom@honermann.net>
570
571 * c-lex.cc (lex_string, lex_charconst): Use char8_t as the type
572 of CPP_UTF8CHAR and CPP_UTF8STRING when char8_t support is
573 enabled.
574 * c-opts.cc (c_common_post_options): Set flag_char8_t if
575 targeting C2x.
576
4a7274dd
GA
5772022-07-31 Lewis Hyatt <lhyatt@gmail.com>
578
579 PR c++/66290
580 * c-common.h: Rename global done_lexing to
581 override_libcpp_locations.
582 * c-common.cc (c_cpp_diagnostic): Likewise.
583 * c-opts.cc (c_common_finish): Set override_libcpp_locations
584 (formerly done_lexing) immediately prior to calling cpp_finish ().
585
1e2c5f4c
GA
5862022-07-27 Lewis Hyatt <lhyatt@gmail.com>
587
588 * c-ppoutput.cc (token_streamer::stream): Update input_location
589 prior to streaming each token.
590
0e6fa997
GA
5912022-07-23 Immad Mir <mirimmad@outlook.com>
592
593 * c-attribs.cc: (c_common_attribute_table): add three new attributes
594 namely: fd_arg, fd_arg_read and fd_arg_write.
595 (handle_fd_arg_attribute): New.
596
bdc7b765
GA
5972022-07-15 Marek Polacek <polacek@redhat.com>
598
599 PR c++/104477
600 * c-common.cc (c_common_reswords): Add
601 __reference_constructs_from_temporary and
602 __reference_converts_from_temporary.
603 * c-common.h (enum rid): Add RID_REF_CONSTRUCTS_FROM_TEMPORARY and
604 RID_REF_CONVERTS_FROM_TEMPORARY.
605
6062022-07-15 Jonathan Wakely <jwakely@redhat.com>
607
608 * c-format.cc (class range_label_for_format_type_mismatch):
609 Adjust to new label_text API.
610
c72d4714
GA
6112022-07-11 Lewis Hyatt <lhyatt@gmail.com>
612
613 PR preprocessor/106252
614 * c-pragma.cc (handle_pragma_diagnostic_impl): Don't look up the
615 option argument prior to verifying the option was found.
616
6345c414
GA
6172022-07-07 David Malcolm <dmalcolm@redhat.com>
618
619 * c-format.cc (range_label_for_format_type_mismatch::get_text):
620 Update for removal of label_text::maybe_free in favor of automatic
621 memory management.
622
4bc92c3b
GA
6232022-07-06 Lewis Hyatt <lhyatt@gmail.com>
624
625 PR preprocessor/53920
626 PR c++/53431
627 * c-common.cc (c_option_is_from_cpp_diagnostics): New function.
628 * c-common.h (c_option_is_from_cpp_diagnostics): Declare.
629 (c_pp_stream_token): Declare.
630 * c-ppoutput.cc (init_pp_output): Refactor logic about skipping
631 pragmas to...
632 (should_output_pragmas): ...here. New function.
633 (token_streamer::stream): Support handling early pragmas.
634 (do_line_change): Likewise.
635 (c_pp_stream_token): New function.
636 * c-pragma.cc (struct pragma_diagnostic_data): New helper class.
637 (pragma_diagnostic_lex_normal): New function. Moved logic for
638 interpreting GCC diagnostic pragmas here.
639 (pragma_diagnostic_lex_pp): New function for parsing diagnostic pragmas
640 directly from libcpp.
641 (handle_pragma_diagnostic): Refactor into helper function...
642 (handle_pragma_diagnostic_impl): ...here. New function.
643 (handle_pragma_diagnostic_early): New function.
644 (handle_pragma_diagnostic_early_pp): New function.
645 (struct pragma_ns_name): Renamed to...
646 (struct pragma_pp_data): ...this. Add new "early_handler" member.
647 (c_register_pragma_1): Support early pragmas in the preprocessor.
648 (c_register_pragma_with_early_handler): New function.
649 (c_register_pragma): Support the new early handlers in struct
650 internal_pragma_handler.
651 (c_register_pragma_with_data): Likewise.
652 (c_register_pragma_with_expansion): Likewise.
653 (c_register_pragma_with_expansion_and_data): Likewise.
654 (c_invoke_early_pragma_handler): New function.
655 (c_pp_invoke_early_pragma_handler): New function.
656 (init_pragma): Add early pragma support for diagnostic pragmas.
657 * c-pragma.h (struct internal_pragma_handler): Add new early handler
658 members.
659 (c_register_pragma_with_early_handler): Declare.
660 (c_invoke_early_pragma_handler): Declare.
661 (c_pp_invoke_early_pragma_handler): Declare.
662
d1f3a3ff
GA
6632022-07-05 Marek Polacek <polacek@redhat.com>
664
665 PR c++/105626
666 * c-format.cc (check_format_arg): Don't emit -Wformat warnings with
667 u8 strings.
668
ed974488
GA
6692022-07-01 Marek Polacek <polacek@redhat.com>
670
671 PR c++/106111
672 * c-common.h (enum rid): Update RID_LAST_CXX20.
673
976196b3
GA
6742022-06-30 Jonathan Wakely <jwakely@redhat.com>
675
676 * known-headers.cc (get_stdlib_header_for_name): Add <time.h>
677 names.
678
84c2131d
GA
6792022-06-24 Jason Merrill <jason@redhat.com>
680
681 PR c++/87729
682 PR c++/20423
683 * c.opt (Woverloaded-virtual): Add levels, include in -Wall.
684
4390e7bf
GA
6852022-06-18 Jakub Jelinek <jakub@redhat.com>
686
687 * c-ubsan.cc (ubsan_instrument_division, ubsan_instrument_shift):
688 Use flag_sanitize_trap & SANITIZE_??? instead of
689 flag_sanitize_undefined_trap_on_error. If 2 sanitizers are involved
690 and flag_sanitize_trap differs for them, emit __builtin_trap only
691 for the comparison where trap is requested.
692 (ubsan_instrument_vla, ubsan_instrument_return): Use
693 lag_sanitize_trap & SANITIZE_??? instead of
694 flag_sanitize_undefined_trap_on_error.
695
c3642271
GA
6962022-06-13 Jason Merrill <jason@redhat.com>
697
698 * c-ubsan.cc (ubsan_instrument_return): Use BUILTINS_LOCATION.
699
d9176e64
GA
7002022-05-27 Marek Polacek <polacek@redhat.com>
701
702 PR c/90658
703 * c-attribs.cc (get_priority): Check FUNCTION_DECL.
704
7052022-05-27 Jakub Jelinek <jakub@redhat.com>
706
707 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ENTER.
708
57f2ce6a
GA
7092022-05-20 David Malcolm <dmalcolm@redhat.com>
710
711 * c-format.cc: Replace uses of "FINAL" and "OVERRIDE" with "final"
712 and "override".
713 * c-pretty-print.h: Likewise.
714
1cda629f
GA
7152022-05-18 Marek Polacek <polacek@redhat.com>
716
717 PR c/105131
718 * c.opt (Wenum-int-mismatch): New.
719
7202022-05-18 Marek Polacek <polacek@redhat.com>
721
722 PR c++/105497
723 * c-warn.cc (c_do_switch_warnings): Don't warn about unhandled
724 enumerator when it was marked with attribute unused.
725
7262022-05-18 Eric Botcazou <ebotcazou@adacore.com>
727
728 * c-ada-spec.cc (dump_ada_node) <COMPLEX_TYPE>: Deal with usual
729 floating-point complex types.
730 <POINTER_TYPE>: Do not use limited_with clause if the designated
731 type is a scalar type.
732
3d9439b1
GA
7332022-05-17 Jakub Jelinek <jakub@redhat.com>
734
735 * c-omp.cc (c_finish_omp_depobj): Handle
736 OMP_CLAUSE_DEPEND_INOUTSET.
737
702bd11f
GA
7382022-05-16 Jason Merrill <jason@redhat.com>
739
740 PR c/105492
741 * c-attribs.cc (handle_mode_attribute): Don't fix broken typedefs
742 here.
743
7442022-05-16 Martin Liska <mliska@suse.cz>
745
746 * c-common.cc (ARRAY_SIZE): Use ARRAY_SIZE.
747 (c_common_nodes_and_builtins): Likewise.
748 * c-format.cc (check_tokens): Likewise.
749 (check_plain): Likewise.
750 * c-pragma.cc (c_pp_lookup_pragma): Likewise.
751 (init_pragma): Likewise.
752 * known-headers.cc (get_string_macro_hint): Likewise.
753 (get_stdlib_header_for_name): Likewise.
754 * c-attribs.cc: Likewise.
755
9df4ffe4
GA
7562022-05-13 Richard Biener <rguenther@suse.de>
757
758 * c-omp.cc: Remove gimple-fold.h include.
759
49ace834
GA
7602022-05-12 Jakub Jelinek <jakub@redhat.com>
761
762 * c-common.h (enum rid): Add RID_OMP_ALL_MEMORY.
763 * c-omp.cc (c_finish_omp_depobj): Don't build_fold_addr_expr
764 if null_pointer_node.
765
d0d513b5
GA
7662022-05-11 Martin Liska <mliska@suse.cz>
767
768 PR target/105355
769 * c-opts.cc (c_common_handle_option): Change option name.
770 * c.opt: Remove Joined and use Separate option.
771
bd022ff9
GA
7722022-05-09 Alex Coplan <alex.coplan@arm.com>
773
774 * c-common.h (get_dump_info): Delete.
775 * c-gimplify.cc (c_genericize): Get TDI_original dump file info
776 from the global dump_manager instead of the (now obsolete)
777 get_dump_info.
778 * c-opts.cc (original_dump_file): Delete.
779 (original_dump_flags): Delete.
780 (c_common_parse_file): Switch to using global dump_manager to
781 manage the original dump file; fix leak of dump file.
782 (get_dump_info): Delete.
783
a1947c92
GA
7842022-05-07 Marek Polacek <polacek@redhat.com>
785
786 PR c++/101833
787 PR c++/47634
788 * c-attribs.cc (positional_argument): Pass POS by reference. Deal
789 with FN being either a function declaration or function type. Use
790 maybe_adjust_arg_pos_for_attribute.
791 * c-common.cc (check_function_arguments): Maybe pass FNDECL down to
792 check_function_format.
793 * c-common.h (maybe_adjust_arg_pos_for_attribute): Declare.
794 (positional_argument): Adjust.
795 * c-format.cc (get_constant): Rename to ...
796 (validate_constant): ... this. Take EXPR by reference. Return bool
797 instead of tree.
798 (handle_format_arg_attribute): Don't overwrite FORMAT_NUM_EXPR by the
799 return value of validate_constant.
800 (decode_format_attr): Don't overwrite FORMAT_NUM_EXPR and
801 FIRST_ARG_NUM_EXPR by the return value of validate_constant.
802 (check_function_format): Adjust a parameter name.
803 (handle_format_attribute): Maybe pass FNDECL down to decode_format_attr.
804
3e7db517
GA
8052022-05-04 Marek Polacek <polacek@redhat.com>
806
807 * c-warn.cc (warnings_for_convert_and_check): Convert constants of type
808 char to int.
809
95874f95
GA
8102022-04-30 Jason Merrill <jason@redhat.com>
811
812 PR c/100545
813 * c-attribs.cc (handle_mode_attribute): Copy attributes, aligned,
814 and typedef.
815 * c-common.cc (set_underlying_type): Add assert.
816
01ad093b
GA
8172022-04-26 Patrick Palka <ppalka@redhat.com>
818
819 PR c++/105304
820 * c-common.cc (verify_tree) [restart]: Move up to before the
821 NULL test.
822
da066c42
GA
8232022-04-11 Jakub Jelinek <jakub@redhat.com>
824
825 PR c++/105186
826 * c-common.cc (c_common_nodes_and_builtins): After registering __int%d
827 and __int%d__ builtin types, initialize corresponding ridpointers
828 entry.
829
150ab50f
GA
8302022-03-30 Marek Polacek <polacek@redhat.com>
831
832 PR c++/101030
833 * c-warn.cc (conversion_warning) <case COND_EXPR>: Don't call
834 conversion_warning when OP1 is null.
835
8362022-03-30 Thomas Schwinge <thomas@codesourcery.com>
837
838 * c.opt (Wc++11-extensions, Wc++14-extensions, Wc++17-extensions)
839 (Wc++20-extensions, Wc++23-extensions): Remove 'LangEnabledBy'
840 option properties.
841
8422022-03-30 Thomas Schwinge <thomas@codesourcery.com>
843
844 * c.opt (Wuse-after-free): Remove.
845
8462022-03-30 Thomas Schwinge <thomas@codesourcery.com>
847
848 * c.opt (Warray-bounds): Remove.
849
d2906412
GA
8502022-03-26 Thomas Schwinge <thomas@codesourcery.com>
851
852 * c.opt: Properly quote comment.
853
31e989a2
GA
8542022-03-25 Eric Botcazou <ebotcazou@adacore.com>
855
856 * c-ada-spec.cc (dump_ada_import): Deal with the "section" attribute
857 (dump_ada_node) <POINTER_TYPE>: Do not modify and pass the name, but
858 the referenced type instead. Deal with the anonymous original type
859 of a typedef'ed type. In the actual access case, follow the chain
860 of external subtypes.
861 <TYPE_DECL>: Tidy up control flow.
862
d156bb87
GA
8632022-03-21 Qian Jianhua <qianjh@cn.fujitsu.com>
864
865 * c-ada-spec.cc: Change array length
866
d7f00da1
GA
8672022-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
868
869 * c-common.cc (c_family_tests): Call the new tests.
870 * c-common.h (c_diagnostic_tests): Declare.
871 (c_opt_problem_cc_tests): Likewise.
872
8732022-03-19 Jakub Jelinek <jakub@redhat.com>
874
875 PR c++/101515
876 * c-pretty-print.cc (c_fold_indirect_ref_for_warn): For C++ don't
877 return COMPONENT_REFs with FIELD_DECLs whose containing scope can't
878 be printed.
879
9fc8f278
GA
8802022-03-16 Christophe Lyon <christophe.lyon@arm.com>
881 Roger Sayle <roger@nextmovesoftware.com>
882
883 PR c/98198
884 * c-attribs.cc (decl_or_type_attrs): Add error_mark_node check.
885
8862022-03-16 Patrick Palka <ppalka@redhat.com>
887
888 PR c++/96780
889 * c.opt: Add -ffold-simple-inlines.
890
b9756c08
GA
8912022-03-13 Tobias Burnus <tobias@codesourcery.com>
892
893 * c-target.def (check_string_object_format_arg): Fix description typo.
894
57eeedda
GA
8952022-03-12 Thomas Schwinge <thomas@codesourcery.com>
896
897 PR other/65095
898 * c-common.h (c_omp_map_clause_name): Remove.
899 * c-omp.cc (c_omp_map_clause_name): Remove.
900
8cc4f9cd
GA
9012022-03-09 Jakub Jelinek <jakub@redhat.com>
902
903 PR c/104711
904 * c-opts.cc (c_common_post_options): Don't enable
905 -Wshift-negative-value from -Wextra for C++20 or later.
906 * c-ubsan.cc (ubsan_instrument_shift): Adjust comments.
907 * c-warn.cc (maybe_warn_shift_overflow): Use TYPE_OVERFLOW_WRAPS
908 instead of TYPE_UNSIGNED.
909
e6533e2e
GA
9102022-03-07 Jakub Jelinek <jakub@redhat.com>
911
912 * c-attribs.cc: Fix up duplicated word issue in a comment.
913
12d4552e
GA
9142022-03-01 Martin Liska <mliska@suse.cz>
915
916 PR ipa/104533
917 * c-attribs.cc (handle_target_clones_attribute): Use
918 get_target_clone_attr_len and report warning soon.
919
0bdb0498
GA
9202022-02-17 Jonathan Wakely <jwakely@redhat.com>
921
922 * c-pragma.cc (handle_pragma_pack): Remove parameter name.
923 (handle_pragma_weak): Likewise.
924 (handle_pragma_scalar_storage_order): Likewise.
925 (handle_pragma_redefine_extname): Likewise.
926 (handle_pragma_visibility): Likewise.
927 (handle_pragma_diagnostic): Likewise.
928 (handle_pragma_target): Likewise.
929 (handle_pragma_optimize): Likewise.
930 (handle_pragma_push_options): Likewise.
931 (handle_pragma_pop_options): Likewise.
932 (handle_pragma_reset_options): Likewise.
933 (handle_pragma_message): Likewise.
934 (handle_pragma_float_const_decimal64): Likewise.
935
cb3afcd2
GA
9362022-02-16 Jakub Jelinek <jakub@redhat.com>
937
938 PR c/104531
939 * c-omp.cc (c_finish_omp_atomic): For MIN_EXPR/MAX_EXPR, try first
940 build_binary_op with LT_EXPR and only if that doesn't return
941 error_mark_node call build_modify_expr.
942
9432022-02-16 Jakub Jelinek <jakub@redhat.com>
944
945 PR c/104510
946 * c-common.cc (shorten_compare): Convert original arguments to
947 the original *restype_ptr when mixing binary and decimal float.
948
1f8a09d2
GA
9492022-02-14 Richard Biener <rguenther@suse.de>
950
951 PR c/104505
952 * c-pretty-print.cc (c_pretty_printer::postfix_expression): Handle
953 internal function calls.
954
e8d68f0a
GA
9552022-02-11 Richard Biener <rguenther@suse.de>
956
957 * c-attribs.cc (c_common_attribute_table): Add entry for
958 vector_mask.
959 (handle_vector_mask_attribute): New.
960
a645583d
GA
9612022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
962
963 * c-omp.cc (c_omp_split_clauses): Added OMP_CLAUSE_HAS_DEVICE_ADDR case.
964 * c-pragma.h (enum pragma_kind): Added 5.1 in comment.
965 (enum pragma_omp_clause): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR.
966
3adf509f
GA
9672022-02-09 Jason Merrill <jason@redhat.com>
968
969 * c-cppbuiltin.cc (c_cpp_builtins): Update values
970 of __cpp_constexpr and __cpp_concepts for C++20.
971
bb99171b
GA
9722022-01-24 Marek Polacek <polacek@redhat.com>
973
974 PR preprocessor/104030
975 * c.opt (Wbidi-chars): Mark as EnumSet. Also accept =ucn.
976
9dd44357
GA
9772022-01-21 Jakub Jelinek <jakub@redhat.com>
978
979 PR c++/104148
980 * c-common.h (check_function_arguments_recurse): Add for_format
981 arg.
982 * c-common.cc (check_function_nonnull): Pass false to
983 check_function_arguments_recurse's last argument.
984 (check_function_arguments_recurse): Add for_format argument,
985 if true, don't stop on warning_suppressed_p.
986 * c-format.cc (check_format_info): Pass true to
987 check_function_arguments_recurse's last argument.
988
fe1ad141
GA
9892022-01-19 David Malcolm <dmalcolm@redhat.com>
990
991 * c-common.cc (c_common_c_tests): Rename to...
992 (c_common_cc_tests): ...this.
993 (c_family_tests): Update calls for .c to .cc renaming.
994 * c-common.h (c_format_c_tests): Rename to...
995 (c_format_cc_tests): ...this.
996 (c_indentation_c_tests): Rename to...
997 (c_indentation_cc_tests): ...this.
998 (c_pretty_print_c_tests): Rename to...
999 (c_pretty_print_cc_tests): ...this.
1000 * c-format.cc (c_format_c_tests): Rename to...
1001 (c_format_cc_tests): ...this.
1002 * c-indentation.cc (c_indentation_c_tests): Rename to...
1003 (c_indentation_cc_tests): ...this.
1004 * c-pretty-print.cc (c_pretty_print_c_tests): Rename to...
1005 (c_pretty_print_cc_tests): ...this.
1006
fc829782
GA
10072022-01-17 Martin Liska <mliska@suse.cz>
1008
1009 * c-ada-spec.cc: Rename .c names to .cc.
1010 * c-ada-spec.h: Likewise.
1011 * c-common.cc (c_build_vec_convert): Likewise.
1012 (warning_candidate_p): Likewise.
1013 * c-common.h (enum rid): Likewise.
1014 (build_real_imag_expr): Likewise.
1015 (finish_label_address_expr): Likewise.
1016 (c_get_substring_location): Likewise.
1017 (c_build_bind_expr): Likewise.
1018 (conflict_marker_get_final_tok_kind): Likewise.
1019 (c_parse_error): Likewise.
1020 (check_missing_format_attribute): Likewise.
1021 (invalid_array_size_error): Likewise.
1022 (warn_for_multistatement_macros): Likewise.
1023 (build_attr_access_from_parms): Likewise.
1024 * c-cppbuiltin.cc (c_cpp_builtins): Likewise.
1025 * c-format.cc: Likewise.
1026 * c-gimplify.cc (c_gimplify_expr): Likewise.
1027 * c-indentation.h: Likewise.
1028 * c-objc.h (objc_prop_attr_kind_for_rid): Likewise.
1029 * c-omp.cc (c_omp_predetermined_mapping): Likewise.
1030 * c-opts.cc (c_common_post_options): Likewise.
1031 (set_std_cxx23): Likewise.
1032 * c-pragma.cc (handle_pragma_redefine_extname): Likewise.
1033 * c-pretty-print.h: Likewise.
1034
10352022-01-17 Martin Liska <mliska@suse.cz>
1036
1037 * c-ada-spec.c: Moved to...
1038 * c-ada-spec.cc: ...here.
1039 * c-attribs.c: Moved to...
1040 * c-attribs.cc: ...here.
1041 * c-common.c: Moved to...
1042 * c-common.cc: ...here.
1043 * c-cppbuiltin.c: Moved to...
1044 * c-cppbuiltin.cc: ...here.
1045 * c-dump.c: Moved to...
1046 * c-dump.cc: ...here.
1047 * c-format.c: Moved to...
1048 * c-format.cc: ...here.
1049 * c-gimplify.c: Moved to...
1050 * c-gimplify.cc: ...here.
1051 * c-indentation.c: Moved to...
1052 * c-indentation.cc: ...here.
1053 * c-lex.c: Moved to...
1054 * c-lex.cc: ...here.
1055 * c-omp.c: Moved to...
1056 * c-omp.cc: ...here.
1057 * c-opts.c: Moved to...
1058 * c-opts.cc: ...here.
1059 * c-pch.c: Moved to...
1060 * c-pch.cc: ...here.
1061 * c-ppoutput.c: Moved to...
1062 * c-ppoutput.cc: ...here.
1063 * c-pragma.c: Moved to...
1064 * c-pragma.cc: ...here.
1065 * c-pretty-print.c: Moved to...
1066 * c-pretty-print.cc: ...here.
1067 * c-semantics.c: Moved to...
1068 * c-semantics.cc: ...here.
1069 * c-ubsan.c: Moved to...
1070 * c-ubsan.cc: ...here.
1071 * c-warn.c: Moved to...
1072 * c-warn.cc: ...here.
1073 * cppspec.c: Moved to...
1074 * cppspec.cc: ...here.
1075 * stub-objc.c: Moved to...
1076 * stub-objc.cc: ...here.
1077
9248ee41
GA
10782022-01-15 Martin Sebor <msebor@redhat.com>
1079
1080 PR c/63272
1081 * c.opt (-Wdangling-pointer): New option.
1082
10832022-01-15 Martin Sebor <msebor@redhat.com>
1084
1085 PR tree-optimization/80532
1086 * c.opt (-Wuse-after-free): New options.
1087
617db51d
GA
10882022-01-14 David Malcolm <dmalcolm@redhat.com>
1089
1090 * c-attribs.c (c_common_attribute_table): Add "tainted_args".
1091 (handle_tainted_args_attribute): New.
1092
ad3f0d08
GA
10932022-01-13 Anthony Sharp <anthonysharp15@gmail.com>
1094 Jason Merrill <jason@redhat.com>
1095
1096 PR c++/70417
1097 * c.opt: Added -Wmissing-template-keyword.
1098
10992022-01-13 Richard Biener <rguenther@suse.de>
1100
1101 PR c/104002
1102 * c-common.c (c_common_mark_addressable_vec): Handle TARGET_EXPR.
1103
02a8a01b
GA
11042022-01-12 Martin Liska <mliska@suse.cz>
1105
1106 PR target/103804
1107 * c-attribs.c (handle_optimize_attribute): Do not call
1108 cl_optimization_compare if we seen an error.
1109
01a254e3
GA
11102022-01-11 Jakub Jelinek <jakub@redhat.com>
1111
1112 PR c/101537
1113 PR c/103881
1114 * c-warn.c (conversion_warning): Handle BIT_AND_EXPR, BIT_IOR_EXPR
1115 and BIT_XOR_EXPR.
1116
d9450aa0
GA
11172022-01-10 Richard Biener <rguenther@suse.de>
1118
1119 PR middle-end/101530
1120 * c-common.c (c_build_shufflevector): Wrap the BIT_FIELD_REF
1121 in a TARGET_EXPR to force a temporary.
1122
11ce8d04
GA
11232022-01-06 Marek Polacek <polacek@redhat.com>
1124
1125 PR c++/103758
1126 * c-pragma.c (handle_pragma_scalar_storage_order): Use %< %> in
1127 diagnostic messages.
1128 (handle_pragma_diagnostic): Likewise.
1129
a4ae8c37
GA
11302022-01-03 Marek Polacek <polacek@redhat.com>
1131
1132 PR c++/103758
1133 * c-format.c (check_tokens): Accept "decl-specifier*".
1134
11352022-01-03 Jakub Jelinek <jakub@redhat.com>
1136
1137 PR c++/103600
1138 * c-attribs.c (handle_non_overlapping_attribute): New function.
1139 (c_common_attribute_table): Add "non overlapping" attribute.
1140
84790a9d
GA
11412021-12-30 Jakub Jelinek <jakub@redhat.com>
1142
1143 PR c++/103012
1144 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Perform
1145 cpp_define_unused/cpp_undef calls with forced token locations
1146 BUILTINS_LOCATION.
1147
d1e111da
GA
11482021-12-27 Patrick Palka <ppalka@redhat.com>
1149
1150 PR c++/103700
1151 * c-common.c (pointer_int_sum): When quiet, return
1152 error_mark_node for an incomplete pointed-to type and don't
1153 call size_in_bytes_loc.
1154
2554e2da
GA
11552021-12-17 Jason Merrill <jason@redhat.com>
1156
1157 PR c++/103681
1158 * c-opts.c (c_common_post_options): Update defaults.
1159
774269aa
GA
11602021-12-16 Martin Liska <mliska@suse.cz>
1161
1162 PR target/103709
1163 * c-pragma.c (handle_pragma_pop_options): Do not check
1164 global options modification when an error is seen in parsing
1165 of options (pragmas or attributes).
1166
c8dcf64b
GA
11672021-12-12 Jonathan Wakely <jwakely@redhat.com>
1168
1169 * known-headers.cc: Define INCLUDE_MEMORY instead of
1170 INCLUDE_UNIQUE_PTR.
1171 * name-hint.h: Likewise.
1172 (class name_hint): Use std::unique_ptr instead of gnu::unique_ptr.
1173
4b4839e3
GA
11742021-12-09 Jakub Jelinek <jakub@redhat.com>
1175
1176 PR pch/71934
1177 * c-pch.c (c_common_no_more_pch): Pass a temporary void * var
1178 with NULL value instead of NULL to host_hooks.gt_pch_use_address.
1179
03a9bd05
GA
11802021-12-03 Jakub Jelinek <jakub@redhat.com>
1181
1182 PR pch/71934
1183 * c-pch.c (struct c_pch_validity): Remove pch_init member.
1184 (pch_init): Don't initialize v.pch_init.
1185 (c_common_valid_pch): Don't warn and punt if .text addresses change.
1186
40fa651e
GA
11872021-12-01 Jason Merrill <jason@redhat.com>
1188
1189 PR c++/103310
1190 * c.opt: Add -fconstexpr-fp-except.
1191
87cd82c8
GA
11922021-11-29 Richard Biener <rguenther@suse.de>
1193
1194 * c-format.c (check_format_string): Remove spurious
1195 gcc_unreachable.
1196
11972021-11-29 Richard Biener <rguenther@suse.de>
1198
1199 * c-opts.c (c_common_post_options): Remove unreachable return.
1200 * c-pragma.c (handle_pragma_target): Likewise.
1201 (handle_pragma_optimize): Likewise.
1202
091ccc06
GA
12032021-11-25 Jakub Jelinek <jakub@redhat.com>
1204
1205 PR c++/102611
1206 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
1207 default for C++23 regardless of warn_deprecated.
1208 * c-cppbuiltin.c (c_cpp_builtins): Predefine
1209 __cpp_multidimensional_subscript=202110L for C++23.
1210
e1d43592
GA
12112021-11-23 Martin Sebor <msebor@redhat.com>
1212
1213 PR middle-end/88232
1214 * c.opt: Add -Winfinite-recursion.
1215
9c077398
GA
12162021-11-19 Martin Sebor <msebor@redhat.com>
1217
1218 PR c++/33925
1219 PR c/102867
1220 * c-common.c (decl_with_nonnull_addr_p): Call maybe_nonzero_address
1221 and improve handling tof defined symbols.
1222
12232021-11-19 Martin Liska <mliska@suse.cz>
1224
1225 Revert:
1226 2021-11-18 Martin Liska <mliska@suse.cz>
1227
1228 * c-gimplify.c (genericize_c_loop): Use option directly.
1229
483092d3
GA
12302021-11-18 Matthias Kretz <m.kretz@gsi.de>
1231
1232 * c-common.c (c_common_reswords): Add __builtin_assoc_barrier.
1233 * c-common.h (enum rid): Add RID_BUILTIN_ASSOC_BARRIER.
1234
12352021-11-18 Martin Liska <mliska@suse.cz>
1236
1237 * c-gimplify.c (genericize_c_loop): Use option directly.
1238
280d2838
GA
12392021-11-17 Martin Uecker <uecker@gcc.gnu.org>
1240
1241 PR c/91038
1242 PR c/29970
1243 * c-common.c (pointer_int_sum): Make sure pointer expressions
1244 are evaluated first when the size expression depends on for
1245 variably-modified types.
1246
12472021-11-17 Marek Polacek <polacek@redhat.com>
1248
1249 PR preprocessor/103026
1250 * c.opt (Wbidi-chars, Wbidi-chars=): New option.
1251
6b1695f4
GA
12522021-11-16 Jason Merrill <jason@redhat.com>
1253
1254 * c-common.c (release_tree_vector): Only cache vecs smaller than
1255 16 elements.
1256
e2b57363
GA
12572021-11-15 Jason Merrill <jason@redhat.com>
1258
1259 * c.opt: Add -fimplicit-constexpr.
1260 * c-cppbuiltin.c: Define __cpp_implicit_constexpr.
1261 * c-opts.c (c_common_post_options): Disable below C++14.
1262
12632021-11-15 Jakub Jelinek <jakub@redhat.com>
1264
1265 * c-omp.c (c_omp_split_clauses) <case OMP_CLAUSE_THREAD_LIMIT>:
1266 Duplicate to both OMP_TARGET and OMP_TEAMS.
1267
8d36a0d2
GA
12682021-11-10 Marek Polacek <polacek@redhat.com>
1269
1270 PR c++/101940
1271 * c-pragma.c (handle_pragma_diagnostic): Handle #pragma GCC diagnostic
1272 ignored_attributes.
1273
c9b1334e
GA
12742021-11-09 David Malcolm <dmalcolm@redhat.com>
1275
1276 * c-pragma.c (GCC_BAD_AT): New macro.
1277 (GCC_BAD2_AT): New macro.
1278 (handle_pragma_pack): Use the location of the pertinent token when
1279 issuing diagnostics about invalid constants/actions, and trailing
1280 junk.
1281 (handle_pragma_target): Likewise for non-string "GCC option".
1282 (handle_pragma_message): Likewise for trailing junk.
1283
18ae471f
GA
12842021-11-03 Joseph Myers <joseph@codesourcery.com>
1285
1286 PR c/103031
1287 * c-common.c (convert_and_check): Add argument init_const. Call
1288 convert_init if init_const.
1289 * c-common.h (convert_and_check): Update prototype.
1290 (convert_init): New prototype.
1291
cf82e8d9
GA
12922021-11-01 David Malcolm <dmalcolm@redhat.com>
1293
1294 * c-lex.c (c_lex_with_flags): When complaining about non-printable
1295 CPP_OTHER tokens, set the "escape on output" flag.
1296
04a2cf3f
GA
12972021-10-27 Jakub Jelinek <jakub@redhat.com>
1298
1299 * c-omp.c (c_omp_check_loop_iv_r): Don't clear 3rd bit for
1300 POINTER_PLUS_EXPR.
1301 (c_omp_check_nonrect_loop_iv): Handle POINTER_PLUS_EXPR.
1302 (c_omp_check_loop_iv): Set kind even if the iterator is non-integral.
1303
13042021-10-27 Jakub Jelinek <jakub@redhat.com>
1305
1306 PR c++/102854
1307 * c-common.h (c_omp_check_loop_iv_exprs): Add enum tree_code argument.
1308 * c-omp.c (c_omp_check_loop_iv_r): For trees other than decls,
1309 TREE_VEC, PLUS_EXPR, MINUS_EXPR, MULT_EXPR, POINTER_PLUS_EXPR or
1310 conversions temporarily clear the 3rd bit from d->kind while walking
1311 subtrees.
1312 (c_omp_check_loop_iv_exprs): Add CODE argument. Or in 4 into data.kind
1313 if possibly non-rectangular.
1314
ae5c5406
GA
13152021-10-21 Jakub Jelinek <jakub@redhat.com>
1316
1317 PR middle-end/64888
1318 * c-omp.c (c_omp_predefined_variable): Return true also for
1319 ubsan_create_data created artificial variables.
1320
5d5885c9
GA
13212021-10-14 Joseph Myers <joseph@codesourcery.com>
1322
1323 * c-format.c (printf_length_specs, scanf_length_specs)
1324 (print_char_table, scan_char_table): Support DFP formats for C2X.
1325 * c-format.h (TEX_D32, TEX_D64, TEX_D128): Remove.
1326 (T2X_D32, T2X_D64, T2X_D128): New macros.
1327
13282021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
1329
1330 * c-omp.c (c_omp_check_context_selector): Rename to
1331 omp_check_context_selector and move to omp-general.c.
1332 (c_omp_mark_declare_variant): Rename to omp_mark_declare_variant and
1333 move to omp-general.c.
1334
52055987
GA
13352021-10-12 Joseph Myers <joseph@codesourcery.com>
1336
1337 * c-format.c (print_char_table): Add %b and %B formats.
1338 (scan_char_table): Add %b format.
1339 * c-format.h (T2X_UI, T2X_UL, T2X_ULL, T2X_US, T2X_UC, T2X_ST)
1340 (T2X_UPD, T2X_UIM): New macros.
1341
13422021-10-12 Jakub Jelinek <jakub@redhat.com>
1343
1344 * c-omp.c (c_finish_omp_atomic): Use
1345 clear_padding_type_may_have_padding_p.
1346
ce6eec39
GA
13472021-10-08 Martin Liska <mliska@suse.cz>
1348
1349 * c-opts.c (c_common_post_options): Use new macro
1350 OPTION_SET_P.
1351
50e20ee6
GA
13522021-10-07 Martin Liska <mliska@suse.cz>
1353
1354 * c-common.c (parse_optimize_options): Make
1355 save_opt_decoded_options a pointer type.
1356
57c7ec62
GA
13572021-10-06 Jakub Jelinek <jakub@redhat.com>
1358
1359 PR tree-optimization/102571
1360 * c-omp.c (c_finish_omp_atomic): Optimize the case where type has
1361 padding, but the non-padding bits are contiguous set of bytes
1362 by adjusting the memcmp call arguments instead of emitting
1363 __builtin_clear_padding and then comparing all the type's bytes.
1364
13652021-10-06 Jakub Jelinek <jakub@redhat.com>
1366
1367 PR c++/102612
1368 * c-cppbuiltin.c (c_cpp_builtins): For -std=c++23 predefine
1369 __cpp_constexpr to 202110L rather than 201907L.
1370
da9c5f78
GA
13712021-10-04 Marek Polacek <polacek@redhat.com>
1372
1373 PR c++/97573
1374 * c-common.h (do_warn_array_compare): Declare.
1375 * c-warn.c (do_warn_array_compare): New.
1376 * c.opt (Warray-compare): New option.
1377
e3e07b89
GA
13782021-10-02 Iain Sandoe <iain@sandoe.co.uk>
1379
1380 * c-format.c: Remove a test of TARGET_FORMAT_TYPES with
1381 NULL, this is not needed.
1382
9d116bcc
GA
13832021-10-01 Martin Sebor <msebor@redhat.com>
1384
1385 PR c/102103
1386 * c-common.c (decl_with_nonnull_addr_p): Handle members.
1387 Check and perform warning suppression.
1388 (c_common_truthvalue_conversion): Enhance warning suppression.
1389
13902021-10-01 Martin Liska <mliska@suse.cz>
1391
1392 PR target/102552
1393 * c-common.c (parse_optimize_options): decoded_options[0] is
3d3b561f
ML
1394 used for program name, so merged_decoded_options should also
1395 respect that.
9d116bcc
GA
1396
13972021-10-01 Jakub Jelinek <jakub@redhat.com>
1398 Richard Biener <rguenther@suse.de>
1399
1400 PR sanitizer/102515
1401 * c-ubsan.c (ubsan_instrument_division): Check the right
1402 flag_sanitize_recover bit, depending on which sanitization
1403 is done. Sanitize INT_MIN / -1 under SANITIZE_SI_OVERFLOW
1404 rather than SANITIZE_DIVIDE. If both SANITIZE_SI_OVERFLOW
1405 and SANITIZE_DIVIDE is enabled, neither check is known
1406 to be false and flag_sanitize_recover bits for those two
1407 aren't the same, emit both __ubsan_handle_divrem_overflow
1408 and __ubsan_handle_divrem_overflow_abort calls.
1409
14102021-10-01 Martin Liska <mliska@suse.cz>
1411
1412 * c-common.c (parse_optimize_options): Combine optimize
1413 options with what was provided on the command line.
1414
14152021-10-01 Jakub Jelinek <jakub@redhat.com>
1416
1417 * c-omp.c (c_omp_split_clauses): Also copy
1418 OMP_CLAUSE_ORDER_REPRODUCIBLE.
1419
cf966403
GA
14202021-09-27 Martin Liska <mliska@suse.cz>
1421
1422 * c-opts.c (c_common_init_options_struct): Set also
3d3b561f 1423 x_flag_default_complex_method.
cf966403 1424
e4777439
GA
14252021-09-22 Jakub Jelinek <jakub@redhat.com>
1426
1427 * c-omp.c (c_omp_split_clauses): Copy over OMP_CLAUSE_ALLOCATE_ALIGN.
1428
62498024
GA
14292021-09-20 Matthias Kretz <m.kretz@gsi.de>
1430
1431 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define or
1432 undefine __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
1433 __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
1434 __ROUNDING_MATH__ according to the new optimization flags.
1435
cf74e7b5
GA
14362021-09-18 Jakub Jelinek <jakub@redhat.com>
1437
1438 * c-omp.c (c_omp_split_clauses): Split order clause also to
1439 distribute construct. Copy over OMP_CLAUSE_ORDER_UNCONSTRAINED.
1440
0a4cb439
GA
14412021-09-17 Jakub Jelinek <jakub@redhat.com>
1442
1443 * c-omp.c (c_finish_omp_atomic): Avoid creating
1444 TARGET_EXPR if test is true, use create_tmp_var_raw instead of
1445 create_tmp_var and add a zero initializer to TARGET_EXPRs that
1446 had NULL initializer. When omitting operands after v = x,
1447 use type of v rather than type of x. Fix type of vtmp
1448 TARGET_EXPR.
1449
07985c47
GA
14502021-09-13 Jason Merrill <jason@redhat.com>
1451
1452 * c.opt: Add -Winterference-size.
1453 * c-cppbuiltin.c (cpp_atomic_builtins): Add __GCC_DESTRUCTIVE_SIZE
1454 and __GCC_CONSTRUCTIVE_SIZE.
1455
a26206ec
GA
14562021-09-10 Jakub Jelinek <jakub@redhat.com>
1457
1458 * c-common.h (c_finish_omp_atomic): Add r and weak arguments.
1459 * c-omp.c: Include gimple-fold.h.
1460 (c_finish_omp_atomic): Add r and weak arguments. Add support for
1461 OpenMP 5.1 atomics.
1462
f84e2f0b
GA
14632021-09-09 qing zhao <qing.zhao@oracle.com>
1464
1465 * c-attribs.c (handle_uninitialized_attribute): New function.
1466 (c_common_attribute_table): Add "uninitialized" attribute.
1467
b6db7cd4
GA
14682021-09-08 liuhongt <hongtao.liu@intel.com>
1469
1470 * c-common.c (excess_precision_mode_join): Update below comments.
1471 (c_ts18661_flt_eval_method): Set excess_precision_type to
1472 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1473 * c-cppbuiltin.c (cpp_atomic_builtins): Update below comments.
1474 (c_cpp_flt_eval_method_iec_559): Set excess_precision_type to
1475 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1476
b2748138
GA
14772021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
1478
1479 * c-omp.c (c_finish_omp_flush): Handle MEMMODEL_SEQ_CST.
1480
7b739540
GA
14812021-09-03 Eric Botcazou <ebotcazou@adacore.com>
1482
1483 * c-ada-spec.c (dump_ads): Generate pragmas to disable style checks
1484 and -gnatwu warning for the package specification.
1485
e11c6046
GA
14862021-09-01 Iain Sandoe <iain@sandoe.co.uk>
1487
1488 * c-attribs.c (handle_unavailable_attribute): New.
1489
1e2f030b
GA
14902021-08-30 Jason Merrill <jason@redhat.com>
1491
1492 * c.opt: Add -Wmissing-requires.
1493
85d77ac4
GA
14942021-08-25 Lewis Hyatt <lhyatt@gmail.com>
1495
1496 PR other/93067
1497 * c-opts.c (c_common_input_charset_cb): New function.
1498 (c_common_post_options): Call new function
1499 diagnostic_initialize_input_context().
1500
7c9e1645
GA
15012021-08-20 Tobias Burnus <tobias@codesourcery.com>
1502
1503 * c-format.c (gcc_gfc_length_specs): Add 'll' and 'w'.
1504 (gcc_gfc_char_table): Add T9L_LL and T9L_ULL to
1505 "di" and "u", respecitively; fill with BADLEN to match
1506 size of 'types'.
1507 (get_init_dynamic_hwi): Split off from ...
1508 (init_dynamic_diag_info): ... here. Call it.
1509 (init_dynamic_gfc_info): Call it.
1510
15112021-08-20 Jakub Jelinek <jakub@redhat.com>
1512
1513 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ERROR.
1514 * c-pragma.c (omp_pragmas): Add error directive.
1515 * c-omp.c (omp_directives): Uncomment error directive entry.
1516
6e529985
GA
15172021-08-18 Jakub Jelinek <jakub@redhat.com>
1518
1519 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_NOTHING.
1520 * c-pragma.c (omp_pragmas): Add nothing directive.
1521 * c-omp.c (omp_directives): Uncomment nothing directive entry.
1522
2d14d64b
GA
15232021-08-17 Jakub Jelinek <jakub@redhat.com>
1524
1525 PR c++/101539
1526 * c-common.h (enum rid): Add RID_IS_LAYOUT_COMPATIBLE.
1527 * c-common.c (c_common_reswords): Add __is_layout_compatible.
1528
15292021-08-17 Matt Jacobson <mhjacobson@me.com>
1530
1531 * c-opts.c (c_common_post_options): Default to
1532 flag_objc_sjlj_exceptions = 1 only when flag_objc_abi < 2.
1533
15342021-08-17 Jakub Jelinek <jakub@redhat.com>
1535
1536 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCOPE.
1537 * c-pragma.c (omp_pragmas): Add scope construct.
1538 * c-omp.c (omp_directives): Uncomment scope directive entry.
1539
9d1d9fc8
GA
15402021-08-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
1541
1542 * c-cppbuiltin.c (c_cpp_builtins): Define
1543 __LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
1544
72be20e2
GA
15452021-08-12 Jakub Jelinek <jakub@redhat.com>
1546
1547 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_MASKED.
1548 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FILTER.
1549 * c-pragma.c (omp_pragmas_simd): Add masked construct.
1550 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_MASKED
1551 enumerator.
1552 (c_finish_omp_masked): Declare.
1553 * c-omp.c (c_finish_omp_masked): New function.
1554 (c_omp_split_clauses): Handle combined masked constructs.
1555
4d17ca1b
GA
15562021-07-30 Jakub Jelinek <jakub@redhat.com>
1557
1558 PR c++/101539
1559 * c-common.h (enum rid): Add RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
1560 * c-common.c (c_common_reswords): Add
1561 __is_pointer_interconvertible_base_of.
1562
15632021-07-29 Richard Biener <rguenther@suse.de>
1564
1565 PR c/101512
1566 * c-common.c (c_common_mark_addressable_vec): Look through
1567 C_MAYBE_CONST_EXPR even if not at the toplevel.
1568
af3f12e6
GA
15692021-07-27 Martin Sebor <msebor@redhat.com>
1570
1571 PR c/101585
1572 * c-warn.c (warn_parm_ptrarray_mismatch): Use OEP_DECL_NAME.
1573
ead235f6
GA
15742021-07-23 Jakub Jelinek <jakub@redhat.com>
1575
1576 * c-lex.c (c_common_has_attribute): Call canonicalize_attr_name also
1577 on attr_id. Return 1 for omp::directive or omp::sequence in C++11
1578 and later.
1579
15802021-07-23 Jakub Jelinek <jakub@redhat.com>
1581
1582 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP__START_ and
1583 PRAGMA_OMP__LAST_ enumerators.
1584
419c6c68
GA
15852021-07-21 Thomas Schwinge <thomas@codesourcery.com>
1586 Joseph Myers <joseph@codesourcery.com>
1587 Cesar Philippidis <cesar@codesourcery.com>
1588
1589 * c-pragma.h (pragma_omp_clause): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
1590
92d45509
GA
15912021-07-20 Martin Sebor <msebor@redhat.com>
1592
1593 * c-common.c (c_build_shufflevector): Adjust by-value argument to
1594 by-const-reference.
1595 * c-common.h (c_build_shufflevector): Same.
1596
87277b6a
GA
15972021-07-16 Andrew Pinski <apinski@marvell.com>
1598
1599 PR c/101453
1600 * c-common.c (parse_optimize_options): Use the correct
1601 size for buffer.
1602
d97d71a1
GA
16032021-07-15 Martin Sebor <msebor@redhat.com>
1604
1605 PR c/101289
1606 PR c/97548
1607 * c-warn.c (warn_parm_array_mismatch): Use OEP_DECL_NAME.
1608
c4fee1c6
GA
16092021-07-14 Jason Merrill <jason@redhat.com>
1610
1611 * c-opts.c (c_common_post_options): Set -fdelete-dead-exceptions.
1612
6fba0eea
GA
16132021-07-06 Martin Sebor <msebor@redhat.com>
1614
1615 * c-format.c (gcc_tdiag_char_table): Remove support for %G and %K.
3d3b561f
ML
1616 (gcc_cdiag_char_table): Same.
1617 (gcc_cxxdiag_char_table): Same.
6fba0eea 1618
7a60a6e8
GA
16192021-07-02 Jakub Jelinek <jakub@redhat.com>
1620
1621 * c-common.h (enum c_omp_directive_kind): New enum.
1622 (struct c_omp_directive): New type.
1623 (c_omp_categorize_directive): Declare.
1624 * c-omp.c (omp_directives): New variable.
1625 (c_omp_categorize_directive): New function.
1626
bea7c16a
GA
16272021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1628
1629 * c-ada-spec.c (packed_layout): New global variable.
1630 (dump_ada_declaration): Set it upon seeing a packed record type.
1631 Do not put the "aliased" keyword if it is set.
1632 (dump_ada_structure): Add Pack aspect if it is set and clear it.
1633
16342021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1635
1636 * c-ada-spec.c (check_name): Rename into...
1637 (check_type_name_conflict): ...this. Minor tweak.
1638 (dump_ada_function_declaration): Adjust to above renaming.
1639 (dump_ada_array_domains): Fix oversight.
1640 (dump_ada_declaration): Call check_type_name_conflict for variables.
1641
90708f87
GA
16422021-06-25 Martin Sebor <msebor@redhat.com>
1643
1644 * c-common.c (c_wrap_maybe_const): Remove TREE_NO_WARNING.
1645 (c_common_truthvalue_conversion): Replace direct uses of
1646 TREE_NO_WARNING with warning_suppressed_p, suppress_warning, and
1647 copy_no_warning.
1648 (check_function_arguments_recurse): Same.
1649 * c-gimplify.c (c_gimplify_expr): Same.
1650 * c-warn.c (overflow_warning): Same.
1651 (warn_logical_operator): Same.
1652 (warn_if_unused_value): Same.
1653 (do_warn_unused_parameter): Same.
1654
9aa8327e
GA
16552021-06-24 Jakub Jelinek <jakub@redhat.com>
1656
1657 * c-common.h (enum c_omp_region_type): Add C_ORT_TARGET and
1658 C_ORT_OMP_TARGET.
1659 * c-omp.c (c_omp_split_clauses): For OMP_CLAUSE_IN_REDUCTION on
1660 combined target constructs also add map (always, tofrom:) clause.
1661
ede6c356
GA
16622021-06-15 Robin Dapp <rdapp@linux.ibm.com>
1663
1664 * c-attribs.c (common_handle_aligned_attribute): Remove short
1665 circuit and dead code.
1666
8dc48181
GA
16672021-06-14 Jonathan Wakely <jwakely@redhat.com>
1668
1669 PR c++/101052
1670 * known-headers.cc (get_stdlib_header_for_name): Add known
1671 headers for EXIT_FAILURE, EXIT_SUCCESS, abort, atexit, calloc,
1672 exit, and getenv.
1673
8b8c3912
GA
16742021-06-12 Jason Merrill <jason@redhat.com>
1675
1676 * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL.
1677
f16f65f8
GA
16782021-06-11 Jakub Jelinek <jakub@redhat.com>
1679
1680 PR c++/100974
1681 * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_if_consteval for
1682 -std=c++2b for P1938R3 consteval if support.
1683
4f625f47
GA
16842021-06-09 Jason Merrill <jason@redhat.com>
1685
1686 PR c++/100879
1687 * c-warn.c (warn_for_sign_compare): Remove C++ enum mismatch
1688 warning.
1689
438aac59
GA
16902021-06-07 Martin Liska <mliska@suse.cz>
1691
1692 * c-target.def: Split long lines and replace them
1693 with '\n\'.
1694
600f90cb
GA
16952021-06-04 Martin Sebor <msebor@redhat.com>
1696
1697 PR c/100783
1698 * c-attribs.c (positional_argument): Bail on erroneous types.
1699
17002021-06-04 Martin Sebor <msebor@redhat.com>
1701
1702 * c-warn.c (warn_parm_array_mismatch): Check TREE_PURPOSE to test
1703 for element presence.
1704
440c8a0a
GA
17052021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1706
1707 * c-ada-spec.c (dump_ada_macros): Minor tweaks.
1708 (dump_ada_decl_name): Likewise.
1709 (dump_anonymous_type_name): Remove parent parameter and adjust.
1710 (dump_sloc): Minor tweak.
1711 (dump_ada_array_type): Remove type parameter and adjust.
1712 (dump_ada_enum_type): Remove parent parameter and adjust.
1713 (dump_ada_node): Adjust calls to above functions.
1714 (dumped_anonymous_types): New global variable.
1715 (dump_nested_types_1): Rename into...
1716 (dump_nested_types): ...this.
1717 (dump_nested_type): Remove parent and dumped_types parameters.
1718 <ARRAY_TYPE>: Replace dumped_types with dumped_anonymous_types.
1719 Adjust calls to dump_anonymous_type_name and dump_ada_array_type.
1720 (dump_ada_specs): Initialize and free dumped_anonymous_types.
1721
17222021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1723
1724 * c-ada-spec.c (pp_ada_tree_identifier): Tidy up.
1725 (dump_ada_node) <POINTER_TYPE>: Deal specially with external subtypes.
1726
17272021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1728
1729 * c-ada-spec.c (dump_ada_enum_type): Dump a prefix for constants.
1730 (htable_t): New typedef.
1731 (overloaded_names): Use it.
1732 (add_name): New function.
1733 (init_overloaded_names): Use add_name to populate the table and add
1734 special cases for sigaction and stat.
1735 (overloaded_name_p): Rename into...
1736 (overloading_index): ...this. Do not initialize overloaded_names table
1737 here. Return the index or zero.
1738 (dump_ada_declaration): Minor tweaks. Do not skip overloaded functions
1739 but add an overloading suffix instead.
1740 (dump_ada_specs): Initialize overloaded_names tables here.
1741
b75978d1
GA
17422021-06-01 Martin Liska <mliska@suse.cz>
1743
1744 PR other/100759
1745 * c-attribs.c (handle_optimize_attribute): Limit sanity check
1746 to a situation where we are not in processing of an optimize
1747 pragma.
1748 * c-pragma.c (handle_pragma_pop_options): Restore target
1749 options.
1750
ee682192
GA
17512021-05-31 Indu Bhagat <indu.bhagat@oracle.com>
1752
1753 PR testsuite/100749
1754 * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names.
1755
17562021-05-31 Richard Biener <rguenther@suse.de>
1757
1758 PR c++/88601
1759 * c-common.c: Include tree-vector-builder.h and
1760 vec-perm-indices.h.
1761 (c_common_reswords): Add __builtin_shufflevector.
1762 (c_build_shufflevector): New funtion.
1763 * c-common.h (enum rid): Add RID_BUILTIN_SHUFFLEVECTOR.
1764 (c_build_shufflevector): Declare.
1765
48166757
GA
17662021-05-28 Jakub Jelinek <jakub@redhat.com>
1767
1768 PR middle-end/99928
1769 * c-omp.c (c_omp_split_clauses): For reduction clause if combined with
1770 target add a map tofrom clause with OMP_CLAUSE_MAP_IMPLICIT.
1771
17722021-05-28 Tobias Burnus <tobias@codesourcery.com>
1773
1774 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_AFFINITY.
1775
2bc6dace
GA
17762021-05-25 Martin Liska <mliska@suse.cz>
1777
1778 PR tree-optimization/92860
1779 PR target/99592
1780 * c-attribs.c (handle_optimize_attribute): Save target node
1781 before calling parse_optimize_options and save it in case
1782 it changes.
1783 * c-pragma.c (handle_pragma_target): Similarly for pragma.
1784 (handle_pragma_pop_options): Likewise here.
1785
17862021-05-25 Martin Liska <mliska@suse.cz>
1787
1788 * c-attribs.c (handle_no_sanitize_coverage_attribute): New.
1789
17902021-05-25 Jakub Jelinek <jakub@redhat.com>
1791
1792 PR middle-end/99928
1793 * c-omp.c (c_omp_split_clauses): Copy reduction to teams when teams is
1794 combined with simd and not with taskloop or for.
1795
2832d51b
GA
17962021-05-21 Jakub Jelinek <jakub@redhat.com>
1797
1798 PR middle-end/99928
1799 * c-omp.c (c_omp_split_clauses): Set OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
1800 on firstprivate clause copy going to target construct, and for
1801 target simd set also OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET bit.
1802
ea34e2ed
GA
18032021-05-20 Jonathan Wakely <jwakely@redhat.com>
1804
1805 * c.opt (Wc++11-extensions, Wc++14-extensions)
1806 (Wc++17-extensions, Wc++20-extensions, Wc++23-extensions): New
1807 options.
1808
18092021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1810
1811 * c-lex.c (init_c_lex): Use dwarf_debuginfo_p.
1812
18132021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1814
1815 * c-opts.c (c_common_post_options): Adjust access to debug_type_names.
1816 * c-pch.c (struct c_pch_validity): Use type uint32_t.
1817 (pch_init): Renamed member.
1818 (c_common_valid_pch): Adjust access to debug_type_names.
1819
65f32e5d
GA
18202021-05-19 Martin Sebor <msebor@redhat.com>
1821
1822 PR c/100619
1823 * c-attribs.c (build_attr_access_from_parms): Handle arbitrarily many
1824 bounds.
1825
a8daf9a1
GA
18262021-05-18 Richard Biener <rguenther@suse.de>
1827
1828 PR c/100547
1829 * c-attribs.c (type_valid_for_vector_size): Reject too large nunits.
1830 Reword existing nunit diagnostic.
1831
a7ffc1ef
GA
18322021-05-17 Joern Rennecke <joern.rennecke@embecosm.com>
1833
1834 * c-common.c (braced_list_to_string): Return CTOR unchanged
1835 if host and target character sizes don't match.
1836
87a7d10c
GA
18372021-05-14 Martin Liska <mliska@suse.cz>
1838
1839 * c.opt: Add Warning keyword for 2 options.
1840
f9af11c7
GA
18412021-05-13 Martin Liska <mliska@suse.cz>
1842
1843 PR middle-end/100504
1844 * c-attribs.c (handle_target_clones_attribute): Expect a string
1845 argument to target_clone argument.
1846
037e3661
GA
18472021-05-11 Joseph Myers <joseph@codesourcery.com>
1848
1849 * c-lex.c (interpret_float): Handle digit separators for C2X.
1850
aa891c56
GA
18512021-05-10 Martin Liska <mliska@suse.cz>
1852
1853 * c-ada-spec.c (print_destructor): Use startswith
1854 function instead of strncmp.
1855 (dump_ada_declaration): Likewise.
1856 * c-common.c (disable_builtin_function): Likewise.
1857 (def_builtin_1): Likewise.
1858 * c-format.c (check_tokens): Likewise.
1859 (check_plain): Likewise.
1860 (convert_format_name_to_system_name): Likewise.
1861
e4ff4ffb
GA
18622021-04-28 Patrick McGehearty <patrick.mcgehearty@oracle.com>
1863
1864 * c-cppbuiltin.c (c_cpp_builtins): Add supporting macros for new
1865 complex divide
1866
c0fa3f2f
GA
18672021-04-26 Thomas Schwinge <thomas@codesourcery.com>
1868 Nathan Sidwell <nathan@codesourcery.com>
1869 Tom de Vries <vries@codesourcery.com>
1870 Julian Brown <julian@codesourcery.com>
1871 Kwok Cheung Yeung <kcy@codesourcery.com>
1872
1873 * c.opt (Wopenacc-parallelism): New.
1874
6e81e015
GA
18752021-04-19 Thomas Schwinge <thomas@codesourcery.com>
1876
1877 * c.opt (fopenacc-kernels=): Remove.
1878
019a9220
GA
18792021-04-08 Jakub Jelinek <jakub@redhat.com>
1880
1881 * c-warn.c (do_warn_double_promotion): Fix comment typo,
1882 occured -> occurred.
1883 (check_alignment_of_packed_member): Fix a comment typo,
1884 memeber -> member.
1885 (warn_parm_ptrarray_mismatch): Fix comment typos, os -> of
1886 and onless -> unless.
1887 (warn_parm_array_mismatch): Fix comment typos, declaratation
1888 -> declaration and woud -> would. Fix up comment indentation.
1889
18902021-04-08 Martin Sebor <msebor@redhat.com>
1891
1892 PR middle-end/99883
1893 * c.opt (Wmismatched-new-delete): Correct spelling.
1894
b1da9916
GA
18952021-04-05 Eric Botcazou <ebotcazou@adacore.com>
1896
1897 * c-ada-spec.c (is_simple_enum): Minor tweaks.
1898 (dump_ada_enum_type): Add TYPE and PARENT parameters. For non-simple
1899 enumeral types use again the type name for the enumeration constants.
1900 (dump_ada_node): Adjust call to dump_ada_enum_type.
1901 (dump_nested_type): Likewise.
1902
f1607029
GA
19032021-04-01 Jason Merrill <jason@redhat.com>
1904
1905 PR c++/98481
1906 * c-opts.c (c_common_post_options): Bump latest_abi_version.
1907
4493b1c1
GA
19082021-03-25 Jakub Jelinek <jakub@redhat.com>
1909
1910 PR c++/99565
1911 * c-warn.c (do_warn_duplicated_branches): Pass also
1912 OEP_ADDRESS_OF_SAME_FIELD to operand_equal_p.
1913
6af7b307
GA
19142021-03-20 Jakub Jelinek <jakub@redhat.com>
1915
1916 PR debug/99230
1917 * c-gimplify.c (c_genericize_control_stmt): Handle STATEMENT_LIST.
1918
ceae9533
GA
19192021-03-05 Eric Botcazou <ebotcazou@adacore.com>
1920
1921 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types
1922 after entering the separate class package, if any.
1923
67f10d28
GA
19242021-03-04 Richard Biener <rguenther@suse.de>
1925
1926 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
1927 Handle ERROR_MARK.
1928
19292021-03-04 Jakub Jelinek <jakub@redhat.com>
1930
1931 PR c/99325
1932 * c-ppoutput.c (print): Change src_line type from int to unsigned.
1933 (token_streamer::stream) Likewise.
1934 (maybe_print_line_1): Likewise. Don't strcmp src_file if src_loc is
1935 UNKNOWN_LOCATION.
1936
f3641ac7
GA
19372021-03-03 Jakub Jelinek <jakub@redhat.com>
1938
1939 PR c/99324
1940 * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
1941 instead of mark_addressable. Fix a comment typo -
1942 neutrallly -> neutrally.
1943
2c83c3fb
GA
19442021-02-28 Jakub Jelinek <jakub@redhat.com>
1945
1946 PR c/99304
1947 * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
1948 message - refernced -> referenced. Remove superfluous space before
1949 closing paren of function calls.
1950
daa68844
GA
19512021-02-25 Nathan Sidwell <nathan@acm.org>
1952
1953 PR c++/99166
1954 * c.opt (-flang-info-module-cmi): Renamed option.
1955
50352c6c
GA
19562021-02-19 Nathan Sidwell <nathan@acm.org>
1957
1958 * c.opt (flang-info-module-read, flang-info-module-read=): New.
1959
bf81237e
GA
19602021-02-18 H.J. Lu <hjl.tools@gmail.com>
1961
1962 PR target/99113
1963 * c-attribs.c (c_common_attribute_table): Add the "retain"
1964 attribute.
1965 (handle_retain_attribute): New function.
1966
0e804ce3
GA
19672021-02-16 Marek Polacek <polacek@redhat.com>
1968
1969 PR c++/99062
1970 * c-attribs.c (handle_assume_aligned_attribute): Check that the
1971 alignment argument is non-negative. Tweak a warning message.
1972
fab095da
GA
19732021-02-12 Martin Sebor <msebor@redhat.com>
1974
1975 PR c/99055
1976 * c-warn.c (warn_parm_array_mismatch): Free strings returned from
1977 print_generic_expr_to_str.
1978
4b37c3ea
GA
19792021-02-10 Richard Biener <rguenther@suse.de>
1980
1981 * c-common.c (parse_optimize_options): Free decoded_options.
1982
a19dd5e6
GA
19832021-02-04 emsr <3dw4rd@verizon.net>
1984
1985 * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
1986
9faaa807
GA
19872021-02-03 Ed Smith-Rowland <3dw4rd@verizon.net>
1988
1989 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
1990 * c-lex.c (interpret_integer): Set node type for size literal.
1991
85d04a2e
GA
19922021-01-28 Jakub Jelinek <jakub@redhat.com>
1993
1994 * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
1995 draft from description.
1996 (-std=c++2b): Fix a pasto, 2020 -> 2023.
1997
e62bb7f0
GA
19982021-01-26 Paul Fee <paul.f.fee@gmail.com>
1999
2000 * c-common.h (cxx_dialect): Add cxx23 as a dialect.
2001 * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
2002 and -std=gnu++2b
2003 * c-opts.c (set_std_cxx23): New.
2004 (c_common_handle_option): Set options when -std=c++23 is enabled.
2005 (c_common_post_options): Adjust comments.
2006 (set_std_cxx20): Likewise.
2007
161e4c08
GA
20082021-01-25 Martin Sebor <msebor@redhat.com>
2009
2010 PR c++/98646
2011 * c-common.c (check_nonnull_arg): Adjust warning text.
2012
4c9bcd5c
GA
20132021-01-17 Martin Sebor <msebor@redhat.com>
2014
2015 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
2016 assume SSA_NAME_IDENTIFIER evaluates to nonzero.
2017
59cf67d1
GA
20182021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
2019
2020 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
2021 Redefine PRAGMA_OACC_CLAUSE_DETACH.
2022
2f7f0d32
GA
20232021-01-15 Jakub Jelinek <jakub@redhat.com>
2024
2025 PR tree-optimization/98597
2026 * c-pretty-print.c: Include options.h.
2027 (c_fold_indirect_ref_for_warn): New function.
2028 (print_mem_ref): Use it. If it returns something that has compatible
2029 type and is TBAA compatible with zero offset, print it and return,
2030 otherwise print it using offsetof syntax or array ref syntax. Fix up
2031 printing if MEM_REFs first operand is ADDR_EXPR, or when the first
2032 argument has pointer to array type. Print pointers using the standard
2033 formatting.
2034
6851dda2
GA
20352021-01-12 Martin Sebor <msebor@redhat.com>
2036
2037 PR c/98597
2038 PR c/98592
2039 * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
2040 has pointer type. Remove redundant code. Avoid calling
2041 gimple_canonical_types_compatible_p.
2042
7d187e4f
GA
20432021-01-07 Martin Sebor <msebor@redhat.com>
2044
2045 PR middle-end/98578
2046 * c-pretty-print.c (print_mem_ref): Strip array from access type.
2047 Avoid assuming acces type's size is constant. Correct condition
2048 guarding the printing of a parenthesis.
2049
942ae5be
GA
20502021-01-06 Martin Sebor <msebor@redhat.com>
2051
2052 PR c++/95768
2053 * c-pretty-print.c (c_pretty_printer::primary_expression): For
2054 SSA_NAMEs print VLA names and GIMPLE defining statements.
2055 (print_mem_ref): New function.
2056 (c_pretty_printer::unary_expression): Call it.
2057
20582021-01-06 Richard Biener <rguenther@suse.de>
2059
2060 PR tree-optimization/95582
2061 * c-attribs.c (c_common_attribute_table): Add entry for
2062 signed_bool_precision.
2063 (handle_signed_bool_precision_attribute): New.
2064
8daa719b
GA
20652020-12-24 Iain Sandoe <iain@sandoe.co.uk>
2066
2067 * c.opt: Add -stdlib= option and enumerations for
2068 libstdc++ and libc++.
2069
eefe499f
GA
20702020-12-16 Martin Liska <mliska@suse.cz>
2071
2072 * c.opt: Remove usage of Report.
2073
d52945ce
GA
20742020-12-14 Martin Sebor <msebor@redhat.com>
2075
2076 PR middle-end/98166
2077 PR c++/57111
2078 PR middle-end/98160
2079 * c-attribs.c (maybe_add_noinline): New function.
2080 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
2081 Implicitly add attribute noinline to functions not declared inline
2082 and warn on those.
2083
ca2bd949
GA
20842020-12-09 Tobias Burnus <tobias@codesourcery.com>
2085
2086 * c-pragma.c (omp_pragmas): Add 'allocate'.
2087 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
2088
f6e8e279
GA
20892020-12-08 Jakub Jelinek <jakub@redhat.com>
2090
2091 PR c++/98187
2092 * c-pragma.c (omp_pragmas): Remove "master".
2093 (omp_pragmas_simd): Add "master".
2094
bc8a7013
GA
20952020-12-07 Marek Polacek <polacek@redhat.com>
2096
2097 PR c++/98126
2098 * c-common.c (verify_tree_lim_r): New function.
2099 (verify_sequence_points): Use it. Use nullptr instead of 0.
2100
b8dd0ef7
GA
21012020-12-03 Martin Sebor <msebor@redhat.com>
2102
2103 PR c++/90629
2104 PR middle-end/94527
2105 * c-attribs.c (handle_dealloc_attribute): New function.
2106 (handle_malloc_attribute): Handle argument forms of attribute.
2107 * c.opt (-Wmismatched-dealloc): New option.
2108 (-Wmismatched-new-delete): New option.
2109
21102020-12-03 Jakub Jelinek <jakub@redhat.com>
2111
2112 PR libstdc++/93121
2113 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
2114 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
2115
e0f5e792
GA
21162020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
2117
2118 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
2119 {__GNUC_EXECUTION_CHARSET_NAME} and
2120 _WIDE_EXECUTION_CHARSET_NAME} macros.
2121
21222020-12-01 Nathan Sidwell <nathan@acm.org>
2123
2124 * c-common.c (module, import, export): New internal tokens (with
2125 trailing space).
2126 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
2127 them.
2128 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
2129 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
2130
21312020-12-01 Nathan Sidwell <nathan@acm.org>
2132
2133 * c-opts.c (c_common_init_options): Ask for module dependencies.
2134 (c_common_handle_option): Handle -Mmodules -Mno-modules.
2135 * c-pch.c (c_common_valid_pch): ... does not play with C++
2136 modules.
2137 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
2138 options.
2139 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
2140 (fmodule-only, fmodule-mapper, fmodule-lazy)
2141 (fmodule-version-ignore, Winvalid-imported-macros)
2142 (flang-info-include-translate, flang-info-include-translate-not):
2143 New options
2144
5fbf0ecb
GA
21452020-11-28 Eric Botcazou <ebotcazou@adacore.com>
2146
2147 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
2148 (dump_ada_structure): Also deal with convention, unchecked union and
2149 bit-field for nested types. In the latter case, print an Alignment
2150 aspect along with the Pack aspect.
2151
360258da
GA
21522020-11-25 Martin Sebor <msebor@redhat.com>
2153
2154 PR bootstrap/94982
2155 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
2156 -Wformat-diag.
2157
1e2c9a27
GA
21582020-11-24 Martin Sebor <msebor@redhat.com>
2159
2160 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
2161
8e6198d0
GA
21622020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2163
2164 * c-attribs.c (handle_special_var_sec_attribute): New.
2165 (handle_noinit_attribute): Remove.
2166 (attr_noinit_exclusions): Rename to...
2167 (attr_section_exclusions): ...this, and add "persistent" attribute
2168 exclusion.
2169 (c_common_attribute_table): Add "persistent" attribute.
2170
7a97e2fc
GA
21712020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
2172
2173 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
2174 Treat opaque types like other types.
2175 (c_pretty_printer::direct_abstract_declarator): Opaque types are
2176 supported types.
2177
82e5048e
GA
21782020-11-20 Martin Sebor <msebor@redhat.com>
2179
2180 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
2181 with fewer arguments.
2182
21832020-11-20 Martin Sebor <msebor@redhat.com>
2184
2185 PR middle-end/97879
2186 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
2187 Error out on invalid modes.
2188
21892020-11-20 Jakub Jelinek <jakub@redhat.com>
2190
2191 PR libstdc++/88101
2192 * c-common.c (check_builtin_function_arguments): Handle
2193 BUILT_IN_CLEAR_PADDING.
2194
25bb75f8
GA
21952020-11-18 Nathan Sidwell <nathan@acm.org>
2196
2197 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
2198
4dabb037
GA
21992020-11-17 Nathan Sidwell <nathan@acm.org>
2200
2201 * c-common.h (enum c_tree_index): Reorder to place lazy fields
2202 after newly-added CTI_MODULE_HWM.
2203
22042020-11-17 Joseph Myers <joseph@codesourcery.com>
2205
2206 * c-cppbuiltin.c (builtin_define_float_constants): Define
2207 "*_IS_IEC_60559__" macros.
2208
22092020-11-17 Nathan Sidwell <nathan@acm.org>
2210
2211 * c-lex.c: #include "langhooks.h".
2212 (cb_undef): Maybe call preprocess_undef lang hook.
2213 * c-opts.c (c_common_post_options): Maybe call preprocess_options
2214 lang hook.
2215 (push_command_line_include): Maybe call preprocess_main_file lang
2216 hook.
2217 (cb_file_change): Likewise.
2218 * c-ppoutput.c: #include "langhooks.h.
2219 (scan_translation_unit): Maybe call preprocess_token lang hook.
2220 (class do_streamer): New, derive from token_streamer.
2221 (directives_only_cb): Data pointer is do_streamer, call
2222 preprocess_token lang hook.
2223 (scan_translation_unit_directives_only): Use do_streamer.
2224 (print_line_1): Move src_line recording to after string output.
2225 (cb_undef): Maybe call preprocess_undef lang hook.
2226
22272020-11-17 Nathan Sidwell <nathan@acm.org>
2228
2229 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
2230 code duplicating that functionality.
2231
22322020-11-17 Jakub Jelinek <jakub@redhat.com>
2233
2234 PR c/90628
2235 * c-common.c (check_builtin_function_arguments)
2236 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
2237 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
2238 for more builtins and argument positions.
2239
29c5d9ce
GA
22402020-11-16 Iain Sandoe <iain@sandoe.co.uk>
2241
2242 PR objc/97854
2243 * stub-objc.c: Include c-common.h to declare enum rid.
2244
77f67db2
GA
22452020-11-13 Jakub Jelinek <jakub@redhat.com>
2246
2247 PR c++/63287
2248 * c-cppbuiltin.c: Include configargs.h.
2249 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
2250 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
2251 "single".
2252
22532020-11-13 Gergö Barany <gergo@codesourcery.com>
2254 Thomas Schwinge <thomas@codesourcery.com>
2255
2256 * c.opt (fopenacc-kernels): Add.
2257
22582020-11-13 Jason Merrill <jason@redhat.com>
2259
2260 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
2261
22622020-11-13 Piotr H. Dabrowski <phd@phd.re>
2263
2264 PR c++/91318
2265 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
2266
22672020-11-13 Martin Liska <mliska@suse.cz>
2268
2269 * c-attribs.c (build_attr_access_from_parms): Format properly.
2270
22712020-11-13 Iain Sandoe <iain@sandoe.co.uk>
2272
2273 PR objc/90707
2274 * c-common.c (c_common_reswords): null_unspecified, nullable,
2275 nonnull, null_resettable: New keywords.
2276 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
2277 RID_NONNULL, RID_NULL_RESETTABLE: New.
2278 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
2279 ranges accepted for property attributes.
2280 * c-attribs.c (handle_objc_nullability_attribute): New.
2281 * c-objc.h (enum objc_property_attribute_group): Add
2282 OBJC_PROPATTR_GROUP_NULLABLE.
2283 (enum objc_property_attribute_kind):Add
2284 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
2285 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
2286
22872020-11-13 Iain Sandoe <iain@sandoe.co.uk>
2288
2289 PR objc/77404
2290 * c-attribs.c (handle_objc_root_class_attribute): New
2291 * c-objc.h (objc_start_class_interface): Add a location
2292 value for the position of the class name.
2293 * c.opt: Add Wobjc-root-class.
2294 * stub-objc.c (objc_start_class_interface): Add a location
2295 value for the position of the class name.
2296
a5a11525
GA
22972020-11-12 Joseph Myers <joseph@codesourcery.com>
2298
2299 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
2300 Allow scope for C. Handle standard attributes for C. Do not
2301 accept unscoped attributes if std_syntax and not handled as
2302 standard attributes.
2303 * c-common.h (c_common_has_attribute): Update prototype.
2304
23052020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
2306
2307 PR pch/86674
2308 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
2309 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
2310
0f5f9ed5
GA
23112020-11-11 Patrick Palka <ppalka@redhat.com>
2312
2313 PR c++/88115
2314 * c-opts.c (c_common_post_options): Update latest_abi_version.
2315
bb622641
GA
23162020-11-10 Jakub Jelinek <jakub@redhat.com>
2317
2318 PR c/97748
2319 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
2320 to false.
2321 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
2322 recursively and just return true instead of warning if it is true.
2323 Handle COMPLEX_EXPR.
2324
23252020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
2326
2327 * c-common.h (c_omp_adjust_map_clauses): New declaration.
2328 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
2329 (c_omp_adjust_map_clauses): New function.
2330
2bee28dd
GA
23312020-11-09 Marek Polacek <polacek@redhat.com>
2332
2333 DR 1914
2334 * c-common.c (attribute_fallthrough_p): Tweak the warning
2335 message.
2336
23372020-11-09 Patrick Palka <ppalka@redhat.com>
2338
2339 * c-pragma.c (handle_pragma_diagnostic): Split the
2340 unknown-option -Wpragmas diagnostic into a warning and a
2341 subsequent note containing a spelling suggestion. Avoid
2342 computing the suggestion if -Wpragmas warnings are being
2343 suppressed.
2344
23452020-11-09 Patrick Palka <ppalka@redhat.com>
2346
2347 PR testsuite/97117
2348 * c-indentation.c (get_visual_column): Remove location_t
2349 parameter. Move the column-tracking diagnostic code from here
2350 to ...
2351 (should_warn_for_misleading_indentation): ... here, before the
2352 early exit for when the loci are not all distinct. Don't pass a
2353 location_t argument to get_visual_column.
2354 (assert_get_visual_column_succeeds): Don't pass a location_t
2355 argument to get_visual_column.
2356 (assert_get_visual_column_fails): Likewise.
2357
fb95de7a
GA
23582020-11-08 Iain Sandoe <iain@sandoe.co.uk>
2359
2360 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
2361 of keywords accepted in @property attribute contexts.
2362 * c-objc.h (enum objc_property_attribute_group): Add
2363 OBJC_PROPATTR_GROUP_CLASS.
2364 (enum objc_property_attribute_kind): Add
2365 OBJC_PROPERTY_ATTR_CLASS.
2366
2da7ee05
GA
23672020-11-07 Iain Sandoe <iain@sandoe.co.uk>
2368
2369 * c-common.c (c_common_reswords): Add 'atomic' property
2370 attribute.
2371 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
2372 property attributes.
2373
23742020-11-07 Iain Sandoe <iain@sandoe.co.uk>
2375
2376 * c-attribs.c (handle_nsobject_attribute): New.
2377 * c.opt: Add WNSObject-attribute.
2378
44cab2d8
GA
23792020-11-06 Iain Sandoe <iain@sandoe.co.uk>
2380
2381 * c-objc.h (enum objc_property_attribute_group): New
2382 (enum objc_property_attribute_kind): New.
2383 (OBJC_PROPATTR_GROUP_MASK): New.
2384 (struct property_attribute_info): Small class encapsulating
2385 parser output from property attributes.
2386 (objc_prop_attr_kind_for_rid): New
2387 (objc_add_property_declaration): Simplify interface.
2388 * stub-objc.c (enum rid): Dummy type.
2389 (objc_add_property_declaration): Simplify interface.
2390 (objc_prop_attr_kind_for_rid): New.
2391
23922020-11-06 Nathan Sidwell <nathan@acm.org>
2393
2394 * c-ada-spec.c (collect_ada_nodes): Rename
2395 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2396 (collect_ada_node): Likewise.
2397 (dump_forward_type): Likewise.
2398 * c-common.c (set_underlying_type): Rename
2399 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2400 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
2401
24022020-11-06 Jakub Jelinek <jakub@redhat.com>
2403
2404 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
2405
0cfd9109
GA
24062020-11-05 Marek Polacek <polacek@redhat.com>
2407
2408 PR c++/97675
2409 * c.opt (Wexceptions): New option.
2410
24112020-11-05 Marek Polacek <polacek@redhat.com>
2412
2413 PR c++/25814
2414 * c.opt (Wvexing-parse): New option.
2415
35c125cb
GA
24162020-11-04 Jakub Jelinek <jakub@redhat.com>
2417
2418 PR c++/97670
2419 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
2420 underlying decl to clear in the allocate_head bitmap.
2421
24222020-11-04 Iain Sandoe <iain@sandoe.co.uk>
2423
2424 * c-objc.h (objc_non_constant_expr_p): New.
2425 * stub-objc.c (objc_non_constant_expr_p): New.
2426
fd2325ea
GA
24272020-11-03 Nathan Sidwell <nathan@acm.org>
2428
2429 * c.opt (MQ,MT): Reword description to be make-agnostic.
2430
88ce3d5f
GA
24312020-11-02 Nathan Sidwell <nathan@acm.org>
2432
2433 * c-opts.c (c_common_post_options): Move var decl to its
2434 initialization point.
2435
24362020-11-01 Iain Sandoe <iain@sandoe.co.uk>
2437
2438 * c-lex.c (c_lex_with_flags): When combining '@' with a
2439 keyword for Objective-C, combine the location ranges too.
2440
24412020-10-30 Qing Zhao <qing.zhao@oracle.com>
2442 H.J.Lu <hjl.tools@gmail.com>
2443
2444 * c-attribs.c (c_common_attribute_table): Add new attribute
2445 zero_call_used_regs.
2446 (handle_zero_call_used_regs_attribute): New function.
2447
e93aae4a
GA
24482020-10-28 Marek Polacek <polacek@redhat.com>
2449
2450 PR c++/97573
2451 * c-opts.c (c_common_post_options): In C++20, turn on
2452 -Wdeprecated-enum-enum-conversion and
2453 -Wdeprecated-enum-float-conversion.
2454 * c.opt (Wdeprecated-enum-enum-conversion,
2455 Wdeprecated-enum-float-conversion): New options.
2456 (Wenum-conversion): Allow for C++ too.
2457
24582020-10-28 Jakub Jelinek <jakub@redhat.com>
2459
2460 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
2461 * c-omp.c: Include bitmap.h.
2462 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
2463
f19e7c8d
GA
24642020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2465
2466 * c-common.c (__is_nothrow_assignable): New.
2467 (__is_nothrow_constructible): Likewise.
2468 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
2469 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
2470
efe71fcc
GA
24712020-10-23 Jan Hubicka <hubicka@ucw.cz>
2472
2473 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
2474
24752020-10-23 Marek Polacek <polacek@redhat.com>
2476
2477 PR c++/91741
2478 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
2479 (c_common_init_ts): Likewise.
2480 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
2481 * c-common.h (maybe_warn_sizeof_array_div): Declare.
2482 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
2483 (maybe_warn_sizeof_array_div): New function.
2484 * c.opt (Wsizeof-array-div): New option.
2485
24862020-10-23 Martin Sebor <msebor@redhat.com>
2487
2488 PR c/97463
2489 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
2490
56ddd5e2
GA
24912020-10-22 Martin Liska <mliska@suse.cz>
2492
2493 PR c/94722
2494 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
2495 (handle_stack_protect_attribute): Add error message for a
2496 no_stack_protector function.
2497
24982020-10-22 Martin Liska <mliska@suse.cz>
2499
2500 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
2501
25022020-10-22 Jan Hubicka <hubicka@ucw.cz>
2503
2504 * c-gimplify.c: Include tree-nested.h
2505 (c_genericize): Update for new nested function info.
2506
b2698c21
GA
25072020-10-14 Martin Sebor <msebor@redhat.com>
2508
2509 PR c/97413
2510 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
2511 bounds in an extra list.
2512
7e9282ae
GA
25132020-10-05 Richard Biener <rguenther@suse.de>
2514 Jakub Jelinek <jakub@redhat.com>
2515
2516 PR c++/97197
2517 * c-pretty-print.c: Include langhooks.h.
2518 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
2519 expression.
2520 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
2521 unary_expression.
2522 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
2523
660bfe61
GA
25242020-09-30 Martin Sebor <msebor@redhat.com>
2525
2526 PR middle-end/97189
2527 * c-attribs.c (append_access_attr): Use the function declaration
2528 location for a warning about an attribute access argument.
2529
93bca37c
GA
25302020-09-29 Marek Polacek <polacek@redhat.com>
2531
2532 PR c++/94695
2533 * c.opt (Wrange-loop-construct): New option.
2534
82b77dee
GA
25352020-09-23 Martin Sebor <msebor@redhat.com>
2536
2537 PR c/97131
2538 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
2539
25402020-09-23 Marek Polacek <polacek@redhat.com>
2541
2542 PR c/97125
2543 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
2544 after loops and other structured control constructs have been lowered.
2545
521d2711
GA
25462020-09-22 Jakub Jelinek <jakub@redhat.com>
2547
2548 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
2549 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
2550
44135373
GA
25512020-09-21 Marek Polacek <polacek@redhat.com>
2552
2553 * c.opt (Wctad-maybe-unsupported): New option.
2554
2fe5b7d1
GA
25552020-09-19 Martin Sebor <msebor@redhat.com>
2556
2557 PR c/50584
2558 * c-common.h (warn_parm_array_mismatch): Declare new function.
2559 (has_attribute): Move declaration of an existing function.
2560 (build_attr_access_from_parms): Declare new function.
2561 * c-warn.c (parm_array_as_string): Define new function.
2562 (plus_one): Define new function.
2563 (warn_parm_ptrarray_mismatch): Define new function.
2564 (warn_parm_array_mismatch): Define new function.
2565 (vla_bound_parm_decl): New function.
2566 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
2567 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
2568 qualifiers here...
2569 (c_pretty_printer::direct_abstract_declarator): ...but instead print
2570 them in brackets here. Also print [static]. Strip extraneous
2571 expressions from VLA bounds.
2572
25732020-09-19 Martin Sebor <msebor@redhat.com>
2574
2575 PR c/50584
2576 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
2577 (handle_argspec_attribute): New function.
2578 (get_argument, get_argument_type): New functions.
2579 (append_access_attrs): Add overload. Handle internal attribute
2580 representation in addition to external.
2581 (handle_access_attribute): Handle internal attribute representation
2582 in addition to external.
2583 (build_attr_access_from_parms): New function.
2584
25852020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2586
2587 * c-gimplify.c (genericize_c_loop): Rewrite to match
2588 c_finish_loop in c-typeck.c.
2589
25902020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2591
2592 * c-common.c (c_block_may_fallthrough): New, split from
2593 cxx_block_may_fallthrough in the cp front end.
2594 (c_common_init_ts): Move handling of loop and switch-related
2595 statements here from the cp front end.
2596 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
2597 cp front end.
2598 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
2599 * c-common.h (c_block_may_fallthru): Declare.
2600 (bc_state_t): Move here from cp front end.
2601 (save_bc_state, restore_bc_state): Declare.
2602 (c_genericize_control_stmt): Declare.
2603 (WHILE_COND, WHILE_BODY): Likewise.
2604 (DO_COND, DO_BODY): Likewise.
2605 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
2606 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
2607 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
2608 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
2609 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
2610 * c-dump.c (dump_stmt): Copy from cp front end.
2611 (c_dump_tree): Move code to handle structured loop and switch
2612 tree nodes here from cp front end.
2613 * c-gimplify.c: Adjust includes.
2614 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
2615 cp front end.
2616 (save_bc_state, restore_bc_state): New functions using old code
2617 from cp front end.
2618 (get_bc_label, expr_loc_or_loc): Move from cp front end.
2619 (genericize_c_loop): Move from cp front end.
2620 (genericize_for_stmt, genericize_while_stmt): Likewise.
2621 (genericize_do_stmt, genericize_switch_stmt): Likewise.
2622 (genericize_continue_stmt, genericize_break_stmt): Likewise.
2623 (genericize_omp_for_stmt): Likewise.
2624 (c_genericize_control_stmt): New function using code split from
2625 cp front end.
2626 (c_genericize_control_r): New.
2627 (c_genericize): Call walk_tree with c_genericize_control_r.
2628 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
2629 structured loop and switch tree nodes here from cp front end.
2630
2aad20c0
GA
26312020-09-17 Patrick Palka <ppalka@redhat.com>
2632
2633 PR c/80076
2634 * c-indentation.c (should_warn_for_misleading_indentation): Move
2635 declarations of local variables closer to their first use.
2636 Handle virtual token locations by resolving them to their
2637 respective macro expansion points. If all three tokens are
2638 produced from the same macro expansion, then instead use their
2639 loci within the macro definition.
2640
ecde1b0a
GA
26412020-09-16 Martin Sebor <msebor@redhat.com>
2642
2643 PR c/78666
2644 PR c/96126
2645 * c-attribs.c (validate_attr_args): New function.
2646 (validate_attr_arg): Same.
2647 (handle_section_attribute): Call it. Introduce a local variable.
2648 (handle_alloc_size_attribute): Same.
2649 (handle_alloc_align_attribute): Same.
2650
50a71cd0
GA
26512020-09-14 Jakub Jelinek <jakub@redhat.com>
2652
2653 * c-attribs.c (handle_optimize_attribute): Adjust
2654 cl_optimization_save, cl_optimization_restore and
2655 build_optimization_node callers.
2656 * c-pragma.c (handle_pragma_optimize): Adjust
2657 build_optimization_node caller.
2658 (handle_pragma_push_options): Adjust
2659 build_optimization_node and build_target_option_node callers.
2660 (handle_pragma_pop_options, handle_pragma_reset_options):
2661 Adjust cl_optimization_restore callers.
2662
8f7ea26a
GA
26632020-08-28 Martin Sebor <msebor@redhat.com>
2664
2665 * c.opt (Wstringop-overread): New option.
2666
a6493809
GA
26672020-08-11 Jakub Jelinek <jakub@redhat.com>
2668
2669 PR c/96545
2670 * c-common.c (get_atomic_generic_size): Require that first argument's
2671 type points to a complete type and use tree_fits_uhwi_p instead of
2672 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
2673
48cc2e46
GA
26742020-07-31 Martin Sebor <msebor@redhat.com>
2675
2676 PR c++/96003
2677 * c-common.c (check_function_arguments_recurse): Return early when
2678 no-warning bit is set.
2679
26802020-07-31 Richard Biener <rguenther@suse.de>
2681
2682 PR debug/96383
2683 * c-common.h (c_common_finalize_early_debug): Declare.
2684 * c-common.c: Include debug.h.
2685 (c_common_finalize_early_debug): finalize_early_debug langhook
2686 implementation generating debug for extern declarations.
2687
e71dab87
GA
26882020-07-27 Nathan Sidwell <nathan@acm.org>
2689
2690 * c-common.c (try_to_locate_new_include_insertion_point): Use
2691 strcmp, not pointer equality.
2692
ae2e0bc1
GA
26932020-07-25 Martin Sebor <msebor@redhat.com>
2694
2695 PR c++/96310
2696 * c-common.c (check_nonnull_arg): Print note only when warning was
2697 issued.
2698
3ea9abca
GA
26992020-07-22 Tobias Burnus <tobias@codesourcery.com>
2700
2701 * c-omp.c (c_finish_omp_critical): Check for no name but
2702 nonzero hint provided.
2703
0933f508
GA
27042020-07-20 Jason Merrill <jason@redhat.com>
2705
2706 * c-cppbuiltin.c (c_cpp_builtins): Update
2707 __cpp_nontype_template_args for C++20.
2708
27092020-07-20 Martin Sebor <msebor@redhat.com>
2710
2711 PR c/96249
2712 * c.opt: Remove stray text.
2713
8ca07a30
GA
27142020-07-14 Lewis Hyatt <lhyatt@gmail.com>
2715
2716 PR other/86904
2717 * c-indentation.c (should_warn_for_misleading_indentation): Get
2718 global tabstop from the new source.
2719 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
2720 is now a common option.
2721 * c.opt: Likewise.
2722
a82c4c4c 27232020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
2724
2725 * c.opt (Wscalar-storage-order): Add explicit variable.
2726
f60ee68d
GA
27272020-07-07 Nathan Sidwell <nathan@acm.org>
2728
2729 * c-opts.c (c_common_post_options): Add 'injecting' arg to
2730 cpp_read_main_file.
2731 (c_finish_options): Add linemap_line_start calls for builtin and cmd
2732 maps. Force token position to line_table's highest line.
2733 * c-ppoutput.c (print_line_1): Refactor, print line zero.
2734 (cb_define): Always increment source line.
2735
4077d74c
GA
27362020-07-06 Martin Sebor <msebor@redhat.com>
2737
2738 PR c++/95984
2739 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
2740 to stub lambda objects with null this pointer.
2741 (check_nonnull_arg): Handle C++ nullptr.
2742
b5f24739
GA
27432020-07-02 Jason Merrill <jason@redhat.com>
2744 Jakub Jelinek <jakub@redhat.com>
2745
2746 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
2747
46fbb6c6
GA
27482020-06-30 Jakub Jelinek <jakub@redhat.com>
2749
2750 PR c++/95963
2751 * c-common.c (check_function_arguments_recurse): Don't crash on
2752 calls to internal functions.
2753
69273534
GA
27542020-06-28 Martin Sebor <msebor@redhat.com>
2755
2756 PR c++/86568
2757 * c-common.c (struct nonnull_arg_ctx): Add members.
2758 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
2759 C++ member functions specially. Consider the this pointer implicitly
2760 nonnull.
2761 (check_nonnull_arg): Use location of argument when available.
2762 (check_function_arguments): Use nonnull_arg_ctx as argument.
2763
9a33c41f
GA
27642020-06-27 Jakub Jelinek <jakub@redhat.com>
2765
2766 PR middle-end/95903
2767 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
2768 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
2769 smaller precision intop operands separately.
2770
c9c05f73
GA
27712020-06-26 Marek Polacek <polacek@redhat.com>
2772
2773 * c-opts.c (c_common_init_options): Default to gnu++17.
2774
aff95ee7
GA
27752020-06-17 Jonathan Wakely <jwakely@redhat.com>
2776
bd0a89dc 2777 PR c/95378
aff95ee7
GA
2778 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
2779 pointer arguments.
2780
56638b9b
GA
27812020-06-16 Jakub Jelinek <jakub@redhat.com>
2782
2783 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
2784 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
2785 idx members.
2786 (c_omp_is_loop_iterator): New function.
2787 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
2788 if outer loop iterator is present. Perform duplicate checking through
2789 hash_set in the function rather than expecting caller to do that.
2790 Pass NULL instead of d->ppset to walk_tree_1.
2791 (c_omp_check_nonrect_loop_iv): New function.
2792 (c_omp_check_loop_iv): Use it. Fill in new members, allow
2793 non-rectangular loop forms, diagnose multiple associated loops with
2794 the same iterator. Pass NULL instead of &pset to walk_tree_1.
2795 (c_omp_check_loop_iv_exprs): Likewise.
2796
ec6ffbb9
GA
27972020-06-10 Martin Liska <mliska@suse.cz>
2798
2799 PR tree-optimization/92860
2800 * c-attribs.c (handle_optimize_attribute):
2801 Save global options and compare it after parsing of function
2802 attribute.
2803 * c-pragma.c (opt_stack::saved_global_options): New field.
2804 (handle_pragma_push_options): Save global_options.
2805 (handle_pragma_pop_options): Compare them after pop.
2806
b952c2cf
GA
28072020-06-09 Jakub Jelinek <jakub@redhat.com>
2808
2809 PR c/95580
2810 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
2811 case when MEM_REF's first argument has type pointer to incomplete type.
2812
1a59f3db
GA
28132020-06-05 Jason Merrill <jason@redhat.com>
2814
2815 * c-pretty-print.c (pp_c_additive_expression): Handle negative
2816 operand to POINTER_PLUS_EXPR.
2817
3add3425
GA
28182020-06-04 Martin Sebor <msebor@redhat.com>
2819
2820 PR middle-end/10138
2821 PR middle-end/95136
2822 * c-attribs.c (append_access_attrs): Handle attr_access::none.
2823 (handle_access_attribute): Same.
2824
9a5b7438
GA
28252020-06-03 Mark Wielaard <mark@klomp.org>
2826
2827 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
2828 New function.
2829 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
2830 New function declaration.
2831
28322020-06-03 Mark Wielaard <mark@klomp.org>
2833
2834 * known-headers.cc (get_string_macro_hint): New function.
2835 (get_stdlib_header_for_name): Use get_string_macro_hint.
2836 (get_c_stdlib_header_for_string_macro_name): New function.
2837 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
2838 New function declaration.
2839
28402020-06-03 Tobias Burnus <tobias@codesourcery.com>
2841
2842 * c-common.h (c_omp_predetermined_mapping): Declare.
2843 * c-omp.c (c_omp_predetermined_mapping): New.
2844
af114c38
MW
28452020-05-22 Mark Wielaard <mark@klomp.org>
2846
2847 * known-headers.cc (get_stdlib_header_for_name): Add a new
2848 stdlib_hint array for stdbool and stdint.
2849
45c50b6a
MW
28502020-05-22 Mark Wielaard <mark@klomp.org>
2851
2852 * known-headers.cc (get_stdlib_header_for_name): Return
2853 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
2854 flag_isoc99.
2855
c22027a0
NS
28562020-05-20 Nathan Sidwell <nathan@acm.org>
2857
38a4db21
NS
2858 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
2859
c22027a0
NS
2860 * c-common.c (try_to_locate_new_include_insertion_point): Use
2861 strcmp to compare filenames.
2862 * c-lex.c (init_c_lex): Move declaration to initialization.
2863 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
2864 deferred count loop.
2865
29f0e90d
JM
28662020-05-15 Jason Merrill <jason@redhat.com>
2867
2868 * c-opts.c (set_std_cxx20): Set flag_coroutines.
2869
b04445d4
JM
28702020-05-13 Jason Merrill <jason@redhat.com>
2871
2872 * c.opt (std=c++20): Make c++2a the alias.
2873 (std=gnu++20): Likewise.
2874 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
2875 * c-opts.c: Adjust.
2876 * c-cppbuiltin.c: Adjust.
2877 * c-ubsan.c: Adjust.
2878 * c-warn.c: Adjust.
2879
11dd3be5
EB
28802020-05-12 Eric Botcazou <ebotcazou@adacore.com>
2881
2882 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
2883
b224c376
NS
28842020-05-08 Nathan Sidwell <nathan@acm.org>
2885
2886 Reimplement directives only processing.
2887 * c-ppoutput.c (token_streamer): Ne.
2888 (directives_only_cb): New. Swallow ...
2889 (print_lines_directives_only): ... this.
2890 (scan_translation_unit_directives_only): Reimplment using the
2891 published interface.
2892
f1d94677
MP
28932020-05-07 Marek Polacek <polacek@redhat.com>
2894
2895 * c-format.c (badwords): Add "nonstatic".
2896
9b95bb52
JJ
2897202-05-07 Jakub Jelinek <jakub@redhat.com>
2898
2899 PR c/94968
2900 * c-common.c (speculation_safe_value_resolve_params): Return false if
2901 error_operand_p (val2).
2902 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
2903 Remove extraneous semicolon.
2904
530b4409 29052020-05-06 qing zhao <qing.zhao@oracle.com>
2906
2907 PR c/94230
2908 * c-indentation.c (get_visual_column): Add a hint to use the new
2909 -flarge-source-files option.
2910
b776bdca
SSF
29112020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
2912
2913 * c-attribs.c (handle_vector_size_attribute): Add attribute
2914 nonnull for argument args in order to silence warning of
2915 uninitialized variable usage. Since this is local to the
2916 compilation unit and thus cannot be checked at call sides by the
2917 compiler, added an assert statement in order to verify this.
2918
6607bdd9
L
29192020-05-01 H.J. Lu <hongjiu.lu@intel.com>
2920
2921 PR target/93492
2922 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
2923 value to USHRT_MAX (65535).
2924
691eeb65
JJ
29252020-04-29 Jakub Jelinek <jakub@redhat.com>
2926
2927 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
2928
26d76be7
JJ
29292020-04-27 Jakub Jelinek <jakub@redhat.com>
2930
2931 PR c/94755
2932 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
2933 fncode == BUILT_IN_NONE before initialization of first_param.
2934
7291b2ed
MP
29352020-04-23 Marek Polacek <polacek@redhat.com>
2936
2937 PR c++/94733
2938 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
2939 TREE_PURPOSE.
2940
58a29af8
PP
29412020-04-14 Patrick Palka <ppalka@redhat.com>
2942
2943 PR c++/85278
2944 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
2945 ampersand if it's an rvalue reference type.
2946
09f04139
MS
29472020-04-13 Martin Sebor <msebor@redhat.com>
2948
2949 PR c/92326
2950 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
2951 printing array bound for flexible array members.
2952
ee26baf4
IS
29532020-04-13 Iain Sandoe <iain@sandoe.co.uk>
2954
2955 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
2956 define, per n4861.
2957
75efe9cb
RB
29582020-04-02 Richard Biener <rguenther@suse.de>
2959
2960 PR c/94392
2961 * c-opts.c (c_common_post_options): Enable -ffinite-loops
2962 for -O2 and C++11 or newer.
2963
75defde9
PP
29642020-03-28 Patrick Palka <ppalka@redhat.com>
2965
2966 * c.opt: Add -fconcepts-diagnostics-depth.
2967
52f24a9e
MS
29682020-03-27 Martin Sebor <msebor@redhat.com>
2969
2970 PR c++/94346
2971 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
2972 to decl_attributes. Make handling of different kinds of entities
2973 more robust.
2974
ccacf77b
MS
29752020-03-27 Martin Sebor <msebor@redhat.com>
2976
2977 PR c++/94098
2978 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
2979 here.
2980
ca6c7225
JJ
29812020-03-23 Jakub Jelinek <jakub@redhat.com>
2982
2983 PR c++/91993
2984 * c-warn.c (warnings_for_convert_and_check): For expr and/or
2985 result being COMPOUND_EXPRs, skip to ultimate rhs.
2986
1aa22b19
RS
29872020-03-20 Richard Sandiford <richard.sandiford@arm.com>
2988
2989 PR middle-end/94072
2990 * c-common.c (c_common_type_for_mode): Before using a registered
2991 built-in type, check that the vectorness of the type matches
2992 the vectorness of the mode.
2993
700d4cb0
JJ
29942020-03-17 Jakub Jelinek <jakub@redhat.com>
2995
2996 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
2997 issue in a diagnostic message.
2998
b408e010
LH
29992020-03-15 Lewis Hyatt <lhyatt@gmail.com>
3000
3001 * c.opt: Avoid redundancy in the help text.
3002
e78e50d5
MP
30032020-03-02 Marek Polacek <polacek@redhat.com>
3004
3005 PR c++/93958 - add missing -std=gnu++20.
3006 * c.opt: Add -std=gnu++20.
3007
649e1741
MS
30082020-03-01 Martin Sebor <msebor@redhat.com>
3009
3010 PR c++/92721
3011 * c-attribs.c (append_access_attrs): Correctly handle attribute.
3012 (handle_access_attribute): Same.
3013
7b60f3ba
JJ
30142020-02-25 Jakub Jelinek <jakub@redhat.com>
3015
3016 PR c/93858
3017 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
3018 "did you mean" hint in diagnostics.
3019
fb260504
JM
30202020-02-15 Jason Merrill <jason@redhat.com>
3021
3022 * c.opt: Add -std=c++20.
3023
1d757b09
EB
30242020-02-14 Eric Botcazou <ebotcazou@adacore.com>
3025
3026 * c-ada-spec.c: Include bitmap.h.
3027 (dump_ada_double_name): Rename into...
3028 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
3029 (dump_ada_array_type): Adjust to above renaming. Robustify.
3030 (dump_nested_types_1): New function copied from... Add dumped_types
3031 parameter and pass it down to dump_nested_type.
3032 (dump_nested_types): ...this. Remove parent parameter. Just call
3033 dump_nested_types_1 on an automatic bitmap.
3034 (dump_nested_type): Add dumped_types parameter.
3035 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
3036 Adjust recursive calls and adjust to above renaming.
3037 (dump_ada_declaration): Adjust call to dump_nested_types.
3038 Tidy up and adjust to above renaming.
3039 (dump_ada_specs): Initialize and release bitmap obstack.
3040
0cc575e4
MS
30412020-02-10 Martin Sebor <msebor@redhat.com>
3042
3043 PR c/93640
3044 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
3045
a59aa302
JJ
30462020-02-10 Jakub Jelinek <jakub@redhat.com>
3047
3048 PR other/93641
3049 * c-format.c (check_plain): Fix up last argument of strncasecmp.
3050 Remove useless extra test.
3051
e464fc90
TB
30522020-02-03 Julian Brown <julian@codesourcery.com>
3053 Tobias Burnus <tobias@codesourcery.com>
3054
3055 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
3056
e3b6c052
JM
30572020-01-29 Jason Merrill <jason@redhat.com>
3058
3059 PR c++/89357
3060 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
3061
6d00f052
JM
30622020-01-23 Jason Merrill <jason@redhat.com>
3063
3064 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
3065
8a990ffa
MS
30662020-01-23 Martin Sebor <msebor@redhat.com>
3067
3068 PR c/84919
3069 * c-common.c (check_function_arguments): Avoid overlap checking
3070 of sprintf functions.
3071
55b7df8b
JM
30722020-01-22 Jason Merrill <jason@redhat.com>
3073
3074 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
3075 PR c++/40752
3076 * c-warn.c (conversion_warning): Check operands only after checking
3077 the whole expression. Don't check second operand of + for sign.
3078
c77074d0
JM
30792020-01-21 Jason Merrill <jason@redhat.com>
3080 Manuel López-Ibáñez <manu@gcc.gnu.org>
3081
3082 PR c++/40752 - useless -Wconversion with short +=.
3083 * c.opt (-Warith-conversion): New.
3084 * c-warn.c (conversion_warning): Recurse for operands of
3085 operators. Only warn about the whole expression with
3086 -Warith-conversion.
3087
731dbfc3
JM
30882020-01-21 Jason Merrill <jason@redhat.com>
3089
3090 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
3091 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
3092
ad1a3914
NS
30932020-01-20 Nathan Sidwell <nathan@acm.org>
3094
3095 PR preprocessor/80005
3096 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
3097
49789fd0
IS
30982020-01-18 Iain Sandoe <iain@sandoe.co.uk>
3099
3100 * c-common.c (co_await, co_yield, co_return): New.
3101 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
3102 RID_CO_RETURN): New enumeration values.
3103 (D_CXX_COROUTINES): Bit to identify coroutines are active.
3104 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
3105 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
3106 * c.opt (fcoroutines): New command-line switch.
3107
4bc1899b
DM
31082020-01-10 David Malcolm <dmalcolm@redhat.com>
3109
3110 * c-format.c (local_event_ptr_node): New.
3111 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
3112 (init_dynamic_diag_info): Initialize local_event_ptr_node.
3113 * c-format.h (T_EVENT_PTR): New define.
3114
f25e33fa
MS
31152020-01-10 Martin Sebor <msebor@redhat.com>
3116
3117 PR c/93132
3118 * c-attribs.c (append_access_attrs): Validate against the translated
3119 access string rather than the human-readable representation.
3120
8d9254fc
JJ
31212020-01-01 Jakub Jelinek <jakub@redhat.com>
3122
3123 Update copyright years.
3124
39292e25
EB
31252019-12-20 Eric Botcazou <ebotcazou@adacore.com>
3126
3127 * c-ada-spec.h (decl_sloc): Delete.
3128 * c-ada-spec.c (decl_sloc): Make static.
3129
519d7496
JB
31302019-12-19 Julian Brown <julian@codesourcery.com>
3131
3132 * c-common.h (c_omp_map_clause_name): Add prototype.
3133 * c-omp.c (c_omp_map_clause_name): New function.
3134 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
3135 PRAGMA_OACC_CLAUSE_DETACH.
3136
a6163563
JB
31372019-12-19 Julian Brown <julian@codesourcery.com>
3138 Maciej W. Rozycki <macro@codesourcery.com>
3139 Tobias Burnus <tobias@codesourcery.com>
3140 Thomas Schwinge <thomas@codesourcery.com>
3141
3142 * c-pragma.h (pragma_omp_clause): Add
3143 PRAGMA_OACC_CLAUSE_NO_CREATE.
3144
e8f1ade2
MS
31452019-12-17 Martin Sebor <msebor@redhat.com>
3146
3147 PR c++/61339
3148 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
3149
368877a1
DM
31502019-12-11 David Malcolm <dmalcolm@redhat.com>
3151
3152 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
3153 implementation.
3154 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
3155
d68f5d45
DM
31562019-12-09 David Malcolm <dmalcolm@redhat.com>
3157
3158 * c-format.c (range_label_for_format_type_mismatch::get_text):
3159 Replace label_text ctor called with true with label_text::take.
3160
d3e28653
DM
31612019-12-09 David Malcolm <dmalcolm@redhat.com>
3162
3163 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
3164 initial newline from expected outputs.
3165 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
3166 call to diagnostic_show_locus.
3167
abd6d8cc
JJ
31682019-12-06 Jakub Jelinek <jakub@redhat.com>
3169
3170 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
3171 now.
3172
7906797e
MP
31732019-12-05 Marek Polacek <polacek@redhat.com>
3174 Jakub Jelinek <jakub@redhat.com>
3175
3176 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
3177 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
3178
5c04da88
MP
31792019-12-05 Marek Polacek <polacek@redhat.com>
3180
3181 PR c++/92271 - make __is_same alias for __is_same_as.
3182 * c-common.c: Add __is_same, an alias for __is_same_as.
3183
43aae289
MP
31842019-12-03 Marek Polacek <polacek@redhat.com>
3185
3186 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
3187 * c-cppbuiltin.c (c_cpp_builtins): Predefine
3188 __cpp_aggregate_paren_init=201902 for -std=c++2a.
3189
d7ddfbcb
JH
31902019-11-30 Jan Hubicka <hubicka@ucw.cz>
3191
3192 * c-attribs.c (handle_symver_attribute): New function
3193 (c_common_attributes): Add symver.
3194
65ef05d0
RS
31952019-11-30 Richard Sandiford <richard.sandiford@arm.com>
3196
3197 * c-common.c (pointer_int_sum): Use verify_type_context to check
3198 whether the target allows pointer arithmetic for the types involved.
3199 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
3200 to check whether the target allows sizeof and alignof operations
3201 for the types involved.
3202
1a291106
JM
32032019-11-27 Jason Merrill <jason@redhat.com>
3204
3205 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
3206
05d6cb1a
JJ
32072019-11-26 Jakub Jelinek <jakub@redhat.com>
3208
3209 PR c++/61414
3210 * c-attribs.c (handle_mode_attribute): Add mode attribute to
3211 ENUMERAL_TYPEs.
3212
5b8d9367
JM
32132019-11-25 Joseph Myers <joseph@codesourcery.com>
3214
3215 PR c/91985
3216 * c-common.c (c_common_type_for_mode): Handle decimal
3217 floating-point types being NULL_TREE.
3218 * c-format.c (get_format_for_type_1): Handle specified types being
3219 NULL_TREE.
3220 * c-lex.c (interpret_float): Give an error for decimal
3221 floating-point constants when decimal floating-point not
3222 supported.
3223
1fbf51cb
JJ
32242019-11-23 Jakub Jelinek <jakub@redhat.com>
3225
3226 PR middle-end/83859
3227 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
3228 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
3229 group warning with inform together.
3230 (handle_access_attribute): Formatting fix.
3231
761df906
JJ
32322019-11-22 Jakub Jelinek <jakub@redhat.com>
3233
bdaf8be1
JJ
3234 PR c/90677
3235 * c-common.h (identifier_global_tag): Declare.
3236 * c-format.c (get_pointer_to_named_type): Renamed to ...
3237 (get_named_type): ... this. Use identifier_global_tag instead of
3238 identifier_global_value, handle the return value being a TYPE_P.
3239 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
3240 to call get_named_type instead. Formatting fixes.
3241
c2ecce6d 3242 Implement P1902R1, Missing feature-test macros 2017-2019.
761df906
JJ
3243 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
3244 and __cpp_generic_lambdas for -std=c++2a. Define
3245 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
3246 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
3247 __cpp_concepts for -std=c++2a.
3248
54aa6b58
MS
32492019-11-22 Martin Sebor <msebor@redhat.com>
3250
3251 PR middle-end/83859
3252 * c-attribs.c (handle_access_attribute): New function.
3253 (c_common_attribute_table): Add new attribute.
3254 (get_argument_type): New function.
3255 (append_access_attrs): New function.
3256 (get_nonnull_operand): Rename...
3257 (get_attribute_operand): ...to this.
3258 * c-common.c (get_nonnull_operand): Rename...
3259 (get_attribute_operand): ...to this.
3260
6c80b1b5
JM
32612019-11-21 Joseph Myers <joseph@codesourcery.com>
3262
3263 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
3264 of warning.
3265
192961ff
JM
32662019-11-19 Joseph Myers <joseph@codesourcery.com>
3267
3268 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
3269 warning for standard attributes mixed with fallthrough attributes.
3270
f8aea5e3
JM
32712019-11-15 Joseph Myers <joseph@codesourcery.com>
3272
3273 * c-attribs.c (handle_fallthrough_attribute): Remove static.
3274 * c-common.h (handle_fallthrough_attribute): Declare.
3275
2cc94aa8
JM
32762019-11-15 Joseph Myers <joseph@codesourcery.com>
3277
3278 * c-attribs.c (handle_deprecated_attribute): Remove static.
3279 * c-common.h (handle_deprecated_attribute): Declare.
3280
7c5890cc
JM
32812019-11-14 Joseph Myers <joseph@codesourcery.com>
3282
3283 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
3284 char for C.
3285
b2417b59
JJ
32862019-11-14 Jakub Jelinek <jakub@redhat.com>
3287
d0ec7c93
JJ
3288 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
3289 valid vendors.
3290
b2417b59
JJ
3291 * c-omp.c (c_omp_check_context_selector): Handle name lists
3292 containing string literals. Don't diagnose atomic_default_mem_order
3293 with multiple props.
3294
00be2a5f
JM
32952019-11-13 Joseph Myers <joseph@codesourcery.com>
3296
3297 * c-cppbuiltin.c (builtin_define_float_constants): Also define
3298 NORM_MAX constants. Update call to get_max_float.
3299 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
3300 constants.
3301
2dbad62d
EB
33022019-11-13 Eric Botcazou <ebotcazou@adacore.com>
3303
3304 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
3305 (dump_forward_type): Do not generate a declaration for function types.
3306 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
3307 of the component type if it is declared in another file.
3308
6ed76044
ML
33092019-11-12 Martin Liska <mliska@suse.cz>
3310
3311 * c-opts.c (c_common_post_options):
3312 Use SET_OPTION_IF_UNSET.
3313
62aee289
MR
33142019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
3315 Frederik Harwath <frederik@codesourcery.com>
3316
3317 gcc/c-family/
3318 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
3319 constant.
3320 * c-pragma.c (oacc_pragmas): Add "serial" entry.
3321
f486280c
RS
33222019-11-08 Richard Sandiford <richard.sandiford@arm.com>
3323
3324 * c-common.h (gnu_vector_type_p): New function.
3325 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
3326 vectors to satisfy gnu_vector_type_p.
3327 (c_build_vec_convert): Likewise __builtin_convertvector.
3328 (convert_vector_to_array_for_subscript): Likewise when applying
3329 implicit vector to array conversion.
3330 (scalar_to_vector): Likewise when converting vector-scalar
3331 operations to vector-vector operations.
3332
017c6491
JM
33332019-11-08 Joseph Myers <joseph@codesourcery.com>
3334
3335 * c.opt (Wold-style-definition): Initialize to -1.
3336 * c-opts.c (c_common_post_options): Set warn_old_style_definition
3337 to flag_isoc2x if not set explicitly.
3338
c01bd174
JM
33392019-11-07 Joseph Myers <joseph@codesourcery.com>
3340
3341 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
3342
0df65305
JM
33432019-11-05 Jason Merrill <jason@redhat.com>
3344
3345 * c-opts.c (c_common_post_options): -fconcepts-ts implies
3346 -fconcepts.
3347
e0c866dd
KK
33482019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
3349
3350 * c-opts.c (c_common_post_options): Update
3351 latest_abi_version.
3352
f968ef9b
JJ
33532019-11-02 Jakub Jelinek <jakub@redhat.com>
3354
d0c464d2
JJ
3355 * c-common.h (c_omp_get_context_selector): Remove.
3356 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
3357 and renamed to omp_get_context_selector.
3358
917dd789
JJ
3359 * c-omp.c (c_omp_mark_declare_variant): Use
3360 omp_context_selector_set_compare.
3361
f968ef9b
JJ
3362 PR c++/88335 - Implement P1073R3: Immediate functions
3363 * c-common.h (enum rid): Add RID_CONSTEVAL.
3364 * c-common.c (c_common_reswords): Add consteval.
3365
5f6705b7
JJ
33662019-11-01 Martin Sebor <msebor@redhat.com>
3367
3368 PR middle-end/91679
3369 PR middle-end/91647
3370 PR middle-end/91463
3371 PR middle-end/92312
3372 * c-pretty-print.c (direct_abstract_declarator): Print
3373 bound in zero-length arrays.
3374 * c.opt (-Wzero-length-bounds): New option.
3375
43f1814c
NS
33762019-10-30 Nathan Sidwell <nathan@acm.org>
3377
3378 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
3379 macros.
3380
ad1539d5
MS
33812019-10-28 Martin Sebor <msebor@redhat.com>
3382
3383 PR c/66970
3384 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
3385 even when only preprocessing.
3386 * c-common.h (names_builtin_p): Declare new function.
3387 * c-lex.c (init_c_lex): Set has_builtin.
3388 (c_common_has_builtin): Define a new function.
3389 * c-ppoutput.c (init_pp_output): Set has_builtin.
3390
135df52c
JJ
33912019-10-24 Jakub Jelinek <jakub@redhat.com>
3392
3393 * c-common.h (c_omp_context_selector_matches): Remove.
3394 * c-omp.c (c_omp_context_selector_matches): Remove.
3395 * c-attribs.c (c_common_attribute_table): Add
3396 "omp declare target {host,nohost,block}" attributes.
3397
8ad0c477
JM
33982019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
3399
3400 * c-lex.c (c_common_has_attribute): Update nodiscard value.
3401
56898e43
RS
34022019-10-14 Richard Sandiford <richard.sandiford@arm.com>
3403
3404 * c-common.h (user_facing_original_type_p): Declare.
3405 * c-common.c: Include c-spellcheck.h.
3406 (user_facing_original_type_p): New function.
3407
20de9568
JJ
34082019-10-12 Jakub Jelinek <jakub@redhat.com>
3409
3410 * c-common.h (c_omp_mark_declare_variant,
3411 c_omp_context_selector_matches): Declare.
3412 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
3413 and hsa-common.h.
3414 (c_omp_get_context_selector): Support second argument NULL.
3415 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
3416 functions.
3417 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
3418 attribute, add "omp declare variant base" and
3419 "omp declare variant variant" attributes.
3420
175a85b2
JM
34212019-10-11 Joseph Myers <joseph@codesourcery.com>
3422
3423 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
3424 CppReason(CPP_W_C11_C2X_COMPAT).
3425
fe2bc27c
JM
34262019-10-11 Joseph Myers <joseph@codesourcery.com>
3427
3428 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
3429 _Decimal64 and _Decimal128.
3430
27dfdc0f
JM
34312019-10-10 Joseph Myers <joseph@codesourcery.com>
3432
3433 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
3434 types if DFP not supported.
3435
94e7f906
JJ
34362019-10-10 Jakub Jelinek <jakub@redhat.com>
3437
3438 * c-common.h (c_omp_check_context_selector,
3439 c_omp_get_context_selector): Declare.
3440 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
3441 in diagnostic message.
3442 (c_omp_check_context_selector, c_omp_get_context_selector): New
3443 functions.
3444 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
3445 attribute.
3446 (handle_omp_declare_variant_attribute): New function.
3447
a7160771
MS
34482019-10-09 Martin Sebor <msebor@redhat.com>
3449
3450 PR tree-optimization/90879
3451 * c.opt (-Wstring-compare): New option.
3452
cb57504a
JM
34532019-10-08 Andrew Sutton <asutton@lock3software.com>
3454 Jason Merrill <jason@redhat.com>
3455
3456 Update the concepts implementation to conform to the C++20
3457 specification, improve compile times, and generally clean up
3458 the implementation.
3459
3460 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
3461 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
3462 * c.opt: Add -Wconcepts-ts.
3463 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
3464 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
3465 (set_std_cxx2a): Enable concepts by default.
3466
fbb2a6dc
JM
34672019-10-08 Joseph Myers <joseph@codesourcery.com>
3468
3469 * c-opts.c (c_common_post_options): Set
3470 -fno-fp-int-builtin-inexact for C2X.
3471
8e007055
JJ
34722019-10-05 Jakub Jelinek <jakub@redhat.com>
3473
3474 PR c++/91369 - Implement P0784R7: constexpr new
3475 * c-cppbuiltin.c (c_cpp_builtins): Predefine
3476 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
3477
843f104d
JM
34782019-10-04 Joseph Myers <joseph@codesourcery.com>
3479
3480 PR c/82752
3481 * c-format.c (C_STD_VER): Handle C2x.
3482 (C_STD_NAME): Likewise.
3483 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
3484 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
3485 modifier allowed and 'p' flag.
3486 * c-format.h (enum format_std_version): Add STD_C2X.
3487 (struct format_char_info): Mention 'p' in comment on flags2.
3488
e9c9a142
DM
34892019-10-01 David Malcolm <dmalcolm@redhat.com>
3490
3491 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
3492 calling diagnostic_show_locus, rather than destroying it afterwards.
3493
7552c36a
JJ
34942019-10-01 Jakub Jelinek <jakub@redhat.com>
3495
3496 PR c++/91925
3497 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
3498 with NULL DECL_FIELD_OFFSET.
3499
8209db25
RS
35002019-10-01 Richard Sandiford <richard.sandiford@arm.com>
3501
3502 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
3503 has a type name, use it in preference to the __vector syntax.
3504
9343bf99
RS
35052019-09-30 Richard Sandiford <richard.sandiford@arm.com>
3506
3507 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
3508 two spaces between a comma and "...".
3509
59bc434a
JJ
35102019-09-27 Jakub Jelinek <jakub@redhat.com>
3511
3512 PR c++/88203
3513 * c-common.h (c_omp_predefined_variable): Declare.
3514 * c-omp.c (c_omp_predefined_variable): New function.
3515 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
3516 for predefined variables.
3517
c6447c20
RS
35182019-09-27 Richard Sandiford <richard.sandiford@arm.com>
3519
3520 * c-common.h (build_function_call_vec): Take the original
3521 function decl as an optional final parameter.
3522 (check_builtin_function_arguments): Take the original function decl.
3523 * c-common.c (check_builtin_function_arguments): Likewise.
3524 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
3525 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
3526
c4438114
JM
35272019-09-15 Jason Merrill <jason@redhat.com>
3528
3529 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
3530 fold_for_warn in "|| mask" warning.
3531
68a57628
ML
35322019-09-10 Martin Liska <mliska@suse.cz>
3533
3534 * c.opt: Use newly added WarnRemoved.
3535
f48ef52e
ML
35362019-09-09 Martin Liska <mliska@suse.cz>
3537
3538 * c.opt: Update comment of removed
3539 options that are preserved only for backward
3540 compatibility.
3541
67f6e649
ML
35422019-09-06 Martin Liska <mliska@suse.cz>
3543
3544 PR c++/91125
3545 * c-common.c: Remove definition of flag_use_repository.
3546 * c-common.h: Likewise.
3547 * c-opts.c (c_common_handle_option):
3548 Do not handle OPT_frepo option.
3549 * c.opt: Mark the option with Deprecated.
3550
db9d2274
MP
35512019-09-04 Marek Polacek <polacek@redhat.com>
3552
3553 * c.opt (fdeduce-init-list): Ignored.
3554
68e2c199
PK
35552019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3556
3557 PR c/78736
3558 * c.opt (Wenum-conversion): New option.
3559
7a4418a5
JL
35602019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3561
3562 * c-attribs.c (handle_section_attribute): Call the
3563 handle_generic_attribute target hook after performing target
3564 independent processing.
3565 (handle_noinit_attribute): Likewise.
3566
5f76ab15
ILT
35672019-09-03 Ian Lance Taylor <iant@golang.org>
3568
3569 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
3570 when using -fgo-dump-spec.
3571
ae0d3f6a
ML
35722019-09-02 Martin Liska <mliska@suse.cz>
3573
3574 PR c++/91155
3575 * c-common.c (fname_as_string): Use cxx_printable_name for
3576 __PRETTY_FUNCTION__ same as was used before r265711.
3577
8a902edb
MP
35782019-08-28 Marek Polacek <polacek@redhat.com>
3579
3580 Implement P1152R4: Deprecating some uses of volatile.
3581 PR c++/91361
3582 * c-opts.c (c_common_post_options): Enable -Wvolatile by
3583 default for C++2a, unless -Wno-deprecated.
3584 * c.opt (Wvolatile): New warning.
3585
4742dbe7
MP
35862019-08-28 Marek Polacek <polacek@redhat.com>
3587
3588 PR c++/91360 - Implement C++20 P1143R2: constinit.
3589 * c-common.c (c_common_reswords): Add constinit and __constinit.
3590 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
3591 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
3592 RID_LAST_CXX20.
3593 (D_CXX20): Define.
3594 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
3595 * c-format.c (cxx_keywords): Add "constinit".
3596 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
3597
6a074892
JJ
35982019-08-27 Jakub Jelinek <jakub@redhat.com>
3599
3600 PR c++/91415
3601 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
3602 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
3603 like COMPOUND_EXPR rather than normal expression.
3604
22f8849d
IS
36052019-08-23 Iain Sandoe <iain@sandoe.co.uk>
3606
3607 PR pch/61250
3608 * c-lex.c (c_lex_with_flags): Don't call
3609 c_common_no_more_pch () from here.
3610
df375b03
JJ
36112019-08-23 Jakub Jelinek <jakub@redhat.com>
3612
3613 PR middle-end/91283
3614 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
3615 instead of flag_excess_precision_cmdline.
3616 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
3617 * c-opts.c (c_common_post_options): Likewise.
3618
14b7950f
MS
36192019-08-22 Martin Sebor <msebor@redhat.com>
3620
3621 PR middle-end/91490
3622 * c-common.c (braced_list_to_string): Add argument and overload.
3623 Handle flexible length arrays and unions.
3624
8bb2ee59
EB
36252019-08-21 Eric Botcazou <ebotcazou@adacore.com>
3626
3627 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
3628 function declarations where arguments are missing. Rename variables.
3629
21c1e205
RB
36302019-08-15 Richard Biener <rguenther@suse.de>
3631
3632 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
3633 enabled, define __SIZETYPE__.
3634
f0033821
CL
36352019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
3636
3637 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
3638 exclusion with "section" attribute.
3639 (attr_noinit_exclusions): New table.
3640 (handle_noinit_attribute): New function.
3641
4d732405
RS
36422019-08-13 Richard Sandiford <richard.sandiford@arm.com>
3643
3644 PR middle-end/91421
3645 * c-common.c (resolve_overloaded_builtin): Use
3646 copy_decl_built_in_function.
3647
51ad8481
MS
36482019-08-13 Martin Sebor <msebor@redhat.com>
3649
3650 PR c/80619
3651 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
3652 (asm_fprintf_length_spec): Same.
3653 * c-format.h (format_lengths): Add FMT_LEN_w.
3654
77eb117f
JJ
36552019-08-10 Jakub Jelinek <jakub@redhat.com>
3656
3657 * c-pragma.h (enum pragma_omp_clause): Add
3658 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3659
398e3feb
JJ
36602019-08-07 Jakub Jelinek <jakub@redhat.com>
3661
3662 * c-pragma.h (enum pragma_omp_clause): Add
3663 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
3664 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
3665 enumeration value.
3666
ab574db6
MP
36672019-08-05 Marek Polacek <polacek@redhat.com>
3668
3669 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
3670 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
3671 default for C++2a, unless -Wno-deprecated.
3672 * c.opt (Wcomma-subscript): New warning.
3673
554a530f
JJ
36742019-07-20 Jakub Jelinek <jakub@redhat.com>
3675
3676 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
3677 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
3678 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
3679 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
3680 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
3681 constructs with the loop construct.
3682
1a888209
JJ
36832019-07-13 Jakub Jelinek <jakub@redhat.com>
3684
3685 PR c/91149
3686 * c-omp.c (c_omp_split_clauses): Fix a pasto in
3687 OMP_CLAUSE_REDUCTION_TASK handling.
3688
1fdd6f04
JJ
36892019-07-12 Jakub Jelinek <jakub@redhat.com>
3690
3691 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
3692 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
3693
99b1c316
MS
36942019-07-09 Martin Sebor <msebor@redhat.com>
3695
3696 PR c++/61339
1fdd6f04 3697 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
3698 and others to class.
3699 * c-pretty-print.h: Same.
3700
6c1dae73
MS
37012019-07-09 Martin Sebor <msebor@redhat.com>
3702
3703 PR c++/61339
3704 * c-format.c (check_argument_type): Change class-key from class to
3705 struct and vice versa to match convention and avoid -Wclass-is-pod
3706 and -Wstruct-no-pod.
3707 * c-pretty-print.h: Same.
3708
8ba6ea87
ML
37092019-07-03 Martin Liska <mliska@suse.cz>
3710
3711 * c-common.c (try_to_locate_new_include_insertion_point): Remove
3712 dead assignemts.
3713
83eb9522
JJ
37142019-07-03 Jakub Jelinek <jakub@redhat.com>
3715
3716 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
3717 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
3718 with OMP_PARALLEL.
3719
1c6ffbab
QZ
37202019-07-02 qing zhao <qing.zhao@oracle.com>
3721
3722 PR preprocessor/90581
3723 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
3724 * c.opt: Add new option -fmax-include-depth.
3725
7ffc7de5
JM
37262019-06-26 Jason Merrill <jason@redhat.com>
3727
3728 PR c++/55442 - memory-hog with highly recursive constexpr.
3729 * c.opt (fconstexpr-loop-limit): New.
3730
361af3e4
JJ
37312019-06-25 Jakub Jelinek <jakub@redhat.com>
3732
3733 PR sanitizer/90954
3734 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
3735 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
3736
ab20d992
JJ
37372019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3738
3739 * c-common.c (c_common_nodes_and_builtins): Define
3740 alternate "__intN__" name for "__intN" types.
3741
f4af4019
JH
37422019-06-24 Jan Hubicka <jh@suse.cz>
3743
3744 * c-common.c (braced_lists_to_strings): Check that
3745 type is array or integer prior checking string flag.
3746
da9e9b57
MB
37472019-06-21 Matthew Beliveau <mbelivea@redhat.com>
3748
3749 PR c++/90875 - added -Wswitch-outside-range option
3750 * c.opt (Wswitch-outside-range): Added new option.
3751 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
3752
3f3d6a6f
MP
37532019-06-21 Marek Polacek <polacek@redhat.com>
3754
3755 PR c++/90953 - ICE with -Wmissing-format-attribute.
3756 * c-common.c (check_function_arguments_recurse): Use
3757 get_attribute_name.
3758 (check_missing_format_attribute): Likewise.
3759
1bf32c11
MP
37602019-06-19 Marek Polacek <polacek@redhat.com>
3761
3762 PR c++/60364 - noreturn after first decl not diagnosed.
3763 * c-attribs.c (handle_noreturn_attribute): No longer static.
3764 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
3765 Declare.
3766 * c-format.c (check_function_format): Use get_attribute_name.
3767
a04c0734
MS
37682019-06-19 Martin Sebor <msebor@redhat.com>
3769
3770 PR translation/90156
3771 * c-format.c (function_format_info::format_type): Adjust type.
3772 (function_format_info::is_raw): New member.
3773 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
3774 (decode_format_attr): Adjust call to decode_format_type.
3775 Avoid a redundant call to convert_format_name_to_system_name.
3776 Avoid abbreviating the word "arguments" in a diagnostic.
3777 (format_warning_substr): New function.
3778 (avoid_dollar_number): Quote dollar sign in a diagnostic.
3779 (finish_dollar_format_checking): Same.
3780 (check_format_info): Same.
3781 (struct baltoks_t): New.
3782 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
3783 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
3784 functions.
3785 (check_format_info_main): Call check_plain. Use baltoks_t. Call
3786 maybe_diag_unbalanced_tokens.
3787 (handle_format_attribute): Spell out the word "arguments" in
3788 a diagnostic.
3789
d3786ebb
MB
37902019-06-11 Matthew Beliveau <mbelivea@redhat.com>
3791
3792 PR c++/90449 - add -Winaccessible-base option.
3793 * c.opt (Winaccessible-base): New option.
3794
bf38f7e9
JJ
37952019-06-10 Jakub Jelinek <jakub@redhat.com>
3796
3797 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
3798 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
3799 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
3800 combined/composite constructs where it is not allowed. Copy over
3801 OMP_CLAUSE_REDUCTION_INSCAN.
3802
0ecf545c
MS
38032019-06-05 Martin Sebor <msebor@redhat.com>
3804
3805 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
3806 (handle_alias_ifunc_attribute): Same.
3807 (handle_copy_attribute): Same.
3808 (handle_weakref_attribute): Same.
3809 (handle_nonnull_attribute): Same.
3810 * c-warn.c (warn_for_sign_compare): Same.
3811 (warn_for_restrict): Same.
3812 * c.opt: Same.
3813
36b34127
MS
38142019-06-05 Martin Sebor <msebor@redhat.com>
3815
3816 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
3817 * c.opt (-Wformat-diag): Remove a spurious period.
3818
357a352f
JJ
38192019-05-29 Jakub Jelinek <jakub@redhat.com>
3820
3821 PR c/90628
3822 * c-common.c (check_builtin_function_arguments)
3823 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
3824 as last argument.
3825
2b8235ea
EB
38262019-05-23 Eric Botcazou <ebotcazou@adacore.com>
3827
3828 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
3829
6d86ddc4
ML
38302019-05-22 Martin Liska <mliska@suse.cz>
3831
3832 PR lto/90500
3833 * c-attribs.c (handle_copy_attribute): Do not copy
3834 target_clones attribute.
3835
419ba5b9
EB
38362019-05-21 Eric Botcazou <ebotcazou@adacore.com>
3837
3838 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
3839 * c-ada-spec.c (print_assignment_operator): New function.
3840 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
3841 assignment operators declared as methods and filter out the others.
3842
e03436e7
TS
38432019-05-17 Thomas Schwinge <thomas@codesourcery.com>
3844
3845 PR c/89433
3846 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
3847 "omp declare target".
3848
a9c697b8
MS
38492019-05-16 Martin Sebor <msebor@redhat.com>
3850
ab20d992
JJ
3851 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
3852 keywords, operators, and types in diagnostics.
3853 (handle_scalar_storage_order_attribute): Same.
3854 (handle_mode_attribute): Same.
3855 (handle_visibility_attribute): Same.
3856 (handle_assume_aligned_attribute): Same.
3857 (handle_no_split_stack_attribute): Same.
3858 * c-common.c (shorten_compare): Same.
3859 (c_common_truthvalue_conversion): Same.
3860 (cb_get_source_date_epoch): Same.
3861 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
3862 in diagnostics.
3863 (interpret_float): Same.
3864 * c-omp.c (c_finish_omp_for): Same.
3865 * c-opts.c (c_common_post_options): Same.
3866 * c-pch.c (c_common_pch_pragma): Same.
3867 * c-pragma.c (pop_alignment): Same.
3868 (handle_pragma_pack): Same.
3869 (apply_pragma_weak): Same.
3870 (handle_pragma_weak): Same.
3871 (handle_pragma_scalar_storage_order): Same.
3872 (handle_pragma_redefine_extname): Same.
3873 (add_to_renaming_pragma_list): Same.
3874 (maybe_apply_renaming_pragma): Same.
3875 (push_visibility): Same.
3876 (handle_pragma_visibility): Same.
3877 (handle_pragma_optimize): Same.
3878 (handle_pragma_message): Same.
3879 * c-warn.c (warn_for_omitted_condop): Same.
3880 (lvalue_error): Same.
a9c697b8 3881
6b943512
RB
38822019-05-15 Richard Biener <rguenther@suse.de>
3883
3884 PR c/90474
3885 * c-common.c (c_common_mark_addressable_vec): Also mark
3886 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
3887 c_mark_addressable.
ab20d992 3888
b744fc85
NS
38892019-05-06 Nathan Sidwell <nathan@acm.org>
3890
3891 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
3892
598f50d7
NS
38932019-04-30 Nathan Sidwell <nathan@acm.org>
3894
3895 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
3896
5bcc5a3b
ML
38972019-04-30 Martin Liska <mliska@suse.cz>
3898
3899 * c-pragma.c (handle_pragma_diagnostic): Provide hints
3900 for unknown options.
3901
e78a87f7
RS
39022019-04-26 Richard Sandiford <richard.sandiford@arm.com>
3903
3904 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
3905 the pointer target rather than the pointer itself.
3906
c280b7ee
JJ
39072019-04-19 Jakub Jelinek <jakub@redhat.com>
3908
3909 PR c/89888
3910 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
3911 arguments.
3912 (c_do_switch_warnings): Remove outside_range_p argument.
3913 * c-common.c (check_case_bounds): Removed.
3914 (c_add_case_label): Remove orig_type and outside_range_p arguments.
3915 Don't call check_case_bounds. Fold low_value as well as high_value.
3916 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
3917 Check for case labels outside of range of original type here and
3918 adjust them.
3919
8e8225e6
JJ
39202019-04-12 Jakub Jelinek <jakub@redhat.com>
3921
63b8a166
JJ
3922 PR translation/90041
3923 * c.opt (-fhandle-exceptions): Use %< and %> around option names
3924 in the Warn diagnostics.
3925
8e8225e6
JJ
3926 PR c/89946
3927 * c-attribs.c (handle_patchable_function_entry_attribute): Add
3928 function comment. Warn if arguments of the attribute are not positive
3929 integer constants.
3930
53a3f614
EB
39312019-04-09 Eric Botcazou <ebotcazou@adacore.com>
3932
3933 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
3934 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
3935
22be5873
EB
39362019-04-07 Eric Botcazou <ebotcazou@adacore.com>
3937
3938 * c-ada-spec.c (is_float128): New predicate extracted from...
3939 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
3940 <REAL_TYPE>: ...here. Call it.
3941
34facf20
DM
39422019-04-05 David Malcolm <dmalcolm@redhat.com>
3943
3944 PR c/89985
3945 * c-warn.c (check_address_or_pointer_of_packed_member): Add
3946 auto_diagnostic_group. Guard inform calls by result of
3947 warning_at call.
3948
05564120
MP
39492019-04-05 Marek Polacek <polacek@redhat.com>
3950
ab20d992 3951 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
05564120
MP
3952 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
3953 of RHS.
3954
7a506c3c
JM
39552019-04-03 Jason Merrill <jason@redhat.com>
3956
3957 PR c++/86586 - -fcompare-debug=-Wsign-compare.
3958 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
3959
ddeae8c8
MS
39602019-04-01 Martin Sebor <msebor@redhat.com>
3961
3962 PR c/89685
3963 * c-attribs.c (handle_copy_attribute): Handle references and
3964 non-constant expressions.
3965
a15ffa22
JJ
39662019-03-22 Jakub Jelinek <jakub@redhat.com>
3967
3968 PR c++/87481
3969 * c.opt (-fconstexpr-ops-limit=): New option.
3970
36a3a7a3
JJ
39712019-03-21 Jakub Jelinek <jakub@redhat.com>
3972
3973 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
3974 template param.
3975
bec1da64
MS
39762019-03-19 Martin Sebor <msebor@redhat.com>
3977
3978 PR tree-optimization/89688
3979 * c-common.c (braced_list_to_string): Make static.
3980 (braced_lists_to_strings): Define new function.
3981 * c-common.h (braced_list_to_string): Remove.
3982 (braced_lists_to_strings): Declare.
3983
1fe61adf
ML
39842019-03-12 Martin Liska <mliska@suse.cz>
3985
3986 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
3987
93964ebd
ML
39882019-03-11 Martin Liska <mliska@suse.cz>
3989
3990 * c-opts.c (c_common_post_options): Wrap apostrophes
3991 in gcc internal format with %'.
3992
a3f9f006
ML
39932019-03-11 Martin Liska <mliska@suse.cz>
3994
3995 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
3996 in a string format message and fix GNU coding style.
3997 * c-common.c (vector_types_convertible_p): Likewise.
3998 (c_build_vec_perm_expr): Likewise.
3999 * c-indentation.c (get_visual_column): Likewise.
4000 * c-opts.c (c_common_handle_option): Likewise.
4001 (c_common_post_options): Likewise.
4002 (sanitize_cpp_opts): Likewise.
4003 * c-pch.c (c_common_pch_pragma): Likewise.
4004 * c-pragma.c (handle_pragma_pack): Likewise.
4005
1db01ff9
JJ
40062019-03-08 Jakub Jelinek <jakub@redhat.com>
4007
4008 PR tree-optimization/89550
4009 * c-common.c (c_common_truthvalue_conversion): Only set
4010 TREE_NO_WARNING if warning_at returned true.
4011 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
4012
ba790e6f
JJ
40132019-02-25 Sandra Loosemore <sandra@codesourcery.com>
4014 Martin Sebor <msebor@gmail.com>
4015
4016 * c.opt (Wmissing-attributes): Clean up doc string.
4017
7da73ba7
JJ
40182019-02-25 Jakub Jelinek <jakub@redhat.com>
4019
4020 PR c/89495
4021 * c-format.c (maybe_read_dollar_number): Compute nargnum in
4022 HOST_WIDE_INT type to avoid overflows and change overflow_flag
4023 checking.
4024
921bb9d1
RB
40252019-02-22 Richard Biener <rguenther@suse.de>
4026
4027 * c-pch.c (no_checksum): Remove.
4028 (pch_init): Remove assertion that executable_checksum is not
4029 all zero.
4030 (c_common_valid_pch): Likewise.
4031
e2ebb05c
MS
40322019-02-18 Martin Sebor <msebor@redhat.com>
4033
4034 PR middle-end/89294
4035 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
4036
3fe53000
DM
40372019-02-16 David Malcolm <dmalcolm@redhat.com>
4038
4039 PR c++/88680
4040 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
4041 implementing -Wtype-limits.
4042
28a8cef1
MS
40432019-02-11 Martin Sebor <msebor@redhat.com>
4044
4045 PR c++/87996
4046 * c-common.c (invalid_array_size_error): New function.
4047 (valid_array_size_p): Call it. Handle size as well as type.
4048 * c-common.h (valid_constant_size_p): New function.
4049 (enum cst_size_error): New type.
4050
ec2be203
DM
40512019-01-31 David Malcolm <dmalcolm@redhat.com>
4052
4053 PR c/89122
4054 * known-headers.cc (get_stdlib_header_for_name): Add
4055 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
4056
8936f047
JJ
40572019-01-31 Jakub Jelinek <jakub@redhat.com>
4058
4059 PR libstdc++/88170
4060 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
4061 a C cast in pp_c_flag_gnu_v3 mode.
4062
6a335b96
JJ
40632019-01-29 Jakub Jelinek <jakub@redhat.com>
4064
4065 PR c/86125
4066 * c-common.c (c_common_nodes_and_builtins): Build type variants for
4067 builtin_structptr_types types even for C.
4068
2a06eba5
BE
40692019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
4070
4071 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
4072 when rhs is of array type correctly. Fix handling of nested structures.
4073 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
4074 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
4075 type casts within nested compound expressions.
4076
18a23298
JJ
40772019-01-22 Jakub Jelinek <jakub@redhat.com>
4078
4079 PR middle-end/88968
4080 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
4081 variable after using BIT_FIELD_REF.
4082
420183d9
L
40832019-01-18 H.J. Lu <hongjiu.lu@intel.com>
4084
4085 PR c/51628
4086 PR c/88664
4087 * c-common.h (warn_for_address_or_pointer_of_packed_member):
4088 Remove the boolean argument.
4089 * c-warn.c (check_address_of_packed_member): Renamed to ...
4090 (check_address_or_pointer_of_packed_member): This. Also
4091 warn pointer conversion.
4092 (check_and_warn_address_of_packed_member): Renamed to ...
4093 (check_and_warn_address_or_pointer_of_packed_member): This.
4094 Also warn pointer conversion.
4095 (warn_for_address_or_pointer_of_packed_member): Remove the
4096 boolean argument. Don't check pointer conversion here.
4097
99063eee
RS
40982019-01-15 Richard Sandiford <richard.sandiford@arm.com>
4099
4100 PR inline-asm/52813
4101 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
4102
a30d0196
JJ
41032019-01-14 Jakub Jelinek <jakub@redhat.com>
4104
4105 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
4106 and __cpp_nontype_template_parameter_auto. Add a comment that
4107 __cpp_template_auto is deprecated.
4108
2d91f79d
TH
41092019-01-14 Tom Honermann <tom@honermann.net>
4110
4111 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
4112 * c-common.c (c_common_reswords): Add char8_t.
4113 (fix_string_type): Use char8_t for the type of u8 string literals.
4114 (c_common_get_alias_set): char8_t doesn't alias.
4115 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
4116 C++.
4117 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
4118 (keyword_begins_type_specifier): Add RID_CHAR8.
4119 * c-common.h (rid): Add RID_CHAR8.
4120 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
4121 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
4122 Define char8_type_node and char8_array_type_node.
4123 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
4124 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
4125 (c_cpp_builtins): Predefine __cpp_char8_t.
4126 * c-lex.c (lex_string): Use char8_array_type_node as the type of
4127 CPP_UTF8STRING.
4128 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
4129 * c-opts.c: If not otherwise specified, enable -fchar8_t when
4130 targeting C++2a.
4131 * c.opt: Add the -fchar8_t command line option.
4132
23db6ced
MS
41332019-01-14 Martin Sebor <msebor@redhat.com>
4134
4135 PR target/88638
4136 * c-attribs.c (positional_argument): Call valid_format_string_type_p
4137 and issue errors if it fails.
4138 * c-common.h (valid_format_string_type_p): Declare.
4139 * c-format.c (valid_stringptr_type_p): Rename...
4140 (valid_format_string_type_p): ...to this and make extern.
4141 (handle_format_arg_attribute): Adjust to new name.
4142 (check_format_string): Same.
4143
234c3818
L
41442019-01-13 H.J. Lu <hongjiu.lu@intel.com>
4145
4146 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
4147 Replace "may may" with "may" in warning message.
4148
d8fcab68
JJ
41492019-01-07 Jakub Jelinek <jakub@redhat.com>
4150
4151 PR c++/85052
4152 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
4153 (c_build_vec_convert): Declare.
4154 * c-common.c (c_build_vec_convert): New function.
4155
29d24852
MS
41562019-01-04 Martin Sebor <msebor@redhat.com>
4157
4158 PR c/88546
4159 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
4160 Handle C++ empty throw specification and C11 _Noreturn.
4161 (has_attribute): Also handle C11 _Noreturn.
4162
9069a4c9
MS
41632019-01-04 Martin Sebor <msebor@redhat.com>
4164
4165 PR c/88363
4166 * c-attribs.c (positional_argument): Also accept enumerated types.
4167
a5544970
JJ
41682019-01-01 Jakub Jelinek <jakub@redhat.com>
4169
4170 Update copyright years.
4171
da77eace
L
41722018-12-20 H.J. Lu <hongjiu.lu@intel.com>
4173
4174 PR c/51628
4175 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
4176 * c-warn.c (check_alignment_of_packed_member): New function.
4177 (check_address_of_packed_member): Likewise.
4178 (check_and_warn_address_of_packed_member): Likewise.
4179 (warn_for_address_or_pointer_of_packed_member): Likewise.
4180 * c.opt: Add -Wno-address-of-packed-member.
4181
573767d4
DM
41822018-12-20 David Malcolm <dmalcolm@redhat.com>
4183
4184 PR c++/87504
4185 * c-warn.c (get_outermost_macro_expansion): New function.
4186 (spelled_the_same_p): Use it to unwind the macro expansions, and
4187 compare the outermost macro in each nested expansion, rather than
4188 the innermost.
4189
a14feb3c
DM
41902018-12-19 David Malcolm <dmalcolm@redhat.com>
4191
4192 PR c++/87504
4193 * c-common.h (warn_tautological_cmp): Convert 1st param from
4194 location_t to const op_location_t &.
4195 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
4196 when testing for INTEGER_CST.
4197 (warn_tautological_bitwise_comparison): Convert 1st param from
4198 location_t to const op_location_t &; use it to build a
4199 binary_op_rich_location, and use this.
4200 (spelled_the_same_p): New function.
4201 (warn_tautological_cmp): Convert 1st param from location_t to
4202 const op_location_t &. Warn for macro expansions if
4203 spelled_the_same_p. Use binary_op_rich_location.
4204
dfd7fdca
DM
42052018-12-19 David Malcolm <dmalcolm@redhat.com>
4206
4207 PR c++/43064
4208 PR c++/43486
4209 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
4210 (verify_tree): Handle location wrappers.
4211 (c_common_truthvalue_conversion): Strip any location wrapper.
4212 Handle CONST_DECL.
4213 (fold_offsetof): Strip any location wrapper.
4214 (complete_array_type): Likewise for initial_value.
4215 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
4216 index before checking for INTEGER_CST.
4217 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
4218 print parentheses around location wrappers.
4219 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
4220 before checking for INTEGER_CST.
4221 (warn_tautological_bitwise_comparison): Call
4222 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
4223 before checking for INTEGER_CST.
4224 (readonly_error): Strip any location wrapper.
4225 (warn_array_subscript_with_type_char): Strip location wrappers
4226 before checking for INTEGER_CST. Use the location of the index if
4227 available.
4228
5c8b3702
JM
42292018-12-06 Jason Merrill <jason@redhat.com>
4230
4231 PR c++/88136 - -Wdeprecated-copy false positives
4232 * c.opt (Wdeprecated-copy-dtor): New.
4233 (Wdeprecated-copy): Move to -Wextra.
4234
673670da
MS
42352018-11-29 Martin Sebor <msebor@redhat.com>
4236
4237 PR c/88172
4238 PR testsuite/88208
4239 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
4240 alignments to values less than the target requires.
4241 (has_attribute): For attribute aligned consider both the attribute
4242 and the alignment bits.
4243 * c-common.c (c_init_attributes): Optionally issue a warning for
4244 zero alignment.
4245
04864ec8
MS
42462018-11-28 Martin Sebor <msebor@redhat.com>
4247
4248 PR c/88065
4249 PR c/87297
4250 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
4251 or destination is an error.
4252
ace83db0
JJ
42532018-11-28 Jakub Jelinek <jakub@redhat.com>
4254
4255 PR c++/88215
4256 * c-ubsan.c: Include langhooks.h.
4257 (ubsan_instrument_division): Change gcc_assert that main variants
4258 of op0 and op1 types are equal to gcc_checking_assert that the
4259 main variants are compatible types.
4260
da193a27
EB
42612018-11-27 Eric Botcazou <ebotcazou@adacore.com>
4262
4263 * c-ada-spec.c: Include stringpool.h.
4264 (has_static_fields): Return false for incomplete types.
4265 (is_tagged_type): Likewise.
4266 (has_nontrivial_methods): Likewise.
4267 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
4268 (struct overloaded_name_hash): New structure.
4269 (struct overloaded_name_hasher): Likewise.
4270 (overloaded_names): New global variable.
4271 (init_overloaded_names): New static function.
4272 (overloaded_name_p): New predicate.
4273 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
4274 on the TYPE_STUB_DECL of the original type of a typedef, if any.
4275 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
4276 Remove always-true condition and dump forward types.
4277 (dump_ada_specs): Delete overloaded_names.
4278
98f08eb8
MS
42792018-11-20 Martin Sebor <msebor@redhat.com>
4280
4281 * c-attribs.c (type_for_vector_size): New function.
4282 (type_valid_for_vector_size): Same.
4283 (handle_vector_size_attribute): Move code to the functions above
4284 and call them.
4285 (validate_attribute, has_attribute): New functions.
4286 * c-common.h (has_attribute): Declare.
4287 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
4288 * c-common.c (c_common_resword): Same.
4289
2674fa47
JM
42902018-11-16 Jason Merrill <jason@redhat.com>
4291
4292 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
4293 * c-attribs.c (attr_cold_hot_exclusions): Make public.
4294
258b3854
JJ
42952018-11-16 Jakub Jelinek <jakub@redhat.com>
4296
4297 PR middle-end/87854
4298 * c-common.c (fix_string_type): Reject string literals larger than
4299 TYPE_MAX_VALUE (ssizetype) bytes.
4300
1d249509
MS
43012018-11-15 Martin Sebor <msebor@redhat.com>
4302
4303 PR c++/87541
4304 PR c++/87542
4305 * c-attribs.c (positional_argument): New function.
4306 (handle_alloc_size_attribute): Use it and simplify.
4307 (handle_alloc_align_attribute): Same.
4308 (handle_assume_aligned_attribute): Same.
4309 (handle_nonnull_attribute): Same.
4310 * c-common.c (check_function_arguments): Pass fntype to
4311 check_function_format.
4312 * c-common.h (check_function_format): Add an argument.
4313 (PosArgFlags, positional_argument): Declare new type and function.
4314 * c-format.c (decode_format_attr): Add arguments.
4315 (check_format_string, get_constant): Same.
4316 (convert_format_name_to_system_name): Adjust.
4317
478dd60d
DM
43182018-11-15 David Malcolm <dmalcolm@redhat.com>
4319
4320 PR other/19165
4321 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
4322
8cca0163
JJ
43232018-11-14 Jakub Jelinek <jakub@redhat.com>
4324
8ee09943
JJ
4325 P1236R1 - Signed integers are two's complement
4326 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
4327 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
4328 with in-range second operand well defined for -std=c++2a.
4329
8cca0163
JJ
4330 PR other/88007
4331 * c-common.c (parse_optimize_options): Allocate option string from
4332 opts_obstack rather than as GC memory. Move the allocation after
4333 warning for invalid option.
4334
620e594b
DM
43352018-11-13 David Malcolm <dmalcolm@redhat.com>
4336
4337 * c-common.c (c_get_substring_location): Update for renaming of
4338 get_source_location_for_substring to get_location_within_string.
4339 * c-lex.c: Replace "source_location" with "location_t".
4340 * c-opts.c: Likewise.
4341 * c-ppoutput.c: Likewise.
4342
f9731de3
MS
43432018-11-13 Martin Sebor <msebor@redhat.com>
4344
4345 PR middle-end/81824
4346 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
4347 (handle_tls_model_attribute): Improve diagnostics.
4348
e4bd6d5e
JM
43492018-11-12 Jason Merrill <jason@redhat.com>
4350
a6bb6b07
JM
4351 * c-cppbuiltin.c (c_cpp_builtins): Define
4352 __cpp_impl_destroying_delete.
4353
e4bd6d5e
JM
4354 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
4355 __cpp_conditional_explicit.
4356
79a2c428
MS
43572018-11-09 Martin Sebor <msebor@redhat.com>
4358
4359 PR middle-end/81824
4360 * c-attribs.c (handle_copy_attribute): New function.
4361
4c7bd361
MS
43622018-11-09 Martin Sebor <msebor@redhat.com>
4363
4364 PR c/87795
4365 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
4366
28567c40
JJ
43672018-11-08 Jakub Jelinek <jakub@redhat.com>
4368
4369 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
4370 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
4371 enum omp_memory_order MEMORY_ORDER.
4372 (c_finish_omp_flush): Add MO argument.
4373 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
4374 (c_finish_omp_for): Add FINAL_P argument.
4375 * c-omp.c: Include memmodel.h.
4376 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
4377 OMP_TASKGROUP_CLAUSES to it.
4378 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
4379 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
4380 instead of OMP_ATOMIC_SEQ_CST.
4381 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
4382 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
4383 __atomic_thread_fence call with the given value.
4384 (check_omp_for_incr_expr): Formatting fixes.
4385 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
4386 even in OpenMP loops, diagnose if NE_EXPR and incr expression
4387 is not constant expression 1 or -1. Transform NE_EXPR loops
4388 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
4389 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
4390 loops too.
4391 (c_omp_split_clauses): Add support for combined
4392 #pragma omp parallel master and
4393 #pragma omp {,parallel }master taskloop{, simd} constructs.
4394 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
4395 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
4396 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
4397 (c_omp_predetermined_sharing): Don't return
4398 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
4399 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
4400 PRAGMA_OMP_REQUIRES.
4401 * c-pragma.h (enum pragma_kind): Likewise.
4402 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
4403 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
4404
204839e7
DM
44052018-11-08 David Malcolm <dmalcolm@redhat.com>
4406
4407 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
4408
d8010ee4
DM
44092018-11-08 David Malcolm <dmalcolm@redhat.com>
4410
4411 * c-format.c (local_cgraph_node_ptr_node): New variable.
4412 (gcc_dump_printf_char_table): Add entry for %C.
4413 (get_pointer_to_named_type): New function, taken from the handling
4414 code for "gimple *" from...
4415 (init_dynamic_diag_info): ...here. Add handling for
4416 "cgraph_node *".
4417 * c-format.h (T_CGRAPH_NODE): New.
4418
4be5c72c
JM
44192018-10-19 Jason Merrill <jason@redhat.com>
4420
4421 * c-cppbuiltin.c (c_cpp_builtins): Add
4422 __cpp_nontype_template_parameter_class.
4423
f3f6029d
NS
44242018-10-31 Nathan Sidwell <nathan@acm.org>
4425
ab5324fb
NS
4426 * c-opts.c (c_finish_options): Force command line macro
4427 location. Refactor to avoid repeating main debug hook.
4428 (push_command_line_include): Clarify comment.
4429
f3f6029d
NS
4430 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
4431
91e3ec29
MS
44322018-10-30 Martin Sebor <msebor@redhat.com>
4433
4434 PR middle-end/87041
4435 * c-format.c (check_format_types): Avoid diagnosing null pointer
4436 arguments to printf-family of functions.
4437
b5ff4f5c
MP
44382018-10-30 Marek Polacek <polacek@redhat.com>
4439
4440 Implement P0892R2, explicit(bool).
4441 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
4442
7e2de6df
DM
44432018-10-29 David Malcolm <dmalcolm@redhat.com>
4444
4445 * name-hint.h (name_hint::take_deferred): New member function.
4446
b2bf438c
DM
44472018-10-29 David Malcolm <dmalcolm@redhat.com>
4448
4449 PR c++/56856
4450 * c-common.c (check_function_sentinel): Call fold_for_warn on the
4451 argument.
4452 (check_function_restrict): Rename param "argarray" to
4453 "unfolded_argarray", and make a copy named "argarray", calling
4454 fold_for_warn on each argument.
4455 (check_function_arguments): Add note about responsibility for
4456 folding the arguments.
4457
9f936c86
JM
44582018-10-17 Joseph Myers <joseph@codesourcery.com>
4459
4460 * c-common.c (flag_isoc2x): New variable.
4461 * c-common.h (clk_c): Update comment to reference C2X.
4462 (flag_isoc99, flag_isoc11): Update comments to reference future
4463 standard versions in general.
4464 (flag_isoc2x): Declare.
4465 * c-opts.c (set_std_c2x): New function.
4466 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
4467 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
4468 flag_isoc2x to 0.
4469 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
4470
7a8a92c4
JM
44712018-10-17 Joseph Myers <joseph@codesourcery.com>
4472
4473 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
4474 (std=iso9899:2018): Document C17 as published in 2018.
4475
4dc003ff
CL
44762018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
4477
4478 PR c++/87364
4479 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
4480
79371671
WW
44812018-10-11 Will Wray <wjwray@gmail.com>
4482
4483 PR c++/87364
4484 * c-pretty-print.h (pp_c_type_cast): Prototype.
4485 (pp_c_integer_constant): Likewise.
4486 * c-pretty-print.c (pp_c_type_cast): No longer static.
4487 (pp_c_integer_constant): Likewise.
4488 (pp_c_enumeration_constant): Fix loop termination when finding
4489 name of constant. No longer returns a value. Call
4490 pp_c_integer_constant.
4491 (c_pretty_printer::constant): Update for changes to
4492 pp_c_enumeration_constant.
4493
46c62690
JJ
44942018-10-11 Jakub Jelinek <jakub@redhat.com>
4495
4496 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
4497 for no_unique_address.
4498
c24300ba
DM
44992018-10-09 David Malcolm <dmalcolm@redhat.com>
4500
4501 * c-common.c (c_option_controlling_cpp_error): Rename to...
4502 (c_option_controlling_cpp_diagnostic): ...this, and convert
4503 "reason" from int to enum.
4504 (c_cpp_error): Rename to...
4505 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4506 * c-common.h (c_cpp_error): Rename to...
4507 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4508 * c-opts.c (c_common_init_options): Update for renaming.
4509
8656dafa
RS
45102018-10-08 Richard Sandiford <richard.sandiford@arm.com>
4511
4512 PR c/87286
4513 * c-common.c (vector_types_compatible_elements_p): Use
4514 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
4515
8cff0652
VK
45162018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
4517
4518 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
4519 to generate constructor destructor priority warning.
4520 * c.opt (-Wprio-ctor-dtor): New option.
4521
bedf03a2
JM
45222018-10-01 Jason Merrill <jason@redhat.com>
4523
4524 * c-lex.c (c_common_has_attribute): Add no_unique_address.
4525
6cc430c1
EB
45262018-10-01 Eric Botcazou <ebotcazou@adacore.com>
4527
4528 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
4529 (dump_ada_node): Add const keyword.
4530
87677ac7
ML
45312018-09-25 Martin Liska <mliska@suse.cz>
4532
4533 * c-common.c (c_common_truthvalue_conversion):
4534 Remove Pascal from documentation.
4535
518196cb
EB
45362018-09-21 Eric Botcazou <ebotcazou@adacore.com>
4537
4538 * c-ada-spec.c: Include diagnostic.h.
4539 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
4540
a599af84
MP
45412018-09-19 Marek Polacek <polacek@redhat.com>
4542
4543 * c.opt (Wclass-conversion): New.
4544
9c4a4b3c
DM
45452018-09-17 David Malcolm <dmalcolm@redhat.com>
4546
4547 * c-format.c (range_label_for_format_type_mismatch::get_text):
4548 Update for new param.
4549
c896ecfe
DM
45502018-09-17 David Malcolm <dmalcolm@redhat.com>
4551
4552 * c-format.c (format_warning_at_char): Update for introduction of
4553 format_string_diagnostic_t.
4554 (format_type_warning): Likewise.
4555
80c6d1f4
MJ
45562018-09-17 Martin Jambor <mjambor@suse.cz>
4557
4558 PR c/63886
4559 * c.opt (Wabsolute-value): New.
4560
6d900107
BE
45612018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
4562
4563 * c-common.c (complete_flexible_array_elts): New helper function.
4564 * c-common.h (complete_flexible_array_elts): Declare.
4565
b5764229
BE
45662018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4567
4568 * c-common.c (braced_list_to_string): Remove eval parameter.
4569 Add some more checks. Always create zero-terminated STRING_CST.
4570 * c-common.h (braced_list_to_string): Adjust prototype.
4571
85204e23
DM
45722018-08-27 David Malcolm <dmalcolm@redhat.com>
4573
4574 PR 87091
4575 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
4576 to a tri-state.
4577 (maybe_suggest_missing_token_insertion): Likewise.
4578 (maybe_add_include_fixit): Add param "override_location". If set,
4579 and source-printing is enabled, then override the rich_location's
4580 primary location with that of the insertion point for the fix-it
4581 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
4582 * c-common.h (extern void maybe_add_include_fixit): Add bool
4583 param.
4584 * c-format.c (selftest::test_type_mismatch_range_labels): Update
4585 for conversion of show_caret_p to a tri-state.
4586 * c-warn.c (warn_for_restrict): Likewise.
4587 * known-headers.cc
4588 (suggest_missing_header::~suggest_missing_header): Update call to
4589 maybe_add_include_fixit to suggest overriding the location, as it
4590 is for a note.
4591
3d78e008
ML
45922018-08-27 Martin Liska <mliska@suse.cz>
4593
4594 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
4595 fndecl_built_in_p and remove check for FUNCTION_DECL if
4596 possible.
3d78e008
ML
4597 (check_builtin_function_arguments): Likewise.
4598 (reject_gcc_builtin): Likewise.
4599 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
4600
b5be6d0c
MP
46012018-08-26 Marek Polacek <polacek@redhat.com>
4602
4603 PR c++/87029, Implement -Wredundant-move.
4604 * c.opt (Wredundant-move): New option.
4605
79ca9c35
MP
46062018-08-21 Marek Polacek <polacek@redhat.com>
4607
4608 PR c++/86981, Implement -Wpessimizing-move.
4609 * c.opt (Wpessimizing-move): New option.
4610
097f82ec
DM
46112018-08-20 David Malcolm <dmalcolm@redhat.com>
4612
4613 PR other/84889
4614 * c-attribs.c (common_handle_aligned_attribute): Add
4615 auto_diagnostic_group instance.
4616 * c-indentation.c (warn_for_misleading_indentation): Likewise.
4617 * c-opts.c (c_common_post_options): Likewise.
4618 * c-warn.c (warn_logical_not_parentheses): Likewise.
4619 (warn_duplicated_cond_add_or_warn): Likewise.
4620 (warn_for_multistatement_macros): Likewise.
4621
3fb558b1
NS
46222018-08-20 Nathan Sidwell <nathan@acm.org>
4623
4624 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
4625 access.
4626
800c0e98
NS
46272018-08-17 Nathan Sidwell <nathan@acm.org>
4628
4629 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
4630 field.
4631 (laxy_hex_fp_value_count): Make unsigned.
4632 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
4633 manipulate the macro.
4634 (builtin_defin_with_hex_fp_value): Adjust callback name, use
4635 cpp_define_lazily.
4636
6f795a92
DM
46372018-08-17 David Malcolm <dmalcolm@redhat.com>
4638
4639 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
4640 (gcc_dump_printf_length_specs): New.
4641 (gcc_dump_printf_flag_pairs): New.
4642 (gcc_dump_printf_flag_specs): New.
4643 (gcc_dump_printf_char_table): New.
4644 (format_types_orig): Add entry for "gcc_dump_printf".
4645 (init_dynamic_diag_info): Set up length_char_specs and
4646 conversion_specs for gcc_dump_printf_format_type.
4647 (handle_format_attribute): Handle gcc_dump_printf_format_type.
4648
c5d725c0
NS
46492018-08-17 Nathan Sidwell <nathan@acm.org>
4650
10f04917
NS
4651 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
4652
c5d725c0
NS
4653 * c-ada-spec.c: Don't #include "cpp-id-data.h"
4654 * c-cppbuiltin.c: Likewise.
4655
c0c12356
ML
46562018-08-17 Martin Liska <mliska@suse.cz>
4657
4658 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
4659 Ignore/Deprecated flag. Warning is done automatically for
4660 Deprecated flags.
c0c12356 4661
10fcc142
DM
46622018-08-16 David Malcolm <dmalcolm@redhat.com>
4663
4664 PR c++/70693
4665 * c-common.c (selftest::c_family_tests): Call
4666 selftest::c_indentation_c_tests.
4667 * c-common.h (selftest::c_indentation_c_tests): New decl.
4668 * c-indentation.c: Include "selftest.h".
4669 (next_tab_stop): Add "tab_width" param, rather than accessing
4670 cpp_opts.
4671 (get_visual_column): Likewise. Clarify comment. Bulletproof
4672 against reading past the end of the line.
4673 (get_first_nws_vis_column): Add "tab_width" param.
4674 (detect_intervening_unindent): Likewise.
4675 (should_warn_for_misleading_indentation): Read tab width from
4676 cpp_opts and pass around.
4677 (selftest::test_next_tab_stop): New test.
4678 (selftest::assert_get_visual_column_succeeds): New function.
4679 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
4680 (selftest::assert_get_visual_column_fails): New function.
4681 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
4682 (selftest::test_get_visual_column): New test.
4683 (selftest::c_indentation_c_tests): New function.
4684
3f6677f4
NS
46852018-08-16 Nathan Sidwell <nathan@acm.org>
4686
4687 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
4688 (store_ada_macro): Likewise.
4689 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
4690 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
4691
96e6ae57
DM
46922018-08-15 David Malcolm <dmalcolm@redhat.com>
4693
4694 * c-format.c: Include "selftest-diagnostic.h" and
4695 "gcc-rich-location.h".
4696 (format_warning_at_char): Pass NULL for new label params of
4697 format_warning_va.
4698 (class indirection_suffix): New class.
4699 (class range_label_for_format_type_mismatch): New class.
4700 (format_type_warning): Move logic for generating "*" suffix to
4701 class indirection_suffix. Create "fmt_label" and "param_label"
4702 to show their types, and pass them to the
4703 format_warning_at_substring calls.
4704 (selftest::test_type_mismatch_range_labels): New test.
4705 (selftest::c_format_c_tests): Call it.
4706
23aa9f7c
MS
47072018-08-13 Martin Sebor <msebor@redhat.com>
4708
4709 PR tree-optimization/71625
4710 * c-common.c (braced_list_to_string): New function.
4711 * c-common.h (braced_list_to_string): Declare it.
4712
f10a9135
NS
47132018-08-08 Nathan Sidwell <nathan@acm.org>
4714
4715 * c-common.c (try_to_locate_new_include_inertion_point): Use
4716 linemap_included_from_linemap.
4717 * c-lex.c (fe_file_change): Use linemap_included_from.
4718 * c-ppoutput.c (pp_file_change): Likewise.
4719
8a45b051
MS
47202018-08-01 Martin Sebor <msebor@redhat.com>
4721
4722 PR tree-optimization/86650
ab20d992 4723 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
8a45b051
MS
4724 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
4725 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
4726 * c-format.h (T89_G): Update to be "gimple *" rather than
4727 "gcall *".
4728 (local_gcall_ptr_node): Rename...
4729 (local_gimple_ptr_node): ...to this.
4730
e540ccc0
DM
47312018-07-31 David Malcolm <dmalcolm@redhat.com>
4732
4733 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
4734 table entries for gcc_diag_char_table, and the 'Z' entry from
4735 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
4736 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
4737 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
4738 adding missing "Z" for this table. Remove erroneous "G" and "K"
4739 entries.
4740 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4741 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
4742 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4743
425fc685
RE
47442018-07-31 Richard Earnshaw <rearnsha@arm.com>
4745
4746 * c-common.c (speculation_safe_resolve_call): New function.
4747 (speculation_safe_resolve_params): New function.
4748 (speculation_safe_resolve_return): New function.
4749 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
4750 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
4751 __HAVE_SPECULATION_SAFE_VALUE.
4752
181463c2
DM
47532018-07-20 David Malcolm <dmalcolm@redhat.com>
4754
4755 * c-common.c (c_cpp_error): Remove redundant "line_table"
4756 parameter from call to rich_location::set_range.
4757 (maybe_suggest_missing_token_insertion): Likewise.
4758
0d7f9065
MS
47592018-07-20 Martin Sebor <msebor@redhat.com>
4760
4761 PR middle-end/82063
ab20d992 4762 * c.opt (-Warray-bounds): Remove redundant -Wall.
0d7f9065 4763
00abf86c
MS
47642018-07-20 Martin Sebor <msebor@redhat.com>
4765
4766 PR middle-end/82063
4767 * c-common.h (c_common_handle_option): Change function argument
4768 to HOST_WIDE_INT.
4769 * c-opts.c (c_common_init_options): Same.
4770 (c_common_handle_option): Same. Remove special handling of
4771 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
4772 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
4773 options to take a HOST_WIDE_INT argument and accept a byte-size
4774 suffix. Initialize.
4775 (-Wvla-larger-than): Same.
4776 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
4777 (-Wno-vla-larger-than): Same.
4778
9b452033
JJ
47792018-07-12 Jakub Jelinek <jakub@redhat.com>
4780
4781 * c-attribs.c (c_common_attribute_table): Add
4782 "omp declare target implicit" attribute.
4783
cd0762f3
RB
47842018-07-12 Richard Biener <rguenther@suse.de>
4785
4786 PR c/86453
4787 * c-attribs.c (handle_packed_attribute): Do not build a variant
4788 type with TYPE_PACKED, instead ignore the attribute if we may
4789 not apply to the original type.
4790
0b27c3ed
JJ
47912018-07-10 Jakub Jelinek <jakub@redhat.com>
4792
4793 PR c++/86443
4794 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
4795 to contain TREE_LIST for both the original class iterator and the
4796 "last" helper var.
4797
e730a0ef
EB
47982018-07-07 Eric Botcazou <ebotcazou@adacore.com>
4799
4800 * c-ada-spec.c (to_ada_name): Remove index parameter.
4801 (pp_ada_tree_identifier): Likewise.
4802 (dump_ada_macros): Adjust call to to_ada_name.
4803 (struct overloaded_name_hash): Delete.
4804 (struct overloaded_name_hasher): Likewise.
4805 (overloaded_names): Likewise.
4806 (compute_overloading_index): Likewise.
4807 (dump_ada_decl_name): Do not call compute_overloading_index and
4808 adjust calls to pp_ada_tree_identifier.
4809 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
4810 (dump_ada_import): Add spc parameter and switch to aspect syntax.
4811 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
4812 (dump_ada_enum_type): Remove type and display_convention parameters.
4813 Adjust calls to pp_ada_tree_identifier.
4814 (dump_ada_node): Likewise and for dump_ada_structure.
4815 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
4816 and tidy up.
4817 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
4818 syntax.
4819 (print_constructor): Adjust call to pp_ada_tree_identifier.
4820 (print_destructor): Likewise.
4821 (dump_ada_declaration): Switch to aspect syntax.
4822 (dump_ada_structure): Likewise and tidy up. Replace display_convention
4823 parameter with nested parameter.
4824 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
4825 (dump_ada_specs): Do not delete overloaded_names table.
4826
8de583fc
PB
48272018-07-06 Peter Bergner <bergner@linux.ibm.com>
4828
4829 PR target/86324
e730a0ef 4830 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
4831 target hook.
4832
09cff37b
NS
48332018-07-05 Nathan Sidwell <nathan@acm.org>
4834
4835 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
4836 NO_IMPLICIT_EXTERN_C.
4837
98086b2b
ML
48382018-06-28 Martin Liska <mliska@suse.cz>
4839
4840 * cppspec.c: Include opt-suggestions.h.
4841
ab20d992
JJ
48422018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4843 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
4844 Cesar Philippidis <cesar@codesourcery.com>
4845
4846 * c-pragma.h (enum pragma_omp_clause): Add
4847 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
4848 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
4849
f41b7612
JJ
48502018-06-20 Jakub Jelinek <jakub@redhat.com>
4851
4852 PR c++/86210
4853 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
4854 comment.
4855
4252ccd7
MS
48562018-06-18 Martin Sebor <msebor@redhat.com>
4857
4858 PR middle-end/85602
4859 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
4860 nonstring.
4861
e197e64e
KV
48622018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4863
4864 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
4865
34a7a230
JM
48662018-06-13 Jason Merrill <jason@redhat.com>
4867
5cef3733
JM
4868 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
4869 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
4870 handling.
4871
34a7a230
JM
4872 PR c++/86094 - wrong code with defaulted move ctor.
4873 * c-opts.c (c_common_post_options): Bump the current ABI version to
4874 13. Set warn_abi_version and flag_abi_compat_version to the current
4875 version rather than 0. Fix defaulting flag_abi_compat_version from
4876 warn_abi_version.
4877
bb0f14ae
MS
48782018-06-12 Martin Sebor <msebor@redhat.com>
4879
4880 PR c/85931
4881 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
4882 sizeof source and destination yields the same value.
4883
3713f2e2
ML
48842018-06-12 Martin Liska <mliska@suse.cz>
4885
4886 * c.opt: Make MPX-related options as Deprecated.
4887
4af78ef8
DM
48882018-06-08 David Malcolm <dmalcolm@redhat.com>
4889
4890 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
4891 rather than 0.
4892
31db0fe0
ML
48932018-06-08 Martin Liska <mliska@suse.cz>
4894
4895 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
4896 for MPX (macros, related functions, fields in cgraph_node, ...).
4897 (handle_bnd_legacy): Likewise.
4898 (handle_bnd_instrument): Likewise.
4899 * c.opt: Likewise.
4900
fe16acf2
JJ
49012018-06-06 Jakub Jelinek <jakub@redhat.com>
4902
4903 PR c++/86068
4904 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
4905 __cpp_transactional_memory to 201500 instead of 210500.
4906
4dbdb49b
JM
49072018-06-06 Jason Merrill <jason@redhat.com>
4908
4909 PR c++/85710 - ICE with -Wmemset-elt-size.
4910 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
4911
f8ad043f
JM
49122018-06-01 Jason Merrill <jason@redhat.com>
4913
4914 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
4915 201703.
4916
abc24d93
EB
49172018-06-01 Eric Botcazou <ebotcazou@adacore.com>
4918
4919 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
4920 declaration for a typedef independently of whether the declaration of
4921 the subtype is generated.
4922
d258f4aa
MS
49232018-05-31 Martin Sebor <msebor@redhat.com>
4924
4925 PR c/82063
4926 * c.opt (-Wno-alloc-size-larger-than): New option.
4927
b67b9225
DP
49282018-04-22 David Pagan <dave.pagan@oracle.com>
4929
4930 PR c/55976
4931 * c-opts.c (c_common_post_options): Set default for warn_return_type
ab20d992 4932 for C++/C++ with ObjC extensions only. For C, makes it possible to
b67b9225
DP
4933 differentiate between default (no option), -Wreturn-type, and
4934 -Wno-return-type.
4935
04eb9c55
JM
49362018-05-29 Jason Merrill <jason@redhat.com>
4937
4938 * c.opt (Winit-list-lifetime): New flag.
4939
b0c31bc6
BE
49402018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
4941
4942 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
4943 splay_tree_delete_pointers.
4944
44284983
JJ
49452018-05-26 Jakub Jelinek <jakub@redhat.com>
4946
4947 PR bootstrap/85921
4948 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
4949 noinline variable to workaround broken kernel headers.
4950
b46b715d
JM
49512018-05-18 Jason Merrill <jason@redhat.com>
4952
4953 * c.opt (Wdeprecated-copy): New flag.
4954
40659769
ML
49552018-05-17 Martin Liska <mliska@suse.cz>
4956
4957 * c-warn.c (overflow_warning): Do not use
4958 space in between 'G_' and '('.
4959
403962ea
JM
49602018-05-09 Jason Merrill <jason@redhat.com>
4961
4962 * c-common.c (valid_array_size_p): Add complain parameter.
4963 * c-common.h: ...which defaults to true.
4964
1c9ee609
JJ
49652018-05-11 Jakub Jelinek <jakub@redhat.com>
4966
4967 PR c/85696
4968 * c-omp.c (c_omp_predetermined_sharing): Return
4969 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
4970
19916065
ML
49712018-05-11 Martin Liska <mliska@suse.cz>
4972
92a285c1 4973 PR sanitizer/85556
19916065
ML
4974 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
4975 TREE_LIST values.
4976
79e7b1fe
JJ
49772018-05-10 Jakub Jelinek <jakub@redhat.com>
4978
4979 PR c++/85662
4980 * c-common.h (fold_offsetof_1): Removed.
4981 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
4982 CTX argument defaulted to ERROR_MARK.
4983 * c-common.c (fold_offsetof_1): Renamed to ...
4984 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
4985 argument, convert the pointer constant to TYPE and use size_binop
4986 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
4987 a pointer type. Adjust recursive calls.
4988
86c12f76
EB
49892018-05-10 Eric Botcazou <ebotcazou@adacore.com>
4990
4991 PR c++/85400
4992 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
4993
ee336e84
NS
49942018-05-07 Nathan Sidwell <nathan@acm.org>
4995
4996 * c.opt (ffor-scope): Remove functionality, issue warning.
4997
6c072e21
NS
49982018-05-03 Nathan Sidwell <nathan@acm.org>
4999
5000 * c.opt (ffriend-injection): Remove functionality, issue warning.
5001
2cc7d3a7
DM
50022018-05-01 David Malcolm <dmalcolm@redhat.com>
5003
5004 PR c/84258
5005 * c-format.c (struct format_check_results): Add field
5006 "number_non_char".
5007 (check_format_info): Initialize it, and warn if encountered.
5008 (check_format_arg): Distinguish between wide char and
5009 everything else when detecting arrays of non-char.
5010
7761dfbe
DM
50112018-04-30 David Malcolm <dmalcolm@redhat.com>
5012
5013 * c-format.c (get_corrected_substring): Update for
5014 location_get_source_line returning a char_span. Use a char_span
5015 when handling the prefix of the correction.
5016 * c-indentation.c (get_visual_column): Update for
5017 location_get_source_line returning a char_span.
5018 (get_first_nws_vis_column): Likewise.
5019
62e98ef1
DM
50202018-03-29 David Malcolm <dmalcolm@redhat.com>
5021
5022 PR c++/84269
5023 * known-headers.cc (get_stdlib_header_for_name): Add various names
5024 from <assert.h>, <string.h>, and <memory.h>; add more names from
5025 <stdio.h>.
5026
a7dea617
JJ
50272018-03-27 Jakub Jelinek <jakub@redhat.com>
5028
5029 PR c++/85061
5030 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
5031 get_base_address of the second operand is a VAR_P, rather than the
5032 operand itself, and use gcc_checking_assert instead of gcc_assert.
5033
889a3a30
MP
50342018-03-23 Marek Polacek <polacek@redhat.com>
5035
5036 PR c++/85045
5037 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
5038 <case RDIV_EXPR>: Tweak condition.
5039
452154b9
EB
50402018-03-20 Eric Botcazou <ebotcazou@adacore.com>
5041
5042 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
5043
63ecb626
JJ
50442018-03-16 Jakub Jelinek <jakub@redhat.com>
5045
ce811fc4
JJ
5046 PR c/84909
5047 * c-warn.c (conversion_warning): Replace "to to" with "to" in
5048 diagnostics.
5049
63ecb626
JJ
5050 PR c/84910
5051 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
5052 diagnostics.
5053
a1295eec
RB
50542018-03-16 Richard Biener <rguenther@suse.de>
5055
5056 PR c/84873
5057 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
5058 unshare the possibly folded expression.
5059
919674fb
RB
50602018-03-15 Richard Biener <rguenther@suse.de>
5061
5062 PR c/84873
5063 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
5064
f99309b2
MS
50652018-03-13 Martin Sebor <msebor@redhat.com>
5066
5067 PR tree-optimization/84725
5068 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
5069 with all three narrow character types, including their qualified forms.
5070
e9b9fa4c
MS
50712018-03-12 Martin Sebor <msebor@redhat.com>
5072
5073 PR tree-optimization/83456
ab20d992 5074 * c-common.c (check_function_restrict): Return bool.
e9b9fa4c
MS
5075 Restore checking of bounded built-in functions.
5076 (check_function_arguments): Also return the result
5077 of warn_for_restrict.
ab20d992
JJ
5078 * c-common.c (check_function_restrict): Return bool.
5079 * c-warn.c (warn_for_restrict): Return bool.
e9b9fa4c 5080
0805d020
MP
50812018-03-02 Marek Polacek <polacek@redhat.com>
5082
5083 PR c++/84171
5084 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
5085 is erroneous.
5086
ed2a2f08
TS
50872018-03-02 Thomas Schwinge <thomas@codesourcery.com>
5088
5089 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
5090 function".
5091
90abdde0
MP
50922018-03-01 Marek Polacek <polacek@redhat.com>
5093
5094 PR c++/84639
5095 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
5096 alignment in computation.
5097
c6db43fa
EB
50982018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5099
5100 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
5101 <REAL_TYPE>: Deal specifically with _Float128/__float128.
5102
9e25c7ed
EB
51032018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5104
5105 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
5106 (is_char_array): Take a type instead of a declaration.
5107 (dump_ada_array_type): Likewise.
5108 (is_simple_enum): Minor tweak.
5109 (dump_ada_enum_type): New function extracted from...
5110 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
5111 <INTEGER_TYPE>: Remove unreachable code.
5112 <RECORD_TYPE>: Likewise. Minor tweaks.
5113 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
5114 <ENUMERAL_TYPE>: New case.
5115 <RECORD_TYPE>: Factor out common code.
5116 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
5117 Minor tweaks. Deal with enumeral types.
5118 (dump_ada_structure): Minor tweaks.
5119
09de3550
EB
51202018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5121
5122 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
5123 address for incomplete structures.
5124 (dump_forward_type): Do not bail out for incomplete structures.
5125 (dump_ada_declaration): Do not special-case incomplete structures
5126 for subtypes. Dump them as null records for types.
5127
095d8d4b
EB
51282018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5129
5130 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
5131 (is_char_array): Fix formatting.
5132 (dump_template_types): Likewise.
5133 (dump_generic_ada_node): Rename into...
5134 (dump_ada_node): ...this.
5135 <POINTER_TYPE>: Remove superfluous space. Use generic address for
5136 incomplete structures and not for empty structures. Do not use it
5137 when forward declarations are needed.
5138 (dump_forward_type): New function.
5139 (dump_nested_types): Remove FORWARD parameter. Do not consider
5140 TREE_VISITED and do not generate a forward declaration. Only dump
5141 original nested types for nested declaration.
5142 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
5143 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
5144 <RECORD_TYPE>: Do not consider TREE_VISITED.
5145 (dump_ada_declaration): Use booleans and fix formatting throughout.
5146 <TYPE_DECL>: Skip incomplete structures and not empty structures.
5147 Call dump_forward_type instead of dump_nested_types for a typedef.
5148 Remove superfluous check and adjust call to dump_nested_types.
5149 <POINTER_TYPE>: Call dump_forward_type and fall through.
5150 (dump_ada_struct_decl): Rename into...
5151 (dump_ada_structure): ...this. Do not special-case empty structures.
5152
d4cfd486
MS
51532018-02-27 Martin Sebor <msebor@redhat.com>
5154
5155 PR c++/83871
5156 * c.opt (-Wmissing-attributes): New option.
5157
b22dbd03
ML
51582018-02-21 Martin Liska <mliska@suse.cz>
5159
5160 * c.opt (Wcatch-value=): Add IntegerRange.
5161
883dfe2a
JM
51622018-02-15 Jason Merrill <jason@redhat.com>
5163
5164 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
5165
0444aa9c
NS
51662018-02-09 Nathan Sidwell <nathan@acm.org>
5167
5168 PR c/84293
5169 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
5170 arg.
5171 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
5172 arg. Adjust.
5173
cea71f0a
MS
51742018-02-09 Martin Sebor <msebor@redhat.com>
5175
5176 PR lto/84212
5177 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
5178 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
5179 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
5180 (-Wstrict-overflow, -Wsuggest-attribute): Same.
5181 (-Wuninitialized): Same.
5182
8c8b7be5
EB
51832018-02-09 Eric Botcazou <ebotcazou@adacore.com>
5184
5185 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
5186 keyword for components.
5187
7c30b12a
PC
51882018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
5189
5190 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
5191
eece7fe5
JK
51922018-02-02 Julia Koval <julia.koval@intel.com>
5193
5194 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
5195
7d07a93a
MP
51962018-01-29 Marek Polacek <polacek@redhat.com>
5197
5198 PR c/83966
5199 * c-format.c (check_function_format): Check current_function_decl.
5200
53723269
JJ
52012018-01-27 Jakub Jelinek <jakub@redhat.com>
5202
5203 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
5204 argument.
5205 (LAZY_HEX_FP_VALUES_CNT): Define.
5206 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
5207 values rather than just 12.
5208 (builtin_define_with_hex_fp_value): Likewise.
5209
7365279f
BK
52102018-01-18 Boris Kolpackov <boris@codesynthesis.com>
5211
92a285c1
ML
5212 PR other/70268
5213 * c.opt (-fmacro-prefix-map): New option.
5214 * c-opts.c (c_common_handle_option): Handle it.
5215 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
5216 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 5217
bb9869d5
DM
52182018-01-17 David Malcolm <dmalcolm@redhat.com>
5219
5220 PR c++/83814
5221 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
5222
68dc87c3
EB
52232018-01-10 Eric Botcazou <ebotcazou@adacore.com>
5224
5225 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
5226 Skip 'f' and 'F' characters if it is true.
5227 (store_ada_macro): Minor tweak.
5228 (dump_ada_macros) <CPP_COMMENT>: Likewise.
5229 <CPP_WSTRING>: Likewise.
5230 <CPP_STRING>: Output '&' in the buffer if not the first string.
5231 <CPP_NUMBER>: Adjust calls to dump_number.
5232
9a004410
DM
52332018-01-10 David Malcolm <dmalcolm@redhat.com>
5234
5235 PR c++/43486
5236 * c-common.c: Include "selftest.h".
5237 (get_atomic_generic_size): Perform the test for integral type
5238 before the range test for any integer constant, fixing indentation
5239 of braces. Call fold_for_warn before testing for an INTEGER_CST.
5240 (reject_gcc_builtin): Strip any location wrapper from EXPR.
5241 (selftest::test_fold_for_warn): New function.
5242 (selftest::c_common_c_tests): New function.
5243 (selftest::c_family_tests): Call it, and
5244 selftest::c_pretty_print_c_tests.
5245 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
5246 * c-format.c (check_format_arg): Convert VAR_P check to a
5247 fold_for_warn.
5248 * c-pretty-print.c: Include "selftest.h".
5249 (pp_c_cast_expression): Don't print casts for location wrappers.
5250 (selftest::assert_c_pretty_printer_output): New function.
5251 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
5252 (selftest::test_location_wrappers): New function.
5253 (selftest::c_pretty_print_c_tests): New function.
5254 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
5255
5c0caeb3
RS
52562018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5257 Alan Hayward <alan.hayward@arm.com>
5258 David Sherwood <david.sherwood@arm.com>
5259
5260 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
5261
73a699ae
RS
52622018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5263 Alan Hayward <alan.hayward@arm.com>
5264 David Sherwood <david.sherwood@arm.com>
5265
5266 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
5267 as polynomial.
5268
928686b1
RS
52692018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5270 Alan Hayward <alan.hayward@arm.com>
5271 David Sherwood <david.sherwood@arm.com>
5272
5273 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
5274 (convert_vector_to_array_for_subscript): Handle polynomial
5275 TYPE_VECTOR_SUBPARTS.
5276 (c_common_type_for_mode): Check valid_vector_subparts_p.
5277 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
5278 VECTOR_CST_NELTS.
5279
85ec4feb
JJ
52802018-01-03 Jakub Jelinek <jakub@redhat.com>
5281
5282 Update copyright years.
5283
170a8bd6 52842017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 5285 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
5286
5287 * c-pragma.c (init_pragma): Register pragma GCC unroll.
5288 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
5289
ab20d992 52902017-12-22 Alexandre Oliva <aoliva@redhat.com>
18408e96
AO
5291
5292 PR debug/83527
5293 PR debug/83419
5294 * c-semantics.c (only_debug_stmts_after_p): New.
5295 (pop_stmt_list): Clear side effects in debug-only stmt list.
5296 Check for single nondebug stmt followed by debug stmts only.
5297
c12d20d4
AO
52982017-12-21 Alexandre Oliva <aoliva@redhat.com>
5299
5300 PR debug/83419
5301 * c-semantics.c (pop_stmt_list): Propagate side effects from
5302 single nondebug stmt to container list.
5303
01512446
JJ
53042017-12-19 Jakub Jelinek <jakub@redhat.com>
5305
5306 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
5307 conditions with typical order conditions.
5308
82cfbd01
MP
53092017-12-18 Marek Polacek <polacek@redhat.com>
5310
5311 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
5312 not in effect.
5313
99da11ec
MS
53142017-12-17 Martin Sebor <msebor@redhat.com>
5315
5316 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
5317 an error for attribute warn_if_not_aligned.
5318
cc8bea0a
MS
53192017-12-16 Martin Sebor <msebor@redhat.com>
5320
5321 PR tree-optimization/78918
5322 * c-common.c (check_function_restrict): Avoid checking built-ins.
5323 * c.opt (-Wrestrict): Include in -Wall.
5324
4849deb1
JJ
53252017-12-15 Jakub Jelinek <jakub@redhat.com>
5326
5327 * c-attribs.c (c_common_attribute_table,
5328 c_common_format_attribute_table): Swap affects_type_identity
5329 and handler fields, adjust comments.
5330
c65e18d3
BE
53312017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
5332
5333 * c.opt (Wcast-function-type): New warning option.
5334 * c-lex.c (get_fileinfo): Avoid warning.
5335 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
5336
2004617a
QZ
53372017-12-14 Qing Zhao <qing.zhao@oracle.com>
5338
7365279f 5339 PR middle_end/79538
2004617a
QZ
5340 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
5341 Adjust the size of buf1 and buf2, add a new buf to avoid
5342 format-overflow warning.
5343
ab20d992 53442017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
5345
5346 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
5347 subsequent statement list.
5348
5d9ae53d
MS
53492017-12-07 Martin Sebor <msebor@redhat.com>
5350
5351 PR c/81544
5352 PR c/81566
5353 * c-attribs.c (attr_aligned_exclusions): New array.
5354 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
5355 (attr_common_exclusions, attr_const_pure_exclusions): Same.
5356 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
5357 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
5358 (attr_warn_unused_result_exclusions): Same.
5359 (handle_hot_attribute, handle_cold_attribute): Simplify.
5360 (handle_const_attribute): Warn on function returning void.
5361 (handle_pure_attribute): Same.
5362 (handle_aligned_attribute): Diagnose conflicting attribute
5363 specifications.
5364 * c-warn.c (diagnose_mismatched_attributes): Simplify.
5365
c79144f8
DM
53662017-12-06 David Malcolm <dmalcolm@redhat.com>
5367
5368 PR c/83236
5369 * c-common.c (selftest::c_family_tests): Call
5370 selftest::c_spellcheck_cc_tests.
5371 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
5372 * c-spellcheck.cc: Include "selftest.h".
5373 (name_reserved_for_implementation_p): New function.
5374 (should_suggest_as_macro_p): New function.
5375 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
5376 should_suggest_as_macro_p and call it.
5377 (selftest::test_name_reserved_for_implementation_p): New function.
5378 (selftest::c_spellcheck_cc_tests): New function.
5379 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
5380
613bc14f
DM
53812017-12-06 David Malcolm <dmalcolm@redhat.com>
5382
5383 * c-spellcheck.cc: New file, taken from macro-handling code in
5384 spellcheck-tree.c.
5385 * c-spellcheck.h: New file, taken from macro-handling code in
5386 spellcheck-tree.h.
5387
e76c7157
JJ
53882017-12-01 Jakub Jelinek <jakub@redhat.com>
5389
5390 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
5391 attribute.
5392 (handle_simd_attribute): Don't check for "cilk simd function"
5393 attribute. Reindent, formatting changes.
5394
b0da4034
JK
53952017-11-30 Julia Koval <julia.koval@intel.com>
5396
5397 * c-common.h (inv_list): Remove.
5398
058f0b9e
JJ
53992017-11-28 Jakub Jelinek <jakub@redhat.com>
5400
5401 PR sanitizer/81275
5402 * c-common.c (c_switch_covers_all_cases_p_1,
5403 c_switch_covers_all_cases_p): New functions.
5404 * c-common.h (c_switch_covers_all_cases_p): Declare.
5405
5e9d6aa4 54062017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 5407 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
5408
5409 * array-notation-common.c: Delete.
5410 * c-cilkplus.c: Ditto.
5411 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
5412 * c-common.def (ARRAY_NOTATION_REF): Remove.
5413 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
5414 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
5415 c_validate_cilk_plus_loop, cilkplus_an_parts,
5416 cilk_ignorable_spawn_rhs_op,
5417 cilk_recognize_spawn): Remove.
5418 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
5419 * c-omp.c: Remove CILK_SIMD check.
5420 * c-pragma.c: Ditto.
5421 * c-pragma.h: Remove CILK related pragmas.
5422 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
5423 ARRAY_NOTATION_REF condition.
5424 (c_pretty_printer::expression): Ditto.
5425 * c.opt (fcilkplus): Remove.
5426 * cilk.c: Delete.
5427
1af4ebf5
MG
54282017-11-21 Marc Glisse <marc.glisse@inria.fr>
5429
5430 * c-pretty-print.c (pp_c_additive_expression,
5431 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
5432
d44ed508
JJ
54332017-11-21 Jakub Jelinek <jakub@redhat.com>
5434
7d2f0f9b
JJ
5435 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
5436
d44ed508
JJ
5437 PR c++/83059
5438 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
5439 instead of tree_to_uhwi, formatting fix.
5440
26edace6
DM
54412017-11-20 David Malcolm <dmalcolm@redhat.com>
5442
5443 PR c/81404
5444 * known-headers.cc: New file, based on material from c/c-decl.c.
5445 (suggest_missing_header): Copied as-is.
5446 (get_stdlib_header_for_name): New, based on get_c_name_hint but
5447 heavily edited to add C++ support. Add some knowledge about
5448 <limits.h>, <stdint.h>, and <wchar.h>.
5449 * known-headers.h: Likewise.
5450
6c7a259b
DM
54512017-11-20 David Malcolm <dmalcolm@redhat.com>
5452
5453 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
5454 (lookup_name_fuzzy): Likewise. Convert return type from
5455 const char * to name_hint. Add location_t param.
5456 * name-hint.h: New header.
5457
f9c59f7e
JJ
54582017-11-19 Jakub Jelinek <jakub@redhat.com>
5459
5460 PR c/66618
5461 PR c/69960
5462 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
5463
1e39313a
JM
54642017-11-16 Joseph Myers <joseph@codesourcery.com>
5465
5466 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
5467 expected publication date of C17.
5468 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
5469
3ca0dc60
JM
54702017-11-15 Joseph Myers <joseph@codesourcery.com>
5471
5472 PR c/81156
5473 * c-common.c (c_common_reswords): Add __builtin_tgmath.
5474 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
5475
025d57f0
MS
54762017-11-10 Martin Sebor <msebor@redhat.com>
5477
5478 PR c/81117
5479 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
5480 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
5481 * c.opt (-Wstringop-truncation): New option.
5482
1b6fa695
ML
54832017-11-06 Martin Liska <mliska@suse.cz>
5484
5485 PR middle-end/82404
5486 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
5487 FE.
5488 * c.opt: Set default value of warn_return_type.
5489
64a5912c
DM
54902017-10-31 David Malcolm <dmalcolm@redhat.com>
5491
5492 * c-common.c (binary_op_error): Update for renaming of
5493 error_at_rich_loc.
5494 (c_parse_error): Likewise.
5495 * c-warn.c (warn_logical_not_parentheses): Likewise for
5496 renaming of inform_at_rich_loc.
5497 (warn_for_restrict): Likewise for renaming of
5498 warning_at_rich_loc_n.
5499
c76dc9c3
JM
55002017-10-30 Joseph Myers <joseph@codesourcery.com>
5501
5502 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
5503 * c-opts.c (set_std_c17): New function.
5504 (c_common_init_options): Use gnu17 as default C version.
5505 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
5506
ee5fd23a
MM
55072017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
5508
5509 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
5510 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
5511 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
5512 __FP_FAST_FMA<N>X.
5513
d1047465
MP
55142017-10-23 Marek Polacek <polacek@redhat.com>
5515
5516 PR c/82681
5517 * c-warn.c (warnings_for_convert_and_check): Fix typos.
5518
9e878cf1
EB
55192017-10-19 Eric Botcazou <ebotcazou@adacore.com>
5520
5521 * c-common.c (check_builtin_function_arguments): Also check arguments
5522 of __builtin_alloca_with_align_and_max.
5523
89b6abbb
DM
55242017-10-17 David Malcolm <dmalcolm@redhat.com>
5525
5526 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
5527 rather than NULL to format_warning_va.
5528 (check_format_types): Likewise when calling format_type_warning.
5529 Remove code to extract source_ranges and source_range * in favor
5530 of just a location_t.
5531 (format_type_warning): Convert source_range * param to a
5532 location_t.
5533
39382c09
JJ
55342017-10-13 Jakub Jelinek <jakub@redhat.com>
5535
5536 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
5537 [LR]SHIFT_EXPR.
5538
62e1c678
DM
55392017-10-12 David Malcolm <dmalcolm@redhat.com>
5540
5541 * c-common.c (enum missing_token_insertion_kind): New enum.
5542 (get_missing_token_insertion_kind): New function.
5543 (maybe_suggest_missing_token_insertion): New function.
5544 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
5545
b90c9338
NS
55462017-10-11 Nathan Sidwell <nathan@acm.org>
5547
5548 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
5549 (c_common_handle_option): Update incpath_kind names.
5550
3a266bcd
ML
55512017-10-11 Martin Liska <mliska@suse.cz>
5552
5553 PR sanitizer/82490
5554 * c-attribs.c (handle_no_sanitize_attribute): Report directly
5555 Wattributes warning.
5556
8e6cdc90
RS
55572017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
5558
5559 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
5560 operating on trees as wide_ints.
5561 * c-common.c (pointer_int_sum): Likewise.
5562 * c-pretty-print.c (pp_c_integer_constant): Likewise.
5563 * c-warn.c (match_case_to_enum_1): Likewise.
5564 (c_do_switch_warnings): Likewise.
5565 (maybe_warn_shift_overflow): Likewise.
5566
802b38c9
JJ
55672017-10-10 Jakub Jelinek <jakub@redhat.com>
5568
5569 PR c/82437
5570 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
5571 instead of wide_int::from.
5572
4e34b338
JJ
55732017-10-06 Jakub Jelinek <jakub@redhat.com>
5574
5575 PR c/82437
5576 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
5577 using to_widest use wide_int with the larger of the two precisions.
5578
4bc4b2b4
BE
55792017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
5580
5581 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
5582 functions.
5583
a1488398
RS
55842017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
5585
5586 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
5587 when combining the original unconverted comparison operands.
5588
01c9fb68
JJ
55892017-09-29 Jakub Jelinek <jakub@redhat.com>
5590
5591 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
5592 attribute.
5593
6e3e8419
EB
55942017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5595
5596 * c-ada-spec.c (to_ada_name): Add index parameter.
5597 (pp_ada_tree_identifier): Likewise.
5598 (dump_ada_macros): Adjust call to to_ada_name.
5599 (struct overloaded_name_hash): New type.
5600 (struct overloaded_name_hasher): Likewise.
5601 (overloaded_names): New hash table.
5602 (compute_overloading_index): New function.
5603 (dump_ada_decl_name): Call it and pass the result to
5604 pp_ada_tree_identifier.
5605 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
5606 (dump_ada_function_declaration): Likewise.
5607 (dump_generic_ada_node): Likewise.
5608 (print_constructor): Likewise.
5609 (print_destructor): Likewise.
5610 (dump_ada_specs): Delete overloaded_names table.
5611
79310774
EB
56122017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5613
5614 * c-ada-spec.c (max_ada_macros): Move around.
5615 (store_ada_macro_index): Likewise.
5616 (source_file): Rename into...
5617 (macro_source_file): ...this.
5618 (count_ada_macro): Move around.
5619 (store_ada_macro): Likewise.
5620 (compare_macro): Likewise.
5621 (print_ada_macros): Merge in...
5622 (dump_ada_macros): ...this.
5623 (source_file_base): Rename into...
5624 (current_source_file): ...this.
5625 (print_comment): Move around.
5626 (dump_ada_nodes): Call dump_ada_declaration directly.
5627 (struct with): Change type of limited field to bool.
5628 (append_withs): Change type of limited_access parameter to bool.
5629 (pp_ada_tree_identifie): Likewise.
5630 (dump_ada_decl_nam): Likewise.
5631 (dump_generic_ada_node): Likewise. Do not print the return type.
5632 (to_ada_name): Change type of space_found parameter to bool.
5633 (dump_ada_function_declaration): Return void and change type of
5634 parameters to bool. Also print the return type for a function.
5635 (print_ada_methods): Rename into...
5636 (dump_ada_methods): ...this.
5637 (print_ada_declaration): Rename into ...
5638 (dump_ada_declaration): ...this. Do not print the return type.
5639 (print_ada_struct_decl): Rename into...
5640 (dump_ada_struct_decl): ...this.
5641
7d386d45
JJ
56422017-09-29 Jakub Jelinek <jakub@redhat.com>
5643
5644 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
5645 rather than DECL_INITIAL.
5646 (common_handle_aligned_attribute): Likewise.
5647
ab20d992 56482017-09-20 Alexandre Oliva <aoliva@redhat.com>
9ed32e27
AO
5649
5650 * c.opt (gen-decls): Add RejectNegative.
5651
026a79f7
AS
56522017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
5653 Jakub Jelinek <jakub@redhat.com>
5654
5655 Add support for -std=c++2a.
5656 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
5657 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
5658 * c-opts.c (set_std_cxx2a): New.
5659 (c_common_handle_option): Set options when -std=c++2a is enabled.
5660 (c_common_post_options): Adjust comments.
5661 (set_std_cxx14, set_std_cxx17): Likewise.
5662
4a8ca690
EB
56632017-09-15 Eric Botcazou <ebotcazou@adacore.com>
5664
5665 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
5666 message for non-uniform endianness and issue a warning in C++.
5667
7b936140
JJ
56682017-09-15 Jakub Jelinek <jakub@redhat.com>
5669
5670 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
5671 (Wc++17-compat): Change from undocumented alias to option.
5672 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
5673 change C++1z to C++17 in description.
5674 (std=c++1z, std=gnu++1z): Change from option to undocumented
5675 deprecated alias.
5676 (std=c++17, std=gnu++17): Change from undocumented alias to option.
5677 Adjust description.
5678 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
5679 * c-opts.c (set_std_cxx1z): Rename to ...
5680 (set_std_cxx17): ... this.
5681 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
5682 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 5683 caller.
7b936140
JJ
5684 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
5685 comments.
5686
12263f13
L
56872017-09-12 H.J. Lu <hongjiu.lu@intel.com>
5688
5689 * c-attribs.c (common_handle_aligned_attribute): Don't warn
5690 function alignment if warn_if_not_aligned_p is true.
5691
6836632e
NS
56922017-09-12 Nathan Sidwell <nathan@acm.org>
5693
5694 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
5695 resort_sorted_fields): Move to c/c-decl.c.
5696 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
5697 (struct sorted_fields_type): Move to c/c-lang.h.
5698
019bf9ad
JW
56992017-09-09 Jonathan Wakely <jwakely@redhat.com>
5700
5701 PR c++/81852
5702 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
5703
bc7fe952
MP
57042017-09-04 Marek Polacek <polacek@redhat.com>
5705
5706 PR c/81783
5707 * c-warn.c (warn_tautological_bitwise_comparison): New function.
5708 (warn_tautological_cmp): Call it.
5709
ab20d992 57102017-09-01 Boris Kolpackov <boris@codesynthesis.com>
de7c2c6a
BK
5711
5712 * c-opts.c (c_common_finish): Write dependency information even if
5713 there are errors.
5714
d2e05fcb
JJ
57152017-09-01 Jakub Jelinek <jakub@redhat.com>
5716
5717 PR c/81887
5718 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
5719 (omp_pragmas_simd): ... here.
5720 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
5721 create new clauses list containing just simd clause.
5722
18e2a8b8
RS
57232017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5724 Alan Hayward <alan.hayward@arm.com>
5725 David Sherwood <david.sherwood@arm.com>
5726
5727 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
5728 into scalar_mode_supported_p call.
5729 (handle_mode_attribute): Update call to scalar_mode_supported_p.
5730
16d22000
RS
57312017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5732 Alan Hayward <alan.hayward@arm.com>
5733 David Sherwood <david.sherwood@arm.com>
5734
5735 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
5736 for the mode iterator.
5737
b397965c
RS
57382017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5739 Alan Hayward <alan.hayward@arm.com>
5740 David Sherwood <david.sherwood@arm.com>
5741
5742 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
5743 * c-common.c (c_build_vec_perm_expr): Likewise.
5744
357b7604
RS
57452017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5746 Alan Hayward <alan.hayward@arm.com>
5747 David Sherwood <david.sherwood@arm.com>
5748
5749 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
5750
e05c94ba
RS
57512017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5752 Alan Hayward <alan.hayward@arm.com>
5753 David Sherwood <david.sherwood@arm.com>
5754
5755 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
5756 before calling targetm.addr_space.valid_pointer_mode.
5757
5c20c4af
RS
57582017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5759 Alan Hayward <alan.hayward@arm.com>
5760 David Sherwood <david.sherwood@arm.com>
5761
5762 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
5763
c94843d2 57642017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
5765 Alan Hayward <alan.hayward@arm.com>
5766 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
5767
5768 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
5769 iterators.
5770 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
5771
4e10a5a7
RS
57722017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5773 Alan Hayward <alan.hayward@arm.com>
5774 David Sherwood <david.sherwood@arm.com>
5775
5776 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
5777 case statements.
5778
130fcab0
ML
57792017-08-29 Martin Liska <mliska@suse.cz>
5780
5781 PR other/39851
5782 * c-common.c (parse_optimize_options): Add argument to function
5783 call.
5784 * c-pragma.c (handle_pragma_diagnostic): Likewise.
5785
14e18d71
DM
57862017-08-24 David Malcolm <dmalcolm@redhat.com>
5787
5788 * c-lex.c (interpret_float): Use token location
5789 when building an EXCESS_PRECISION_EXPR.
5790
2f687306
DM
57912017-08-21 David Malcolm <dmalcolm@redhat.com>
5792
5793 * c-common.c (check_function_arguments): Add "arglogs" param; pass
5794 it to check_function_format.
5795 * c-common.h (check_function_arguments): Add vec<location_t> *
5796 param.
5797 (check_function_format): Likewise.
5798 * c-format.c (struct format_check_context): Add field "arglocs".
5799 (check_function_format): Add param "arglocs"; pass it to
5800 check_format_info.
ab20d992 5801 (check_format_info): Add param "arglocs"; use it to initialize
2f687306
DM
5802 new field of format_ctx.
5803 (check_format_arg): Pass format_ctx->arglocs to new param of
5804 check_format_info_main.
5805 (class argument_parser): New field "arglocs".
5806 (argument_parser::argument_parser): Add "arglocs_" param and use
5807 it to initialize new field.
5808 (argument_parser::check_argument_type): Pass new arglocs field to
5809 check_format_types.
5810 (check_format_info_main): Add param "arglocs", and use it when
5811 constructing arg_parser.
5812 (check_format_types): Add param "arglocs"; use it if non-NULL when
5813 !EXPR_HAS_LOCATION (cur_param) to get at location information.
5814
00aa1fa2
L
58152017-08-18 H.J. Lu <hongjiu.lu@intel.com>
5816
5817 PR c/53037
5818 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
5819 (c_common_attribute_table): Add warn_if_not_aligned.
5820 (handle_aligned_attribute): Renamed to ...
5821 (common_handle_aligned_attribute): Remove argument, name, and add
5822 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
5823 (handle_aligned_attribute): New.
5824 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
5825
27be025d
MS
58262017-08-14 Martin Sebor <msebor@redhat.com>
5827
5828 PR c/81117
5829 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
5830 (handle_nonstring_attribute): New function.
5831
da67acb9
MS
58322017-08-14 Martin Sebor <msebor@redhat.com>
5833
5834 PR c/81117
5835 * c-format.h (T89_G): New macro.
5836 * c-format.c (local_gcall_ptr_node): New variable.
5837 (init_dynamic_diag_info): Initialize it.
5838
a8b522b4
ML
58392017-08-11 Martin Liska <mliska@suse.cz>
5840
5841 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
5842 TARGET_SUPPORTS_ALIASES.
5843
32129a17
DM
58442017-08-10 David Malcolm <dmalcolm@redhat.com>
5845
5846 * c-common.c (c_parse_error): Add rich_location * param, using it
5847 rather implicitly using input_location.
5848 * c-common.h (c_parse_error): Add rich_location * param.
5849
30af3a2b
MP
58502017-08-09 Marek Polacek <polacek@redhat.com>
5851
5852 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
5853 (c_common_truthvalue_conversion): Likewise.
5854 * c-omp.c (c_finish_omp_atomic): Likewise.
5855 * c-common.h (build_binary_op): Update declaration.
5856
314e6352
ML
58572017-08-08 Martin Liska <mliska@suse.cz>
5858
5859 * c-ada-spec.c: Include header files.
5860 * c-ubsan.c: Likewise.
5861 * c-warn.c: Likewise.
5862
56b5041c
JJ
58632017-08-07 Jakub Jelinek <jakub@redhat.com>
5864
5865 PR c/69389
5866 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
5867
db440138
EB
58682017-08-07 Eric Botcazou <ebotcazou@adacore.com>
5869
5870 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
5871 (print_ada_methods): Likewise.
5872 (print_ada_declaration): Likewise.
5873
577eec56
ML
58742017-08-07 Martin Liska <mliska@suse.cz>
5875
5876 * array-notation-common.c: Add new includes.
5877 * c-format.c( handle_format_attribute): Canonicalize a format
5878 function name.
5879 * c-lex.c (c_common_has_attribute): Canonicalize name of an
5880 attribute.
5881 * c-pretty-print.c: Add new include.
5882
b854df3c
EB
58832017-08-05 Eric Botcazou <ebotcazou@adacore.com>
5884
5885 * c-ada-spec.c (has_static_fields): Look only into variables.
5886 (print_constructor): Add TYPE parameter and use it for the name.
5887 (print_destructor): Likewise.
5888 (print_ada_declaration): Adjust to new constructor/destructor names.
5889 Adjust calls to print_constructor and print_destructor.
5890 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
5891 Look only into variables in the final loop.
5892
9f2cb25e
EB
58932017-08-01 Eric Botcazou <ebotcazou@adacore.com>
5894
5895 * c-ada-spec.c (has_static_fields): Look only into fields.
5896 (dump_generic_ada_node): Small tweak.
5897 (dump_nested_types): Look only into fields.
5898 (print_ada_declaration): Look only into methods. Small tweak.
5899 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
5900
f4bcd9eb
EB
59012017-08-01 Eric Botcazou <ebotcazou@adacore.com>
5902
5903 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
5904 (dump_ada_function_declaration): Likewise.
5905 (dump_generic_ada_node): Likewise.
5906 (print_ada_declaration): Add support for const-qualified variables.
5907
f34ebeb2
ML
59082017-07-31 Martin Liska <mliska@suse.cz>
5909
5910 PR sanitize/81530
5911 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
5912 Guard condition with flag_sanitize_p also with current_function_decl
5913 non-null equality.
5914 (ubsan_maybe_instrument_reference_or_call): Likewise.
5915
218e5d04
UB
59162017-07-30 Uros Bizjak <ubizjak@gmail.com>
5917
5918 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
5919
942047f2
EB
59202017-07-29 Eric Botcazou <ebotcazou@adacore.com>
5921
5922 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
5923 for enumeral types.
5924 (print_ada_declaration): Add missing guard for record types.
5925
a40ff0ae
JJ
59262017-07-27 Jakub Jelinek <jakub@redhat.com>
5927
5928 PR c/45784
5929 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
5930 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
5931 new COMPOUND_EXPRs around the rhs of the comparison.
5932
06bd22f6
MP
59332017-07-27 Marek Polacek <polacek@redhat.com>
5934
5935 PR c/81417
5936 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
5937 the types.
5938
036ea399
JJ
59392017-07-27 Jakub Jelinek <jakub@redhat.com>
5940
5941 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
5942 (handle_noipa_attribute): New function.
5943
417ca011
TD
59442017-07-07 Torsten Duwe <duwe@suse.de>
5945
5946 * c-attribs.c (c_common_attribute_table): Add entry for
5947 "patchable_function_entry".
5948
5aaa8fb4
NS
59492017-07-20 Nathan Sidwell <nathan@acm.org>
5950
5951 Remove TYPE_METHODS.
5952 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
5953 dump_ada_template, print_ada_methods,
5954 print_ada_declaration): Member fns are on TYPE_FIELDS.
5955
ff22eb12
NS
59562017-07-18 Nathan Sidwell <nathan@acm.org>
5957
5958 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
5959
eea77d1f
DM
59602017-07-14 David Malcolm <dmalcolm@redhat.com>
5961
5962 * c-common.c (try_to_locate_new_include_insertion_point): New
5963 function.
5964 (per_file_includes_t): New typedef.
5965 (added_includes_t): New typedef.
5966 (added_includes): New variable.
5967 (maybe_add_include_fixit): New function.
5968 * c-common.h (maybe_add_include_fixit): New decl.
5969
281ac396
MS
59702017-07-10 Martin Sebor <msebor@redhat.com>
5971
5972 PR other/81345
5973 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
5974
b6f43128
DM
59752017-07-06 David Malcolm <dmalcolm@redhat.com>
5976
5977 * c-common.c (selftest::c_family_tests): New.
5978 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
5979 (selftest::c_family_tests): New decl.
5980
efbf55b0
MP
59812017-07-04 Marek Polacek <polacek@redhat.com>
5982
5983 PR c/81231
5984 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
5985 types.
5986
6c86bd88
MP
59872017-07-04 Marek Polacek <polacek@redhat.com>
5988
5989 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
5990
17a7218b
ML
59912017-06-28 Martin Liska <mliska@suse.cz>
5992
5993 PR ipa/81128
5994 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
5995 to a function declaration.
5996
63010089
ML
59972017-06-28 Martin Liska <mliska@suse.cz>
5998
5999 PR driver/79659
6000 * c.opt: Add IntegerRange to various options.
6001
3e2becc4
MP
60022017-06-26 Marek Polacek <polacek@redhat.com>
6003
6004 PR c/80116
6005 * c-common.h (warn_for_multistatement_macros): Declare.
6006 * c-warn.c: Include "c-family/c-indentation.h".
6007 (warn_for_multistatement_macros): New function.
6008 * c.opt (Wmultistatement-macros): New option.
6009 * c-indentation.c (guard_tinfo_to_string): No longer static.
6010 Change the parameter type to "enum rid". Handle RID_SWITCH.
6011 * c-indentation.h (guard_tinfo_to_string): Declare.
6012
2db9b7cd
MG
60132017-06-23 Marc Glisse <marc.glisse@inria.fr>
6014
6015 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
6016
c3684b7b
MS
60172017-06-15 Martin Sebor <msebor@redhat.com>
6018
6019 PR c++/80560
6020 * c.opt (-Wclass-memaccess): New option.
6021
e72c4afd
BK
60222017-06-14 Boris Kolpackov <boris@codesynthesis.com>
6023
6024 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
6025
8a516588
MP
60262017-06-13 Marek Polacek <polacek@redhat.com>
6027
6028 PR objc/80949
6029 * c-warn.c (do_warn_duplicated_branches): Return if any of the
6030 branches is null.
6031
45b2222a
ML
60322017-06-13 Martin Liska <mliska@suse.cz>
6033
6034 PR sanitize/78204
6035 * c-attribs.c (add_no_sanitize_value): New function.
6036 (handle_no_sanitize_attribute): Likewise.
6037 (handle_no_sanitize_address_attribute): Use the function.
6038 (handle_no_sanitize_thread_attribute): New function.
6039 (handle_no_address_safety_analysis_attribute): Use
6040 add_no_sanitize_value.
6041 (handle_no_sanitize_undefined_attribute): Likewise.
6042 * c-common.h: Declare new functions.
6043 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
6044 (ubsan_instrument_shift): Likewise.
6045 (ubsan_instrument_bounds): Likewise.
6046 (ubsan_maybe_instrument_array_ref): Likewise.
6047 (ubsan_maybe_instrument_reference_or_call): Likewise.
6048
a01f151f
JM
60492017-06-11 Jason Merrill <jason@redhat.com>
6050
6051 * c-ada-spec.c, c-pragma.c: Use id_equal.
6052
3de4ac6d
MP
60532017-06-04 Marek Polacek <polacek@redhat.com>
6054
6055 PR c/80919
6056 * c-format.c (matching_type_p): Return false if any of the types
6057 requires structural equality.
6058
2474f48f
MS
60592017-06-02 Martin Sebor <msebor@redhat.com>
6060
6061 PR c/80892
6062 * c-warn.c (conversion_warning): Use -Wconversion for integer
6063 conversion and -Wfloat-conversion for floating one.
6064
40ffd95f
BE
60652017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
6066
6067 * c.opt (Wsizeof-pointer-div): New warning option.
6068
3fa4634c
VR
60692017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
6070
6071 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
6072 (Wcatch-value=1): Enable by -Wall.
6073
f012c8ef
DM
60742017-05-30 David Malcolm <dmalcolm@redhat.com>
6075
6076 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
6077 format_chars.
6078 * c.opt (fdiagnostics-show-template-tree): New option.
6079 (felide-type): New option.
6080
63dbcd13
VR
60812017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
6082
6083 * c.opt (Wcatch-value=): New C++ warning flag.
6084
be136b5c
NS
60852017-05-24 Nathan Sidwell <nathan@acm.org>
6086
6087 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
6088 const casts to avoid warning.
6089
3cd211af
MS
60902017-05-24 Martin Sebor <msebor@redhat.com>
6091
6092 PR c/80731
6093 * c-common.h (unsafe_conversion_p): Add a function argument.
6094 * c-common.c (unsafe_conversion_p): Same.
6095 Add type names and values to diagnostics.
6096 (scalar_to_vector): Adjust.
6097 * c-warn.c (constant_expression_error): Add a function argument.
6098 Add type names and values to diagnostics.
6099 (conversion_warning): Add a function argument.
6100 Add type names and values to diagnostics.
6101 (warnings_for_convert_and_check): Same.
6102
1ff7be5a
JM
61032017-05-19 Jason Merrill <jason@redhat.com>
6104
6105 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
6106 enumerators.
6107
ff502317
BE
61082017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6109
6110 * c-format.c (locus): Move out of function scope,
6111 add GTY attribute.
6112
2a8a8d7b
NS
61132017-05-19 Nathan Sidwell <nathan@acm.org>
6114
6115 * c-opts.c (class_dump_file, class_dump_flags): Delete.
6116 (c_common_parse_file): Remove class dump handling.
6117 (get_dump_info): Likewise.
6118
39aac208
RB
61192017-05-19 Richard Biener <rguenther@suse.de>
6120
6121 PR c++/80593
6122 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
6123 to alias-set zero memory.
6124
6ecd2339
BE
61252017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
6126
6127 * c-format.c (local_tree_type_node): Add GTY attribute.
6128
6574d78e
MP
61292017-05-18 Marek Polacek <polacek@redhat.com>
6130
6131 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
6132 (c_common_fixed_point_type_for_size): Likewise.
6133 (c_common_type_for_mode): Likewise.
6134 (shorten_compare): Likewise.
6135 (c_promoting_integer_type_p): Use false/true instead of 0/1.
6136 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
6137
e3455240
MP
61382017-05-18 Marek Polacek <polacek@redhat.com>
6139
6140 * c-common.c (self_promoting_args_p): Change the return type to bool.
6141 Use false/true instead of 0/1.
6142 * c-common.h (self_promoting_args_p): Update.
6143
3fa8871b
MP
61442017-05-17 Marek Polacek <polacek@redhat.com>
6145
6146 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
6147 * c-warn.c: Likewise.
6148
b42cc3ca
VV
61492017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
6150
6151 Implement new C++ intrinsics __is_assignable and __is_constructible.
6152 * c-common.c (__is_assignable, __is_constructible): New.
6153 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
6154
1a817418
ML
61552017-05-17 Martin Liska <mliska@suse.cz>
6156
6157 * c-common.h: Introduce dump_flags_t type and
6158 use it instead of int type.
6159 * c-gimplify.c (c_genericize): Likewise.
6160 * c-opts.c: Likewise.
6161
b2fa0a8b
MP
61622017-05-17 Marek Polacek <polacek@redhat.com>
6163
6164 * c-common.c (c_save_expr): Remove.
6165 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
6166 * c-common.h (c_save_expr): Remove declaration.
6167
31c2d57d
VR
61682017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
6169
6170 PR c/35441
6171 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
6172 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
6173 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
6174 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
6175 RDIV_EXPR.
6176 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
6177
684f84de
MP
61782017-05-09 Marek Polacek <polacek@redhat.com>
6179
6180 PR c/80525
6181 * c-warn.c (unwrap_c_maybe_const): New.
6182 (warn_logical_operator): Call it.
6183
641da50a
NS
61842017-05-09 Nathan Sidwell <nathan@acm.org>
6185
6186 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
6187 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
6188
631238ac
MS
61892017-05-08 Martin Sebor <msebor@redhat.com>
6190
6191 PR translation/80280
6192 * c-format.h (struct format_flag_spec): Add new member.
6193 (T89_T): New macro.
6194 * c-format.c (local_tree_type_node): New global.
6195 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
6196 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
6197 (strfmon_flag_specs): Likewise.
6198 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
6199 with distinct quoting properties.
6200 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
6201 (flag_chars_t::validate): Add argument and handle bad quoting.
6202 (check_format_info_main): Handle quoting problems.
6203 (init_dynamic_diag_info): Simplify.
6204
49f0c04c
JM
62052017-05-08 Jason Merrill <jason@redhat.com>
6206
6207 * c-opts.c (c_common_post_options): Update defaults for
6208 flag_abi_version and flag_abi_compat_version.
6209
56d35585
DM
62102017-05-05 David Malcolm <dmalcolm@redhat.com>
6211
6212 * c-common.c (c_cpp_error): Replace report_diagnostic
6213 with diagnostic_report_diagnostic.
6214
0f2c4a8f
MS
62152017-05-04 Martin Sebor <msebor@redhat.com>
6216
6217 PR translation/80280
6218 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
6219 (handle_weakref_attribute): Same.
6220
6fe63fb4
NS
62212017-05-03 Nathan Sidwell <nathan@acm.org>
6222
6223 Canonicalize canonical type hashing
6224 * c-common.c (complete_array_type): Use type_hash_canon.
6225
815d9cc6
XR
62262017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
6227
92a285c1 6228 PR c++/80038
815d9cc6
XR
6229 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
6230 prototype.
6231 (cilk_install_body_pedigree_operations): Likewise.
6232 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
6233 detatched.
6234 (cilk_gimplify_call_params_in_spawned_fn): Remove.
6235 (cilk_install_body_pedigree_operations): Likewise.
6236 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
6237 unwrapping.
6238
f8a36447
JJ
62392017-04-27 Jakub Jelinek <jakub@redhat.com>
6240
6241 PR c++/80534
6242 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
6243 flag on non-aggregate element types.
6244
7c145456
BE
62452017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
6246
6247 * c-common.c (c_type_hasher, type_hash_table): Remove.
6248 (c_common_get_alias_set): Remove unreachable code.
6249 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
6250
c3cbcd45
VR
62512017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
6252
6253 * c.opt (Wextra-semi): New C++ warning flag.
6254
8a59d466
JJ
62552017-04-20 Jakub Jelinek <jakub@redhat.com>
6256
6257 PR middle-end/80423
6258 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
6259
8487c9a5
JJ
62602017-04-18 Jakub Jelinek <jakub@redhat.com>
6261
6262 PR middle-end/79788
6263 PR middle-end/80375
6264 * c-common.c (c_common_type_for_mode): Don't handle
6265 widest_*_literal_type_node here.
6266 c_common_signed_or_unsigned_type): Likewise.
6267 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
6268 to *intTI_type_node or *intDI_type_node depending on whether
6269 TImode is supported by the target or not.
6270
3ee0fb02
ML
62712017-04-10 Martin Liska <mliska@suse.cz>
6272
6273 PR sanitizer/80350
6274 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
6275 doing an UBSAN check.
6276
5764ee3c
JW
62772017-04-03 Jonathan Wakely <jwakely@redhat.com>
6278
6279 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
6280
6f3af356
JJ
62812017-03-31 Jakub Jelinek <jakub@redhat.com>
6282
6283 PR c++/79572
6284 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
6285 tree *.
6286 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
6287 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
6288 REFERENCE_TYPE.
6289
f6a7a9d5
DM
62902017-03-31 David Malcolm <dmalcolm@redhat.com>
6291
6292 PR documentation/78732
6293 * c.opt (Wendif-labels): Fix description to refer to
6294 #else rather than #elif.
6295
af88f557
JJ
62962017-03-31 Jakub Jelinek <jakub@redhat.com>
6297
6298 PR libstdc++/80251
6299 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
6300 * c-common.c (c_common_reswords): Add __is_aggregate trait.
6301
a9e4a1a5
JJ
63022017-03-27 Jakub Jelinek <jakub@redhat.com>
6303
6304 PR middle-end/80162
6305 * c-common.c (c_common_mark_addressable_vec): Don't set
6306 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
6307
3f01b620
MS
63082017-03-21 Martin Sebor <msebor@redhat.com>
6309
6310 PR c++/79548
6311 * c-common.c (set_underlying_type): Mark type used only when
6312 original del is declared unused.
6313
2f6f187a
DM
63142017-03-10 David Malcolm <dmalcolm@redhat.com>
6315
6316 PR translation/79848
6317 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
6318 "%qs".
6319
a02fa805
DM
63202017-03-10 David Malcolm <dmalcolm@redhat.com>
6321
6322 PR c/79921
6323 * c-indentation.c (warn_for_misleading_indentation): Remove parens
6324 from inform's message, so that xgettext can locate it.
6325
822a132c
MP
63262017-03-09 Marek Polacek <polacek@redhat.com>
6327
6328 PR c++/79962
6329 PR c++/79984
6330 * c-attribs.c (handle_nonnull_attribute): Save the result of default
6331 conversion to the attribute list.
6332
bba81f1c
ML
63332017-03-09 Martin Liska <mliska@suse.cz>
6334
6335 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
6336
108154ff
JM
63372017-03-03 Jason Merrill <jason@redhat.com>
6338
6339 * c.opt (Wnoexcept-type): New.
6340
eb0e7c34
RB
63412017-03-02 Richard Biener <rguenther@suse.de>
6342
6343 PR c/79756
6344 * c-common.c (c_common_mark_addressable_vec): Look through
6345 C_MAYBE_CONST_EXPR.
6346
9453ba0a
ML
63472017-02-28 Martin Liska <mliska@suse.cz>
6348
6349 * c.opt: Replace space with tabular for options of <number>
6350 type.
6351
6a825afe
ML
63522017-02-28 Martin Liska <mliska@suse.cz>
6353
6354 * c.opt: Fix --help=option -Q for options which are of
6355 an enum type.
6356
4227c9ad
JJ
63572017-02-24 Jakub Jelinek <jakub@redhat.com>
6358
6359 PR c++/79588
6360 * c-common.c (check_function_restrict): New function.
6361 (check_function_arguments): Add FNDECL argument. Call
6362 check_function_restrict if -Wrestrict.
6363 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
6364 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
6365 * c-common.h (check_function_arguments): Add FNDECL argument.
6366 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
6367
59909673
EB
63682017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6369
6370 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
6371 treatment of parameters with pointer-to-tagged type and tidy up.
6372 (print_ada_methods): Remove the special treatment of C++ static member
6373 functions.
6374
54dcd526
ML
63752017-02-22 Martin Liska <mliska@suse.cz>
6376
6377 * c.opt: Replace inequality signs with square brackets
6378 for -Wnornalized.
6379
00bc9de3
JJ
63802017-02-21 Jakub Jelinek <jakub@redhat.com>
6381
6382 PR c++/79641
6383 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
6384 preserve quals.
6385
97fcf744
JM
63862017-02-17 Joseph Myers <joseph@codesourcery.com>
6387
6388 * c-cppbuiltin.c (builtin_define_float_constants): Define
6389 __DECIMAL_DIG__ to the value for long double.
6390
c7545f1c
MP
63912017-02-15 Marek Polacek <polacek@redhat.com>
6392
6393 PR c/79515
6394 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
6395 conversion has occured.
6396
c2e84327
DM
63972017-01-24 David Malcolm <dmalcolm@redhat.com>
6398
6399 * c-common.c (c_common_reswords): Add "__RTL".
6400 * c-common.h (enum rid): Add RID_RTL.
6401
2ebd93e1
MP
64022017-01-20 Marek Polacek <polacek@redhat.com>
6403
6404 PR c/64279
6405 * c-common.h (do_warn_duplicated_branches_r): Declare.
6406 * c-gimplify.c (c_genericize): Walk the function tree calling
6407 do_warn_duplicated_branches_r.
6408 * c-warn.c (expr_from_macro_expansion_r): New.
6409 (do_warn_duplicated_branches): New.
6410 (do_warn_duplicated_branches_r): New.
6411 * c.opt (Wduplicated-branches): New option.
6412
0d80ab91
DM
64132017-01-17 David Malcolm <dmalcolm@redhat.com>
6414
6415 PR c++/71497
6416 * c-indentation.c (warn_for_misleading_indentation): Use the past
6417 subjunctive in the note.
6418
7f991c36
AH
64192017-01-17 Aldy Hernandez <aldyh@redhat.com>
6420
6421 PR c/79116
6422 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
6423 start type to integer_type.
6424
1c70261c
JJ
64252017-01-16 Jakub Jelinek <jakub@redhat.com>
6426
6427 PR driver/49726
6428 * c.opt (gen-decls): Add Driver flag.
6429
1ddca3f3
PC
64302017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6431
6432 Revert:
6433 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6434
6435 PR c++/71737
6436 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
6437
7d2f3f1d
PC
64382017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6439
6440 PR c++/71737
6441 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
6442
bce6f760
MS
64432017-01-12 Martin Sebor <msebor@redhat.com>
6444
6445 (-Wformat-overflow): ...to this.
6446
bf5fbf46
MS
64472017-01-11 Martin Sebor <msebor@redhat.com>
6448
6449 PR c/78768
6450 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
6451 Also enable for LTO.
6452
e363df3f
JM
64532017-01-10 Jason Merrill <jason@redhat.com>
6454
6455 Implement P0195R2, C++17 variadic using.
6456 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
6457
bd2c6270
JJ
64582017-01-09 Jakub Jelinek <jakub@redhat.com>
6459
6460 PR translation/79019
6461 PR translation/79020
6462 * c.opt (Wnormalized=): Fix typo in description.
6463
efcc8d38
MS
64642017-01-08 Martin Sebor <msebor@redhat.com>
6465
6466 PR middle-end/77708
6467 * c.opt (-Wformat-truncation): New option.
6468
ab20d992 64692017-01-06 Alexandre Oliva <aoliva@redhat.com>
435f3f7a
AO
6470
6471 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
6472 value to unsigned short to fit in 4 hex digits without
6473 warnings.
6474
4e89adf9
EB
64752017-01-05 Eric Botcazou <ebotcazou@adacore.com>
6476
6477 * c.opt (fsso-struct): Add 'native' value.
6478
cd445b54
ML
64792017-01-05 Martin Liska <mliska@suse.cz>
6480
6481 PR pch/78970
6482 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
6483 header.
6484
a9342885
MP
64852017-01-04 Marek Polacek <polacek@redhat.com>
6486
6487 PR c++/64767
6488 * c.opt (Wpointer-compare): New option.
6489
fc73e60c
JJ
64902017-01-04 Jakub Jelinek <jakub@redhat.com>
6491
6492 PR driver/78957
6493 * c.opt (fsso-struct=): Add RejectNegative.
6494
cbe34bb5
JJ
64952017-01-01 Jakub Jelinek <jakub@redhat.com>
6496
6497 Update copyright years.
6498
d4a6c0ea
ML
64992016-12-29 Martin Liska <mliska@suse.cz>
6500
6501 PR c/78933
6502 * c.opt (strong-eval-order): Add RejectNegative keyword.
6503
67a5ad7c
JM
65042016-12-22 Jason Merrill <jason@redhat.com>
6505
6506 Implement P0522R0, matching of template template arguments.
6507 * c-cppbuiltin.c (c_cpp_builtins): Define
6508 __cpp_template_template_args.
6509
0dba7960
JJ
65102016-12-21 Jakub Jelinek <jakub@redhat.com>
6511
6512 PR bootstrap/78817
6513 * c-common.c (struct nonnull_arg_ctx): New type.
6514 (check_function_nonnull): Return bool instead of void. Use
6515 nonnull_arg_ctx as context rather than just location_t.
6516 (check_nonnull_arg): Adjust for the new context type, set
6517 warned_p to true if a warning has been diagnosed.
6518 (check_function_arguments): Return bool instead of void.
6519 * c-common.h (check_function_arguments): Adjust prototype.
6520
31bfc9b9
JM
65212016-12-21 Jason Merrill <jason@redhat.com>
6522
6523 * c.opt (-fnew-ttp-matching): New flag.
6524 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
6525
629b3d75
MJ
65262016-12-14 Martin Jambor <mjambor@suse.cz>
6527
6528 * c-omp.c: Include omp-general.h instead of omp-low.h.
6529 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
6530 name.
6531
474da67e
MS
65322016-12-14 Martin Sebor <msebor@redhat.com>
6533
6534 PR c/17308
6535 * c-common.c (check_nonnull_arg): Disable when optimization
6536 is enabled.
6537
fe366b87
MP
65382016-12-12 Marek Polacek <polacek@redhat.com>
6539
6540 PR c++/78647
6541 * c-common.c (attribute_fallthrough_p): Return false for
6542 error_mark_node.
6543
8bd9f164
MS
65442016-12-08 Martin Sebor <msebor@redhat.com>
6545
6546 PR c/78284
6547 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
6548
060162e0
MS
65492016-12-08 Martin Sebor <msebor@redhat.com>
6550
6551 PR c/78165
92a285c1
ML
6552 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
6553 suffix.
060162e0 6554
ee92e7ba
MS
65552016-12-07 Martin Sebor <msebor@redhat.com>
6556
6557 PR c/53562
6558 PR middle-end/77784
6559 PR middle-end/78149
6560 PR middle-end/78138
6561 * c.opt (-Wstringop-overflow): New option.
6562
84b0769e
MO
65632016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
6564
6565 * c-attribs.c (asan odr indicator): New attribute.
6566 (handle_asan_odr_indicator_attribute): New function.
6567
7fa6a965
PK
65682016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6569
6570 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
6571 ptrdiff_type_node;
6572
56d8ffc1
JG
65732016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6574
6575 * c-common.c (excess_precision_mode_join): New.
6576 (c_ts18661_flt_eval_method): New.
6577 (c_c11_flt_eval_method): Likewise.
6578 (c_flt_eval_method): Likewise.
6579 * c-common.h (excess_precision_mode_join): New.
6580 (c_flt_eval_method): Likewise.
6581 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
6582 (cpp_iec_559_value): Call it.
6583 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
6584 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
6585 __FLT_EVAL_METHOD_TS_18661_3__.
6586
04f0fcf7
JG
65872016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6588
6589 * c-opts.c (c_common_post_options): Add logic to handle the default
6590 case for -fpermitted-flt-eval-methods.
6591
fb2675cb
PB
65922016-11-23 Paolo Bonzini <bonzini@gnu.org>
6593
6594 * c.opt (Wexpansion-to-defined): New.
6595
ec1c5694
JJ
65962016-11-23 Jakub Jelinek <jakub@redhat.com>
6597
6598 PR target/78451
6599 * c-pragma.c (handle_pragma_target): Don't replace
6600 current_target_pragma, but chainon the new args to the current one.
6601
730c9e75
NS
66022016-11-22 Nathan Sidwell <nathan@acm.org>
6603
6604 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 6605 indentation and formatting.
730c9e75 6606
89990732
MS
66072016-11-21 Martin Sebor <msebor@redhat.com>
6608
6609 * c.opt (-fprintf-return-value): Enable by default.
6610
48330c93
BE
66112016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6612
6613 PR c++/71973
6614 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
6615 * c-common.c (c_common_nodes_and_builtins): Initialize
6616 const_tm_ptr_type_node.
6617
0d939c95
MP
66182016-11-16 Marek Polacek <polacek@redhat.com>
6619
6620 PR c/78285
6621 * c-common.c (c_add_case_label): Turn error_at calls into inform.
6622
8e745a17
JJ
66232016-11-14 Jakub Jelinek <jakub@redhat.com>
6624
6625 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
6626
1ee62b92 66272016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
6628 Richard Biener <rguenther@suse.de>
6629
6630 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
6631 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
6632 * c.opt (fgimple): New option.
1ee62b92 6633
22b15758
UB
66342016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6635
6636 PR c/35503
6637 * c-common.h (warn_for_restrict): Declare.
6638 * c-warn.c: Include gcc-rich-location.h.
6639 (warn_for_restrict): New function.
6640 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
6641 (gcc_cdiag_char_table): Likewise.
6642 (gcc_cxxdiag_char_table): Likewise.
6643 * c.opt (Wrestrict): New option.
6644
4be719cd
EB
66452016-11-13 Eric Botcazou <ebotcazou@adacore.com>
6646
6647 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
6648 for nested types only if the type is a record or union and dump SLOC.
6649
4a826ca6
JM
66502016-11-09 Jason Merrill <jason@redhat.com>
6651
6652 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
6653
2e955d50
JJ
66542016-11-09 Jakub Jelinek <jakub@redhat.com>
6655
6656 * c-ubsan.c (ubsan_instrument_shift): Handle split
6657 -fsanitize=shift-base and -fsanitize=shift-exponent.
6658
51dc6603
JM
66592016-11-07 Jason Merrill <jason@redhat.com>
6660
6661 * c.opt (Wc++1z-compat): New.
6662 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
6663
6dc4a604
ML
66642016-11-07 Martin Liska <mliska@suse.cz>
6665
6666 * c-warn.c (warn_for_unused_label): Save all labels used
6667 in goto or in &label.
6668
b302001e
JM
66692016-11-03 Jason Merrill <jason@redhat.com>
6670
6671 * c-cppbuiltin.c (c_cpp_builtins): Correct
6672 __cpp_inheriting_constructors.
6673
31f7f784
JM
66742016-11-01 Jason Merrill <jason@redhat.com>
6675
2bc78e3c
JM
6676 * c-cppbuiltin.c (c_cpp_builtins): Update
6677 __cpp_inheriting_constructors.
6678
31f7f784
JM
6679 * c.opt (-fnew-inheriting-ctors): New.
6680 * c-opts.c: Default to on for ABI 11+.
6681
dcb466ec
JJ
66822016-10-31 Jakub Jelinek <jakub@redhat.com>
6683
6684 PR c++/77948
6685 * c.opt (fext-numeric-literals): Add Var and Init.
6686 * c-opts.c (c_common_handle_option): Don't clear
6687 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
6688 (c_common_post_options): Clear it here if not set
6689 explicitly.
6690
52e1b91e
AH
66912016-10-28 Aldy Hernandez <aldyh@redhat.com>
6692
6693 PR debug/77773
6694 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
6695 if NULL.
6696
e16f1cc7
JJ
66972016-10-25 Jakub Jelinek <jakub@redhat.com>
6698
6699 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
6700 * c-common.c (c_common_reswords): Add __builtin_launder.
6701
f8348061
BE
67022016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
6703
6704 * c-common.c (c_common_truthvalue_conversion): Warn for
6705 multiplications in boolean context. Fix the quoting of '<<' and '<'
6706 in the shift warning.
6707
eff89e01
BE
67082016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6709
6710 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
6711
24bc7bf4
JM
67122016-10-20 Jason Merrill <jason@redhat.com>
6713
6714 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
6715
4c712374
BE
67162016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6717
6718 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
6719 integer shift ops in boolean context.
6720
67212016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
6722
6723 * c.opt (Walloca): New.
6724 (Walloca-larger-than=): New.
6725 (Wvla-larger-than=): New.
6726
8fa18c06
MP
67272016-10-17 Marek Polacek <polacek@redhat.com>
6728
6729 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
6730 Return immediately when finding a match.
6731 (warn_tautological_cmp): Remove a boolean variable that is no longer
6732 needed.
6733
b12b1915
MP
67342016-10-17 Marek Polacek <polacek@redhat.com>
6735
6736 * c-attribs.c: New file.
6737 * c-common.c: Move attributes handling to c-attribs.c.
6738 (get_nonnull_operand): No longer static.
6739 * c-common.h: Move the declarations from c-attribs.c to its own section.
6740
2045acd9
JM
67412016-10-14 Jason Merrill <jason@redhat.com>
6742
6743 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
6744 and __cpp_deduction_guides.
6745
14a2c9aa
JM
67462016-10-13 Jason Merrill <jason@redhat.com>
6747
6748 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
6749
4d0cdd0c
TP
67502016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
6751
6752 * c-cppbuiltin.c: Include memmodel.h.
6753 * c-opts.c: Likewise.
6754 * c-pragma.c: Likewise.
6755 * c-warn.c: Likewise.
6756
70f6d5e1
JJ
67572016-10-12 Jakub Jelinek <jakub@redhat.com>
6758
6759 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
6760 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
6761 * c-opts.c (sanitize_cpp_opts): Initialize
6762 cpp_opts->cpp_warn_implicit_fallthrough.
6763
78f61294
MP
67642016-10-11 Marek Polacek <polacek@redhat.com>
6765
6766 * c-common.c (warning_candidate_p): Change the return type to bool
6767 and return true/false instead of 1/0.
6768 (vector_mode_valid_p): Likewise.
6769
038b5cc0
MP
67702016-10-11 Marek Polacek <polacek@redhat.com>
6771
6772 * c-common.c (fold_for_warn): No longer static.
6773 (bool_promoted_to_int_p): Likewise.
6774 (c_common_get_narrower): Likewise.
6775 (constant_expression_warning): Move to c-warn.c.
6776 (constant_expression_error): Likewise.
6777 (overflow_warning): Likewise.
6778 (warn_logical_operator): Likewise.
6779 (find_array_ref_with_const_idx_r): Likewise.
6780 (warn_tautological_cmp): Likewise.
6781 (expr_has_boolean_operands_p): Likewise.
6782 (warn_logical_not_parentheses): Likewise.
6783 (warn_if_unused_value): Likewise.
6784 (strict_aliasing_warning): Likewise.
6785 (sizeof_pointer_memaccess_warning): Likewise.
6786 (check_main_parameter_types): Likewise.
6787 (conversion_warning): Likewise.
6788 (warnings_for_convert_and_check): Likewise.
6789 (match_case_to_enum_1): Likewise.
6790 (match_case_to_enum): Likewise.
6791 (c_do_switch_warnings): Likewise.
6792 (warn_for_omitted_condop): Likewise.
6793 (readonly_error): Likewise.
6794 (lvalue_error): Likewise.
6795 (invalid_indirection_error): Likewise.
6796 (warn_array_subscript_with_type_char): Likewise.
6797 (warn_about_parentheses): Likewise.
6798 (warn_for_unused_label): Likewise.
6799 (warn_for_div_by_zero): Likewise.
6800 (warn_for_memset): Likewise.
6801 (warn_for_sign_compare): Likewise.
6802 (do_warn_double_promotion): Likewise.
6803 (do_warn_unused_parameter): Likewise.
6804 (record_locally_defined_typedef): Likewise.
6805 (maybe_record_typedef_use): Likewise.
6806 (maybe_warn_unused_local_typedefs): Likewise.
6807 (maybe_warn_bool_compare): Likewise.
6808 (maybe_warn_shift_overflow): Likewise.
6809 (warn_duplicated_cond_add_or_warn): Likewise.
6810 (diagnose_mismatched_attributes): Likewise.
6811 * c-common.h: Move the declarations from c-warn.c to its own section.
6812 * c-warn.c: New file.
6813
627be19f
JM
68142016-10-08 Jason Merrill <jason@redhat.com>
6815
6816 * c-common.c (c_common_truthvalue_conversion): Don't distribute
6817 into COND_EXPR in C++.
6818
7bad794a
JJ
68192016-10-08 Jakub Jelinek <jakub@redhat.com>
6820
6821 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
6822 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
6823 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
6824
be845b04
JJ
68252016-10-07 Jakub Jelinek <jakub@redhat.com>
6826
6827 Implement LWG2296 helper intrinsic
6828 * c-common.h (enum rid): Add RID_ADDRESSOF.
6829 * c-common.c (c_common_reswords): Add __builtin_addressof.
6830
c09c4992
BE
68312016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
6832
6833 PR c++/77700
6834 * c-common.c (c_common_truthvalue_conversion): Warn also for
6835 suspicious enum values in boolean context.
6836
342cfb3e
JJ
68372016-10-06 Jakub Jelinek <jakub@redhat.com>
6838
6839 Implement P0258R2 - helper for C++17
6840 std::has_unique_object_representations trait
6841 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
6842 * c-common.c (c_common_reswords): Add
6843 __has_unique_object_representations.
6844
2e69f143
JJ
68452016-10-05 Jakub Jelinek <jakub@redhat.com>
6846
6847 PR sanitizer/66343
6848 * c-ubsan.c (ubsan_instrument_return): Don't call
6849 initialize_sanitizer_builtins here.
6850
700fff34
BE
68512016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
6852
6853 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
6854 conditional expression in boolean context when only one arm is
6855 non-boolean.
6856
9563bfcd
JJ
68572016-10-05 Jakub Jelinek <jakub@redhat.com>
6858
04a32443
JJ
6859 PR sanitizer/77823
6860 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
6861 is not integral.
6862
9563bfcd
JJ
6863 * c-common.c (c_common_reswords): Update comment for C++11.
6864
f1644724
JM
68652016-10-04 Jason Merrill <jason@redhat.com>
6866
6867 * c-common.c (make_tree_vector_from_ctor): New.
6868 * c-common.h: Declare it.
6869
5a79befb
JJ
68702016-10-04 Jakub Jelinek <jakub@redhat.com>
6871
6872 * c-cppbuiltin.c (c_cpp_builtins): Don't define
6873 __LIBGCC_JCR_SECTION_NAME__.
6874
1633d3b9
BE
68752016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
6876
6877 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
6878 left shift in boolean context.
6879
a2c6e7f2
JJ
68802016-09-29 Jakub Jelinek <jakub@redhat.com>
6881
6882 Implement P0001R1 - C++17 removal of register storage class specifier
6883 * c.opt (Wregister): New warning.
6884 * c-opts.c (c_common_post_options): Enable -Wregister by
6885 default for C++17.
6886
75304c87
JG
68872016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
6888
6889 * c-opts.c (c_common_post_options): Remove special case for
6890 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
6891 in C++.
6892
bbfac6da
JJ
68932016-09-27 Jakub Jelinek <jakub@redhat.com>
6894
6e39060a
JJ
6895 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
6896 -std=c++1z.
6897
bbfac6da
JJ
6898 * c-ada-spec.c (print_ada_declaration): Remove break after return.
6899
e73cf9a2
TP
69002016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
6901
6902 * c-common.c: Include memmodel.h.
6903
c6147dc4
MP
69042016-09-26 Marek Polacek <polacek@redhat.com>
6905
6906 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
6907
81fea426
MP
69082016-09-26 Marek Polacek <polacek@redhat.com>
6909
6910 PR c/7652
6911 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
6912 (handle_fallthrough_attribute): New function.
6913 (attribute_fallthrough_p): New function.
6914 * c-common.h (attribute_fallthrough_p): Declare.
6915
9a2300e9
MP
69162016-09-24 Marek Polacek <polacek@redhat.com>
6917
6918 PR c/77490
6919 * c.opt (Wbool-operation): New.
6920
a09e9e35
BE
69212016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6922
6923 * c-common.c (c_common_truthvalue_conversion): Inhibit
6924 Wint-in-bool-context warning with from_macro_definition_at.
6925 Mention the expression will always evaluate to true.
6926
d43b4ccc
MS
69272016-09-21 Martin Sebor <msebor@redhat.com>
6928
6929 PR bootstrap/77676
6930 * c.opt (fprintf-return-value): Temporarily initialize to zero
6931 to unblock bootstrap failures.
6932
2e1c20b1
JJ
69332016-09-21 Jakub Jelinek <jakub@redhat.com>
6934
6935 PR c++/77651
6936 * c.opt (Waligned-new=): Add RejectNegative.
6937 (faligned-new=): Likewise. Spelling fix - change
6938 aligned_new_threshhold to aligned_new_threshold.
6939 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
6940 to aligned_new_threshold.
6941
88d0c3f0
MS
69422016-09-20 Martin Sebor <msebor@redhat.com>
6943
6944 PR middle-end/49905
6945 * c.opt: Add -Wformat-length and -fprintf-return-value.
6946
144a96e4
BE
69472016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6948
6949 PR c++/77434
6950 * c.opt (Wint-in-bool-context): New warning.
6951 * c-common.c (c_common_truthvalue_conversion): Warn on integer
6952 constants in boolean context.
6953
63012d9a
JM
69542016-09-19 Joseph Myers <joseph@codesourcery.com>
6955
6956 * c-common.c (max_align_t_align): Also consider alignment of
6957 float128_type_node.
6958
931388ce
JM
69592016-09-15 Jason Merrill <jason@redhat.com>
6960
6961 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
6962 DECL_EXTERNAL.
6963
38711381
JM
69642016-09-14 Jason Merrill <jason@redhat.com>
6965
6966 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
6967 limit FIELD_DECL, either.
6968
e51fbec3
MP
69692016-09-14 Marek Polacek <polacek@redhat.com>
6970
6971 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
6972 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
6973 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
6974
254830ba
DM
69752016-09-13 David Malcolm <dmalcolm@redhat.com>
6976
6977 * c-common.c (warn_logical_not_parentheses): Replace
6978 rich_location::add_fixit_insert calls with add_fixit_insert_before
6979 and add_fixit_insert_after, eliminating the "next_loc" calculation.
6980
42763690
JM
69812016-09-13 Jason Merrill <jason@redhat.com>
6982 Tom de Vries <tom@codesourcery.com>
6983
6984 PR c++/77427
6985 * c-common.c (set_underlying_type): Don't treat array as builtin type.
6986
9453eee9
JM
69872016-09-13 Jason Merrill <jason@redhat.com>
6988
6989 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
6990 limit types at all.
6991
e96809e3
JM
69922016-09-12 Jason Merrill <jason@redhat.com>
6993
6994 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
6995 bit/byte confusion, allow large alignment for types.
6996
54dcdb88
BE
69972016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
6998
6999 PR c++/77496
7000 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
7001
d1463eb9
DM
70022016-09-12 David Malcolm <dmalcolm@redhat.com>
7003
7004 PR c/72858
7005 * c-format.c (argument_parser::check_argument_type): Add params
7006 "type_start" and "conversion_char". Use the former to generate
7007 offset_to_type_start and pass it and conversion_char to
7008 check_format_types.
7009 (check_format_info_main): Capture the start of the type
7010 information as "type_start", and pass it an format_char
7011 to arg_parser.check_argument_type.
7012 (check_format_types): Provide an example in the leading comment.
7013 Add params "offset_to_type_start" and "conversion_char"; pass
7014 them to format_type_warning calls.
7015 (test_get_modifier_for_format_len): Likewise.
7016 (matching_type_p): New function.
7017 (get_format_for_type): Add param "conversion_char" and move
7018 implementation into...
7019 (get_format_for_type_1): ...new function, called twice.
7020 Use new function matching_type_p rather than checking for
7021 TYPE_CANONICAL equality.
7022 (get_corrected_substring): New function.
7023 (format_type_warning): Provide an example in the leading comment.
7024 Add params "offset_to_type_start" and "conversion_char". Replace
7025 call to get_format_for_type with call to get_corrected_substring
7026 and move rejection of hints for widths/precisions there.
7027 (assert_format_for_type_streq): Add param "conversion_char".
7028 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
7029 (test_get_format_for_type_printf): Add conversion chars to the
7030 tests, adding coverage for various combinations of integer
7031 vs double conversions, and for preserving octal and hexadecimal
7032 conversions.
7033 (test_get_format_for_type_scanf): Add conversion chars to the
7034 tests.
7035
5b28efbb
TV
70362016-09-10 Tom de Vries <tom@codesourcery.com>
7037
7038 PR C/71602
7039 * c-common.c (build_va_arg): Handle more strict
7040 targetm.canonical_va_list_type. Replace first argument type error with
7041 assert.
7042
3f0177e7
MS
70432016-09-09 Martin Sebor <msebor@redhat.com>
7044
7045 PR c/77520
7046 PR c/77521
7047 * c-format.c (argument_parser::find_format_char_info): Use %qc
7048 format directive unconditionally.
7049
af63ba4b
JM
70502016-09-09 Jason Merrill <jason@redhat.com>
7051
7052 Implement C++17 new of over-aligned types.
7053 * c.opt: Add -faligned-new and -Waligned-new.
7054 * c-common.c (max_align_t_align): Split out from...
7055 (cxx_fundamental_alignment_p): ...here.
7056 * c-common.h: Declare it.
7057 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
7058
c65248cb
JM
70592016-09-09 Joseph Myers <joseph@codesourcery.com>
7060
7061 * c-cppbuiltin.c (builtin_define_type_width): New function.
7062 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
7063 macros.
7064
e5106e27
DM
70652016-09-07 David Malcolm <dmalcolm@redhat.com>
7066
7067 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
7068 a POINTER_TYPE.
7069 (substring_loc::get_location): Move to substring-locations.c,
7070 keeping implementation as...
7071 (c_get_substring_location): New function, from the above, reworked
7072 to use accessors rather than member lookup.
7073 * c-common.h (class substring_loc): Move to substring-locations.h,
7074 replacing with a forward decl.
7075 (c_get_substring_location): New decl.
7076 * c-format.c: Include "substring-locations.h".
7077 (format_warning_va): Move to substring-locations.c.
7078 (format_warning_at_substring): Likewise.
7079
ab20d992 70802016-09-06 Martin Sebor <msebor@redhat.com>
a42e7952
MS
7081
7082 PR c/77336
7083 * c-format.c (check_function_format): Avoid issuing warnings for
7084 functions unless they call format functions with non-constant
7085 format strings.
7086
b772a565
RB
70872016-09-06 Richard Biener <rguenther@suse.de>
7088
7089 PR c/77450
7090 * c-common.c (c_common_mark_addressable_vec): Handle
7091 COMPOUND_LITERAL_EXPR.
7092
25ff5dd3
MP
70932016-09-05 Marek Polacek <polacek@redhat.com>
7094
7095 PR c/77423
7096 * c-common.c (bool_promoted_to_int_p): New function.
7097 (expr_has_boolean_operands_p): New function.
7098 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
7099 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
7100
21234eb5
TV
71012016-09-04 Tom de Vries <tom@codesourcery.com>
7102
7103 revert:
7104 2016-08-29 Tom de Vries <tom@codesourcery.com>
7105
7106 * c-common.c (build_va_arg): Replace first argument type error
7107 with assert.
7108
9dc5773f
JJ
71092016-09-02 Jakub Jelinek <jakub@redhat.com>
7110
7111 PR c/65467
7112 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
7113 (c_finish_omp_for): Reject _Atomic qualified iterators.
7114
71152016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
7116
7117 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
7118 size to guarantee it fits the output of the formatted function
7119 regardless of its arguments.
7120
295844f6
MP
71212016-09-01 Marek Polacek <polacek@redhat.com>
7122
7123 PR c/7652
7124 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
7125 FALLTHRU comments.
7126
3d06b6f2
MP
71272016-08-29 Marek Polacek <polacek@redhat.com>
7128
7129 PR c/77292
7130 * c-common.c (warn_logical_not_parentheses): Don't warn for
7131 a comparison or a logical operator.
7132
34cedad5
TV
71332016-08-29 Tom de Vries <tom@codesourcery.com>
7134
7135 * c-common.c (build_va_arg): Fix type comparison assert.
7136
f162d717
TV
71372016-08-29 Tom de Vries <tom@codesourcery.com>
7138
7139 * c-common.c (build_va_arg): Replace first argument type error
7140 with assert.
7141
ba9bbd6f
TV
71422016-08-29 Tom de Vries <tom@codesourcery.com>
7143
7144 PR c/77398
7145 * c-common.c (build_va_arg): Add first argument error. Build va_arg
7146 with error_mark_node as va_list instead of with illegal va_list.
7147
ebef225f
MP
71482016-08-25 Marek Polacek <polacek@redhat.com>
7149 David Malcolm <dmalcolm@redhat.com>
7150
7151 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
7152 * c-common.h (warn_logical_not_parentheses): Update declaration.
7153
b00e6e75
MP
71542016-08-22 Marek Polacek <polacek@redhat.com>
7155
7156 PR c++/77321
7157 * c-common.c (warn_for_memset): Check type for null.
7158
6dc198e3
JM
71592016-08-22 Joseph Myers <joseph@codesourcery.com>
7160
14ec014e 7161 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
7162 _FloatNx types for suffixes for built-in functions.
7163
c65699ef
JM
71642016-08-19 Joseph Myers <joseph@codesourcery.com>
7165
7166 PR c/32187
7167 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
7168 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
7169 (RID_FLOAT128X): New enum rid values.
7170 (CASE_RID_FLOATN_NX): New macro.
7171 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
7172 keywords.
7173 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
7174 corresponding complex types.
7175 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
7176 _FloatNx and corresponding complex types.
7177 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
7178 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
7179 and _FloatNx types for the widest type for determining
7180 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
7181 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
7182 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
7183 and _FloatNx types.
7184 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
7185 constants.
7186 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
7187 _FloatNx types.
7188
cc015f3a
DM
71892016-08-18 David Malcolm <dmalcolm@redhat.com>
7190
7191 * c-opts.c (c_diagnostic_finalizer): Update for change to
7192 diagnostic_show_locus.
7193
cb18fd07
DM
71942016-08-18 David Malcolm <dmalcolm@redhat.com>
7195
7196 * c-common.c: Include "spellcheck.h".
7197 (cb_get_suggestion): New function.
7198 * c-common.h (cb_get_suggestion): New decl.
7199 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
7200 cb_get_suggestion.
7201
a76989dc
MP
72022016-08-18 Marek Polacek <polacek@redhat.com>
7203
7204 PR c/71514
7205 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
7206 and pointer-to-VLA.
7207
65e736c0
DM
72082016-08-16 David Malcolm <dmalcolm@redhat.com>
7209
7210 PR c/72857
7211 * c-common.c (substring_loc::get_range): Rename to...
7212 (substring_loc::get_location): ...this, converting param from a
7213 source_range * to a location_t *. Call
7214 get_source_location_for_substring rather than
7215 get_source_range_for_substring, and pass in m_caret_idx.
7216 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
7217 (substring_loc::get_range): Replace with...
7218 (substring_loc::get_location): ...this.
7219 (substring_loc::set_caret_index): New method.
7220 (substring_loc): Add field m_caret_idx.
7221 * c-format.c (format_warning_va): Update for above changes.
7222 Rename local "substring_loc" to "fmt_substring_loc" to avoid
7223 clashing with type name.
7224 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
7225 (check_argument_type): Likewise.
7226 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
7227 Use a copy when emitting warnings, setting the caret index from TYPE.
7228
7e1dde14 72292016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 7230 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
7231
7232 * c-ada-spec.c (dump_number): New function.
7233 (handle_escape_character): Likewise.
7234 (print_ada_macros): Add handling of constant integers and strings.
7235
191816a3
MP
72362016-08-12 Marek Polacek <polacek@redhat.com>
7237
7238 PR c/7652
7239 * c-common.c (scalar_to_vector): Adjust fall through comment.
7240 * c-opts.c (c_common_handle_option): Likewise.
7241 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
7242 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
7243 fall through comment.
7244 * cilk.c (extract_free_variables): Add FALLTHRU.
7245
452df4a4
JM
72462016-08-10 Jason Merrill <jason@redhat.com>
7247
7248 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
7249
f3365c12
JM
72502016-08-09 Jason Merrill <jason@redhat.com>
7251
7252 * c-common.c (c_common_attribute_table): vector_size affects type
7253 identity.
7254
f0bc3323
MP
72552016-08-09 Marek Polacek <polacek@redhat.com>
7256
7257 PR c/7652
7258 * c-ada-spec.c (dump_generic_ada_node): Add return.
7259
98e5a19a
JM
72602016-08-09 Jason Merrill <jason@redhat.com>
7261
7262 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
7263 C++17 constexpr lambdas.
7264
895aa8e1
DM
72652016-08-08 David Malcolm <dmalcolm@redhat.com>
7266
7267 PR c/64955
7268 * c-common.h (selftest::c_format_c_tests): New declaration.
7269 (selftest::run_c_tests): New declaration.
7270 * c-format.c: Include "selftest.h.
7271 (format_warning_va): Add param "corrected_substring" and use
7272 it to add a replacement fix-it hint.
7273 (format_warning_at_substring): Likewise.
7274 (format_warning_at_char): Update for new param of
7275 format_warning_va.
7276 (argument_parser::check_argument_type): Pass "fki" to
7277 check_format_types.
7278 (check_format_types): Add param "fki" and pass it to
7279 format_type_warning.
7280 (deref_n_times): New function.
7281 (get_modifier_for_format_len): New function.
7282 (selftest::test_get_modifier_for_format_len): New function.
7283 (get_format_for_type): New function.
7284 (format_type_warning): Add param "fki" and use it to attempt
7285 to provide hints for argument types when calling
7286 format_warning_at_substring.
7287 (selftest::get_info): New function.
7288 (selftest::assert_format_for_type_streq): New function.
7289 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
7290 (selftest::test_get_format_for_type_printf): New function.
7291 (selftest::test_get_format_for_type_scanf): New function.
7292 (selftest::c_format_c_tests): New function.
7293
e52ed3fe
DM
72942016-08-08 David Malcolm <dmalcolm@redhat.com>
7295
7296 PR c/52952
7297 * c-format.c: Include "diagnostic.h".
7298 (location_column_from_byte_offset): Delete.
7299 (location_from_offset): Delete.
7300 (format_warning_va): New function.
7301 (format_warning_at_substring): New function.
7302 (format_warning_at_char): New function.
7303 (check_format_arg): Capture location of format_tree and pass to
7304 check_format_info_main.
7305 (argument_parser): Add fields "start_of_this_format" and
7306 "format_string_cst".
7307 (flag_chars_t::validate): Add param "format_string_cst". Convert
7308 warning_at call using location_from_offset to call to
7309 format_warning_at_char.
7310 (argument_parser::argument_parser): Add param "format_string_cst_"
7311 and use use it to initialize field "format_string_cst".
7312 Initialize new field "start_of_this_format".
7313 (argument_parser::read_format_flags): Convert warning_at call
7314 using location_from_offset to a call to format_warning_at_char.
7315 (argument_parser::read_any_format_left_precision): Likewise.
7316 (argument_parser::read_any_format_precision): Likewise.
7317 (argument_parser::read_any_other_modifier): Likewise.
7318 (argument_parser::find_format_char_info): Likewise, in three places.
7319 (argument_parser::parse_any_scan_set): Likewise, in one place.
7320 (argument_parser::handle_conversions): Likewise, in two places.
7321 (argument_parser::check_argument_type): Add param "fmt_param_loc"
7322 and use it to make a substring_loc. Pass the latter to
7323 check_format_types.
7324 (check_format_info_main): Add params "fmt_param_loc" and
7325 "format_string_cst". Convert warning_at calls using
7326 location_from_offset to calls to format_warning_at_char. Pass the
7327 new params to the arg_parser ctor. Pass "format_string_cst" to
7328 flag_chars.validate. Pass "fmt_param_loc" to
7329 arg_parser.check_argument_type.
7330 (check_format_types): Convert first param from a location_t
7331 to a const substring_loc & and rename to "fmt_loc". Attempt
7332 to extract the range of the relevant parameter and pass it
7333 to format_type_warning.
7334 (format_type_warning): Convert first param from a location_t
7335 to a const substring_loc & and rename to "fmt_loc". Add
7336 params "param_range" and "type". Replace calls to warning_at
7337 with calls to format_warning_at_substring.
7338
1c4d457e
DM
73392016-08-08 David Malcolm <dmalcolm@redhat.com>
7340
7341 * c-format.c (class flag_chars_t): New class.
7342 (struct length_modifier): New struct.
7343 (class argument_parser): New class.
7344 (flag_chars_t::flag_chars_t): New ctor.
7345 (flag_chars_t::has_char_p): New method.
7346 (flag_chars_t::add_char): New method.
7347 (flag_chars_t::validate): New method.
7348 (flag_chars_t::get_alloc_flag): New method.
7349 (flag_chars_t::assignment_suppression_p): New method.
7350 (argument_parser::argument_parser): New ctor.
7351 (argument_parser::read_any_dollar): New method.
7352 (argument_parser::read_format_flags): New method.
7353 (argument_parser::read_any_format_width): New method.
7354 (argument_parser::read_any_format_left_precision): New method.
7355 (argument_parser::read_any_format_precision): New method.
7356 (argument_parser::handle_alloc_chars): New method.
7357 (argument_parser::read_any_length_modifier): New method.
7358 (argument_parser::read_any_other_modifier): New method.
7359 (argument_parser::find_format_char_info): New method.
7360 (argument_parser::validate_flag_pairs): New method.
7361 (argument_parser::give_y2k_warnings): New method.
7362 (argument_parser::parse_any_scan_set): New method.
7363 (argument_parser::handle_conversions): New method.
7364 (argument_parser::check_argument_type): New method.
7365 (check_format_info_main): Introduce classes argument_parser
7366 and flag_chars_t, moving the code within the loop into methods
7367 of these classes. Make various locals "const".
7368
88fa5555
DM
73692016-08-05 David Malcolm <dmalcolm@redhat.com>
7370
7371 * c-common.c: Include "substring-locations.h".
7372 (get_cpp_ttype_from_string_type): New function.
7373 (g_string_concat_db): New global.
7374 (substring_loc::get_range): New method.
7375 * c-common.h (g_string_concat_db): New declaration.
7376 (class substring_loc): New class.
7377 * c-lex.c (lex_string): When concatenating strings, capture the
7378 locations of all tokens using a new obstack, and record the
7379 concatenation locations within g_string_concat_db.
7380 * c-opts.c (c_common_init_options): Construct g_string_concat_db
7381 on the ggc-heap.
7382
78169471
MP
73832016-07-29 Marek Polacek <polacek@redhat.com>
7384
638fc14f
MP
7385 PR c/71926
7386 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
7387 parentheses warning.
7388
78169471
MP
7389 PR c/71574
7390 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
7391
1225d6b1
ML
73922016-07-28 Martin Liska <mliska@suse.cz>
7393
7394 PR gcov-profile/68025
7395 * c-common.c (handle_no_profile_instrument_function_attribute):
7396
ec1e2a40
BE
73972016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
7398
7399 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
7400 BITS_PER_UNIT_LOG.
7401
5ec2cd9f
JM
74022016-07-25 Jason Merrill <jason@redhat.com>
7403
7404 PR c++/65970
7405 * c.opt (fconstexpr-loop-limit): New.
7406
9dc5773f 74072016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
7408
7409 PR c++/71675
7410 * c-common.c (resolve_overloaded_builtin): Avoid converting
7411 __atomic_compare_exchange_n return type to that of what its
7412 first argument points to.
7413
e3fe09c1
UB
74142016-07-22 Uros Bizjak <ubizjak@gmail.com>
7415
7416 * c-common.c: Use HOST_WIDE_INT_M1U instead of
7417 ~(unsigned HOST_WIDE_INT) 0.
7418
bc91c436
ML
74192016-07-22 Martin Liska <mliska@suse.cz>
7420
7421 PR gcov-profile/69028
7422 PR gcov-profile/62047
7423 * cilk.c (create_cilk_helper_decl): Set location of a new decl
7424 to the current_function_decl.
7425
451dcc66
JM
74262016-07-21 Jason Merrill <jason@redhat.com>
7427
7428 PR c++/65168
7429 * c-common.c (c_common_truthvalue_conversion): Check
7430 c_inhibit_evaluation_warnings for warning about address of
7431 reference.
7432
de6a69ee
DM
74332016-07-20 David Malcolm <dmalcolm@redhat.com>
7434
7435 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
7436 const char *.
7437
d022c55a
JM
74382016-07-15 Jason Merrill <jason@redhat.com>
7439
7440 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
7441
ddbbcb19
JJ
74422016-07-15 Jakub Jelinek <jakub@redhat.com>
7443
7444 PR c/71858
7445 * c-common.h (enum lookup_name_fuzzy_kind): Add
7446 FUZZY_LOOKUP_FUNCTION_NAME.
7447
d0cf395a
JM
74482016-07-08 Jason Merrill <jason@redhat.com>
7449
7450 P0145: Refining Expression Order for C++.
7451 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
7452 * c-opts.c: Adjust.
7453
98d44e93
MT
74542016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
7455
7456 PR c++/71214
7457 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
7458
f9d8d994
TS
74592016-06-29 Thomas Schwinge <thomas@codesourcery.com>
7460
7461 * c-pragma.h (enum pragma_kind): Rename
7462 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
7463 users.
7464
4aa83879
RB
74652016-06-29 Richard Biener <rguenther@suse.de>
7466
7467 PR middle-end/71002
7468 * c-common.c (c_common_get_alias_set): Remove union type punning case.
7469
a25bd9e6
JM
74702016-06-24 Jason Merrill <jason@redhat.com>
7471
7472 P0145R2: Refining Expression Order for C++.
7473 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
7474 MODIFY_EXPR.
7475
a86451b9
JJ
74762016-06-24 Jakub Jelinek <jakub@redhat.com>
7477
7478 * c-common.c (check_builtin_function_arguments): Require last
7479 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
7480 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
7481 if the last argument is pointer to enumerated or boolean type.
7482
1a4f11c8
DM
74832016-06-22 David Malcolm <dmalcolm@redhat.com>
7484
7485 PR c/70339
7486 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
7487 (lookup_name_fuzzy): New prototype.
7488
fe55692c
JDA
74892016-06-21 John David Anglin <danglin@gcc.gnu.org>
7490
7491 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
7492
4eb24e01
JM
74932016-06-14 Jason Merrill <jason@redhat.com>
7494
7495 P0145R2: Refining Expression Order for C++.
7496 * c.opt (fargs-in-order): New.
7497 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
7498
ef7cf206
JJ
74992016-06-13 Jakub Jelinek <jakub@redhat.com>
7500
0dda258b
JJ
7501 PR sanitizer/71498
7502 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
7503 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
7504
ef7cf206
JJ
7505 PR preprocessor/71183
7506 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
7507 to cb_get_source_date_epoch.
7508
50b15873
JJ
75092016-06-10 Jakub Jelinek <jakub@redhat.com>
7510
7511 PR c/68657
7512 * c.opt (Wpsabi): Add Warning flag.
7513
4d926e34
MS
75142016-06-10 Martin Sebor <msebor@redhat.com>
7515
7516 PR c/71392
14ec014e 7517 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
7518 the nonnull attribute in type-generic builtins.
7519
e01b4e16
MS
75202016-06-09 Martin Sebor <msebor@redhat.com>
7521
7522 PR c/70883
7523 * c-common.c (builtin_function_validate_nargs): Make text of error
7524 message consistent with others like it.
7525
44a845ca
MS
75262016-06-08 Martin Sebor <msebor@redhat.com>
7527 Jakub Jelinek <jakub@redhat.com>
7528
7529 PR c++/70507
7530 PR c/68120
7531 * c-common.c (check_builtin_function_arguments): Handle
7532 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
7533
a80a7051
RB
75342016-06-08 Richard Biener <rguenther@suse.de>
7535
7536 * c-common.c (parse_optimize_options): Improve diagnostic messages.
7537
bfd67b47
RB
75382016-06-07 Richard Biener <rguenther@suse.de>
7539
7540 PR c/61564
7541 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
7542 options and warn about others.
7543
15c98b2e
ES
75442016-06-01 Eduard Sanou <dhole@openmailbox.org>
7545
7546 * c-common.c (get_source_date_epoch): Rename to
7547 cb_get_source_date_epoch.
7548 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
7549 message when the parsing fails. Use error_at instead of fatal_error.
7550 * c-common.h (get_source_date_epoch): Rename to
7551 cb_get_source_date_epoch.
7552 * c-common.h (cb_get_source_date_epoch): Prototype.
7553 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
7554 * c-common.h (c_omp_region_type): Remove trailing comma.
7555 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
7556 * c-lex.c (c_lex_with_flags): Remove initialization of
7557 pfile->source_date_epoch.
7558
00631022
JJ
75592016-05-30 Jakub Jelinek <jakub@redhat.com>
7560
7561 PR c++/71349
7562 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
7563 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
7564 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
7565 instead of C_OMP_CLAUSE_SPLIT_FOR.
7566
f17a223d
RB
75672016-05-24 Richard Biener <rguenther@suse.de>
7568
7569 PR middle-end/70434
7570 PR c/69504
7571 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
7572 (convert_vector_to_array_for_subscript): ... this.
7573 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
7574 VIEW_CONVERT_EXPR to an array type. Rename to ...
7575 (convert_vector_to_array_for_subscript): ... this.
7576
4f2e1536
MP
75772016-05-12 Marek Polacek <polacek@redhat.com>
7578
7579 PR c/70756
7580 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
7581 size_in_bytes and pass LOC to it.
7582
d6e83a8d
MM
75832016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
7584
7585 PR c/43651
7586 * c.opt (Wduplicate-decl-specifier): New option.
7587
5c3a10fb
MP
75882016-05-11 Marek Polacek <polacek@redhat.com>
7589
7590 PR c++/71024
7591 * c-common.c (diagnose_mismatched_attributes): New function.
7592 * c-common.h (diagnose_mismatched_attributes): Declare.
7593
deef7113
MP
75942016-05-04 Marek Polacek <polacek@redhat.com>
7595
7596 * c.opt (Wdangling-else): New option.
7597
79ce98bc
MP
75982016-05-03 Marek Polacek <polacek@redhat.com>
7599
7600 PR c/70859
7601 * c-common.c (builtin_function_validate_nargs): Add location
7602 parameter. Use it.
7603 (check_builtin_function_arguments): Add location and arguments
7604 parameters. Use them.
7605 * c-common.h (check_builtin_function_arguments): Update declaration.
7606
381cdae4
RB
76072016-05-03 Richard Biener <rguenther@suse.de>
7608
7609 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
7610 allow call args to gimplify to SSA names.
7611
1d793c34
MP
76122016-05-03 Marek Polacek <polacek@redhat.com>
7613
7614 * c-common.h (enum c_omp_region_type): Remove stray comma.
7615
77886428
CP
76162016-05-02 Cesar Philippidis <cesar@codesourcery.com>
7617
7618 * c-common.h (enum c_omp_region_type): Define.
7619
697e0b28
RS
76202016-05-02 Richard Sandiford <richard.sandiford@arm.com>
7621
7622 * c-common.c (shorten_compare): Use wi::to_wide.
7623
e7ff0319
CP
76242016-04-29 Cesar Philippidis <cesar@codesourcery.com>
7625
7626 PR middle-end/70626
7627 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
7628 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
7629 reduction clauses in acc parallel loops.
7630
2fff3db8
MP
76312016-04-29 Marek Polacek <polacek@redhat.com>
7632
7633 PR c/70852
7634 * c-common.c (warn_for_memset): Check domain before accessing it.
7635
509063eb
DV
76362016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
7637
7638 PR/69089
7639 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
7640 "aligned" attribute.
7641
b632761d
JM
76422016-04-28 Jason Merrill <jason@redhat.com>
7643
7644 * c-lex.c (c_common_has_attribute): Handle nodiscard.
7645
174f6622
ES
76462016-04-28 Eduard Sanou <dhole@openmailbox.org>
7647 Matthias Klose <doko@debian.org>
7648
7649 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 7650 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
7651 handling.
7652 * c-common.h (get_source_date_epoch): Prototype.
7653 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
7654
6bc2bb18
RB
76552015-04-27 Ryan Burn <contact@rnburn.com>
7656
7657 PR c++/69024
7658 PR c++/68997
7659 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
7660 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
7661 external linkage.
7662 (cilk_detect_and_unwrap): Corresponding changes.
7663 (extract_free_variables): Don't extract free variables from
7664 AGGR_INIT_EXPR slot.
7665 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
7666 (cilk_recognize_spawn): Likewise.
7667
c1e1f433
BS
76682016-04-27 Bernd Schmidt <bschmidt@redhat.com>
7669
7670 * c.opt (Wmemset-elt-size): New option.
7671 * c-common.c (warn_for_memset): New function.
7672 * c-common.h (warn_for_memset): Declare.
7673
d067e05f
JM
76742016-04-25 Jason Merrill <jason@redhat.com>
7675
7676 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
7677 No longer static.
7678 * c-common.h: Declare it.
7679 * c-lex.c (c_common_has_attribute): Add maybe_unused.
7680
9aa36ae5
JM
76812016-04-22 Jason Merrill <jason@redhat.com>
7682
7683 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
7684
477d4906
IV
76852016-04-20 Ilya Verbin <ilya.verbin@intel.com>
7686
7687 PR c++/69363
7688 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
7689 * c-common.h (c_finish_cilk_clauses): Remove declaration.
7690
fe37c7af
MM
76912016-04-18 Michael Matz <matz@suse.de>
7692
7693 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
7694 and SET_DECL_ALIGN.
7695
23f2660f
EB
76962016-04-17 Eric Botcazou <ebotcazou@adacore.com>
7697
7698 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
7699 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
7700 to incomplete types.
7701 (dump_nested_type): Remove redundant tests and tidy up.
7702 (print_ada_declaration): Also set TREE_VISITED on the declaration of
7703 a type which is the typedef of an original type.
7704
1e77281b
MP
77052016-04-15 Marek Polacek <polacek@redhat.com>
7706
7707 PR c/70651
7708 * c-common.c (build_va_arg): Change two asserts into errors and return
7709 error_mark_node.
7710
b3a77f21
MP
77112016-04-13 Marek Polacek <polacek@redhat.com>
7712
7713 PR c++/70639
7714 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
7715 for switch statements, too.
7716
322b8466
JM
77172016-03-28 Jason Merrill <jason@redhat.com>
7718
7719 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
7720
fbdb6baf
MP
77212016-03-23 Marek Polacek <polacek@redhat.com>
7722
7723 PR c++/69884
7724 * c.opt (Wignored-attributes): New option.
7725
5c240f4d
DM
77262016-03-22 David Malcolm <dmalcolm@redhat.com>
7727
7728 PR c/69993
7729 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
7730 diagnostic text, reversing the order of the warning and note so
7731 that they appear in source order.
7732
14ba7b28
MP
77332016-03-17 Marek Polacek <polacek@redhat.com>
7734
7735 PR c/69407
7736 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
7737 operations.
7738
08a1cadc
JM
77392016-03-14 Jason Merrill <jason@redhat.com>
7740
2aaeea19
JM
7741 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
7742
08a1cadc
JM
7743 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
7744
c06d25bb
RB
77452016-03-09 Richard Biener <rguenther@suse.de>
7746
7747 PR c/70143
7748 * c-common.c (strict_aliasing_warning): Add back
7749 alias_sets_conflict_p check.
7750
80aac5c8
JM
77512016-03-08 Jason Merrill <jason@redhat.com>
7752
7753 * c-opts.c (set_std_cxx1z): Don't enable concepts.
7754
64b23c13
DM
77552016-03-04 David Malcolm <dmalcolm@redhat.com>
7756
7757 PR c/68187
7758 * c-indentation.c (get_visual_column): Move code to determine next
7759 tab stop to...
7760 (next_tab_stop): ...this new function.
7761 (line_contains_hash_if): Delete function.
7762 (detect_preprocessor_logic): Delete function.
7763 (get_first_nws_vis_column): New function.
7764 (detect_intervening_unindent): New function.
7765 (should_warn_for_misleading_indentation): Replace call to
7766 detect_preprocessor_logic with a call to
7767 detect_intervening_unindent.
7768
729526f5
DM
77692016-03-04 David Malcolm <dmalcolm@redhat.com>
7770
7771 PR c/68187
7772 * c-indentation.c (should_warn_for_misleading_indentation): When
7773 suppressing warnings about cases where the guard and body are on
7774 the same column, only use the first non-whitespace column in place
7775 of the guard token column when dealing with "else" clauses.
7776 When rejecting aligned BODY and NEXT, loosen the requirement
7777 from equality with the first non-whitespace of guard to simply
7778 that they not be indented relative to it.
7779
e9a35493
RB
77802016-03-04 Richard Biener <rguenther@suse.de>
7781
7782 PR c++/70054
7783 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
7784 instead of alias_sets_conflict_p.
7785
1be56bc5
MP
77862016-03-01 Marek Polacek <polacek@redhat.com>
7787
7788 PR c++/69795
7789 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
7790 any DECL.
7791
35886f0b
MS
77922016-02-22 Martin Sebor <msebor@redhat.com>
7793
7794 PR middle-end/69780
7795 * c-common.c (check_builtin_function_arguments): Validate and
7796 reject invalid arguments to __builtin_alloca_with_align.
7797
4246c8da
MW
77982016-02-20 Mark Wielaard <mjw@redhat.com>
7799
7800 PR c/28901
7801 * c.opt (Wunused-const-variable): Turn into Alias for...
7802 (Wunused-const-variable=): New option.
7803
268be88c
BE
78042016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
7805
7806 PR c++/69865
7807 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
7808 here...
7809 (c_common_init_options): ...to here.
7810 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
7811
871b3f47
JJ
78122016-02-19 Jakub Jelinek <jakub@redhat.com>
7813
7814 PR c++/69826
7815 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
7816 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
7817 flag_preprocess_only.
7818
bf14eba2
JJ
78192016-02-16 Jakub Jelinek <jakub@redhat.com>
7820
7821 PR c/69835
7822 * c.opt (Wnonnull-compare): Enable for -Wall.
7823
ba6b3795
JJ
78242016-02-15 Jakub Jelinek <jakub@redhat.com>
7825
7826 PR c++/69797
7827 * c-common.c (sync_resolve_size): Diagnose too few arguments
7828 even when params is non-NULL empty vector.
7829
a011cd92
BS
78302016-02-08 Bernd Schmidt <bschmidt@redhat.com>
7831
7832 PR target/60410
7833 * c.opt (fshort-double): Remove.
7834
46cb9332
MS
78352016-02-05 Martin Sebor <msebor@redhat.com>
7836
7837 PR c++/69662
7838 * c.opt (Warning options): Update -Wplacement-new to take
7839 an optional argument.
7840
e1b81f2b
JJ
78412016-02-01 Jakub Jelinek <jakub@redhat.com>
7842
7843 PR preprocessor/69543
7844 PR c/69558
7845 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
7846 instead of loc to control_warning_option.
7847
b6adbb9f
NS
78482016-02-01 Nathan Sidwell <nathan@codesourcery.com>
7849
7850 * c.opt (fopenacc-dim=): New option.
7851
5d70666e
RB
78522016-01-27 Ryan Burn <contact@rnburn.com>
7853
7854 PR cilkplus/69267
7855 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
7856 gimplify_arg. Removed superfluous post_p argument.
7857 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
7858 superfluous post_p argument.
7859 * c-gimplify.c (c_gimplify_expr): Likewise.
7860
01e1dea3
DM
78612016-01-26 David Malcolm <dmalcolm@redhat.com>
7862
7863 PR other/69006
7864 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
7865 pp_newline_and_flush with pp_flush.
7866
9f04a53e
MS
78672016-01-20 Martin Sebor <msebor@redhat.com>
7868
7869 PR c/69405
7870 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
7871 an incompatible argument when the argument isn't a valid tree node.
7872
7f26f7df
JM
78732016-01-18 Jason Merrill <jason@redhat.com>
7874
7875 PR c++/68767
7876 * c-common.c (check_function_arguments_recurse): Fold the whole
7877 COND_EXPR, not just the condition.
7878
f62bf092
TV
78792016-01-18 Tom de Vries <tom@codesourcery.com>
7880
7881 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
7882 classify as loop clause.
7883
e0a575ff
JJ
78842016-01-15 Jakub Jelinek <jakub@redhat.com>
7885
7886 PR bootstrap/68271
7887 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
7888 C++ FE no longer has limit on number of pragmas.
7889
78902015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
7891
7892 PR c++/69048
7893 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 7894 to add missing cleanup point.
b6e3db06 7895
c7df95d8
DM
78962016-01-14 David Malcolm <dmalcolm@redhat.com>
7897
7898 PR c++/68819
7899 * c-indentation.c (get_visual_column): Add location_t param.
7900 Handle the column number being zero by effectively disabling the
7901 warning, with an "inform".
7902 (should_warn_for_misleading_indentation): Add location_t argument
7903 for all uses of get_visual_column.
7904
21efdd80
PP
79052016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
7906
7907 PR c++/69029
7908 * c-indentation.c (should_warn_for_misleading_indentation):
7909 Don't warn about do-while statements.
7910
7a127fa7
MS
79112016-01-07 Martin Sebor <msebor@redhat.com>
7912
7913 PR c/68966
7914 * c-common.c (sync_resolve_size): Reject first argument when it's
7915 a pointer to _Bool.
7916
c589e975
DM
79172016-01-05 David Malcolm <dmalcolm@redhat.com>
7918
7919 PR c/69122
7920 * c-indentation.c (get_visual_column): Remove default argument.
7921 (should_warn_for_misleading_indentation): For the multiline case,
7922 update call to get_visual_column for next_stmt_exploc so that it
7923 captures the location of the first non-whitespace character in the
7924 relevant line. Don't issue warnings if there is non-whitespace
7925 before the next statement.
7926
818ab71a
JJ
79272016-01-04 Jakub Jelinek <jakub@redhat.com>
7928
7929 Update copyright years.
7930
745e411d
DM
79312015-12-21 David Malcolm <dmalcolm@redhat.com>
7932
7933 * c-common.c (binary_op_error): Convert first param from
7934 location_t to rich_location * and use it when emitting an error.
7935 * c-common.h (binary_op_error): Convert first param from
7936 location_t to rich_location *.
7937
de67c4c3
DM
79382015-12-16 David Malcolm <dmalcolm@redhat.com>
7939
7940 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
7941 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
7942
4a38b02b
IV
79432015-12-15 Ilya Verbin <ilya.verbin@intel.com>
7944
7945 * c-common.c (c_common_attribute_table): Handle "omp declare target
7946 link" attribute.
7947
54d62f51
JJ
79482015-12-14 Jakub Jelinek <jakub@redhat.com>
7949
7950 PR c/68833
7951 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
7952
8d4227c8
TB
79532014-12-12 Tobias Burnus <burnus@net-b.de>
7954
7955 PR fortran/68815
7956 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
7957 specifiers (%d, %i,%u and %c).
7958
f6069ccc
DM
79592015-12-10 David Malcolm <dmalcolm@redhat.com>
7960
7961 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
7962
63bbf46d
JJ
79632015-12-08 Jakub Jelinek <jakub@redhat.com>
7964
7965 PR c/48088
7966 PR c/68657
7967 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
7968 * c-pragma.c (handle_pragma_diagnostic): Adjust
7969 control_warning_option caller.
7970
f79520bb
DM
79712015-12-07 David Malcolm <dmalcolm@redhat.com>
7972
7973 * c-common.c (c_cpp_error): Update for change to
7974 rich_location::set_range.
7975
b3d5bc62
JJ
79762015-12-04 Paolo Bonzini <bonzini@gnu.org>
7977
7978 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
7979 shifting 1 out of the sign bit.
7980
79812015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
7982
7983 * c-common.c (c_common_attribute_table[]): Update max arguments
7984 count for "simd" attribute.
7985 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
7986
6eb4a537
JJ
79872015-12-03 Jakub Jelinek <jakub@redhat.com>
7988
7989 PR preprocessor/57580
7990 * c-ppoutput.c (print): Change printed field to bool.
7991 Move src_file last for smaller padding.
7992 (init_pp_output): Set print.printed to false instead of 0.
7993 (scan_translation_unit): Fix up formatting. Set print.printed
7994 to true after printing something other than newline.
7995 (scan_translation_unit_trad): Set print.printed to true instead of 1.
7996 (maybe_print_line_1): Set print.printed to false instead of 0.
7997 (print_line_1): Likewise.
7998 (do_line_change): Set print.printed to true instead of 1.
7999 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
8000 dump_macro): Set print.printed to false after printing newline.
8001
4250754e
JM
80022015-12-02 Jason Merrill <jason@redhat.com>
8003
f479b43d
JM
8004 * c-common.c (fold_for_warn): New.
8005 (warn_logical_operator, warn_tautological_cmp)
8006 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
8007
4250754e
JM
8008 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
8009 (c_fully_fold_internal, decl_constant_value_for_optimization):
8010 Move to c/c-fold.c.
8011 * c-common.h: Don't declare decl_constant_value_for_optimization.
8012
e9e32ee6
JM
80132015-12-02 Joseph Myers <joseph@codesourcery.com>
8014
8015 PR c/68162
8016 * c-common.h (c_build_qualified_type): Add extra default
8017 arguments.
8018
37d5ad46
JB
80192015-12-01 Julian Brown <julian@codesourcery.com>
8020 Cesar Philippidis <cesar@codesourcery.com>
8021 James Norris <James_Norris@mentor.com>
8022
8023 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
8024 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
8025 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
8026
f07862c7
EB
80272015-11-30 Eric Botcazou <ebotcazou@adacore.com>
8028
8029 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
8030 (decl_sloc_common): Delete and move bulk of processing to...
8031 (decl_sloc): ...here.
8032 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
8033 (dump_ada_double_name): Remove S parameter and compute the suffix.
8034 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
8035 element type and deal with an anonymous one.
8036 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
8037 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
8038 and remove reference to QUAL_UNION_TYPE.
8039 (dump_nested_types): Make 2 passes on the fields and move bulk to...
8040 (dump_nested_type): ...here. New function extracted from above.
8041 Generate a full declaration for anonymous element type of arrays.
8042 (print_ada_declaration): Really skip anonymous declarations. Remove
8043 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
8044 Clean up processing of declarations of array types and objects.
8045 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
8046 Remove obsolete code and tidy up.
8047
75c8aac3
JH
80482015-11-29 Jan Hubicka <hubicka@ucw.cz>
8049
8050 PR c/67581
8051 * c-common.c (handle_transparent_union_attribute): Update
8052 also type variants.
8053
b58d3df2
ML
80542015-11-27 Martin Liska <mliska@suse.cz>
8055
8056 PR c++/68312
8057 * array-notation-common.c (cilkplus_extract_an_triplets):
8058 Release vector of vectors.
8059 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
8060
89a01fcf
EB
80612015-11-26 Eric Botcazou <ebotcazou@adacore.com>
8062
8063 PR c++/68527
8064 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
8065 (print_ada_struct_decl): Likewise.
8066
cc5c5226
IZ
80672015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
8068
8069 PR c++/68001
8070 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
8071 * cilk.c (recognize_spawn): Determine location in a more precise
8072 way.
8073
269adb9d
JM
80742015-11-19 Jason Merrill <jason@redhat.com>
8075
8076 * c-common.c (shorten_compare): But look through macros from
8077 system headers.
8078
d0eccfcd
JM
80792015-11-18 Jason Merrill <jason@redhat.com>
8080
8081 * c-common.c (shorten_compare): Don't -Wtype-limits if the
8082 non-constant operand comes from a macro.
8083
3e44547c
JM
80842015-11-17 Jason Merrill <jason@redhat.com>
8085
8086 PR bootstrap/68346
8087 * c-common.c (warn_tautological_cmp): Fold before checking for
8088 constants.
8089
0f62c7a0
MP
80902015-11-16 Marek Polacek <polacek@redhat.com>
8091
8092 PR c++/68362
8093 * c-common.c (check_case_bounds): Fold low and high cases.
8094
a868811e
MP
80952015-11-16 Marek Polacek <polacek@redhat.com>
8096
8097 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
8098 * c-common.c (c_common_get_alias_set): Likewise.
8099 (handle_visibility_attribute): Likewise.
8100
fff77217
KY
81012015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
8102
8103 * c-common.c (handle_simd_attribute): New.
8104 (struct attribute_spec): Add entry for "simd".
8105 (handle_simd_attribute): New.
8106
269e63b7
KT
81072015-11-13 Kai Tietz <ktietz70@googlemail.com>
8108
8109 * c-lex.c (interpret_float): Use fold_convert.
8110
ebedc9a3
DM
81112015-11-13 David Malcolm <dmalcolm@redhat.com>
8112
8113 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
8114 and store it on the result.
8115 * c-opts.c (c_common_init_options): Set
8116 global_dc->colorize_source_p.
8117
6e232ba4
JN
81182015-11-12 James Norris <jnorris@codesourcery.com>
8119 Joseph Myers <joseph@codesourcery.com>
8120
7365279f 8121 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
8122 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
8123 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
8124 PRAGMA_OACC_CLAUSE_LINK.
8125
e78bede6
MP
81262015-11-11 Marek Polacek <polacek@redhat.com>
8127
8128 PR c/68107
8129 PR c++/68266
8130 * c-common.c (valid_array_size_p): New function.
8131 * c-common.h (valid_array_size_p): Declare.
8132
3f8257db 81332015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
8134
8135 PR bootstrap/68271
8136 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
8137
69f293c9
AM
81382015-11-11 Andrew MacLeod <amacleod@redhat.com>
8139
8140 * array-notation-common.c: Remove unused header files.
8141 * c-ada-spec.c: Likewise.
8142 * c-cilkplus.c: Likewise.
8143 * c-common.c: Likewise.
8144 * c-cppbuiltin.c: Likewise.
8145 * c-dump.c: Likewise.
8146 * c-format.c: Likewise.
8147 * c-gimplify.c: Likewise.
8148 * c-indentation.c: Likewise.
8149 * c-lex.c: Likewise.
8150 * c-omp.c: Likewise.
8151 * c-opts.c: Likewise.
8152 * c-pch.c: Likewise.
8153 * c-ppoutput.c: Likewise.
8154 * c-pragma.c: Likewise.
8155 * c-pretty-print.c: Likewise.
8156 * c-semantics.c: Likewise.
8157 * c-ubsan.c: Likewise.
8158 * cilk.c: Likewise.
8159 * stub-objc.c: Likewise.
8160
3a40d81d
NS
81612015-11-09 Thomas Schwinge <thomas@codesourcery.com>
8162 Cesar Philippidis <cesar@codesourcery.com>
8163 James Norris <jnorris@codesourcery.com>
8164 Julian Brown <julian@codesourcery.com>
8165 Nathan Sidwell <nathan@codesourcery.com>
8166
8167 * c-pragma.c (oacc_pragmas): Add "routine".
8168 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
8169
ee45a32d
EB
81702015-11-08 Eric Botcazou <ebotcazou@adacore.com>
8171
8172 * c-common.c (c_common_attributes): Add scalar_storage_order.
8173 (handle_scalar_storage_order_attribute): New function.
8174 * c-pragma.c (global_sso): New variable.
8175 (maybe_apply_pragma_scalar_storage_order): New function.
8176 (handle_pragma_scalar_storage_order): Likewise.
8177 (init_pragma): Register scalar_storage_order.
8178 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
8179 * c.opt (Wscalar-storage-order): New warning.
8180 (fsso-struct=): New option.
8181
eb11eb15
MS
81822015-11-08 Martin Sebor <msebor@redhat.com>
8183
8184 * c.opt (Wplacement-new): Add a period to the end of a sentence.
8185
0aad0198
RS
81862015-11-07 Richard Sandiford <richard.sandiford@arm.com>
8187
8188 * c-common.c: Don't undef DEF_BUILTIN.
8189
8a645150
DM
81902015-11-06 David Malcolm <dmalcolm@redhat.com>
8191
8192 * c-common.c (c_cpp_error): Convert parameter from location_t to
8193 rich_location *. Eliminate the "column_override" parameter and
8194 the call to diagnostic_override_column.
8195 Update the "done_lexing" clause to set range 0
8196 on the rich_location, rather than overwriting a location_t.
8197 * c-common.h (c_cpp_error): Convert parameter from location_t to
8198 rich_location *. Eliminate the "column_override" parameter.
8199
7a5e4956
CP
82002015-11-05 Cesar Philippidis <cesar@codesourcery.com>
8201 Thomas Schwinge <thomas@codesourcery.com>
8202 James Norris <jnorris@codesourcery.com>
8203
8204 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
8205 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
8206 clauses with parallel and kernels and loops.
8207 * c-pragma.h (enum pragma_omp_clause): Add entries for
8208 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
8209 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
8210 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
8211 INDEPENDENT,SEQ}.
8212 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
8213
e2f5cc96
MS
82142015-11-05 Martin Sebor <msebor@redhat.com>
8215
8216 PR c++/67942
8217 * c.opt (-Wplacement-new): New option.
8218
e01d41e5
JJ
82192015-11-05 Jakub Jelinek <jakub@redhat.com>
8220
8221 * c-common.h (c_finish_omp_atomic): Add TEST argument.
8222 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
8223 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
8224 save_expr or create_tmp_var* if TEST is true.
8225 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
8226 Don't call add_stmt here.
8227 (struct c_omp_check_loop_iv_data): New type.
8228 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
8229 c_omp_check_loop_iv_exprs): New functions.
8230 (c_omp_split_clauses): Adjust for lastprivate being allowed on
8231 distribute.
8232 (c_omp_declare_simd_clauses_to_numbers): Change
8233 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
8234 (c_omp_declare_simd_clauses_to_decls): Similarly change those
8235 from numbers to PARM_DECLs.
8236
595278be
MM
82372015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
8238
8239 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
8240 flag_checking.
8241
3f8257db 82422015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
8243
8244 PR c++-common/67882
b3d5bc62
JJ
8245 * c-common.h (fold_offsetof_1): Add argument.
8246 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
8247 offsetof expressions that reference elements past the end of
8248 an array.
8249
4bf9e5a8
TS
82502015-11-03 Thomas Schwinge <thomas@codesourcery.com>
8251 Chung-Lin Tang <cltang@codesourcery.com>
8252
8253 * c-pragma.c (oacc_pragmas): Add "atomic".
8254 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
8255
3b1661a9
ES
82562015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
8257
8258 * c-common.c (handle_target_clones_attribute): New.
8259 (c_common_attribute_table): Add handle_target_clones_attribute.
8260 (handle_always_inline_attribute): Add check on target_clones attribute.
8261 (handle_target_attribute): Ditto.
8262
2adfab87
AM
82632015-10-29 Andrew MacLeod <amacleod@redhat.com>
8264
8265 * array-notation-common.c: Reorder #include's and remove duplicates.
8266 * c-ada-spec.c: Likewise.
8267 * c-cilkplus.c: Likewise.
8268 * c-common.c: Likewise.
8269 * c-cppbuiltin.c: Likewise.
8270 * c-dump.c: Likewise.
8271 * c-format.c: Likewise.
8272 * c-gimplify.c: Likewise.
8273 * c-indentation.c: Likewise.
8274 * c-lex.c: Likewise.
8275 * c-omp.c: Likewise.
8276 * c-opts.c: Likewise.
8277 * c-pch.c: Likewise.
8278 * c-ppoutput.c: Likewise.
8279 * c-pragma.c: Likewise.
8280 * c-pretty-print.c: Likewise.
8281 * c-semantics.c: Likewise.
8282 * c-ubsan.c: Likewise.
8283 * cilk.c: Likewise.
8284 * stub-objc.c: Likewise.
8285
d90ec4f2
JM
82862015-10-28 Jason Merrill <jason@redhat.com>
8287
8288 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
8289
88bae6f4
TS
82902015-10-27 Thomas Schwinge <thomas@codesourcery.com>
8291 James Norris <jnorris@codesourcery.com>
8292 Cesar Philippidis <cesar@codesourcery.com>
8293
8294 PR c/64765
8295 PR c/64880
8296 * c-common.h (c_oacc_split_loop_clauses): Declare function.
8297 * c-omp.c (c_oacc_split_loop_clauses): New function.
8298
b1726d6c
MS
82992015-10-21 Martin Sebor <msebor@redhat.com>
8300
8301 PR driver/68043
8302 * c.opt: End each sentence that describes an option with a period.
8303
fa60eeb9
MP
83042015-10-20 Marek Polacek <polacek@redhat.com>
8305
8306 * array-notation-common.c (is_cilkplus_vector_p): Define.
8307 * c-common.h (is_cilkplus_vector_p): Declare.
8308
95979049
MP
83092015-10-20 Marek Polacek <polacek@redhat.com>
8310
8311 * c.opt (std=gnu++11): Do not describe as experimental.
8312 (std=gnu++14): Likewise.
8313
2a9fb712
JM
83142015-10-19 Jason Merrill <jason@redhat.com>
8315
8316 * c-cppbuiltin.c (c_cpp_builtins): Define
8317 __cpp_nontype_template_args.
8318
13b380a3
JM
83192015-10-19 Jason Merrill <jason@redhat.com>
8320
8321 * c-cppbuiltin.c (c_cpp_builtins): Define
8322 __cpp_enumerator_attributes, __cpp_fold_expressions,
8323 __cpp_unicode_characters.
8324
d9a6bd32
JJ
83252015-10-13 Jakub Jelinek <jakub@redhat.com>
8326 Aldy Hernandez <aldyh@redhat.com>
8327
8328 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
8329 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
8330 (c_define_builtins): Likewise.
8331 * c-common.h (enum c_omp_clause_split): Add
8332 C_OMP_CLAUSE_SPLIT_TASKLOOP.
8333 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
8334 (c_finish_omp_for): Add ORIG_DECLV argument.
8335 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
8336 201511 instead of 201307.
8337 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
8338 OMP_CRITICAL_CLAUSES to it.
8339 (c_finish_omp_ordered): Add CLAUSES argument, set
8340 OMP_ORDERED_CLAUSES to it.
8341 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
8342 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
8343 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
8344 constructs and new OpenMP 4.5 clauses. Clear
8345 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
8346 verification code.
8347 * c-pragma.c (omp_pragmas_simd): Add taskloop.
8348 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
8349 (enum pragma_omp_clause): Add
8350 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
8351 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
8352
624d31fe
RS
83532015-10-05 Richard Sandiford <richard.sandiford@arm.com>
8354
8355 * c-lex.c (interpret_float): Use real_equal instead of
8356 REAL_VALUES_EQUAL.
8357
b8fd7909
JM
83582015-10-04 Jason Merrill <jason@redhat.com>
8359
8360 Implement N4514, C++ Extensions for Transactional Memory.
8361 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
8362 (c_common_attribute_table): Add transaction_safe_dynamic.
8363 transaction_safe now affects type identity.
8364 (handle_tm_attribute): Handle transaction_safe_dynamic.
8365 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
8366 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
8367 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
8368 (D_TRANSMEM): New.
8369 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
8370 * c-pretty-print.c (pp_c_attributes_display): Don't print
8371 transaction_safe in C++.
8372
12651878
MP
83732015-10-02 Marek Polacek <polacek@redhat.com>
8374
8375 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
8376
3e3b8d63
MP
83772015-10-02 Marek Polacek <polacek@redhat.com>
8378
8379 PR c/64249
8380 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
8381 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
8382 * c.opt (Wduplicated-cond): New option.
8383
0d1a8f75
JM
83842015-10-01 Joseph Myers <joseph@codesourcery.com>
8385
8386 * c.opt (std=c11): Do not describe as experimental.
8387 (std=gnu11): Likewise.
8388 (std=iso9899:2011): Likewise.
8389
3e32ee19
NS
83902015-09-28 Nathan Sidwell <nathan@codesourcery.com>
8391
8392 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
8393 (DEF_FUNCTION_TYPE_VAR_11): Delete.
8394
974348ee
MP
83952015-09-25 Marek Polacek <polacek@redhat.com>
8396
8397 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
8398 (ubsan_instrument_shift): Likewise.
8399
15dbc1a6
MP
84002015-09-25 Marek Polacek <polacek@redhat.com>
8401
8402 PR sanitizer/64906
8403 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
8404
6b95d7cc
PP
84052015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
8406
8407 * c-indentation.c (should_warn_for_misleading_indentation):
8408 Compare next_stmt_vis_column with guard_line_first_nws instead
8409 of with guard_line_vis_column.
8410
c1822f9c
MLI
84112015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
8412
8413 PR c/49654
8414 PR c/49655
8415 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
8416 options and options not valid for the current language.
8417
d5398058
PP
84182015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
8419
8420 * c-indentation.c (should_warn_for_misleading_indentation):
8421 Float out and consolidate the calls to get_visual_column that
8422 are passed guard_exploc as an argument. Compare
8423 next_stmt_vis_column with guard_line_first_nws instead of with
8424 body_line_first_nws.
8425
6b333269
NS
84262015-09-22 Nathan Sidwell <nathan@codesourcery.com>
8427
8428 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
8429 Wnamespaces): New C++ warnings.
8430
a75f1574
JM
84312015-09-22 Jason Merrill <jason@redhat.com>
8432
8433 * c-common.h (abi_compat_version_crosses): New.
8434 (warn_abi_version): Declare.
8435 * c-common.c: Define it.
8436 * c-opts.c (c_common_post_options): Handle it.
8437 flag_abi_compat_version defaults to 8.
8438
bdaaa8b7
VV
84392015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
8440
8441 Complete the implementation of N4230, Nested namespace definition.
8442 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
8443 __cpp_nested_namespace_definitions.
8444
eaa797e8
MLI
84452015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8446
8447 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
8448
c4914de6
MLI
84492015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8450
8451 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
8452 when warning.
8453 * c-pragma.h (pragma_lex): Add optional loc argument.
8454
fcb87c50
MM
84552015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
8456
8457 * c-format.c (check_format_arg): Adjust to use common block size in all
8458 object pools.
8459
31bdd08a
DM
84602015-09-15 David Malcolm <dmalcolm@redhat.com>
8461
8462 * c-format.c (location_from_offset): Update for change in
8463 signature of location_get_source_line.
8464 * c-indentation.c (get_visual_column): Likewise.
8465 (line_contains_hash_if): Likewise.
8466
aa9f4b4c
MP
84672015-09-14 Marek Polacek <polacek@redhat.com>
8468
8469 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
8470 setting various warnings.
8471
aa256c4a
MP
84722015-09-14 Marek Polacek <polacek@redhat.com>
8473
8474 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
8475 a negative value.
8476
0f876f22
MW
84772015-09-11 Mark Wielaard <mjw@redhat.com>
8478
8479 PR c/28901
8480 * c.opt (Wunused-variable): Option from common.opt.
8481 (Wunused-const-variable): New option.
8482
273aa49e
PC
84832015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
8484
8485 PR c++/53184
8486 * c.opt ([Wsubobject-linkage]): Add.
8487
1807ffc1
MS
84882015-09-03 Martin Sebor <msebor@redhat.com>
8489
8490 PR c/66516
8491 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
8492 functions.
8493 * c-common.c (reject_gcc_builtin): Define.
8494
38942840
BI
84952015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
8496
8497 PR middle-end/60586
8498 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
8499 prototype.
8500 * c-gimplify.c (c_gimplify_expr): Added a call to the function
8501 cilk_gimplify_call_params_in_spawned_fn.
8502 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
8503 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
8504 unwrapping.
8505
c316b5e4
MP
85062015-08-25 Marek Polacek <polacek@redhat.com>
8507
8508 PR middle-end/67330
8509 * c-common.c (handle_weak_attribute): Don't check whether the
8510 visibility can be changed here.
8511
584a7c46
MLI
85122015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8513
8514 * c-lex.c (c_lex_with_flags): Use explicit locations.
8515
a79683d5
TS
85162015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
8517
8518 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
8519 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
8520
61717a45
FXC
85212015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
8522
8523 PR middle-end/36757
8524 * c-common.c (check_builtin_function_arguments): Add check
8525 for BUILT_IN_SIGNBIT argument.
8526
329524f5
PC
85272015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
8528
8529 PR c++/67160
8530 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
8531 in c++1z mode.
8532
4ee55665
MP
85332015-08-17 Marek Polacek <polacek@redhat.com>
8534
8535 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
8536 with whitespaces before qualifier names.
8537
b893e375
MP
85382015-08-12 Marek Polacek <polacek@redhat.com>
8539
8540 PR c++/55095
8541 * c-common.c (maybe_warn_shift_overflow): Properly handle
8542 left-shifting 1 into the sign bit.
8543
c2d89095
MLI
85442015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8545
8546 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
8547
971e17ff
AS
85482015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
8549 Braden Obrzut <admin@maniacsvault.net>
8550 Jason Merrill <jason@redhat.com>
8551
8552 Add C++ Concepts TS support.
8553 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
8554 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
8555 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
8556 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
8557 * c-opts.c (set_std_cxx1z): Set flag_concepts.
8558 * c.opt (fconcepts): New.
8559
b3d5bc62
JJ
85602015-08-02 Martin Sebor <msebor@redhat.com>
8561
8562 * c.opt (-Wframe-address): New warning option.
8563
8ebca419
PP
85642015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8565
8566 * c-indentation.c (should_warn_for_misleading_indentation):
8567 Improve heuristics.
8568
1a1e101f
PP
85692015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8570
8571 * c-indentation.c (get_visual_column): Add parameter first_nws,
8572 use it. Update comment documenting the function.
8573 (is_first_nonwhitespace_on_line): Remove.
8574 (should_warn_for_misleading_indentation): Replace usage of
8575 of is_first_nonwhitespace_on_line with get_visual_column.
8576
992118a1
PP
85772015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8578
8579 * c-indentation.h (struct token_indent_info): Define.
8580 (get_token_indent_info): Define.
8581 (warn_for_misleading_information): Declare.
8582 * c-common.h (warn_for_misleading_information): Remove.
8583 * c-identation.c (warn_for_misleading_indentation):
8584 Change declaration to take three token_indent_infos. Adjust
8585 accordingly.
8586 * c-identation.c (should_warn_for_misleading_indentation):
8587 Likewise. Bail out early if the body is a compound statement.
8588 (guard_tinfo_to_string): Define.
8589
e8fa3817
JM
85902015-07-30 Jason Merrill <jason@redhat.com>
8591
8592 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
8593 '*' for reference decay.
8594
173864e8
MP
85952015-07-30 Marek Polacek <polacek@redhat.com>
8596
8597 * c-common.c (warn_tautological_cmp): Bail for float types.
8598
f2afe6dd
MP
85992015-07-27 Marek Polacek <polacek@redhat.com>
8600
8601 PR bootstrap/67030
8602 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
8603
05b28fd6
MP
86042015-07-27 Marek Polacek <polacek@redhat.com>
8605
8606 PR c++/66555
8607 PR c/54979
8608 * c-common.c (find_array_ref_with_const_idx_r): New function.
8609 (warn_tautological_cmp): New function.
8610 * c-common.h (warn_tautological_cmp): Declare.
8611 * c.opt (Wtautological-compare): New option.
8612
5a5062b8
MP
86132015-07-23 Marek Polacek <polacek@redhat.com>
8614
8615 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
8616 (ubsan_instrument_shift): Likewise.
8617
dc891fe7
MP
86182015-07-23 Marek Polacek <polacek@redhat.com>
8619
8620 PR sanitizer/66908
8621 * c-ubsan.c: Include gimplify.h.
8622 (ubsan_instrument_division): Unshare OP0 and OP1.
8623 (ubsan_instrument_shift): Likewise.
8624
451b5e48
MP
86252015-07-20 Marek Polacek <polacek@redhat.com>
8626 Richard Sandiford <richard.sandiford@arm.com>
8627
8628 PR c++/55095
8629 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
8630 Use EXPR_LOC_OR_LOC.
8631 (maybe_warn_shift_overflow): New function.
8632 * c-common.h (maybe_warn_shift_overflow): Declare.
8633 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
8634 * c.opt (Wshift-overflow): New option.
8635
fb0b2914
ML
86362015-07-16 Martin Liska <mliska@suse.cz>
8637
8638 * c-format.c (static void check_format_info_main): Use
8639 object_allocator instead of pool_allocator.
8640 (check_format_arg): Likewise.
8641 (check_format_info_main): Likewise.
8642
903f5c23
AM
86432015-07-15 Andrew MacLeod <amacleod@redhat.com>
8644
8645 * c-opts.c: Remove multiline #include comment.
8646
026c3cfd
AH
86472015-07-12 Aldy Hernandez <aldyh@redhat.com>
8648
8649 * c-common.c: Fix double word typos.
8650
bb49ee66
EB
86512015-07-10 Eric Botcazou <ebotcazou@adacore.com>
8652
8653 * c-ada-spec.h (cpp_operation): Revert latest change.
8654 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
8655 constructors and destructors.
8656
1916bcb5
AM
86572015-07-09 Andrew MacLeod <amacleod@redhat.com>
8658
8659 * c-common.h: Adjust includes for flags.h changes.
8660 * stub-objc.c: Likewise.
026c3cfd 8661
a9dcd529
EB
86622015-07-08 Eric Botcazou <ebotcazou@adacore.com>
8663
8664 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
8665 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
8666
b03b462f
JJ
86672015-07-08 Jakub Jelinek <jakub@redhat.com>
8668
8669 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
8670 are to be removed, return NULL rather than original clauses list.
8671
c7131fb2
AM
86722015-07-07 Andrew MacLeod <amacleod@redhat.com>
8673
8674 * array-notation-common.c: Adjust includes.
8675 * c-ada-spec.c: Likewise.
8676 * c-cilkplus.c: Likewise.
8677 * c-common.h: Likewise.
8678 * c-cppbuiltin.c: Likewise.
8679 * c-dump.c: Likewise.
8680 * c-format.c: Likewise.
8681 * c-gimplify.c: Likewise.
8682 * c-indentation.c: Likewise.
8683 * c-lex.c: Likewise.
8684 * c-omp.c: Likewise.
8685 * c-opts.c: Likewise.
8686 * c-pch.c: Likewise.
8687 * c-ppoutput.c: Likewise.
8688 * c-pragma.c: Likewise.
8689 * c-pretty-print.c: Likewise.
8690 * c-semantics.c: Likewise.
8691 * c-ubsan.c: Likewise.
8692 * cilk.c: Likewise.
8693 * stub-objc.c: Likewise.
8694
2a7fb83f
EB
86952015-07-07 Eric Botcazou <ebotcazou@adacore.com>
8696
8697 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
8698 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
8699
a03c9bf1
JM
87002015-07-01 Jason Merrill <jason@redhat.com>
8701
36a85135
JM
8702 * c-common.h (D_CXX11): Rename from D_CXX0X.
8703 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
8704 * c-common.c: Adjust.
8705
e7fa68d5
JM
8706 * c-opts.c (c_common_post_options): Default to C++14.
8707
a03c9bf1
JM
8708 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
8709
fe95b036
ESR
87102015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
8711
8712 Implement N4197 - Adding u8 character literals
b3d5bc62 8713 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 8714 CPP_CHAR.
b3d5bc62 8715 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 8716 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 8717 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
8718 and CPP_UTF8CHAR tokens.
8719 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 8720
da2e71c9
MLI
87212015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8722
8723 PR fortran/66605
8724 * c-common.c (do_warn_unused_parameter): Move here.
8725 * c-common.h (do_warn_unused_parameter): Declare.
8726
b155cfd9
MP
87272015-06-29 Marek Polacek <polacek@redhat.com>
8728
8729 PR c/66322
8730 * c-common.c (check_case_bounds): Add bool * parameter. Set
8731 OUTSIDE_RANGE_P.
8732 (c_add_case_label): Add bool * parameter. Pass it down to
8733 check_case_bounds.
8734 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
8735 warning here.
8736 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
8737 declarations.
8738
31521951
MP
87392015-06-27 Marek Polacek <polacek@redhat.com>
8740
8741 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
8742 or VECTOR_INTEGER_TYPE_P throughout.
8743 * c-gimplify.c: Likewise.
8744
22d03525
MP
87452015-06-26 Marek Polacek <polacek@redhat.com>
8746
8747 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
8748 * c-common.c (c_fully_fold_internal): Likewise.
8749 (c_alignof_expr): Likewise.
8750 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
8751 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 8752 * cilk.c (create_parm_list): Likewise.
22d03525 8753
af05e6e5
MP
87542015-06-26 Marek Polacek <polacek@redhat.com>
8755
8756 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
8757
f0889939
AM
87582015-06-25 Andrew MacLeod <amacleod@redhat.com>
8759
8760 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
8761 * c-gimplify.c: Likewise.
8762 * c-pragma.c: Likewise.
8763 * c-ubsan.c: Likewise.
8764 * cilk.c: Likewise.
8765
ca752f39
RS
87662015-06-25 Richard Sandiford <richard.sandiford@arm.com>
8767
8768 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
8769 ggc_hasher.
8770
16a16ec7
AM
87712015-06-25 Andrew MacLeod <amacleod@redhat.com>
8772
8773 * cilk.c: Move calls.h after tm.h in the include chain.
8774
0ae9bd27
MP
87752015-06-25 Marek Polacek <polacek@redhat.com>
8776
8777 * array-notation-common.c: Use VAR_P throughout.
8778 * c-ada-spec.c: Likewise.
8779 * c-common.c: Likewise.
8780 * c-format.c: Likewise.
8781 * c-gimplify.c: Likewise.
8782 * c-omp.c: Likewise.
8783 * c-pragma.c: Likewise.
8784 * c-pretty-print.c: Likewise.
8785 * cilk.c: Likewise.
8786
62f9079a
MP
87872015-06-25 Marek Polacek <polacek@redhat.com>
8788
8789 * cilk.c (extract_free_variables): Use is_global_var.
8790
0fa16060
RS
87912015-06-23 Richard Sandiford <richard.sandiford@arm.com>
8792
8793 * c-common.c: Don't include target-def.h.
8794
a68ae2e1
MP
87952015-06-23 Marek Polacek <polacek@redhat.com>
8796
8797 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
8798 when comparing INTEGER_CSTs.
8799
c6a2f2d9
PMR
88002015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
8801
8802 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
8803 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
8804 (dump_ada_template): Skip partially specialized types.
8805
6b4db501
MM
88062015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
8807
8808 * c-common.c (scalar_to_vector): Use std::swap instead of manually
8809 swapping.
8810
abb226c9
AM
88112015-06-17 Andrew MacLeod <amacleod@redhat.com>
8812
8813 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
8814 * c-ada-spec.c: Likewise.
8815 * c-cilkplus.c: Likewise.
8816 * c-common.c: Likewise.
8817 * c-common.h: Likewise.
8818 * c-cppbuiltin.c: Likewise.
8819 * c-dump.c: Likewise.
8820 * c-format.c: Likewise.
8821 * c-gimplify.c: Likewise.
8822 * c-indentation.c: Likewise.
8823 * c-lex.c: Likewise.
8824 * c-omp.c: Likewise.
8825 * c-opts.c: Likewise.
8826 * c-pch.c: Likewise.
8827 * c-ppoutput.c: Likewise.
8828 * c-pragma.c: Likewise.
8829 * c-pretty-print.c: Likewise.
8830 * c-semantics.c: Likewise.
8831 * c-ubsan.c: Likewise.
8832 * cilk.c: Likewise.
8833 * stub-objc.c: Likewise.
8834
076fecad
PP
88352015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
8836
8837 PR c++/65168
8838 * c-common.c (c_common_truthvalue_conversion): Warn when
8839 converting an address of a reference to a truth value.
8840
13fdf2e2
AM
88412015-06-08 Andrew MacLeod <amacleod@redhat.com>
8842
8843 * array-notation-common.c : Adjust include files.
8844 * c-ada-spec.c : Likewise.
8845 * c-cilkplus.c : Likewise.
8846 * c-common.c : Likewise.
8847 * c-common.h : Likewise.
8848 * c-cppbuiltin.c : Likewise.
8849 * c-dump.c : Likewise.
8850 * c-format.c : Likewise.
8851 * c-gimplify.c : Likewise.
8852 * c-indentation.c : Likewise.
8853 * c-lex.c : Likewise.
8854 * c-omp.c : Likewise.
8855 * c-opts.c : Likewise.
8856 * c-pch.c : Likewise.
8857 * c-ppoutput.c : Likewise.
8858 * c-pragma.c : Likewise.
8859 * c-pretty-print.c : Likewise.
8860 * c-semantics.c : Likewise.
8861 * c-ubsan.c : Likewise.
8862 * cilk.c : Likewise.
8863 * stub-objc.c : Likewise.
8864
a1661b90
MP
88652015-06-08 Marek Polacek <polacek@redhat.com>
8866
8867 PR c/66415
8868 * c-format.c (location_from_offset): Return LOC if LINE is null.
8869
d7438551
AH
88702015-06-05 Aldy Hernandez <aldyh@redhat.com>
8871
8872 * c-common.h (c_parse_final_cleanups): New prototype.
8873 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
8874
b3d5bc62
JJ
88752015-06-04 Sriraman Tallam <tmsriram@google.com>
8876
8877 * c-common.c (noplt): New attribute.
8878 (handle_noplt_attribute): New handler.
8879
ecb9f223
AM
88802015-06-04 Andrew MacLeod <amacleod@redhat.com>
8881
8882 * array-notation-common.c: Adjust includes for restructured coretypes.h.
8883 * c-ada-spec.c: Likewise.
8884 * c-cilkplus.c: Likewise.
8885 * c-common.c: Likewise.
8886 * c-common.h: Likewise.
8887 * c-cppbuiltin.c: Likewise.
8888 * c-dump.c: Likewise.
8889 * c-format.c: Likewise.
8890 * c-gimplify.c: Likewise.
8891 * c-indentation.c: Likewise.
8892 * c-lex.c: Likewise.
8893 * c-omp.c: Likewise.
8894 * c-opts.c: Likewise.
8895 * c-pch.c: Likewise.
8896 * c-ppoutput.c: Likewise.
8897 * c-pragma.c: Likewise.
8898 * c-pretty-print.c: Likewise.
8899 * c-semantics.c: Likewise.
8900 * c-ubsan.c: Likewise.
8901 * cilk.c: Likewise.
8902 * stub-objc.c: Likewise.
8903
6ac48155
DM
89042015-06-02 David Malcolm <dmalcolm@redhat.com>
8905
8906 PR c/66220:
8907 * c-indentation.c (should_warn_for_misleading_indentation): Use
8908 expand_location rather than expand_location_to_spelling_point.
8909 Don't warn if the guarding statement is more indented than the
8910 next/body stmts.
8911
773ce42e
DM
89122015-06-02 David Malcolm <dmalcolm@redhat.com>
8913
8914 * c-indentation.c (warn_for_misleading_indentation): Bail out
8915 immediately if -Wmisleading-indentation isn't enabled.
8916
4fef8379
ML
89172015-06-01 Martin Liska <mliska@suse.cz>
8918
8919 * c-format.c (check_format_arg):Use new type-based pool allocator.
8920 (check_format_info_main) Likewise.
8921
1edfb384
EB
89222015-05-31 Eric Botcazou <ebotcazou@adacore.com>
8923
8924 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
8925 (has_nontrivial_methods): Likewise.
8926
9677ef52
MP
89272015-05-25 Marek Polacek <polacek@redhat.com>
8928
8929 * c-ubsan.c (ubsan_instrument_shift): Use type0.
8930
fd5c817a
MP
89312015-05-22 Marek Polacek <polacek@redhat.com>
8932
8933 PR c/47043
8934 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
8935
a2f45fe6 89362015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
8937
8938 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
8939 STACK_GROWS_DOWNWARD.
8940
a2f45fe6 89412015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
8942
8943 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
8944 STACK_GROWS_DOWNWARD rather than if it is defined.
8945
0fee2ac2 89462015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 8947
0fee2ac2
MLI
8948 PR c/52952
8949 * c-format.c (location_column_from_byte_offset): New.
8950 (location_from_offset): New.
8951 (struct format_wanted_type): Add offset_loc field.
8952 (check_format_info): Move handling of location for extra arguments
8953 closer to the point of warning.
8954 (check_format_info_main): Pass the result of location_from_offset
8955 to warning_at.
8956 (format_type_warning): Pass the result of location_from_offset
8957 to warning_at.
8958
cf4ef6f7
MP
89592015-05-20 Marek Polacek <polacek@redhat.com>
8960
8961 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
8962
3a65ee74
MP
89632015-05-20 Marek Polacek <polacek@redhat.com>
8964
8965 * c-ada-spec.c (dump_sloc): Use DECL_P.
8966
21b634ae
MP
89672015-05-20 Marek Polacek <polacek@redhat.com>
8968
8969 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
8970 * c-common.c: Likewise.
8971
0e50b624
DM
89722015-05-19 David Malcolm <dmalcolm@redhat.com>
8973
8974 * c-common.h (fe_file_change): Strengthen param from
8975 const line_map * to const line_map_ordinary *.
8976 (pp_file_change): Likewise.
8977 * c-lex.c (fe_file_change): Likewise.
8978 (cb_define): Use linemap_check_ordinary when invoking
8979 SOURCE_LINE.
8980 (cb_undef): Likewise.
8981 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
8982 invoking cb_file_change.
8983 (c_finish_options): Likewise.
8984 (push_command_line_include): Likewise.
8985 (cb_file_change): Strengthen param "new_map" from
8986 const line_map * to const line_map_ordinary *.
8987 * c-ppoutput.c (cb_define): Likewise for local "map".
8988 (pp_file_change): Likewise for param "map" and local "from".
8989
fab27f52
MM
89902015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
8991
8992 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
8993
2fe1d762
TV
89942015-05-18 Tom de Vries <tom@codesourcery.com>
8995
8996 * c-common.c (build_va_arg_1): New function.
8997 (build_va_arg): Add address operator to va_list operand if necessary.
8998
7a37fa90
MM
89992015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
9000
9001 PR c/48956
9002 * c-common.c (int_safely_convertible_to_real_p): Define.
9003 (unsafe_conversion_p): Check conversions involving complex types.
9004 (conversion_warning): Add new warning message for conversions which
9005 discard imaginary component.
9006 * c-common.h: (enum conversion_safety): Add new enumerator for such
9007 conversions.
9008
3aa3c9fc
MP
90092015-05-14 Marek Polacek <polacek@redhat.com>
9010
9011 PR c/66066
9012 PR c/66127
9013 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
9014 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
9015 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
9016 use it. If FOR_INT_CONST, require that all evaluated operands be
9017 INTEGER_CSTs.
9018
c3388e62
DM
90192015-05-12 David Malcolm <dmalcolm@redhat.com>
9020
9021 * c-common.h (warn_for_misleading_indentation): New prototype.
9022 * c-indentation.c: New file.
9023 * c.opt (Wmisleading-indentation): New option.
9024
c7b38fd5
TV
90252015-05-12 Tom de Vries <tom@codesourcery.com>
9026
9027 PR tree-optimization/66010
9028 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
9029
381bf11e
JM
90302015-05-09 Jason Merrill <jason@redhat.com>
9031
edff0c06
JM
9032 * c-opts.c (c_common_post_options): Also clear
9033 cpp_opts->cpp_warn_cxx11_compat.
9034
129211bc
JM
9035 * c-common.h (enum cxx_dialect): Add cxx_unset.
9036 * c-common.c (cxx_dialect): Initialize to cxx_unset.
9037 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
9038
381bf11e
JM
9039 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
9040 (std=gnu++0x): Mark as Undocumented.
9041 (std=gnu++1y): Add deprecated message.
9042
fe191308
JM
90432015-05-08 Jason Merrill <jason@redhat.com>
9044
765189ff
JM
9045 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
9046 * c-opts.c: Adjust.
9047
fe191308
JM
9048 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
9049
755e528f
MP
90502015-05-08 Marek Polacek <polacek@redhat.com>
9051
9052 PR c/64918
9053 * c.opt (Woverride-init-side-effects): New option.
9054
0173bd2a
MP
90552015-05-07 Marek Polacek <polacek@redhat.com>
9056
9057 PR c/65179
9058 * c-common.c (c_fully_fold_internal): Warn when left shifting a
9059 negative value.
9060 * c.opt (Wshift-negative-value): New option.
9061 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
9062 when -Wextra and C99/C++11 mode.
9063
e0f0d3b9
MP
90642015-05-07 Marek Polacek <polacek@redhat.com>
9065 Martin Uecker <uecker@eecs.berkeley.edu>
9066
9067 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
9068 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
9069
8243e2a9
JM
90702015-05-05 Jason Merrill <jason@redhat.com>
9071
9072 * c.opt (Wterminate): New.
9073
577cd070
MP
90742015-04-30 Marek Polacek <polacek@redhat.com>
9075
9076 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
9077 require that the non-constant be of a boolean type.
9078
0373796b
JT
90792015-04-29 Josh Triplett <josh@joshtriplett.org>
9080
e0f0d3b9
MP
9081 * c-common.c (handle_section_attribute): Refactor to reduce
9082 nesting and distinguish between error cases.
0373796b 9083
716c0ba6
MP
90842015-04-29 Marek Polacek <polacek@redhat.com>
9085
9086 PR c/64610
9087 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
9088 with 0/1.
9089
8848828b
JJ
90902015-04-29 Jakub Jelinek <jakub@redhat.com>
9091
9092 * c-common.h (omp_clause_mask): Unconditionally define as a class.
9093 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
9094 HOST_BITS_PER_WIDE_INT.
9095
ecd0e562
TV
90962015-04-28 Tom de Vries <tom@codesourcery.com>
9097
9098 PR tree-optimization/65887
9099 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
9100
2a877204 91012015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 9102 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
9103
9104 * c-ada-spec.c (in_function): Delete.
9105 (dump_generic_ada_node): Do not change in_function and remove the
9106 redundant code dealing with it.
9107 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
9108 (print_ada_methods): Output the static member functions in a nested
9109 package after the regular methods as well as associated renamings.
9110
4853031e
MP
91112015-04-24 Marek Polacek <polacek@redhat.com>
9112
9113 PR c/65830
9114 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
9115 and OPT_Wshift_count_overflow.
9116
8c2b7f79
MP
9117 PR c/63357
9118 * c-common.c (warn_logical_operator): Warn if the operands have the
9119 same expressions.
9120
b8787813
MP
91212015-04-24 Marek Polacek <polacek@redhat.com>
9122
9123 PR c/61534
9124 * c-common.c (warn_logical_operator): Bail if either operand comes
9125 from a macro expansion.
9126
8fba1830
BRF
91272015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
9128
9129 PR target/55143
9130 * c-common.c (c_default_pointer_mode): Add definition.
9131 * c-common.h (c_default_pointer_mode): Add declaration.
9132
17958621
JJ
91332015-03-11 Jakub Jelinek <jakub@redhat.com>
9134
9135 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
9136 on record_builtin_type argument.
9137
7ccb1a11
JJ
91382015-03-10 Jakub Jelinek <jakub@redhat.com>
9139
9140 PR c/65120
9141 * c-common.c (warn_logical_not_parentheses): Don't warn for
9142 !x == 0 or !x != 0.
9143
04fd785e
MP
91442015-03-07 Marek Polacek <polacek@redhat.com>
9145
9146 PR sanitizer/65280
9147 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
9148 before trying to figure out whether we have a flexible array member.
9149
a4e26206 91502015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 9151 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
9152
9153 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
9154
0d2489f4
EB
91552015-03-05 Eric Botcazou <ebotcazou@adacore.com>
9156
9157 PR ada/65319
9158 * c-ada-spec.c (print_destructor): Remove obsolete code.
9159
83ed54d7
EB
91602015-03-01 Eric Botcazou <ebotcazou@adacore.com>
9161
9162 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
9163 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
9164 DECL_TEMPLATE_RESULT emulations.
9165 (dump_ada_template)): Add guard for TYPE_METHODS.
9166
7631f0e2
MP
91672015-02-27 Marek Polacek <polacek@redhat.com>
9168
9169 PR c/65040
9170 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
9171
d1783ae5
KT
91722015-02-27 Kai Tietz <ktietz@redhat.com>
9173
9174 PR c/35330
9175 * c-pragma.c (handle_pragma_weak): Do not try to create
9176 weak/alias of declarations not being function, or variable
9177 declarations.
9178
56a9f6bc
TS
91792015-02-24 Thomas Schwinge <thomas@codesourcery.com>
9180
9181 PR libgomp/64625
9182 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
9183 Remove macros.
9184 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
9185
3d5cb23d
MP
91862015-02-16 Marek Polacek <polacek@redhat.com>
9187
9188 PR c/65066
9189 * c-format.c (check_format_types): Handle null param.
9190
fa008882
MP
91912015-02-13 Marek Polacek <polacek@redhat.com>
9192
9193 PR c/65040
9194 * c-format.c (check_format_types): Don't warn about different
9195 signedness if the original value is in the range of WANTED_TYPE.
9196
785f21af
JM
91972015-02-12 Jason Merrill <jason@redhat.com>
9198
9199 PR c++/64956
9200 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
9201 to the current highest version.
9202 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
9203
4886ec8e
JJ
92042015-02-04 Jakub Jelinek <jakub@redhat.com>
9205
9206 PR c/64824
9207 PR c/64868
9208 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
9209 instead of RDIV_EXPR. Use build_binary_op instead of
9210 build2_loc.
9211
40fecdd6
JM
92122015-01-30 Joseph Myers <joseph@codesourcery.com>
9213
9214 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
9215 to pass input_location as first argument.
9216
a0c88d06
TV
92172015-01-23 Tom de Vries <tom@codesourcery.com>
9218
9219 PR libgomp/64672
9220 * c.opt (fopenacc): Mark as LTO option.
9221
1506ae0e
TV
92222015-01-23 Tom de Vries <tom@codesourcery.com>
9223
9224 PR libgomp/64707
9225 * c.opt (fopenmp): Mark as LTO option.
9226
31be63ab
JJ
92272015-01-21 Jakub Jelinek <jakub@redhat.com>
9228
9229 PR c/63307
b1726d6c 9230 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
9231 (compare_decls): Fix up formatting.
9232
92332015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
9234
9235 PR c/63307
9236 * cilk.c: Include vec.h.
9237 (struct cilk_decls): New structure.
9238 (wrapper_parm_cb): Split this function to...
9239 (fill_decls_vec): ...this...
9240 (create_parm_list): ...and this.
9241 (compare_decls): New function.
9242 (for_local_cb): Remove.
9243 (wrapper_local_cb): Ditto.
9244 (build_wrapper_type): For now first traverse and fill vector of
9245 declarations then sort it and then deal with sorted vector.
9246 (cilk_outline): Ditto.
9247 (declare_one_free_variable): Ditto.
9248
6875457f
JM
92492015-01-21 Jason Merrill <jason@redhat.com>
9250
9251 PR c++/64629
9252 * c-format.c (check_format_arg): Call decl_constant_value.
9253
185c9e56
ML
92542015-01-19 Martin Liska <mliska@suse.cz>
9255
9256 * c-common.c (handle_noicf_attribute): New function.
9257
41dbbb37
TS
92582015-01-15 Thomas Schwinge <thomas@codesourcery.com>
9259 Bernd Schmidt <bernds@codesourcery.com>
9260 James Norris <jnorris@codesourcery.com>
9261 Cesar Philippidis <cesar@codesourcery.com>
9262 Ilmir Usmanov <i.usmanov@samsung.com>
9263 Jakub Jelinek <jakub@redhat.com>
9264
9265 * c.opt (fopenacc): New option.
9266 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
9267 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
9268 New macros.
9269 * c-common.h (c_finish_oacc_wait): New prototype.
9270 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
9271 (c_finish_oacc_wait): New function.
9272 * c-pragma.c (oacc_pragmas): New variable.
9273 (c_pp_lookup_pragma, init_pragma): Handle it.
9274 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
9275 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
9276 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
9277 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
9278 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
9279 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
9280 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
9281 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
9282 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
9283 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
9284 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
9285 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
9286 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
9287 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
9288 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
9289 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
9290 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
9291 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
9292 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
9293 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
9294 PRAGMA_OACC_CLAUSE_WORKER.
9295
3f8257db 92962015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
9297
9298 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
9299 for the new option fstack-protector_explicit.
9300 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
9301 (handle_stack_protect_attribute): New function.
9302
3f8257db 93032015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
9304
9305 * c.opt: New option -Warray-bounds=.
9306
adfac8df
JJ
93072015-01-09 Michael Collison <michael.collison@linaro.org>
9308
9309 * array-notation-common.c: Include hash-set.h, machmode.h,
9310 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9311 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
9312 * c-ada-spec.c: Ditto.
9313 * c-cilkplus.c: Ditto.
9314 * c-common.c: Include input.h due to flattening of tree.h.
9315 Define macro GCC_C_COMMON_C.
9316 * c-common.h: Flatten tree.h header files into c-common.h.
9317 Remove include of tree-core.h.
9318 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
9319 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9320 fold-const.h, wide-int.h, and inchash.h due to
9321 flattening of tree.h.
9322 * c-dump.c: Ditto.
9323 * c-format.c: Flatten tree.h header files into c-common.h.
9324 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
9325 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9326 fold-const.h, wide-int.h, and inchash.h due to
9327 flattening of tree.h.
9328 * c-dump.c: Include hash-set.h, machmode.h,
9329 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9330 fold-const.h, wide-int.h, and inchash.h due to
9331 flattening of tree.h.
9332 * c-format.c: Include hash-set.h, machmode.h,
9333 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9334 fold-const.h, wide-int.h, inchash.h and real.h due to
9335 flattening of tree.h.
9336 * c-gimplify.c: Include hash-set.h, machmode.h,
9337 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9338 fold-const.h, wide-int.h, and inchash.h due to
9339 flattening of tree.h.
9340 * cilk.c: Ditto.
9341 * c-lex.c: Ditto.
9342 * c-omp.c: Ditto.
9343 * c-opts.c: Ditto.
9344 * c-pch.c: Ditto.
9345 * c-ppoutput.c: Ditto.
9346 * c-pragma.c: Ditto.
9347 * c-pretty-print.c: Ditto.
9348 * c-semantics.c: Ditto.
9349 * c-ubsan.c: Ditto.
9350 * stub-objc.c: Ditto.
9351
f5481fc4
JM
93522015-01-08 Jason Merrill <jason@redhat.com>
9353
9354 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
9355 do_ubsan_in_current_function.
9356 (ubsan_maybe_instrument_reference_or_call): Likewise.
9357 * c-ubsan.h: Declare it.
9358
de35aa66
MS
93592015-01-08 Mike Stump <mikestump@comcast.net>
9360
9361 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
9362
4a9a42ab
MP
93632015-01-07 Marek Polacek <polacek@redhat.com>
9364
9365 PR c/64440
9366 * c-common.c (c_fully_fold_internal): Warn for division and modulo
9367 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
9368
2f42e5de
TS
93692015-01-05 Trevor Saunders <tsaunders@mozilla.com>
9370
9371 PR c++/31397
9372 * c.opt (Wsuggest-override): New option.
9373
5624e564
JJ
93742015-01-05 Jakub Jelinek <jakub@redhat.com>
9375
9376 Update copyright years.
9377
5bd012f8
MP
93782015-01-05 Marek Polacek <polacek@redhat.com>
9379
9380 PR c/64423
9381 * c-common.c (warn_array_subscript_with_type_char): Add location_t
9382 parameter. Use it.
9383 * c-common.h (warn_array_subscript_with_type_char): Update
9384 declaration.
9385
a7fa8d18
ESR
93862014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
9387
9388 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
9389 Control macro with flag_sized_deallocation.
9390
3f8257db 93912014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
9392
9393 * c.opt (Wdiscarded-array-qualifiers): New option.
9394
1f8d3e84
JJ
93952014-12-19 Jakub Jelinek <jakub@redhat.com>
9396
9397 PR preprocessor/63831
9398 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
9399 and __has_cpp_attribute here.
9400 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
9401 c_common_has_attribute.
9402 * c-common.h (c_common_has_attribute): New prototype.
9403 * c-lex.c (init_c_lex): Set cb->has_attribute to
9404 c_common_has_attribute instead of cb_has_attribute.
9405 (get_token_no_padding): New function.
9406 (cb_has_attribute): Renamed to ...
9407 (c_common_has_attribute): ... this. No longer static. Use
9408 get_token_no_padding, require ()s, don't build TREE_LIST
9409 unnecessarily, fix up formatting, adjust diagnostics, call
9410 init_attributes.
9411
20b06add
JM
94122014-12-15 Jason Merrill <jason@redhat.com>
9413
9414 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
9415 (-Wsized-deallocation): New.
9416 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
9417 to on in C++14 and up.
9418
94a073b2
JM
94192014-12-11 Jason Merrill <jason@redhat.com>
9420
acaa5911
JM
9421 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
9422
94a073b2
JM
9423 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
9424 we aren't complaining about VLAs.
9425
7fb66c15
MP
94262014-12-06 Marek Polacek <polacek@redhat.com>
9427
9428 PR tree-optimization/64183
9429 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
9430 shift-expression if it is integer_type_node. Use types_compatible_p.
9431
b731b390
JJ
94322014-11-29 Jakub Jelinek <jakub@redhat.com>
9433
9434 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
9435 last argument from create_tmp_var_raw and create_tmp_var calls.
9436 * cilk.c (gimplify_cilk_spawn): Likewise.
9437 * c-omp.c (c_finish_omp_atomic): Likewise.
9438
6a4da643
MP
94392014-11-28 Marek Polacek <polacek@redhat.com>
9440
9441 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
9442 instead of unsigned_type_node.
9443
541e35a6
MP
94442014-11-28 Marek Polacek <polacek@redhat.com>
9445
9446 PR c/63862
9447 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
9448 to op1_utype.
9449 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
9450 expression to unsigned_type_node.
9451
dcc97066
MW
94522014-11-20 Mark Wielaard <mjw@redhat.com>
9453
9454 PR debug/38757
9455 * c-opts.c (set_std_c89): Set lang_hooks.name.
9456 (set_std_c99): Likewise.
9457 (set_std_c11): Likewise.
9458 (set_std_cxx98): Likewise.
9459 (set_std_cxx11): Likewise.
9460 (set_std_cxx14): Likewise.
9461 (set_std_cxx1z): Likewise.
9462
aa7da51a
JJ
94632014-11-21 Jakub Jelinek <jakub@redhat.com>
9464
9465 PR target/63764
9466 * c-common.h (convert_vector_to_pointer_for_subscript): Change
9467 return type to bool.
009a3480 9468 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
9469 (convert_vector_to_pointer_for_subscript): Change return type to
9470 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
9471 and copy it into a TARGET_EXPR and use that instead of *vecp
9472 directly.
9473
538dd0b7
DM
94742014-11-19 David Malcolm <dmalcolm@redhat.com>
9475
9476 Merger of git branch "gimple-classes-v2-option-3".
9477 * ChangeLog.gimple-classes: New.
9478 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
9479 from being just a vec<gimple> to a vec<gbind *>.
9480
c39a5e99
JJ
94812014-11-18 Jakub Jelinek <jakub@redhat.com>
9482
9483 PR sanitizer/63813
9484 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
9485 argument to ptype, set type to TREE_TYPE (ptype). Don't call
9486 get_pointer_alignment for non-pointers. Use ptype, or if it is
9487 reference type, corresponding pointer type, as type of kind
9488 argument.
9489 (ubsan_maybe_instrument_reference,
9490 ubsan_maybe_instrument_member_call): Adjust callers.
9491
8537a4a9
MP
94922014-11-15 Marek Polacek <polacek@redhat.com>
9493
9494 PR middle-end/63884
9495 * array-notation-common.c (is_sec_implicit_index_fn): Return false
9496 for NULL fndecl.
9497 (extract_array_notation_exprs): Return for NULL node.
9498
2079956a
JM
94992014-11-12 Joseph Myers <joseph@codesourcery.com>
9500
9501 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
9502 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
9503
1304953e
JJ
95042014-11-12 Jakub Jelinek <jakub@redhat.com>
9505
9506 PR c/59708
9507 * c-common.c (check_builtin_function_arguments): Handle
9508 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
9509
e5e44252
AK
95102014-11-10 Andi Kleen <ak@linux.intel.com>
9511
9512 PR c/60804
9513 * c-common.h (check_no_cilk): Declare.
9514 * cilk.c (get_error_location): New function.
9515 (check_no_cilk): Dito.
9516
e64b984d
AK
95172014-11-10 Andi Kleen <ak@linux.intel.com>
9518
9519 * cilk.c (recognize_spawn): Use expression location
9520 for error message.
9521
13c21655
PC
95222014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
9523
9524 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
9525
42fd12b1
ESR
95262014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
9527
9528 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
9529 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
9530 (__cpp_range_based_for, __cpp_initializer_lists,
9531 __cpp_delegating_constructors, __cpp_nsdmi,
9532 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
9533 for C++11; (__cpp_attribute_deprecated): Remove in favor of
9534 __has_cpp_attribute.
9535 * c-lex.c (cb_has_attribute): New callback CPP function;
9536 (init_c_lex): Set has_attribute callback.
9537
6f450181
RB
95382014-11-04 Richard Biener <rguenther@suse.de>
9539
9540 * c-common.c (shorten_compare): Do not shorten mixed
9541 DFP and non-DFP compares.
9542
26f0e1d6
ESR
95432014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9544
9545 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
9546 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
9547 Commentary and rearrangement of tests.
9548 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
9549 Commentary and rearrangement of tests.
ab20d992 9550 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
26f0e1d6
ESR
9551 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
9552
ef4bddc2
RS
95532014-10-29 Richard Sandiford <richard.sandiford@arm.com>
9554
9555 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
9556 enum from machine_mode.
9557
c582198b
AM
95582014-10-28 Andrew MacLeod <amacleod@redhat.com>
9559
adfac8df
JJ
9560 * c-common.c: Adjust include files.
9561 * c-gimplify.c: Ditto.
9562 * cilk.c: Ditto.
9563 * c-pragma.c: Ditto.
9564 * c-ubsan.c: Ditto.
c582198b 9565
60393bbc
AM
95662014-10-27 Andrew MacLeod <amacleod@redhat.com>
9567
9568 * c-gimplify.c: Adjust include files.
9569
d723bb7c
MLI
95702014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
9571
9572 PR c++/53061
9573 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
9574 c_common_initialize_diagnostics.
9575 * c-common.h: Likewise.
9576
90f3520e
MP
95772014-10-24 Marek Polacek <polacek@redhat.com>
9578
9579 PR c/56980
9580 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
9581 print "struct"/"union"/"enum" for typedefed names.
9582
59d7607a
MP
95832014-10-23 Marek Polacek <polacek@redhat.com>
9584
9585 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
9586 in unsigned type.
9587
d95a2703
JJ
95882014-10-22 Jakub Jelinek <jakub@redhat.com>
9589 Yury Gribov <y.gribov@samsung.com>
9590
9591 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9592 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
9593 instead of flag_sanitize_recover as bool flag.
9594
8e6ef852
KY
95952014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
9596
9597 * cilk.c: Revert previous change.
9598
948cf550
IZ
95992014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
9600
9601 PR c/63307
9602 * cilk.c: Include vec.h.
9603 (struct cilk_decls): New structure.
9604 (wrapper_parm_cb): Split this function to...
9605 (fill_decls_vec): ...this...
9606 (create_parm_list): ...and this.
9607 (compare_decls): New function.
9608 (for_local_cb): Remove.
9609 (wrapper_local_cb): Ditto.
9610 (build_wrapper_type): For now first traverse and fill vector of
9611 declarations then sort it and then deal with sorted vector.
9612 (cilk_outline): Ditto.
9613 (declare_one_free_variable): Ditto.
9614
92574c7c
MP
96152014-10-17 Marek Polacek <polacek@redhat.com>
9616
9617 * c-opts.c (c_common_post_options): Set warn_implicit_int.
9618 * c.opt (Wimplicit-int): Initialize to -1.
9619
83685514
AM
96202014-10-16 Andrew MacLeod <amacleod@redhat.com>
9621
9622 * c-pragma.c: Adjust include files.
9623 * c-semantics.c: Likewise.
9624
5b8300ea
DD
96252014-10-16 DJ Delorie <dj@redhat.com>
9626
9627 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
9628 multiples of bytes.
9629
5f83e90b
JM
96302014-10-14 Jason Merrill <jason@redhat.com>
9631
9632 PR c++/63455
9633 * c-common.h (CPP_PREPARSED_EXPR): New.
9634 (N_CP_TTYPES): Adjust.
9635
d73326ca
MP
96362014-10-15 Marek Polacek <polacek@redhat.com>
9637
9638 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
9639
78a7c317
DD
96402014-10-14 DJ Delorie <dj@redhat.com>
9641
9642 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
9643 types, not just __int128.
9644 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
9645 types, not just __int128.
9646 (cpp_atomic_builtins): Round pointer sizes up.
9647 (type_suffix): Use type precision, not specific types.
9648 * c-common.c (c_common_reswords): Remove __int128 special case.
9649 (c_common_type_for_size): Check for all __intN types, not just
9650 __int128.
9651 (c_common_type_for_mode): Likewise.
9652 (c_common_signed_or_unsigned_type): Likewise.
9653 (c_build_bitfield_integer_type): Likewise.
9654 (c_common_nodes_and_builtins): Likewise.
9655 (keyword_begins_type_specifier): Likewise.
9656 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
9657 __intN variants.
9658
2a22f99c
TS
96592014-10-12 Trevor Saunders <tsaunders@mozilla.com>
9660
9661 * c-common.c: Use hash_table instead of hashtab.
9662
2a8ef767
ESR
96632014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
9664
adfac8df 9665 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
9666 C++11 section.
9667
3c9aabbd
MG
96682014-10-03 Marc Glisse <marc.glisse@inria.fr>
9669
9670 PR c++/54427
9671 PR c++/57198
9672 PR c++/58845
9673 * c-common.c (warn_logical_operator): Punt for vectors.
9674
a15f7cb8
ESR
96752014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9676
9677 Implement SD-6: SG10 Feature Test Recommendations
9678 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
9679 macros and the __has_header macro.
9680
8d0cf15e
JM
96812014-09-30 Jason Merrill <jason@redhat.com>
9682
dd5d5481
JM
9683 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
9684 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
9685 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9686
b752325e
JM
9687 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
9688 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9689
8d0cf15e
JM
9690 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
9691 * c-common.c (c_common_reswords): Remove __is_convertible_to.
9692
083e891e
MP
96932014-09-24 Marek Polacek <polacek@redhat.com>
9694
9695 PR c/61405
9696 PR c/53874
9697 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
9698
7861b648
AK
96992014-09-23 Andi Kleen <ak@linux.intel.com>
9700
9701 * c-common.c (handle_no_reorder_attribute): New function.
9702 (c_common_attribute_table): Add no_reorder attribute.
9703
9a79452d
JM
97042014-09-22 Joseph Myers <joseph@codesourcery.com>
9705
9706 * c-cppbuiltin.c (c_cpp_builtins): Define
9707 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
9708 modes.
9709
dd69f047
JM
97102014-09-18 Joseph Myers <joseph@codesourcery.com>
9711
9712 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
9713 for supported floating-point modes.
9714
737a4826
MLI
97152014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9716
9717 * c.opt (Wpsabi): Use LangEnabledBy.
9718 * c-opts.c (c_common_handle_option): Do not handle here.
9719
8cc4b7a2
JM
97202014-09-12 Joseph Myers <joseph@codesourcery.com>
9721
9722 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
9723 macros for floating-point modes.
9724
179b5a55
MG
97252014-09-11 Marc Glisse <marc.glisse@inria.fr>
9726
9727 PR target/58757
9728 * c-cppbuiltin.c (builtin_define_float_constants): Correct
9729 __*_DENORM_MIN__ without denormals.
9730
570a11fe
JJ
97312014-09-10 Jakub Jelinek <jakub@redhat.com>
9732
9733 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9734 ubsan_instrument_vla, ubsan_instrument_return): Adjust
9735 ubsan_create_data callers.
9736 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
9737 index is constant or BIT_AND_EXPR with constant mask and is
9738 small enough for the bound.
9739 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
9740 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
9741
b559c810
MLI
97422014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9743
9744 * c.opt: Add CppReason to various flags.
9745 (Wdate-time): Re-sort.
9746 * c-common.c: Include c-common.h earlier.
9747 (struct reason_option_codes_t): Delete.
9748 (c_option_controlling_cpp_error): Prefix global type and struct
9749 with cpp_.
9750
1ef33fd4
MLI
97512014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9752
9753 * c.opt (Wnormalized): New.
9754 (Wnormalized=): Use Enum and Reject Negative.
9755 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
9756
66bb34c0
JM
97572014-09-08 Joseph Myers <joseph@codesourcery.com>
9758
9759 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
9760 digits of floating-point modes if -fbuilding-libgcc.
9761
53d68b9f
JM
97622014-09-05 Joseph Myers <joseph@codesourcery.com>
9763
9764 * c-cppbuiltin.c (c_cpp_builtins): Also define
9765 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
9766 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
9767 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
9768 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
9769 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
9770 __LIBGCC_STACK_GROWS_DOWNWARD__,
9771 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
9772 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
9773 __LIBGCC_DWARF_FRAME_REGISTERS__,
9774 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
9775 __LIBGCC_STACK_POINTER_REGNUM__ and
9776 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
9777 (builtin_define_with_value): Handle backslash-escaping in string
9778 macro values.
9779
f65586dc
RB
97802014-09-05 Richard Biener <rguenther@suse.de>
9781
9782 PR middle-end/63148
9783 * c-format.c (check_format_arg): Properly handle
9784 effectively signed POINTER_PLUS_EXPR offset.
9785
2b71f4a4
MLI
97862014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
9787
9788 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
9789 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
9790 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
9791 and Init.
9792 * c-opts.c (c_common_handle_option): Do not handle here.
9793 (sanitize_cpp_opts): Likewise.
9794 * c-common.c (struct reason_option_codes_t): Handle
9795 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
9796
d2e4feca
MP
97972014-09-03 Marek Polacek <polacek@redhat.com>
9798
9799 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
9800
9a771876
JJ
98012014-09-02 Jakub Jelinek <jakub@redhat.com>
9802 Balaji V. Iyer <balaji.v.iyer@intel.com>
9803 Igor Zamyatin <igor.zamyatin@intel.com>
9804
9805 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
9806 * c-common.c (c_common_reswords): Added _Cilk_for.
9807 * c-common.h (enum rid): Added RID_CILK_FOR.
9808 (cilk_for_number_of_iterations): Add declaration.
9809 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
9810 CILK_FOR.
9811 * c-pragma.c (init_pragma): Register "grainsize" pragma.
9812 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
9813
81b5d104
MLI
98142014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9815
9816 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
9817 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
9818 Wundef): Use CPP, Var and Init.
9819 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
9820
b753b37b
MLI
98212014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9822
9823 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
9824 * c-opts.c (c_common_handle_option): Do not handle here.
9825
028aee17
JM
98262014-08-25 Jason Merrill <jason@redhat.com>
9827
9828 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
9829 -std=c++14 and -std=gnu++14, rather than the reverse.
9830 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
9831 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
9832 * c-common.h (cxx_dialect): Remove cxx1y.
9833
e4276ba5
ESR
98342014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
9835
9836 * c-common.h (enum cxx_dialect): Add cxx14.
9837 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
9838 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
9839 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
9840
a545cacd
JM
98412014-08-22 Jason Merrill <jason@redhat.com>
9842
9843 * c.opt (std=gnu++17): Fix alias.
9844
59ea0364
MP
98452014-08-22 Marek Polacek <polacek@redhat.com>
9846
9847 PR c++/62199
9848 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
9849 check for vector types. Drop LHS argument.
9850 * c-common.h (warn_logical_not_parentheses): Adjust.
9851
596e808c
MLI
98522014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
9853
9854 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
9855 (Wmultichar): Likewise.
9856 (Wdate-time): Use C-family languages instead of Common. Use CPP
9857 and Var.
9858 * c-opts.c (c_common_handle_option): Do not handle the above
9859 options here.
9860 (sanitize_cpp_opts): Likewise.
9861
18767f65
MLI
98622014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
9863
9864 PR fortran/44054
9865 * c-opts.c: Include tree-diagnostics.h.
9866 (c_diagnostic_finalizer): New.
9867 (c_common_initialize_diagnostics): Use it.
9868
b4413594
MLI
98692014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9870
9871 PR preprocessor/51303
9872 * c-common.c (struct reason_option_codes_t option_codes):
9873 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
9874
43f9a13c
MLI
98752014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9876
9877 PR c/60975
9878 PR c/53063
9879 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
9880 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
9881 (c_common_post_options): Call init_global_opts_from_cpp.
9882 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
9883
04159acf
MP
98842014-08-19 Marek Polacek <polacek@redhat.com>
9885
9886 PR c++/62153
9887 * c-common.c (maybe_warn_bool_compare): New function.
9888 * c-common.h (maybe_warn_bool_compare): Declare.
9889 * c.opt (Wbool-compare): New option.
9890
35aff4fb
MP
98912014-08-19 Marek Polacek <polacek@redhat.com>
9892
9893 * c.opt (Wc99-c11-compat): New option.
9894
177cce46
MP
98952014-08-19 Marek Polacek <polacek@redhat.com>
9896
9897 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
9898 to warn_c90_c99_compat.
9899 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
9900 to -1.
9901
6ae9194f
MLI
99022014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
9903 Steven Bosscher <steven@gcc.gnu.org>
9904
9905 PR c/52952
9906 * c-format.c: Add extra_arg_loc and format_string_loc to struct
9907 format_check_results.
9908 (check_function_format): Use true and add comment for boolean
9909 argument.
9910 (finish_dollar_format_checking): Use explicit location when warning.
9911 (check_format_info): Likewise.
9912 (check_format_arg): Set extra_arg_loc and format_string_loc.
9913 (check_format_info_main): Use explicit location when warning.
9914 (check_format_types): Pass explicit location.
9915 (format_type_warning): Likewise.
9916
8e54f6d3
MLI
99172014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9918
9919 PR fortran/44054
9920 * c-format.c: Handle Fortran flags.
9921
cd4e76fc
IZ
99222014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
9923
9924 PR other/61962
9925 * array-notation-common.c (find_rank): Added handling for other
9926 types of references.
9927
f3bede71
MP
99282014-08-10 Marek Polacek <polacek@redhat.com>
9929
9930 PR c/51849
9931 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
9932 * c.opt (Wc90-c99-compat): Add option.
9933
9f25a338
TS
99342014-08-07 Trevor Saunders <tsaunders@mozilla.com>
9935
9936 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
9937
62e4eb35
MP
99382014-08-03 Marek Polacek <polacek@redhat.com>
9939
ab20d992 9940 * c-common.c (check_case_value): Add location_t parameter. Use it.
62e4eb35
MP
9941 (c_add_case_label): Pass loc to check_case_value.
9942
b787e7a2
TS
99432014-08-02 Trevor Saunders <tsaunders@mozilla.com>
9944
9945 * cilk.c: Use hash_map instead of pointer_map.
9946
6e2830c3
TS
99472014-08-02 Trevor Saunders <tsaunders@mozilla.com>
9948
9949 * c-gimplify.c: Use hash_set instead of pointer_set.
9950
a7ee52fb
IZ
99512014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
9952
9953 PR middle-end/61455
9954 * array-notation-common.c (extract_array_notation_exprs): Handling
9955 of DECL_EXPR added.
9956
944fa280
JJ
99572014-08-01 Jakub Jelinek <jakub@redhat.com>
9958
9959 * c-common.h (min_align_of_type): Removed prototype.
9960 * c-common.c (min_align_of_type): Removed.
9961 * c-ubsan.h (ubsan_maybe_instrument_reference,
9962 ubsan_maybe_instrument_member_call): New prototypes.
9963 * c-ubsan.c: Include stor-layout.h and builtins.h.
9964 (ubsan_maybe_instrument_reference_or_call,
9965 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
9966 functions.
9967
b4dfdc11
MG
99682014-07-31 Marc Glisse <marc.glisse@inria.fr>
9969
9970 PR c++/60517
9971 * c.opt (-Wreturn-local-addr): Move to common.opt.
9972
a41844e5
JM
99732014-07-30 Jason Merrill <jason@redhat.com>
9974
9975 PR c++/61659
9976 PR c++/61687
9977 Revert:
9978 * c.opt (-fuse-all-virtuals): New.
9979
976d5a22
TT
99802014-07-30 Tom Tromey <tromey@redhat.com>
9981
9982 PR c/59855
9983 * c.opt (Wdesignated-init): New option.
9984 * c-common.c (c_common_attribute_table): Add "designated_init".
9985 (handle_designated_init): New function.
9986
cdc94aca
MP
99872014-07-24 Marek Polacek <polacek@redhat.com>
9988
9989 PR c/57653
9990 * c-opts.c (c_finish_options): If -imacros is in effect, return.
9991
f41373b6
DS
99922014-07-16 Dodji Seketeli <dodji@redhat.com>
9993
9994 PR preprocessor/60723 - missing system-ness marks for macro tokens
9995 * c-ppoutput.c (struct print::prev_was_system_token): New data
9996 member.
9997 (init_pp_output): Initialize it.
9998 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
9999 (do_line_change): Return a flag saying if a line marker was
10000 emitted or not.
10001 (scan_translation_unit): Detect if the system-ness of the token we
10002 are about to emit is different from the one of the previously
10003 emitted token. If so, emit a line marker. Avoid emitting useless
10004 adjacent line markers. Avoid emitting line markers for tokens
10005 originating from the expansion of built-in macros.
10006 (scan_translation_unit_directives_only): Adjust.
10007
4d661eaa
MP
100082014-07-15 Marek Polacek <polacek@redhat.com>
10009
10010 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
10011 TYPE_MAX_VALUE is NULL.
10012
b108f48f
JJ
100132014-07-14 Jakub Jelinek <jakub@redhat.com>
10014
10015 PR middle-end/61294
10016 * c.opt (Wmemset-transposed-args): New warning.
10017
c0221884
JM
100182014-07-10 Jason Merrill <jason@redhat.com>
10019
10020 PR c++/61659
10021 PR c++/61687
10022 * c.opt (-fuse-all-virtuals): New.
10023
63dfbb95
RB
100242014-07-09 Richard Biener <rguenther@suse.de>
10025
10026 PR c-family/61741
10027 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
10028 using unsigned arithmetic if overflow does not wrap instead of
10029 if overflow is undefined.
10030
773ec47f
MP
100312014-07-06 Marek Polacek <polacek@redhat.com>
10032
10033 PR c/6940
10034 * c.opt (Wsizeof-array-argument): New option.
10035
00a7ba58
JJ
100362014-07-03 Jakub Jelinek <jakub@redhat.com>
10037
b1726d6c 10038 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
10039 comments->count <= 1, as comments->entries might be NULL.
10040
52ec0ea3
MP
100412014-07-01 Marek Polacek <polacek@redhat.com>
10042
10043 * c.opt (Wint-conversion): New option.
10044
d5c3d343
MP
100452014-07-01 Marek Polacek <polacek@redhat.com>
10046
10047 PR c/58286
10048 * c.opt (Wincompatible-pointer-types): New option.
10049
6e7ceb17
PC
100502014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
10051
10052 PR c++/51400
10053 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
10054 Do not discard TYPE_QUALS of type.
10055
da73100b
JM
100562014-06-26 Jason Merrill <jason@redhat.com>
10057
10058 * c-common.h (enum cxx_dialect): Add cxx1z.
10059 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
10060 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
10061
08eedf75
TJ
100622014-06-26 Teresa Johnson <tejohnson@google.com>
10063
10064 * c-common.h (get_dump_info): Declare.
10065 * c-gimplify.c (c_genericize): Use saved dump files.
10066 * c-opts.c (c_common_parse_file): Begin and end dumps
10067 once around parsing invocation.
10068 (get_dump_info): New function.
10069
7b56b2f8
MP
100702014-06-23 Marek Polacek <polacek@redhat.com>
10071 Andrew MacLeod <amacleod@redhat.com>
10072
10073 PR c/61553
10074 * c-common.c (get_atomic_generic_size): Don't segfault if the
10075 type doesn't have a size.
10076
0e37a2f3
MP
100772014-06-20 Marek Polacek <polacek@redhat.com>
10078
10079 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
10080 (ubsan_walk_array_refs_r): New function.
10081 (c_genericize): Instrument array bounds.
10082 * c-ubsan.c: Include "internal-fn.h".
10083 (ubsan_instrument_division): Mark instrumented arrays as having
10084 side effects. Adjust ubsan_type_descriptor call.
10085 (ubsan_instrument_shift): Likewise.
10086 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
10087 (ubsan_instrument_bounds): New function.
10088 (ubsan_array_ref_instrumented_p): New function.
10089 (ubsan_maybe_instrument_array_ref): New function.
10090 * c-ubsan.h (ubsan_instrument_bounds): Declare.
10091 (ubsan_array_ref_instrumented_p): Declare.
10092 (ubsan_maybe_instrument_array_ref): Declare.
10093
100942014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
10095
10096 PR lto/61123
10097 * c.opt (fshort-enums): Add to LTO.
10098 * c.opt (fshort-wchar): Likewise.
10099
5c3d09f7
MP
101002014-06-16 Marek Polacek <polacek@redhat.com>
10101
10102 PR c/60439
10103 * c.opt (Wswitch-bool): Add Var.
10104
9cf32741
JJ
101052014-06-12 Jakub Jelinek <jakub@redhat.com>
10106
10107 PR middle-end/61486
10108 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
10109 #pragma omp target teams or
10110 #pragma omp {,target }teams distribute simd.
10111
62984918
JM
101122014-06-12 Jason Merrill <jason@redhat.com>
10113
10114 * c.opt (Wabi=, fabi-compat-version): New.
10115 * c-opts.c (c_common_handle_option): Handle -Wabi=.
10116 (c_common_post_options): Handle flag_abi_compat_version default.
10117 Disallow -fabi-compat-version=1.
10118 * c-common.h (abi_version_crosses): New.
10119
f961457f
JH
101202014-06-11 Jan Hubicka <hubicka@ucw.cz>
10121
adfac8df 10122 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
10123 section names that are no longer trees.
10124
92d28cbb
JJ
101252014-06-10 Jakub Jelinek <jakub@redhat.com>
10126
10127 PR fortran/60928
10128 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
10129 (omp_pragmas): ... back here.
10130
742938c9
MP
101312014-06-05 Marek Polacek <polacek@redhat.com>
10132
10133 PR c/49706
10134 * c-common.c (warn_logical_not_parentheses): New function.
10135 * c-common.h (warn_logical_not_parentheses): Declare.
10136 * c.opt (Wlogical-not-parentheses): New option.
10137
9d548dfb
MP
101382014-06-04 Marek Polacek <polacek@redhat.com>
10139
10140 PR c/30020
10141 * c-common.c (check_case_bounds): Add location parameter.
10142 Use it.
10143 (c_add_case_label): Pass loc to check_case_bounds.
10144
fedfecef
MP
101452014-06-03 Marek Polacek <polacek@redhat.com>
10146
10147 PR c/60439
10148 * c.opt (Wswitch-bool): New option.
10149
f6a7cffc
TS
101502014-05-22 Thomas Schwinge <thomas@codesourcery.com>
10151
040d18b6
TS
10152 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
10153 Remove prototypes.
10154 (record_types_used_by_current_var_decl): Move prototype to where
10155 it belongs.
10156
f6a7cffc
TS
10157 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
10158 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
10159 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
10160
632f2871
RS
101612014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
10162
10163 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
10164 * c-common.c (c_common_nodes_and_builtins): Don't initialize
10165 void_zero_node.
10166 * c-pretty-print.c (pp_c_void_constant): New function.
10167 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
10168 (c_pretty_printer::expression): Handle VOID_CST.
10169 * cilk.c (extract_free_variables): Likewise.
10170 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
10171 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
10172
766090c2
TS
101732014-05-17 Trevor Saunders <tsaunders@mozilla.com>
10174
10175 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
10176 * c-pragma.c (push_alignment): Adjust.
10177 (handle_pragma_push_options): Likewise.
10178
661a0813
MP
101792014-05-09 Marek Polacek <polacek@redhat.com>
10180
10181 PR c/50459
10182 * c-common.c (check_user_alignment): Return -1 if alignment is error
10183 node.
10184 (handle_aligned_attribute): Don't call default_conversion on
10185 FUNCTION_DECLs.
10186 (handle_vector_size_attribute): Likewise.
10187 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
10188 (handle_sentinel_attribute): Call default_conversion and allow even
10189 integral types as an argument.
10190
2793eeab
MP
101912014-05-08 Marek Polacek <polacek@redhat.com>
10192
10193 PR c/61053
10194 * c-common.c (min_align_of_type): New function factored out from...
10195 (c_sizeof_or_alignof_type): ...here.
10196 * c-common.h (min_align_of_type): Declare.
10197
f827930a
MP
101982014-05-08 Marek Polacek <polacek@redhat.com>
10199
10200 PR c/61077
10201 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
10202 parameter type of main.
10203
ca49b74e
DD
102042014-05-07 DJ Delorie <dj@redhat.com>
10205
10206 * c-cppbuiltin.c (print_bits_of_hex): New.
10207 (builtin_define_type_minmax): Print values using hex so as not to
10208 require a pre-computed list of string values.
10209
1d60af08
KZ
102102014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
10211 Mike Stump <mikestump@comcast.net>
10212 Richard Sandiford <rdsandiford@googlemail.com>
10213
10214 * c-ada-spec.c: Include wide-int.h.
10215 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
10216 (dump_generic_ada_node): Use wide-int interfaces.
10217 * c-common.c: Include wide-int-print.h.
10218 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
10219 (pointer_int_sum): Use wide-int interfaces.
10220 (c_common_nodes_and_builtins): Use make_int_cst.
10221 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
10222 (handle_alloc_size_attribute): Use wide-int interfaces.
10223 (get_nonnull_operand): Likewise.
10224 * c-format.c (get_constant): Use tree_fits_uhwi_p.
10225 * c-lex.c: Include wide-int.h.
10226 (narrowest_unsigned_type): Take a widest_int rather than two
10227 HOST_WIDE_INTs.
10228 (narrowest_signed_type): Likewise.
10229 (interpret_integer): Update accordingly. Use wide-int interfaces.
10230 (lex_charconst): Use wide-int interfaces.
10231 * c-pretty-print.c: Include wide-int.h.
10232 (pp_c_integer_constant): Use wide-int interfaces.
10233 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
10234 INT_CST_LT_UNSIGNED.
10235
b15458be
RB
102362014-05-06 Richard Biener <rguenther@suse.de>
10237
10238 * c-opts.c (c_common_post_options): For -freestanding,
10239 -fno-hosted and -fno-builtin disable pattern recognition
10240 if not enabled explicitely.
10241
6577374e
MP
102422014-05-02 Marek Polacek <polacek@redhat.com>
10243
10244 * c.opt (Wsizeof-pointer-memaccess): Describe option.
10245
d00887e8
MP
102462014-05-01 Marek Polacek <polacek@redhat.com>
10247
10248 PR c/43245
10249 * c.opt (Wdiscarded-qualifiers): Add.
10250
f8ed5150
MP
102512014-04-30 Marek Polacek <polacek@redhat.com>
10252
10253 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
10254 INT_MIN / -1 sanitization only for integer types.
10255
45484dcf
MP
102562014-04-25 Marek Polacek <polacek@redhat.com>
10257
10258 PR c/18079
10259 * c-common.c (handle_noinline_attribute): Warn if the attribute
10260 conflicts with always_inline attribute.
10261 (handle_always_inline_attribute): Warn if the attribute conflicts
10262 with noinline attribute.
10263
38e514c0
MP
102642014-04-25 Marek Polacek <polacek@redhat.com>
10265
10266 PR c/60156
10267 * c-common.c (check_main_parameter_types): Warn about variadic main.
10268
44875f92
MS
102692014-04-24 Mike Stump <mikestump@comcast.net>
10270
10271 * c.opt (Wshadow-ivar): Default to on.
10272
dcaaa5a0
DP
102732014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
10274
10275 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
10276
c07d7c02
MP
102772014-04-23 Marek Polacek <polacek@redhat.com>
10278
10279 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
10280
1c33c9b7
JJ
102812014-04-22 Jakub Jelinek <jakub@redhat.com>
10282
10283 PR sanitizer/60275
10284 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
10285 if flag_sanitize_undefined_trap_on_error.
10286 (ubsan_instrument_division, ubsan_instrument_shift,
10287 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
10288 if !flag_sanitize_recover.
10289
793c625f
MG
102902014-04-22 Marc Glisse <marc.glisse@inria.fr>
10291
10292 PR libstdc++/43622
10293 * c-common.c (registered_builtin_types): Make non-static.
10294 * c-common.h (registered_builtin_types): Declare.
10295
b0f1bf36 102962014-04-14 Richard Biener <rguenther@suse.de>
ab20d992 10297 Marc Glisse <marc.glisse@inria.fr>
b0f1bf36
RB
10298
10299 PR c/60819
10300 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
10301 apply may-alias the scalar pointer type when applicable.
10302
3b07fa4a
IZ
103032014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
10304
10305 PR middle-end/60467
10306 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
10307 as possible argument for Cilk_spawn.
10308
cbbd2b1c
TB
103092014-04-11 Tobias Burnus <burnus@net-b.de>
10310
10311 PR c/60194
10312 * c.opt (Wformat-signedness): Add
10313 * c-format.c(check_format_types): Use it.
10314
6415bd5d
JM
103152014-04-11 Jason Merrill <jason@redhat.com>
10316
10317 PR c++/57926
10318 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
10319 default_conversion for an array argument.
10320
6525783a
MP
103212014-04-08 Marek Polacek <polacek@redhat.com>
10322
10323 PR sanitizer/60745
10324 * c-ubsan.c: Include asan.h.
10325 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
10326
880a467b
NS
103272014-04-03 Nathan Sidwell <nathan@codesourcery.com>
10328
10329 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
10330
7b59ff2d
MP
103312014-04-02 Marek Polacek <polacek@redhat.com>
10332
10333 * c-common.h (c_expand_expr): Remove declaration.
10334
8edbfaa6
JJ
103352014-03-28 Jakub Jelinek <jakub@redhat.com>
10336
10337 PR c++/60689
10338 * c-common.c (add_atomic_size_parameter): When creating new
10339 params vector, push the size argument first.
10340
07d72e1d
JJ
103412014-03-26 Jakub Jelinek <jakub@redhat.com>
10342
10343 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
10344 ubsan_instrument_vla, ubsan_instrument_return): Adjust
10345 ubsan_create_data callers.
10346
b35e0fa0
JJ
103472014-03-22 Jakub Jelinek <jakub@redhat.com>
10348
10349 PR debug/60603
10350 * c-opts.c (c_finish_options): Restore cb_file_change call to
10351 <built-in>.
10352
39a1ebb3
JJ
103532014-03-13 Jakub Jelinek <jakub@redhat.com>
10354
10355 PR middle-end/36282
10356 * c-pragma.c (apply_pragma_weak): Only look at
10357 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
10358 DECL_ASSEMBLER_NAME_SET_P (decl).
10359 (maybe_apply_pending_pragma_weaks): Exit early if
10360 vec_safe_is_empty (pending_weaks) rather than only when
10361 !pending_weaks.
10362 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
10363 set assembler name back to NULL afterwards.
10364
a07f6ed2
JM
103652014-03-11 Jason Merrill <jason@redhat.com>
10366
10367 * c.opt: Add -std=gnu++14.
10368
75b107f5
IB
103692014-03-11 Ian Bolton <ian.bolton@arm.com>
10370
10371 * c-opts.c (c_common_post_options): Don't override
10372 -ffp-contract=fast if unsafe-math-optimizations is on.
10373
f42c637e
PM
103742014-03-08 Paulo Matos <paulo@matos-sorge.com>
10375
22b15758 10376 * c.opt: Enable LTO FE for fshort-double.
f42c637e 10377
70e24808
JM
103782014-03-07 Jason Merrill <jason@redhat.com>
10379
10380 * c.opt: Add -std=c++14.
10381
3af9c5e9
MP
103822014-03-06 Marek Polacek <polacek@redhat.com>
10383
10384 PR c/60197
10385 * cilk.c (contains_cilk_spawn_stmt): New function.
10386 (contains_cilk_spawn_stmt_walker): Likewise.
10387 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
10388 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
10389
b3bdf019
JJ
103902014-03-03 Jakub Jelinek <jakub@redhat.com>
10391
10392 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
10393 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
10394 even when flag_preprocess_only.
10395
ca7e759d
JM
103962014-02-26 Jason Merrill <jason@redhat.com>
10397
10398 PR c++/59231
10399 PR c++/11586
10400 * c-common.c (shorten_compare): Don't check
10401 c_inhibit_evaluation_warnings.
10402
28e41874
JJ
104032014-02-19 Jakub Jelinek <jakub@redhat.com>
10404
cca615af
JJ
10405 PR c/37743
10406 * c-common.c (c_common_nodes_and_builtins): When initializing
10407 c_uint{16,32,64}_type_node, also set corresponding
10408 uint{16,32,64}_type_node to the same value.
10409
28e41874
JJ
10410 PR c++/60267
10411 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
10412 for PRAGMA_IVDEP if flag_preprocess_only.
10413
c2bf53a1
JJ
104142014-02-12 Jakub Jelinek <jakub@redhat.com>
10415
10416 PR c/60101
10417 * c-common.c (merge_tlist): If copy is true, call new_tlist,
10418 if false, add ADD itself, rather than vice versa.
10419 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
10420 copy. For SAVE_EXPR, only call merge_tlist once.
10421
8fcbce72
JJ
104222014-02-08 Jakub Jelinek <jakub@redhat.com>
10423
10424 PR middle-end/60092
10425 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
10426 and tree_to_uhwi.
10427 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
10428 functions.
10429 (c_common_attribute_table): Add alloc_align and assume_aligned
10430 attributes.
10431
0a756a3f
MP
104322014-02-06 Marek Polacek <polacek@redhat.com>
10433
10434 PR c/60087
10435 * c-common.c (warn_for_sign_compare): Call warning_at with location
10436 instead of warning.
10437
7ec4847a
MP
104382014-02-05 Marek Polacek <polacek@redhat.com>
10439
10440 PR c/53123
10441 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
10442 statement.
10443
66f20604
MP
104442014-02-04 Marek Polacek <polacek@redhat.com>
10445
10446 PR c/60036
10447 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
10448 SAVE_EXPR.
10449
5d77fb19
MG
104502014-02-03 Marc Glisse <marc.glisse@inria.fr>
10451
10452 PR c++/53017
10453 PR c++/59211
10454 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
10455 handle_vector_size_attribute, handle_nonnull_attribute): Call
10456 default_conversion on the attribute argument.
10457 (handle_nonnull_attribute): Increment the argument number.
10458
81e5eca8
MP
104592014-01-31 Marek Polacek <polacek@redhat.com>
10460
10461 PR c/59963
10462 * c-common.c (add_atomic_size_parameter): Pass vNULL to
10463 build_function_call_vec.
10464 (resolve_overloaded_builtin): Likewise.
10465 * c-common.h (build_function_call_vec): Adjust declaration.
10466
68fca595
MP
104672014-01-30 Marek Polacek <polacek@redhat.com>
10468
10469 PR c/59940
10470 * c-common.h (unsafe_conversion_p): Adjust declaration.
10471 (warnings_for_convert_and_check): Likewise.
10472 (convert_and_check): Likewise.
10473 * c-common.c (unsafe_conversion_p): Add location parameter. Call
10474 expansion_point_location_if_in_system_header on it.
10475 (warnings_for_convert_and_check): Add location parameter. Call
10476 expansion_point_location_if_in_system_header on it. Use it.
10477 (convert_and_check): Add location parameter. Use it.
10478 (conversion_warning): Likewise.
10479 (c_add_case_label): Adjust convert_and_check calls.
10480 (scalar_to_vector): Adjust unsafe_conversion_p calls.
10481
b72271b9
BI
104822014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
10483
10484 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
10485 flag_cilkplus.
10486 * c-pragma.c (init_pragma): Likewise.
10487 * c.opt: Likewise.
10488
393e8e8b
MP
104892014-01-23 Marek Polacek <polacek@redhat.com>
10490
10491 PR c/59846
10492 * c-common.c (shorten_compare): Add location_t parameter.
10493 * c-common.h (shorten_binary_op): Adjust declaration.
10494
f04dda30
MP
104952014-01-23 Marek Polacek <polacek@redhat.com>
10496
10497 PR c/58346
10498 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
10499 * c-common.h: Declare it.
10500
621955cb
EB
105012014-01-20 Eric Botcazou <ebotcazou@adacore.com>
10502
10503 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
10504 * c-ada-spec.c (dump_ads): Likewise.
10505 (cpp_check): Likewise.
10506 (dump_ada_specs): Likewise.
10507
105082014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
10509
10510 PR c++/49718
10511 * c-common.c (handle_no_instrument_function_attribute): Allow
10512 no_instrument_function attribute in class member
10513 definition/declaration.
10514
241f845a
JJ
105152014-01-15 Jakub Jelinek <jakub@redhat.com>
10516
10517 PR c/58943
10518 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
10519 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
10520 being COMPOUND_EXPR.
10521 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
10522 operand a SAVE_EXPR and second MODIFY_EXPR.
10523
e83b8e2e
JJ
105242014-01-09 Jakub Jelinek <jakub@redhat.com>
10525
10526 PR target/58115
10527 * c-pch.c (c_common_write_pch): Call
10528 prepare_target_option_nodes_for_pch.
10529
23a5b65a
RS
105302014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10531
10532 Update copyright years
10533
f9030485
RS
105342014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10535
10536 * array-notation-common.c, c-cilkplus.c: Use the standard form for
10537 the copyright notice.
10538
f2aa696b
EB
105392013-12-28 Eric Botcazou <ebotcazou@adacore.com>
10540
10541 * c-ada-spec.c (print_constructor): New function.
10542 (print_destructor): Retrieve the origin of the destructor.
10543 (print_ada_declaration): Revamp handling of constructors/destructors.
10544
3f8257db 105452013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
10546 Bill Maddox <maddox@google.com>
10547 Jason Merrill <jason@redhat.com>
10548
10549 * c.opt: Add -fdeclone-ctor-dtor.
10550 * c-opts.c (c_common_post_options): Default to on iff -Os.
10551
41958c28
BI
105522013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
10553
10554 * c-common.c (c_common_attribute_table): Added "cilk simd function"
10555 attribute.
10556 * c-pragma.h (enum pragma_cilk_clause): Remove.
ab20d992 10557 (enum pragma_omp_clause): Added the following fields:
41958c28
BI
10558 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
10559 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
10560 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
10561 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
10562 PRAGMA_CILK_CLAUSE_UNIFORM.
10563
b1726d6c 10564
12893402
BI
105652013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
10566
10567 * cilk.c (cilk_outline): Made this function non-static.
10568 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
10569 (create_cilk_wrapper): Added a new parameter: a function pointer.
10570 (c_install_body_w_frame_cleanup): Remove
10571 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
10572 * c-common.h (cilk_outline): New prototype.
10573 (gimplify_cilk_spawn): Removed two parameters.
10574 (cilk_install_body_with_frame_cleanup): New prototype.
10575 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
10576 CILK_SPAWN_STMT case.
10577
085b42ed
BS
105782013-12-11 Bernd Schmidt <bernds@codesourcery.com>
10579
2ce064c3
BS
10580 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
10581
085b42ed
BS
10582 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
10583 (int_array_type_node): Remove.
10584 * c-common.c (c_common_nodes_and_builtins): Don't build it.
10585
9e36c9ed
MP
105862013-12-05 Marek Polacek <polacek@redhat.com>
10587
10588 PR c/52023
10589 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
10590 [ADJUST_FIELD_ALIGN].
10591
296674db
JM
105922013-12-04 Joseph Myers <joseph@codesourcery.com>
10593
10594 PR c/52023
10595 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
10596 and check field alignment if set.
10597 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
10598 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
10599
b1726d6c 106002013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
10601 Marek Polacek <polacek@redhat.com>
10602
10603 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
10604 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
10605
d7947e19
L
106062013-11-29 H.J. Lu <hongjiu.lu@intel.com>
10607
10608 PR c/59309
10609 * cilk.c (gimplify_cilk_spawn): Properly handle function without
10610 arguments.
10611
fad7652e
JJ
106122013-11-29 Jakub Jelinek <jakub@redhat.com>
10613
10614 PR c/59280
10615 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
10616 goto invalid. If it is error_mark_node, don't issue further
10617 diagnostics.
10618
8b5e1202
SO
106192013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
10620
10621 * c.opt (Wopenmp-simd): New.
10622
0a508bb6
JJ
106232013-11-22 Jakub Jelinek <jakub@redhat.com>
10624
10625 * c-ubsan.h (ubsan_instrument_return): New prototype.
10626 * c-ubsan.c (ubsan_instrument_return): New function.
10627
2fb9a547
AM
106282013-11-22 Andrew MacLeod <amacleod@redhat.com>
10629
10630 * c-common.c: Add required include files from gimple.h.
ab20d992
JJ
10631 * c-gimplify.c: Likewise.
10632 * cilk.c: Likewise.
2fb9a547 10633
8400e75e
DM
106342013-11-22 David Malcolm <dmalcolm@redhat.com>
10635
10636 * c-common.c (unsafe_conversion_p): Remove use of
10637 EXPR_LOC_OR_HERE macro.
10638 (conversion_warning): Likewise.
10639 (warnings_for_convert_and_check): Likewise.
10640 (warn_for_collisions_1): Likewise.
10641 (shorten_compare): Likewise, and remove use of in_system_header
10642 macro, using the location from the former.
10643 * c-lex.c (dump_one_header): Remove use of input_filename macro.
10644 (cb_def_pragma): Remove use of in_system_header macro.
10645 (lex_string): Likewise.
10646 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
10647
eb1ce453
KZ
106482013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10649 Mike Stump <mikestump@comcast.net>
10650 Richard Sandiford <rdsandiford@googlemail.com>
10651
10652 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
10653 instead of TREE_INT_CST_LOW, in cases where there is a protecting
10654 tree_fits_shwi_p or tree_fits_uhwi_p.
10655 (dump_generic_ada_node): Likewise.
10656 * c-format.c (check_format_arg): Likewise.
10657 * c-pretty-print.c (pp_c_integer_constant): Likewise.
10658
6b3b8c27
KZ
106592013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10660
10661 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
10662
49b0aa18
JC
106632013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
10664
10665 PR c/53001
10666 * c-common.c (unsafe_conversion_p): Make this function
10667 return an enumeration with more detail.
10668 (conversion_warning): Use the new return type of
10669 unsafe_conversion_p to separately warn either about conversions
10670 that lower floating point number precision or about the other
10671 kinds of conversions.
10672 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
10673 (unsafe_conversion_p): switching return type to
10674 conversion_safety enumeration.
49b0aa18
JC
10675 * c.opt: Adding new warning -Wfloat-conversion and
10676 enabling it with -Wconversion.
10677
b826515a
BS
106782013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
10679
8e745a17
JJ
10680 * c-opts.c: Include plugin.h.
10681 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 10682
b9a55b13
MP
106832013-11-19 Marek Polacek <polacek@redhat.com>
10684
10685 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
10686 call.
10687 (ubsan_instrument_shift): Likewise.
10688 (ubsan_instrument_vla): Likewise.
10689
7d362f6c
RS
106902013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10691
10692 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
10693 cast to unsigned type.
10694
386b1f1f
RS
106952013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10696
10697 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
10698 tree_low_cst.
10699 (complete_array_type): Update comment to refer to tree_to_[su]hwi
10700 rather than tree_low_cst.
10701
ae7e9ddd
RS
107022013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10703
10704 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
10705 tree_to_uhwi throughout.
10706
9439e9a1
RS
107072013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10708
10709 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
10710 tree_low_cst (..., 0) with tree_to_shwi throughout.
10711
cc269bb6
RS
107122013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10713
10714 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
10715 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
10716
9541ffee
RS
107172013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10718
10719 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
10720 host_integerp (..., 0) with tree_fits_shwi_p throughout.
10721
c02065fc
AH
107222013-11-15 Aldy Hernandez <aldyh@redhat.com>
10723
10724 * c-cilkplus.c: New file.
10725 * c-common.c (readonly_error): Add location argument.
10726 * c-common.h (readonly_error): Same.
10727 (c_finish_cilk_clauses): Protoize.
10728 (c_check_cilk_loop): Same.
10729 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
10730 Do not fail on error_mark_node.
10731 Abstract increment canonicalization to here...
10732 (c_omp_for_incr_canonicalize_ptr): New.
10733 c-pragma.c (init_pragma): Register "simd" pragma.
10734 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
10735 (enum pragma_cilk_clause): New.
10736
9cc65f15
RS
107372013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
10738
10739 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
10740 wchar_type and host_integerp checks.
10741
18f429e2
AM
107422013-11-14 Andrew MacLeod <amacleod@redhat.com>
10743
10744 * c-common.c: Likewise.
10745 * c-gimplify.c: Likewise.
10746 * cilk.c: Likewise.
10747
d8a2d370
DN
107482013-11-14 Diego Novillo <dnovillo@google.com>
10749
10750 * c-common.c: Include fold-const.h.
10751 Include stor-layout.h.
10752 Include calls.h.
10753 Include stringpool.h.
10754 Include attribs.h.
10755 Include varasm.h.
10756 Include trans-mem.h.
10757 * c-cppbuiltin.c: Include stor-layout.h.
10758 Include stringpool.h.
10759 * c-format.c: Include stringpool.h.
10760 * c-lex.c: Include stringpool.h.
10761 Include stor-layout.h.
10762 * c-pragma.c: Include stringpool.h.
10763 Include attribs.h.
10764 Include varasm.h.
10765 Include gcc-symtab.h.
10766 * c-pretty-print.c: Include stor-layout.h.
10767 Include attribs.h.
10768 * cilk.c: Include stringpool.h.
10769 Include calls.h.
10770
38b7bc7f
JM
107712013-11-13 Joseph Myers <joseph@codesourcery.com>
10772
10773 * c-common.h (enum rid): Add RID_AUTO_TYPE.
10774 * c-common.c (c_common_reswords): Add __auto_type.
10775 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
10776
45b0be94
AM
107772013-11-12 Andrew MacLeod <amacleod@redhat.com>
10778
18f429e2
AM
10779 * c-common.c: Include gimplify.h.
10780 * c-gimplify.c: Likewise.
10781 * cilk.c: Likewise.
10782 * c-omp.c: Include gimple-expr.h instead of gimple.h.
10783 * c-ubsan.c: Don't include gimple.h.
45b0be94 10784
582d9b50
JM
107852013-11-12 Joseph Myers <joseph@codesourcery.com>
10786
10787 * c-common.c (c_common_reswords): Add _Thread_local.
10788
6b28e197
JM
107892013-11-09 Joseph Myers <joseph@codesourcery.com>
10790
10791 * c-common.c (atomic_size_supported_p): New function.
10792 (resolve_overloaded_atomic_exchange)
10793 (resolve_overloaded_atomic_compare_exchange)
10794 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
10795 Use it instead of comparing size with a local list of sizes.
10796
267bac10
JM
107972013-11-07 Andrew MacLeod <amacleod@redhat.com>
10798 Joseph Myers <joseph@codesourcery.com>
10799
10800 * c-common.h (enum rid): Add RID_ATOMIC.
10801 * c-common.c (c_common_reswords): Add _Atomic.
10802 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
10803 (keyword_is_type_qualifier): Accept RID_ATOMIC.
10804 * c-format.c (check_format_types): Check for extra _Atomic
10805 qualifiers in format argument.
10806 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
10807 (pp_c_type_qualifier_list): Mention _Atomic in comment.
10808
5157b91e
TB
108092013-11-06 Tobias Burnus <burnus@net-b.de>
10810
10811 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
10812
6dbe0958
JM
108132013-11-06 Joseph Myers <joseph@codesourcery.com>
10814
10815 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
10816 standards modes.
10817 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
10818 to mean lack of IEEE 754 support.
10819
e8ff5196
TB
108202013-11-05 Tobias Burnus <burnus@net-b.de>
10821
10822 * c.opt (-Wdate-time): New option
10823 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
10824
254a0760
JM
108252013-11-05 Joseph Myers <joseph@codesourcery.com>
10826
10827 * c-cppbuiltin.c (cpp_iec_559_value): Test
10828 flag_excess_precision_cmdline not flag_excess_precision.
10829
6d7f7e0a
TB
108302013-11-05 Tobias Burnus <burnus@net-b.de>
10831
10832 * c.opt (fopenmp-simd): New option.
10833 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
10834 (omp_pragmas): ... this new struct.
10835 (c_pp_lookup_pragma): Also walk omp_pragmas.
10836 (init_pragma): Init pragmas for -fopenmp-simd.
10837
55a7f02f
MP
108382013-11-04 Marek Polacek <polacek@redhat.com>
10839
10840 PR c++/58979
10841 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
10842
9193fb05
JM
108432013-11-04 Joseph Myers <joseph@codesourcery.com>
10844
10845 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
10846 New functions.
10847 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
10848
94159ecf
EB
108492013-11-04 Eric Botcazou <ebotcazou@adacore.com>
10850
10851 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
10852 (dump_ada_specs): Adjust prototype of second callback.
10853 * c-ada-spec.c (cpp_check): New global variable.
10854 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
10855 (print_generic_ada_decl): Likewise.
10856 (has_static_fields): Change return type to bool and add guard.
10857 (has_nontrivial_methods): New predicate.
10858 (is_tagged_type): Change return type to bool.
10859 (separate_class_package): Call has_nontrivial_methods.
10860 (pp_ada_tree_identifier): Minor tweaks.
10861 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
10862 (dump_ada_array_domains): Likewise.
10863 (dump_ada_array_type): Likewise.
10864 (dump_template_types): Remove cpp_check parameter and do not pass it to
10865 dump_generic_ada_node.
10866 (dump_ada_template): Likewise.
10867 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
10868 recursively.
10869 (print_ada_methods): Change return type to integer. Remove cpp_check
10870 parameter and do not pass it down.
10871 (dump_nested_types): Remove cpp_check parameter and do not pass it to
10872 dump_generic_ada_node.
10873 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
10874 accessing methods.
10875 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
10876 down. Use has_nontrivial_methods to recognize C++ classes. Use return
10877 value of print_ada_methods.
10878 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
10879 Set cpp_check to it before invoking dump_ada_nodes.
10880 (dump_ada_specs): Likewise.
10881
b906f4ca
MP
108822013-11-03 Marek Polacek <polacek@redhat.com>
10883
10884 * c-ubsan.c: Don't include hash-table.h.
10885 (ubsan_instrument_vla): New function.
10886 * c-ubsan.h: Declare it.
10887
5e20cdc9
DM
108882013-10-31 David Malcolm <dmalcolm@redhat.com>
10889
10890 Automated part of renaming of symtab_node_base to symtab_node.
10891
10892 Patch autogenerated by rename_symtab.py from
10893 https://github.com/davidmalcolm/gcc-refactoring-scripts
10894 revision 58bb219cc090b2f4516a9297d868c245495ee622
10895
10896 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
10897 symtab_node_base to symtab_node.
10898
7057e645
ESR
108992013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
10900
8e745a17 10901 Implement C++14 digit separators.
7057e645
ESR
10902 * c-lex.c (interpret_float): Remove digit separators from scratch string
10903 before building real literal.
10904
193ea7bc
JJ
109052013-10-30 Jakub Jelinek <jakub@redhat.com>
10906
10907 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
10908
939b37da
BI
109092013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
10910
10911 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
10912 fields.
10913 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
10914 enabled.
10915 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
10916 (insert_cilk_frame): New prototype.
10917 (cilk_init_builtins): Likewise.
10918 (gimplify_cilk_spawn): Likewise.
10919 (c_cilk_install_body_w_frame_cleanup): Likewise.
10920 (cilk_detect_spawn_and_unwrap): Likewise.
10921 (cilk_set_spawn_marker): Likewise.
10922 (build_cilk_sync): Likewise.
10923 (build_cilk_spawn): Likewise.
10924 * cilk.c: New file.
10925
67348ccc
DM
109262013-10-29 David Malcolm <dmalcolm@redhat.com>
10927
10928 Patch autogenerated by refactor_symtab.py from
10929 https://github.com/davidmalcolm/gcc-refactoring-scripts
10930 revision 58bb219cc090b2f4516a9297d868c245495ee622
10931
10932 * c-gimplify.c (c_genericize): Update for conversion of symtab types
10933 to a true class hierarchy.
10934 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
10935
d570872d
RS
109362013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
10937
10938 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
10939
98906124
JL
109402013-10-26 Jeff Law <law@redhat.com>
10941
adfac8df
JJ
10942 * c-common.c (c_define_builtins): Remove mudflap support.
10943 * c.opt: Ignore and warn for mudflap options.
98906124 10944
d73749df 109452013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
10946
10947 PR other/33426
10948 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
10949 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
10950
3f04b1bb
JM
109512013-10-23 Jason Merrill <jason@redhat.com>
10952
10953 * c-format.c (gcc_cxxdiag_char_table): Add %X.
10954
acf0174b
JJ
109552013-10-11 Jakub Jelinek <jakub@redhat.com>
10956
acd15a28
JJ
10957 * c-common.h (omp_clause_mask::operator !=): New method.
10958 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
10959 instead of if (mask & something) tests everywhere.
10960
acf0174b
JJ
10961 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
10962 201307 instead of 201107.
10963 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
10964 (c_common_attribute_table): Add "omp declare target" and
10965 "omp declare simd" attributes.
10966 (handle_omp_declare_target_attribute,
10967 handle_omp_declare_simd_attribute): New functions.
10968 * c-omp.c: Include c-pragma.h.
10969 (c_finish_omp_taskgroup): New function.
10970 (c_finish_omp_atomic): Add swapped argument, if true,
10971 build the operation first with rhs, lhs arguments and use NOP_EXPR
10972 build_modify_expr.
10973 (c_finish_omp_for): Add code argument, pass it down to make_code.
10974 (c_omp_split_clauses): New function.
10975 (c_split_parallel_clauses): Removed.
10976 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
10977 c_omp_declare_simd_clauses_to_decls): New functions.
10978 * c-common.h (omp_clause_mask): New type.
10979 (OMP_CLAUSE_MASK_1): Define.
10980 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
10981 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
10982 omp_clause_mask::operator |, omp_clause_mask::operator &,
10983 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
10984 omp_clause_mask::operator ==): New methods.
10985 (enum c_omp_clause_split): New.
10986 (c_finish_omp_taskgroup): New prototype.
10987 (c_finish_omp_atomic): Add swapped argument.
10988 (c_finish_omp_for): Add code argument.
10989 (c_omp_split_clauses): New prototype.
10990 (c_split_parallel_clauses): Removed.
10991 (c_omp_declare_simd_clauses_to_numbers,
10992 c_omp_declare_simd_clauses_to_decls): New prototypes.
10993 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
10994 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
10995 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
10996 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
10997 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
10998 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
10999 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
11000 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
11001 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
11002 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
11003 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
11004 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
11005 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
11006 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
11007 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
11008 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
11009 PRAGMA_OMP_CLAUSE_UNIFORM.
11010
826cacfe
MG
110112013-10-09 Marc Glisse <marc.glisse@inria.fr>
11012
11013 PR tree-optimization/20318
11014 * c-common.c (handle_returns_nonnull_attribute): New function.
11015 (c_common_attribute_table): Add returns_nonnull.
11016
2284b034
MG
110172013-10-03 Marc Glisse <marc.glisse@inria.fr>
11018
11019 PR c++/19476
11020 * c.opt (fcheck-new): Move to common.opt.
11021
b56e9788
MP
110222013-09-25 Marek Polacek <polacek@redhat.com>
11023 Jakub Jelinek <jakub@redhat.com>
11024
11025 PR sanitizer/58413
11026 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
11027 an expression if we can prove it is correct.
11028 (ubsan_instrument_division): Likewise. Remove unnecessary
11029 check.
11030
ce6923c5
MP
110312013-09-18 Marek Polacek <polacek@redhat.com>
11032
11033 PR sanitizer/58411
11034 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
11035 Declare it.
11036 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
11037
fb5610fb
IS
110382013-09-14 Iain Sandoe <iain@codesourcery.com>
11039
11040 PR target/48094
11041 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
11042 fobjc-gc, freplace-objc-classes): Accept for LTO.
11043
88b0e79e
JC
110442013-09-13 Jacek Caban <jacek@codeweavers.com>
11045
11046 * c-target.def: New hook
11047
c9b0866a
PC
110482013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
11049
11050 PR c++/43452
11051 * c.opt (Wdelete-incomplete): Add.
11052
0af94e6f
JR
110532013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
11054
11055 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
11056 (vector_types_compatible_elements_p): New function.
11057 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
11058 declaration.
11059 (vector_types_compatible_elements_p): Declare.
11060
7c26172c
GDR
110612013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
11062
11063 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
11064 a virtual member function.
11065 (pp_simple_type_specifier): Remove.
11066 (pp_c_type_specifier): Likewise.
11067 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
11068 Rename from pp_c_type_specifier. Adjust.
11069 (c_pretty_printer::c_pretty_printer): Do not assign to
11070 simple_type_specifier.
11071
20059c8b
GDR
110722013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11073
11074 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
11075 member function.
11076 (c_pretty_printer::storage_class_specifier): Likewise.
11077 (c_pretty_printer::initializer): Likewise.
11078 (pp_declaration): Remove.
11079 (pp_declaration_specifiers): Likewise.
11080 (pp_abstract_declarator): Likewise.
11081 (pp_declarator): Likewise.
11082 (pp_type_id): Likewise.
11083 (pp_statement): Likewise.
11084 (pp_constant): Likewise.
11085 (pp_id_expression): Likewise.
11086 (pp_primary_expression): Likewise.
11087 (pp_unary_expression): Likewise.
11088 (pp_multiplicative_expression): Likewise.
11089 (pp_conditional_expression): Likewise.
11090 (pp_assignment_expression): Likewise.
11091 (pp_expression): Likewise.
11092 (pp_c_type_id): Likewise.
11093 (pp_c_storage_class_specifier): Likewise.
11094 * c-pretty-print.c (pp_c_type_cast): Tidy.
11095 (pp_c_pointer): Likewise.
11096 (pp_c_type_specifier): Likewise.
11097 (pp_c_parameter_type_list): Likewise.
11098 (pp_c_function_definition): Likewise.
11099 (pp_c_init_declarator): Likewise.
11100 (pp_c_initializer_list): Likewise.
11101 (pp_c_constructor_elts): Likewise.
11102 (c_pretty_printer::direct_abstract_declarator): Likewise.
11103 (c_pretty_printer::declaration_specifiers): Likewise.
11104 (c_pretty_printer::primary_expression): Likewise.
11105 (c_pretty_printer::postfix_expression): Likewise.
11106 (c_pretty_printer::type_id): Rename from pp_c_type_id.
11107 (c_pretty_printer::storage_class_specifier): Rename from
11108 pp_c_storage_class_specifier.
11109 (c_pretty_printer::initializer): Rename from pp_c_initializer.
11110 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
11111 storage_class_specifier, initializer, offset_list, flags.
11112
de5a5fa1
MP
111132013-08-30 Marek Polacek <polacek@redhat.com>
11114
11115 * c-ubsan.c: New file.
11116 * c-ubsan.h: New file.
11117
8f0e4d72
GDR
111182013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
11119
11120 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
11121 member function.
11122 (c_pretty_printer::declaration_specifiers): Likewise.
11123 (c_pretty_printer::declarator): Likewise.
11124 (c_pretty_printer::abstract_declarator): Likewise.
11125 (c_pretty_printer::direct_abstract_declarator): Likewise.
11126 (c_pretty_printer::direct_declarator): Likewise.
11127 (c_pretty_printer::function_specifier): Likewise.
11128 (pp_declaration): Adjust.
11129 (pp_declaration_specifiers): Likewise.
11130 (pp_abstract_declarator): Likewise.
11131 (pp_direct_declarator): Likewise.
11132 (pp_function_specifier): Likewise.
11133 (pp_direct_abstract_declarator): Remove as unused.
11134 (pp_c_declaration): Remove.
11135 (pp_c_declaration_specifiers): Likewise.
11136 (pp_c_declarator): Likewise.
11137 (pp_c_direct_declarator): Likewise.
11138 (pp_c_function_specifier): Likewise.
11139 (pp_c_direct_abstract_declarator): Likewise.
11140 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
11141 from pp_c_abstract_declarator. Adjust.
ab20d992 11142 (c_pretty_printer::direct_abstract_declarator): Rename from
8f0e4d72
GDR
11143 pp_c_direct_abstract_declarator. Adjust.
11144 (c_pretty_printer::function_specifier): Rename from
11145 pp_c_function_specifier. Adjust.
11146 (c_pretty_printer::declaration_specifiers): Rename from
11147 pp_c_declaration_specifiers. Adjust.
11148 (c_pretty_printer::direct_declarator): Rename from
11149 pp_c_direct_declarator. Adjust.
11150 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
11151 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
11152 (c_pretty_printer::c_pretty_printer): Do not assign to
11153 declaration, declaration_specifiers, declarator,
11154 direct_declarator, direct_abstract_declarator, function_specifier.
11155
00d34d3a
GDR
111562013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
11157
11158 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
11159 virtual member function.
11160 (c_pretty_printer::multiplicative_expression): Likewise.
11161 (c_pretty_printer::conditional_expression): Likewise.
11162 (c_pretty_printer::assignment_expression): Likewise.
11163 (c_pretty_printer::expression): Likewise.
11164 (pp_unary_expression): Adjust.
11165 (pp_multiplicative_expression): Likewise.
11166 (pp_assignment_expression): Likewise.
11167 (pp_conditional_expression): Likewise.
11168 (pp_expression): Likewise.
11169 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
11170 from pp_c_unary_expression. Adjust.
11171 (c_pretty_printer::multiplicative_expression): Rename from
11172 pp_c_multiplicative_expression. Adjust.
11173 (c_pretty_printer::conditional_expression): Rename from
11174 pp_c_conditional_expression. Adjust.
11175 (c_pretty_printer::assignment_expression): Rename from
11176 pp_c_assignment_expression. Adjust.
11177 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
11178 (c_pretty_printer::c_pretty_printer): Do not assign to
11179 unary_expression, multiplicative_expression,
11180 conditional_expression, expression.
11181
fb22178f
GDR
111822013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11183
11184 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
11185 virtual member function.
11186 (pp_postfix_expression): Adjust.
11187 (pp_c_postfix_expression): Remove.
11188 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
11189 from pp_c_postfix_expression. Adjust.
11190 (c_pretty_printer::c_pretty_printer): Do not assign to
11191 postfix_expression.
11192
7ecc2600
GDR
111932013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11194
11195 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
11196 virtua member function.
11197 (pp_primary_expression): Adjust.
11198 (pp_c_primary_expression): Remove.
11199 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
11200 from pp_c_primary_expression. Adjust.
11201 (pp_c_initializer_list): Use pp_primary_expression.
11202 (c_pretty_printer::c_pretty_printer): Do not assign to
11203 primary_expression.
11204
0691175f
GDR
112052013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11206
11207 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
11208 * c-pretty-print.c (M_): Remove.
11209 (c_pretty_printer::translate_string): Define.
11210 (pp_c_type_specifier): Use it.
11211 (pp_c_primary_expression): Likewise.
11212 (pp_c_expression): Likewise.
11213
66dfe4c4
GDR
112142013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
11215
11216 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
11217 virtual function.
11218 (pp_c_id_expression): Remove.
11219 (pp_id_expression): Adjust.
11220 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
11221 pp_c_id_expression. Adjust.
11222 (pp_c_postfix_expression): Use pp_id_expression.
11223 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
11224
ca43e9d5
GDR
112252013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
11226
11227 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
11228 member function.
11229 (pp_constant): Adjust.
11230 (pp_c_constant): Remove.
11231 * c-pretty-print.c (c_pretty_printer::constant): Rename from
11232 pp_c_constant. Adjust.
11233 (pp_c_constant)
11234 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
11235 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
11236
da6ca2b5
GDR
112372013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
11238
11239 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
11240 (c_pretty_printer::c_pretty_printer): Declare.
11241 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
11242 c_pretty_printer_init. Adjust.
11243 (print_c_tree): Do not call c_pretty_printer_init.
11244 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
11245
65a372f4
AC
112462013-08-09 Arnaud Charlet <charlet@adacore.com>
11247
11248 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
11249
fd9b0f32
PC
112502013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
11251
11252 PR c++/58080
11253 * c-common.c (pointer_int_sum): Add bool parameter.
11254 * c-common.h (pointer_int_sum): Adjust declaration.
11255
e0aec1e9
GDR
112562013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
11257
11258 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
11259 c_pretty_printer variable.
11260
b066401f
GDR
112612013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
11262
11263 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
11264 (pp_base): Remove.
11265 (pp_c_base): Likewise. Adjust users.
11266 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
11267 (pp_c_whitespace): Do not call pp_base.
11268 (pp_c_left_paren): Likewise.
11269 (pp_c_right_paren): Likewise.
11270 (pp_c_left_brace): Likewise.
11271 (pp_c_right_brace): Likewise.
11272 (pp_c_left_bracket): Likewise.
11273 (pp_c_right_bracket): Likewise.
11274 (pp_c_dot): Likewise.
11275 (pp_c_ampersand): Likewise.
11276 (pp_c_star): Likewise.
11277 (pp_c_arrow): Likewise.
11278 (pp_c_semicolon): Likewise.
11279 (pp_c_complement): Likewise.
11280 (pp_c_exclamation): Likewise.
11281 (pp_c_direct_declarator): Likewise.
11282 (pp_c_ws_string): Likewise.
11283 (pp_c_identifier): Likewise.
11284 (pp_c_statement): Likewise.
11285 (print_c_tree): Likewise.
11286
65e5a578
ESR
112872013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
11288
11289 PR c++/58072
11290 * c-common.c (c_parse_error): Catch user-defined literal tokens and
11291 provide useful error strings.
11292
137a1a27
GDR
112932013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11294
11295 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
11296 printer functions instead of pp_string or operators and punctuators.
11297 (dump_generic_ada_node): Likewise.
11298 * c-pretty-print.c (pp_c_type_specifier): Likewise.
11299 (pp_c_relational_expression): Likewise.
11300 (pp_c_logical_or_expression): Likewise.
11301
07838b13
GDR
113022013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11303
11304 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
11305 functions instead of pp_character.
11306 (pp_ada_tree_identifier): Likewise.
11307 (dump_ada_double_name): Likewise.
11308 (dump_ada_function_declaration): Likewise.
11309 (dump_ada_array_domains): Likewise.
11310 (dump_template_types): Likewise.
11311 (dump_generic_ada_node): Likewise.
11312 (print_ada_declaration): Likewise.
11313 (print_ada_struct_decl): Likewise.
11314 * c-pretty-print.c (pp_c_integer_constant): Likewise.
11315
433cc7b0
TT
113162013-07-23 Tom Tromey <tromey@redhat.com>
11317
11318 * c-common.h (enum rid) <RID_GENERIC>: New constant.
11319 * c-common.c (c_common_reswords): Add _Generic.
11320
688010ba
OB
113212013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
11322
11323 * c-common.c: Fix typos.
11324 * c-common.h: Likewise.
11325
2a99e5e6
LL
113262013-07-13 Lubos Lunak <l.lunak@suse.cz>
11327
11328 PR c++/55203
11329 * c-common.c (c_common_attribute_table): Add warn_unused.
11330 (handle_warn_unused_attribute): New.
11331
c26302d5
JJ
113322013-07-10 Jakub Jelinek <jakub@redhat.com>
11333
11334 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
11335 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
11336
dfeadaa0
PC
113372013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
11338
11339 PR c++/57869
11340 * c.opt: Add Wconditionally-supported.
11341
6a2fa4b2
GS
113422013-07-08 Graham Stott <graham.stott@btinternet.com>
11343
adfac8df 11344 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
11345 unused variables l_length and l_node.
11346
ecdbd01a 113472013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
11348
11349 PR c/57821
11350 * c-common.c (complete_array_type): Delay folding first index
11351 like other indices. When folding, check for index overflow.
11352
bedc293e
MG
113532013-06-27 Marc Glisse <marc.glisse@inria.fr>
11354
11355 PR c++/57509
11356 * c-common.h (c_build_vec_perm_expr): New complain argument.
11357 * c-common.c (c_build_vec_perm_expr): Likewise.
11358 Use save_expr also in C++.
11359
604b2bfc
GDR
113602013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
11361
11362 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
11363 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
11364 * c-opts.c (c_common_post_options): Likewise.
11365
dfeadaa0 113662013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
11367
11368 * array-notation-common.c (length_mismatch_in_expr): Changed the
11369 parameter type's from a dynamic array to a vec_tree. Also removed
11370 the size parameters.
11371 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
11372 the change above.
11373
2ce86d2e
BI
113742013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
11375
11376 * c-common.h (struct cilkplus_an_parts): New structure.
11377 (struct cilkplus_an_loop_parts): Likewise.
11378 (cilkplus_extract_an_triplets): New prototype.
11379 (fix_sec_implicit_args): Likewise.
11380 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
11381 (fix_sec_implicit_args): Likewise.
604b2bfc 11382
07a6825b
BI
113832013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
11384
11385 * array-notation-common.c (find_inv_trees): Removed an unwanted
11386 typecasting.
11387 * c-common.h (struct inv_list::additional_tcodes): Changed type from
11388 enum rid to enum tree_code.
11389
08346abd
JH
113902013-06-11 Jan Hubicka <jh@suse.cz>
11391
11392 * c-common.c (handle_alias_ifunc_attribute): Do not set
11393 DECL_EXTERNAL for weakref variables.
11394 * c-pragma.c (handle_pragma_weak): Make sure aliases
11395 are not declared as external.
11396
d60f1706
BI
113972013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
11398
11399 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
11400 function from c/c-array-notation.c.
11401 (is_cilkplus_reduce_builtin): Likewise.
11402 (find_rank): Likewise.
11403 (extract_array_notation_exprs): Likewise.
11404 (replace_array_notations): Likewise.
11405 (find_inv_trees): Likewise.
11406 (replace_inv_trees): Likewise.
11407 (contains_array_notation_expr): Likewise.
11408 (find_correct_array_notation_type): Likewise.
11409 * c-common.h (struct inv_list): Moved this struct from the file
11410 c/c-array-notation.c and added a new field called additional tcodes.
11411 (length_mismatch_in_expr_p): New prototype.
11412 (is_cilkplus_reduce_builtin): Likewise.
11413 (find_rank): Likewise.
11414 (extract_array_notation_exprs): Likewise.
11415 (replace_array_notation): Likewise.
11416 (find_inv_trees): Likewise.
11417 (replace_inv_trees): Likewise.
11418 (find_correct_array_notation_type): Likewise.
dfeadaa0 11419
36536d79
BI
114202013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
11421
11422 * c-common.c (c_define_builtins): When cilkplus is enabled, the
11423 function array_notation_init_builtins is called.
11424 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
11425 * c-common.def (ARRAY_NOTATION_REF): New tree.
11426 * c-common.h (build_array_notation_expr): New function declaration.
11427 (build_array_notation_ref): Likewise.
11428 (extract_sec_implicit_index_arg): New extern declaration.
11429 (is_sec_implicit_index_fn): Likewise.
11430 (ARRAY_NOTATION_CHECK): New define.
11431 (ARRAY_NOTATION_ARRAY): Likewise.
11432 (ARRAY_NOTATION_START): Likewise.
11433 (ARRAY_NOTATION_LENGTH): Likewise.
11434 (ARRAY_NOTATION_STRIDE): Likewise.
11435 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
11436 ARRAY_NOTATION_REF.
11437 (pp_c_expression): Likewise.
11438 * c.opt (flag_enable_cilkplus): New flag.
11439 * array-notation-common.c: New file.
11440
f7716d57
JJ
114412013-05-14 Jakub Jelinek <jakub@redhat.com>
11442
11443 PR c++/57274
11444 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
11445
a5e0cd1d
MG
114462013-05-10 Marc Glisse <marc.glisse@inria.fr>
11447
11448 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
11449 vectors.
11450
f6bc1c4a
HS
114512013-05-07 Han Shen <shenhan@google.com>
11452
11453 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
11454
3f12f6e9
SKS
114552013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
11456
11457 * c-common.c (check_user_alignment): Emit error for negative values.
11458
61949153
PC
114592013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11460
11461 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
11462
e93e18e9
PC
114632013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11464
11465 * c-cppbuiltin.c (c_cpp_builtins): Do not define
11466 __GXX_EXPERIMENTAL_CXX1Y__.
11467
44d90fe1 114682013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 11469 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
11470
11471 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
11472 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
11473 to simply use OPT_Wpointer_arith.
11474 (c_sizeof_or_alignof_type): Likewise.
11475
13f39b2e
PC
114762013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11477
11478 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
11479
4b84d650
JJ
114802013-04-12 Jakub Jelinek <jakub@redhat.com>
11481
11482 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
11483 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
11484 specifiers.
11485
fb037b5d
SB
114862013-04-07 Steven Bosscher <steven@gcc.gnu.org>
11487
11488 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
11489
4e856798
PC
114902013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
11491
11492 * c-common.c (pointer_int_sum): Remove dead code.
11493
4b1baac8
RS
114942013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
11495
11496 PR middle-end/56524
11497 * c-common.c (handle_optimize_attribute): Don't call
11498 save_optabs_if_changed.
11499
0b50e654
JJ
115002013-03-05 Jakub Jelinek <jakub@redhat.com>
11501
11502 PR middle-end/56461
11503 * c-pch.c (pch_init): Free target_validity at the end.
11504
48c41403
JJ
115052013-03-04 Jakub Jelinek <jakub@redhat.com>
11506
11507 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
11508
e664c61c
KS
115092013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
11510 Jakub Jelinek <jakub@redhat.com>
11511
11512 PR sanitizer/56454
11513 * c-common.c (handle_no_sanitize_address_attribute): New function.
11514 (c_common_attribute_table): Add no_sanitize_address attribute.
11515 (handle_no_address_safety_analysis_attribute): Add
11516 no_sanitize_address attribute, not no_address_safety_analysis
11517 attribute.
11518
a475fd3d 115192013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
11520
11521 PR target/52555
11522 * c-common.c (handle_optimize_attribute): Call
11523 save_optabs_if_changed.
11524
f6007d99
JJ
115252013-02-18 Jakub Jelinek <jakub@redhat.com>
11526 Steven Bosscher <steven@gcc.gnu.org>
11527
11528 PR pch/54117
11529 * c-opts.c (c_common_post_options): If debug info is enabled
11530 and non-dwarf*, refuse to load PCH files and when writing PCH
11531 file warn.
11532
cf35e2b1
JJ
115332013-02-05 Jakub Jelinek <jakub@redhat.com>
11534
11535 PR middle-end/56167
11536 * c-common.c (handle_error_attribute): Fix condition.
11537
32887460
JJ
115382013-01-30 Jakub Jelinek <jakub@redhat.com>
11539
11540 PR c++/55742
11541 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
11542
5af057d8
JM
115432013-01-18 Jason Merrill <jason@redhat.com>
11544
11545 PR target/54908
11546 * c.opt (-fextern-tls-init): New.
11547 * c-opts.c (c_common_post_options): Handle it.
11548
cc83c823
JJ
115492013-01-09 Jakub Jelinek <jakub@redhat.com>
11550
11551 PR c/48418
11552 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
11553 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
11554 and is either negative or bigger or equal to type precision
11555 of the first operand.
11556
a859517f
MP
115572012-12-03 Marek Polacek <polacek@redhat.com>
11558
11559 PR c/55570
11560 * c-common.c (check_user_alignment): Swap order of tests,
11561 check TREE_CODE first.
11562
2d7aa578
ESR
115632012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
11564
11565 PR c++/52654
11566 * c-common.h (overflow_type): New enum.
11567 (build_userdef_literal): Add overflow_type argument.
11568 (tree_userdef_literal): Add overflow_type.
11569 (USERDEF_LITERAL_OVERFLOW): New access macro.
11570 * c-common.c (build_userdef_literal): Add overflow_type
11571 argument.
11572 * c-lex.c (c_lex_with_flags): Add overflow_type to
11573 build_userdef_literal calls.
11574 (interpret_integer, interpret_float): Add overflow_type argument.
11575
cc3c4f62
RB
115762012-11-28 Richard Biener <rguenther@suse.de>
11577
11578 PR c/35634
11579 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
11580 here and use a type with proper overflow behavior for types that would
11581 need to be promoted for the arithmetic.
11582
77bc5132
JJ
115832012-11-23 Jakub Jelinek <jakub@redhat.com>
11584
11585 PR sanitizer/55435
11586 * c-common.c (handle_no_address_safety_analysis_attribute): New
11587 function.
11588 (c_common_attribute_table): Add no_address_safety_analysis.
11589
5dc99c46
SB
115902012-11-16 Simon Baldwin <simonb@google.com>
11591
11592 * c.opt: Add f[no-]canonical-system-headers.
11593 * c-opts.c (c_common_handle_option): Handle
11594 OPT_fcanonical_system_headers.
11595
a4a0016d
ESR
115962012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
11597
11598 PR c++/54413
11599 * c-opts.c (c_common_handle_option): Set new flags.
11600 * c.opt: Describe new flags.
11601
7dbb85a7
JM
116022012-11-09 Jason Merrill <jason@redhat.com>
11603
11604 * c.opt (Wabi-tag): New.
11605
ad7bac31
AK
116062012-11-09 Andi Kleen <ak@linux.intel.com>
11607
11608 PR 55139
11609 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 11610 MEMMODEL_MASK
ad7bac31 11611
7332899a
MLI
116122012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11613
11614 PR c/53063
11615 * c.opt (Wformat): Make it Alias Wformat=1.
11616 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
11617 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
11618 LangEnabledBy.
11619 (Wformat=): RejectNegative. Use LangEnabledBy.
11620 (Wnonnull): Use LangEnabledBy.
11621 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
11622 * c-format.c (set_Wformat): Delete.
11623 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
ab20d992
JJ
11624 (maybe_read_dollar_number): Likewise.
11625 (avoid_dollar_number): Likewise.
11626 (finish_dollar_format_checking): Likewise.
11627 (check_format_info): Likewise.
11628 (check_format_info_main): Likewise.
11629 (check_format_types): Likewise.
11630 (format_type_warning): Likewise.
11631 * c-common.c (int): Likewise.
11632 (check_function_sentinel): Likewise.
8e745a17 11633 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 11634
34a180a6
MLI
116352012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11636
11637 PR c/53063
11638 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
11639 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
11640 Use LangEnabledBy.
11641 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
11642 common.opt.
11643 (Wvariadic-macros): Init(1).
11644 * c-opts.c (c_common_handle_option): Do not handle them
11645 explicitly.
11646 (c_common_post_options): Likewise.
11647 (sanitize_cpp_opts): warn_unused_macros is now
11648 cpp_warn_unused_macros.
11649 (push_command_line_include): Likewise.
11650 * c-common.c (warn_unknown_pragmas): Do not define.
11651 * c-common.h (warn_unknown_pragmas): Do not declare.
11652
3f46d6a5
MLI
116532012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11654
11655 PR c/51294
11656 * c-common.c (conversion_warning): Handle conditional expressions.
11657
880661a4
JW
116582012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
11659
11660 PR c++/54930
11661 * c.opt (Wreturn_local_addr): Define new option.
11662
4514a96b
JM
116632012-10-25 Jason Merrill <jason@redhat.com>
11664
f14edc1a
JM
11665 * c.opt (Wvirtual-move-assign): New.
11666
4514a96b
JM
11667 * c.opt (Winherited-variadic-ctor): New.
11668
93100c6b
MG
116692012-10-25 Marc Glisse <marc.glisse@inria.fr>
11670
11671 PR c++/54427
11672 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
11673
1efcb8c6
JM
116742012-10-23 Joseph Myers <joseph@codesourcery.com>
11675
11676 * c-common.h (pch_cpp_save_state): Declare.
11677 * c-target.def (c_preinclude): New hook.
11678 * c-opts.c (done_preinclude): New.
11679 (push_command_line_include): Handle default preincluded header.
11680 (cb_file_change): Call pch_cpp_save_state when calling
11681 push_command_line_include.
11682 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
11683 (pch_cpp_save_state): New.
11684 (pch_init): Call pch_cpp_save_state conditionally, instead of
11685 calling cpp_save_state.
11686
4a0ae68e
MLI
116872012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
11688
11689 PR c/53063
11690 PR c/40989
11691 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
11692 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
11693 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
11694 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
11695 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
11696 * c-opts.c (c_common_handle_option): Remove explicit handling from
11697 here.
11698 (c_common_post_options): Likewise.
11699
67e4210b
EB
117002012-10-18 Eric Botcazou <ebotcazou@adacore.com>
11701
11702 * c-ada-spec.c (LOCATION_COL): Delete.
11703 (compare_location): New function.
11704 (compare_node): Use it.
11705 (compare_comment): Likewise.
11706
65d4f2cd
MLI
117072012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
11708
11709 PR c/53063
11710 PR c/40989
11711 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
11712 * c-opts.c (c_common_handle_option): Do not set them here. Add
11713 comment.
11714 (c_common_post_options): Likewise.
11715
909881cb
EB
117162012-10-16 Eric Botcazou <ebotcazou@adacore.com>
11717
11718 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
11719 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
11720 Remove POINTER_TYPE handling, add large unsigned handling and use
11721 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
11722
3a785c97
JJ
117232012-10-12 Jakub Jelinek <jakub@redhat.com>
11724
11725 PR c/54381
11726 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
11727 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
11728 locs and array of 3 trees instead of just single loc and single
11729 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
11730 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
11731 For *cmp* builtins that take two sources strings report warnings
11732 about first and second source, not about destination and source.
11733
5e54f81d
MG
117342012-10-12 Marc Glisse <marc.glisse@inria.fr>
11735
11736 PR c++/53055
11737 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
11738
f5b02f1e
EB
117392012-10-11 Eric Botcazou <ebotcazou@adacore.com>
11740
11741 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
11742 declaring something coming from another file.
11743
b46dbc6c
AC
117442012-10-10 Arnaud Charlet <charlet@adacore.com>
11745
f5b02f1e 11746 PR ada/54845
b46dbc6c
AC
11747 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
11748
5d9de0d0
PC
117492012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
11750
11751 PR c++/54194
11752 * c-common.c (warn_about_parentheses): Add location_t parameter;
11753 use EXPR_LOC_OR_LOC.
11754 * c-common.h: Update declaration.
11755
a212e43f
MG
117562012-10-09 Marc Glisse <marc.glisse@inria.fr>
11757
11758 PR c++/54427
11759 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
11760 more operations. Make error messages optional.
11761 * c-common.h (enum stv_conv): Moved from c-typeck.c.
11762 (scalar_to_vector): Declare.
11763
b1db7f91
JM
117642012-10-08 Jason Merrill <jason@redhat.com>
11765
11766 * c-common.c (c_common_reswords): Add thread_local.
11767
e28d52cf
DS
117682012-10-08 Dodji Seketeli <dodji@redhat.com>
11769
11770 PR c++/53528 C++11 attribute support
11771 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
11772 new functions.
11773 * c-common.c (check_cxx_fundamental_alignment_constraints): New
11774 static function.
11775 (handle_aligned_attribute): In choose strictest alignment
11776 among many. Use new check_cxx_fundamental_alignment_constraints.
11777 (handle_transparent_union_attribute): In c++11 attribute syntax,
11778 don't look through typedefs.
11779
3b78de56
AC
117802012-10-04 Arnaud Charlet <charlet@adacore.com>
11781
11782 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
11783 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
11784 out of dumpfile.h.
11785
6040bb5f
DC
117862012-09-25 Dehao Chen <dehao@google.com>
11787
11788 PR middle-end/54645
3b78de56 11789 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
11790 map when read in the pch.
11791
3f8257db 117922012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
11793
11794 * c-ada-spec.c: Style fixes.
11795
3f8257db 117962012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
11797
11798 * c.opt (-fada-spec-parent): Define new command line switch.
11799 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
11800 is specified, generate binding spec as a child of the specified unit.
11801
0ccb505d
PC
118022012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
11803 Manuel López-Ibáñez <manu@gcc.gnu.org>
11804
11805 PR c++/53210
11806 * c.opt ([Winit-self]): Enabled by -Wall in C++.
11807
c583af79
AC
118082012-08-23 Arnaud Charlet <charlet@adacore.com>
11809
11810 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
11811 for pointers, and add missing Convention C pragma.
11812 (print_ada_struct_decl): Add missing aliased keyword.
11813 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
11814
1a4049e7
JJ
118152012-08-17 Jakub Jelinek <jakub@redhat.com>
11816
11817 * c-common.c (sizeof_pointer_memaccess_warning): New function.
11818 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
11819 * c-opts.c (c_common_handle_option): Enable it for -Wall.
11820 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
11821 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
11822
70b5e7dc
RG
118232012-08-10 Richard Guenther <rguenther@suse.de>
11824
11825 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
11826
f8923f7e
SB
118272012-08-07 Steven Bosscher <steven@gcc.gnu.org>
11828
11829 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
11830 instead of separate pp_newline and pp_flush.
11831 (print_c_tree): Likewise.
11832
e45abe1f
RH
118332012-07-26 Richard Henderson <rth@redhat.com>
11834
11835 * c-common.c (handle_hot_attribute): Allow labels.
11836 (handle_cold_attribute): Likewise.
11837
332f1d24
JJ
118382012-07-20 Jakub Jelinek <jakub@redhat.com>
11839
11840 PR c++/28656
11841 * c-common.c (check_function_nonnull): Handle multiple nonnull
11842 attributes properly.
11843
7ee2468b
SB
118442012-07-16 Steven Bosscher <steven@gcc.gnu.org>
11845
11846 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
11847 * c-ada-spec.c: Likewise.
11848 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
11849
ee7b28eb
SB
118502012-07-14 Steven Bosscher <steven@gcc.gnu.org>
11851
11852 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
11853 Remove code conditional on it.
11854
6bdf3519
SB
118552012-07-11 Steven Bosscher <steven@gcc.gnu.org>
11856
11857 * c-gimplify.c: Do not include basic-block.h.
11858 * c-common.c: Do not include linfuncs.h.
11859
532aafad
SB
118602012-07-08 Steven Bosscher <steven@gcc.gnu.org>
11861
11862 * c-common.h: Include tree.h.
11863
8d0d1915
JM
118642012-07-02 Jason Merrill <jason@redhat.com>
11865
11866 PR c++/53524
11867 * c-common.c (get_priority): Call default_conversion.
11868
fbc873ad
UB
118692012-07-01 Uros Bizjak <ubizjak@gmail.com>
11870
11871 * c-pch.c (c_common_write_pch): Remove unused variables.
11872
d4a10d0a
SB
118732012-06-29 Steven Bosscher <steven@gcc.gnu.org>
11874
11875 * cppspec.c: Moved from gcc/ to here.
11876
6f3a2e23
KT
118772012-06-27 Kai Tietz <ktietz@redhat.com>
11878
11879 PR preprocessor/37215
11880 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
11881
8ca92d04
SB
118822012-06-21 Steven Bosscher <steven@gcc.gnu.org>
11883
11884 * c-common.h (c_common_print_pch_checksum): Remove.
11885 * c-pch.c: Do not include output.h.
11886 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
11887 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
11888 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
11889 (struct c_pch_header): Remove.
11890 (get_ident): Update gpch version.
11891 (pch_init): Do not print executable_checksum to asm_out_file.
11892 Do not fail if there is no asm_out_file to read back from. Set
11893 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
11894 (c_common_write_pch): Verify that nothing was written to asm_out_file
11895 since pch_init was called. Do not write a c_pch_header, and do not
11896 copy from asm_out_file to the PCH.
11897 (c_common_read_pch): Do not read a c_pch_header, and do not restore
11898 the content of asm_out_file from the PCH.
11899 (c_common_print_pch_checksum): Remove.
11900 * c-opts.c (c_common_init): Print out executable_checksum directly.
11901
70f42967
SB
119022012-06-19 Steven Bosscher <steven@gcc.gnu.org>
11903
11904 * c-target.def (objc_declare_unresolved_class_reference,
11905 objc_declare_class_definition): Add new hooks.
11906
a8781821
SB
119072012-06-19 Steven Bosscher <steven@gcc.gnu.org>
11908
11909 * c-lex.c: Do not include output.h.
11910 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
11911 Remove uses of ASM_OUTPUT_IDENT.
11912
9e1a8dd1
RR
119132012-06-15 Marc Glisse <marc.glisse@inria.fr>
11914
11915 PR c++/51033
11916 * c-common.h (c_build_vec_perm_expr): Move decl here.
11917 * c-common.c (c_build_vec_perm_expr): Move definition
11918 here.
11919
6f07a821
SB
119202012-06-06 Steven Bosscher <steven@gcc.gnu.org>
11921
11922 * c.opt (fconserve-space): Turn into a no-op.
11923
9faeb493 119242012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
11925
11926 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
11927 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
11928 both the start and end of the function.
11929
a4b7d13c
SB
119302012-06-04 Steven Bosscher <steven@gcc.gnu.org>
11931
11932 * c-common.c: Do not include output.h.
11933 * c-pragma.c: Likewise.
11934
c265f413
SA
119352012-06-04 Steven Bosscher <steven@gcc.gnu.org>
11936
11937 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
11938 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
11939 (lang_decl_name): Handle namespace decls.
11940
be7a421e
SB
119412012-05-31 Steven Bosscher <steven@gcc.gnu.org>
11942
11943 * c-ada-spec.c: Do not include output.h.
11944 * c-semantics.c: Likewise.
11945
65de6659
JM
119462012-05-29 Joseph Myers <joseph@codesourcery.com>
11947
11948 * c-common.c: Fix typo.
11949
ca5f4331
MM
119502012-05-29 Michael Matz <matz@suse.de>
11951
11952 * c-common.h (c_expand_decl): Remove prototype.
11953
4f7f7aca
MLI
119542012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
11955
11956 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
11957 * c-opts.c (c_common_handle_option): Remove code handling
11958 warn_missing_braces.
11959
4a792f9b
PC
119602012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
11961
11962 PR c++/25137
11963 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
11964 -Wmissing_braces.
11965
650dc14a
DS
119662012-05-22 Dodji Seketeli <dodji@redhat.com>
11967
11968 PR c++/53322
11969 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
11970
9b095bf1
MLI
119712012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
11972
11973 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
11974 * c-opts.c (c_common_handle_option): Do not handle explicitly
11975 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
11976
0b2c4be5
DS
119772012-05-16 Dodji Seketeli <dodji@redhat.com>
11978
11979 PR preprocessor/7263
ab20d992 11980 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
0b2c4be5
DS
11981 to cpp_classify_number. For diagnostics, use the precise location
11982 instead of the global input_location.
11983
a1bde5af
PC
119842012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
11985
d02924ef 11986 PR c++/11856
a1bde5af
PC
11987 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
11988
d1ede5f4
BS
119892012-05-14 Bernd Schmidt <bernds@codesourcery.com>
11990
a1bde5af 11991 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 11992
f2bc201f
MLI
119932012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
11994
11995 PR 53063
11996 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
11997 Wreorder): Use LangEnabledBy.
11998 * c-opts.c (c_common_handle_option): Do not enable them
11999 explicitly. Call lang-specific generated functions.
12000 (c_common_post_options): Do not set them here.
12001
95744782
MLI
120022012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
12003
12004 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
12005 Wmissing-field-initializers,Wmissing-parameter-type,
12006 Wold-style-declaration,Woverride-init): Use EnabledBy.
12007 * c-opts.c (c_common_post_options): Do not set here explicitly.
12008
7d5a5747
MLI
120092012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
12010
12011 PR 53063
12012 * c-opts.c (c_common_handle_option): Use handle_generated_option
12013 to enable sub-options.
12014
5a3c9cf2
PC
120152012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
12016
12017 PR c++/53158
12018 * c-common.c (warnings_for_convert_and_check): Use warning_at.
12019
3ac8781c
RG
120202012-05-10 Richard Guenther <rguenther@suse.de>
12021
12022 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
12023 adjust commentary about TYPE_IS_SIZETYPE types.
12024
1e537948
MLI
120252012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
12026
12027 PR c++/53261
12028 * c-common.c (warn_logical_operator): Check that argument of
12029 integer_zerop is not NULL.
12030
f2c4a785
MLI
120312012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
12032
12033 PR c/43772
12034 * c-common.c (warn_logical_operator): Do not warn if either side
12035 is already true or false.
12036
50f305ca
MLI
120372012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
12038
12039 PR c/51712
12040 * c-common.c (expr_original_type): New.
12041 (shorten_compare): Do not warn for enumeration types.
12042
0c3641b0
MLI
120432012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
12044
12045 * c.opt (fpermissive): Add Var(flag_permissive).
12046
7edaa4d2
MG
120472012-04-30 Marc Glisse <marc.glisse@inria.fr>
12048
12049 PR c++/51033
12050 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
12051 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
12052
b9c8da34
DS
120532012-04-30 Dodji Seketeli <dodji@redhat.com>
12054
12055 Add -Wvarargs option
ab20d992 12056 * c.opt (Wvarargs): Define new option.
b9c8da34 12057
e6c69da0
MLI
120582012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
12059
12060 * c-common.c (check_function_arguments): Replace
12061 Wmissing-format-attribute with Wsuggest-attribute=format.
12062
90137d8f
MLI
120632012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
12064
12065 * c.opt (Wsuggest-attribute=format): New. Alias of
12066 Wmissing-format-attribute.
12067 * c-format.c (decode_format_type): Replace
12068 Wmissing-format-attribute with Wsuggest-attribute=format.
12069 (check_function_format): Likewise.
12070
9faeb493 120712012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
12072
12073 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
12074 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
12075 * c.opt: Add Wliteral-suffix.
12076
c1771a20
MLI
120772012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
12078
12079 PR c/44774
12080 * c.opt (Wpedantic): New.
12081 (pedantic): Alias Wpedantic.
12082 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
12083 (c_common_post_options): Likewise.
12084 (sanitize_cpp_opts): Likewise.
12085 * c-lex.c (interpret_float): Likewise.
12086 * c-format.c (check_format_types): Likewise.
12087 * c-common.c (pointer_int_sum): Likewise.
12088 (c_sizeof_or_alignof_type): Likewise.
12089 (c_add_case_label): Likewise.
12090 (c_do_switch_warnings): Likewise.
12091 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
12092
04b391c1
JM
120932012-04-15 Jason Merrill <jason@redhat.com>
12094
12095 PR c++/52818
12096 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
12097 (C_STD_NAME): Distinguish between C++98 and C++11.
12098
ac868f29
EB
120992012-04-11 Eric Botcazou <ebotcazou@adacore.com>
12100
12101 PR target/52624
12102 * c-common.h (uint16_type_node): Rename into...
12103 (c_uint16_type_node): ...this.
12104 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
12105 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
12106
fd4116f4
MLI
121072012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
12108
12109 * c-common.c (warn_if_unused_value): Move definition to here.
12110 * c-common.h (warn_if_unused_value): Move declaration to here.
12111
573ac65e
WB
121122012-03-23 William Bader <williambader@hotmail.com>
12113
12114 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
12115
552b8185
JM
121162012-03-20 Jason Merrill <jason@redhat.com>
12117
12118 * c-common.h (enum cxx_dialect): Add cxx1y.
12119 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
12120 test.
12121 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
12122 * c-opts.c (c_common_post_options): Likewise.
12123 (set_std_cxx1y): New.
12124 (c_common_handle_option): Call it.
12125 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
12126
04398fa8
PC
121272012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
12128
12129 PR c++/14710
12130 * c.opt ([Wuseless-cast]): Add.
12131
d2a12ae7
RG
121322012-03-16 Richard Guenther <rguenther@suse.de>
12133
12134 * c-pretty-print.c (pp_c_initializer_list): Adjust.
12135
a12bf402
MLI
121362012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
12137
12138 PR c++/44783
12139 * c.opt (ftemplate-backtrace-limit) Add.
12140
5c30094f
RO
121412012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12142
12143 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
12144 handling.
12145 * c-pragma.c (handle_pragma_extern_prefix): Remove.
12146 (init_pragma): Don't register extern_prefix.
12147
21fa2faf
RG
121482012-03-12 Richard Guenther <rguenther@suse.de>
12149
12150 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
12151 (builtin_type_for_size): Likewise.
12152
e3793c6f
JJ
121532012-02-13 Jakub Jelinek <jakub@redhat.com>
12154
12155 PR c++/52215
12156 * c-common.c (sync_resolve_params): Don't decide whether to convert
12157 or not based on TYPE_SIZE comparison, convert whenever arg_type
12158 is unsigned INTEGER_TYPE.
12159
93286335
PC
121602012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
12161
12162 PR c/52118
12163 * c.opt ([Wunused-local-typedefs]): Fix description.
12164
7a421706
MS
121652012-01-24 Mike Stump <mikestump@comcast.net>
12166
12167 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
12168 exactly.
12169
ba9b1f11
RG
121702012-01-18 Richard Guenther <rguenther@suse.de>
12171
12172 * c-opts.c (c_common_post_options): Reset LTO flags if
12173 we are about to generate a PCH.
12174
465406be
PC
121752012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
12176
12177 PR c++/51777
12178 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
12179 use pp_unsigned_wide_integer.
12180
aee15221
RG
121812012-01-10 Richard Guenther <rguenther@suse.de>
12182
12183 PR middle-end/51806
12184 * c-opts.c (c_common_handle_option): Move -Werror handling
12185 to language independent code.
12186
5720c0dc
RG
121872012-01-05 Richard Guenther <rguenther@suse.de>
12188
12189 PR middle-end/51764
12190 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
12191 from common.opt.
12192
73ac190a
PC
121932011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
12194
12195 PR c++/51316
12196 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
12197 of array types with an unknown bound.
12198
48b0b196
JM
121992011-12-20 Joseph Myers <joseph@codesourcery.com>
12200
12201 * c-common.c (flag_isoc99): Update comment to refer to C11.
12202 (flag_isoc1x): Change to flag_isoc11.
12203 * c-common.h (flag_isoc99): Update comment to refer to C11.
12204 (flag_isoc1x): Change to flag_isoc11.
12205 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
12206 C11.
12207 * c-opts.c (set_std_c1x): Change to set_std_c11.
12208 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
12209 Call set_std_c11.
12210 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
12211 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
12212 * c.opt (std=c1x): Change to std=c11. Document as non-draft
12213 standard.
12214 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
12215 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
12216 (std=gnu1x): Make alias of std=gnu11.
12217
d58d6eb5
JM
122182011-12-19 Jason Merrill <jason@redhat.com>
12219
12220 PR c++/51228
12221 * c-common.c (handle_transparent_union_attribute): Check the first
12222 field if the type is complete.
12223
b3908fcc
JW
122242011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
12225
12226 PR libstdc++/51365
12227 * c-common.c (RID_IS_FINAL): Add.
12228 * c-common.h (RID_IS_FINAL): Add.
12229
fea3ca91
IS
122302011-11-30 Iain Sandoe <iains@gcc.gnu.org>
12231
12232 * c.opt (fgnu-runtime): Provide full description.
12233 (fnext-runtime): Likewise.
12234 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
12235
62bad7cd
AM
122362011-11-28 Andrew MacLeod <amacleod@redhat.com>
12237
12238 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
12239 predefines in one place. Add LOCK_FREE predefines.
12240 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
12241 new func.
12242
c466c4ff
AM
122432011-11-24 Andrew MacLeod <amacleod@redhat.com>
12244
12245 PR c/51256
9faeb493 12246 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 12247 conditions
9faeb493
UB
12248 (resolve_overloaded_atomic_exchange,
12249 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
12250 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
12251 error_mark_node for error conditions.
9faeb493 12252
a5952633
RG
122532011-11-08 Richard Guenther <rguenther@suse.de>
12254
12255 PR middle-end/51010
ab20d992 12256 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
a5952633 12257
0a35513e
AH
122582011-11-07 Richard Henderson <rth@redhat.com>
12259 Aldy Hernandez <aldyh@redhat.com>
12260 Torvald Riegel <triegel@redhat.com>
12261
12262 Merged from transactional-memory.
12263
12264 * c-common.c (handle_tm_wrap_attribute,
12265 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
12266 (struct c_common_reswords): Added __transaction* keywords.
12267 (struct c_common_attribute_table): Added transaction* and tm_regparm
12268 attributes.
12269 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
12270 masks.
12271 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
12272 find_tm_attribute): Declare.
12273
6d87092d
JM
122742011-11-07 Jason Merrill <jason@redhat.com>
12275
12276 PR c++/35688
12277 * c-common.c, c-common.h: Revert yesterday's changes.
12278
8e7860a1
JM
122792011-11-06 Jason Merrill <jason@redhat.com>
12280
12281 PR c++/35688
12282 * c-common.c (decl_has_visibility_attr): Split out from...
12283 (c_determine_visibility): ...here.
12284 * c-common.h: Declare it.
12285
d19fa6b5
JM
122862011-11-06 Joseph Myers <joseph@codesourcery.com>
12287
12288 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
12289 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
12290 type.
12291 (check_user_alignment): New. Split out of
12292 handle_aligned_attribute. Disallow integer constants with
12293 noninteger types. Conditionally allow zero.
12294 (handle_aligned_attribute): Use check_user_alignment.
12295 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
12296
86951993
AM
122972011-11-06 Andrew MacLeod <amacleod@redhat.com>
12298 Richard Henderson <rth@redhat.com>
12299
12300 Merged from cxx-mem-model.
12301
12302 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 12303 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
12304 parameters that are the same type size.
12305 (get_atomic_generic_size): New. Find size of generic
12306 atomic function parameters and do typechecking.
12307 (add_atomic_size_parameter): New. Insert size into parameter list.
12308 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
12309 either __atomic_exchange_n or external library call.
9faeb493 12310 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 12311 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 12312 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
12313 __atomic_load_n or an external library call.
12314 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
12315 __atomic_store_n or an external library call.
12316 (resolve_overloaded_builtin): Handle new __atomic builtins.
12317
cf9e9959
EB
123182011-11-04 Eric Botcazou <ebotcazou@adacore.com>
12319
12320 PR c++/50608
12321 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
12322 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
12323 <INDIRECT_REF>: Return the argument.
12324 <ARRAY_REF>: Remove special code for negative offset.
12325 Call fold_build_pointer_plus instead of size_binop.
12326 (fold_offsetof): Remove STOP_REF argument and adjust.
12327 * c-common.h (fold_offsetof_1): Declare.
12328 (fold_offsetof): Remove STOP_REF argument.
12329
25339f10
JM
123302011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
12331
12332 PR c++/50810
12333 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12334 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12335 Wnarrowing for C++0x and C++98.
12336 * c.opt ([Wnarrowing]): Update.
12337
89401152
PC
123382011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
12339
12340 PR c++/44277
12341 * c.opt: Add Wzero-as-null-pointer-constant.
12342
97e3ad20
JM
123432011-10-31 Jason Merrill <jason@redhat.com>
12344
15694fdd
JM
12345 * c.opt (-fdeduce-init-list): Off by default.
12346
97e3ad20
JM
12347 PR c++/50920
12348 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
12349 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
12350 and -Wc++11-compat.
12351 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
12352
fb9120e3
RAV
123532011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
12354
12355 PR c++/30066
12356 * c.opt (fvisibility-inlines-hidden): Description change.
12357
3ce4f9e4
ESR
123582011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
12359
12360 Implement C++11 user-defined literals.
12361 * c-common.c (build_userdef_literal): New.
12362 * c-common.def: New tree code.
12363 * c-common.h (tree_userdef_literal): New tree struct and accessors.
12364 * c-lex.c (interpret_float): Add suffix parm.
12365 (c_lex_with_flags): Build literal tokens.
12366
5f53c243
PC
123672011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12368
12369 PR c++/50841
12370 Revert:
12371 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12372
12373 PR c++/50810
12374 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12375 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12376 Wnarrowing for C++0x and C++98.
12377 * c.opt ([Wnarrowing]): Update.
12378
263734e1
PC
123792011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12380
12381 PR c++/50810
12382 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12383 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12384 Wnarrowing for C++0x and C++98.
12385 * c.opt ([Wnarrowing]): Update.
12386
d2e312d7
PC
123872011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
12388
12389 PR c++/45385
12390 * c-common.c (conversion_warning): Remove code looking for
12391 artificial operands.
12392
d17687f6
DS
123932011-10-18 Dodji Seketeli <dodji@redhat.com>
12394
12395 PR bootstrap/50760
12396 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 12397 !NO_IMPLICIT_EXTERN_C.
d17687f6 12398
fc8396e9
PC
123992011-10-17 Michael Spertus <mike_spertus@symantec.com>
12400
12401 * c-common.c (c_common_reswords): Add __bases,
12402 __direct_bases.
12403 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
12404
124052011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
12406
12407 PR c++/50757
12408 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
12409
847e697a
TT
124102011-10-15 Tom Tromey <tromey@redhat.com>
12411 Dodji Seketeli <dodji@redhat.com>
12412
12413 * c.opt (fdebug-cpp): New option.
12414 * c-opts.c (c_common_handle_option): Handle the option.
12415 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
12416 output stream in parameter. Factorized from ...
12417 (maybe_print_line): ... this. Dump location debug information when
12418 -fdebug-cpp is in effect.
12419 (print_line_1): New static function. Takes an output stream in
12420 parameter. Factorized from ...
12421 (print_line): ... here. Dump location information when -fdebug-cpp
12422 is in effect.
12423 (scan_translation_unit): Dump location information when
12424 -fdebug-cpp is in effect.
12425
92582b75
TT
124262011-10-15 Tom Tromey <tromey@redhat.com>
12427 Dodji Seketeli <dodji@redhat.com>
12428
12429 * c.opt (ftrack-macro-expansion): New option. Handle it with and
12430 without argument.
12431 * c-opts.c (c_common_handle_option)<case
12432 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
12433 cases. Handle -ftrack-macro-expansion with and without argument.
12434
46427374
TT
124352011-10-15 Tom Tromey <tromey@redhat.com>
12436 Dodji Seketeli <dodji@redhat.com>
12437
12438 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
12439 (print_line, cb_define, do_line_change): Adjust to avoid touching
12440 the internals of struct line_map. Use the public API instead.
12441 * c-pch.c (c_common_read_pch): Likewise.
12442 * c-lex.c (fe_file_change): Likewise.
12443
fc8396e9
PC
124442011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
12445
12446 PR c++/17212
12447 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
12448
124492011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
12450
12451 PR c++/33067
12452 * c-pretty-print.c (pp_c_floating_constant): Output
12453 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
12454
e79983f4
MM
124552011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
12456
12457 * c-common.c (def_builtin_1): Delete old interface with two
12458 parallel arrays to hold standard builtin declarations, and replace
12459 it with a function based interface that can support creating
12460 builtins on the fly in the future. Change all uses, and poison
12461 the old names. Make sure 0 is not a legitimate builtin index.
12462 * c-omp.c (c_finish_omp_barrier): Ditto.
12463 (c_finish_omp_taskwait): Ditto.
12464 (c_finish_omp_flush): Ditto.
12465
6637388f
TG
124662011-10-11 Tristan Gingold <gingold@adacore.com>
12467
12468 * c.opt: (fallow-parameterless-variadic-functions): New.
12469
3797cb21
DS
124702011-09-08 Dodji Seketeli <dodji@redhat.com>
12471
12472 PR c++/33255 - Support -Wunused-local-typedefs warning
12473 * c-common.h (struct c_language_function::local_typedefs): New
12474 field.
9faeb493
UB
12475 (record_locally_defined_typedef, maybe_record_typedef_use)
12476 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 12477 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
12478 (maybe_record_typedef_use)
12479 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
12480 * c.opt: Declare new -Wunused-local-typedefs flag.
12481
693ddb1b
EB
124822011-09-06 Eric Botcazou <ebotcazou@adacore.com>
12483
12484 PR middle-end/50266
12485 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
12486 computations.
12487
830c740f
RG
124882011-09-05 Richard Guenther <rguenther@suse.de>
12489
12490 * c-common.c (complete_array_type): Use ssize_int (-1) instead
12491 of integer_minus_one_node for empty array upper bounds.
12492
892a371f
DS
124932011-08-28 Dodji Seketeli <dodji@redhat.com>
12494
12495 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
12496 it's the first time it's being called on this main TU.
12497
0e3fdb48
RB
124982011-08-24 Richard Guenther <rguenther@suse.de>
12499
12500 PR c/49396
12501 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
12502
125032011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
12504
12505 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
12506 defined in cpp_init_builtins and c_cpp_builtins.
12507
d4a83c10
JM
125082011-08-19 Joseph Myers <joseph@codesourcery.com>
12509
12510 * c-common.c (c_common_reswords): Add __builtin_complex.
12511 * c-common.h (RID_BUILTIN_COMPLEX): New.
12512
bbceee64
JM
125132011-08-18 Joseph Myers <joseph@codesourcery.com>
12514
12515 * c-common.c (c_common_reswords): Add _Noreturn.
12516 (keyword_is_function_specifier): Handle RID_NORETURN.
12517 * c-common.h (RID_NORETURN): New.
12518
3f8257db 125192011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
12520
12521 * c-common.c (unsafe_conversion_p): New function. Check if it is
12522 unsafe to convert an expression to the type.
12523 (conversion_warning): Adjust, use unsafe_conversion_p.
12524 * c-common.h (unsafe_conversion_p): New function declaration.
12525
20906c66
JJ
125262011-08-02 Jakub Jelinek <jakub@redhat.com>
12527
12528 * c-common.h (c_finish_omp_atomic): Adjust prototype.
12529 (c_finish_omp_taskyield): New prototype.
12530 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
12531 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
12532 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
12533 or RHS1 have side-effects, evaluate those too in the right spot,
12534 if it is a decl and LHS is also a decl, error out if they
12535 aren't the same.
12536 (c_finish_omp_taskyield): New function.
12537 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
12538 * c-pragma.c (omp_pragmas): Add taskyield.
12539 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
12540 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
12541 PRAGMA_OMP_CLAUSE_MERGEABLE.
12542
770e5a2e
DS
125432011-07-25 Dodji Seketeli <dodji@redhat.com>
12544
12545 * c-common.h (set_underlying_type): Remove parm name from
12546 declaration.
12547
1baae426
RG
125482011-07-25 Romain Geissler <romain.geissler@gmail.com>
12549
12550 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 12551
fcb21722
JM
125522011-07-22 Jason Merrill <jason@redhat.com>
12553
76f86d00
JM
12554 PR c++/49793
12555 * c.opt (Wnarrowing): New.
12556
3a636414
JM
12557 PR c++/30112
12558 * c-common.h: Declare c_linkage_bindings.
12559 * c-pragma.c (handle_pragma_redefine_extname): Use it.
12560
fcb21722
JM
12561 PR c++/49813
12562 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
12563 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
12564 as flag_isoc99 for 'restrict'.
12565 (pp_c_specifier_qualifier_list): Likewise for _Complex.
12566
02614448
ILT
125672011-07-21 Ian Lance Taylor <iant@google.com>
12568
12569 PR middle-end/49705
12570 * c-common.c (c_disable_warnings): New static function.
12571 (c_enable_warnings): New static function.
12572 (c_fully_fold_internal): Change local unused_p to bool. Call
12573 c_disable_warnings and c_enable_warnings rather than change
12574 c_inhibit_evaluation_warnings.
12575
34429675
JM
125762011-07-20 Jason Merrill <jason@redhat.com>
12577
12578 PR c++/6709 (DR 743)
12579 PR c++/42603 (DR 950)
12580 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
12581 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
12582 (CPP_DECLTYPE): New.
12583 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
12584
5d49b6a7
RG
125852011-07-19 Richard Guenther <rguenther@suse.de>
12586
12587 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
12588 * c-omp.c (c_finish_omp_for): Likewise.
12589
e84a58ff
EB
125902011-07-12 Eric Botcazou <ebotcazou@adacore.com>
12591
12592 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
12593 body on the next line.
12594
329af3c7
JM
125952011-07-08 Jason Merrill <jason@redhat.com>
12596
4063e61b
JM
12597 PR c++/45437
12598 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
12599
329af3c7
JM
12600 PR c++/49673
12601 * c-common.c (c_apply_type_quals_to_decl): Don't check
12602 TYPE_NEEDS_CONSTRUCTING.
12603
1a072294
RG
126042011-07-06 Richard Guenther <rguenther@suse.de>
12605
12606 * c-common.c (c_common_nodes_and_builtins):
12607 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
12608
fce5dddd
RG
126092011-07-05 Richard Guenther <rguenther@suse.de>
12610
12611 * c-common.c (c_common_nodes_and_builtins): Build all common
12612 tree nodes first.
12613
45d439ac
JJ
126142011-06-27 Jakub Jelinek <jakub@redhat.com>
12615
56300785
JJ
12616 * c-common.h (c_tree_chain_next): New static inline function.
12617
45d439ac
JJ
12618 * c-common.c (check_builtin_function_arguments): Handle
12619 BUILT_IN_ASSUME_ALIGNED.
12620
e0a8ecf2
AM
126212011-06-21 Andrew MacLeod <amacleod@redhat.com>
12622
12623 * c-common.c: Add sync_ or SYNC__ to builtin names.
12624 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
12625
126262011-06-20 Pierre Vittet <piervit@pvittet.com>
12627
12628 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
12629 handler.
12630 (gen_pragma_handler): New union.
12631 (internal_pragma_handler): New type.
12632 (c_register_pragma_with_data)
12633 (c_register_pragma_with_expansion_and_data): New functions.
12634
12635 * c-pragma.c (registered_pragmas, c_register_pragma_1)
12636 (c_register_pragma, c_register_pragma_with_expansion)
12637 (c_invoke_pragma_handler): Changed to work with
12638 internal_pragma_handler.
12639 (c_register_pragma_with_data)
12640 (c_register_pragma_with_expansion_and_data): New functions.
12641
677f3fa8
JM
126422011-06-14 Joseph Myers <joseph@codesourcery.com>
12643
12644 * c-common.c: Include common/common-target.h.
12645 (handle_section_attribute): Use
12646 targetm_common.have_named_sections.
12647 * c-cppbuiltin.c: Include common/common-target.h.
12648 (c_cpp_builtins): Use targetm_common.except_unwind_info.
12649
d7fc8c14
RG
126502011-06-10 Richard Guenther <rguenther@suse.de>
12651
12652 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
12653 to print a IDENTIFIER_NODE.
12654
10e48e39
RO
126552011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12656 Joseph Myers <joseph@codesourcery.com>
12657
12658 * c.opt (fbuilding-libgcc): New option.
12659 * c-cppbuiltin.c (c_cpp_builtins): Define
12660 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
12661
6976ae51
JM
126622011-06-07 Jason Merrill <jason@redhat.com>
12663
3ff60975
JM
12664 * c-common.c (max_tinst_depth): Lower default to 900.
12665
6976ae51
JM
12666 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
12667
009db074
RG
126682011-06-07 Richard Guenther <rguenther@suse.de>
12669
12670 * c-common.c (c_common_nodes_and_builtins): Do not set
12671 size_type_node or call set_sizetype.
12672
b4592b92
DS
126732011-06-07 Dodji Seketeli <dodji@redhat.com>
12674
12675 PR debug/49130
12676 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 12677 type when using pointer comparison to compare types.
b4592b92 12678
014ab419
JW
126792011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
12680
12681 * c.opt: Add -Wdelete-non-virtual-dtor.
12682 * c-opts.c (c_common_handle_option): Include it in -Wall.
12683
4f60111f
NF
126842011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
12685
12686 PR bootstrap/49190
12687
12688 Revert:
12689 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12690
12691 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
12692 not tree_common.
12693
4cc4f2f4
JJ
126942011-05-27 Jakub Jelinek <jakub@redhat.com>
12695
12696 PR c++/49165
12697 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
12698 C++ don't call c_common_truthvalue_conversion on void type arms.
12699
38e01f9e
NF
127002011-05-27 Nathan Froyd <froydnj@codesourcery.com>
12701
12702 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
12703 (stmt_list_stack): Define.
12704 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
12705 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
12706
92e948a8
NF
127072011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12708
12709 * c-common.c (warning_candidate_p): Check for BLOCKs.
12710
a2fc3e63
NF
127112011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12712
12713 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
12714 not tree_common.
12715
0957c029
JJ
127162011-05-25 Jakub Jelinek <jakub@redhat.com>
12717
12718 * c-common.c (def_fn_type): Remove extra va_end.
12719
828fb3ba
JM
127202011-05-23 Jason Merrill <jason@redhat.com>
12721
12722 PR c++/48106
12723 * c-common.c (c_common_get_narrower): New.
12724 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
12725
dde05067
NF
127262011-05-23 Nathan Froyd <froydnj@codesourcery.com>
12727
12728 * c-common.h (check_function_arguments): Tweak prototype of
12729 check_function_arguments.
12730 * c-common.c (check_function_arguments): Likewise. Adjust
12731 calls to check_function_nonnull, check_function_format, and
12732 check_function_sentinel.
12733 (check_function_sentinel): Take a FUNCTION_TYPE rather than
12734 separate attributes and typelist arguments. Use
12735 FOREACH_FUNCTION_ARGS to iterate over argument types.
12736
3c0d13bf
PC
127372011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
12738
12739 * c-common.c (c_common_reswords): Reorder.
12740 * c-common.h (rid): Likewise.
12741
8242dd04
NF
127422011-05-10 Nathan Froyd <froydnj@codesourcery.com>
12743
12744 * c-common.c (def_fn_type): Don't call build_function_type, call
12745 build_function_type_array or build_varargs_function_type_array
12746 instead.
12747 (c_common_nodes_and_builtins): Likewise.
12748
3d528853
NF
127492011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12750
12751 * c-common.c (c_add_case_label): Omit the loc argument to
12752 build_case_label.
12753 * c-common.h (build_case_label): Remove.
12754 * c-semantics.c (build_case_label): Remove.
12755
a04a722b
JM
127562011-05-05 Joseph Myers <joseph@codesourcery.com>
12757
12758 * c-objc.h (objc_start_method_definition): Update prototype.
12759 * stub-objc.c (objc_start_method_definition): Add extra parameter.
12760
e19a18d4
NF
127612011-05-04 Nathan Froyd <froydnj@codesourcery.com>
12762
12763 * c-common.c (check_main_parameter_types): Reindent. Don't use
12764 TYPE_ARG_TYPES directly.
12765 (handle_nonnull_attribute): Likewise.
12766 (sync_resolve_params): Likewise.
12767 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
12768 to check_format_string.
12769 (handle_format_attribute): Likewise.
12770 (check_format_string): Take a function type to examine instead of
12771 a type list. Use a function_arg_iterator to step through argument
12772 types.
12773
c62c040f
RG
127742011-05-04 Richard Guenther <rguenther@suse.de>
12775
12776 * c-common.c (fix_string_type): Use size_int for index type bounds.
12777 (start_fname_decls): Do not pass NULL to build_int_cst.
12778 (c_init_attributes): Likewise.
12779 * c-lex.c (c_lex_with_flags): Likewise.
12780
c12ff9d8
JM
127812011-04-27 Jason Merrill <jason@redhat.com>
12782
12783 * c-common.c (make_tree_vector_from_list): New.
12784 * c-common.h: Declare it.
12785
304dfbe3
RG
127862011-04-26 Richard Guenther <rguenther@suse.de>
12787
12788 PR preprocessor/48248
12789 * c-ppoutput.c (maybe_print_line): Always optimize newlines
12790 for output size with -P.
12791
3c0d13bf
PC
127922011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
12793
12794 * c-common.c (struct c_common_resword): Add __underlying_type.
12795 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
12796
04695783
JM
127972011-04-20 Jim Meyering <meyering@redhat.com>
12798
12799 * c-format.c (init_dollar_format_checking): Remove useless
12800 if-before-free.
12801
0dc33c3c
NP
128022011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
12803
12804 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 12805 (objc_detect_field_duplicates): New.
0dc33c3c 12806 * stub-objc.c: Likewise.
3c0d13bf 12807
c59633d9
NP
128082011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12809
12810 * stub-objc.c (objc_declare_protocols): Renamed to
12811 objc_declare_protocol.
12812 * c-objc.h: Likewise.
3c0d13bf 12813
32dabdaf
NP
128142011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12815
12816 * stub-objc.c (objc_declare_class): Updated argument name.
12817
81f653d6
NF
128182011-04-12 Nathan Froyd <froydnj@codesourcery.com>
12819
12820 * c-common.h (c_common_init_ts): Declare.
12821 * c-common.c (c_common_init_ts): Define.
12822
eb345401
NP
128232011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
12824
12825 * c-objc.h (objc_build_message_expr): Updated prototype.
12826 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 12827
a358e188
MJ
128282011-04-12 Martin Jambor <mjambor@suse.cz>
12829
12830 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
12831 of cgraph_node.
12832
e6313a78
RG
128332011-04-11 Richard Guenther <rguenther@suse.de>
12834
12835 * c-common.c (complete_array_type): Build a range type of
12836 proper type.
12837
dcf0c47e
NF
128382011-04-08 Nathan Froyd <froydnj@codesourcery.com>
12839
12840 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
12841 (handle_type_generic_attribute): Likewise.
12842
1ee44b26
JM
128432011-04-07 Jason Merrill <jason@redhat.com>
12844
12845 PR c++/48450
12846 * c-common.c (c_common_truthvalue_conversion): Don't ignore
12847 conversion from C++0x scoped enum.
12848
acce4e77
JM
128492011-04-06 Joseph Myers <joseph@codesourcery.com>
12850
12851 * c-target-def.h: New file.
12852 * c-target.def: New file.
12853 * c-target.h: New file.
12854 * c-common.c (targetcm): Don't define here.
12855 * c-common.h (default_handle_c_option): Declare.
12856 * c-format.c: Include c-target.h instead of target.h.
12857 * c-opts.c: Include c-target.h instead of target.h. Explicitly
12858 include tm.h.
12859 (default_handle_c_option): Move from targhooks.c.
12860
e2eefb55
JJ
128612011-03-29 Jakub Jelinek <jakub@redhat.com>
12862
12863 PR preprocessor/48248
12864 * c-ppoutput.c (print): Add src_file field.
12865 (init_pp_output): Initialize it.
12866 (maybe_print_line): Don't optimize by adding up to 8 newlines
12867 if map->to_file and print.src_file are different file.
12868 (print_line): Update print.src_file.
12869
ba78087b
KT
128702011-03-25 Kai Tietz <ktietz@redhat.com>
12871
12872 * c-ada-spec.c (compare_comment): Use filename_cmp
12873 instead of strcmp for filename.
12874
0edf1bb2
JL
128752011-03-25 Jeff Law <law@redhat.com>
12876
adfac8df 12877 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 12878
c7dc8804
JM
128792011-03-25 Jason Merrill <jason@redhat.com>
12880
12881 * c.opt: Add -std=c++03.
12882
d1d879b1
EB
128832011-03-22 Eric Botcazou <ebotcazou@adacore.com>
12884
12885 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
12886
3f8257db 128872011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
12888
12889 PR target/12171
5050afdf
KT
12890 * c-pretty-print.c (pp_c_specifier_qualifier_list):
12891 Display allowed attributes for function pointer types.
12892 (pp_c_attributes_display): New function to display
12893 attributes having affects_type_identity flag set to true.
12894 * c-pretty-print.h (pp_c_attributes_display): New prototype.
12895
62d784f7
KT
12896 * c-common.c (c_common_attribute_table):
12897 Add new element.
12898 (c_common_format_attribute_table): Likewise.
12899
82d37118
JM
129002011-03-18 Jason Merrill <jason@redhat.com>
12901
49a000c3
JM
12902 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
12903 * c-common.h: Don't declare it here.
12904 * c-common.c: Or define it here.
12905 * c-opts.c (c_common_handle_option): Or set it here.
12906
82d37118
JM
12907 PR c++/35315
12908 * c-common.c (handle_transparent_union_attribute): Don't
12909 make a duplicate type in C++.
12910
17bc631c
JM
129112011-03-15 Jason Merrill <jason@redhat.com>
12912
12913 * c-common.c (max_constexpr_depth): New.
12914 * c-common.h: Declare it.
12915 * c-opts.c (c_common_handle_option): Set it.
12916 * c.opt (fconstexpr-depth): New option.
12917
1b9b91a6
JM
129182011-03-11 Jason Merrill <jason@redhat.com>
12919
f231b5ff
JM
12920 * c-common.c (attribute_takes_identifier_p): Add missing const.
12921
1b9b91a6
JM
12922 PR c++/46803
12923 * c-common.c (attribute_takes_identifier_p): Assume that an
12924 unknown attribute takes an identifier.
12925
a19e4d44
NF
129262011-03-07 Nathan Froyd <froydnj@codesourcery.com>
12927
12928 PR c/47786
12929 * c-common.c (c_type_hash): Call list_length instead of iterating
12930 through DECL_CHAIN. Rename 'i' to 'n_elements'.
12931
982d62f6
JJ
129322011-02-19 Jakub Jelinek <jakub@redhat.com>
12933
12934 PR c/47809
12935 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
12936
0a256240
NP
129372011-02-17 Iain Sandoe <iains@gcc.gnu.org>
12938
12939 * c.opt (fobjc-abi-version=) New.
12940 (fobjc-nilcheck): New.
12941
ba9e6dd5
NF
129422011-02-03 Nathan Froyd <froydnj@codesourcery.com>
12943
12944 PR c++/46890
12945 * c-common.h (keyword_is_decl_specifier): Declare.
12946 * c-common.c (keyword_is_decl_specifier): Define.
12947 (keyword_is_function_specifier): New function.
12948
7273813a
JJ
129492011-01-26 Jakub Jelinek <jakub@redhat.com>
12950
12951 PR c/47473
12952 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
12953 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
12954 REAL_TYPE.
12955
908ef79b
AC
129562011-01-26 Arnaud Charlet <charlet@adacore.com>
12957
12958 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
12959
237e9384
JJ
129602011-01-26 Jakub Jelinek <jakub@redhat.com>
12961
12962 PR pch/47430
12963 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
12964 after init_c_lex if pch_file is set.
12965
47ea1edf
DK
129662011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
12967
d4dba752 12968 PR c++/43601
47ea1edf
DK
12969 * c.opt (-fkeep-inline-dllexport): New switch.
12970
2aa9c6ae
RG
129712011-01-12 Richard Guenther <rguenther@suse.de>
12972
12973 PR middle-end/32511
12974 * c-common.c (handle_weak_attribute): Warn instead of error
12975 on declaring an inline function weak.
12976
7bd11157
TT
129772011-01-05 Tom Tromey <tromey@redhat.com>
12978
12979 * c-common.h (lvalue_error): Update.
12980 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
12981 not error.
12982
0e66e494 129832010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 12984
b4f588c4
NP
12985 PR objc/47075
12986 * c-objc.h (objc_finish_message_expr): Added argument to
12987 prototype.
12988
f4da8dce
NF
129892010-12-22 Nathan Froyd <froydnj@codesourcery.com>
12990
12991 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
12992 Use prototype_p.
12993
46270f14
NP
129942010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
12995
12996 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 12997 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 12998
4816c593
NF
129992010-12-10 Nathan Froyd <froydnj@codesourcery.com>
13000
13001 * c-common.h (readonly_error): Declare.
13002 * c-common.c (readonly_error): Define.
13003
7a6daeb0
NF
130042010-12-09 Nathan Froyd <froydnj@codesourcery.com>
13005
13006 * c-common.h (invalid_indirection_error): Declare.
13007 * c-common.c (invalid_indirection_error): Define.
13008
892f6119
RG
130092010-12-03 Richard Guenther <rguenther@suse.de>
13010
13011 PR c/46745
13012 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
13013 (pp_c_unary_expression): Likewise.
13014 (pp_c_expression): Likewise.
13015
6c39e757
NP
130162010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
13017
13018 * c-common.h (objc_finish_function): New.
13019 (objc_non_volatilized_type): Removed.
13020 (objc_type_quals_match): Removed.
13021 * stub-objc.c (objc_finish_function): New.
13022 (objc_non_volatilized_type): Removed.
13023 (objc_type_quals_match): Removed.
9faeb493 13024
7c475d11
JM
130252010-11-30 Joseph Myers <joseph@codesourcery.com>
13026
13027 * c-common.h (parse_optimize_options): Declare.
13028 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
13029 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
13030
71f3e391
JM
130312010-11-29 Joseph Myers <joseph@codesourcery.com>
13032
13033 * c-opts.c (check_deps_environment_vars): Use getenv instead of
13034 GET_ENVIRONMENT.
13035 * c-pch.c (O_BINARY): Don't define here.
13036 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
13037
d5fabb58
JM
130382010-11-25 Joseph Myers <joseph@codesourcery.com>
13039
13040 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
13041 targetm.except_unwind_info.
13042
299404a1
JM
130432010-11-23 Joseph Myers <joseph@codesourcery.com>
13044
13045 * c-opts.c (c_common_handle_option): Pass location to
13046 set_struct_debug_option.
13047
c98cd5bf
JM
130482010-11-23 Joseph Myers <joseph@codesourcery.com>
13049
13050 * c-common.c (visibility_options): Move from ../opts.c.
13051 * c-common.h (struct visibility_flags, visibility_options):
13052 Declare here.
13053 * c-opts.c (finish_options): Rename to c_finish_options.
13054 (c_common_init): Update call to finish_options.
13055
a9546771
NP
130562010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
13057
13058 PR objc/34033
13059 * c-lex.c (lex_string): Check that each string in an Objective-C
13060 string concat sequence starts with either one or zero '@', and
13061 that there are no spurious '@' signs at the end.
13062
24a57808
JM
130632010-11-20 Joseph Myers <joseph@codesourcery.com>
13064
13065 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
13066 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
13067 HANDLE_PRAGMA_VISIBILITY.
13068 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
13069 HANDLE_PRAGMA_VISIBILITY): Don't define.
13070 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
13071
a9aa2c3a
NF
130722010-11-20 Nathan Froyd <froydnj@codesourcery.com>
13073
13074 PR c++/16189
13075 PR c++/36888
13076 PR c++/45331
13077 * c-common.h (keyword_begins_type_specifier): Declare.
13078 (keyword_is_storage_class_specifier): Declare.
13079 (keyword_is_type_qualifier): Declare.
13080 * c-common.c (keyword_begins_type_specifier): New function.
13081 (keyword_is_storage_class_specifier): New function.
13082 (keyword_is_type_qualifier): Declare.
13083
5386338c
JM
130842010-11-19 Joseph Myers <joseph@codesourcery.com>
13085
13086 PR c/46547
13087 * c-common.c (in_late_binary_op): Define.
13088 (c_common_truthvalue_conversion): Check in_late_binary_op before
13089 calling c_save_expr.
13090 * c-common.h (in_late_binary_op): Declare.
13091
69ccdddb
JM
130922010-11-19 Joseph Myers <joseph@codesourcery.com>
13093
13094 * c-opts.c (c_common_handle_option): Update calls to
13095 set_struct_debug_option.
13096
6b192a09
NP
130972010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
13098
13099 * c-common.h (objc_declare_protocols): Added additional argument.
13100 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 13101
fb52b50a
NF
131022010-11-18 Nathan Froyd <froydnj@codesourcery.com>
13103
13104 PR c/33193
13105 * c-common.h (build_real_imag_expr): Declare.
13106 * c-semantics.c (build_real_imag_expr): Define.
13107
b37421c6
JM
131082010-11-17 Joseph Myers <joseph@codesourcery.com>
13109
13110 * c-opts.c (c_common_parse_file): Take no arguments.
13111 * c-common.h (c_common_parse_file): Update prototype.
13112
07078664
JJ
131132010-11-16 Jakub Jelinek <jakub@redhat.com>
13114
13115 PR c++/46401
13116 * c-common.c (warning_candidate_p): Don't track non-const calls
13117 or STRING_CSTs.
13118
c6a13190
ILT
131192010-11-15 Ian Lance Taylor <iant@google.com>
13120
13121 * c-lex.c (init_c_lex): Set macro debug callbacks if
13122 flag_dump_go_spec is set.
13123
925e8657
NP
131242010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
13125
13126 * c-common.h (objc_build_incr_expr_for_property_ref): New.
13127 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
13128
bb0a9581
NF
131292010-11-15 Nathan Froyd <froydnj@codesourcery.com>
13130
13131 PR preprocessor/45038
13132 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
13133 dialects.
13134
c5fa0890
JM
131352010-11-12 Joseph Myers <joseph@codesourcery.com>
13136
13137 * c-common.h (c_family_lang_mask): Declare.
13138 * c-opts.c (c_family_lang_mask): Make extern.
13139 * c-pragma.c (handle_pragma_diagnostic): Use
13140 control_warning_option.
13141
a4d8c676
JM
131422010-11-12 Joseph Myers <joseph@codesourcery.com>
13143
13144 * c-common.c (parse_optimize_options): Update call to
13145 decode_options.
13146 * c-common.h (c_common_handle_option): Update prototype.
13147 * c-opts.c (c_common_handle_option): Take location_t parameter and
13148 pass it to other functions.
13149
f954bd2c
JM
131502010-11-11 Joseph Myers <joseph@codesourcery.com>
13151
13152 * c-opts.c (warning_as_error_callback): Remove.
13153 (c_common_initialize_diagnostics): Don't call
13154 register_warning_as_error_callback.
13155 (c_common_handle_option): Handle -Werror=normalized= here.
13156
d8a07487
JM
131572010-11-10 Joseph Myers <joseph@codesourcery.com>
13158
13159 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
13160 in diagnostic.
13161 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
13162 letter.
13163 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
13164 Remove trailing '.' from diagnostics.
13165 * c.opt (Wwrite-strings_: Avoid '`' in help text.
13166
d5478783
JM
131672010-11-10 Joseph Myers <joseph@codesourcery.com>
13168
13169 * c-common.c (parse_optimize_options): Pass global_dc to
13170 decode_options.
13171 * c-opts.c (c_common_handle_option): Pass &global_options to
13172 set_Wstrict_aliasing.
13173 * c.opt (v): Don't mark Common or document here.
13174
91ebb981
IS
131752010-11-06 Iain Sandoe <iains@gcc.gnu.org>
13176
13177 PR target/44981
13178 * c-format.c (format_type): New type gcc_objc_string_format_type.
13179 (valid_stringptr_type_p): New.
13180 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 13181 (check_format_string): Pass expected type, use
91ebb981
IS
13182 valid_stringptr_type_p (), check that the format string types are
13183 consistent with the format specification.
13184 (decode_format_attr): Warn if NSString is used outside objective-c.
13185 (format_types_orig): Add NSString.
13186 (format_name): New.
13187 (format_flags): New.
13188 (check_format_arg): Handle format strings requiring an external parser.
13189 first_target_format_type: New variable.
13190 (handle_format_attribute): Set up first_target_format_type, pass the
13191 expected format arg string type to check_format_string().
ab20d992 13192 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
91ebb981
IS
13193 * stub-objc.c (objc_string_ref_type_p): New.
13194 (objc_check_format_arg): New.
13195
bede2adc
NP
131962010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
13197
9faeb493 13198 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
13199 * c-common.h (objc_build_class_component_ref): New.
13200 * stub-objc.c (objc_build_class_component_ref): New.
13201
9a179d01
NP
132022010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
13203
13204 * c.opt (Wproperty-assign-default): New option.
13205
22d8d616
NP
132062010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
13207
13208 Implemented -fobjc-std=objc1 flag.
13209 * c.opt (fobjc-std=objc1): New option.
13210
2debdb4f
NP
132112010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
13212
13213 Implemented format and noreturn attributes for Objective-C methods.
13214 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
13215 attribute for Objective-C methods.
13216
ec52b111
JM
132172010-10-31 Jason Merrill <jason@redhat.com>
13218
13219 * c-common.c (conversion_warning, warn_for_collisions_1): Use
13220 EXPR_LOC_OR_HERE.
13221
46a88c12
NP
132222010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
13223
13224 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
13225 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
13226 (objc_add_property_declaration): Removed arguments for copies and
13227 ivar.
13228 (objc_build_getter_call): Renamed to
13229 objc_maybe_build_component_ref.
13230 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
13231 (objc_is_property_ref): New.
13232 * c-common.c (c_common_reswords): Removed copies and ivar.
13233 * stub-objc.c (objc_add_property_declaration): Removed arguments
13234 for copies and ivar.
13235 (objc_build_getter_call): Renamed to
13236 objc_maybe_build_component_ref.
13237 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
13238 (objc_is_property_ref): New.
9faeb493 13239
1e4bf85b
AC
132402010-10-29 Arnaud Charlet <charlet@adacore.com>
13241 Matthew Gingell <gingell@adacore.com>
13242
13243 * c-ada-spec.c (separate_class_package): New function.
13244 (pp_ada_tree_identifier): Prefix references to C++ classes with the
13245 name of their enclosing package.
13246 (print_ada_declaration): Use separate_class_package.
13247
81f0bab2
JM
132482010-10-27 Jason Merrill <jason@redhat.com>
13249
2b08f2c5
JM
13250 * c-common.c (c_common_reswords): Add __is_literal_type.
13251 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
13252
81f0bab2
JM
13253 * c-common.c (check_case_value): Remove special C++ code.
13254
200290f2
NP
132552010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
13256
13257 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
13258 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
13259 and RID_LAST_PATTR.
13260 (objc_add_property_declaration): Added additional arguments.
13261 (objc_property_attribute_kind): Removed.
13262 (objc_set_property_attr): Removed.
13263 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
13264 copy and nonatomic.
13265 * stub-objc.c (objc_add_property_declaration): Added additional
13266 arguments.
13267 (objc_set_property_attr): Removed.
9faeb493 13268
f614132b
NP
132692010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
13270
13271 * c-common.h (objc_add_property_variable): Renamed to
13272 objc_add_property_declaration. Added location argument.
13273 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 13274
b8a18805
NP
132752010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
13276
13277 * c-common.h (objc_maybe_printable_name): New.
13278 * stub-objc.c (objc_maybe_printable_name): New.
13279
3f8257db
JJ
132802010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
13281 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
13282
13283 * c-common.h (c_common_mark_addressable_vec): Declare.
13284 * c-common.c (c_common_mark_addressable_vec): New function.
13285
249a82c4
NP
132862010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
13287
13288 * c-common.h (objc_set_method_type): Removed.
13289 (objc_add_method_declaration): Added boolean argument.
13290 (objc_start_method_definition): Same change.
13291 (objc_build_method_signature): Same change.
13292 * stub-objc.c (objc_set_method_type): Removed.
13293 (objc_add_method_declaration): Added boolean argument.
13294 (objc_start_method_definition): Same change.
13295 (objc_build_method_signature): Same change.
13296
977e30bc
NP
132972010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
13298
13299 * c-common.h (finish_file): Removed.
13300 (objc_write_global_declarations): New.
13301 * c-opts.c (c_common_parse_file): Do not call finish_file.
13302 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 13303
da57d1b9
NP
133042010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
13305
13306 Implemented parsing @synthesize and @dynamic for
13307 Objective-C/Objective-C++.
13308 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
13309 (objc_add_synthesize_declaration): New.
13310 (objc_add_dynamic_declaration): New.
13311 * c-common.c (c_common_reswords): Add synthesize and dynamic.
13312 * stub-objc.c (objc_add_synthesize_declaration): New.
13313 (objc_add_dynamic_declaration): New.
9faeb493 13314
0069111f
MM
133152010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
13316
13317 PR target/46041
13318 * c-cppbuiltin.c (mode_has_fma): Move function here from
13319 builtins.c. Don't use the fma optab, instead just use the
13320 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
13321 using -save-temps.
13322
e426b47b
NP
133232010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
13324
13325 Merge from 'apple/trunk' branch on FSF servers.
0069111f 13326
3f8257db 13327 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 13328
9faeb493 13329 Radar 4330422
e426b47b
NP
13330 * c-common.h (objc_non_volatilized_type): New declaration
13331 * stub-objc.c (objc_non_volatilized_type): New stub.
13332
90fbfdc3
NP
133332010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
13334
e426b47b 13335 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 13336
ab20d992 13337 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 13338
9faeb493 13339 Radar 4133425
90fbfdc3 13340 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 13341 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 13342
c37d8c30
IS
133432010-10-17 Iain Sandoe <iains@gcc.gnu.org>
13344
13345 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
13346 * c-common.h (enum rid): Add RID_AT_PACKAGE.
13347 (objc_ivar_visibility_kind): New enum.
13348 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 13349 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
13350 visibility enum.
13351
1b1562a5
MM
133522010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
13353
13354 * c-cppbuiltin.c (builtin_define_float_constants): Emit
13355 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
13356 has the appropriate fma builtins.
13357 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
13358
668ea4b1
IS
133592010-10-14 Iain Sandoe <iains@gcc.gnu.org>
13360
1b1562a5 13361 merge from FSF apple 'trunk' branch.
3f8257db 13362 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 13363
668ea4b1
IS
13364 Radars 4436866, 4505126, 4506903, 4517826
13365 * c-common.c (c_common_resword): Define @property and its attributes.
13366 * c-common.h: Define property attribute enum entries.
13367 (OBJC_IS_PATTR_KEYWORD): New.
13368 (objc_property_attribute_kind): New enum.
13369 Declare objc_set_property_attr (), objc_add_property_variable (),
13370 objc_build_getter_call () and objc_build_setter_call ().
13371 * stub-objc.c (objc_set_property_attr): New stub.
13372 (objc_add_property_variable): Likewise.
13373 (objc_build_getter_call): Likewise.
13374 (objc_build_setter_call) Likewise.
1b1562a5 13375
a1178b30
IS
133762010-10-13 Iain Sandoe <iains@gcc.gnu.org>
13377
1b1562a5 13378 merge from FSF apple 'trunk' branch.
ab20d992 13379 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
13380
13381 Radar 3803157 (method attributes)
13382 * c-common.c (handle_deprecated_attribute): Recognize
13383 objc methods as valid declarations.
13384 * c-common.h: Declare objc_method_decl ().
1b1562a5 13385 * stub-objc.c (objc_method_decl): New stub.
a1178b30 13386
a75bfaa6
JM
133872010-10-08 Joseph Myers <joseph@codesourcery.com>
13388
13389 * c-common.c (parse_optimize_options): Call
13390 decode_cmdline_options_to_array_default_mask before
13391 decode_options. Update arguments to decode_options.
13392 * c-common.h (c_common_init_options_struct): Declare.
13393 * c-opts.c (c_common_init_options_struct): New. Split out from
13394 c_common_init_options.
13395
f05b9d93
NP
133962010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
13397
13398 Implemented fast enumeration for Objective-C.
13399 * c-common.h (objc_finish_foreach_loop): New.
13400 * stub-objc.c (objc_finish_foreach_loop): New.
13401
1ebe4b4f
JM
134022010-10-05 Joseph Myers <joseph@codesourcery.com>
13403
13404 * c-common.h (struct diagnostic_context): Don't declare here.
13405 (c_common_initialize_diagnostics): Declare using
13406 diagnostic_context typedef.
13407 * c-opts.c (c_common_handle_option): Pass global_dc to
13408 handle_generated_option.
13409
d4d24ba4
JM
134102010-10-04 Joseph Myers <joseph@codesourcery.com>
13411
13412 * c-opts.c (c_common_handle_option): Pass &global_options_set to
13413 handle_generated_option.
13414
478a1c5b
ILT
134152010-10-03 Ian Lance Taylor <iant@google.com>
13416
13417 * c.opt (-fplan9-extensions): New option.
13418
82a1c2fe
FXC
134192010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
13420
13421 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
13422 Remove.
13423 (c_cpp_builtins): Call functions from cppbuiltin.c instead
13424 of duplicating code.
13425
92902b1b
IS
134262010-09-30 Iain Sandoe <iains@gcc.gnu.org>
13427
13428 * c-common.c: Add two new entries for @optional
13429 and @required keywords.
13430
13431 merge from FSF 'apple/trunk' branch.
3f8257db 13432 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
13433
13434 Radar 4386773
13435 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
13436 objective-c keywords.
13437 (objc_set_method_opt): New declaration.
13438 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 13439
46625112
JM
134402010-09-30 Joseph Myers <joseph@codesourcery.com>
13441
13442 * c-common.c (handle_optimize_attribute): Pass &global_options to
13443 cl_optimization_save and cl_optimization_restore.
13444 * c-opts.c (c_common_handle_option): Pass &global_options to
13445 handle_generated_option.
13446 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
13447 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
13448 &global_options to cl_optimization_restore.
13449
49b91f05
NP
134502010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
13451
13452 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
13453 Objective-C/Objective-C++ keywords.
13454
13ed556f 134552010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 13456
9faeb493
UB
13457 Merge from 'apple/trunk' branch on FSF servers.
13458
3f8257db 13459 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
13460
13461 Radar 4281748
13462 * c-common.h (objc_check_global_decl): New declaration.
13463 * stub-objc.c (objc_check_global_decl): New stub.
13464
f0036cca
JM
134652010-09-29 Joseph Myers <joseph@codesourcery.com>
13466
13467 * c.opt: Don't use VarExists.
13468
e3339d0f
JM
134692010-09-29 Joseph Myers <joseph@codesourcery.com>
13470
13471 * c-common.c (c_cpp_error): Update names of diagnostic_context
13472 members.
13473 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
13474 cl_optimization members.
13475 * c-opts.c (warning_as_error_callback, c_common_handle_option,
13476 sanitize_cpp_opts, finish_options): Update names of cpp_options
13477 members.
13478
1973201f
NP
134792010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
13480
13481 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
13482 (objc_is_reserved_word): Removed.
13483 * c-common.c: Updated comments.
13484 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
13485 objc_is_reserved_word.
13486 * stub-objc.c (objc_is_reserved_word): Removed.
13487
f7e71da5
IS
134882010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13489
9faeb493 13490 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
13491 include attributes.
13492 (objc_start_method_definition): Likewise.
13493 (objc_build_keyword_decl): Likewise.
13494 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
13495 (objc_start_method_definition): Likewise.
13496 (objc_build_keyword_decl): Likewise.
13497
c165dca7
IS
134982010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13499
13500 * c-common.h (objc_start_class_interface): Adjust prototype.
13501 (objc_start_category_interface): Likewise.
13502 (objc_start_protocol): Likewise.
13503 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
13504 (objc_start_class_interface): Likewise.
13505 (objc_start_category_interface): Likewise.
13506
7458026b
ILT
135072010-09-27 Ian Lance Taylor <iant@google.com>
13508
13509 * c-common.c (c_common_attribute_table): Add no_split_stack.
13510 (handle_no_split_stack_attribute): New static function.
13511
b581b85b
NP
135122010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
13513
9faeb493 13514 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 13515
3f8257db 13516 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 13517
9faeb493 13518 Radar 4229905
b581b85b
NP
13519 * c-common.h (objc_have_common_type): New declaration.
13520 * stub-objc.c (objc_have_common_type): New stub.
13521
13522 2005-06-22 Ziemowit Laski <zlaski@apple.com>
13523
13524 Radar 4154928
13525 * c-common.h (objc_common_type): New prototype.
9faeb493 13526 * stub-objc.c (objc_common_type): New stub.
b581b85b 13527
46a4da10
JH
135282010-09-24 Jan Hubicka <jh@suse.cz>
13529
13530 * c-common.c (handle_leaf_attribute): New function.
13531 (struct attribute_spec c_common_att): Add leaf.
13532
e200444e
JM
135332010-09-22 Joseph Myers <joseph@codesourcery.com>
13534
13535 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
13536 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
13537 -dump, -dump=, -imacros, -imacros=, -include, -include=,
13538 -include-barrier, -include-directory, -include-directory=,
13539 -include-directory-after, -include-directory-after=,
13540 -include-prefix, -include-prefix=, -include-with-prefix,
13541 -include-with-prefix=, -include-with-prefix-after,
13542 -include-with-prefix-after=, -include-with-prefix-before,
13543 -include-with-prefix-before=, -no-integrated-cpp,
13544 -no-line-commands, -no-standard-includes, -no-warnings, -output,
13545 -output=, -pedantic, -pedantic-errors, -preprocess,
13546 -print-missing-file-dependencies, -trace-includes, -traditional,
13547 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
13548 -user-dependencies, -verbose, -write-dependencies,
13549 -write-user-dependencies, no-integrated-cpp, traditional): New.
13550
29a80ea6
NP
135512010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13552
13553 PR objc/23710
ac1fc2fc
NP
13554 * c-common.h (objc_start_method_definition): Return bool instead
13555 of void.
13556 * stub-objc.c (objc_start_method_definition): Return bool instead
13557 of void.
13558
135592010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13560
13561 PR objc/25965
13562 * c-common.h (objc_get_interface_ivars): New declaration.
13563 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 13564
de621752
ILT
135652010-09-15 Ian Lance Taylor <iant@google.com>
13566
13567 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 13568 messages. Remove period at end of warning message.
de621752 13569
ba885ec5
NS
135702010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13571
13572 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
13573 (handle_alias_attribute): ... here.
13574 (handle_ifunc_attribute): New.
13575
c5ee1358
MM
135762010-09-06 Mark Mitchell <mark@codesourcery.com>
13577
13578 * c-common.h (do_warn_double_promotion): Declare.
13579 * c-common.c (do_warn_double_promotion): Define.
13580
0a0b3574
MM
135812010-09-05 Mark Mitchell <mark@codesourcery.com>
13582
13583 * c.opt (Wdouble-promotion): New.
13584
d1779886
JM
135852010-09-02 Joseph Myers <joseph@codesourcery.com>
13586
13587 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
13588 fvtable-thunks, fxref): Mark no longer supported in help text.
13589
2d2bd949
JM
135902010-09-02 Joseph Myers <joseph@codesourcery.com>
13591
13592 * c.opt (Wimport, fall-virtual, falt-external-templates,
13593 fdefault-inline, fenum-int-equiv, fexternal-templates,
13594 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
13595 fname-mangling-version-, fnew-abi, fnonnull-objects,
13596 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
13597 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
13598 applicable.
13599 (fhandle-exceptions): Mark with Alias and Warn.
13600 * c-opts.c (c_common_handle_option): Don't handle options marked
13601 as ignored.
13602
5de8299c
JM
136032010-09-02 Joseph Myers <joseph@codesourcery.com>
13604
13605 * c.opt (Wcomments, Werror-implicit-function-declaration,
13606 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
13607 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
13608 aliases.
13609 * c-common.c (option_codes): Use OPT_Wcomment instead of
13610 OPT_Wcomments.
13611 * c-opts.c (warning_as_error_callback, c_common_handle_option):
13612 Don't handle options marked as aliases.
13613
0ceb0201
RG
136142010-08-25 Richard Guenther <rguenther@suse.de>
13615
13616 * c-common.c (c_common_get_alias_set): Remove special
13617 handling for pointers.
13618
ac47786e
NF
136192010-08-20 Nathan Froyd <froydnj@codesourcery.com>
13620
13621 * c-common.c: Use FOR_EACH_VEC_ELT.
13622 * c-gimplify.c: Likewise.
13623 * c-pragma.c: Likewise.
13624
c878765b
JM
136252010-08-16 Joseph Myers <joseph@codesourcery.com>
13626
13627 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
13628 RejectDriver.
13629 (MMDX): Change back to MMD. Mark NoDriverArg instead of
13630 RejectDriver.
13631 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
13632 instead of OPT_MDX and OPT_MMDX.
13633
603349bf
JM
136342010-08-16 Joseph Myers <joseph@codesourcery.com>
13635
13636 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
13637
644fa7ac
JM
136382010-08-12 Joseph Myers <joseph@codesourcery.com>
13639
13640 * c.opt (MD, MMD): Change to MDX and MMDX.
13641 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
13642
481e1176
JM
136432010-08-11 Joseph Myers <joseph@codesourcery.com>
13644
13645 * c-opts.c (c_common_handle_option): Call handle_generated_option
13646 instead of handle_option.
13647
ac8dc9f7
NF
136482010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13649
13650 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
13651 (maybe_apply_renaming_pragma): Delete unneeded declarations.
13652
4f8c876d
NF
136532010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13654
13655 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
13656 (pending_redefine_extname): Change type to a VEC.
13657 (add_to_renaming_pragma_list): Update for new type of
13658 pending_redefine_extname.
ac8dc9f7 13659 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 13660
3b0c690e
AC
136612010-08-04 Arnaud Charlet <charlet@adacore.com>
13662
13663 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
13664 visited.
13665 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
13666 decide whether a type has already been declared/seen.
13667 Do not go to the original type.
13668 (dump_nested_types): New parameter forward.
13669 Generate forward declaration if needed and mark type as visited.
13670 (print_ada_declaration): Call dump_nested_types if not already done.
13671 Mark types as visited.
13672
1890bccc
JM
136732010-08-03 Joseph Myers <joseph@codesourcery.com>
13674
13675 * c.opt (-print-pch-checksum): Remove option.
13676 * c-opts.c (c_common_handle_option): Don't handle
13677 OPT_print_pch_checksum.
13678
5f20c657
JM
136792010-07-27 Joseph Myers <joseph@codesourcery.com>
13680
13681 * c-common.h (c_common_handle_option): Update prototype and return
13682 value type.
13683 * c-opts.c (c_common_handle_option): Update prototype and return
13684 value type. Update calls to handle_option and
13685 enable_warning_as_error.
13686
f551f80c
JJ
136872010-07-27 Jakub Jelinek <jakub@redhat.com>
13688
13689 PR c/45079
13690 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
13691
61ff2bdc
JM
136922010-07-27 Joseph Myers <joseph@codesourcery.com>
13693
13694 * c-common.h (c_common_missing_argument): Remove.
13695 * c-opts.c (c_common_missing_argument): Remove.
13696 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
13697 idirafter, imacros, include, isysroot, isystem, iquote): Add
13698 MissingArgError.
13699 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
13700
7a9bf9a4
JM
137012010-07-27 Joseph Myers <joseph@codesourcery.com>
13702
13703 * c-common.h (c_common_option_lang_mask,
13704 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
13705 New.
13706 (c_common_init_options): Update prototype.
13707 * c-opts.c (c_common_option_lang_mask): New.
13708 (c_common_initialize_diagnostics): Split out of
13709 c_common_init_options.
13710 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
13711 New.
13712 (c_common_init_options): Update prototype. Use decoded options in
13713 search for -lang-asm.
13714
910ad8de
NF
137152010-07-15 Nathan Froyd <froydnj@codesourcery.com>
13716
13717 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
13718 * c-format.c: Likewise.
13719
718f9c0f
MLI
137202010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
13721
13722 * c-common.h: Include diagnostic-core.h. Error if already
13723 included.
13724 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
13725
4d451982
MLI
137262010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
13727
adfac8df 13728 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
13729 Do not include expr.h
13730 (vector_mode_valid_p): Move here.
13731
119fe915
SB
137322010-06-21 DJ Delorie <dj@redhat.com>
13733
13734 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
13735 allow these pragmas anywhere.
13736
137372010-06-14 Jakub Jelinek <jakub@redhat.com>
13738
13739 PR bootstrap/44509
13740 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
13741 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
13742 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
13743 ggc_strdup instead of xstrdup.
13744
137452010-06-10 Jakub Jelinek <jakub@redhat.com>
13746
13747 * c-cppbuiltin.c: Include cpp-id-data.h.
13748 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
13749 (lazy_hex_fp_value): New function.
13750 (builtin_define_with_hex_fp_value): Provide definitions lazily.
13751
6662d794
MLI
137522010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
13753
13754 * c-gimplify.c: Do not include tree-flow.h
13755
38f8b050
JR
137562010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
13757
13758 PR other/44034
13759 * c-common.c: Rename targetm member:
13760 targetm.enum_va_list -> targetm.enum_va_list_p
13761
9589f23e
AS
137622010-06-28 Anatoly Sokolov <aesok@post.ru>
13763
13764 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
13765
3b06d379
SB
137662010-06-28 Steven Bosscher <steven@gcc.gnu.org>
13767
13768 * c-cppbuiltin.c: Do not include except.h.
13769
d166d4c3
AK
137702010-06-24 Andi Kleen <ak@linux.intel.com>
13771
9faeb493
UB
13772 * c-common.c (warn_for_omitted_condop): New.
13773 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 13774
70cb8be6
JM
137752010-06-21 Joseph Myers <joseph@codesourcery.com>
13776
13777 * c.opt (lang-objc): Remove.
13778 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
13779
a4c97feb
JR
137802010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
13781
13782 * c-opts.c: Include "tm_p.h".
13783
6e2f1956
JM
137842010-06-20 Joseph Myers <joseph@codesourcery.com>
13785
13786 * c-common.c (parse_optimize_options): Update call to
13787 decode_options.
13788
bc87224e
NF
137892010-06-18 Nathan Froyd <froydnj@codesourcery.com>
13790
13791 * c-common.c (record_types_used_by_current_var_decl): Adjust for
13792 new type of types_used_by_cur_var_decl.
13793
b49cf425
JR
137942010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
13795
13796 PR bootstrap/44512
13797 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
13798 for C++ standard compliance.
13799
59f9c2ed
JM
138002010-06-16 Jason Merrill <jason@redhat.com>
13801
13802 * c.opt: Add -Wnoexcept.
13803
33766b66
RG
138042010-06-16 Richard Guenther <rguenther@suse.de>
13805
13806 PR c/44555
13807 * c-common.c (c_common_truthvalue_conversion): Remove
13808 premature and wrong optimization concering ADDR_EXPRs.
13809
eff7e30c
AC
138102010-06-15 Arnaud Charlet <charlet@adacore.com>
13811
13812 * c-ada-spec.c (dump_sloc): Remove column info.
13813 (is_simple_enum): New function.
13814 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
13815 enum types when relevant.
13816
6312e84d
MLI
138172010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
13818
9faeb493 13819 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
13820 location.
13821
1cb42611
JM
138222010-06-10 Joseph Myers <joseph@codesourcery.com>
13823
13824 * c-opts.c (c_common_handle_option): Don't handle
13825 OPT_fshow_column.
13826
a9429e29
LB
138272010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
13828
13829 * c-pragma.c (push_alignment): Use typed GC allocation.
13830 (handle_pragma_push_options): Likewise.
13831
13832 * c-common.c (parse_optimize_options): Likewise.
13833
13834 * c-common.h (struct sorted_fields_type): Add variable_size GTY
13835 option.
13836
5498f011
JM
138372010-06-07 Joseph Myers <joseph@codesourcery.com>
13838
13839 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
13840 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
13841 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
13842 flag_signed_bitfields, warn_strict_null_sentinel,
13843 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
13844 flag_gen_declaration, flag_no_gnu_keywords,
13845 flag_implement_inlines, flag_implicit_templates,
13846 flag_implicit_inline_templates, flag_optional_diags,
13847 flag_elide_constructors, flag_default_inline, flag_rtti,
13848 flag_conserve_space, flag_access_control, flag_check_new,
13849 flag_new_for_scope, flag_weak, flag_working_directory,
13850 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
13851 flag_enforce_eh_specs, flag_threadsafe_statics,
13852 flag_pretty_templates): Remove.
13853 * c-common.h (flag_preprocess_only, flag_nil_receivers,
13854 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
13855 flag_replace_objc_classes, flag_undef, flag_no_builtin,
13856 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
13857 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
13858 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
13859 flag_no_gnu_keywords, flag_implement_inlines,
13860 flag_implicit_templates, flag_implicit_inline_templates,
13861 flag_optional_diags, flag_elide_constructors, flag_default_inline,
13862 flag_rtti, flag_conserve_space, flag_access_control,
13863 flag_check_new, flag_new_for_scope, flag_weak,
13864 flag_working_directory, flag_use_cxa_atexit,
13865 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
13866 flag_threadsafe_statics, flag_pretty_templates,
13867 warn_strict_null_sentinel): Remove.
13868 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
13869 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
13870 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
13871 fimplicit-inline-templates, fimplicit-templates,
13872 flax-vector-conversions, fms-extensions, fnil-receivers,
13873 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
13874 frtti, fshort-double, fshort-enums, fshort-wchar,
13875 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
13876 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
13877 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
13878 gen-decls, undef): Use Var.
13879 (fdefault-inline, foptional-diags): Document as doing nothing.
13880 * c-opts.c (c_common_handle_option): Remove cases for options now
13881 using Var. Mark ignored options as such.
13882
39dabefd
SB
138832010-06-05 Steven Bosscher <steven@gcc.gnu.org>
13884
9faeb493 13885 * c-common.c: Moved to here from parent directory.
39dabefd
SB
13886 * c-common.def: Likewise.
13887 * c-common.h: Likewise.
13888 * c-cppbuiltin.c: Likewise.
13889 * c-dump.c: Likewise.
13890 * c-format.c: Likewise.
13891 * c-format.h : Likewise.
13892 * c-gimplify.c: Likewise.
13893 * c-lex.c: Likewise.
13894 * c-omp.c: Likewise.
13895 * c.opt: Likewise.
13896 * c-opts.c: Likewise.
13897 * c-pch.c: Likewise.
13898 * c-ppoutput.c: Likewise.
13899 * c-pragma.c: Likewise.
13900 * c-pragma.h: Likewise.
13901 * c-pretty-print.c: Likewise.
13902 * c-pretty-print.h: Likewise.
13903 * c-semantics.c: Likewise.
13904 * stub-objc.c: Likewise.
13905
13906 * c-common.c: Include gt-c-family-c-common.h.
13907 * c-pragma.c: Include gt-c-family-c-pragma.h.
13908\f
68127a8e 13909Copyright (C) 2010-2023 Free Software Foundation, Inc.
39dabefd
SB
13910
13911Copying and distribution of this file, with or without modification,
13912are permitted in any medium without royalty provided the copyright
13913notice and this notice are preserved.