]> gcc.gnu.org Git - gcc.git/blame - gcc/c-family/ChangeLog
testsuite: Support { target c++20 } in tests.
[gcc.git] / gcc / c-family / ChangeLog
CommitLineData
11dd3be5
EB
12020-05-12 Eric Botcazou <ebotcazou@adacore.com>
2
3 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
4
b224c376
NS
52020-05-08 Nathan Sidwell <nathan@acm.org>
6
7 Reimplement directives only processing.
8 * c-ppoutput.c (token_streamer): Ne.
9 (directives_only_cb): New. Swallow ...
10 (print_lines_directives_only): ... this.
11 (scan_translation_unit_directives_only): Reimplment using the
12 published interface.
13
f1d94677
MP
142020-05-07 Marek Polacek <polacek@redhat.com>
15
16 * c-format.c (badwords): Add "nonstatic".
17
9b95bb52
JJ
18202-05-07 Jakub Jelinek <jakub@redhat.com>
19
20 PR c/94968
21 * c-common.c (speculation_safe_value_resolve_params): Return false if
22 error_operand_p (val2).
23 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
24 Remove extraneous semicolon.
25
530b4409 262020-05-06 qing zhao <qing.zhao@oracle.com>
27
28 PR c/94230
29 * c-indentation.c (get_visual_column): Add a hint to use the new
30 -flarge-source-files option.
31
b776bdca
SSF
322020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
33
34 * c-attribs.c (handle_vector_size_attribute): Add attribute
35 nonnull for argument args in order to silence warning of
36 uninitialized variable usage. Since this is local to the
37 compilation unit and thus cannot be checked at call sides by the
38 compiler, added an assert statement in order to verify this.
39
6607bdd9
L
402020-05-01 H.J. Lu <hongjiu.lu@intel.com>
41
42 PR target/93492
43 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
44 value to USHRT_MAX (65535).
45
691eeb65
JJ
462020-04-29 Jakub Jelinek <jakub@redhat.com>
47
48 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
49
26d76be7
JJ
502020-04-27 Jakub Jelinek <jakub@redhat.com>
51
52 PR c/94755
53 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
54 fncode == BUILT_IN_NONE before initialization of first_param.
55
7291b2ed
MP
562020-04-23 Marek Polacek <polacek@redhat.com>
57
58 PR c++/94733
59 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
60 TREE_PURPOSE.
61
58a29af8
PP
622020-04-14 Patrick Palka <ppalka@redhat.com>
63
64 PR c++/85278
65 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
66 ampersand if it's an rvalue reference type.
67
09f04139
MS
682020-04-13 Martin Sebor <msebor@redhat.com>
69
70 PR c/92326
71 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
72 printing array bound for flexible array members.
73
ee26baf4
IS
742020-04-13 Iain Sandoe <iain@sandoe.co.uk>
75
76 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
77 define, per n4861.
78
75efe9cb
RB
792020-04-02 Richard Biener <rguenther@suse.de>
80
81 PR c/94392
82 * c-opts.c (c_common_post_options): Enable -ffinite-loops
83 for -O2 and C++11 or newer.
84
75defde9
PP
852020-03-28 Patrick Palka <ppalka@redhat.com>
86
87 * c.opt: Add -fconcepts-diagnostics-depth.
88
52f24a9e
MS
892020-03-27 Martin Sebor <msebor@redhat.com>
90
91 PR c++/94346
92 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
93 to decl_attributes. Make handling of different kinds of entities
94 more robust.
95
ccacf77b
MS
962020-03-27 Martin Sebor <msebor@redhat.com>
97
98 PR c++/94098
99 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
100 here.
101
ca6c7225
JJ
1022020-03-23 Jakub Jelinek <jakub@redhat.com>
103
104 PR c++/91993
105 * c-warn.c (warnings_for_convert_and_check): For expr and/or
106 result being COMPOUND_EXPRs, skip to ultimate rhs.
107
1aa22b19
RS
1082020-03-20 Richard Sandiford <richard.sandiford@arm.com>
109
110 PR middle-end/94072
111 * c-common.c (c_common_type_for_mode): Before using a registered
112 built-in type, check that the vectorness of the type matches
113 the vectorness of the mode.
114
700d4cb0
JJ
1152020-03-17 Jakub Jelinek <jakub@redhat.com>
116
117 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
118 issue in a diagnostic message.
119
b408e010
LH
1202020-03-15 Lewis Hyatt <lhyatt@gmail.com>
121
122 * c.opt: Avoid redundancy in the help text.
123
e78e50d5
MP
1242020-03-02 Marek Polacek <polacek@redhat.com>
125
126 PR c++/93958 - add missing -std=gnu++20.
127 * c.opt: Add -std=gnu++20.
128
649e1741
MS
1292020-03-01 Martin Sebor <msebor@redhat.com>
130
131 PR c++/92721
132 * c-attribs.c (append_access_attrs): Correctly handle attribute.
133 (handle_access_attribute): Same.
134
7b60f3ba
JJ
1352020-02-25 Jakub Jelinek <jakub@redhat.com>
136
137 PR c/93858
138 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
139 "did you mean" hint in diagnostics.
140
fb260504
JM
1412020-02-15 Jason Merrill <jason@redhat.com>
142
143 * c.opt: Add -std=c++20.
144
1d757b09
EB
1452020-02-14 Eric Botcazou <ebotcazou@adacore.com>
146
147 * c-ada-spec.c: Include bitmap.h.
148 (dump_ada_double_name): Rename into...
149 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
150 (dump_ada_array_type): Adjust to above renaming. Robustify.
151 (dump_nested_types_1): New function copied from... Add dumped_types
152 parameter and pass it down to dump_nested_type.
153 (dump_nested_types): ...this. Remove parent parameter. Just call
154 dump_nested_types_1 on an automatic bitmap.
155 (dump_nested_type): Add dumped_types parameter.
156 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
157 Adjust recursive calls and adjust to above renaming.
158 (dump_ada_declaration): Adjust call to dump_nested_types.
159 Tidy up and adjust to above renaming.
160 (dump_ada_specs): Initialize and release bitmap obstack.
161
0cc575e4
MS
1622020-02-10 Martin Sebor <msebor@redhat.com>
163
164 PR c/93640
165 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
166
a59aa302
JJ
1672020-02-10 Jakub Jelinek <jakub@redhat.com>
168
169 PR other/93641
170 * c-format.c (check_plain): Fix up last argument of strncasecmp.
171 Remove useless extra test.
172
e464fc90
TB
1732020-02-03 Julian Brown <julian@codesourcery.com>
174 Tobias Burnus <tobias@codesourcery.com>
175
176 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
177
e3b6c052
JM
1782020-01-29 Jason Merrill <jason@redhat.com>
179
180 PR c++/89357
181 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
182
6d00f052
JM
1832020-01-23 Jason Merrill <jason@redhat.com>
184
185 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
186
8a990ffa
MS
1872020-01-23 Martin Sebor <msebor@redhat.com>
188
189 PR c/84919
190 * c-common.c (check_function_arguments): Avoid overlap checking
191 of sprintf functions.
192
55b7df8b
JM
1932020-01-22 Jason Merrill <jason@redhat.com>
194
195 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
196 PR c++/40752
197 * c-warn.c (conversion_warning): Check operands only after checking
198 the whole expression. Don't check second operand of + for sign.
199
c77074d0
JM
2002020-01-21 Jason Merrill <jason@redhat.com>
201 Manuel López-Ibáñez <manu@gcc.gnu.org>
202
203 PR c++/40752 - useless -Wconversion with short +=.
204 * c.opt (-Warith-conversion): New.
205 * c-warn.c (conversion_warning): Recurse for operands of
206 operators. Only warn about the whole expression with
207 -Warith-conversion.
208
731dbfc3
JM
2092020-01-21 Jason Merrill <jason@redhat.com>
210
211 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
212 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
213
ad1a3914
NS
2142020-01-20 Nathan Sidwell <nathan@acm.org>
215
216 PR preprocessor/80005
217 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
218
49789fd0
IS
2192020-01-18 Iain Sandoe <iain@sandoe.co.uk>
220
221 * c-common.c (co_await, co_yield, co_return): New.
222 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
223 RID_CO_RETURN): New enumeration values.
224 (D_CXX_COROUTINES): Bit to identify coroutines are active.
225 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
226 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
227 * c.opt (fcoroutines): New command-line switch.
228
4bc1899b
DM
2292020-01-10 David Malcolm <dmalcolm@redhat.com>
230
231 * c-format.c (local_event_ptr_node): New.
232 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
233 (init_dynamic_diag_info): Initialize local_event_ptr_node.
234 * c-format.h (T_EVENT_PTR): New define.
235
f25e33fa
MS
2362020-01-10 Martin Sebor <msebor@redhat.com>
237
238 PR c/93132
239 * c-attribs.c (append_access_attrs): Validate against the translated
240 access string rather than the human-readable representation.
241
8d9254fc
JJ
2422020-01-01 Jakub Jelinek <jakub@redhat.com>
243
244 Update copyright years.
245
39292e25
EB
2462019-12-20 Eric Botcazou <ebotcazou@adacore.com>
247
248 * c-ada-spec.h (decl_sloc): Delete.
249 * c-ada-spec.c (decl_sloc): Make static.
250
519d7496
JB
2512019-12-19 Julian Brown <julian@codesourcery.com>
252
253 * c-common.h (c_omp_map_clause_name): Add prototype.
254 * c-omp.c (c_omp_map_clause_name): New function.
255 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
256 PRAGMA_OACC_CLAUSE_DETACH.
257
a6163563
JB
2582019-12-19 Julian Brown <julian@codesourcery.com>
259 Maciej W. Rozycki <macro@codesourcery.com>
260 Tobias Burnus <tobias@codesourcery.com>
261 Thomas Schwinge <thomas@codesourcery.com>
262
263 * c-pragma.h (pragma_omp_clause): Add
264 PRAGMA_OACC_CLAUSE_NO_CREATE.
265
e8f1ade2
MS
2662019-12-17 Martin Sebor <msebor@redhat.com>
267
268 PR c++/61339
269 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
270
368877a1
DM
2712019-12-11 David Malcolm <dmalcolm@redhat.com>
272
273 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
274 implementation.
275 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
276
d68f5d45
DM
2772019-12-09 David Malcolm <dmalcolm@redhat.com>
278
279 * c-format.c (range_label_for_format_type_mismatch::get_text):
280 Replace label_text ctor called with true with label_text::take.
281
d3e28653
DM
2822019-12-09 David Malcolm <dmalcolm@redhat.com>
283
284 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
285 initial newline from expected outputs.
286 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
287 call to diagnostic_show_locus.
288
abd6d8cc
JJ
2892019-12-06 Jakub Jelinek <jakub@redhat.com>
290
291 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
292 now.
293
7906797e
MP
2942019-12-05 Marek Polacek <polacek@redhat.com>
295 Jakub Jelinek <jakub@redhat.com>
296
297 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
298 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
299
5c04da88
MP
3002019-12-05 Marek Polacek <polacek@redhat.com>
301
302 PR c++/92271 - make __is_same alias for __is_same_as.
303 * c-common.c: Add __is_same, an alias for __is_same_as.
304
43aae289
MP
3052019-12-03 Marek Polacek <polacek@redhat.com>
306
307 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
308 * c-cppbuiltin.c (c_cpp_builtins): Predefine
309 __cpp_aggregate_paren_init=201902 for -std=c++2a.
310
d7ddfbcb
JH
3112019-11-30 Jan Hubicka <hubicka@ucw.cz>
312
313 * c-attribs.c (handle_symver_attribute): New function
314 (c_common_attributes): Add symver.
315
65ef05d0
RS
3162019-11-30 Richard Sandiford <richard.sandiford@arm.com>
317
318 * c-common.c (pointer_int_sum): Use verify_type_context to check
319 whether the target allows pointer arithmetic for the types involved.
320 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
321 to check whether the target allows sizeof and alignof operations
322 for the types involved.
323
1a291106
JM
3242019-11-27 Jason Merrill <jason@redhat.com>
325
326 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
327
05d6cb1a
JJ
3282019-11-26 Jakub Jelinek <jakub@redhat.com>
329
330 PR c++/61414
331 * c-attribs.c (handle_mode_attribute): Add mode attribute to
332 ENUMERAL_TYPEs.
333
5b8d9367
JM
3342019-11-25 Joseph Myers <joseph@codesourcery.com>
335
336 PR c/91985
337 * c-common.c (c_common_type_for_mode): Handle decimal
338 floating-point types being NULL_TREE.
339 * c-format.c (get_format_for_type_1): Handle specified types being
340 NULL_TREE.
341 * c-lex.c (interpret_float): Give an error for decimal
342 floating-point constants when decimal floating-point not
343 supported.
344
1fbf51cb
JJ
3452019-11-23 Jakub Jelinek <jakub@redhat.com>
346
347 PR middle-end/83859
348 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
349 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
350 group warning with inform together.
351 (handle_access_attribute): Formatting fix.
352
761df906
JJ
3532019-11-22 Jakub Jelinek <jakub@redhat.com>
354
bdaf8be1
JJ
355 PR c/90677
356 * c-common.h (identifier_global_tag): Declare.
357 * c-format.c (get_pointer_to_named_type): Renamed to ...
358 (get_named_type): ... this. Use identifier_global_tag instead of
359 identifier_global_value, handle the return value being a TYPE_P.
360 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
361 to call get_named_type instead. Formatting fixes.
362
c2ecce6d 363 Implement P1902R1, Missing feature-test macros 2017-2019.
761df906
JJ
364 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
365 and __cpp_generic_lambdas for -std=c++2a. Define
366 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
367 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
368 __cpp_concepts for -std=c++2a.
369
54aa6b58
MS
3702019-11-22 Martin Sebor <msebor@redhat.com>
371
372 PR middle-end/83859
373 * c-attribs.c (handle_access_attribute): New function.
374 (c_common_attribute_table): Add new attribute.
375 (get_argument_type): New function.
376 (append_access_attrs): New function.
377 (get_nonnull_operand): Rename...
378 (get_attribute_operand): ...to this.
379 * c-common.c (get_nonnull_operand): Rename...
380 (get_attribute_operand): ...to this.
381
6c80b1b5
JM
3822019-11-21 Joseph Myers <joseph@codesourcery.com>
383
384 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
385 of warning.
386
192961ff
JM
3872019-11-19 Joseph Myers <joseph@codesourcery.com>
388
389 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
390 warning for standard attributes mixed with fallthrough attributes.
391
f8aea5e3
JM
3922019-11-15 Joseph Myers <joseph@codesourcery.com>
393
394 * c-attribs.c (handle_fallthrough_attribute): Remove static.
395 * c-common.h (handle_fallthrough_attribute): Declare.
396
2cc94aa8
JM
3972019-11-15 Joseph Myers <joseph@codesourcery.com>
398
399 * c-attribs.c (handle_deprecated_attribute): Remove static.
400 * c-common.h (handle_deprecated_attribute): Declare.
401
7c5890cc
JM
4022019-11-14 Joseph Myers <joseph@codesourcery.com>
403
404 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
405 char for C.
406
b2417b59
JJ
4072019-11-14 Jakub Jelinek <jakub@redhat.com>
408
d0ec7c93
JJ
409 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
410 valid vendors.
411
b2417b59
JJ
412 * c-omp.c (c_omp_check_context_selector): Handle name lists
413 containing string literals. Don't diagnose atomic_default_mem_order
414 with multiple props.
415
00be2a5f
JM
4162019-11-13 Joseph Myers <joseph@codesourcery.com>
417
418 * c-cppbuiltin.c (builtin_define_float_constants): Also define
419 NORM_MAX constants. Update call to get_max_float.
420 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
421 constants.
422
2dbad62d
EB
4232019-11-13 Eric Botcazou <ebotcazou@adacore.com>
424
425 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
426 (dump_forward_type): Do not generate a declaration for function types.
427 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
428 of the component type if it is declared in another file.
429
6ed76044
ML
4302019-11-12 Martin Liska <mliska@suse.cz>
431
432 * c-opts.c (c_common_post_options):
433 Use SET_OPTION_IF_UNSET.
434
62aee289
MR
4352019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
436 Frederik Harwath <frederik@codesourcery.com>
437
438 gcc/c-family/
439 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
440 constant.
441 * c-pragma.c (oacc_pragmas): Add "serial" entry.
442
f486280c
RS
4432019-11-08 Richard Sandiford <richard.sandiford@arm.com>
444
445 * c-common.h (gnu_vector_type_p): New function.
446 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
447 vectors to satisfy gnu_vector_type_p.
448 (c_build_vec_convert): Likewise __builtin_convertvector.
449 (convert_vector_to_array_for_subscript): Likewise when applying
450 implicit vector to array conversion.
451 (scalar_to_vector): Likewise when converting vector-scalar
452 operations to vector-vector operations.
453
017c6491
JM
4542019-11-08 Joseph Myers <joseph@codesourcery.com>
455
456 * c.opt (Wold-style-definition): Initialize to -1.
457 * c-opts.c (c_common_post_options): Set warn_old_style_definition
458 to flag_isoc2x if not set explicitly.
459
c01bd174
JM
4602019-11-07 Joseph Myers <joseph@codesourcery.com>
461
462 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
463
0df65305
JM
4642019-11-05 Jason Merrill <jason@redhat.com>
465
466 * c-opts.c (c_common_post_options): -fconcepts-ts implies
467 -fconcepts.
468
e0c866dd
KK
4692019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
470
471 * c-opts.c (c_common_post_options): Update
472 latest_abi_version.
473
f968ef9b
JJ
4742019-11-02 Jakub Jelinek <jakub@redhat.com>
475
d0c464d2
JJ
476 * c-common.h (c_omp_get_context_selector): Remove.
477 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
478 and renamed to omp_get_context_selector.
479
917dd789
JJ
480 * c-omp.c (c_omp_mark_declare_variant): Use
481 omp_context_selector_set_compare.
482
f968ef9b
JJ
483 PR c++/88335 - Implement P1073R3: Immediate functions
484 * c-common.h (enum rid): Add RID_CONSTEVAL.
485 * c-common.c (c_common_reswords): Add consteval.
486
5f6705b7
JJ
4872019-11-01 Martin Sebor <msebor@redhat.com>
488
489 PR middle-end/91679
490 PR middle-end/91647
491 PR middle-end/91463
492 PR middle-end/92312
493 * c-pretty-print.c (direct_abstract_declarator): Print
494 bound in zero-length arrays.
495 * c.opt (-Wzero-length-bounds): New option.
496
43f1814c
NS
4972019-10-30 Nathan Sidwell <nathan@acm.org>
498
499 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
500 macros.
501
ad1539d5
MS
5022019-10-28 Martin Sebor <msebor@redhat.com>
503
504 PR c/66970
505 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
506 even when only preprocessing.
507 * c-common.h (names_builtin_p): Declare new function.
508 * c-lex.c (init_c_lex): Set has_builtin.
509 (c_common_has_builtin): Define a new function.
510 * c-ppoutput.c (init_pp_output): Set has_builtin.
511
135df52c
JJ
5122019-10-24 Jakub Jelinek <jakub@redhat.com>
513
514 * c-common.h (c_omp_context_selector_matches): Remove.
515 * c-omp.c (c_omp_context_selector_matches): Remove.
516 * c-attribs.c (c_common_attribute_table): Add
517 "omp declare target {host,nohost,block}" attributes.
518
8ad0c477
JM
5192019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
520
521 * c-lex.c (c_common_has_attribute): Update nodiscard value.
522
56898e43
RS
5232019-10-14 Richard Sandiford <richard.sandiford@arm.com>
524
525 * c-common.h (user_facing_original_type_p): Declare.
526 * c-common.c: Include c-spellcheck.h.
527 (user_facing_original_type_p): New function.
528
20de9568
JJ
5292019-10-12 Jakub Jelinek <jakub@redhat.com>
530
531 * c-common.h (c_omp_mark_declare_variant,
532 c_omp_context_selector_matches): Declare.
533 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
534 and hsa-common.h.
535 (c_omp_get_context_selector): Support second argument NULL.
536 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
537 functions.
538 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
539 attribute, add "omp declare variant base" and
540 "omp declare variant variant" attributes.
541
175a85b2
JM
5422019-10-11 Joseph Myers <joseph@codesourcery.com>
543
544 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
545 CppReason(CPP_W_C11_C2X_COMPAT).
546
fe2bc27c
JM
5472019-10-11 Joseph Myers <joseph@codesourcery.com>
548
549 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
550 _Decimal64 and _Decimal128.
551
27dfdc0f
JM
5522019-10-10 Joseph Myers <joseph@codesourcery.com>
553
554 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
555 types if DFP not supported.
556
94e7f906
JJ
5572019-10-10 Jakub Jelinek <jakub@redhat.com>
558
559 * c-common.h (c_omp_check_context_selector,
560 c_omp_get_context_selector): Declare.
561 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
562 in diagnostic message.
563 (c_omp_check_context_selector, c_omp_get_context_selector): New
564 functions.
565 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
566 attribute.
567 (handle_omp_declare_variant_attribute): New function.
568
a7160771
MS
5692019-10-09 Martin Sebor <msebor@redhat.com>
570
571 PR tree-optimization/90879
572 * c.opt (-Wstring-compare): New option.
573
cb57504a
JM
5742019-10-08 Andrew Sutton <asutton@lock3software.com>
575 Jason Merrill <jason@redhat.com>
576
577 Update the concepts implementation to conform to the C++20
578 specification, improve compile times, and generally clean up
579 the implementation.
580
581 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
582 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
583 * c.opt: Add -Wconcepts-ts.
584 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
585 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
586 (set_std_cxx2a): Enable concepts by default.
587
fbb2a6dc
JM
5882019-10-08 Joseph Myers <joseph@codesourcery.com>
589
590 * c-opts.c (c_common_post_options): Set
591 -fno-fp-int-builtin-inexact for C2X.
592
8e007055
JJ
5932019-10-05 Jakub Jelinek <jakub@redhat.com>
594
595 PR c++/91369 - Implement P0784R7: constexpr new
596 * c-cppbuiltin.c (c_cpp_builtins): Predefine
597 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
598
843f104d
JM
5992019-10-04 Joseph Myers <joseph@codesourcery.com>
600
601 PR c/82752
602 * c-format.c (C_STD_VER): Handle C2x.
603 (C_STD_NAME): Likewise.
604 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
605 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
606 modifier allowed and 'p' flag.
607 * c-format.h (enum format_std_version): Add STD_C2X.
608 (struct format_char_info): Mention 'p' in comment on flags2.
609
e9c9a142
DM
6102019-10-01 David Malcolm <dmalcolm@redhat.com>
611
612 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
613 calling diagnostic_show_locus, rather than destroying it afterwards.
614
7552c36a
JJ
6152019-10-01 Jakub Jelinek <jakub@redhat.com>
616
617 PR c++/91925
618 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
619 with NULL DECL_FIELD_OFFSET.
620
8209db25
RS
6212019-10-01 Richard Sandiford <richard.sandiford@arm.com>
622
623 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
624 has a type name, use it in preference to the __vector syntax.
625
9343bf99
RS
6262019-09-30 Richard Sandiford <richard.sandiford@arm.com>
627
628 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
629 two spaces between a comma and "...".
630
59bc434a
JJ
6312019-09-27 Jakub Jelinek <jakub@redhat.com>
632
633 PR c++/88203
634 * c-common.h (c_omp_predefined_variable): Declare.
635 * c-omp.c (c_omp_predefined_variable): New function.
636 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
637 for predefined variables.
638
c6447c20
RS
6392019-09-27 Richard Sandiford <richard.sandiford@arm.com>
640
641 * c-common.h (build_function_call_vec): Take the original
642 function decl as an optional final parameter.
643 (check_builtin_function_arguments): Take the original function decl.
644 * c-common.c (check_builtin_function_arguments): Likewise.
645 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
646 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
647
c4438114
JM
6482019-09-15 Jason Merrill <jason@redhat.com>
649
650 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
651 fold_for_warn in "|| mask" warning.
652
68a57628
ML
6532019-09-10 Martin Liska <mliska@suse.cz>
654
655 * c.opt: Use newly added WarnRemoved.
656
f48ef52e
ML
6572019-09-09 Martin Liska <mliska@suse.cz>
658
659 * c.opt: Update comment of removed
660 options that are preserved only for backward
661 compatibility.
662
67f6e649
ML
6632019-09-06 Martin Liska <mliska@suse.cz>
664
665 PR c++/91125
666 * c-common.c: Remove definition of flag_use_repository.
667 * c-common.h: Likewise.
668 * c-opts.c (c_common_handle_option):
669 Do not handle OPT_frepo option.
670 * c.opt: Mark the option with Deprecated.
671
db9d2274
MP
6722019-09-04 Marek Polacek <polacek@redhat.com>
673
674 * c.opt (fdeduce-init-list): Ignored.
675
68e2c199
PK
6762019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
677
678 PR c/78736
679 * c.opt (Wenum-conversion): New option.
680
7a4418a5
JL
6812019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
682
683 * c-attribs.c (handle_section_attribute): Call the
684 handle_generic_attribute target hook after performing target
685 independent processing.
686 (handle_noinit_attribute): Likewise.
687
5f76ab15
ILT
6882019-09-03 Ian Lance Taylor <iant@golang.org>
689
690 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
691 when using -fgo-dump-spec.
692
ae0d3f6a
ML
6932019-09-02 Martin Liska <mliska@suse.cz>
694
695 PR c++/91155
696 * c-common.c (fname_as_string): Use cxx_printable_name for
697 __PRETTY_FUNCTION__ same as was used before r265711.
698
8a902edb
MP
6992019-08-28 Marek Polacek <polacek@redhat.com>
700
701 Implement P1152R4: Deprecating some uses of volatile.
702 PR c++/91361
703 * c-opts.c (c_common_post_options): Enable -Wvolatile by
704 default for C++2a, unless -Wno-deprecated.
705 * c.opt (Wvolatile): New warning.
706
4742dbe7
MP
7072019-08-28 Marek Polacek <polacek@redhat.com>
708
709 PR c++/91360 - Implement C++20 P1143R2: constinit.
710 * c-common.c (c_common_reswords): Add constinit and __constinit.
711 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
712 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
713 RID_LAST_CXX20.
714 (D_CXX20): Define.
715 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
716 * c-format.c (cxx_keywords): Add "constinit".
717 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
718
6a074892
JJ
7192019-08-27 Jakub Jelinek <jakub@redhat.com>
720
721 PR c++/91415
722 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
723 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
724 like COMPOUND_EXPR rather than normal expression.
725
22f8849d
IS
7262019-08-23 Iain Sandoe <iain@sandoe.co.uk>
727
728 PR pch/61250
729 * c-lex.c (c_lex_with_flags): Don't call
730 c_common_no_more_pch () from here.
731
df375b03
JJ
7322019-08-23 Jakub Jelinek <jakub@redhat.com>
733
734 PR middle-end/91283
735 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
736 instead of flag_excess_precision_cmdline.
737 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
738 * c-opts.c (c_common_post_options): Likewise.
739
14b7950f
MS
7402019-08-22 Martin Sebor <msebor@redhat.com>
741
742 PR middle-end/91490
743 * c-common.c (braced_list_to_string): Add argument and overload.
744 Handle flexible length arrays and unions.
745
8bb2ee59
EB
7462019-08-21 Eric Botcazou <ebotcazou@adacore.com>
747
748 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
749 function declarations where arguments are missing. Rename variables.
750
21c1e205
RB
7512019-08-15 Richard Biener <rguenther@suse.de>
752
753 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
754 enabled, define __SIZETYPE__.
755
f0033821
CL
7562019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
757
758 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
759 exclusion with "section" attribute.
760 (attr_noinit_exclusions): New table.
761 (handle_noinit_attribute): New function.
762
4d732405
RS
7632019-08-13 Richard Sandiford <richard.sandiford@arm.com>
764
765 PR middle-end/91421
766 * c-common.c (resolve_overloaded_builtin): Use
767 copy_decl_built_in_function.
768
51ad8481
MS
7692019-08-13 Martin Sebor <msebor@redhat.com>
770
771 PR c/80619
772 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
773 (asm_fprintf_length_spec): Same.
774 * c-format.h (format_lengths): Add FMT_LEN_w.
775
77eb117f
JJ
7762019-08-10 Jakub Jelinek <jakub@redhat.com>
777
778 * c-pragma.h (enum pragma_omp_clause): Add
779 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
780
398e3feb
JJ
7812019-08-07 Jakub Jelinek <jakub@redhat.com>
782
783 * c-pragma.h (enum pragma_omp_clause): Add
784 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
785 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
786 enumeration value.
787
ab574db6
MP
7882019-08-05 Marek Polacek <polacek@redhat.com>
789
790 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
791 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
792 default for C++2a, unless -Wno-deprecated.
793 * c.opt (Wcomma-subscript): New warning.
794
554a530f
JJ
7952019-07-20 Jakub Jelinek <jakub@redhat.com>
796
797 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
798 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
799 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
800 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
801 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
802 constructs with the loop construct.
803
1a888209
JJ
8042019-07-13 Jakub Jelinek <jakub@redhat.com>
805
806 PR c/91149
807 * c-omp.c (c_omp_split_clauses): Fix a pasto in
808 OMP_CLAUSE_REDUCTION_TASK handling.
809
1fdd6f04
JJ
8102019-07-12 Jakub Jelinek <jakub@redhat.com>
811
812 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
813 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
814
99b1c316
MS
8152019-07-09 Martin Sebor <msebor@redhat.com>
816
817 PR c++/61339
1fdd6f04 818 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
819 and others to class.
820 * c-pretty-print.h: Same.
821
6c1dae73
MS
8222019-07-09 Martin Sebor <msebor@redhat.com>
823
824 PR c++/61339
825 * c-format.c (check_argument_type): Change class-key from class to
826 struct and vice versa to match convention and avoid -Wclass-is-pod
827 and -Wstruct-no-pod.
828 * c-pretty-print.h: Same.
829
8ba6ea87
ML
8302019-07-03 Martin Liska <mliska@suse.cz>
831
832 * c-common.c (try_to_locate_new_include_insertion_point): Remove
833 dead assignemts.
834
83eb9522
JJ
8352019-07-03 Jakub Jelinek <jakub@redhat.com>
836
837 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
838 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
839 with OMP_PARALLEL.
840
1c6ffbab
QZ
8412019-07-02 qing zhao <qing.zhao@oracle.com>
842
843 PR preprocessor/90581
844 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
845 * c.opt: Add new option -fmax-include-depth.
846
7ffc7de5
JM
8472019-06-26 Jason Merrill <jason@redhat.com>
848
849 PR c++/55442 - memory-hog with highly recursive constexpr.
850 * c.opt (fconstexpr-loop-limit): New.
851
361af3e4
JJ
8522019-06-25 Jakub Jelinek <jakub@redhat.com>
853
854 PR sanitizer/90954
855 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
856 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
857
ab20d992
JJ
8582019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
859
860 * c-common.c (c_common_nodes_and_builtins): Define
861 alternate "__intN__" name for "__intN" types.
862
f4af4019
JH
8632019-06-24 Jan Hubicka <jh@suse.cz>
864
865 * c-common.c (braced_lists_to_strings): Check that
866 type is array or integer prior checking string flag.
867
da9e9b57
MB
8682019-06-21 Matthew Beliveau <mbelivea@redhat.com>
869
870 PR c++/90875 - added -Wswitch-outside-range option
871 * c.opt (Wswitch-outside-range): Added new option.
872 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
873
3f3d6a6f
MP
8742019-06-21 Marek Polacek <polacek@redhat.com>
875
876 PR c++/90953 - ICE with -Wmissing-format-attribute.
877 * c-common.c (check_function_arguments_recurse): Use
878 get_attribute_name.
879 (check_missing_format_attribute): Likewise.
880
1bf32c11
MP
8812019-06-19 Marek Polacek <polacek@redhat.com>
882
883 PR c++/60364 - noreturn after first decl not diagnosed.
884 * c-attribs.c (handle_noreturn_attribute): No longer static.
885 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
886 Declare.
887 * c-format.c (check_function_format): Use get_attribute_name.
888
a04c0734
MS
8892019-06-19 Martin Sebor <msebor@redhat.com>
890
891 PR translation/90156
892 * c-format.c (function_format_info::format_type): Adjust type.
893 (function_format_info::is_raw): New member.
894 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
895 (decode_format_attr): Adjust call to decode_format_type.
896 Avoid a redundant call to convert_format_name_to_system_name.
897 Avoid abbreviating the word "arguments" in a diagnostic.
898 (format_warning_substr): New function.
899 (avoid_dollar_number): Quote dollar sign in a diagnostic.
900 (finish_dollar_format_checking): Same.
901 (check_format_info): Same.
902 (struct baltoks_t): New.
903 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
904 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
905 functions.
906 (check_format_info_main): Call check_plain. Use baltoks_t. Call
907 maybe_diag_unbalanced_tokens.
908 (handle_format_attribute): Spell out the word "arguments" in
909 a diagnostic.
910
d3786ebb
MB
9112019-06-11 Matthew Beliveau <mbelivea@redhat.com>
912
913 PR c++/90449 - add -Winaccessible-base option.
914 * c.opt (Winaccessible-base): New option.
915
bf38f7e9
JJ
9162019-06-10 Jakub Jelinek <jakub@redhat.com>
917
918 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
919 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
920 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
921 combined/composite constructs where it is not allowed. Copy over
922 OMP_CLAUSE_REDUCTION_INSCAN.
923
0ecf545c
MS
9242019-06-05 Martin Sebor <msebor@redhat.com>
925
926 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
927 (handle_alias_ifunc_attribute): Same.
928 (handle_copy_attribute): Same.
929 (handle_weakref_attribute): Same.
930 (handle_nonnull_attribute): Same.
931 * c-warn.c (warn_for_sign_compare): Same.
932 (warn_for_restrict): Same.
933 * c.opt: Same.
934
36b34127
MS
9352019-06-05 Martin Sebor <msebor@redhat.com>
936
937 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
938 * c.opt (-Wformat-diag): Remove a spurious period.
939
357a352f
JJ
9402019-05-29 Jakub Jelinek <jakub@redhat.com>
941
942 PR c/90628
943 * c-common.c (check_builtin_function_arguments)
944 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
945 as last argument.
946
2b8235ea
EB
9472019-05-23 Eric Botcazou <ebotcazou@adacore.com>
948
949 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
950
6d86ddc4
ML
9512019-05-22 Martin Liska <mliska@suse.cz>
952
953 PR lto/90500
954 * c-attribs.c (handle_copy_attribute): Do not copy
955 target_clones attribute.
956
419ba5b9
EB
9572019-05-21 Eric Botcazou <ebotcazou@adacore.com>
958
959 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
960 * c-ada-spec.c (print_assignment_operator): New function.
961 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
962 assignment operators declared as methods and filter out the others.
963
e03436e7
TS
9642019-05-17 Thomas Schwinge <thomas@codesourcery.com>
965
966 PR c/89433
967 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
968 "omp declare target".
969
a9c697b8
MS
9702019-05-16 Martin Sebor <msebor@redhat.com>
971
ab20d992
JJ
972 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
973 keywords, operators, and types in diagnostics.
974 (handle_scalar_storage_order_attribute): Same.
975 (handle_mode_attribute): Same.
976 (handle_visibility_attribute): Same.
977 (handle_assume_aligned_attribute): Same.
978 (handle_no_split_stack_attribute): Same.
979 * c-common.c (shorten_compare): Same.
980 (c_common_truthvalue_conversion): Same.
981 (cb_get_source_date_epoch): Same.
982 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
983 in diagnostics.
984 (interpret_float): Same.
985 * c-omp.c (c_finish_omp_for): Same.
986 * c-opts.c (c_common_post_options): Same.
987 * c-pch.c (c_common_pch_pragma): Same.
988 * c-pragma.c (pop_alignment): Same.
989 (handle_pragma_pack): Same.
990 (apply_pragma_weak): Same.
991 (handle_pragma_weak): Same.
992 (handle_pragma_scalar_storage_order): Same.
993 (handle_pragma_redefine_extname): Same.
994 (add_to_renaming_pragma_list): Same.
995 (maybe_apply_renaming_pragma): Same.
996 (push_visibility): Same.
997 (handle_pragma_visibility): Same.
998 (handle_pragma_optimize): Same.
999 (handle_pragma_message): Same.
1000 * c-warn.c (warn_for_omitted_condop): Same.
1001 (lvalue_error): Same.
a9c697b8 1002
6b943512
RB
10032019-05-15 Richard Biener <rguenther@suse.de>
1004
1005 PR c/90474
1006 * c-common.c (c_common_mark_addressable_vec): Also mark
1007 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
1008 c_mark_addressable.
ab20d992 1009
b744fc85
NS
10102019-05-06 Nathan Sidwell <nathan@acm.org>
1011
1012 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
1013
598f50d7
NS
10142019-04-30 Nathan Sidwell <nathan@acm.org>
1015
1016 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
1017
5bcc5a3b
ML
10182019-04-30 Martin Liska <mliska@suse.cz>
1019
1020 * c-pragma.c (handle_pragma_diagnostic): Provide hints
1021 for unknown options.
1022
e78a87f7
RS
10232019-04-26 Richard Sandiford <richard.sandiford@arm.com>
1024
1025 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
1026 the pointer target rather than the pointer itself.
1027
c280b7ee
JJ
10282019-04-19 Jakub Jelinek <jakub@redhat.com>
1029
1030 PR c/89888
1031 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
1032 arguments.
1033 (c_do_switch_warnings): Remove outside_range_p argument.
1034 * c-common.c (check_case_bounds): Removed.
1035 (c_add_case_label): Remove orig_type and outside_range_p arguments.
1036 Don't call check_case_bounds. Fold low_value as well as high_value.
1037 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
1038 Check for case labels outside of range of original type here and
1039 adjust them.
1040
8e8225e6
JJ
10412019-04-12 Jakub Jelinek <jakub@redhat.com>
1042
63b8a166
JJ
1043 PR translation/90041
1044 * c.opt (-fhandle-exceptions): Use %< and %> around option names
1045 in the Warn diagnostics.
1046
8e8225e6
JJ
1047 PR c/89946
1048 * c-attribs.c (handle_patchable_function_entry_attribute): Add
1049 function comment. Warn if arguments of the attribute are not positive
1050 integer constants.
1051
53a3f614
EB
10522019-04-09 Eric Botcazou <ebotcazou@adacore.com>
1053
1054 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
1055 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
1056
22be5873
EB
10572019-04-07 Eric Botcazou <ebotcazou@adacore.com>
1058
1059 * c-ada-spec.c (is_float128): New predicate extracted from...
1060 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
1061 <REAL_TYPE>: ...here. Call it.
1062
34facf20
DM
10632019-04-05 David Malcolm <dmalcolm@redhat.com>
1064
1065 PR c/89985
1066 * c-warn.c (check_address_or_pointer_of_packed_member): Add
1067 auto_diagnostic_group. Guard inform calls by result of
1068 warning_at call.
1069
05564120
MP
10702019-04-05 Marek Polacek <polacek@redhat.com>
1071
ab20d992 1072 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
05564120
MP
1073 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
1074 of RHS.
1075
7a506c3c
JM
10762019-04-03 Jason Merrill <jason@redhat.com>
1077
1078 PR c++/86586 - -fcompare-debug=-Wsign-compare.
1079 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
1080
ddeae8c8
MS
10812019-04-01 Martin Sebor <msebor@redhat.com>
1082
1083 PR c/89685
1084 * c-attribs.c (handle_copy_attribute): Handle references and
1085 non-constant expressions.
1086
a15ffa22
JJ
10872019-03-22 Jakub Jelinek <jakub@redhat.com>
1088
1089 PR c++/87481
1090 * c.opt (-fconstexpr-ops-limit=): New option.
1091
36a3a7a3
JJ
10922019-03-21 Jakub Jelinek <jakub@redhat.com>
1093
1094 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
1095 template param.
1096
bec1da64
MS
10972019-03-19 Martin Sebor <msebor@redhat.com>
1098
1099 PR tree-optimization/89688
1100 * c-common.c (braced_list_to_string): Make static.
1101 (braced_lists_to_strings): Define new function.
1102 * c-common.h (braced_list_to_string): Remove.
1103 (braced_lists_to_strings): Declare.
1104
1fe61adf
ML
11052019-03-12 Martin Liska <mliska@suse.cz>
1106
1107 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
1108
93964ebd
ML
11092019-03-11 Martin Liska <mliska@suse.cz>
1110
1111 * c-opts.c (c_common_post_options): Wrap apostrophes
1112 in gcc internal format with %'.
1113
a3f9f006
ML
11142019-03-11 Martin Liska <mliska@suse.cz>
1115
1116 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
1117 in a string format message and fix GNU coding style.
1118 * c-common.c (vector_types_convertible_p): Likewise.
1119 (c_build_vec_perm_expr): Likewise.
1120 * c-indentation.c (get_visual_column): Likewise.
1121 * c-opts.c (c_common_handle_option): Likewise.
1122 (c_common_post_options): Likewise.
1123 (sanitize_cpp_opts): Likewise.
1124 * c-pch.c (c_common_pch_pragma): Likewise.
1125 * c-pragma.c (handle_pragma_pack): Likewise.
1126
1db01ff9
JJ
11272019-03-08 Jakub Jelinek <jakub@redhat.com>
1128
1129 PR tree-optimization/89550
1130 * c-common.c (c_common_truthvalue_conversion): Only set
1131 TREE_NO_WARNING if warning_at returned true.
1132 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
1133
ba790e6f
JJ
11342019-02-25 Sandra Loosemore <sandra@codesourcery.com>
1135 Martin Sebor <msebor@gmail.com>
1136
1137 * c.opt (Wmissing-attributes): Clean up doc string.
1138
7da73ba7
JJ
11392019-02-25 Jakub Jelinek <jakub@redhat.com>
1140
1141 PR c/89495
1142 * c-format.c (maybe_read_dollar_number): Compute nargnum in
1143 HOST_WIDE_INT type to avoid overflows and change overflow_flag
1144 checking.
1145
921bb9d1
RB
11462019-02-22 Richard Biener <rguenther@suse.de>
1147
1148 * c-pch.c (no_checksum): Remove.
1149 (pch_init): Remove assertion that executable_checksum is not
1150 all zero.
1151 (c_common_valid_pch): Likewise.
1152
e2ebb05c
MS
11532019-02-18 Martin Sebor <msebor@redhat.com>
1154
1155 PR middle-end/89294
1156 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
1157
3fe53000
DM
11582019-02-16 David Malcolm <dmalcolm@redhat.com>
1159
1160 PR c++/88680
1161 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
1162 implementing -Wtype-limits.
1163
28a8cef1
MS
11642019-02-11 Martin Sebor <msebor@redhat.com>
1165
1166 PR c++/87996
1167 * c-common.c (invalid_array_size_error): New function.
1168 (valid_array_size_p): Call it. Handle size as well as type.
1169 * c-common.h (valid_constant_size_p): New function.
1170 (enum cst_size_error): New type.
1171
ec2be203
DM
11722019-01-31 David Malcolm <dmalcolm@redhat.com>
1173
1174 PR c/89122
1175 * known-headers.cc (get_stdlib_header_for_name): Add
1176 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
1177
8936f047
JJ
11782019-01-31 Jakub Jelinek <jakub@redhat.com>
1179
1180 PR libstdc++/88170
1181 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
1182 a C cast in pp_c_flag_gnu_v3 mode.
1183
6a335b96
JJ
11842019-01-29 Jakub Jelinek <jakub@redhat.com>
1185
1186 PR c/86125
1187 * c-common.c (c_common_nodes_and_builtins): Build type variants for
1188 builtin_structptr_types types even for C.
1189
2a06eba5
BE
11902019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
1191
1192 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
1193 when rhs is of array type correctly. Fix handling of nested structures.
1194 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
1195 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
1196 type casts within nested compound expressions.
1197
18a23298
JJ
11982019-01-22 Jakub Jelinek <jakub@redhat.com>
1199
1200 PR middle-end/88968
1201 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
1202 variable after using BIT_FIELD_REF.
1203
420183d9
L
12042019-01-18 H.J. Lu <hongjiu.lu@intel.com>
1205
1206 PR c/51628
1207 PR c/88664
1208 * c-common.h (warn_for_address_or_pointer_of_packed_member):
1209 Remove the boolean argument.
1210 * c-warn.c (check_address_of_packed_member): Renamed to ...
1211 (check_address_or_pointer_of_packed_member): This. Also
1212 warn pointer conversion.
1213 (check_and_warn_address_of_packed_member): Renamed to ...
1214 (check_and_warn_address_or_pointer_of_packed_member): This.
1215 Also warn pointer conversion.
1216 (warn_for_address_or_pointer_of_packed_member): Remove the
1217 boolean argument. Don't check pointer conversion here.
1218
99063eee
RS
12192019-01-15 Richard Sandiford <richard.sandiford@arm.com>
1220
1221 PR inline-asm/52813
1222 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
1223
a30d0196
JJ
12242019-01-14 Jakub Jelinek <jakub@redhat.com>
1225
1226 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
1227 and __cpp_nontype_template_parameter_auto. Add a comment that
1228 __cpp_template_auto is deprecated.
1229
2d91f79d
TH
12302019-01-14 Tom Honermann <tom@honermann.net>
1231
1232 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
1233 * c-common.c (c_common_reswords): Add char8_t.
1234 (fix_string_type): Use char8_t for the type of u8 string literals.
1235 (c_common_get_alias_set): char8_t doesn't alias.
1236 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
1237 C++.
1238 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
1239 (keyword_begins_type_specifier): Add RID_CHAR8.
1240 * c-common.h (rid): Add RID_CHAR8.
1241 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
1242 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
1243 Define char8_type_node and char8_array_type_node.
1244 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
1245 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
1246 (c_cpp_builtins): Predefine __cpp_char8_t.
1247 * c-lex.c (lex_string): Use char8_array_type_node as the type of
1248 CPP_UTF8STRING.
1249 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
1250 * c-opts.c: If not otherwise specified, enable -fchar8_t when
1251 targeting C++2a.
1252 * c.opt: Add the -fchar8_t command line option.
1253
23db6ced
MS
12542019-01-14 Martin Sebor <msebor@redhat.com>
1255
1256 PR target/88638
1257 * c-attribs.c (positional_argument): Call valid_format_string_type_p
1258 and issue errors if it fails.
1259 * c-common.h (valid_format_string_type_p): Declare.
1260 * c-format.c (valid_stringptr_type_p): Rename...
1261 (valid_format_string_type_p): ...to this and make extern.
1262 (handle_format_arg_attribute): Adjust to new name.
1263 (check_format_string): Same.
1264
234c3818
L
12652019-01-13 H.J. Lu <hongjiu.lu@intel.com>
1266
1267 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
1268 Replace "may may" with "may" in warning message.
1269
d8fcab68
JJ
12702019-01-07 Jakub Jelinek <jakub@redhat.com>
1271
1272 PR c++/85052
1273 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
1274 (c_build_vec_convert): Declare.
1275 * c-common.c (c_build_vec_convert): New function.
1276
29d24852
MS
12772019-01-04 Martin Sebor <msebor@redhat.com>
1278
1279 PR c/88546
1280 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
1281 Handle C++ empty throw specification and C11 _Noreturn.
1282 (has_attribute): Also handle C11 _Noreturn.
1283
9069a4c9
MS
12842019-01-04 Martin Sebor <msebor@redhat.com>
1285
1286 PR c/88363
1287 * c-attribs.c (positional_argument): Also accept enumerated types.
1288
a5544970
JJ
12892019-01-01 Jakub Jelinek <jakub@redhat.com>
1290
1291 Update copyright years.
1292
da77eace
L
12932018-12-20 H.J. Lu <hongjiu.lu@intel.com>
1294
1295 PR c/51628
1296 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
1297 * c-warn.c (check_alignment_of_packed_member): New function.
1298 (check_address_of_packed_member): Likewise.
1299 (check_and_warn_address_of_packed_member): Likewise.
1300 (warn_for_address_or_pointer_of_packed_member): Likewise.
1301 * c.opt: Add -Wno-address-of-packed-member.
1302
573767d4
DM
13032018-12-20 David Malcolm <dmalcolm@redhat.com>
1304
1305 PR c++/87504
1306 * c-warn.c (get_outermost_macro_expansion): New function.
1307 (spelled_the_same_p): Use it to unwind the macro expansions, and
1308 compare the outermost macro in each nested expansion, rather than
1309 the innermost.
1310
a14feb3c
DM
13112018-12-19 David Malcolm <dmalcolm@redhat.com>
1312
1313 PR c++/87504
1314 * c-common.h (warn_tautological_cmp): Convert 1st param from
1315 location_t to const op_location_t &.
1316 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
1317 when testing for INTEGER_CST.
1318 (warn_tautological_bitwise_comparison): Convert 1st param from
1319 location_t to const op_location_t &; use it to build a
1320 binary_op_rich_location, and use this.
1321 (spelled_the_same_p): New function.
1322 (warn_tautological_cmp): Convert 1st param from location_t to
1323 const op_location_t &. Warn for macro expansions if
1324 spelled_the_same_p. Use binary_op_rich_location.
1325
dfd7fdca
DM
13262018-12-19 David Malcolm <dmalcolm@redhat.com>
1327
1328 PR c++/43064
1329 PR c++/43486
1330 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
1331 (verify_tree): Handle location wrappers.
1332 (c_common_truthvalue_conversion): Strip any location wrapper.
1333 Handle CONST_DECL.
1334 (fold_offsetof): Strip any location wrapper.
1335 (complete_array_type): Likewise for initial_value.
1336 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
1337 index before checking for INTEGER_CST.
1338 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
1339 print parentheses around location wrappers.
1340 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
1341 before checking for INTEGER_CST.
1342 (warn_tautological_bitwise_comparison): Call
1343 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
1344 before checking for INTEGER_CST.
1345 (readonly_error): Strip any location wrapper.
1346 (warn_array_subscript_with_type_char): Strip location wrappers
1347 before checking for INTEGER_CST. Use the location of the index if
1348 available.
1349
5c8b3702
JM
13502018-12-06 Jason Merrill <jason@redhat.com>
1351
1352 PR c++/88136 - -Wdeprecated-copy false positives
1353 * c.opt (Wdeprecated-copy-dtor): New.
1354 (Wdeprecated-copy): Move to -Wextra.
1355
673670da
MS
13562018-11-29 Martin Sebor <msebor@redhat.com>
1357
1358 PR c/88172
1359 PR testsuite/88208
1360 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
1361 alignments to values less than the target requires.
1362 (has_attribute): For attribute aligned consider both the attribute
1363 and the alignment bits.
1364 * c-common.c (c_init_attributes): Optionally issue a warning for
1365 zero alignment.
1366
04864ec8
MS
13672018-11-28 Martin Sebor <msebor@redhat.com>
1368
1369 PR c/88065
1370 PR c/87297
1371 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
1372 or destination is an error.
1373
ace83db0
JJ
13742018-11-28 Jakub Jelinek <jakub@redhat.com>
1375
1376 PR c++/88215
1377 * c-ubsan.c: Include langhooks.h.
1378 (ubsan_instrument_division): Change gcc_assert that main variants
1379 of op0 and op1 types are equal to gcc_checking_assert that the
1380 main variants are compatible types.
1381
da193a27
EB
13822018-11-27 Eric Botcazou <ebotcazou@adacore.com>
1383
1384 * c-ada-spec.c: Include stringpool.h.
1385 (has_static_fields): Return false for incomplete types.
1386 (is_tagged_type): Likewise.
1387 (has_nontrivial_methods): Likewise.
1388 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
1389 (struct overloaded_name_hash): New structure.
1390 (struct overloaded_name_hasher): Likewise.
1391 (overloaded_names): New global variable.
1392 (init_overloaded_names): New static function.
1393 (overloaded_name_p): New predicate.
1394 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
1395 on the TYPE_STUB_DECL of the original type of a typedef, if any.
1396 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
1397 Remove always-true condition and dump forward types.
1398 (dump_ada_specs): Delete overloaded_names.
1399
98f08eb8
MS
14002018-11-20 Martin Sebor <msebor@redhat.com>
1401
1402 * c-attribs.c (type_for_vector_size): New function.
1403 (type_valid_for_vector_size): Same.
1404 (handle_vector_size_attribute): Move code to the functions above
1405 and call them.
1406 (validate_attribute, has_attribute): New functions.
1407 * c-common.h (has_attribute): Declare.
1408 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
1409 * c-common.c (c_common_resword): Same.
1410
2674fa47
JM
14112018-11-16 Jason Merrill <jason@redhat.com>
1412
1413 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
1414 * c-attribs.c (attr_cold_hot_exclusions): Make public.
1415
258b3854
JJ
14162018-11-16 Jakub Jelinek <jakub@redhat.com>
1417
1418 PR middle-end/87854
1419 * c-common.c (fix_string_type): Reject string literals larger than
1420 TYPE_MAX_VALUE (ssizetype) bytes.
1421
1d249509
MS
14222018-11-15 Martin Sebor <msebor@redhat.com>
1423
1424 PR c++/87541
1425 PR c++/87542
1426 * c-attribs.c (positional_argument): New function.
1427 (handle_alloc_size_attribute): Use it and simplify.
1428 (handle_alloc_align_attribute): Same.
1429 (handle_assume_aligned_attribute): Same.
1430 (handle_nonnull_attribute): Same.
1431 * c-common.c (check_function_arguments): Pass fntype to
1432 check_function_format.
1433 * c-common.h (check_function_format): Add an argument.
1434 (PosArgFlags, positional_argument): Declare new type and function.
1435 * c-format.c (decode_format_attr): Add arguments.
1436 (check_format_string, get_constant): Same.
1437 (convert_format_name_to_system_name): Adjust.
1438
478dd60d
DM
14392018-11-15 David Malcolm <dmalcolm@redhat.com>
1440
1441 PR other/19165
1442 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
1443
8cca0163
JJ
14442018-11-14 Jakub Jelinek <jakub@redhat.com>
1445
8ee09943
JJ
1446 P1236R1 - Signed integers are two's complement
1447 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
1448 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
1449 with in-range second operand well defined for -std=c++2a.
1450
8cca0163
JJ
1451 PR other/88007
1452 * c-common.c (parse_optimize_options): Allocate option string from
1453 opts_obstack rather than as GC memory. Move the allocation after
1454 warning for invalid option.
1455
620e594b
DM
14562018-11-13 David Malcolm <dmalcolm@redhat.com>
1457
1458 * c-common.c (c_get_substring_location): Update for renaming of
1459 get_source_location_for_substring to get_location_within_string.
1460 * c-lex.c: Replace "source_location" with "location_t".
1461 * c-opts.c: Likewise.
1462 * c-ppoutput.c: Likewise.
1463
f9731de3
MS
14642018-11-13 Martin Sebor <msebor@redhat.com>
1465
1466 PR middle-end/81824
1467 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
1468 (handle_tls_model_attribute): Improve diagnostics.
1469
e4bd6d5e
JM
14702018-11-12 Jason Merrill <jason@redhat.com>
1471
a6bb6b07
JM
1472 * c-cppbuiltin.c (c_cpp_builtins): Define
1473 __cpp_impl_destroying_delete.
1474
e4bd6d5e
JM
1475 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
1476 __cpp_conditional_explicit.
1477
79a2c428
MS
14782018-11-09 Martin Sebor <msebor@redhat.com>
1479
1480 PR middle-end/81824
1481 * c-attribs.c (handle_copy_attribute): New function.
1482
4c7bd361
MS
14832018-11-09 Martin Sebor <msebor@redhat.com>
1484
1485 PR c/87795
1486 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
1487
28567c40
JJ
14882018-11-08 Jakub Jelinek <jakub@redhat.com>
1489
1490 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
1491 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
1492 enum omp_memory_order MEMORY_ORDER.
1493 (c_finish_omp_flush): Add MO argument.
1494 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
1495 (c_finish_omp_for): Add FINAL_P argument.
1496 * c-omp.c: Include memmodel.h.
1497 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
1498 OMP_TASKGROUP_CLAUSES to it.
1499 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
1500 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
1501 instead of OMP_ATOMIC_SEQ_CST.
1502 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
1503 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
1504 __atomic_thread_fence call with the given value.
1505 (check_omp_for_incr_expr): Formatting fixes.
1506 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
1507 even in OpenMP loops, diagnose if NE_EXPR and incr expression
1508 is not constant expression 1 or -1. Transform NE_EXPR loops
1509 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
1510 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
1511 loops too.
1512 (c_omp_split_clauses): Add support for combined
1513 #pragma omp parallel master and
1514 #pragma omp {,parallel }master taskloop{, simd} constructs.
1515 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
1516 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
1517 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
1518 (c_omp_predetermined_sharing): Don't return
1519 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
1520 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
1521 PRAGMA_OMP_REQUIRES.
1522 * c-pragma.h (enum pragma_kind): Likewise.
1523 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
1524 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1525
204839e7
DM
15262018-11-08 David Malcolm <dmalcolm@redhat.com>
1527
1528 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
1529
d8010ee4
DM
15302018-11-08 David Malcolm <dmalcolm@redhat.com>
1531
1532 * c-format.c (local_cgraph_node_ptr_node): New variable.
1533 (gcc_dump_printf_char_table): Add entry for %C.
1534 (get_pointer_to_named_type): New function, taken from the handling
1535 code for "gimple *" from...
1536 (init_dynamic_diag_info): ...here. Add handling for
1537 "cgraph_node *".
1538 * c-format.h (T_CGRAPH_NODE): New.
1539
4be5c72c
JM
15402018-10-19 Jason Merrill <jason@redhat.com>
1541
1542 * c-cppbuiltin.c (c_cpp_builtins): Add
1543 __cpp_nontype_template_parameter_class.
1544
f3f6029d
NS
15452018-10-31 Nathan Sidwell <nathan@acm.org>
1546
ab5324fb
NS
1547 * c-opts.c (c_finish_options): Force command line macro
1548 location. Refactor to avoid repeating main debug hook.
1549 (push_command_line_include): Clarify comment.
1550
f3f6029d
NS
1551 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
1552
91e3ec29
MS
15532018-10-30 Martin Sebor <msebor@redhat.com>
1554
1555 PR middle-end/87041
1556 * c-format.c (check_format_types): Avoid diagnosing null pointer
1557 arguments to printf-family of functions.
1558
b5ff4f5c
MP
15592018-10-30 Marek Polacek <polacek@redhat.com>
1560
1561 Implement P0892R2, explicit(bool).
1562 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
1563
7e2de6df
DM
15642018-10-29 David Malcolm <dmalcolm@redhat.com>
1565
1566 * name-hint.h (name_hint::take_deferred): New member function.
1567
b2bf438c
DM
15682018-10-29 David Malcolm <dmalcolm@redhat.com>
1569
1570 PR c++/56856
1571 * c-common.c (check_function_sentinel): Call fold_for_warn on the
1572 argument.
1573 (check_function_restrict): Rename param "argarray" to
1574 "unfolded_argarray", and make a copy named "argarray", calling
1575 fold_for_warn on each argument.
1576 (check_function_arguments): Add note about responsibility for
1577 folding the arguments.
1578
9f936c86
JM
15792018-10-17 Joseph Myers <joseph@codesourcery.com>
1580
1581 * c-common.c (flag_isoc2x): New variable.
1582 * c-common.h (clk_c): Update comment to reference C2X.
1583 (flag_isoc99, flag_isoc11): Update comments to reference future
1584 standard versions in general.
1585 (flag_isoc2x): Declare.
1586 * c-opts.c (set_std_c2x): New function.
1587 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
1588 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
1589 flag_isoc2x to 0.
1590 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
1591
7a8a92c4
JM
15922018-10-17 Joseph Myers <joseph@codesourcery.com>
1593
1594 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
1595 (std=iso9899:2018): Document C17 as published in 2018.
1596
4dc003ff
CL
15972018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
1598
1599 PR c++/87364
1600 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
1601
79371671
WW
16022018-10-11 Will Wray <wjwray@gmail.com>
1603
1604 PR c++/87364
1605 * c-pretty-print.h (pp_c_type_cast): Prototype.
1606 (pp_c_integer_constant): Likewise.
1607 * c-pretty-print.c (pp_c_type_cast): No longer static.
1608 (pp_c_integer_constant): Likewise.
1609 (pp_c_enumeration_constant): Fix loop termination when finding
1610 name of constant. No longer returns a value. Call
1611 pp_c_integer_constant.
1612 (c_pretty_printer::constant): Update for changes to
1613 pp_c_enumeration_constant.
1614
46c62690
JJ
16152018-10-11 Jakub Jelinek <jakub@redhat.com>
1616
1617 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
1618 for no_unique_address.
1619
c24300ba
DM
16202018-10-09 David Malcolm <dmalcolm@redhat.com>
1621
1622 * c-common.c (c_option_controlling_cpp_error): Rename to...
1623 (c_option_controlling_cpp_diagnostic): ...this, and convert
1624 "reason" from int to enum.
1625 (c_cpp_error): Rename to...
1626 (c_cpp_diagnostic): ...this, converting level and reason to enums.
1627 * c-common.h (c_cpp_error): Rename to...
1628 (c_cpp_diagnostic): ...this, converting level and reason to enums.
1629 * c-opts.c (c_common_init_options): Update for renaming.
1630
8656dafa
RS
16312018-10-08 Richard Sandiford <richard.sandiford@arm.com>
1632
1633 PR c/87286
1634 * c-common.c (vector_types_compatible_elements_p): Use
1635 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
1636
8cff0652
VK
16372018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
1638
1639 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
1640 to generate constructor destructor priority warning.
1641 * c.opt (-Wprio-ctor-dtor): New option.
1642
bedf03a2
JM
16432018-10-01 Jason Merrill <jason@redhat.com>
1644
1645 * c-lex.c (c_common_has_attribute): Add no_unique_address.
1646
6cc430c1
EB
16472018-10-01 Eric Botcazou <ebotcazou@adacore.com>
1648
1649 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
1650 (dump_ada_node): Add const keyword.
1651
87677ac7
ML
16522018-09-25 Martin Liska <mliska@suse.cz>
1653
1654 * c-common.c (c_common_truthvalue_conversion):
1655 Remove Pascal from documentation.
1656
518196cb
EB
16572018-09-21 Eric Botcazou <ebotcazou@adacore.com>
1658
1659 * c-ada-spec.c: Include diagnostic.h.
1660 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
1661
a599af84
MP
16622018-09-19 Marek Polacek <polacek@redhat.com>
1663
1664 * c.opt (Wclass-conversion): New.
1665
9c4a4b3c
DM
16662018-09-17 David Malcolm <dmalcolm@redhat.com>
1667
1668 * c-format.c (range_label_for_format_type_mismatch::get_text):
1669 Update for new param.
1670
c896ecfe
DM
16712018-09-17 David Malcolm <dmalcolm@redhat.com>
1672
1673 * c-format.c (format_warning_at_char): Update for introduction of
1674 format_string_diagnostic_t.
1675 (format_type_warning): Likewise.
1676
80c6d1f4
MJ
16772018-09-17 Martin Jambor <mjambor@suse.cz>
1678
1679 PR c/63886
1680 * c.opt (Wabsolute-value): New.
1681
6d900107
BE
16822018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1683
1684 * c-common.c (complete_flexible_array_elts): New helper function.
1685 * c-common.h (complete_flexible_array_elts): Declare.
1686
b5764229
BE
16872018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1688
1689 * c-common.c (braced_list_to_string): Remove eval parameter.
1690 Add some more checks. Always create zero-terminated STRING_CST.
1691 * c-common.h (braced_list_to_string): Adjust prototype.
1692
85204e23
DM
16932018-08-27 David Malcolm <dmalcolm@redhat.com>
1694
1695 PR 87091
1696 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
1697 to a tri-state.
1698 (maybe_suggest_missing_token_insertion): Likewise.
1699 (maybe_add_include_fixit): Add param "override_location". If set,
1700 and source-printing is enabled, then override the rich_location's
1701 primary location with that of the insertion point for the fix-it
1702 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
1703 * c-common.h (extern void maybe_add_include_fixit): Add bool
1704 param.
1705 * c-format.c (selftest::test_type_mismatch_range_labels): Update
1706 for conversion of show_caret_p to a tri-state.
1707 * c-warn.c (warn_for_restrict): Likewise.
1708 * known-headers.cc
1709 (suggest_missing_header::~suggest_missing_header): Update call to
1710 maybe_add_include_fixit to suggest overriding the location, as it
1711 is for a note.
1712
3d78e008
ML
17132018-08-27 Martin Liska <mliska@suse.cz>
1714
1715 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
1716 fndecl_built_in_p and remove check for FUNCTION_DECL if
1717 possible.
3d78e008
ML
1718 (check_builtin_function_arguments): Likewise.
1719 (reject_gcc_builtin): Likewise.
1720 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
1721
b5be6d0c
MP
17222018-08-26 Marek Polacek <polacek@redhat.com>
1723
1724 PR c++/87029, Implement -Wredundant-move.
1725 * c.opt (Wredundant-move): New option.
1726
79ca9c35
MP
17272018-08-21 Marek Polacek <polacek@redhat.com>
1728
1729 PR c++/86981, Implement -Wpessimizing-move.
1730 * c.opt (Wpessimizing-move): New option.
1731
097f82ec
DM
17322018-08-20 David Malcolm <dmalcolm@redhat.com>
1733
1734 PR other/84889
1735 * c-attribs.c (common_handle_aligned_attribute): Add
1736 auto_diagnostic_group instance.
1737 * c-indentation.c (warn_for_misleading_indentation): Likewise.
1738 * c-opts.c (c_common_post_options): Likewise.
1739 * c-warn.c (warn_logical_not_parentheses): Likewise.
1740 (warn_duplicated_cond_add_or_warn): Likewise.
1741 (warn_for_multistatement_macros): Likewise.
1742
3fb558b1
NS
17432018-08-20 Nathan Sidwell <nathan@acm.org>
1744
1745 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
1746 access.
1747
800c0e98
NS
17482018-08-17 Nathan Sidwell <nathan@acm.org>
1749
1750 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
1751 field.
1752 (laxy_hex_fp_value_count): Make unsigned.
1753 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
1754 manipulate the macro.
1755 (builtin_defin_with_hex_fp_value): Adjust callback name, use
1756 cpp_define_lazily.
1757
6f795a92
DM
17582018-08-17 David Malcolm <dmalcolm@redhat.com>
1759
1760 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
1761 (gcc_dump_printf_length_specs): New.
1762 (gcc_dump_printf_flag_pairs): New.
1763 (gcc_dump_printf_flag_specs): New.
1764 (gcc_dump_printf_char_table): New.
1765 (format_types_orig): Add entry for "gcc_dump_printf".
1766 (init_dynamic_diag_info): Set up length_char_specs and
1767 conversion_specs for gcc_dump_printf_format_type.
1768 (handle_format_attribute): Handle gcc_dump_printf_format_type.
1769
c5d725c0
NS
17702018-08-17 Nathan Sidwell <nathan@acm.org>
1771
10f04917
NS
1772 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
1773
c5d725c0
NS
1774 * c-ada-spec.c: Don't #include "cpp-id-data.h"
1775 * c-cppbuiltin.c: Likewise.
1776
c0c12356
ML
17772018-08-17 Martin Liska <mliska@suse.cz>
1778
1779 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
1780 Ignore/Deprecated flag. Warning is done automatically for
1781 Deprecated flags.
c0c12356 1782
10fcc142
DM
17832018-08-16 David Malcolm <dmalcolm@redhat.com>
1784
1785 PR c++/70693
1786 * c-common.c (selftest::c_family_tests): Call
1787 selftest::c_indentation_c_tests.
1788 * c-common.h (selftest::c_indentation_c_tests): New decl.
1789 * c-indentation.c: Include "selftest.h".
1790 (next_tab_stop): Add "tab_width" param, rather than accessing
1791 cpp_opts.
1792 (get_visual_column): Likewise. Clarify comment. Bulletproof
1793 against reading past the end of the line.
1794 (get_first_nws_vis_column): Add "tab_width" param.
1795 (detect_intervening_unindent): Likewise.
1796 (should_warn_for_misleading_indentation): Read tab width from
1797 cpp_opts and pass around.
1798 (selftest::test_next_tab_stop): New test.
1799 (selftest::assert_get_visual_column_succeeds): New function.
1800 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
1801 (selftest::assert_get_visual_column_fails): New function.
1802 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
1803 (selftest::test_get_visual_column): New test.
1804 (selftest::c_indentation_c_tests): New function.
1805
3f6677f4
NS
18062018-08-16 Nathan Sidwell <nathan@acm.org>
1807
1808 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
1809 (store_ada_macro): Likewise.
1810 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
1811 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
1812
96e6ae57
DM
18132018-08-15 David Malcolm <dmalcolm@redhat.com>
1814
1815 * c-format.c: Include "selftest-diagnostic.h" and
1816 "gcc-rich-location.h".
1817 (format_warning_at_char): Pass NULL for new label params of
1818 format_warning_va.
1819 (class indirection_suffix): New class.
1820 (class range_label_for_format_type_mismatch): New class.
1821 (format_type_warning): Move logic for generating "*" suffix to
1822 class indirection_suffix. Create "fmt_label" and "param_label"
1823 to show their types, and pass them to the
1824 format_warning_at_substring calls.
1825 (selftest::test_type_mismatch_range_labels): New test.
1826 (selftest::c_format_c_tests): Call it.
1827
23aa9f7c
MS
18282018-08-13 Martin Sebor <msebor@redhat.com>
1829
1830 PR tree-optimization/71625
1831 * c-common.c (braced_list_to_string): New function.
1832 * c-common.h (braced_list_to_string): Declare it.
1833
f10a9135
NS
18342018-08-08 Nathan Sidwell <nathan@acm.org>
1835
1836 * c-common.c (try_to_locate_new_include_inertion_point): Use
1837 linemap_included_from_linemap.
1838 * c-lex.c (fe_file_change): Use linemap_included_from.
1839 * c-ppoutput.c (pp_file_change): Likewise.
1840
8a45b051
MS
18412018-08-01 Martin Sebor <msebor@redhat.com>
1842
1843 PR tree-optimization/86650
ab20d992 1844 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
8a45b051
MS
1845 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
1846 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
1847 * c-format.h (T89_G): Update to be "gimple *" rather than
1848 "gcall *".
1849 (local_gcall_ptr_node): Rename...
1850 (local_gimple_ptr_node): ...to this.
1851
e540ccc0
DM
18522018-07-31 David Malcolm <dmalcolm@redhat.com>
1853
1854 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
1855 table entries for gcc_diag_char_table, and the 'Z' entry from
1856 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
1857 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
1858 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
1859 adding missing "Z" for this table. Remove erroneous "G" and "K"
1860 entries.
1861 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
1862 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
1863 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
1864
425fc685
RE
18652018-07-31 Richard Earnshaw <rearnsha@arm.com>
1866
1867 * c-common.c (speculation_safe_resolve_call): New function.
1868 (speculation_safe_resolve_params): New function.
1869 (speculation_safe_resolve_return): New function.
1870 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
1871 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
1872 __HAVE_SPECULATION_SAFE_VALUE.
1873
181463c2
DM
18742018-07-20 David Malcolm <dmalcolm@redhat.com>
1875
1876 * c-common.c (c_cpp_error): Remove redundant "line_table"
1877 parameter from call to rich_location::set_range.
1878 (maybe_suggest_missing_token_insertion): Likewise.
1879
0d7f9065
MS
18802018-07-20 Martin Sebor <msebor@redhat.com>
1881
1882 PR middle-end/82063
ab20d992 1883 * c.opt (-Warray-bounds): Remove redundant -Wall.
0d7f9065 1884
00abf86c
MS
18852018-07-20 Martin Sebor <msebor@redhat.com>
1886
1887 PR middle-end/82063
1888 * c-common.h (c_common_handle_option): Change function argument
1889 to HOST_WIDE_INT.
1890 * c-opts.c (c_common_init_options): Same.
1891 (c_common_handle_option): Same. Remove special handling of
1892 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
1893 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
1894 options to take a HOST_WIDE_INT argument and accept a byte-size
1895 suffix. Initialize.
1896 (-Wvla-larger-than): Same.
1897 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
1898 (-Wno-vla-larger-than): Same.
1899
9b452033
JJ
19002018-07-12 Jakub Jelinek <jakub@redhat.com>
1901
1902 * c-attribs.c (c_common_attribute_table): Add
1903 "omp declare target implicit" attribute.
1904
cd0762f3
RB
19052018-07-12 Richard Biener <rguenther@suse.de>
1906
1907 PR c/86453
1908 * c-attribs.c (handle_packed_attribute): Do not build a variant
1909 type with TYPE_PACKED, instead ignore the attribute if we may
1910 not apply to the original type.
1911
0b27c3ed
JJ
19122018-07-10 Jakub Jelinek <jakub@redhat.com>
1913
1914 PR c++/86443
1915 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
1916 to contain TREE_LIST for both the original class iterator and the
1917 "last" helper var.
1918
e730a0ef
EB
19192018-07-07 Eric Botcazou <ebotcazou@adacore.com>
1920
1921 * c-ada-spec.c (to_ada_name): Remove index parameter.
1922 (pp_ada_tree_identifier): Likewise.
1923 (dump_ada_macros): Adjust call to to_ada_name.
1924 (struct overloaded_name_hash): Delete.
1925 (struct overloaded_name_hasher): Likewise.
1926 (overloaded_names): Likewise.
1927 (compute_overloading_index): Likewise.
1928 (dump_ada_decl_name): Do not call compute_overloading_index and
1929 adjust calls to pp_ada_tree_identifier.
1930 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
1931 (dump_ada_import): Add spc parameter and switch to aspect syntax.
1932 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
1933 (dump_ada_enum_type): Remove type and display_convention parameters.
1934 Adjust calls to pp_ada_tree_identifier.
1935 (dump_ada_node): Likewise and for dump_ada_structure.
1936 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
1937 and tidy up.
1938 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
1939 syntax.
1940 (print_constructor): Adjust call to pp_ada_tree_identifier.
1941 (print_destructor): Likewise.
1942 (dump_ada_declaration): Switch to aspect syntax.
1943 (dump_ada_structure): Likewise and tidy up. Replace display_convention
1944 parameter with nested parameter.
1945 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
1946 (dump_ada_specs): Do not delete overloaded_names table.
1947
8de583fc
PB
19482018-07-06 Peter Bergner <bergner@linux.ibm.com>
1949
1950 PR target/86324
e730a0ef 1951 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
1952 target hook.
1953
09cff37b
NS
19542018-07-05 Nathan Sidwell <nathan@acm.org>
1955
1956 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
1957 NO_IMPLICIT_EXTERN_C.
1958
98086b2b
ML
19592018-06-28 Martin Liska <mliska@suse.cz>
1960
1961 * cppspec.c: Include opt-suggestions.h.
1962
ab20d992
JJ
19632018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1964 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
1965 Cesar Philippidis <cesar@codesourcery.com>
1966
1967 * c-pragma.h (enum pragma_omp_clause): Add
1968 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
1969 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
1970
f41b7612
JJ
19712018-06-20 Jakub Jelinek <jakub@redhat.com>
1972
1973 PR c++/86210
1974 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
1975 comment.
1976
4252ccd7
MS
19772018-06-18 Martin Sebor <msebor@redhat.com>
1978
1979 PR middle-end/85602
1980 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
1981 nonstring.
1982
e197e64e
KV
19832018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1984
1985 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
1986
34a7a230
JM
19872018-06-13 Jason Merrill <jason@redhat.com>
1988
5cef3733
JM
1989 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
1990 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
1991 handling.
1992
34a7a230
JM
1993 PR c++/86094 - wrong code with defaulted move ctor.
1994 * c-opts.c (c_common_post_options): Bump the current ABI version to
1995 13. Set warn_abi_version and flag_abi_compat_version to the current
1996 version rather than 0. Fix defaulting flag_abi_compat_version from
1997 warn_abi_version.
1998
bb0f14ae
MS
19992018-06-12 Martin Sebor <msebor@redhat.com>
2000
2001 PR c/85931
2002 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
2003 sizeof source and destination yields the same value.
2004
3713f2e2
ML
20052018-06-12 Martin Liska <mliska@suse.cz>
2006
2007 * c.opt: Make MPX-related options as Deprecated.
2008
4af78ef8
DM
20092018-06-08 David Malcolm <dmalcolm@redhat.com>
2010
2011 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
2012 rather than 0.
2013
31db0fe0
ML
20142018-06-08 Martin Liska <mliska@suse.cz>
2015
2016 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
2017 for MPX (macros, related functions, fields in cgraph_node, ...).
2018 (handle_bnd_legacy): Likewise.
2019 (handle_bnd_instrument): Likewise.
2020 * c.opt: Likewise.
2021
fe16acf2
JJ
20222018-06-06 Jakub Jelinek <jakub@redhat.com>
2023
2024 PR c++/86068
2025 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
2026 __cpp_transactional_memory to 201500 instead of 210500.
2027
4dbdb49b
JM
20282018-06-06 Jason Merrill <jason@redhat.com>
2029
2030 PR c++/85710 - ICE with -Wmemset-elt-size.
2031 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
2032
f8ad043f
JM
20332018-06-01 Jason Merrill <jason@redhat.com>
2034
2035 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
2036 201703.
2037
abc24d93
EB
20382018-06-01 Eric Botcazou <ebotcazou@adacore.com>
2039
2040 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
2041 declaration for a typedef independently of whether the declaration of
2042 the subtype is generated.
2043
d258f4aa
MS
20442018-05-31 Martin Sebor <msebor@redhat.com>
2045
2046 PR c/82063
2047 * c.opt (-Wno-alloc-size-larger-than): New option.
2048
b67b9225
DP
20492018-04-22 David Pagan <dave.pagan@oracle.com>
2050
2051 PR c/55976
2052 * c-opts.c (c_common_post_options): Set default for warn_return_type
ab20d992 2053 for C++/C++ with ObjC extensions only. For C, makes it possible to
b67b9225
DP
2054 differentiate between default (no option), -Wreturn-type, and
2055 -Wno-return-type.
2056
04eb9c55
JM
20572018-05-29 Jason Merrill <jason@redhat.com>
2058
2059 * c.opt (Winit-list-lifetime): New flag.
2060
b0c31bc6
BE
20612018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
2062
2063 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
2064 splay_tree_delete_pointers.
2065
44284983
JJ
20662018-05-26 Jakub Jelinek <jakub@redhat.com>
2067
2068 PR bootstrap/85921
2069 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
2070 noinline variable to workaround broken kernel headers.
2071
b46b715d
JM
20722018-05-18 Jason Merrill <jason@redhat.com>
2073
2074 * c.opt (Wdeprecated-copy): New flag.
2075
40659769
ML
20762018-05-17 Martin Liska <mliska@suse.cz>
2077
2078 * c-warn.c (overflow_warning): Do not use
2079 space in between 'G_' and '('.
2080
403962ea
JM
20812018-05-09 Jason Merrill <jason@redhat.com>
2082
2083 * c-common.c (valid_array_size_p): Add complain parameter.
2084 * c-common.h: ...which defaults to true.
2085
1c9ee609
JJ
20862018-05-11 Jakub Jelinek <jakub@redhat.com>
2087
2088 PR c/85696
2089 * c-omp.c (c_omp_predetermined_sharing): Return
2090 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
2091
19916065
ML
20922018-05-11 Martin Liska <mliska@suse.cz>
2093
92a285c1 2094 PR sanitizer/85556
19916065
ML
2095 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
2096 TREE_LIST values.
2097
79e7b1fe
JJ
20982018-05-10 Jakub Jelinek <jakub@redhat.com>
2099
2100 PR c++/85662
2101 * c-common.h (fold_offsetof_1): Removed.
2102 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
2103 CTX argument defaulted to ERROR_MARK.
2104 * c-common.c (fold_offsetof_1): Renamed to ...
2105 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
2106 argument, convert the pointer constant to TYPE and use size_binop
2107 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
2108 a pointer type. Adjust recursive calls.
2109
86c12f76
EB
21102018-05-10 Eric Botcazou <ebotcazou@adacore.com>
2111
2112 PR c++/85400
2113 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
2114
ee336e84
NS
21152018-05-07 Nathan Sidwell <nathan@acm.org>
2116
2117 * c.opt (ffor-scope): Remove functionality, issue warning.
2118
6c072e21
NS
21192018-05-03 Nathan Sidwell <nathan@acm.org>
2120
2121 * c.opt (ffriend-injection): Remove functionality, issue warning.
2122
2cc7d3a7
DM
21232018-05-01 David Malcolm <dmalcolm@redhat.com>
2124
2125 PR c/84258
2126 * c-format.c (struct format_check_results): Add field
2127 "number_non_char".
2128 (check_format_info): Initialize it, and warn if encountered.
2129 (check_format_arg): Distinguish between wide char and
2130 everything else when detecting arrays of non-char.
2131
7761dfbe
DM
21322018-04-30 David Malcolm <dmalcolm@redhat.com>
2133
2134 * c-format.c (get_corrected_substring): Update for
2135 location_get_source_line returning a char_span. Use a char_span
2136 when handling the prefix of the correction.
2137 * c-indentation.c (get_visual_column): Update for
2138 location_get_source_line returning a char_span.
2139 (get_first_nws_vis_column): Likewise.
2140
62e98ef1
DM
21412018-03-29 David Malcolm <dmalcolm@redhat.com>
2142
2143 PR c++/84269
2144 * known-headers.cc (get_stdlib_header_for_name): Add various names
2145 from <assert.h>, <string.h>, and <memory.h>; add more names from
2146 <stdio.h>.
2147
a7dea617
JJ
21482018-03-27 Jakub Jelinek <jakub@redhat.com>
2149
2150 PR c++/85061
2151 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
2152 get_base_address of the second operand is a VAR_P, rather than the
2153 operand itself, and use gcc_checking_assert instead of gcc_assert.
2154
889a3a30
MP
21552018-03-23 Marek Polacek <polacek@redhat.com>
2156
2157 PR c++/85045
2158 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
2159 <case RDIV_EXPR>: Tweak condition.
2160
452154b9
EB
21612018-03-20 Eric Botcazou <ebotcazou@adacore.com>
2162
2163 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
2164
63ecb626
JJ
21652018-03-16 Jakub Jelinek <jakub@redhat.com>
2166
ce811fc4
JJ
2167 PR c/84909
2168 * c-warn.c (conversion_warning): Replace "to to" with "to" in
2169 diagnostics.
2170
63ecb626
JJ
2171 PR c/84910
2172 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
2173 diagnostics.
2174
a1295eec
RB
21752018-03-16 Richard Biener <rguenther@suse.de>
2176
2177 PR c/84873
2178 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
2179 unshare the possibly folded expression.
2180
919674fb
RB
21812018-03-15 Richard Biener <rguenther@suse.de>
2182
2183 PR c/84873
2184 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
2185
f99309b2
MS
21862018-03-13 Martin Sebor <msebor@redhat.com>
2187
2188 PR tree-optimization/84725
2189 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
2190 with all three narrow character types, including their qualified forms.
2191
e9b9fa4c
MS
21922018-03-12 Martin Sebor <msebor@redhat.com>
2193
2194 PR tree-optimization/83456
ab20d992 2195 * c-common.c (check_function_restrict): Return bool.
e9b9fa4c
MS
2196 Restore checking of bounded built-in functions.
2197 (check_function_arguments): Also return the result
2198 of warn_for_restrict.
ab20d992
JJ
2199 * c-common.c (check_function_restrict): Return bool.
2200 * c-warn.c (warn_for_restrict): Return bool.
e9b9fa4c 2201
0805d020
MP
22022018-03-02 Marek Polacek <polacek@redhat.com>
2203
2204 PR c++/84171
2205 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
2206 is erroneous.
2207
ed2a2f08
TS
22082018-03-02 Thomas Schwinge <thomas@codesourcery.com>
2209
2210 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
2211 function".
2212
90abdde0
MP
22132018-03-01 Marek Polacek <polacek@redhat.com>
2214
2215 PR c++/84639
2216 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
2217 alignment in computation.
2218
c6db43fa
EB
22192018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2220
2221 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
2222 <REAL_TYPE>: Deal specifically with _Float128/__float128.
2223
9e25c7ed
EB
22242018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2225
2226 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
2227 (is_char_array): Take a type instead of a declaration.
2228 (dump_ada_array_type): Likewise.
2229 (is_simple_enum): Minor tweak.
2230 (dump_ada_enum_type): New function extracted from...
2231 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
2232 <INTEGER_TYPE>: Remove unreachable code.
2233 <RECORD_TYPE>: Likewise. Minor tweaks.
2234 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
2235 <ENUMERAL_TYPE>: New case.
2236 <RECORD_TYPE>: Factor out common code.
2237 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
2238 Minor tweaks. Deal with enumeral types.
2239 (dump_ada_structure): Minor tweaks.
2240
09de3550
EB
22412018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2242
2243 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
2244 address for incomplete structures.
2245 (dump_forward_type): Do not bail out for incomplete structures.
2246 (dump_ada_declaration): Do not special-case incomplete structures
2247 for subtypes. Dump them as null records for types.
2248
095d8d4b
EB
22492018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2250
2251 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
2252 (is_char_array): Fix formatting.
2253 (dump_template_types): Likewise.
2254 (dump_generic_ada_node): Rename into...
2255 (dump_ada_node): ...this.
2256 <POINTER_TYPE>: Remove superfluous space. Use generic address for
2257 incomplete structures and not for empty structures. Do not use it
2258 when forward declarations are needed.
2259 (dump_forward_type): New function.
2260 (dump_nested_types): Remove FORWARD parameter. Do not consider
2261 TREE_VISITED and do not generate a forward declaration. Only dump
2262 original nested types for nested declaration.
2263 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
2264 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
2265 <RECORD_TYPE>: Do not consider TREE_VISITED.
2266 (dump_ada_declaration): Use booleans and fix formatting throughout.
2267 <TYPE_DECL>: Skip incomplete structures and not empty structures.
2268 Call dump_forward_type instead of dump_nested_types for a typedef.
2269 Remove superfluous check and adjust call to dump_nested_types.
2270 <POINTER_TYPE>: Call dump_forward_type and fall through.
2271 (dump_ada_struct_decl): Rename into...
2272 (dump_ada_structure): ...this. Do not special-case empty structures.
2273
d4cfd486
MS
22742018-02-27 Martin Sebor <msebor@redhat.com>
2275
2276 PR c++/83871
2277 * c.opt (-Wmissing-attributes): New option.
2278
b22dbd03
ML
22792018-02-21 Martin Liska <mliska@suse.cz>
2280
2281 * c.opt (Wcatch-value=): Add IntegerRange.
2282
883dfe2a
JM
22832018-02-15 Jason Merrill <jason@redhat.com>
2284
2285 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
2286
0444aa9c
NS
22872018-02-09 Nathan Sidwell <nathan@acm.org>
2288
2289 PR c/84293
2290 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
2291 arg.
2292 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
2293 arg. Adjust.
2294
cea71f0a
MS
22952018-02-09 Martin Sebor <msebor@redhat.com>
2296
2297 PR lto/84212
2298 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
2299 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
2300 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
2301 (-Wstrict-overflow, -Wsuggest-attribute): Same.
2302 (-Wuninitialized): Same.
2303
8c8b7be5
EB
23042018-02-09 Eric Botcazou <ebotcazou@adacore.com>
2305
2306 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
2307 keyword for components.
2308
7c30b12a
PC
23092018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2310
2311 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
2312
eece7fe5
JK
23132018-02-02 Julia Koval <julia.koval@intel.com>
2314
2315 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
2316
7d07a93a
MP
23172018-01-29 Marek Polacek <polacek@redhat.com>
2318
2319 PR c/83966
2320 * c-format.c (check_function_format): Check current_function_decl.
2321
53723269
JJ
23222018-01-27 Jakub Jelinek <jakub@redhat.com>
2323
2324 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
2325 argument.
2326 (LAZY_HEX_FP_VALUES_CNT): Define.
2327 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
2328 values rather than just 12.
2329 (builtin_define_with_hex_fp_value): Likewise.
2330
7365279f
BK
23312018-01-18 Boris Kolpackov <boris@codesynthesis.com>
2332
92a285c1
ML
2333 PR other/70268
2334 * c.opt (-fmacro-prefix-map): New option.
2335 * c-opts.c (c_common_handle_option): Handle it.
2336 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
2337 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 2338
bb9869d5
DM
23392018-01-17 David Malcolm <dmalcolm@redhat.com>
2340
2341 PR c++/83814
2342 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
2343
68dc87c3
EB
23442018-01-10 Eric Botcazou <ebotcazou@adacore.com>
2345
2346 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
2347 Skip 'f' and 'F' characters if it is true.
2348 (store_ada_macro): Minor tweak.
2349 (dump_ada_macros) <CPP_COMMENT>: Likewise.
2350 <CPP_WSTRING>: Likewise.
2351 <CPP_STRING>: Output '&' in the buffer if not the first string.
2352 <CPP_NUMBER>: Adjust calls to dump_number.
2353
9a004410
DM
23542018-01-10 David Malcolm <dmalcolm@redhat.com>
2355
2356 PR c++/43486
2357 * c-common.c: Include "selftest.h".
2358 (get_atomic_generic_size): Perform the test for integral type
2359 before the range test for any integer constant, fixing indentation
2360 of braces. Call fold_for_warn before testing for an INTEGER_CST.
2361 (reject_gcc_builtin): Strip any location wrapper from EXPR.
2362 (selftest::test_fold_for_warn): New function.
2363 (selftest::c_common_c_tests): New function.
2364 (selftest::c_family_tests): Call it, and
2365 selftest::c_pretty_print_c_tests.
2366 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
2367 * c-format.c (check_format_arg): Convert VAR_P check to a
2368 fold_for_warn.
2369 * c-pretty-print.c: Include "selftest.h".
2370 (pp_c_cast_expression): Don't print casts for location wrappers.
2371 (selftest::assert_c_pretty_printer_output): New function.
2372 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
2373 (selftest::test_location_wrappers): New function.
2374 (selftest::c_pretty_print_c_tests): New function.
2375 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
2376
5c0caeb3
RS
23772018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2378 Alan Hayward <alan.hayward@arm.com>
2379 David Sherwood <david.sherwood@arm.com>
2380
2381 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
2382
73a699ae
RS
23832018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2384 Alan Hayward <alan.hayward@arm.com>
2385 David Sherwood <david.sherwood@arm.com>
2386
2387 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
2388 as polynomial.
2389
928686b1
RS
23902018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2391 Alan Hayward <alan.hayward@arm.com>
2392 David Sherwood <david.sherwood@arm.com>
2393
2394 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
2395 (convert_vector_to_array_for_subscript): Handle polynomial
2396 TYPE_VECTOR_SUBPARTS.
2397 (c_common_type_for_mode): Check valid_vector_subparts_p.
2398 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
2399 VECTOR_CST_NELTS.
2400
85ec4feb
JJ
24012018-01-03 Jakub Jelinek <jakub@redhat.com>
2402
2403 Update copyright years.
2404
170a8bd6 24052017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 2406 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
2407
2408 * c-pragma.c (init_pragma): Register pragma GCC unroll.
2409 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
2410
ab20d992 24112017-12-22 Alexandre Oliva <aoliva@redhat.com>
18408e96
AO
2412
2413 PR debug/83527
2414 PR debug/83419
2415 * c-semantics.c (only_debug_stmts_after_p): New.
2416 (pop_stmt_list): Clear side effects in debug-only stmt list.
2417 Check for single nondebug stmt followed by debug stmts only.
2418
c12d20d4
AO
24192017-12-21 Alexandre Oliva <aoliva@redhat.com>
2420
2421 PR debug/83419
2422 * c-semantics.c (pop_stmt_list): Propagate side effects from
2423 single nondebug stmt to container list.
2424
01512446
JJ
24252017-12-19 Jakub Jelinek <jakub@redhat.com>
2426
2427 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
2428 conditions with typical order conditions.
2429
82cfbd01
MP
24302017-12-18 Marek Polacek <polacek@redhat.com>
2431
2432 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
2433 not in effect.
2434
99da11ec
MS
24352017-12-17 Martin Sebor <msebor@redhat.com>
2436
2437 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
2438 an error for attribute warn_if_not_aligned.
2439
cc8bea0a
MS
24402017-12-16 Martin Sebor <msebor@redhat.com>
2441
2442 PR tree-optimization/78918
2443 * c-common.c (check_function_restrict): Avoid checking built-ins.
2444 * c.opt (-Wrestrict): Include in -Wall.
2445
4849deb1
JJ
24462017-12-15 Jakub Jelinek <jakub@redhat.com>
2447
2448 * c-attribs.c (c_common_attribute_table,
2449 c_common_format_attribute_table): Swap affects_type_identity
2450 and handler fields, adjust comments.
2451
c65e18d3
BE
24522017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2453
2454 * c.opt (Wcast-function-type): New warning option.
2455 * c-lex.c (get_fileinfo): Avoid warning.
2456 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
2457
2004617a
QZ
24582017-12-14 Qing Zhao <qing.zhao@oracle.com>
2459
7365279f 2460 PR middle_end/79538
2004617a
QZ
2461 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
2462 Adjust the size of buf1 and buf2, add a new buf to avoid
2463 format-overflow warning.
2464
ab20d992 24652017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
2466
2467 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
2468 subsequent statement list.
2469
5d9ae53d
MS
24702017-12-07 Martin Sebor <msebor@redhat.com>
2471
2472 PR c/81544
2473 PR c/81566
2474 * c-attribs.c (attr_aligned_exclusions): New array.
2475 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
2476 (attr_common_exclusions, attr_const_pure_exclusions): Same.
2477 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
2478 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
2479 (attr_warn_unused_result_exclusions): Same.
2480 (handle_hot_attribute, handle_cold_attribute): Simplify.
2481 (handle_const_attribute): Warn on function returning void.
2482 (handle_pure_attribute): Same.
2483 (handle_aligned_attribute): Diagnose conflicting attribute
2484 specifications.
2485 * c-warn.c (diagnose_mismatched_attributes): Simplify.
2486
c79144f8
DM
24872017-12-06 David Malcolm <dmalcolm@redhat.com>
2488
2489 PR c/83236
2490 * c-common.c (selftest::c_family_tests): Call
2491 selftest::c_spellcheck_cc_tests.
2492 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
2493 * c-spellcheck.cc: Include "selftest.h".
2494 (name_reserved_for_implementation_p): New function.
2495 (should_suggest_as_macro_p): New function.
2496 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
2497 should_suggest_as_macro_p and call it.
2498 (selftest::test_name_reserved_for_implementation_p): New function.
2499 (selftest::c_spellcheck_cc_tests): New function.
2500 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
2501
613bc14f
DM
25022017-12-06 David Malcolm <dmalcolm@redhat.com>
2503
2504 * c-spellcheck.cc: New file, taken from macro-handling code in
2505 spellcheck-tree.c.
2506 * c-spellcheck.h: New file, taken from macro-handling code in
2507 spellcheck-tree.h.
2508
e76c7157
JJ
25092017-12-01 Jakub Jelinek <jakub@redhat.com>
2510
2511 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
2512 attribute.
2513 (handle_simd_attribute): Don't check for "cilk simd function"
2514 attribute. Reindent, formatting changes.
2515
b0da4034
JK
25162017-11-30 Julia Koval <julia.koval@intel.com>
2517
2518 * c-common.h (inv_list): Remove.
2519
058f0b9e
JJ
25202017-11-28 Jakub Jelinek <jakub@redhat.com>
2521
2522 PR sanitizer/81275
2523 * c-common.c (c_switch_covers_all_cases_p_1,
2524 c_switch_covers_all_cases_p): New functions.
2525 * c-common.h (c_switch_covers_all_cases_p): Declare.
2526
5e9d6aa4 25272017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 2528 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
2529
2530 * array-notation-common.c: Delete.
2531 * c-cilkplus.c: Ditto.
2532 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
2533 * c-common.def (ARRAY_NOTATION_REF): Remove.
2534 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
2535 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
2536 c_validate_cilk_plus_loop, cilkplus_an_parts,
2537 cilk_ignorable_spawn_rhs_op,
2538 cilk_recognize_spawn): Remove.
2539 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
2540 * c-omp.c: Remove CILK_SIMD check.
2541 * c-pragma.c: Ditto.
2542 * c-pragma.h: Remove CILK related pragmas.
2543 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
2544 ARRAY_NOTATION_REF condition.
2545 (c_pretty_printer::expression): Ditto.
2546 * c.opt (fcilkplus): Remove.
2547 * cilk.c: Delete.
2548
1af4ebf5
MG
25492017-11-21 Marc Glisse <marc.glisse@inria.fr>
2550
2551 * c-pretty-print.c (pp_c_additive_expression,
2552 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
2553
d44ed508
JJ
25542017-11-21 Jakub Jelinek <jakub@redhat.com>
2555
7d2f0f9b
JJ
2556 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
2557
d44ed508
JJ
2558 PR c++/83059
2559 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
2560 instead of tree_to_uhwi, formatting fix.
2561
26edace6
DM
25622017-11-20 David Malcolm <dmalcolm@redhat.com>
2563
2564 PR c/81404
2565 * known-headers.cc: New file, based on material from c/c-decl.c.
2566 (suggest_missing_header): Copied as-is.
2567 (get_stdlib_header_for_name): New, based on get_c_name_hint but
2568 heavily edited to add C++ support. Add some knowledge about
2569 <limits.h>, <stdint.h>, and <wchar.h>.
2570 * known-headers.h: Likewise.
2571
6c7a259b
DM
25722017-11-20 David Malcolm <dmalcolm@redhat.com>
2573
2574 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
2575 (lookup_name_fuzzy): Likewise. Convert return type from
2576 const char * to name_hint. Add location_t param.
2577 * name-hint.h: New header.
2578
f9c59f7e
JJ
25792017-11-19 Jakub Jelinek <jakub@redhat.com>
2580
2581 PR c/66618
2582 PR c/69960
2583 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
2584
1e39313a
JM
25852017-11-16 Joseph Myers <joseph@codesourcery.com>
2586
2587 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
2588 expected publication date of C17.
2589 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
2590
3ca0dc60
JM
25912017-11-15 Joseph Myers <joseph@codesourcery.com>
2592
2593 PR c/81156
2594 * c-common.c (c_common_reswords): Add __builtin_tgmath.
2595 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
2596
025d57f0
MS
25972017-11-10 Martin Sebor <msebor@redhat.com>
2598
2599 PR c/81117
2600 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
2601 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
2602 * c.opt (-Wstringop-truncation): New option.
2603
1b6fa695
ML
26042017-11-06 Martin Liska <mliska@suse.cz>
2605
2606 PR middle-end/82404
2607 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
2608 FE.
2609 * c.opt: Set default value of warn_return_type.
2610
64a5912c
DM
26112017-10-31 David Malcolm <dmalcolm@redhat.com>
2612
2613 * c-common.c (binary_op_error): Update for renaming of
2614 error_at_rich_loc.
2615 (c_parse_error): Likewise.
2616 * c-warn.c (warn_logical_not_parentheses): Likewise for
2617 renaming of inform_at_rich_loc.
2618 (warn_for_restrict): Likewise for renaming of
2619 warning_at_rich_loc_n.
2620
c76dc9c3
JM
26212017-10-30 Joseph Myers <joseph@codesourcery.com>
2622
2623 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
2624 * c-opts.c (set_std_c17): New function.
2625 (c_common_init_options): Use gnu17 as default C version.
2626 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
2627
ee5fd23a
MM
26282017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2629
2630 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
2631 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
2632 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
2633 __FP_FAST_FMA<N>X.
2634
d1047465
MP
26352017-10-23 Marek Polacek <polacek@redhat.com>
2636
2637 PR c/82681
2638 * c-warn.c (warnings_for_convert_and_check): Fix typos.
2639
9e878cf1
EB
26402017-10-19 Eric Botcazou <ebotcazou@adacore.com>
2641
2642 * c-common.c (check_builtin_function_arguments): Also check arguments
2643 of __builtin_alloca_with_align_and_max.
2644
89b6abbb
DM
26452017-10-17 David Malcolm <dmalcolm@redhat.com>
2646
2647 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
2648 rather than NULL to format_warning_va.
2649 (check_format_types): Likewise when calling format_type_warning.
2650 Remove code to extract source_ranges and source_range * in favor
2651 of just a location_t.
2652 (format_type_warning): Convert source_range * param to a
2653 location_t.
2654
39382c09
JJ
26552017-10-13 Jakub Jelinek <jakub@redhat.com>
2656
2657 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
2658 [LR]SHIFT_EXPR.
2659
62e1c678
DM
26602017-10-12 David Malcolm <dmalcolm@redhat.com>
2661
2662 * c-common.c (enum missing_token_insertion_kind): New enum.
2663 (get_missing_token_insertion_kind): New function.
2664 (maybe_suggest_missing_token_insertion): New function.
2665 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
2666
b90c9338
NS
26672017-10-11 Nathan Sidwell <nathan@acm.org>
2668
2669 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
2670 (c_common_handle_option): Update incpath_kind names.
2671
3a266bcd
ML
26722017-10-11 Martin Liska <mliska@suse.cz>
2673
2674 PR sanitizer/82490
2675 * c-attribs.c (handle_no_sanitize_attribute): Report directly
2676 Wattributes warning.
2677
8e6cdc90
RS
26782017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2679
2680 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
2681 operating on trees as wide_ints.
2682 * c-common.c (pointer_int_sum): Likewise.
2683 * c-pretty-print.c (pp_c_integer_constant): Likewise.
2684 * c-warn.c (match_case_to_enum_1): Likewise.
2685 (c_do_switch_warnings): Likewise.
2686 (maybe_warn_shift_overflow): Likewise.
2687
802b38c9
JJ
26882017-10-10 Jakub Jelinek <jakub@redhat.com>
2689
2690 PR c/82437
2691 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
2692 instead of wide_int::from.
2693
4e34b338
JJ
26942017-10-06 Jakub Jelinek <jakub@redhat.com>
2695
2696 PR c/82437
2697 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
2698 using to_widest use wide_int with the larger of the two precisions.
2699
4bc4b2b4
BE
27002017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
2701
2702 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
2703 functions.
2704
a1488398
RS
27052017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
2706
2707 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
2708 when combining the original unconverted comparison operands.
2709
01c9fb68
JJ
27102017-09-29 Jakub Jelinek <jakub@redhat.com>
2711
2712 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
2713 attribute.
2714
6e3e8419
EB
27152017-09-29 Eric Botcazou <ebotcazou@adacore.com>
2716
2717 * c-ada-spec.c (to_ada_name): Add index parameter.
2718 (pp_ada_tree_identifier): Likewise.
2719 (dump_ada_macros): Adjust call to to_ada_name.
2720 (struct overloaded_name_hash): New type.
2721 (struct overloaded_name_hasher): Likewise.
2722 (overloaded_names): New hash table.
2723 (compute_overloading_index): New function.
2724 (dump_ada_decl_name): Call it and pass the result to
2725 pp_ada_tree_identifier.
2726 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
2727 (dump_ada_function_declaration): Likewise.
2728 (dump_generic_ada_node): Likewise.
2729 (print_constructor): Likewise.
2730 (print_destructor): Likewise.
2731 (dump_ada_specs): Delete overloaded_names table.
2732
79310774
EB
27332017-09-29 Eric Botcazou <ebotcazou@adacore.com>
2734
2735 * c-ada-spec.c (max_ada_macros): Move around.
2736 (store_ada_macro_index): Likewise.
2737 (source_file): Rename into...
2738 (macro_source_file): ...this.
2739 (count_ada_macro): Move around.
2740 (store_ada_macro): Likewise.
2741 (compare_macro): Likewise.
2742 (print_ada_macros): Merge in...
2743 (dump_ada_macros): ...this.
2744 (source_file_base): Rename into...
2745 (current_source_file): ...this.
2746 (print_comment): Move around.
2747 (dump_ada_nodes): Call dump_ada_declaration directly.
2748 (struct with): Change type of limited field to bool.
2749 (append_withs): Change type of limited_access parameter to bool.
2750 (pp_ada_tree_identifie): Likewise.
2751 (dump_ada_decl_nam): Likewise.
2752 (dump_generic_ada_node): Likewise. Do not print the return type.
2753 (to_ada_name): Change type of space_found parameter to bool.
2754 (dump_ada_function_declaration): Return void and change type of
2755 parameters to bool. Also print the return type for a function.
2756 (print_ada_methods): Rename into...
2757 (dump_ada_methods): ...this.
2758 (print_ada_declaration): Rename into ...
2759 (dump_ada_declaration): ...this. Do not print the return type.
2760 (print_ada_struct_decl): Rename into...
2761 (dump_ada_struct_decl): ...this.
2762
7d386d45
JJ
27632017-09-29 Jakub Jelinek <jakub@redhat.com>
2764
2765 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
2766 rather than DECL_INITIAL.
2767 (common_handle_aligned_attribute): Likewise.
2768
ab20d992 27692017-09-20 Alexandre Oliva <aoliva@redhat.com>
9ed32e27
AO
2770
2771 * c.opt (gen-decls): Add RejectNegative.
2772
026a79f7
AS
27732017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
2774 Jakub Jelinek <jakub@redhat.com>
2775
2776 Add support for -std=c++2a.
2777 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
2778 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
2779 * c-opts.c (set_std_cxx2a): New.
2780 (c_common_handle_option): Set options when -std=c++2a is enabled.
2781 (c_common_post_options): Adjust comments.
2782 (set_std_cxx14, set_std_cxx17): Likewise.
2783
4a8ca690
EB
27842017-09-15 Eric Botcazou <ebotcazou@adacore.com>
2785
2786 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
2787 message for non-uniform endianness and issue a warning in C++.
2788
7b936140
JJ
27892017-09-15 Jakub Jelinek <jakub@redhat.com>
2790
2791 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
2792 (Wc++17-compat): Change from undocumented alias to option.
2793 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
2794 change C++1z to C++17 in description.
2795 (std=c++1z, std=gnu++1z): Change from option to undocumented
2796 deprecated alias.
2797 (std=c++17, std=gnu++17): Change from undocumented alias to option.
2798 Adjust description.
2799 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
2800 * c-opts.c (set_std_cxx1z): Rename to ...
2801 (set_std_cxx17): ... this.
2802 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
2803 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 2804 caller.
7b936140
JJ
2805 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
2806 comments.
2807
12263f13
L
28082017-09-12 H.J. Lu <hongjiu.lu@intel.com>
2809
2810 * c-attribs.c (common_handle_aligned_attribute): Don't warn
2811 function alignment if warn_if_not_aligned_p is true.
2812
6836632e
NS
28132017-09-12 Nathan Sidwell <nathan@acm.org>
2814
2815 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2816 resort_sorted_fields): Move to c/c-decl.c.
2817 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
2818 (struct sorted_fields_type): Move to c/c-lang.h.
2819
019bf9ad
JW
28202017-09-09 Jonathan Wakely <jwakely@redhat.com>
2821
2822 PR c++/81852
2823 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
2824
bc7fe952
MP
28252017-09-04 Marek Polacek <polacek@redhat.com>
2826
2827 PR c/81783
2828 * c-warn.c (warn_tautological_bitwise_comparison): New function.
2829 (warn_tautological_cmp): Call it.
2830
ab20d992 28312017-09-01 Boris Kolpackov <boris@codesynthesis.com>
de7c2c6a
BK
2832
2833 * c-opts.c (c_common_finish): Write dependency information even if
2834 there are errors.
2835
d2e05fcb
JJ
28362017-09-01 Jakub Jelinek <jakub@redhat.com>
2837
2838 PR c/81887
2839 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
2840 (omp_pragmas_simd): ... here.
2841 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
2842 create new clauses list containing just simd clause.
2843
18e2a8b8
RS
28442017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2845 Alan Hayward <alan.hayward@arm.com>
2846 David Sherwood <david.sherwood@arm.com>
2847
2848 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
2849 into scalar_mode_supported_p call.
2850 (handle_mode_attribute): Update call to scalar_mode_supported_p.
2851
16d22000
RS
28522017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2853 Alan Hayward <alan.hayward@arm.com>
2854 David Sherwood <david.sherwood@arm.com>
2855
2856 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
2857 for the mode iterator.
2858
b397965c
RS
28592017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2860 Alan Hayward <alan.hayward@arm.com>
2861 David Sherwood <david.sherwood@arm.com>
2862
2863 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
2864 * c-common.c (c_build_vec_perm_expr): Likewise.
2865
357b7604
RS
28662017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2867 Alan Hayward <alan.hayward@arm.com>
2868 David Sherwood <david.sherwood@arm.com>
2869
2870 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
2871
e05c94ba
RS
28722017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2873 Alan Hayward <alan.hayward@arm.com>
2874 David Sherwood <david.sherwood@arm.com>
2875
2876 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
2877 before calling targetm.addr_space.valid_pointer_mode.
2878
5c20c4af
RS
28792017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2880 Alan Hayward <alan.hayward@arm.com>
2881 David Sherwood <david.sherwood@arm.com>
2882
2883 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
2884
c94843d2 28852017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
2886 Alan Hayward <alan.hayward@arm.com>
2887 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
2888
2889 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
2890 iterators.
2891 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
2892
4e10a5a7
RS
28932017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2894 Alan Hayward <alan.hayward@arm.com>
2895 David Sherwood <david.sherwood@arm.com>
2896
2897 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
2898 case statements.
2899
130fcab0
ML
29002017-08-29 Martin Liska <mliska@suse.cz>
2901
2902 PR other/39851
2903 * c-common.c (parse_optimize_options): Add argument to function
2904 call.
2905 * c-pragma.c (handle_pragma_diagnostic): Likewise.
2906
14e18d71
DM
29072017-08-24 David Malcolm <dmalcolm@redhat.com>
2908
2909 * c-lex.c (interpret_float): Use token location
2910 when building an EXCESS_PRECISION_EXPR.
2911
2f687306
DM
29122017-08-21 David Malcolm <dmalcolm@redhat.com>
2913
2914 * c-common.c (check_function_arguments): Add "arglogs" param; pass
2915 it to check_function_format.
2916 * c-common.h (check_function_arguments): Add vec<location_t> *
2917 param.
2918 (check_function_format): Likewise.
2919 * c-format.c (struct format_check_context): Add field "arglocs".
2920 (check_function_format): Add param "arglocs"; pass it to
2921 check_format_info.
ab20d992 2922 (check_format_info): Add param "arglocs"; use it to initialize
2f687306
DM
2923 new field of format_ctx.
2924 (check_format_arg): Pass format_ctx->arglocs to new param of
2925 check_format_info_main.
2926 (class argument_parser): New field "arglocs".
2927 (argument_parser::argument_parser): Add "arglocs_" param and use
2928 it to initialize new field.
2929 (argument_parser::check_argument_type): Pass new arglocs field to
2930 check_format_types.
2931 (check_format_info_main): Add param "arglocs", and use it when
2932 constructing arg_parser.
2933 (check_format_types): Add param "arglocs"; use it if non-NULL when
2934 !EXPR_HAS_LOCATION (cur_param) to get at location information.
2935
00aa1fa2
L
29362017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2937
2938 PR c/53037
2939 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
2940 (c_common_attribute_table): Add warn_if_not_aligned.
2941 (handle_aligned_attribute): Renamed to ...
2942 (common_handle_aligned_attribute): Remove argument, name, and add
2943 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
2944 (handle_aligned_attribute): New.
2945 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
2946
27be025d
MS
29472017-08-14 Martin Sebor <msebor@redhat.com>
2948
2949 PR c/81117
2950 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
2951 (handle_nonstring_attribute): New function.
2952
da67acb9
MS
29532017-08-14 Martin Sebor <msebor@redhat.com>
2954
2955 PR c/81117
2956 * c-format.h (T89_G): New macro.
2957 * c-format.c (local_gcall_ptr_node): New variable.
2958 (init_dynamic_diag_info): Initialize it.
2959
a8b522b4
ML
29602017-08-11 Martin Liska <mliska@suse.cz>
2961
2962 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
2963 TARGET_SUPPORTS_ALIASES.
2964
32129a17
DM
29652017-08-10 David Malcolm <dmalcolm@redhat.com>
2966
2967 * c-common.c (c_parse_error): Add rich_location * param, using it
2968 rather implicitly using input_location.
2969 * c-common.h (c_parse_error): Add rich_location * param.
2970
30af3a2b
MP
29712017-08-09 Marek Polacek <polacek@redhat.com>
2972
2973 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
2974 (c_common_truthvalue_conversion): Likewise.
2975 * c-omp.c (c_finish_omp_atomic): Likewise.
2976 * c-common.h (build_binary_op): Update declaration.
2977
314e6352
ML
29782017-08-08 Martin Liska <mliska@suse.cz>
2979
2980 * c-ada-spec.c: Include header files.
2981 * c-ubsan.c: Likewise.
2982 * c-warn.c: Likewise.
2983
56b5041c
JJ
29842017-08-07 Jakub Jelinek <jakub@redhat.com>
2985
2986 PR c/69389
2987 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
2988
db440138
EB
29892017-08-07 Eric Botcazou <ebotcazou@adacore.com>
2990
2991 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
2992 (print_ada_methods): Likewise.
2993 (print_ada_declaration): Likewise.
2994
577eec56
ML
29952017-08-07 Martin Liska <mliska@suse.cz>
2996
2997 * array-notation-common.c: Add new includes.
2998 * c-format.c( handle_format_attribute): Canonicalize a format
2999 function name.
3000 * c-lex.c (c_common_has_attribute): Canonicalize name of an
3001 attribute.
3002 * c-pretty-print.c: Add new include.
3003
b854df3c
EB
30042017-08-05 Eric Botcazou <ebotcazou@adacore.com>
3005
3006 * c-ada-spec.c (has_static_fields): Look only into variables.
3007 (print_constructor): Add TYPE parameter and use it for the name.
3008 (print_destructor): Likewise.
3009 (print_ada_declaration): Adjust to new constructor/destructor names.
3010 Adjust calls to print_constructor and print_destructor.
3011 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
3012 Look only into variables in the final loop.
3013
9f2cb25e
EB
30142017-08-01 Eric Botcazou <ebotcazou@adacore.com>
3015
3016 * c-ada-spec.c (has_static_fields): Look only into fields.
3017 (dump_generic_ada_node): Small tweak.
3018 (dump_nested_types): Look only into fields.
3019 (print_ada_declaration): Look only into methods. Small tweak.
3020 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
3021
f4bcd9eb
EB
30222017-08-01 Eric Botcazou <ebotcazou@adacore.com>
3023
3024 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
3025 (dump_ada_function_declaration): Likewise.
3026 (dump_generic_ada_node): Likewise.
3027 (print_ada_declaration): Add support for const-qualified variables.
3028
f34ebeb2
ML
30292017-07-31 Martin Liska <mliska@suse.cz>
3030
3031 PR sanitize/81530
3032 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
3033 Guard condition with flag_sanitize_p also with current_function_decl
3034 non-null equality.
3035 (ubsan_maybe_instrument_reference_or_call): Likewise.
3036
218e5d04
UB
30372017-07-30 Uros Bizjak <ubizjak@gmail.com>
3038
3039 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
3040
942047f2
EB
30412017-07-29 Eric Botcazou <ebotcazou@adacore.com>
3042
3043 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
3044 for enumeral types.
3045 (print_ada_declaration): Add missing guard for record types.
3046
a40ff0ae
JJ
30472017-07-27 Jakub Jelinek <jakub@redhat.com>
3048
3049 PR c/45784
3050 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
3051 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
3052 new COMPOUND_EXPRs around the rhs of the comparison.
3053
06bd22f6
MP
30542017-07-27 Marek Polacek <polacek@redhat.com>
3055
3056 PR c/81417
3057 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
3058 the types.
3059
036ea399
JJ
30602017-07-27 Jakub Jelinek <jakub@redhat.com>
3061
3062 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
3063 (handle_noipa_attribute): New function.
3064
417ca011
TD
30652017-07-07 Torsten Duwe <duwe@suse.de>
3066
3067 * c-attribs.c (c_common_attribute_table): Add entry for
3068 "patchable_function_entry".
3069
5aaa8fb4
NS
30702017-07-20 Nathan Sidwell <nathan@acm.org>
3071
3072 Remove TYPE_METHODS.
3073 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
3074 dump_ada_template, print_ada_methods,
3075 print_ada_declaration): Member fns are on TYPE_FIELDS.
3076
ff22eb12
NS
30772017-07-18 Nathan Sidwell <nathan@acm.org>
3078
3079 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
3080
eea77d1f
DM
30812017-07-14 David Malcolm <dmalcolm@redhat.com>
3082
3083 * c-common.c (try_to_locate_new_include_insertion_point): New
3084 function.
3085 (per_file_includes_t): New typedef.
3086 (added_includes_t): New typedef.
3087 (added_includes): New variable.
3088 (maybe_add_include_fixit): New function.
3089 * c-common.h (maybe_add_include_fixit): New decl.
3090
281ac396
MS
30912017-07-10 Martin Sebor <msebor@redhat.com>
3092
3093 PR other/81345
3094 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
3095
b6f43128
DM
30962017-07-06 David Malcolm <dmalcolm@redhat.com>
3097
3098 * c-common.c (selftest::c_family_tests): New.
3099 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
3100 (selftest::c_family_tests): New decl.
3101
efbf55b0
MP
31022017-07-04 Marek Polacek <polacek@redhat.com>
3103
3104 PR c/81231
3105 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
3106 types.
3107
6c86bd88
MP
31082017-07-04 Marek Polacek <polacek@redhat.com>
3109
3110 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
3111
17a7218b
ML
31122017-06-28 Martin Liska <mliska@suse.cz>
3113
3114 PR ipa/81128
3115 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
3116 to a function declaration.
3117
63010089
ML
31182017-06-28 Martin Liska <mliska@suse.cz>
3119
3120 PR driver/79659
3121 * c.opt: Add IntegerRange to various options.
3122
3e2becc4
MP
31232017-06-26 Marek Polacek <polacek@redhat.com>
3124
3125 PR c/80116
3126 * c-common.h (warn_for_multistatement_macros): Declare.
3127 * c-warn.c: Include "c-family/c-indentation.h".
3128 (warn_for_multistatement_macros): New function.
3129 * c.opt (Wmultistatement-macros): New option.
3130 * c-indentation.c (guard_tinfo_to_string): No longer static.
3131 Change the parameter type to "enum rid". Handle RID_SWITCH.
3132 * c-indentation.h (guard_tinfo_to_string): Declare.
3133
2db9b7cd
MG
31342017-06-23 Marc Glisse <marc.glisse@inria.fr>
3135
3136 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
3137
c3684b7b
MS
31382017-06-15 Martin Sebor <msebor@redhat.com>
3139
3140 PR c++/80560
3141 * c.opt (-Wclass-memaccess): New option.
3142
e72c4afd
BK
31432017-06-14 Boris Kolpackov <boris@codesynthesis.com>
3144
3145 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
3146
8a516588
MP
31472017-06-13 Marek Polacek <polacek@redhat.com>
3148
3149 PR objc/80949
3150 * c-warn.c (do_warn_duplicated_branches): Return if any of the
3151 branches is null.
3152
45b2222a
ML
31532017-06-13 Martin Liska <mliska@suse.cz>
3154
3155 PR sanitize/78204
3156 * c-attribs.c (add_no_sanitize_value): New function.
3157 (handle_no_sanitize_attribute): Likewise.
3158 (handle_no_sanitize_address_attribute): Use the function.
3159 (handle_no_sanitize_thread_attribute): New function.
3160 (handle_no_address_safety_analysis_attribute): Use
3161 add_no_sanitize_value.
3162 (handle_no_sanitize_undefined_attribute): Likewise.
3163 * c-common.h: Declare new functions.
3164 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
3165 (ubsan_instrument_shift): Likewise.
3166 (ubsan_instrument_bounds): Likewise.
3167 (ubsan_maybe_instrument_array_ref): Likewise.
3168 (ubsan_maybe_instrument_reference_or_call): Likewise.
3169
a01f151f
JM
31702017-06-11 Jason Merrill <jason@redhat.com>
3171
3172 * c-ada-spec.c, c-pragma.c: Use id_equal.
3173
3de4ac6d
MP
31742017-06-04 Marek Polacek <polacek@redhat.com>
3175
3176 PR c/80919
3177 * c-format.c (matching_type_p): Return false if any of the types
3178 requires structural equality.
3179
2474f48f
MS
31802017-06-02 Martin Sebor <msebor@redhat.com>
3181
3182 PR c/80892
3183 * c-warn.c (conversion_warning): Use -Wconversion for integer
3184 conversion and -Wfloat-conversion for floating one.
3185
40ffd95f
BE
31862017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3187
3188 * c.opt (Wsizeof-pointer-div): New warning option.
3189
3fa4634c
VR
31902017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
3191
3192 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
3193 (Wcatch-value=1): Enable by -Wall.
3194
f012c8ef
DM
31952017-05-30 David Malcolm <dmalcolm@redhat.com>
3196
3197 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
3198 format_chars.
3199 * c.opt (fdiagnostics-show-template-tree): New option.
3200 (felide-type): New option.
3201
63dbcd13
VR
32022017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
3203
3204 * c.opt (Wcatch-value=): New C++ warning flag.
3205
be136b5c
NS
32062017-05-24 Nathan Sidwell <nathan@acm.org>
3207
3208 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
3209 const casts to avoid warning.
3210
3cd211af
MS
32112017-05-24 Martin Sebor <msebor@redhat.com>
3212
3213 PR c/80731
3214 * c-common.h (unsafe_conversion_p): Add a function argument.
3215 * c-common.c (unsafe_conversion_p): Same.
3216 Add type names and values to diagnostics.
3217 (scalar_to_vector): Adjust.
3218 * c-warn.c (constant_expression_error): Add a function argument.
3219 Add type names and values to diagnostics.
3220 (conversion_warning): Add a function argument.
3221 Add type names and values to diagnostics.
3222 (warnings_for_convert_and_check): Same.
3223
1ff7be5a
JM
32242017-05-19 Jason Merrill <jason@redhat.com>
3225
3226 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
3227 enumerators.
3228
ff502317
BE
32292017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3230
3231 * c-format.c (locus): Move out of function scope,
3232 add GTY attribute.
3233
2a8a8d7b
NS
32342017-05-19 Nathan Sidwell <nathan@acm.org>
3235
3236 * c-opts.c (class_dump_file, class_dump_flags): Delete.
3237 (c_common_parse_file): Remove class dump handling.
3238 (get_dump_info): Likewise.
3239
39aac208
RB
32402017-05-19 Richard Biener <rguenther@suse.de>
3241
3242 PR c++/80593
3243 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
3244 to alias-set zero memory.
3245
6ecd2339
BE
32462017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3247
3248 * c-format.c (local_tree_type_node): Add GTY attribute.
3249
6574d78e
MP
32502017-05-18 Marek Polacek <polacek@redhat.com>
3251
3252 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
3253 (c_common_fixed_point_type_for_size): Likewise.
3254 (c_common_type_for_mode): Likewise.
3255 (shorten_compare): Likewise.
3256 (c_promoting_integer_type_p): Use false/true instead of 0/1.
3257 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
3258
e3455240
MP
32592017-05-18 Marek Polacek <polacek@redhat.com>
3260
3261 * c-common.c (self_promoting_args_p): Change the return type to bool.
3262 Use false/true instead of 0/1.
3263 * c-common.h (self_promoting_args_p): Update.
3264
3fa8871b
MP
32652017-05-17 Marek Polacek <polacek@redhat.com>
3266
3267 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
3268 * c-warn.c: Likewise.
3269
b42cc3ca
VV
32702017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
3271
3272 Implement new C++ intrinsics __is_assignable and __is_constructible.
3273 * c-common.c (__is_assignable, __is_constructible): New.
3274 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
3275
1a817418
ML
32762017-05-17 Martin Liska <mliska@suse.cz>
3277
3278 * c-common.h: Introduce dump_flags_t type and
3279 use it instead of int type.
3280 * c-gimplify.c (c_genericize): Likewise.
3281 * c-opts.c: Likewise.
3282
b2fa0a8b
MP
32832017-05-17 Marek Polacek <polacek@redhat.com>
3284
3285 * c-common.c (c_save_expr): Remove.
3286 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
3287 * c-common.h (c_save_expr): Remove declaration.
3288
31c2d57d
VR
32892017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
3290
3291 PR c/35441
3292 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
3293 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
3294 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
3295 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
3296 RDIV_EXPR.
3297 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
3298
684f84de
MP
32992017-05-09 Marek Polacek <polacek@redhat.com>
3300
3301 PR c/80525
3302 * c-warn.c (unwrap_c_maybe_const): New.
3303 (warn_logical_operator): Call it.
3304
641da50a
NS
33052017-05-09 Nathan Sidwell <nathan@acm.org>
3306
3307 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
3308 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
3309
631238ac
MS
33102017-05-08 Martin Sebor <msebor@redhat.com>
3311
3312 PR translation/80280
3313 * c-format.h (struct format_flag_spec): Add new member.
3314 (T89_T): New macro.
3315 * c-format.c (local_tree_type_node): New global.
3316 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
3317 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
3318 (strfmon_flag_specs): Likewise.
3319 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
3320 with distinct quoting properties.
3321 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
3322 (flag_chars_t::validate): Add argument and handle bad quoting.
3323 (check_format_info_main): Handle quoting problems.
3324 (init_dynamic_diag_info): Simplify.
3325
49f0c04c
JM
33262017-05-08 Jason Merrill <jason@redhat.com>
3327
3328 * c-opts.c (c_common_post_options): Update defaults for
3329 flag_abi_version and flag_abi_compat_version.
3330
56d35585
DM
33312017-05-05 David Malcolm <dmalcolm@redhat.com>
3332
3333 * c-common.c (c_cpp_error): Replace report_diagnostic
3334 with diagnostic_report_diagnostic.
3335
0f2c4a8f
MS
33362017-05-04 Martin Sebor <msebor@redhat.com>
3337
3338 PR translation/80280
3339 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
3340 (handle_weakref_attribute): Same.
3341
6fe63fb4
NS
33422017-05-03 Nathan Sidwell <nathan@acm.org>
3343
3344 Canonicalize canonical type hashing
3345 * c-common.c (complete_array_type): Use type_hash_canon.
3346
815d9cc6
XR
33472017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3348
92a285c1 3349 PR c++/80038
815d9cc6
XR
3350 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
3351 prototype.
3352 (cilk_install_body_pedigree_operations): Likewise.
3353 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
3354 detatched.
3355 (cilk_gimplify_call_params_in_spawned_fn): Remove.
3356 (cilk_install_body_pedigree_operations): Likewise.
3357 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
3358 unwrapping.
3359
f8a36447
JJ
33602017-04-27 Jakub Jelinek <jakub@redhat.com>
3361
3362 PR c++/80534
3363 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
3364 flag on non-aggregate element types.
3365
7c145456
BE
33662017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
3367
3368 * c-common.c (c_type_hasher, type_hash_table): Remove.
3369 (c_common_get_alias_set): Remove unreachable code.
3370 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
3371
c3cbcd45
VR
33722017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
3373
3374 * c.opt (Wextra-semi): New C++ warning flag.
3375
8a59d466
JJ
33762017-04-20 Jakub Jelinek <jakub@redhat.com>
3377
3378 PR middle-end/80423
3379 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
3380
8487c9a5
JJ
33812017-04-18 Jakub Jelinek <jakub@redhat.com>
3382
3383 PR middle-end/79788
3384 PR middle-end/80375
3385 * c-common.c (c_common_type_for_mode): Don't handle
3386 widest_*_literal_type_node here.
3387 c_common_signed_or_unsigned_type): Likewise.
3388 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
3389 to *intTI_type_node or *intDI_type_node depending on whether
3390 TImode is supported by the target or not.
3391
3ee0fb02
ML
33922017-04-10 Martin Liska <mliska@suse.cz>
3393
3394 PR sanitizer/80350
3395 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
3396 doing an UBSAN check.
3397
5764ee3c
JW
33982017-04-03 Jonathan Wakely <jwakely@redhat.com>
3399
3400 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
3401
6f3af356
JJ
34022017-03-31 Jakub Jelinek <jakub@redhat.com>
3403
3404 PR c++/79572
3405 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
3406 tree *.
3407 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
3408 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
3409 REFERENCE_TYPE.
3410
f6a7a9d5
DM
34112017-03-31 David Malcolm <dmalcolm@redhat.com>
3412
3413 PR documentation/78732
3414 * c.opt (Wendif-labels): Fix description to refer to
3415 #else rather than #elif.
3416
af88f557
JJ
34172017-03-31 Jakub Jelinek <jakub@redhat.com>
3418
3419 PR libstdc++/80251
3420 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
3421 * c-common.c (c_common_reswords): Add __is_aggregate trait.
3422
a9e4a1a5
JJ
34232017-03-27 Jakub Jelinek <jakub@redhat.com>
3424
3425 PR middle-end/80162
3426 * c-common.c (c_common_mark_addressable_vec): Don't set
3427 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
3428
3f01b620
MS
34292017-03-21 Martin Sebor <msebor@redhat.com>
3430
3431 PR c++/79548
3432 * c-common.c (set_underlying_type): Mark type used only when
3433 original del is declared unused.
3434
2f6f187a
DM
34352017-03-10 David Malcolm <dmalcolm@redhat.com>
3436
3437 PR translation/79848
3438 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
3439 "%qs".
3440
a02fa805
DM
34412017-03-10 David Malcolm <dmalcolm@redhat.com>
3442
3443 PR c/79921
3444 * c-indentation.c (warn_for_misleading_indentation): Remove parens
3445 from inform's message, so that xgettext can locate it.
3446
822a132c
MP
34472017-03-09 Marek Polacek <polacek@redhat.com>
3448
3449 PR c++/79962
3450 PR c++/79984
3451 * c-attribs.c (handle_nonnull_attribute): Save the result of default
3452 conversion to the attribute list.
3453
bba81f1c
ML
34542017-03-09 Martin Liska <mliska@suse.cz>
3455
3456 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
3457
108154ff
JM
34582017-03-03 Jason Merrill <jason@redhat.com>
3459
3460 * c.opt (Wnoexcept-type): New.
3461
eb0e7c34
RB
34622017-03-02 Richard Biener <rguenther@suse.de>
3463
3464 PR c/79756
3465 * c-common.c (c_common_mark_addressable_vec): Look through
3466 C_MAYBE_CONST_EXPR.
3467
9453ba0a
ML
34682017-02-28 Martin Liska <mliska@suse.cz>
3469
3470 * c.opt: Replace space with tabular for options of <number>
3471 type.
3472
6a825afe
ML
34732017-02-28 Martin Liska <mliska@suse.cz>
3474
3475 * c.opt: Fix --help=option -Q for options which are of
3476 an enum type.
3477
4227c9ad
JJ
34782017-02-24 Jakub Jelinek <jakub@redhat.com>
3479
3480 PR c++/79588
3481 * c-common.c (check_function_restrict): New function.
3482 (check_function_arguments): Add FNDECL argument. Call
3483 check_function_restrict if -Wrestrict.
3484 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
3485 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
3486 * c-common.h (check_function_arguments): Add FNDECL argument.
3487 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
3488
59909673
EB
34892017-02-24 Eric Botcazou <ebotcazou@adacore.com>
3490
3491 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
3492 treatment of parameters with pointer-to-tagged type and tidy up.
3493 (print_ada_methods): Remove the special treatment of C++ static member
3494 functions.
3495
54dcd526
ML
34962017-02-22 Martin Liska <mliska@suse.cz>
3497
3498 * c.opt: Replace inequality signs with square brackets
3499 for -Wnornalized.
3500
00bc9de3
JJ
35012017-02-21 Jakub Jelinek <jakub@redhat.com>
3502
3503 PR c++/79641
3504 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
3505 preserve quals.
3506
97fcf744
JM
35072017-02-17 Joseph Myers <joseph@codesourcery.com>
3508
3509 * c-cppbuiltin.c (builtin_define_float_constants): Define
3510 __DECIMAL_DIG__ to the value for long double.
3511
c7545f1c
MP
35122017-02-15 Marek Polacek <polacek@redhat.com>
3513
3514 PR c/79515
3515 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
3516 conversion has occured.
3517
c2e84327
DM
35182017-01-24 David Malcolm <dmalcolm@redhat.com>
3519
3520 * c-common.c (c_common_reswords): Add "__RTL".
3521 * c-common.h (enum rid): Add RID_RTL.
3522
2ebd93e1
MP
35232017-01-20 Marek Polacek <polacek@redhat.com>
3524
3525 PR c/64279
3526 * c-common.h (do_warn_duplicated_branches_r): Declare.
3527 * c-gimplify.c (c_genericize): Walk the function tree calling
3528 do_warn_duplicated_branches_r.
3529 * c-warn.c (expr_from_macro_expansion_r): New.
3530 (do_warn_duplicated_branches): New.
3531 (do_warn_duplicated_branches_r): New.
3532 * c.opt (Wduplicated-branches): New option.
3533
0d80ab91
DM
35342017-01-17 David Malcolm <dmalcolm@redhat.com>
3535
3536 PR c++/71497
3537 * c-indentation.c (warn_for_misleading_indentation): Use the past
3538 subjunctive in the note.
3539
7f991c36
AH
35402017-01-17 Aldy Hernandez <aldyh@redhat.com>
3541
3542 PR c/79116
3543 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
3544 start type to integer_type.
3545
1c70261c
JJ
35462017-01-16 Jakub Jelinek <jakub@redhat.com>
3547
3548 PR driver/49726
3549 * c.opt (gen-decls): Add Driver flag.
3550
1ddca3f3
PC
35512017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3552
3553 Revert:
3554 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3555
3556 PR c++/71737
3557 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
3558
7d2f3f1d
PC
35592017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3560
3561 PR c++/71737
3562 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
3563
bce6f760
MS
35642017-01-12 Martin Sebor <msebor@redhat.com>
3565
3566 (-Wformat-overflow): ...to this.
3567
bf5fbf46
MS
35682017-01-11 Martin Sebor <msebor@redhat.com>
3569
3570 PR c/78768
3571 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
3572 Also enable for LTO.
3573
e363df3f
JM
35742017-01-10 Jason Merrill <jason@redhat.com>
3575
3576 Implement P0195R2, C++17 variadic using.
3577 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
3578
bd2c6270
JJ
35792017-01-09 Jakub Jelinek <jakub@redhat.com>
3580
3581 PR translation/79019
3582 PR translation/79020
3583 * c.opt (Wnormalized=): Fix typo in description.
3584
efcc8d38
MS
35852017-01-08 Martin Sebor <msebor@redhat.com>
3586
3587 PR middle-end/77708
3588 * c.opt (-Wformat-truncation): New option.
3589
ab20d992 35902017-01-06 Alexandre Oliva <aoliva@redhat.com>
435f3f7a
AO
3591
3592 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
3593 value to unsigned short to fit in 4 hex digits without
3594 warnings.
3595
4e89adf9
EB
35962017-01-05 Eric Botcazou <ebotcazou@adacore.com>
3597
3598 * c.opt (fsso-struct): Add 'native' value.
3599
cd445b54
ML
36002017-01-05 Martin Liska <mliska@suse.cz>
3601
3602 PR pch/78970
3603 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
3604 header.
3605
a9342885
MP
36062017-01-04 Marek Polacek <polacek@redhat.com>
3607
3608 PR c++/64767
3609 * c.opt (Wpointer-compare): New option.
3610
fc73e60c
JJ
36112017-01-04 Jakub Jelinek <jakub@redhat.com>
3612
3613 PR driver/78957
3614 * c.opt (fsso-struct=): Add RejectNegative.
3615
cbe34bb5
JJ
36162017-01-01 Jakub Jelinek <jakub@redhat.com>
3617
3618 Update copyright years.
3619
d4a6c0ea
ML
36202016-12-29 Martin Liska <mliska@suse.cz>
3621
3622 PR c/78933
3623 * c.opt (strong-eval-order): Add RejectNegative keyword.
3624
67a5ad7c
JM
36252016-12-22 Jason Merrill <jason@redhat.com>
3626
3627 Implement P0522R0, matching of template template arguments.
3628 * c-cppbuiltin.c (c_cpp_builtins): Define
3629 __cpp_template_template_args.
3630
0dba7960
JJ
36312016-12-21 Jakub Jelinek <jakub@redhat.com>
3632
3633 PR bootstrap/78817
3634 * c-common.c (struct nonnull_arg_ctx): New type.
3635 (check_function_nonnull): Return bool instead of void. Use
3636 nonnull_arg_ctx as context rather than just location_t.
3637 (check_nonnull_arg): Adjust for the new context type, set
3638 warned_p to true if a warning has been diagnosed.
3639 (check_function_arguments): Return bool instead of void.
3640 * c-common.h (check_function_arguments): Adjust prototype.
3641
31bfc9b9
JM
36422016-12-21 Jason Merrill <jason@redhat.com>
3643
3644 * c.opt (-fnew-ttp-matching): New flag.
3645 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
3646
629b3d75
MJ
36472016-12-14 Martin Jambor <mjambor@suse.cz>
3648
3649 * c-omp.c: Include omp-general.h instead of omp-low.h.
3650 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
3651 name.
3652
474da67e
MS
36532016-12-14 Martin Sebor <msebor@redhat.com>
3654
3655 PR c/17308
3656 * c-common.c (check_nonnull_arg): Disable when optimization
3657 is enabled.
3658
fe366b87
MP
36592016-12-12 Marek Polacek <polacek@redhat.com>
3660
3661 PR c++/78647
3662 * c-common.c (attribute_fallthrough_p): Return false for
3663 error_mark_node.
3664
8bd9f164
MS
36652016-12-08 Martin Sebor <msebor@redhat.com>
3666
3667 PR c/78284
3668 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
3669
060162e0
MS
36702016-12-08 Martin Sebor <msebor@redhat.com>
3671
3672 PR c/78165
92a285c1
ML
3673 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
3674 suffix.
060162e0 3675
ee92e7ba
MS
36762016-12-07 Martin Sebor <msebor@redhat.com>
3677
3678 PR c/53562
3679 PR middle-end/77784
3680 PR middle-end/78149
3681 PR middle-end/78138
3682 * c.opt (-Wstringop-overflow): New option.
3683
84b0769e
MO
36842016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
3685
3686 * c-attribs.c (asan odr indicator): New attribute.
3687 (handle_asan_odr_indicator_attribute): New function.
3688
7fa6a965
PK
36892016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3690
3691 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
3692 ptrdiff_type_node;
3693
56d8ffc1
JG
36942016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
3695
3696 * c-common.c (excess_precision_mode_join): New.
3697 (c_ts18661_flt_eval_method): New.
3698 (c_c11_flt_eval_method): Likewise.
3699 (c_flt_eval_method): Likewise.
3700 * c-common.h (excess_precision_mode_join): New.
3701 (c_flt_eval_method): Likewise.
3702 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
3703 (cpp_iec_559_value): Call it.
3704 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
3705 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
3706 __FLT_EVAL_METHOD_TS_18661_3__.
3707
04f0fcf7
JG
37082016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
3709
3710 * c-opts.c (c_common_post_options): Add logic to handle the default
3711 case for -fpermitted-flt-eval-methods.
3712
fb2675cb
PB
37132016-11-23 Paolo Bonzini <bonzini@gnu.org>
3714
3715 * c.opt (Wexpansion-to-defined): New.
3716
ec1c5694
JJ
37172016-11-23 Jakub Jelinek <jakub@redhat.com>
3718
3719 PR target/78451
3720 * c-pragma.c (handle_pragma_target): Don't replace
3721 current_target_pragma, but chainon the new args to the current one.
3722
730c9e75
NS
37232016-11-22 Nathan Sidwell <nathan@acm.org>
3724
3725 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 3726 indentation and formatting.
730c9e75 3727
89990732
MS
37282016-11-21 Martin Sebor <msebor@redhat.com>
3729
3730 * c.opt (-fprintf-return-value): Enable by default.
3731
48330c93
BE
37322016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3733
3734 PR c++/71973
3735 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
3736 * c-common.c (c_common_nodes_and_builtins): Initialize
3737 const_tm_ptr_type_node.
3738
0d939c95
MP
37392016-11-16 Marek Polacek <polacek@redhat.com>
3740
3741 PR c/78285
3742 * c-common.c (c_add_case_label): Turn error_at calls into inform.
3743
8e745a17
JJ
37442016-11-14 Jakub Jelinek <jakub@redhat.com>
3745
3746 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
3747
1ee62b92 37482016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
3749 Richard Biener <rguenther@suse.de>
3750
3751 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
3752 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
3753 * c.opt (fgimple): New option.
1ee62b92 3754
22b15758
UB
37552016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3756
3757 PR c/35503
3758 * c-common.h (warn_for_restrict): Declare.
3759 * c-warn.c: Include gcc-rich-location.h.
3760 (warn_for_restrict): New function.
3761 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
3762 (gcc_cdiag_char_table): Likewise.
3763 (gcc_cxxdiag_char_table): Likewise.
3764 * c.opt (Wrestrict): New option.
3765
4be719cd
EB
37662016-11-13 Eric Botcazou <ebotcazou@adacore.com>
3767
3768 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
3769 for nested types only if the type is a record or union and dump SLOC.
3770
4a826ca6
JM
37712016-11-09 Jason Merrill <jason@redhat.com>
3772
3773 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
3774
2e955d50
JJ
37752016-11-09 Jakub Jelinek <jakub@redhat.com>
3776
3777 * c-ubsan.c (ubsan_instrument_shift): Handle split
3778 -fsanitize=shift-base and -fsanitize=shift-exponent.
3779
51dc6603
JM
37802016-11-07 Jason Merrill <jason@redhat.com>
3781
3782 * c.opt (Wc++1z-compat): New.
3783 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
3784
6dc4a604
ML
37852016-11-07 Martin Liska <mliska@suse.cz>
3786
3787 * c-warn.c (warn_for_unused_label): Save all labels used
3788 in goto or in &label.
3789
b302001e
JM
37902016-11-03 Jason Merrill <jason@redhat.com>
3791
3792 * c-cppbuiltin.c (c_cpp_builtins): Correct
3793 __cpp_inheriting_constructors.
3794
31f7f784
JM
37952016-11-01 Jason Merrill <jason@redhat.com>
3796
2bc78e3c
JM
3797 * c-cppbuiltin.c (c_cpp_builtins): Update
3798 __cpp_inheriting_constructors.
3799
31f7f784
JM
3800 * c.opt (-fnew-inheriting-ctors): New.
3801 * c-opts.c: Default to on for ABI 11+.
3802
dcb466ec
JJ
38032016-10-31 Jakub Jelinek <jakub@redhat.com>
3804
3805 PR c++/77948
3806 * c.opt (fext-numeric-literals): Add Var and Init.
3807 * c-opts.c (c_common_handle_option): Don't clear
3808 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
3809 (c_common_post_options): Clear it here if not set
3810 explicitly.
3811
52e1b91e
AH
38122016-10-28 Aldy Hernandez <aldyh@redhat.com>
3813
3814 PR debug/77773
3815 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
3816 if NULL.
3817
e16f1cc7
JJ
38182016-10-25 Jakub Jelinek <jakub@redhat.com>
3819
3820 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
3821 * c-common.c (c_common_reswords): Add __builtin_launder.
3822
f8348061
BE
38232016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
3824
3825 * c-common.c (c_common_truthvalue_conversion): Warn for
3826 multiplications in boolean context. Fix the quoting of '<<' and '<'
3827 in the shift warning.
3828
eff89e01
BE
38292016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
3830
3831 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
3832
24bc7bf4
JM
38332016-10-20 Jason Merrill <jason@redhat.com>
3834
3835 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
3836
4c712374
BE
38372016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3838
3839 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
3840 integer shift ops in boolean context.
3841
38422016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
3843
3844 * c.opt (Walloca): New.
3845 (Walloca-larger-than=): New.
3846 (Wvla-larger-than=): New.
3847
8fa18c06
MP
38482016-10-17 Marek Polacek <polacek@redhat.com>
3849
3850 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
3851 Return immediately when finding a match.
3852 (warn_tautological_cmp): Remove a boolean variable that is no longer
3853 needed.
3854
b12b1915
MP
38552016-10-17 Marek Polacek <polacek@redhat.com>
3856
3857 * c-attribs.c: New file.
3858 * c-common.c: Move attributes handling to c-attribs.c.
3859 (get_nonnull_operand): No longer static.
3860 * c-common.h: Move the declarations from c-attribs.c to its own section.
3861
2045acd9
JM
38622016-10-14 Jason Merrill <jason@redhat.com>
3863
3864 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
3865 and __cpp_deduction_guides.
3866
14a2c9aa
JM
38672016-10-13 Jason Merrill <jason@redhat.com>
3868
3869 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
3870
4d0cdd0c
TP
38712016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3872
3873 * c-cppbuiltin.c: Include memmodel.h.
3874 * c-opts.c: Likewise.
3875 * c-pragma.c: Likewise.
3876 * c-warn.c: Likewise.
3877
70f6d5e1
JJ
38782016-10-12 Jakub Jelinek <jakub@redhat.com>
3879
3880 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
3881 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
3882 * c-opts.c (sanitize_cpp_opts): Initialize
3883 cpp_opts->cpp_warn_implicit_fallthrough.
3884
78f61294
MP
38852016-10-11 Marek Polacek <polacek@redhat.com>
3886
3887 * c-common.c (warning_candidate_p): Change the return type to bool
3888 and return true/false instead of 1/0.
3889 (vector_mode_valid_p): Likewise.
3890
038b5cc0
MP
38912016-10-11 Marek Polacek <polacek@redhat.com>
3892
3893 * c-common.c (fold_for_warn): No longer static.
3894 (bool_promoted_to_int_p): Likewise.
3895 (c_common_get_narrower): Likewise.
3896 (constant_expression_warning): Move to c-warn.c.
3897 (constant_expression_error): Likewise.
3898 (overflow_warning): Likewise.
3899 (warn_logical_operator): Likewise.
3900 (find_array_ref_with_const_idx_r): Likewise.
3901 (warn_tautological_cmp): Likewise.
3902 (expr_has_boolean_operands_p): Likewise.
3903 (warn_logical_not_parentheses): Likewise.
3904 (warn_if_unused_value): Likewise.
3905 (strict_aliasing_warning): Likewise.
3906 (sizeof_pointer_memaccess_warning): Likewise.
3907 (check_main_parameter_types): Likewise.
3908 (conversion_warning): Likewise.
3909 (warnings_for_convert_and_check): Likewise.
3910 (match_case_to_enum_1): Likewise.
3911 (match_case_to_enum): Likewise.
3912 (c_do_switch_warnings): Likewise.
3913 (warn_for_omitted_condop): Likewise.
3914 (readonly_error): Likewise.
3915 (lvalue_error): Likewise.
3916 (invalid_indirection_error): Likewise.
3917 (warn_array_subscript_with_type_char): Likewise.
3918 (warn_about_parentheses): Likewise.
3919 (warn_for_unused_label): Likewise.
3920 (warn_for_div_by_zero): Likewise.
3921 (warn_for_memset): Likewise.
3922 (warn_for_sign_compare): Likewise.
3923 (do_warn_double_promotion): Likewise.
3924 (do_warn_unused_parameter): Likewise.
3925 (record_locally_defined_typedef): Likewise.
3926 (maybe_record_typedef_use): Likewise.
3927 (maybe_warn_unused_local_typedefs): Likewise.
3928 (maybe_warn_bool_compare): Likewise.
3929 (maybe_warn_shift_overflow): Likewise.
3930 (warn_duplicated_cond_add_or_warn): Likewise.
3931 (diagnose_mismatched_attributes): Likewise.
3932 * c-common.h: Move the declarations from c-warn.c to its own section.
3933 * c-warn.c: New file.
3934
627be19f
JM
39352016-10-08 Jason Merrill <jason@redhat.com>
3936
3937 * c-common.c (c_common_truthvalue_conversion): Don't distribute
3938 into COND_EXPR in C++.
3939
7bad794a
JJ
39402016-10-08 Jakub Jelinek <jakub@redhat.com>
3941
3942 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
3943 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
3944 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
3945
be845b04
JJ
39462016-10-07 Jakub Jelinek <jakub@redhat.com>
3947
3948 Implement LWG2296 helper intrinsic
3949 * c-common.h (enum rid): Add RID_ADDRESSOF.
3950 * c-common.c (c_common_reswords): Add __builtin_addressof.
3951
c09c4992
BE
39522016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
3953
3954 PR c++/77700
3955 * c-common.c (c_common_truthvalue_conversion): Warn also for
3956 suspicious enum values in boolean context.
3957
342cfb3e
JJ
39582016-10-06 Jakub Jelinek <jakub@redhat.com>
3959
3960 Implement P0258R2 - helper for C++17
3961 std::has_unique_object_representations trait
3962 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
3963 * c-common.c (c_common_reswords): Add
3964 __has_unique_object_representations.
3965
2e69f143
JJ
39662016-10-05 Jakub Jelinek <jakub@redhat.com>
3967
3968 PR sanitizer/66343
3969 * c-ubsan.c (ubsan_instrument_return): Don't call
3970 initialize_sanitizer_builtins here.
3971
700fff34
BE
39722016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
3973
3974 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
3975 conditional expression in boolean context when only one arm is
3976 non-boolean.
3977
9563bfcd
JJ
39782016-10-05 Jakub Jelinek <jakub@redhat.com>
3979
04a32443
JJ
3980 PR sanitizer/77823
3981 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
3982 is not integral.
3983
9563bfcd
JJ
3984 * c-common.c (c_common_reswords): Update comment for C++11.
3985
f1644724
JM
39862016-10-04 Jason Merrill <jason@redhat.com>
3987
3988 * c-common.c (make_tree_vector_from_ctor): New.
3989 * c-common.h: Declare it.
3990
5a79befb
JJ
39912016-10-04 Jakub Jelinek <jakub@redhat.com>
3992
3993 * c-cppbuiltin.c (c_cpp_builtins): Don't define
3994 __LIBGCC_JCR_SECTION_NAME__.
3995
1633d3b9
BE
39962016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
3997
3998 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
3999 left shift in boolean context.
4000
a2c6e7f2
JJ
40012016-09-29 Jakub Jelinek <jakub@redhat.com>
4002
4003 Implement P0001R1 - C++17 removal of register storage class specifier
4004 * c.opt (Wregister): New warning.
4005 * c-opts.c (c_common_post_options): Enable -Wregister by
4006 default for C++17.
4007
75304c87
JG
40082016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
4009
4010 * c-opts.c (c_common_post_options): Remove special case for
4011 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
4012 in C++.
4013
bbfac6da
JJ
40142016-09-27 Jakub Jelinek <jakub@redhat.com>
4015
6e39060a
JJ
4016 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
4017 -std=c++1z.
4018
bbfac6da
JJ
4019 * c-ada-spec.c (print_ada_declaration): Remove break after return.
4020
e73cf9a2
TP
40212016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
4022
4023 * c-common.c: Include memmodel.h.
4024
c6147dc4
MP
40252016-09-26 Marek Polacek <polacek@redhat.com>
4026
4027 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
4028
81fea426
MP
40292016-09-26 Marek Polacek <polacek@redhat.com>
4030
4031 PR c/7652
4032 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
4033 (handle_fallthrough_attribute): New function.
4034 (attribute_fallthrough_p): New function.
4035 * c-common.h (attribute_fallthrough_p): Declare.
4036
9a2300e9
MP
40372016-09-24 Marek Polacek <polacek@redhat.com>
4038
4039 PR c/77490
4040 * c.opt (Wbool-operation): New.
4041
a09e9e35
BE
40422016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4043
4044 * c-common.c (c_common_truthvalue_conversion): Inhibit
4045 Wint-in-bool-context warning with from_macro_definition_at.
4046 Mention the expression will always evaluate to true.
4047
d43b4ccc
MS
40482016-09-21 Martin Sebor <msebor@redhat.com>
4049
4050 PR bootstrap/77676
4051 * c.opt (fprintf-return-value): Temporarily initialize to zero
4052 to unblock bootstrap failures.
4053
2e1c20b1
JJ
40542016-09-21 Jakub Jelinek <jakub@redhat.com>
4055
4056 PR c++/77651
4057 * c.opt (Waligned-new=): Add RejectNegative.
4058 (faligned-new=): Likewise. Spelling fix - change
4059 aligned_new_threshhold to aligned_new_threshold.
4060 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
4061 to aligned_new_threshold.
4062
88d0c3f0
MS
40632016-09-20 Martin Sebor <msebor@redhat.com>
4064
4065 PR middle-end/49905
4066 * c.opt: Add -Wformat-length and -fprintf-return-value.
4067
144a96e4
BE
40682016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4069
4070 PR c++/77434
4071 * c.opt (Wint-in-bool-context): New warning.
4072 * c-common.c (c_common_truthvalue_conversion): Warn on integer
4073 constants in boolean context.
4074
63012d9a
JM
40752016-09-19 Joseph Myers <joseph@codesourcery.com>
4076
4077 * c-common.c (max_align_t_align): Also consider alignment of
4078 float128_type_node.
4079
931388ce
JM
40802016-09-15 Jason Merrill <jason@redhat.com>
4081
4082 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
4083 DECL_EXTERNAL.
4084
38711381
JM
40852016-09-14 Jason Merrill <jason@redhat.com>
4086
4087 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
4088 limit FIELD_DECL, either.
4089
e51fbec3
MP
40902016-09-14 Marek Polacek <polacek@redhat.com>
4091
4092 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
4093 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
4094 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
4095
254830ba
DM
40962016-09-13 David Malcolm <dmalcolm@redhat.com>
4097
4098 * c-common.c (warn_logical_not_parentheses): Replace
4099 rich_location::add_fixit_insert calls with add_fixit_insert_before
4100 and add_fixit_insert_after, eliminating the "next_loc" calculation.
4101
42763690
JM
41022016-09-13 Jason Merrill <jason@redhat.com>
4103 Tom de Vries <tom@codesourcery.com>
4104
4105 PR c++/77427
4106 * c-common.c (set_underlying_type): Don't treat array as builtin type.
4107
9453eee9
JM
41082016-09-13 Jason Merrill <jason@redhat.com>
4109
4110 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
4111 limit types at all.
4112
e96809e3
JM
41132016-09-12 Jason Merrill <jason@redhat.com>
4114
4115 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
4116 bit/byte confusion, allow large alignment for types.
4117
54dcdb88
BE
41182016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
4119
4120 PR c++/77496
4121 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
4122
d1463eb9
DM
41232016-09-12 David Malcolm <dmalcolm@redhat.com>
4124
4125 PR c/72858
4126 * c-format.c (argument_parser::check_argument_type): Add params
4127 "type_start" and "conversion_char". Use the former to generate
4128 offset_to_type_start and pass it and conversion_char to
4129 check_format_types.
4130 (check_format_info_main): Capture the start of the type
4131 information as "type_start", and pass it an format_char
4132 to arg_parser.check_argument_type.
4133 (check_format_types): Provide an example in the leading comment.
4134 Add params "offset_to_type_start" and "conversion_char"; pass
4135 them to format_type_warning calls.
4136 (test_get_modifier_for_format_len): Likewise.
4137 (matching_type_p): New function.
4138 (get_format_for_type): Add param "conversion_char" and move
4139 implementation into...
4140 (get_format_for_type_1): ...new function, called twice.
4141 Use new function matching_type_p rather than checking for
4142 TYPE_CANONICAL equality.
4143 (get_corrected_substring): New function.
4144 (format_type_warning): Provide an example in the leading comment.
4145 Add params "offset_to_type_start" and "conversion_char". Replace
4146 call to get_format_for_type with call to get_corrected_substring
4147 and move rejection of hints for widths/precisions there.
4148 (assert_format_for_type_streq): Add param "conversion_char".
4149 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
4150 (test_get_format_for_type_printf): Add conversion chars to the
4151 tests, adding coverage for various combinations of integer
4152 vs double conversions, and for preserving octal and hexadecimal
4153 conversions.
4154 (test_get_format_for_type_scanf): Add conversion chars to the
4155 tests.
4156
5b28efbb
TV
41572016-09-10 Tom de Vries <tom@codesourcery.com>
4158
4159 PR C/71602
4160 * c-common.c (build_va_arg): Handle more strict
4161 targetm.canonical_va_list_type. Replace first argument type error with
4162 assert.
4163
3f0177e7
MS
41642016-09-09 Martin Sebor <msebor@redhat.com>
4165
4166 PR c/77520
4167 PR c/77521
4168 * c-format.c (argument_parser::find_format_char_info): Use %qc
4169 format directive unconditionally.
4170
af63ba4b
JM
41712016-09-09 Jason Merrill <jason@redhat.com>
4172
4173 Implement C++17 new of over-aligned types.
4174 * c.opt: Add -faligned-new and -Waligned-new.
4175 * c-common.c (max_align_t_align): Split out from...
4176 (cxx_fundamental_alignment_p): ...here.
4177 * c-common.h: Declare it.
4178 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
4179
c65248cb
JM
41802016-09-09 Joseph Myers <joseph@codesourcery.com>
4181
4182 * c-cppbuiltin.c (builtin_define_type_width): New function.
4183 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
4184 macros.
4185
e5106e27
DM
41862016-09-07 David Malcolm <dmalcolm@redhat.com>
4187
4188 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
4189 a POINTER_TYPE.
4190 (substring_loc::get_location): Move to substring-locations.c,
4191 keeping implementation as...
4192 (c_get_substring_location): New function, from the above, reworked
4193 to use accessors rather than member lookup.
4194 * c-common.h (class substring_loc): Move to substring-locations.h,
4195 replacing with a forward decl.
4196 (c_get_substring_location): New decl.
4197 * c-format.c: Include "substring-locations.h".
4198 (format_warning_va): Move to substring-locations.c.
4199 (format_warning_at_substring): Likewise.
4200
ab20d992 42012016-09-06 Martin Sebor <msebor@redhat.com>
a42e7952
MS
4202
4203 PR c/77336
4204 * c-format.c (check_function_format): Avoid issuing warnings for
4205 functions unless they call format functions with non-constant
4206 format strings.
4207
b772a565
RB
42082016-09-06 Richard Biener <rguenther@suse.de>
4209
4210 PR c/77450
4211 * c-common.c (c_common_mark_addressable_vec): Handle
4212 COMPOUND_LITERAL_EXPR.
4213
25ff5dd3
MP
42142016-09-05 Marek Polacek <polacek@redhat.com>
4215
4216 PR c/77423
4217 * c-common.c (bool_promoted_to_int_p): New function.
4218 (expr_has_boolean_operands_p): New function.
4219 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
4220 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
4221
21234eb5
TV
42222016-09-04 Tom de Vries <tom@codesourcery.com>
4223
4224 revert:
4225 2016-08-29 Tom de Vries <tom@codesourcery.com>
4226
4227 * c-common.c (build_va_arg): Replace first argument type error
4228 with assert.
4229
9dc5773f
JJ
42302016-09-02 Jakub Jelinek <jakub@redhat.com>
4231
4232 PR c/65467
4233 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
4234 (c_finish_omp_for): Reject _Atomic qualified iterators.
4235
42362016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
4237
4238 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
4239 size to guarantee it fits the output of the formatted function
4240 regardless of its arguments.
4241
295844f6
MP
42422016-09-01 Marek Polacek <polacek@redhat.com>
4243
4244 PR c/7652
4245 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
4246 FALLTHRU comments.
4247
3d06b6f2
MP
42482016-08-29 Marek Polacek <polacek@redhat.com>
4249
4250 PR c/77292
4251 * c-common.c (warn_logical_not_parentheses): Don't warn for
4252 a comparison or a logical operator.
4253
34cedad5
TV
42542016-08-29 Tom de Vries <tom@codesourcery.com>
4255
4256 * c-common.c (build_va_arg): Fix type comparison assert.
4257
f162d717
TV
42582016-08-29 Tom de Vries <tom@codesourcery.com>
4259
4260 * c-common.c (build_va_arg): Replace first argument type error
4261 with assert.
4262
ba9bbd6f
TV
42632016-08-29 Tom de Vries <tom@codesourcery.com>
4264
4265 PR c/77398
4266 * c-common.c (build_va_arg): Add first argument error. Build va_arg
4267 with error_mark_node as va_list instead of with illegal va_list.
4268
ebef225f
MP
42692016-08-25 Marek Polacek <polacek@redhat.com>
4270 David Malcolm <dmalcolm@redhat.com>
4271
4272 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
4273 * c-common.h (warn_logical_not_parentheses): Update declaration.
4274
b00e6e75
MP
42752016-08-22 Marek Polacek <polacek@redhat.com>
4276
4277 PR c++/77321
4278 * c-common.c (warn_for_memset): Check type for null.
4279
6dc198e3
JM
42802016-08-22 Joseph Myers <joseph@codesourcery.com>
4281
14ec014e 4282 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
4283 _FloatNx types for suffixes for built-in functions.
4284
c65699ef
JM
42852016-08-19 Joseph Myers <joseph@codesourcery.com>
4286
4287 PR c/32187
4288 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
4289 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
4290 (RID_FLOAT128X): New enum rid values.
4291 (CASE_RID_FLOATN_NX): New macro.
4292 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
4293 keywords.
4294 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
4295 corresponding complex types.
4296 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
4297 _FloatNx and corresponding complex types.
4298 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
4299 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
4300 and _FloatNx types for the widest type for determining
4301 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
4302 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
4303 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
4304 and _FloatNx types.
4305 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
4306 constants.
4307 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
4308 _FloatNx types.
4309
cc015f3a
DM
43102016-08-18 David Malcolm <dmalcolm@redhat.com>
4311
4312 * c-opts.c (c_diagnostic_finalizer): Update for change to
4313 diagnostic_show_locus.
4314
cb18fd07
DM
43152016-08-18 David Malcolm <dmalcolm@redhat.com>
4316
4317 * c-common.c: Include "spellcheck.h".
4318 (cb_get_suggestion): New function.
4319 * c-common.h (cb_get_suggestion): New decl.
4320 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
4321 cb_get_suggestion.
4322
a76989dc
MP
43232016-08-18 Marek Polacek <polacek@redhat.com>
4324
4325 PR c/71514
4326 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
4327 and pointer-to-VLA.
4328
65e736c0
DM
43292016-08-16 David Malcolm <dmalcolm@redhat.com>
4330
4331 PR c/72857
4332 * c-common.c (substring_loc::get_range): Rename to...
4333 (substring_loc::get_location): ...this, converting param from a
4334 source_range * to a location_t *. Call
4335 get_source_location_for_substring rather than
4336 get_source_range_for_substring, and pass in m_caret_idx.
4337 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
4338 (substring_loc::get_range): Replace with...
4339 (substring_loc::get_location): ...this.
4340 (substring_loc::set_caret_index): New method.
4341 (substring_loc): Add field m_caret_idx.
4342 * c-format.c (format_warning_va): Update for above changes.
4343 Rename local "substring_loc" to "fmt_substring_loc" to avoid
4344 clashing with type name.
4345 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
4346 (check_argument_type): Likewise.
4347 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
4348 Use a copy when emitting warnings, setting the caret index from TYPE.
4349
7e1dde14 43502016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 4351 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
4352
4353 * c-ada-spec.c (dump_number): New function.
4354 (handle_escape_character): Likewise.
4355 (print_ada_macros): Add handling of constant integers and strings.
4356
191816a3
MP
43572016-08-12 Marek Polacek <polacek@redhat.com>
4358
4359 PR c/7652
4360 * c-common.c (scalar_to_vector): Adjust fall through comment.
4361 * c-opts.c (c_common_handle_option): Likewise.
4362 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
4363 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
4364 fall through comment.
4365 * cilk.c (extract_free_variables): Add FALLTHRU.
4366
452df4a4
JM
43672016-08-10 Jason Merrill <jason@redhat.com>
4368
4369 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
4370
f3365c12
JM
43712016-08-09 Jason Merrill <jason@redhat.com>
4372
4373 * c-common.c (c_common_attribute_table): vector_size affects type
4374 identity.
4375
f0bc3323
MP
43762016-08-09 Marek Polacek <polacek@redhat.com>
4377
4378 PR c/7652
4379 * c-ada-spec.c (dump_generic_ada_node): Add return.
4380
98e5a19a
JM
43812016-08-09 Jason Merrill <jason@redhat.com>
4382
4383 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
4384 C++17 constexpr lambdas.
4385
895aa8e1
DM
43862016-08-08 David Malcolm <dmalcolm@redhat.com>
4387
4388 PR c/64955
4389 * c-common.h (selftest::c_format_c_tests): New declaration.
4390 (selftest::run_c_tests): New declaration.
4391 * c-format.c: Include "selftest.h.
4392 (format_warning_va): Add param "corrected_substring" and use
4393 it to add a replacement fix-it hint.
4394 (format_warning_at_substring): Likewise.
4395 (format_warning_at_char): Update for new param of
4396 format_warning_va.
4397 (argument_parser::check_argument_type): Pass "fki" to
4398 check_format_types.
4399 (check_format_types): Add param "fki" and pass it to
4400 format_type_warning.
4401 (deref_n_times): New function.
4402 (get_modifier_for_format_len): New function.
4403 (selftest::test_get_modifier_for_format_len): New function.
4404 (get_format_for_type): New function.
4405 (format_type_warning): Add param "fki" and use it to attempt
4406 to provide hints for argument types when calling
4407 format_warning_at_substring.
4408 (selftest::get_info): New function.
4409 (selftest::assert_format_for_type_streq): New function.
4410 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
4411 (selftest::test_get_format_for_type_printf): New function.
4412 (selftest::test_get_format_for_type_scanf): New function.
4413 (selftest::c_format_c_tests): New function.
4414
e52ed3fe
DM
44152016-08-08 David Malcolm <dmalcolm@redhat.com>
4416
4417 PR c/52952
4418 * c-format.c: Include "diagnostic.h".
4419 (location_column_from_byte_offset): Delete.
4420 (location_from_offset): Delete.
4421 (format_warning_va): New function.
4422 (format_warning_at_substring): New function.
4423 (format_warning_at_char): New function.
4424 (check_format_arg): Capture location of format_tree and pass to
4425 check_format_info_main.
4426 (argument_parser): Add fields "start_of_this_format" and
4427 "format_string_cst".
4428 (flag_chars_t::validate): Add param "format_string_cst". Convert
4429 warning_at call using location_from_offset to call to
4430 format_warning_at_char.
4431 (argument_parser::argument_parser): Add param "format_string_cst_"
4432 and use use it to initialize field "format_string_cst".
4433 Initialize new field "start_of_this_format".
4434 (argument_parser::read_format_flags): Convert warning_at call
4435 using location_from_offset to a call to format_warning_at_char.
4436 (argument_parser::read_any_format_left_precision): Likewise.
4437 (argument_parser::read_any_format_precision): Likewise.
4438 (argument_parser::read_any_other_modifier): Likewise.
4439 (argument_parser::find_format_char_info): Likewise, in three places.
4440 (argument_parser::parse_any_scan_set): Likewise, in one place.
4441 (argument_parser::handle_conversions): Likewise, in two places.
4442 (argument_parser::check_argument_type): Add param "fmt_param_loc"
4443 and use it to make a substring_loc. Pass the latter to
4444 check_format_types.
4445 (check_format_info_main): Add params "fmt_param_loc" and
4446 "format_string_cst". Convert warning_at calls using
4447 location_from_offset to calls to format_warning_at_char. Pass the
4448 new params to the arg_parser ctor. Pass "format_string_cst" to
4449 flag_chars.validate. Pass "fmt_param_loc" to
4450 arg_parser.check_argument_type.
4451 (check_format_types): Convert first param from a location_t
4452 to a const substring_loc & and rename to "fmt_loc". Attempt
4453 to extract the range of the relevant parameter and pass it
4454 to format_type_warning.
4455 (format_type_warning): Convert first param from a location_t
4456 to a const substring_loc & and rename to "fmt_loc". Add
4457 params "param_range" and "type". Replace calls to warning_at
4458 with calls to format_warning_at_substring.
4459
1c4d457e
DM
44602016-08-08 David Malcolm <dmalcolm@redhat.com>
4461
4462 * c-format.c (class flag_chars_t): New class.
4463 (struct length_modifier): New struct.
4464 (class argument_parser): New class.
4465 (flag_chars_t::flag_chars_t): New ctor.
4466 (flag_chars_t::has_char_p): New method.
4467 (flag_chars_t::add_char): New method.
4468 (flag_chars_t::validate): New method.
4469 (flag_chars_t::get_alloc_flag): New method.
4470 (flag_chars_t::assignment_suppression_p): New method.
4471 (argument_parser::argument_parser): New ctor.
4472 (argument_parser::read_any_dollar): New method.
4473 (argument_parser::read_format_flags): New method.
4474 (argument_parser::read_any_format_width): New method.
4475 (argument_parser::read_any_format_left_precision): New method.
4476 (argument_parser::read_any_format_precision): New method.
4477 (argument_parser::handle_alloc_chars): New method.
4478 (argument_parser::read_any_length_modifier): New method.
4479 (argument_parser::read_any_other_modifier): New method.
4480 (argument_parser::find_format_char_info): New method.
4481 (argument_parser::validate_flag_pairs): New method.
4482 (argument_parser::give_y2k_warnings): New method.
4483 (argument_parser::parse_any_scan_set): New method.
4484 (argument_parser::handle_conversions): New method.
4485 (argument_parser::check_argument_type): New method.
4486 (check_format_info_main): Introduce classes argument_parser
4487 and flag_chars_t, moving the code within the loop into methods
4488 of these classes. Make various locals "const".
4489
88fa5555
DM
44902016-08-05 David Malcolm <dmalcolm@redhat.com>
4491
4492 * c-common.c: Include "substring-locations.h".
4493 (get_cpp_ttype_from_string_type): New function.
4494 (g_string_concat_db): New global.
4495 (substring_loc::get_range): New method.
4496 * c-common.h (g_string_concat_db): New declaration.
4497 (class substring_loc): New class.
4498 * c-lex.c (lex_string): When concatenating strings, capture the
4499 locations of all tokens using a new obstack, and record the
4500 concatenation locations within g_string_concat_db.
4501 * c-opts.c (c_common_init_options): Construct g_string_concat_db
4502 on the ggc-heap.
4503
78169471
MP
45042016-07-29 Marek Polacek <polacek@redhat.com>
4505
638fc14f
MP
4506 PR c/71926
4507 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
4508 parentheses warning.
4509
78169471
MP
4510 PR c/71574
4511 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
4512
1225d6b1
ML
45132016-07-28 Martin Liska <mliska@suse.cz>
4514
4515 PR gcov-profile/68025
4516 * c-common.c (handle_no_profile_instrument_function_attribute):
4517
ec1e2a40
BE
45182016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
4519
4520 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
4521 BITS_PER_UNIT_LOG.
4522
5ec2cd9f
JM
45232016-07-25 Jason Merrill <jason@redhat.com>
4524
4525 PR c++/65970
4526 * c.opt (fconstexpr-loop-limit): New.
4527
9dc5773f 45282016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
4529
4530 PR c++/71675
4531 * c-common.c (resolve_overloaded_builtin): Avoid converting
4532 __atomic_compare_exchange_n return type to that of what its
4533 first argument points to.
4534
e3fe09c1
UB
45352016-07-22 Uros Bizjak <ubizjak@gmail.com>
4536
4537 * c-common.c: Use HOST_WIDE_INT_M1U instead of
4538 ~(unsigned HOST_WIDE_INT) 0.
4539
bc91c436
ML
45402016-07-22 Martin Liska <mliska@suse.cz>
4541
4542 PR gcov-profile/69028
4543 PR gcov-profile/62047
4544 * cilk.c (create_cilk_helper_decl): Set location of a new decl
4545 to the current_function_decl.
4546
451dcc66
JM
45472016-07-21 Jason Merrill <jason@redhat.com>
4548
4549 PR c++/65168
4550 * c-common.c (c_common_truthvalue_conversion): Check
4551 c_inhibit_evaluation_warnings for warning about address of
4552 reference.
4553
de6a69ee
DM
45542016-07-20 David Malcolm <dmalcolm@redhat.com>
4555
4556 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
4557 const char *.
4558
d022c55a
JM
45592016-07-15 Jason Merrill <jason@redhat.com>
4560
4561 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
4562
ddbbcb19
JJ
45632016-07-15 Jakub Jelinek <jakub@redhat.com>
4564
4565 PR c/71858
4566 * c-common.h (enum lookup_name_fuzzy_kind): Add
4567 FUZZY_LOOKUP_FUNCTION_NAME.
4568
d0cf395a
JM
45692016-07-08 Jason Merrill <jason@redhat.com>
4570
4571 P0145: Refining Expression Order for C++.
4572 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
4573 * c-opts.c: Adjust.
4574
98d44e93
MT
45752016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
4576
4577 PR c++/71214
4578 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
4579
f9d8d994
TS
45802016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4581
4582 * c-pragma.h (enum pragma_kind): Rename
4583 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
4584 users.
4585
4aa83879
RB
45862016-06-29 Richard Biener <rguenther@suse.de>
4587
4588 PR middle-end/71002
4589 * c-common.c (c_common_get_alias_set): Remove union type punning case.
4590
a25bd9e6
JM
45912016-06-24 Jason Merrill <jason@redhat.com>
4592
4593 P0145R2: Refining Expression Order for C++.
4594 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
4595 MODIFY_EXPR.
4596
a86451b9
JJ
45972016-06-24 Jakub Jelinek <jakub@redhat.com>
4598
4599 * c-common.c (check_builtin_function_arguments): Require last
4600 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
4601 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
4602 if the last argument is pointer to enumerated or boolean type.
4603
1a4f11c8
DM
46042016-06-22 David Malcolm <dmalcolm@redhat.com>
4605
4606 PR c/70339
4607 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
4608 (lookup_name_fuzzy): New prototype.
4609
fe55692c
JDA
46102016-06-21 John David Anglin <danglin@gcc.gnu.org>
4611
4612 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
4613
4eb24e01
JM
46142016-06-14 Jason Merrill <jason@redhat.com>
4615
4616 P0145R2: Refining Expression Order for C++.
4617 * c.opt (fargs-in-order): New.
4618 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
4619
ef7cf206
JJ
46202016-06-13 Jakub Jelinek <jakub@redhat.com>
4621
0dda258b
JJ
4622 PR sanitizer/71498
4623 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
4624 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
4625
ef7cf206
JJ
4626 PR preprocessor/71183
4627 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
4628 to cb_get_source_date_epoch.
4629
50b15873
JJ
46302016-06-10 Jakub Jelinek <jakub@redhat.com>
4631
4632 PR c/68657
4633 * c.opt (Wpsabi): Add Warning flag.
4634
4d926e34
MS
46352016-06-10 Martin Sebor <msebor@redhat.com>
4636
4637 PR c/71392
14ec014e 4638 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
4639 the nonnull attribute in type-generic builtins.
4640
e01b4e16
MS
46412016-06-09 Martin Sebor <msebor@redhat.com>
4642
4643 PR c/70883
4644 * c-common.c (builtin_function_validate_nargs): Make text of error
4645 message consistent with others like it.
4646
44a845ca
MS
46472016-06-08 Martin Sebor <msebor@redhat.com>
4648 Jakub Jelinek <jakub@redhat.com>
4649
4650 PR c++/70507
4651 PR c/68120
4652 * c-common.c (check_builtin_function_arguments): Handle
4653 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4654
a80a7051
RB
46552016-06-08 Richard Biener <rguenther@suse.de>
4656
4657 * c-common.c (parse_optimize_options): Improve diagnostic messages.
4658
bfd67b47
RB
46592016-06-07 Richard Biener <rguenther@suse.de>
4660
4661 PR c/61564
4662 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
4663 options and warn about others.
4664
15c98b2e
ES
46652016-06-01 Eduard Sanou <dhole@openmailbox.org>
4666
4667 * c-common.c (get_source_date_epoch): Rename to
4668 cb_get_source_date_epoch.
4669 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
4670 message when the parsing fails. Use error_at instead of fatal_error.
4671 * c-common.h (get_source_date_epoch): Rename to
4672 cb_get_source_date_epoch.
4673 * c-common.h (cb_get_source_date_epoch): Prototype.
4674 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
4675 * c-common.h (c_omp_region_type): Remove trailing comma.
4676 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
4677 * c-lex.c (c_lex_with_flags): Remove initialization of
4678 pfile->source_date_epoch.
4679
00631022
JJ
46802016-05-30 Jakub Jelinek <jakub@redhat.com>
4681
4682 PR c++/71349
4683 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
4684 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
4685 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
4686 instead of C_OMP_CLAUSE_SPLIT_FOR.
4687
f17a223d
RB
46882016-05-24 Richard Biener <rguenther@suse.de>
4689
4690 PR middle-end/70434
4691 PR c/69504
4692 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
4693 (convert_vector_to_array_for_subscript): ... this.
4694 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
4695 VIEW_CONVERT_EXPR to an array type. Rename to ...
4696 (convert_vector_to_array_for_subscript): ... this.
4697
4f2e1536
MP
46982016-05-12 Marek Polacek <polacek@redhat.com>
4699
4700 PR c/70756
4701 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
4702 size_in_bytes and pass LOC to it.
4703
d6e83a8d
MM
47042016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4705
4706 PR c/43651
4707 * c.opt (Wduplicate-decl-specifier): New option.
4708
5c3a10fb
MP
47092016-05-11 Marek Polacek <polacek@redhat.com>
4710
4711 PR c++/71024
4712 * c-common.c (diagnose_mismatched_attributes): New function.
4713 * c-common.h (diagnose_mismatched_attributes): Declare.
4714
deef7113
MP
47152016-05-04 Marek Polacek <polacek@redhat.com>
4716
4717 * c.opt (Wdangling-else): New option.
4718
79ce98bc
MP
47192016-05-03 Marek Polacek <polacek@redhat.com>
4720
4721 PR c/70859
4722 * c-common.c (builtin_function_validate_nargs): Add location
4723 parameter. Use it.
4724 (check_builtin_function_arguments): Add location and arguments
4725 parameters. Use them.
4726 * c-common.h (check_builtin_function_arguments): Update declaration.
4727
381cdae4
RB
47282016-05-03 Richard Biener <rguenther@suse.de>
4729
4730 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
4731 allow call args to gimplify to SSA names.
4732
1d793c34
MP
47332016-05-03 Marek Polacek <polacek@redhat.com>
4734
4735 * c-common.h (enum c_omp_region_type): Remove stray comma.
4736
77886428
CP
47372016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4738
4739 * c-common.h (enum c_omp_region_type): Define.
4740
697e0b28
RS
47412016-05-02 Richard Sandiford <richard.sandiford@arm.com>
4742
4743 * c-common.c (shorten_compare): Use wi::to_wide.
4744
e7ff0319
CP
47452016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4746
4747 PR middle-end/70626
4748 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
4749 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
4750 reduction clauses in acc parallel loops.
4751
2fff3db8
MP
47522016-04-29 Marek Polacek <polacek@redhat.com>
4753
4754 PR c/70852
4755 * c-common.c (warn_for_memset): Check domain before accessing it.
4756
509063eb
DV
47572016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
4758
4759 PR/69089
4760 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
4761 "aligned" attribute.
4762
b632761d
JM
47632016-04-28 Jason Merrill <jason@redhat.com>
4764
4765 * c-lex.c (c_common_has_attribute): Handle nodiscard.
4766
174f6622
ES
47672016-04-28 Eduard Sanou <dhole@openmailbox.org>
4768 Matthias Klose <doko@debian.org>
4769
4770 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 4771 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
4772 handling.
4773 * c-common.h (get_source_date_epoch): Prototype.
4774 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
4775
6bc2bb18
RB
47762015-04-27 Ryan Burn <contact@rnburn.com>
4777
4778 PR c++/69024
4779 PR c++/68997
4780 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
4781 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
4782 external linkage.
4783 (cilk_detect_and_unwrap): Corresponding changes.
4784 (extract_free_variables): Don't extract free variables from
4785 AGGR_INIT_EXPR slot.
4786 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
4787 (cilk_recognize_spawn): Likewise.
4788
c1e1f433
BS
47892016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4790
4791 * c.opt (Wmemset-elt-size): New option.
4792 * c-common.c (warn_for_memset): New function.
4793 * c-common.h (warn_for_memset): Declare.
4794
d067e05f
JM
47952016-04-25 Jason Merrill <jason@redhat.com>
4796
4797 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
4798 No longer static.
4799 * c-common.h: Declare it.
4800 * c-lex.c (c_common_has_attribute): Add maybe_unused.
4801
9aa36ae5
JM
48022016-04-22 Jason Merrill <jason@redhat.com>
4803
4804 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
4805
477d4906
IV
48062016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4807
4808 PR c++/69363
4809 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
4810 * c-common.h (c_finish_cilk_clauses): Remove declaration.
4811
fe37c7af
MM
48122016-04-18 Michael Matz <matz@suse.de>
4813
4814 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
4815 and SET_DECL_ALIGN.
4816
23f2660f
EB
48172016-04-17 Eric Botcazou <ebotcazou@adacore.com>
4818
4819 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
4820 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
4821 to incomplete types.
4822 (dump_nested_type): Remove redundant tests and tidy up.
4823 (print_ada_declaration): Also set TREE_VISITED on the declaration of
4824 a type which is the typedef of an original type.
4825
1e77281b
MP
48262016-04-15 Marek Polacek <polacek@redhat.com>
4827
4828 PR c/70651
4829 * c-common.c (build_va_arg): Change two asserts into errors and return
4830 error_mark_node.
4831
b3a77f21
MP
48322016-04-13 Marek Polacek <polacek@redhat.com>
4833
4834 PR c++/70639
4835 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
4836 for switch statements, too.
4837
322b8466
JM
48382016-03-28 Jason Merrill <jason@redhat.com>
4839
4840 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
4841
fbdb6baf
MP
48422016-03-23 Marek Polacek <polacek@redhat.com>
4843
4844 PR c++/69884
4845 * c.opt (Wignored-attributes): New option.
4846
5c240f4d
DM
48472016-03-22 David Malcolm <dmalcolm@redhat.com>
4848
4849 PR c/69993
4850 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
4851 diagnostic text, reversing the order of the warning and note so
4852 that they appear in source order.
4853
14ba7b28
MP
48542016-03-17 Marek Polacek <polacek@redhat.com>
4855
4856 PR c/69407
4857 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
4858 operations.
4859
08a1cadc
JM
48602016-03-14 Jason Merrill <jason@redhat.com>
4861
2aaeea19
JM
4862 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
4863
08a1cadc
JM
4864 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
4865
c06d25bb
RB
48662016-03-09 Richard Biener <rguenther@suse.de>
4867
4868 PR c/70143
4869 * c-common.c (strict_aliasing_warning): Add back
4870 alias_sets_conflict_p check.
4871
80aac5c8
JM
48722016-03-08 Jason Merrill <jason@redhat.com>
4873
4874 * c-opts.c (set_std_cxx1z): Don't enable concepts.
4875
64b23c13
DM
48762016-03-04 David Malcolm <dmalcolm@redhat.com>
4877
4878 PR c/68187
4879 * c-indentation.c (get_visual_column): Move code to determine next
4880 tab stop to...
4881 (next_tab_stop): ...this new function.
4882 (line_contains_hash_if): Delete function.
4883 (detect_preprocessor_logic): Delete function.
4884 (get_first_nws_vis_column): New function.
4885 (detect_intervening_unindent): New function.
4886 (should_warn_for_misleading_indentation): Replace call to
4887 detect_preprocessor_logic with a call to
4888 detect_intervening_unindent.
4889
729526f5
DM
48902016-03-04 David Malcolm <dmalcolm@redhat.com>
4891
4892 PR c/68187
4893 * c-indentation.c (should_warn_for_misleading_indentation): When
4894 suppressing warnings about cases where the guard and body are on
4895 the same column, only use the first non-whitespace column in place
4896 of the guard token column when dealing with "else" clauses.
4897 When rejecting aligned BODY and NEXT, loosen the requirement
4898 from equality with the first non-whitespace of guard to simply
4899 that they not be indented relative to it.
4900
e9a35493
RB
49012016-03-04 Richard Biener <rguenther@suse.de>
4902
4903 PR c++/70054
4904 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
4905 instead of alias_sets_conflict_p.
4906
1be56bc5
MP
49072016-03-01 Marek Polacek <polacek@redhat.com>
4908
4909 PR c++/69795
4910 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
4911 any DECL.
4912
35886f0b
MS
49132016-02-22 Martin Sebor <msebor@redhat.com>
4914
4915 PR middle-end/69780
4916 * c-common.c (check_builtin_function_arguments): Validate and
4917 reject invalid arguments to __builtin_alloca_with_align.
4918
4246c8da
MW
49192016-02-20 Mark Wielaard <mjw@redhat.com>
4920
4921 PR c/28901
4922 * c.opt (Wunused-const-variable): Turn into Alias for...
4923 (Wunused-const-variable=): New option.
4924
268be88c
BE
49252016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4926
4927 PR c++/69865
4928 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
4929 here...
4930 (c_common_init_options): ...to here.
4931 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
4932
871b3f47
JJ
49332016-02-19 Jakub Jelinek <jakub@redhat.com>
4934
4935 PR c++/69826
4936 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
4937 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
4938 flag_preprocess_only.
4939
bf14eba2
JJ
49402016-02-16 Jakub Jelinek <jakub@redhat.com>
4941
4942 PR c/69835
4943 * c.opt (Wnonnull-compare): Enable for -Wall.
4944
ba6b3795
JJ
49452016-02-15 Jakub Jelinek <jakub@redhat.com>
4946
4947 PR c++/69797
4948 * c-common.c (sync_resolve_size): Diagnose too few arguments
4949 even when params is non-NULL empty vector.
4950
a011cd92
BS
49512016-02-08 Bernd Schmidt <bschmidt@redhat.com>
4952
4953 PR target/60410
4954 * c.opt (fshort-double): Remove.
4955
46cb9332
MS
49562016-02-05 Martin Sebor <msebor@redhat.com>
4957
4958 PR c++/69662
4959 * c.opt (Warning options): Update -Wplacement-new to take
4960 an optional argument.
4961
e1b81f2b
JJ
49622016-02-01 Jakub Jelinek <jakub@redhat.com>
4963
4964 PR preprocessor/69543
4965 PR c/69558
4966 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
4967 instead of loc to control_warning_option.
4968
b6adbb9f
NS
49692016-02-01 Nathan Sidwell <nathan@codesourcery.com>
4970
4971 * c.opt (fopenacc-dim=): New option.
4972
5d70666e
RB
49732016-01-27 Ryan Burn <contact@rnburn.com>
4974
4975 PR cilkplus/69267
4976 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
4977 gimplify_arg. Removed superfluous post_p argument.
4978 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
4979 superfluous post_p argument.
4980 * c-gimplify.c (c_gimplify_expr): Likewise.
4981
01e1dea3
DM
49822016-01-26 David Malcolm <dmalcolm@redhat.com>
4983
4984 PR other/69006
4985 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
4986 pp_newline_and_flush with pp_flush.
4987
9f04a53e
MS
49882016-01-20 Martin Sebor <msebor@redhat.com>
4989
4990 PR c/69405
4991 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
4992 an incompatible argument when the argument isn't a valid tree node.
4993
7f26f7df
JM
49942016-01-18 Jason Merrill <jason@redhat.com>
4995
4996 PR c++/68767
4997 * c-common.c (check_function_arguments_recurse): Fold the whole
4998 COND_EXPR, not just the condition.
4999
f62bf092
TV
50002016-01-18 Tom de Vries <tom@codesourcery.com>
5001
5002 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
5003 classify as loop clause.
5004
e0a575ff
JJ
50052016-01-15 Jakub Jelinek <jakub@redhat.com>
5006
5007 PR bootstrap/68271
5008 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
5009 C++ FE no longer has limit on number of pragmas.
5010
50112015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
5012
5013 PR c++/69048
5014 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 5015 to add missing cleanup point.
b6e3db06 5016
c7df95d8
DM
50172016-01-14 David Malcolm <dmalcolm@redhat.com>
5018
5019 PR c++/68819
5020 * c-indentation.c (get_visual_column): Add location_t param.
5021 Handle the column number being zero by effectively disabling the
5022 warning, with an "inform".
5023 (should_warn_for_misleading_indentation): Add location_t argument
5024 for all uses of get_visual_column.
5025
21efdd80
PP
50262016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
5027
5028 PR c++/69029
5029 * c-indentation.c (should_warn_for_misleading_indentation):
5030 Don't warn about do-while statements.
5031
7a127fa7
MS
50322016-01-07 Martin Sebor <msebor@redhat.com>
5033
5034 PR c/68966
5035 * c-common.c (sync_resolve_size): Reject first argument when it's
5036 a pointer to _Bool.
5037
c589e975
DM
50382016-01-05 David Malcolm <dmalcolm@redhat.com>
5039
5040 PR c/69122
5041 * c-indentation.c (get_visual_column): Remove default argument.
5042 (should_warn_for_misleading_indentation): For the multiline case,
5043 update call to get_visual_column for next_stmt_exploc so that it
5044 captures the location of the first non-whitespace character in the
5045 relevant line. Don't issue warnings if there is non-whitespace
5046 before the next statement.
5047
818ab71a
JJ
50482016-01-04 Jakub Jelinek <jakub@redhat.com>
5049
5050 Update copyright years.
5051
745e411d
DM
50522015-12-21 David Malcolm <dmalcolm@redhat.com>
5053
5054 * c-common.c (binary_op_error): Convert first param from
5055 location_t to rich_location * and use it when emitting an error.
5056 * c-common.h (binary_op_error): Convert first param from
5057 location_t to rich_location *.
5058
de67c4c3
DM
50592015-12-16 David Malcolm <dmalcolm@redhat.com>
5060
5061 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
5062 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
5063
4a38b02b
IV
50642015-12-15 Ilya Verbin <ilya.verbin@intel.com>
5065
5066 * c-common.c (c_common_attribute_table): Handle "omp declare target
5067 link" attribute.
5068
54d62f51
JJ
50692015-12-14 Jakub Jelinek <jakub@redhat.com>
5070
5071 PR c/68833
5072 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
5073
8d4227c8
TB
50742014-12-12 Tobias Burnus <burnus@net-b.de>
5075
5076 PR fortran/68815
5077 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
5078 specifiers (%d, %i,%u and %c).
5079
f6069ccc
DM
50802015-12-10 David Malcolm <dmalcolm@redhat.com>
5081
5082 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
5083
63bbf46d
JJ
50842015-12-08 Jakub Jelinek <jakub@redhat.com>
5085
5086 PR c/48088
5087 PR c/68657
5088 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
5089 * c-pragma.c (handle_pragma_diagnostic): Adjust
5090 control_warning_option caller.
5091
f79520bb
DM
50922015-12-07 David Malcolm <dmalcolm@redhat.com>
5093
5094 * c-common.c (c_cpp_error): Update for change to
5095 rich_location::set_range.
5096
b3d5bc62
JJ
50972015-12-04 Paolo Bonzini <bonzini@gnu.org>
5098
5099 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
5100 shifting 1 out of the sign bit.
5101
51022015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
5103
5104 * c-common.c (c_common_attribute_table[]): Update max arguments
5105 count for "simd" attribute.
5106 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
5107
6eb4a537
JJ
51082015-12-03 Jakub Jelinek <jakub@redhat.com>
5109
5110 PR preprocessor/57580
5111 * c-ppoutput.c (print): Change printed field to bool.
5112 Move src_file last for smaller padding.
5113 (init_pp_output): Set print.printed to false instead of 0.
5114 (scan_translation_unit): Fix up formatting. Set print.printed
5115 to true after printing something other than newline.
5116 (scan_translation_unit_trad): Set print.printed to true instead of 1.
5117 (maybe_print_line_1): Set print.printed to false instead of 0.
5118 (print_line_1): Likewise.
5119 (do_line_change): Set print.printed to true instead of 1.
5120 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
5121 dump_macro): Set print.printed to false after printing newline.
5122
4250754e
JM
51232015-12-02 Jason Merrill <jason@redhat.com>
5124
f479b43d
JM
5125 * c-common.c (fold_for_warn): New.
5126 (warn_logical_operator, warn_tautological_cmp)
5127 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
5128
4250754e
JM
5129 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
5130 (c_fully_fold_internal, decl_constant_value_for_optimization):
5131 Move to c/c-fold.c.
5132 * c-common.h: Don't declare decl_constant_value_for_optimization.
5133
e9e32ee6
JM
51342015-12-02 Joseph Myers <joseph@codesourcery.com>
5135
5136 PR c/68162
5137 * c-common.h (c_build_qualified_type): Add extra default
5138 arguments.
5139
37d5ad46
JB
51402015-12-01 Julian Brown <julian@codesourcery.com>
5141 Cesar Philippidis <cesar@codesourcery.com>
5142 James Norris <James_Norris@mentor.com>
5143
5144 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
5145 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
5146 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
5147
f07862c7
EB
51482015-11-30 Eric Botcazou <ebotcazou@adacore.com>
5149
5150 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
5151 (decl_sloc_common): Delete and move bulk of processing to...
5152 (decl_sloc): ...here.
5153 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
5154 (dump_ada_double_name): Remove S parameter and compute the suffix.
5155 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
5156 element type and deal with an anonymous one.
5157 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
5158 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
5159 and remove reference to QUAL_UNION_TYPE.
5160 (dump_nested_types): Make 2 passes on the fields and move bulk to...
5161 (dump_nested_type): ...here. New function extracted from above.
5162 Generate a full declaration for anonymous element type of arrays.
5163 (print_ada_declaration): Really skip anonymous declarations. Remove
5164 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
5165 Clean up processing of declarations of array types and objects.
5166 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
5167 Remove obsolete code and tidy up.
5168
75c8aac3
JH
51692015-11-29 Jan Hubicka <hubicka@ucw.cz>
5170
5171 PR c/67581
5172 * c-common.c (handle_transparent_union_attribute): Update
5173 also type variants.
5174
b58d3df2
ML
51752015-11-27 Martin Liska <mliska@suse.cz>
5176
5177 PR c++/68312
5178 * array-notation-common.c (cilkplus_extract_an_triplets):
5179 Release vector of vectors.
5180 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
5181
89a01fcf
EB
51822015-11-26 Eric Botcazou <ebotcazou@adacore.com>
5183
5184 PR c++/68527
5185 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
5186 (print_ada_struct_decl): Likewise.
5187
cc5c5226
IZ
51882015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
5189
5190 PR c++/68001
5191 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
5192 * cilk.c (recognize_spawn): Determine location in a more precise
5193 way.
5194
269adb9d
JM
51952015-11-19 Jason Merrill <jason@redhat.com>
5196
5197 * c-common.c (shorten_compare): But look through macros from
5198 system headers.
5199
d0eccfcd
JM
52002015-11-18 Jason Merrill <jason@redhat.com>
5201
5202 * c-common.c (shorten_compare): Don't -Wtype-limits if the
5203 non-constant operand comes from a macro.
5204
3e44547c
JM
52052015-11-17 Jason Merrill <jason@redhat.com>
5206
5207 PR bootstrap/68346
5208 * c-common.c (warn_tautological_cmp): Fold before checking for
5209 constants.
5210
0f62c7a0
MP
52112015-11-16 Marek Polacek <polacek@redhat.com>
5212
5213 PR c++/68362
5214 * c-common.c (check_case_bounds): Fold low and high cases.
5215
a868811e
MP
52162015-11-16 Marek Polacek <polacek@redhat.com>
5217
5218 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
5219 * c-common.c (c_common_get_alias_set): Likewise.
5220 (handle_visibility_attribute): Likewise.
5221
fff77217
KY
52222015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
5223
5224 * c-common.c (handle_simd_attribute): New.
5225 (struct attribute_spec): Add entry for "simd".
5226 (handle_simd_attribute): New.
5227
269e63b7
KT
52282015-11-13 Kai Tietz <ktietz70@googlemail.com>
5229
5230 * c-lex.c (interpret_float): Use fold_convert.
5231
ebedc9a3
DM
52322015-11-13 David Malcolm <dmalcolm@redhat.com>
5233
5234 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
5235 and store it on the result.
5236 * c-opts.c (c_common_init_options): Set
5237 global_dc->colorize_source_p.
5238
6e232ba4
JN
52392015-11-12 James Norris <jnorris@codesourcery.com>
5240 Joseph Myers <joseph@codesourcery.com>
5241
7365279f 5242 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
5243 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
5244 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
5245 PRAGMA_OACC_CLAUSE_LINK.
5246
e78bede6
MP
52472015-11-11 Marek Polacek <polacek@redhat.com>
5248
5249 PR c/68107
5250 PR c++/68266
5251 * c-common.c (valid_array_size_p): New function.
5252 * c-common.h (valid_array_size_p): Declare.
5253
3f8257db 52542015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
5255
5256 PR bootstrap/68271
5257 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
5258
69f293c9
AM
52592015-11-11 Andrew MacLeod <amacleod@redhat.com>
5260
5261 * array-notation-common.c: Remove unused header files.
5262 * c-ada-spec.c: Likewise.
5263 * c-cilkplus.c: Likewise.
5264 * c-common.c: Likewise.
5265 * c-cppbuiltin.c: Likewise.
5266 * c-dump.c: Likewise.
5267 * c-format.c: Likewise.
5268 * c-gimplify.c: Likewise.
5269 * c-indentation.c: Likewise.
5270 * c-lex.c: Likewise.
5271 * c-omp.c: Likewise.
5272 * c-opts.c: Likewise.
5273 * c-pch.c: Likewise.
5274 * c-ppoutput.c: Likewise.
5275 * c-pragma.c: Likewise.
5276 * c-pretty-print.c: Likewise.
5277 * c-semantics.c: Likewise.
5278 * c-ubsan.c: Likewise.
5279 * cilk.c: Likewise.
5280 * stub-objc.c: Likewise.
5281
3a40d81d
NS
52822015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5283 Cesar Philippidis <cesar@codesourcery.com>
5284 James Norris <jnorris@codesourcery.com>
5285 Julian Brown <julian@codesourcery.com>
5286 Nathan Sidwell <nathan@codesourcery.com>
5287
5288 * c-pragma.c (oacc_pragmas): Add "routine".
5289 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
5290
ee45a32d
EB
52912015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5292
5293 * c-common.c (c_common_attributes): Add scalar_storage_order.
5294 (handle_scalar_storage_order_attribute): New function.
5295 * c-pragma.c (global_sso): New variable.
5296 (maybe_apply_pragma_scalar_storage_order): New function.
5297 (handle_pragma_scalar_storage_order): Likewise.
5298 (init_pragma): Register scalar_storage_order.
5299 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
5300 * c.opt (Wscalar-storage-order): New warning.
5301 (fsso-struct=): New option.
5302
eb11eb15
MS
53032015-11-08 Martin Sebor <msebor@redhat.com>
5304
5305 * c.opt (Wplacement-new): Add a period to the end of a sentence.
5306
0aad0198
RS
53072015-11-07 Richard Sandiford <richard.sandiford@arm.com>
5308
5309 * c-common.c: Don't undef DEF_BUILTIN.
5310
8a645150
DM
53112015-11-06 David Malcolm <dmalcolm@redhat.com>
5312
5313 * c-common.c (c_cpp_error): Convert parameter from location_t to
5314 rich_location *. Eliminate the "column_override" parameter and
5315 the call to diagnostic_override_column.
5316 Update the "done_lexing" clause to set range 0
5317 on the rich_location, rather than overwriting a location_t.
5318 * c-common.h (c_cpp_error): Convert parameter from location_t to
5319 rich_location *. Eliminate the "column_override" parameter.
5320
7a5e4956
CP
53212015-11-05 Cesar Philippidis <cesar@codesourcery.com>
5322 Thomas Schwinge <thomas@codesourcery.com>
5323 James Norris <jnorris@codesourcery.com>
5324
5325 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
5326 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
5327 clauses with parallel and kernels and loops.
5328 * c-pragma.h (enum pragma_omp_clause): Add entries for
5329 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
5330 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
5331 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
5332 INDEPENDENT,SEQ}.
5333 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
5334
e2f5cc96
MS
53352015-11-05 Martin Sebor <msebor@redhat.com>
5336
5337 PR c++/67942
5338 * c.opt (-Wplacement-new): New option.
5339
e01d41e5
JJ
53402015-11-05 Jakub Jelinek <jakub@redhat.com>
5341
5342 * c-common.h (c_finish_omp_atomic): Add TEST argument.
5343 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
5344 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
5345 save_expr or create_tmp_var* if TEST is true.
5346 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
5347 Don't call add_stmt here.
5348 (struct c_omp_check_loop_iv_data): New type.
5349 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
5350 c_omp_check_loop_iv_exprs): New functions.
5351 (c_omp_split_clauses): Adjust for lastprivate being allowed on
5352 distribute.
5353 (c_omp_declare_simd_clauses_to_numbers): Change
5354 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
5355 (c_omp_declare_simd_clauses_to_decls): Similarly change those
5356 from numbers to PARM_DECLs.
5357
595278be
MM
53582015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
5359
5360 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
5361 flag_checking.
5362
3f8257db 53632015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
5364
5365 PR c++-common/67882
b3d5bc62
JJ
5366 * c-common.h (fold_offsetof_1): Add argument.
5367 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
5368 offsetof expressions that reference elements past the end of
5369 an array.
5370
4bf9e5a8
TS
53712015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5372 Chung-Lin Tang <cltang@codesourcery.com>
5373
5374 * c-pragma.c (oacc_pragmas): Add "atomic".
5375 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
5376
3b1661a9
ES
53772015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
5378
5379 * c-common.c (handle_target_clones_attribute): New.
5380 (c_common_attribute_table): Add handle_target_clones_attribute.
5381 (handle_always_inline_attribute): Add check on target_clones attribute.
5382 (handle_target_attribute): Ditto.
5383
2adfab87
AM
53842015-10-29 Andrew MacLeod <amacleod@redhat.com>
5385
5386 * array-notation-common.c: Reorder #include's and remove duplicates.
5387 * c-ada-spec.c: Likewise.
5388 * c-cilkplus.c: Likewise.
5389 * c-common.c: Likewise.
5390 * c-cppbuiltin.c: Likewise.
5391 * c-dump.c: Likewise.
5392 * c-format.c: Likewise.
5393 * c-gimplify.c: Likewise.
5394 * c-indentation.c: Likewise.
5395 * c-lex.c: Likewise.
5396 * c-omp.c: Likewise.
5397 * c-opts.c: Likewise.
5398 * c-pch.c: Likewise.
5399 * c-ppoutput.c: Likewise.
5400 * c-pragma.c: Likewise.
5401 * c-pretty-print.c: Likewise.
5402 * c-semantics.c: Likewise.
5403 * c-ubsan.c: Likewise.
5404 * cilk.c: Likewise.
5405 * stub-objc.c: Likewise.
5406
d90ec4f2
JM
54072015-10-28 Jason Merrill <jason@redhat.com>
5408
5409 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
5410
88bae6f4
TS
54112015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5412 James Norris <jnorris@codesourcery.com>
5413 Cesar Philippidis <cesar@codesourcery.com>
5414
5415 PR c/64765
5416 PR c/64880
5417 * c-common.h (c_oacc_split_loop_clauses): Declare function.
5418 * c-omp.c (c_oacc_split_loop_clauses): New function.
5419
b1726d6c
MS
54202015-10-21 Martin Sebor <msebor@redhat.com>
5421
5422 PR driver/68043
5423 * c.opt: End each sentence that describes an option with a period.
5424
fa60eeb9
MP
54252015-10-20 Marek Polacek <polacek@redhat.com>
5426
5427 * array-notation-common.c (is_cilkplus_vector_p): Define.
5428 * c-common.h (is_cilkplus_vector_p): Declare.
5429
95979049
MP
54302015-10-20 Marek Polacek <polacek@redhat.com>
5431
5432 * c.opt (std=gnu++11): Do not describe as experimental.
5433 (std=gnu++14): Likewise.
5434
2a9fb712
JM
54352015-10-19 Jason Merrill <jason@redhat.com>
5436
5437 * c-cppbuiltin.c (c_cpp_builtins): Define
5438 __cpp_nontype_template_args.
5439
13b380a3
JM
54402015-10-19 Jason Merrill <jason@redhat.com>
5441
5442 * c-cppbuiltin.c (c_cpp_builtins): Define
5443 __cpp_enumerator_attributes, __cpp_fold_expressions,
5444 __cpp_unicode_characters.
5445
d9a6bd32
JJ
54462015-10-13 Jakub Jelinek <jakub@redhat.com>
5447 Aldy Hernandez <aldyh@redhat.com>
5448
5449 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
5450 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
5451 (c_define_builtins): Likewise.
5452 * c-common.h (enum c_omp_clause_split): Add
5453 C_OMP_CLAUSE_SPLIT_TASKLOOP.
5454 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
5455 (c_finish_omp_for): Add ORIG_DECLV argument.
5456 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
5457 201511 instead of 201307.
5458 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
5459 OMP_CRITICAL_CLAUSES to it.
5460 (c_finish_omp_ordered): Add CLAUSES argument, set
5461 OMP_ORDERED_CLAUSES to it.
5462 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
5463 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
5464 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
5465 constructs and new OpenMP 4.5 clauses. Clear
5466 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
5467 verification code.
5468 * c-pragma.c (omp_pragmas_simd): Add taskloop.
5469 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
5470 (enum pragma_omp_clause): Add
5471 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
5472 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
5473
624d31fe
RS
54742015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5475
5476 * c-lex.c (interpret_float): Use real_equal instead of
5477 REAL_VALUES_EQUAL.
5478
b8fd7909
JM
54792015-10-04 Jason Merrill <jason@redhat.com>
5480
5481 Implement N4514, C++ Extensions for Transactional Memory.
5482 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
5483 (c_common_attribute_table): Add transaction_safe_dynamic.
5484 transaction_safe now affects type identity.
5485 (handle_tm_attribute): Handle transaction_safe_dynamic.
5486 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
5487 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
5488 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
5489 (D_TRANSMEM): New.
5490 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
5491 * c-pretty-print.c (pp_c_attributes_display): Don't print
5492 transaction_safe in C++.
5493
12651878
MP
54942015-10-02 Marek Polacek <polacek@redhat.com>
5495
5496 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
5497
3e3b8d63
MP
54982015-10-02 Marek Polacek <polacek@redhat.com>
5499
5500 PR c/64249
5501 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
5502 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
5503 * c.opt (Wduplicated-cond): New option.
5504
0d1a8f75
JM
55052015-10-01 Joseph Myers <joseph@codesourcery.com>
5506
5507 * c.opt (std=c11): Do not describe as experimental.
5508 (std=gnu11): Likewise.
5509 (std=iso9899:2011): Likewise.
5510
3e32ee19
NS
55112015-09-28 Nathan Sidwell <nathan@codesourcery.com>
5512
5513 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
5514 (DEF_FUNCTION_TYPE_VAR_11): Delete.
5515
974348ee
MP
55162015-09-25 Marek Polacek <polacek@redhat.com>
5517
5518 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
5519 (ubsan_instrument_shift): Likewise.
5520
15dbc1a6
MP
55212015-09-25 Marek Polacek <polacek@redhat.com>
5522
5523 PR sanitizer/64906
5524 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
5525
6b95d7cc
PP
55262015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
5527
5528 * c-indentation.c (should_warn_for_misleading_indentation):
5529 Compare next_stmt_vis_column with guard_line_first_nws instead
5530 of with guard_line_vis_column.
5531
c1822f9c
MLI
55322015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
5533
5534 PR c/49654
5535 PR c/49655
5536 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
5537 options and options not valid for the current language.
5538
d5398058
PP
55392015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
5540
5541 * c-indentation.c (should_warn_for_misleading_indentation):
5542 Float out and consolidate the calls to get_visual_column that
5543 are passed guard_exploc as an argument. Compare
5544 next_stmt_vis_column with guard_line_first_nws instead of with
5545 body_line_first_nws.
5546
6b333269
NS
55472015-09-22 Nathan Sidwell <nathan@codesourcery.com>
5548
5549 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
5550 Wnamespaces): New C++ warnings.
5551
a75f1574
JM
55522015-09-22 Jason Merrill <jason@redhat.com>
5553
5554 * c-common.h (abi_compat_version_crosses): New.
5555 (warn_abi_version): Declare.
5556 * c-common.c: Define it.
5557 * c-opts.c (c_common_post_options): Handle it.
5558 flag_abi_compat_version defaults to 8.
5559
bdaaa8b7
VV
55602015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
5561
5562 Complete the implementation of N4230, Nested namespace definition.
5563 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
5564 __cpp_nested_namespace_definitions.
5565
eaa797e8
MLI
55662015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5567
5568 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
5569
c4914de6
MLI
55702015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5571
5572 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
5573 when warning.
5574 * c-pragma.h (pragma_lex): Add optional loc argument.
5575
fcb87c50
MM
55762015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
5577
5578 * c-format.c (check_format_arg): Adjust to use common block size in all
5579 object pools.
5580
31bdd08a
DM
55812015-09-15 David Malcolm <dmalcolm@redhat.com>
5582
5583 * c-format.c (location_from_offset): Update for change in
5584 signature of location_get_source_line.
5585 * c-indentation.c (get_visual_column): Likewise.
5586 (line_contains_hash_if): Likewise.
5587
aa9f4b4c
MP
55882015-09-14 Marek Polacek <polacek@redhat.com>
5589
5590 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
5591 setting various warnings.
5592
aa256c4a
MP
55932015-09-14 Marek Polacek <polacek@redhat.com>
5594
5595 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
5596 a negative value.
5597
0f876f22
MW
55982015-09-11 Mark Wielaard <mjw@redhat.com>
5599
5600 PR c/28901
5601 * c.opt (Wunused-variable): Option from common.opt.
5602 (Wunused-const-variable): New option.
5603
273aa49e
PC
56042015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
5605
5606 PR c++/53184
5607 * c.opt ([Wsubobject-linkage]): Add.
5608
1807ffc1
MS
56092015-09-03 Martin Sebor <msebor@redhat.com>
5610
5611 PR c/66516
5612 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
5613 functions.
5614 * c-common.c (reject_gcc_builtin): Define.
5615
38942840
BI
56162015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
5617
5618 PR middle-end/60586
5619 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
5620 prototype.
5621 * c-gimplify.c (c_gimplify_expr): Added a call to the function
5622 cilk_gimplify_call_params_in_spawned_fn.
5623 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
5624 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
5625 unwrapping.
5626
c316b5e4
MP
56272015-08-25 Marek Polacek <polacek@redhat.com>
5628
5629 PR middle-end/67330
5630 * c-common.c (handle_weak_attribute): Don't check whether the
5631 visibility can be changed here.
5632
584a7c46
MLI
56332015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
5634
5635 * c-lex.c (c_lex_with_flags): Use explicit locations.
5636
a79683d5
TS
56372015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5638
5639 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
5640 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
5641
61717a45
FXC
56422015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
5643
5644 PR middle-end/36757
5645 * c-common.c (check_builtin_function_arguments): Add check
5646 for BUILT_IN_SIGNBIT argument.
5647
329524f5
PC
56482015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
5649
5650 PR c++/67160
5651 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
5652 in c++1z mode.
5653
4ee55665
MP
56542015-08-17 Marek Polacek <polacek@redhat.com>
5655
5656 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
5657 with whitespaces before qualifier names.
5658
b893e375
MP
56592015-08-12 Marek Polacek <polacek@redhat.com>
5660
5661 PR c++/55095
5662 * c-common.c (maybe_warn_shift_overflow): Properly handle
5663 left-shifting 1 into the sign bit.
5664
c2d89095
MLI
56652015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5666
5667 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
5668
971e17ff
AS
56692015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
5670 Braden Obrzut <admin@maniacsvault.net>
5671 Jason Merrill <jason@redhat.com>
5672
5673 Add C++ Concepts TS support.
5674 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
5675 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
5676 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
5677 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
5678 * c-opts.c (set_std_cxx1z): Set flag_concepts.
5679 * c.opt (fconcepts): New.
5680
b3d5bc62
JJ
56812015-08-02 Martin Sebor <msebor@redhat.com>
5682
5683 * c.opt (-Wframe-address): New warning option.
5684
8ebca419
PP
56852015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5686
5687 * c-indentation.c (should_warn_for_misleading_indentation):
5688 Improve heuristics.
5689
1a1e101f
PP
56902015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5691
5692 * c-indentation.c (get_visual_column): Add parameter first_nws,
5693 use it. Update comment documenting the function.
5694 (is_first_nonwhitespace_on_line): Remove.
5695 (should_warn_for_misleading_indentation): Replace usage of
5696 of is_first_nonwhitespace_on_line with get_visual_column.
5697
992118a1
PP
56982015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5699
5700 * c-indentation.h (struct token_indent_info): Define.
5701 (get_token_indent_info): Define.
5702 (warn_for_misleading_information): Declare.
5703 * c-common.h (warn_for_misleading_information): Remove.
5704 * c-identation.c (warn_for_misleading_indentation):
5705 Change declaration to take three token_indent_infos. Adjust
5706 accordingly.
5707 * c-identation.c (should_warn_for_misleading_indentation):
5708 Likewise. Bail out early if the body is a compound statement.
5709 (guard_tinfo_to_string): Define.
5710
e8fa3817
JM
57112015-07-30 Jason Merrill <jason@redhat.com>
5712
5713 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
5714 '*' for reference decay.
5715
173864e8
MP
57162015-07-30 Marek Polacek <polacek@redhat.com>
5717
5718 * c-common.c (warn_tautological_cmp): Bail for float types.
5719
f2afe6dd
MP
57202015-07-27 Marek Polacek <polacek@redhat.com>
5721
5722 PR bootstrap/67030
5723 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
5724
05b28fd6
MP
57252015-07-27 Marek Polacek <polacek@redhat.com>
5726
5727 PR c++/66555
5728 PR c/54979
5729 * c-common.c (find_array_ref_with_const_idx_r): New function.
5730 (warn_tautological_cmp): New function.
5731 * c-common.h (warn_tautological_cmp): Declare.
5732 * c.opt (Wtautological-compare): New option.
5733
5a5062b8
MP
57342015-07-23 Marek Polacek <polacek@redhat.com>
5735
5736 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
5737 (ubsan_instrument_shift): Likewise.
5738
dc891fe7
MP
57392015-07-23 Marek Polacek <polacek@redhat.com>
5740
5741 PR sanitizer/66908
5742 * c-ubsan.c: Include gimplify.h.
5743 (ubsan_instrument_division): Unshare OP0 and OP1.
5744 (ubsan_instrument_shift): Likewise.
5745
451b5e48
MP
57462015-07-20 Marek Polacek <polacek@redhat.com>
5747 Richard Sandiford <richard.sandiford@arm.com>
5748
5749 PR c++/55095
5750 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
5751 Use EXPR_LOC_OR_LOC.
5752 (maybe_warn_shift_overflow): New function.
5753 * c-common.h (maybe_warn_shift_overflow): Declare.
5754 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
5755 * c.opt (Wshift-overflow): New option.
5756
fb0b2914
ML
57572015-07-16 Martin Liska <mliska@suse.cz>
5758
5759 * c-format.c (static void check_format_info_main): Use
5760 object_allocator instead of pool_allocator.
5761 (check_format_arg): Likewise.
5762 (check_format_info_main): Likewise.
5763
903f5c23
AM
57642015-07-15 Andrew MacLeod <amacleod@redhat.com>
5765
5766 * c-opts.c: Remove multiline #include comment.
5767
026c3cfd
AH
57682015-07-12 Aldy Hernandez <aldyh@redhat.com>
5769
5770 * c-common.c: Fix double word typos.
5771
bb49ee66
EB
57722015-07-10 Eric Botcazou <ebotcazou@adacore.com>
5773
5774 * c-ada-spec.h (cpp_operation): Revert latest change.
5775 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
5776 constructors and destructors.
5777
1916bcb5
AM
57782015-07-09 Andrew MacLeod <amacleod@redhat.com>
5779
5780 * c-common.h: Adjust includes for flags.h changes.
5781 * stub-objc.c: Likewise.
026c3cfd 5782
a9dcd529
EB
57832015-07-08 Eric Botcazou <ebotcazou@adacore.com>
5784
5785 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
5786 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
5787
b03b462f
JJ
57882015-07-08 Jakub Jelinek <jakub@redhat.com>
5789
5790 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
5791 are to be removed, return NULL rather than original clauses list.
5792
c7131fb2
AM
57932015-07-07 Andrew MacLeod <amacleod@redhat.com>
5794
5795 * array-notation-common.c: Adjust includes.
5796 * c-ada-spec.c: Likewise.
5797 * c-cilkplus.c: Likewise.
5798 * c-common.h: Likewise.
5799 * c-cppbuiltin.c: Likewise.
5800 * c-dump.c: Likewise.
5801 * c-format.c: Likewise.
5802 * c-gimplify.c: Likewise.
5803 * c-indentation.c: Likewise.
5804 * c-lex.c: Likewise.
5805 * c-omp.c: Likewise.
5806 * c-opts.c: Likewise.
5807 * c-pch.c: Likewise.
5808 * c-ppoutput.c: Likewise.
5809 * c-pragma.c: Likewise.
5810 * c-pretty-print.c: Likewise.
5811 * c-semantics.c: Likewise.
5812 * c-ubsan.c: Likewise.
5813 * cilk.c: Likewise.
5814 * stub-objc.c: Likewise.
5815
2a7fb83f
EB
58162015-07-07 Eric Botcazou <ebotcazou@adacore.com>
5817
5818 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
5819 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
5820
a03c9bf1
JM
58212015-07-01 Jason Merrill <jason@redhat.com>
5822
36a85135
JM
5823 * c-common.h (D_CXX11): Rename from D_CXX0X.
5824 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
5825 * c-common.c: Adjust.
5826
e7fa68d5
JM
5827 * c-opts.c (c_common_post_options): Default to C++14.
5828
a03c9bf1
JM
5829 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
5830
fe95b036
ESR
58312015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
5832
5833 Implement N4197 - Adding u8 character literals
b3d5bc62 5834 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 5835 CPP_CHAR.
b3d5bc62 5836 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 5837 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 5838 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
5839 and CPP_UTF8CHAR tokens.
5840 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 5841
da2e71c9
MLI
58422015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5843
5844 PR fortran/66605
5845 * c-common.c (do_warn_unused_parameter): Move here.
5846 * c-common.h (do_warn_unused_parameter): Declare.
5847
b155cfd9
MP
58482015-06-29 Marek Polacek <polacek@redhat.com>
5849
5850 PR c/66322
5851 * c-common.c (check_case_bounds): Add bool * parameter. Set
5852 OUTSIDE_RANGE_P.
5853 (c_add_case_label): Add bool * parameter. Pass it down to
5854 check_case_bounds.
5855 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
5856 warning here.
5857 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
5858 declarations.
5859
31521951
MP
58602015-06-27 Marek Polacek <polacek@redhat.com>
5861
5862 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
5863 or VECTOR_INTEGER_TYPE_P throughout.
5864 * c-gimplify.c: Likewise.
5865
22d03525
MP
58662015-06-26 Marek Polacek <polacek@redhat.com>
5867
5868 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
5869 * c-common.c (c_fully_fold_internal): Likewise.
5870 (c_alignof_expr): Likewise.
5871 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
5872 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 5873 * cilk.c (create_parm_list): Likewise.
22d03525 5874
af05e6e5
MP
58752015-06-26 Marek Polacek <polacek@redhat.com>
5876
5877 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
5878
f0889939
AM
58792015-06-25 Andrew MacLeod <amacleod@redhat.com>
5880
5881 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
5882 * c-gimplify.c: Likewise.
5883 * c-pragma.c: Likewise.
5884 * c-ubsan.c: Likewise.
5885 * cilk.c: Likewise.
5886
ca752f39
RS
58872015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5888
5889 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
5890 ggc_hasher.
5891
16a16ec7
AM
58922015-06-25 Andrew MacLeod <amacleod@redhat.com>
5893
5894 * cilk.c: Move calls.h after tm.h in the include chain.
5895
0ae9bd27
MP
58962015-06-25 Marek Polacek <polacek@redhat.com>
5897
5898 * array-notation-common.c: Use VAR_P throughout.
5899 * c-ada-spec.c: Likewise.
5900 * c-common.c: Likewise.
5901 * c-format.c: Likewise.
5902 * c-gimplify.c: Likewise.
5903 * c-omp.c: Likewise.
5904 * c-pragma.c: Likewise.
5905 * c-pretty-print.c: Likewise.
5906 * cilk.c: Likewise.
5907
62f9079a
MP
59082015-06-25 Marek Polacek <polacek@redhat.com>
5909
5910 * cilk.c (extract_free_variables): Use is_global_var.
5911
0fa16060
RS
59122015-06-23 Richard Sandiford <richard.sandiford@arm.com>
5913
5914 * c-common.c: Don't include target-def.h.
5915
a68ae2e1
MP
59162015-06-23 Marek Polacek <polacek@redhat.com>
5917
5918 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
5919 when comparing INTEGER_CSTs.
5920
c6a2f2d9
PMR
59212015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
5922
5923 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
5924 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
5925 (dump_ada_template): Skip partially specialized types.
5926
6b4db501
MM
59272015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
5928
5929 * c-common.c (scalar_to_vector): Use std::swap instead of manually
5930 swapping.
5931
abb226c9
AM
59322015-06-17 Andrew MacLeod <amacleod@redhat.com>
5933
5934 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
5935 * c-ada-spec.c: Likewise.
5936 * c-cilkplus.c: Likewise.
5937 * c-common.c: Likewise.
5938 * c-common.h: Likewise.
5939 * c-cppbuiltin.c: Likewise.
5940 * c-dump.c: Likewise.
5941 * c-format.c: Likewise.
5942 * c-gimplify.c: Likewise.
5943 * c-indentation.c: Likewise.
5944 * c-lex.c: Likewise.
5945 * c-omp.c: Likewise.
5946 * c-opts.c: Likewise.
5947 * c-pch.c: Likewise.
5948 * c-ppoutput.c: Likewise.
5949 * c-pragma.c: Likewise.
5950 * c-pretty-print.c: Likewise.
5951 * c-semantics.c: Likewise.
5952 * c-ubsan.c: Likewise.
5953 * cilk.c: Likewise.
5954 * stub-objc.c: Likewise.
5955
076fecad
PP
59562015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
5957
5958 PR c++/65168
5959 * c-common.c (c_common_truthvalue_conversion): Warn when
5960 converting an address of a reference to a truth value.
5961
13fdf2e2
AM
59622015-06-08 Andrew MacLeod <amacleod@redhat.com>
5963
5964 * array-notation-common.c : Adjust include files.
5965 * c-ada-spec.c : Likewise.
5966 * c-cilkplus.c : Likewise.
5967 * c-common.c : Likewise.
5968 * c-common.h : Likewise.
5969 * c-cppbuiltin.c : Likewise.
5970 * c-dump.c : Likewise.
5971 * c-format.c : Likewise.
5972 * c-gimplify.c : Likewise.
5973 * c-indentation.c : Likewise.
5974 * c-lex.c : Likewise.
5975 * c-omp.c : Likewise.
5976 * c-opts.c : Likewise.
5977 * c-pch.c : Likewise.
5978 * c-ppoutput.c : Likewise.
5979 * c-pragma.c : Likewise.
5980 * c-pretty-print.c : Likewise.
5981 * c-semantics.c : Likewise.
5982 * c-ubsan.c : Likewise.
5983 * cilk.c : Likewise.
5984 * stub-objc.c : Likewise.
5985
a1661b90
MP
59862015-06-08 Marek Polacek <polacek@redhat.com>
5987
5988 PR c/66415
5989 * c-format.c (location_from_offset): Return LOC if LINE is null.
5990
d7438551
AH
59912015-06-05 Aldy Hernandez <aldyh@redhat.com>
5992
5993 * c-common.h (c_parse_final_cleanups): New prototype.
5994 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
5995
b3d5bc62
JJ
59962015-06-04 Sriraman Tallam <tmsriram@google.com>
5997
5998 * c-common.c (noplt): New attribute.
5999 (handle_noplt_attribute): New handler.
6000
ecb9f223
AM
60012015-06-04 Andrew MacLeod <amacleod@redhat.com>
6002
6003 * array-notation-common.c: Adjust includes for restructured coretypes.h.
6004 * c-ada-spec.c: Likewise.
6005 * c-cilkplus.c: Likewise.
6006 * c-common.c: Likewise.
6007 * c-common.h: Likewise.
6008 * c-cppbuiltin.c: Likewise.
6009 * c-dump.c: Likewise.
6010 * c-format.c: Likewise.
6011 * c-gimplify.c: Likewise.
6012 * c-indentation.c: Likewise.
6013 * c-lex.c: Likewise.
6014 * c-omp.c: Likewise.
6015 * c-opts.c: Likewise.
6016 * c-pch.c: Likewise.
6017 * c-ppoutput.c: Likewise.
6018 * c-pragma.c: Likewise.
6019 * c-pretty-print.c: Likewise.
6020 * c-semantics.c: Likewise.
6021 * c-ubsan.c: Likewise.
6022 * cilk.c: Likewise.
6023 * stub-objc.c: Likewise.
6024
6ac48155
DM
60252015-06-02 David Malcolm <dmalcolm@redhat.com>
6026
6027 PR c/66220:
6028 * c-indentation.c (should_warn_for_misleading_indentation): Use
6029 expand_location rather than expand_location_to_spelling_point.
6030 Don't warn if the guarding statement is more indented than the
6031 next/body stmts.
6032
773ce42e
DM
60332015-06-02 David Malcolm <dmalcolm@redhat.com>
6034
6035 * c-indentation.c (warn_for_misleading_indentation): Bail out
6036 immediately if -Wmisleading-indentation isn't enabled.
6037
4fef8379
ML
60382015-06-01 Martin Liska <mliska@suse.cz>
6039
6040 * c-format.c (check_format_arg):Use new type-based pool allocator.
6041 (check_format_info_main) Likewise.
6042
1edfb384
EB
60432015-05-31 Eric Botcazou <ebotcazou@adacore.com>
6044
6045 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
6046 (has_nontrivial_methods): Likewise.
6047
9677ef52
MP
60482015-05-25 Marek Polacek <polacek@redhat.com>
6049
6050 * c-ubsan.c (ubsan_instrument_shift): Use type0.
6051
fd5c817a
MP
60522015-05-22 Marek Polacek <polacek@redhat.com>
6053
6054 PR c/47043
6055 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
6056
a2f45fe6 60572015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
6058
6059 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
6060 STACK_GROWS_DOWNWARD.
6061
a2f45fe6 60622015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
6063
6064 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
6065 STACK_GROWS_DOWNWARD rather than if it is defined.
6066
0fee2ac2 60672015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 6068
0fee2ac2
MLI
6069 PR c/52952
6070 * c-format.c (location_column_from_byte_offset): New.
6071 (location_from_offset): New.
6072 (struct format_wanted_type): Add offset_loc field.
6073 (check_format_info): Move handling of location for extra arguments
6074 closer to the point of warning.
6075 (check_format_info_main): Pass the result of location_from_offset
6076 to warning_at.
6077 (format_type_warning): Pass the result of location_from_offset
6078 to warning_at.
6079
cf4ef6f7
MP
60802015-05-20 Marek Polacek <polacek@redhat.com>
6081
6082 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
6083
3a65ee74
MP
60842015-05-20 Marek Polacek <polacek@redhat.com>
6085
6086 * c-ada-spec.c (dump_sloc): Use DECL_P.
6087
21b634ae
MP
60882015-05-20 Marek Polacek <polacek@redhat.com>
6089
6090 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
6091 * c-common.c: Likewise.
6092
0e50b624
DM
60932015-05-19 David Malcolm <dmalcolm@redhat.com>
6094
6095 * c-common.h (fe_file_change): Strengthen param from
6096 const line_map * to const line_map_ordinary *.
6097 (pp_file_change): Likewise.
6098 * c-lex.c (fe_file_change): Likewise.
6099 (cb_define): Use linemap_check_ordinary when invoking
6100 SOURCE_LINE.
6101 (cb_undef): Likewise.
6102 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
6103 invoking cb_file_change.
6104 (c_finish_options): Likewise.
6105 (push_command_line_include): Likewise.
6106 (cb_file_change): Strengthen param "new_map" from
6107 const line_map * to const line_map_ordinary *.
6108 * c-ppoutput.c (cb_define): Likewise for local "map".
6109 (pp_file_change): Likewise for param "map" and local "from".
6110
fab27f52
MM
61112015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
6112
6113 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
6114
2fe1d762
TV
61152015-05-18 Tom de Vries <tom@codesourcery.com>
6116
6117 * c-common.c (build_va_arg_1): New function.
6118 (build_va_arg): Add address operator to va_list operand if necessary.
6119
7a37fa90
MM
61202015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
6121
6122 PR c/48956
6123 * c-common.c (int_safely_convertible_to_real_p): Define.
6124 (unsafe_conversion_p): Check conversions involving complex types.
6125 (conversion_warning): Add new warning message for conversions which
6126 discard imaginary component.
6127 * c-common.h: (enum conversion_safety): Add new enumerator for such
6128 conversions.
6129
3aa3c9fc
MP
61302015-05-14 Marek Polacek <polacek@redhat.com>
6131
6132 PR c/66066
6133 PR c/66127
6134 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
6135 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
6136 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
6137 use it. If FOR_INT_CONST, require that all evaluated operands be
6138 INTEGER_CSTs.
6139
c3388e62
DM
61402015-05-12 David Malcolm <dmalcolm@redhat.com>
6141
6142 * c-common.h (warn_for_misleading_indentation): New prototype.
6143 * c-indentation.c: New file.
6144 * c.opt (Wmisleading-indentation): New option.
6145
c7b38fd5
TV
61462015-05-12 Tom de Vries <tom@codesourcery.com>
6147
6148 PR tree-optimization/66010
6149 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
6150
381bf11e
JM
61512015-05-09 Jason Merrill <jason@redhat.com>
6152
edff0c06
JM
6153 * c-opts.c (c_common_post_options): Also clear
6154 cpp_opts->cpp_warn_cxx11_compat.
6155
129211bc
JM
6156 * c-common.h (enum cxx_dialect): Add cxx_unset.
6157 * c-common.c (cxx_dialect): Initialize to cxx_unset.
6158 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
6159
381bf11e
JM
6160 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
6161 (std=gnu++0x): Mark as Undocumented.
6162 (std=gnu++1y): Add deprecated message.
6163
fe191308
JM
61642015-05-08 Jason Merrill <jason@redhat.com>
6165
765189ff
JM
6166 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
6167 * c-opts.c: Adjust.
6168
fe191308
JM
6169 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
6170
755e528f
MP
61712015-05-08 Marek Polacek <polacek@redhat.com>
6172
6173 PR c/64918
6174 * c.opt (Woverride-init-side-effects): New option.
6175
0173bd2a
MP
61762015-05-07 Marek Polacek <polacek@redhat.com>
6177
6178 PR c/65179
6179 * c-common.c (c_fully_fold_internal): Warn when left shifting a
6180 negative value.
6181 * c.opt (Wshift-negative-value): New option.
6182 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
6183 when -Wextra and C99/C++11 mode.
6184
e0f0d3b9
MP
61852015-05-07 Marek Polacek <polacek@redhat.com>
6186 Martin Uecker <uecker@eecs.berkeley.edu>
6187
6188 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
6189 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
6190
8243e2a9
JM
61912015-05-05 Jason Merrill <jason@redhat.com>
6192
6193 * c.opt (Wterminate): New.
6194
577cd070
MP
61952015-04-30 Marek Polacek <polacek@redhat.com>
6196
6197 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
6198 require that the non-constant be of a boolean type.
6199
0373796b
JT
62002015-04-29 Josh Triplett <josh@joshtriplett.org>
6201
e0f0d3b9
MP
6202 * c-common.c (handle_section_attribute): Refactor to reduce
6203 nesting and distinguish between error cases.
0373796b 6204
716c0ba6
MP
62052015-04-29 Marek Polacek <polacek@redhat.com>
6206
6207 PR c/64610
6208 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
6209 with 0/1.
6210
8848828b
JJ
62112015-04-29 Jakub Jelinek <jakub@redhat.com>
6212
6213 * c-common.h (omp_clause_mask): Unconditionally define as a class.
6214 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
6215 HOST_BITS_PER_WIDE_INT.
6216
ecd0e562
TV
62172015-04-28 Tom de Vries <tom@codesourcery.com>
6218
6219 PR tree-optimization/65887
6220 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
6221
2a877204 62222015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 6223 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
6224
6225 * c-ada-spec.c (in_function): Delete.
6226 (dump_generic_ada_node): Do not change in_function and remove the
6227 redundant code dealing with it.
6228 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
6229 (print_ada_methods): Output the static member functions in a nested
6230 package after the regular methods as well as associated renamings.
6231
4853031e
MP
62322015-04-24 Marek Polacek <polacek@redhat.com>
6233
6234 PR c/65830
6235 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
6236 and OPT_Wshift_count_overflow.
6237
8c2b7f79
MP
6238 PR c/63357
6239 * c-common.c (warn_logical_operator): Warn if the operands have the
6240 same expressions.
6241
b8787813
MP
62422015-04-24 Marek Polacek <polacek@redhat.com>
6243
6244 PR c/61534
6245 * c-common.c (warn_logical_operator): Bail if either operand comes
6246 from a macro expansion.
6247
8fba1830
BRF
62482015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
6249
6250 PR target/55143
6251 * c-common.c (c_default_pointer_mode): Add definition.
6252 * c-common.h (c_default_pointer_mode): Add declaration.
6253
17958621
JJ
62542015-03-11 Jakub Jelinek <jakub@redhat.com>
6255
6256 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
6257 on record_builtin_type argument.
6258
7ccb1a11
JJ
62592015-03-10 Jakub Jelinek <jakub@redhat.com>
6260
6261 PR c/65120
6262 * c-common.c (warn_logical_not_parentheses): Don't warn for
6263 !x == 0 or !x != 0.
6264
04fd785e
MP
62652015-03-07 Marek Polacek <polacek@redhat.com>
6266
6267 PR sanitizer/65280
6268 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
6269 before trying to figure out whether we have a flexible array member.
6270
a4e26206 62712015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 6272 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
6273
6274 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
6275
0d2489f4
EB
62762015-03-05 Eric Botcazou <ebotcazou@adacore.com>
6277
6278 PR ada/65319
6279 * c-ada-spec.c (print_destructor): Remove obsolete code.
6280
83ed54d7
EB
62812015-03-01 Eric Botcazou <ebotcazou@adacore.com>
6282
6283 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
6284 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
6285 DECL_TEMPLATE_RESULT emulations.
6286 (dump_ada_template)): Add guard for TYPE_METHODS.
6287
7631f0e2
MP
62882015-02-27 Marek Polacek <polacek@redhat.com>
6289
6290 PR c/65040
6291 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
6292
d1783ae5
KT
62932015-02-27 Kai Tietz <ktietz@redhat.com>
6294
6295 PR c/35330
6296 * c-pragma.c (handle_pragma_weak): Do not try to create
6297 weak/alias of declarations not being function, or variable
6298 declarations.
6299
56a9f6bc
TS
63002015-02-24 Thomas Schwinge <thomas@codesourcery.com>
6301
6302 PR libgomp/64625
6303 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
6304 Remove macros.
6305 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
6306
3d5cb23d
MP
63072015-02-16 Marek Polacek <polacek@redhat.com>
6308
6309 PR c/65066
6310 * c-format.c (check_format_types): Handle null param.
6311
fa008882
MP
63122015-02-13 Marek Polacek <polacek@redhat.com>
6313
6314 PR c/65040
6315 * c-format.c (check_format_types): Don't warn about different
6316 signedness if the original value is in the range of WANTED_TYPE.
6317
785f21af
JM
63182015-02-12 Jason Merrill <jason@redhat.com>
6319
6320 PR c++/64956
6321 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
6322 to the current highest version.
6323 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
6324
4886ec8e
JJ
63252015-02-04 Jakub Jelinek <jakub@redhat.com>
6326
6327 PR c/64824
6328 PR c/64868
6329 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
6330 instead of RDIV_EXPR. Use build_binary_op instead of
6331 build2_loc.
6332
40fecdd6
JM
63332015-01-30 Joseph Myers <joseph@codesourcery.com>
6334
6335 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
6336 to pass input_location as first argument.
6337
a0c88d06
TV
63382015-01-23 Tom de Vries <tom@codesourcery.com>
6339
6340 PR libgomp/64672
6341 * c.opt (fopenacc): Mark as LTO option.
6342
1506ae0e
TV
63432015-01-23 Tom de Vries <tom@codesourcery.com>
6344
6345 PR libgomp/64707
6346 * c.opt (fopenmp): Mark as LTO option.
6347
31be63ab
JJ
63482015-01-21 Jakub Jelinek <jakub@redhat.com>
6349
6350 PR c/63307
b1726d6c 6351 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
6352 (compare_decls): Fix up formatting.
6353
63542015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
6355
6356 PR c/63307
6357 * cilk.c: Include vec.h.
6358 (struct cilk_decls): New structure.
6359 (wrapper_parm_cb): Split this function to...
6360 (fill_decls_vec): ...this...
6361 (create_parm_list): ...and this.
6362 (compare_decls): New function.
6363 (for_local_cb): Remove.
6364 (wrapper_local_cb): Ditto.
6365 (build_wrapper_type): For now first traverse and fill vector of
6366 declarations then sort it and then deal with sorted vector.
6367 (cilk_outline): Ditto.
6368 (declare_one_free_variable): Ditto.
6369
6875457f
JM
63702015-01-21 Jason Merrill <jason@redhat.com>
6371
6372 PR c++/64629
6373 * c-format.c (check_format_arg): Call decl_constant_value.
6374
185c9e56
ML
63752015-01-19 Martin Liska <mliska@suse.cz>
6376
6377 * c-common.c (handle_noicf_attribute): New function.
6378
41dbbb37
TS
63792015-01-15 Thomas Schwinge <thomas@codesourcery.com>
6380 Bernd Schmidt <bernds@codesourcery.com>
6381 James Norris <jnorris@codesourcery.com>
6382 Cesar Philippidis <cesar@codesourcery.com>
6383 Ilmir Usmanov <i.usmanov@samsung.com>
6384 Jakub Jelinek <jakub@redhat.com>
6385
6386 * c.opt (fopenacc): New option.
6387 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
6388 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
6389 New macros.
6390 * c-common.h (c_finish_oacc_wait): New prototype.
6391 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
6392 (c_finish_oacc_wait): New function.
6393 * c-pragma.c (oacc_pragmas): New variable.
6394 (c_pp_lookup_pragma, init_pragma): Handle it.
6395 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
6396 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
6397 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
6398 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
6399 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
6400 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
6401 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
6402 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
6403 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
6404 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
6405 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
6406 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
6407 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
6408 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
6409 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
6410 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
6411 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
6412 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
6413 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
6414 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
6415 PRAGMA_OACC_CLAUSE_WORKER.
6416
3f8257db 64172015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
6418
6419 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
6420 for the new option fstack-protector_explicit.
6421 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
6422 (handle_stack_protect_attribute): New function.
6423
3f8257db 64242015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
6425
6426 * c.opt: New option -Warray-bounds=.
6427
adfac8df
JJ
64282015-01-09 Michael Collison <michael.collison@linaro.org>
6429
6430 * array-notation-common.c: Include hash-set.h, machmode.h,
6431 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6432 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
6433 * c-ada-spec.c: Ditto.
6434 * c-cilkplus.c: Ditto.
6435 * c-common.c: Include input.h due to flattening of tree.h.
6436 Define macro GCC_C_COMMON_C.
6437 * c-common.h: Flatten tree.h header files into c-common.h.
6438 Remove include of tree-core.h.
6439 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
6440 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6441 fold-const.h, wide-int.h, and inchash.h due to
6442 flattening of tree.h.
6443 * c-dump.c: Ditto.
6444 * c-format.c: Flatten tree.h header files into c-common.h.
6445 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
6446 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6447 fold-const.h, wide-int.h, and inchash.h due to
6448 flattening of tree.h.
6449 * c-dump.c: Include hash-set.h, machmode.h,
6450 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6451 fold-const.h, wide-int.h, and inchash.h due to
6452 flattening of tree.h.
6453 * c-format.c: Include hash-set.h, machmode.h,
6454 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6455 fold-const.h, wide-int.h, inchash.h and real.h due to
6456 flattening of tree.h.
6457 * c-gimplify.c: Include hash-set.h, machmode.h,
6458 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6459 fold-const.h, wide-int.h, and inchash.h due to
6460 flattening of tree.h.
6461 * cilk.c: Ditto.
6462 * c-lex.c: Ditto.
6463 * c-omp.c: Ditto.
6464 * c-opts.c: Ditto.
6465 * c-pch.c: Ditto.
6466 * c-ppoutput.c: Ditto.
6467 * c-pragma.c: Ditto.
6468 * c-pretty-print.c: Ditto.
6469 * c-semantics.c: Ditto.
6470 * c-ubsan.c: Ditto.
6471 * stub-objc.c: Ditto.
6472
f5481fc4
JM
64732015-01-08 Jason Merrill <jason@redhat.com>
6474
6475 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
6476 do_ubsan_in_current_function.
6477 (ubsan_maybe_instrument_reference_or_call): Likewise.
6478 * c-ubsan.h: Declare it.
6479
de35aa66
MS
64802015-01-08 Mike Stump <mikestump@comcast.net>
6481
6482 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
6483
4a9a42ab
MP
64842015-01-07 Marek Polacek <polacek@redhat.com>
6485
6486 PR c/64440
6487 * c-common.c (c_fully_fold_internal): Warn for division and modulo
6488 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
6489
2f42e5de
TS
64902015-01-05 Trevor Saunders <tsaunders@mozilla.com>
6491
6492 PR c++/31397
6493 * c.opt (Wsuggest-override): New option.
6494
5624e564
JJ
64952015-01-05 Jakub Jelinek <jakub@redhat.com>
6496
6497 Update copyright years.
6498
5bd012f8
MP
64992015-01-05 Marek Polacek <polacek@redhat.com>
6500
6501 PR c/64423
6502 * c-common.c (warn_array_subscript_with_type_char): Add location_t
6503 parameter. Use it.
6504 * c-common.h (warn_array_subscript_with_type_char): Update
6505 declaration.
6506
a7fa8d18
ESR
65072014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
6508
6509 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
6510 Control macro with flag_sized_deallocation.
6511
3f8257db 65122014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
6513
6514 * c.opt (Wdiscarded-array-qualifiers): New option.
6515
1f8d3e84
JJ
65162014-12-19 Jakub Jelinek <jakub@redhat.com>
6517
6518 PR preprocessor/63831
6519 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
6520 and __has_cpp_attribute here.
6521 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
6522 c_common_has_attribute.
6523 * c-common.h (c_common_has_attribute): New prototype.
6524 * c-lex.c (init_c_lex): Set cb->has_attribute to
6525 c_common_has_attribute instead of cb_has_attribute.
6526 (get_token_no_padding): New function.
6527 (cb_has_attribute): Renamed to ...
6528 (c_common_has_attribute): ... this. No longer static. Use
6529 get_token_no_padding, require ()s, don't build TREE_LIST
6530 unnecessarily, fix up formatting, adjust diagnostics, call
6531 init_attributes.
6532
20b06add
JM
65332014-12-15 Jason Merrill <jason@redhat.com>
6534
6535 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
6536 (-Wsized-deallocation): New.
6537 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
6538 to on in C++14 and up.
6539
94a073b2
JM
65402014-12-11 Jason Merrill <jason@redhat.com>
6541
acaa5911
JM
6542 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
6543
94a073b2
JM
6544 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
6545 we aren't complaining about VLAs.
6546
7fb66c15
MP
65472014-12-06 Marek Polacek <polacek@redhat.com>
6548
6549 PR tree-optimization/64183
6550 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
6551 shift-expression if it is integer_type_node. Use types_compatible_p.
6552
b731b390
JJ
65532014-11-29 Jakub Jelinek <jakub@redhat.com>
6554
6555 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
6556 last argument from create_tmp_var_raw and create_tmp_var calls.
6557 * cilk.c (gimplify_cilk_spawn): Likewise.
6558 * c-omp.c (c_finish_omp_atomic): Likewise.
6559
6a4da643
MP
65602014-11-28 Marek Polacek <polacek@redhat.com>
6561
6562 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
6563 instead of unsigned_type_node.
6564
541e35a6
MP
65652014-11-28 Marek Polacek <polacek@redhat.com>
6566
6567 PR c/63862
6568 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
6569 to op1_utype.
6570 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
6571 expression to unsigned_type_node.
6572
dcc97066
MW
65732014-11-20 Mark Wielaard <mjw@redhat.com>
6574
6575 PR debug/38757
6576 * c-opts.c (set_std_c89): Set lang_hooks.name.
6577 (set_std_c99): Likewise.
6578 (set_std_c11): Likewise.
6579 (set_std_cxx98): Likewise.
6580 (set_std_cxx11): Likewise.
6581 (set_std_cxx14): Likewise.
6582 (set_std_cxx1z): Likewise.
6583
aa7da51a
JJ
65842014-11-21 Jakub Jelinek <jakub@redhat.com>
6585
6586 PR target/63764
6587 * c-common.h (convert_vector_to_pointer_for_subscript): Change
6588 return type to bool.
009a3480 6589 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
6590 (convert_vector_to_pointer_for_subscript): Change return type to
6591 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
6592 and copy it into a TARGET_EXPR and use that instead of *vecp
6593 directly.
6594
538dd0b7
DM
65952014-11-19 David Malcolm <dmalcolm@redhat.com>
6596
6597 Merger of git branch "gimple-classes-v2-option-3".
6598 * ChangeLog.gimple-classes: New.
6599 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
6600 from being just a vec<gimple> to a vec<gbind *>.
6601
c39a5e99
JJ
66022014-11-18 Jakub Jelinek <jakub@redhat.com>
6603
6604 PR sanitizer/63813
6605 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
6606 argument to ptype, set type to TREE_TYPE (ptype). Don't call
6607 get_pointer_alignment for non-pointers. Use ptype, or if it is
6608 reference type, corresponding pointer type, as type of kind
6609 argument.
6610 (ubsan_maybe_instrument_reference,
6611 ubsan_maybe_instrument_member_call): Adjust callers.
6612
8537a4a9
MP
66132014-11-15 Marek Polacek <polacek@redhat.com>
6614
6615 PR middle-end/63884
6616 * array-notation-common.c (is_sec_implicit_index_fn): Return false
6617 for NULL fndecl.
6618 (extract_array_notation_exprs): Return for NULL node.
6619
2079956a
JM
66202014-11-12 Joseph Myers <joseph@codesourcery.com>
6621
6622 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
6623 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
6624
1304953e
JJ
66252014-11-12 Jakub Jelinek <jakub@redhat.com>
6626
6627 PR c/59708
6628 * c-common.c (check_builtin_function_arguments): Handle
6629 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
6630
e5e44252
AK
66312014-11-10 Andi Kleen <ak@linux.intel.com>
6632
6633 PR c/60804
6634 * c-common.h (check_no_cilk): Declare.
6635 * cilk.c (get_error_location): New function.
6636 (check_no_cilk): Dito.
6637
e64b984d
AK
66382014-11-10 Andi Kleen <ak@linux.intel.com>
6639
6640 * cilk.c (recognize_spawn): Use expression location
6641 for error message.
6642
13c21655
PC
66432014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
6644
6645 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
6646
42fd12b1
ESR
66472014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
6648
6649 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
6650 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
6651 (__cpp_range_based_for, __cpp_initializer_lists,
6652 __cpp_delegating_constructors, __cpp_nsdmi,
6653 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
6654 for C++11; (__cpp_attribute_deprecated): Remove in favor of
6655 __has_cpp_attribute.
6656 * c-lex.c (cb_has_attribute): New callback CPP function;
6657 (init_c_lex): Set has_attribute callback.
6658
6f450181
RB
66592014-11-04 Richard Biener <rguenther@suse.de>
6660
6661 * c-common.c (shorten_compare): Do not shorten mixed
6662 DFP and non-DFP compares.
6663
26f0e1d6
ESR
66642014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
6665
6666 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
6667 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
6668 Commentary and rearrangement of tests.
6669 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
6670 Commentary and rearrangement of tests.
ab20d992 6671 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
26f0e1d6
ESR
6672 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
6673
ef4bddc2
RS
66742014-10-29 Richard Sandiford <richard.sandiford@arm.com>
6675
6676 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
6677 enum from machine_mode.
6678
c582198b
AM
66792014-10-28 Andrew MacLeod <amacleod@redhat.com>
6680
adfac8df
JJ
6681 * c-common.c: Adjust include files.
6682 * c-gimplify.c: Ditto.
6683 * cilk.c: Ditto.
6684 * c-pragma.c: Ditto.
6685 * c-ubsan.c: Ditto.
c582198b 6686
60393bbc
AM
66872014-10-27 Andrew MacLeod <amacleod@redhat.com>
6688
6689 * c-gimplify.c: Adjust include files.
6690
d723bb7c
MLI
66912014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
6692
6693 PR c++/53061
6694 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
6695 c_common_initialize_diagnostics.
6696 * c-common.h: Likewise.
6697
90f3520e
MP
66982014-10-24 Marek Polacek <polacek@redhat.com>
6699
6700 PR c/56980
6701 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
6702 print "struct"/"union"/"enum" for typedefed names.
6703
59d7607a
MP
67042014-10-23 Marek Polacek <polacek@redhat.com>
6705
6706 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
6707 in unsigned type.
6708
d95a2703
JJ
67092014-10-22 Jakub Jelinek <jakub@redhat.com>
6710 Yury Gribov <y.gribov@samsung.com>
6711
6712 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6713 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
6714 instead of flag_sanitize_recover as bool flag.
6715
8e6ef852
KY
67162014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
6717
6718 * cilk.c: Revert previous change.
6719
948cf550
IZ
67202014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
6721
6722 PR c/63307
6723 * cilk.c: Include vec.h.
6724 (struct cilk_decls): New structure.
6725 (wrapper_parm_cb): Split this function to...
6726 (fill_decls_vec): ...this...
6727 (create_parm_list): ...and this.
6728 (compare_decls): New function.
6729 (for_local_cb): Remove.
6730 (wrapper_local_cb): Ditto.
6731 (build_wrapper_type): For now first traverse and fill vector of
6732 declarations then sort it and then deal with sorted vector.
6733 (cilk_outline): Ditto.
6734 (declare_one_free_variable): Ditto.
6735
92574c7c
MP
67362014-10-17 Marek Polacek <polacek@redhat.com>
6737
6738 * c-opts.c (c_common_post_options): Set warn_implicit_int.
6739 * c.opt (Wimplicit-int): Initialize to -1.
6740
83685514
AM
67412014-10-16 Andrew MacLeod <amacleod@redhat.com>
6742
6743 * c-pragma.c: Adjust include files.
6744 * c-semantics.c: Likewise.
6745
5b8300ea
DD
67462014-10-16 DJ Delorie <dj@redhat.com>
6747
6748 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
6749 multiples of bytes.
6750
5f83e90b
JM
67512014-10-14 Jason Merrill <jason@redhat.com>
6752
6753 PR c++/63455
6754 * c-common.h (CPP_PREPARSED_EXPR): New.
6755 (N_CP_TTYPES): Adjust.
6756
d73326ca
MP
67572014-10-15 Marek Polacek <polacek@redhat.com>
6758
6759 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
6760
78a7c317
DD
67612014-10-14 DJ Delorie <dj@redhat.com>
6762
6763 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
6764 types, not just __int128.
6765 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
6766 types, not just __int128.
6767 (cpp_atomic_builtins): Round pointer sizes up.
6768 (type_suffix): Use type precision, not specific types.
6769 * c-common.c (c_common_reswords): Remove __int128 special case.
6770 (c_common_type_for_size): Check for all __intN types, not just
6771 __int128.
6772 (c_common_type_for_mode): Likewise.
6773 (c_common_signed_or_unsigned_type): Likewise.
6774 (c_build_bitfield_integer_type): Likewise.
6775 (c_common_nodes_and_builtins): Likewise.
6776 (keyword_begins_type_specifier): Likewise.
6777 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
6778 __intN variants.
6779
2a22f99c
TS
67802014-10-12 Trevor Saunders <tsaunders@mozilla.com>
6781
6782 * c-common.c: Use hash_table instead of hashtab.
6783
2a8ef767
ESR
67842014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
6785
adfac8df 6786 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
6787 C++11 section.
6788
3c9aabbd
MG
67892014-10-03 Marc Glisse <marc.glisse@inria.fr>
6790
6791 PR c++/54427
6792 PR c++/57198
6793 PR c++/58845
6794 * c-common.c (warn_logical_operator): Punt for vectors.
6795
a15f7cb8
ESR
67962014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
6797
6798 Implement SD-6: SG10 Feature Test Recommendations
6799 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
6800 macros and the __has_header macro.
6801
8d0cf15e
JM
68022014-09-30 Jason Merrill <jason@redhat.com>
6803
dd5d5481
JM
6804 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
6805 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
6806 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
6807
b752325e
JM
6808 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
6809 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
6810
8d0cf15e
JM
6811 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
6812 * c-common.c (c_common_reswords): Remove __is_convertible_to.
6813
083e891e
MP
68142014-09-24 Marek Polacek <polacek@redhat.com>
6815
6816 PR c/61405
6817 PR c/53874
6818 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
6819
7861b648
AK
68202014-09-23 Andi Kleen <ak@linux.intel.com>
6821
6822 * c-common.c (handle_no_reorder_attribute): New function.
6823 (c_common_attribute_table): Add no_reorder attribute.
6824
9a79452d
JM
68252014-09-22 Joseph Myers <joseph@codesourcery.com>
6826
6827 * c-cppbuiltin.c (c_cpp_builtins): Define
6828 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
6829 modes.
6830
dd69f047
JM
68312014-09-18 Joseph Myers <joseph@codesourcery.com>
6832
6833 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
6834 for supported floating-point modes.
6835
737a4826
MLI
68362014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
6837
6838 * c.opt (Wpsabi): Use LangEnabledBy.
6839 * c-opts.c (c_common_handle_option): Do not handle here.
6840
8cc4b7a2
JM
68412014-09-12 Joseph Myers <joseph@codesourcery.com>
6842
6843 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
6844 macros for floating-point modes.
6845
179b5a55
MG
68462014-09-11 Marc Glisse <marc.glisse@inria.fr>
6847
6848 PR target/58757
6849 * c-cppbuiltin.c (builtin_define_float_constants): Correct
6850 __*_DENORM_MIN__ without denormals.
6851
570a11fe
JJ
68522014-09-10 Jakub Jelinek <jakub@redhat.com>
6853
6854 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6855 ubsan_instrument_vla, ubsan_instrument_return): Adjust
6856 ubsan_create_data callers.
6857 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
6858 index is constant or BIT_AND_EXPR with constant mask and is
6859 small enough for the bound.
6860 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
6861 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
6862
b559c810
MLI
68632014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6864
6865 * c.opt: Add CppReason to various flags.
6866 (Wdate-time): Re-sort.
6867 * c-common.c: Include c-common.h earlier.
6868 (struct reason_option_codes_t): Delete.
6869 (c_option_controlling_cpp_error): Prefix global type and struct
6870 with cpp_.
6871
1ef33fd4
MLI
68722014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6873
6874 * c.opt (Wnormalized): New.
6875 (Wnormalized=): Use Enum and Reject Negative.
6876 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
6877
66bb34c0
JM
68782014-09-08 Joseph Myers <joseph@codesourcery.com>
6879
6880 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
6881 digits of floating-point modes if -fbuilding-libgcc.
6882
53d68b9f
JM
68832014-09-05 Joseph Myers <joseph@codesourcery.com>
6884
6885 * c-cppbuiltin.c (c_cpp_builtins): Also define
6886 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
6887 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
6888 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
6889 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
6890 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
6891 __LIBGCC_STACK_GROWS_DOWNWARD__,
6892 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
6893 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
6894 __LIBGCC_DWARF_FRAME_REGISTERS__,
6895 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
6896 __LIBGCC_STACK_POINTER_REGNUM__ and
6897 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
6898 (builtin_define_with_value): Handle backslash-escaping in string
6899 macro values.
6900
f65586dc
RB
69012014-09-05 Richard Biener <rguenther@suse.de>
6902
6903 PR middle-end/63148
6904 * c-format.c (check_format_arg): Properly handle
6905 effectively signed POINTER_PLUS_EXPR offset.
6906
2b71f4a4
MLI
69072014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
6908
6909 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
6910 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
6911 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
6912 and Init.
6913 * c-opts.c (c_common_handle_option): Do not handle here.
6914 (sanitize_cpp_opts): Likewise.
6915 * c-common.c (struct reason_option_codes_t): Handle
6916 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
6917
d2e4feca
MP
69182014-09-03 Marek Polacek <polacek@redhat.com>
6919
6920 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
6921
9a771876
JJ
69222014-09-02 Jakub Jelinek <jakub@redhat.com>
6923 Balaji V. Iyer <balaji.v.iyer@intel.com>
6924 Igor Zamyatin <igor.zamyatin@intel.com>
6925
6926 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
6927 * c-common.c (c_common_reswords): Added _Cilk_for.
6928 * c-common.h (enum rid): Added RID_CILK_FOR.
6929 (cilk_for_number_of_iterations): Add declaration.
6930 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
6931 CILK_FOR.
6932 * c-pragma.c (init_pragma): Register "grainsize" pragma.
6933 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
6934
81b5d104
MLI
69352014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6936
6937 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
6938 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
6939 Wundef): Use CPP, Var and Init.
6940 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
6941
b753b37b
MLI
69422014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6943
6944 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
6945 * c-opts.c (c_common_handle_option): Do not handle here.
6946
028aee17
JM
69472014-08-25 Jason Merrill <jason@redhat.com>
6948
6949 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
6950 -std=c++14 and -std=gnu++14, rather than the reverse.
6951 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
6952 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
6953 * c-common.h (cxx_dialect): Remove cxx1y.
6954
e4276ba5
ESR
69552014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
6956
6957 * c-common.h (enum cxx_dialect): Add cxx14.
6958 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
6959 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
6960 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
6961
a545cacd
JM
69622014-08-22 Jason Merrill <jason@redhat.com>
6963
6964 * c.opt (std=gnu++17): Fix alias.
6965
59ea0364
MP
69662014-08-22 Marek Polacek <polacek@redhat.com>
6967
6968 PR c++/62199
6969 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
6970 check for vector types. Drop LHS argument.
6971 * c-common.h (warn_logical_not_parentheses): Adjust.
6972
596e808c
MLI
69732014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
6974
6975 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
6976 (Wmultichar): Likewise.
6977 (Wdate-time): Use C-family languages instead of Common. Use CPP
6978 and Var.
6979 * c-opts.c (c_common_handle_option): Do not handle the above
6980 options here.
6981 (sanitize_cpp_opts): Likewise.
6982
18767f65
MLI
69832014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
6984
6985 PR fortran/44054
6986 * c-opts.c: Include tree-diagnostics.h.
6987 (c_diagnostic_finalizer): New.
6988 (c_common_initialize_diagnostics): Use it.
6989
b4413594
MLI
69902014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
6991
6992 PR preprocessor/51303
6993 * c-common.c (struct reason_option_codes_t option_codes):
6994 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
6995
43f9a13c
MLI
69962014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
6997
6998 PR c/60975
6999 PR c/53063
7000 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
7001 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
7002 (c_common_post_options): Call init_global_opts_from_cpp.
7003 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
7004
04159acf
MP
70052014-08-19 Marek Polacek <polacek@redhat.com>
7006
7007 PR c++/62153
7008 * c-common.c (maybe_warn_bool_compare): New function.
7009 * c-common.h (maybe_warn_bool_compare): Declare.
7010 * c.opt (Wbool-compare): New option.
7011
35aff4fb
MP
70122014-08-19 Marek Polacek <polacek@redhat.com>
7013
7014 * c.opt (Wc99-c11-compat): New option.
7015
177cce46
MP
70162014-08-19 Marek Polacek <polacek@redhat.com>
7017
7018 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
7019 to warn_c90_c99_compat.
7020 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
7021 to -1.
7022
6ae9194f
MLI
70232014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
7024 Steven Bosscher <steven@gcc.gnu.org>
7025
7026 PR c/52952
7027 * c-format.c: Add extra_arg_loc and format_string_loc to struct
7028 format_check_results.
7029 (check_function_format): Use true and add comment for boolean
7030 argument.
7031 (finish_dollar_format_checking): Use explicit location when warning.
7032 (check_format_info): Likewise.
7033 (check_format_arg): Set extra_arg_loc and format_string_loc.
7034 (check_format_info_main): Use explicit location when warning.
7035 (check_format_types): Pass explicit location.
7036 (format_type_warning): Likewise.
7037
8e54f6d3
MLI
70382014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
7039
7040 PR fortran/44054
7041 * c-format.c: Handle Fortran flags.
7042
cd4e76fc
IZ
70432014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
7044
7045 PR other/61962
7046 * array-notation-common.c (find_rank): Added handling for other
7047 types of references.
7048
f3bede71
MP
70492014-08-10 Marek Polacek <polacek@redhat.com>
7050
7051 PR c/51849
7052 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
7053 * c.opt (Wc90-c99-compat): Add option.
7054
9f25a338
TS
70552014-08-07 Trevor Saunders <tsaunders@mozilla.com>
7056
7057 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
7058
62e4eb35
MP
70592014-08-03 Marek Polacek <polacek@redhat.com>
7060
ab20d992 7061 * c-common.c (check_case_value): Add location_t parameter. Use it.
62e4eb35
MP
7062 (c_add_case_label): Pass loc to check_case_value.
7063
b787e7a2
TS
70642014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7065
7066 * cilk.c: Use hash_map instead of pointer_map.
7067
6e2830c3
TS
70682014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7069
7070 * c-gimplify.c: Use hash_set instead of pointer_set.
7071
a7ee52fb
IZ
70722014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
7073
7074 PR middle-end/61455
7075 * array-notation-common.c (extract_array_notation_exprs): Handling
7076 of DECL_EXPR added.
7077
944fa280
JJ
70782014-08-01 Jakub Jelinek <jakub@redhat.com>
7079
7080 * c-common.h (min_align_of_type): Removed prototype.
7081 * c-common.c (min_align_of_type): Removed.
7082 * c-ubsan.h (ubsan_maybe_instrument_reference,
7083 ubsan_maybe_instrument_member_call): New prototypes.
7084 * c-ubsan.c: Include stor-layout.h and builtins.h.
7085 (ubsan_maybe_instrument_reference_or_call,
7086 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
7087 functions.
7088
b4dfdc11
MG
70892014-07-31 Marc Glisse <marc.glisse@inria.fr>
7090
7091 PR c++/60517
7092 * c.opt (-Wreturn-local-addr): Move to common.opt.
7093
a41844e5
JM
70942014-07-30 Jason Merrill <jason@redhat.com>
7095
7096 PR c++/61659
7097 PR c++/61687
7098 Revert:
7099 * c.opt (-fuse-all-virtuals): New.
7100
976d5a22
TT
71012014-07-30 Tom Tromey <tromey@redhat.com>
7102
7103 PR c/59855
7104 * c.opt (Wdesignated-init): New option.
7105 * c-common.c (c_common_attribute_table): Add "designated_init".
7106 (handle_designated_init): New function.
7107
cdc94aca
MP
71082014-07-24 Marek Polacek <polacek@redhat.com>
7109
7110 PR c/57653
7111 * c-opts.c (c_finish_options): If -imacros is in effect, return.
7112
f41373b6
DS
71132014-07-16 Dodji Seketeli <dodji@redhat.com>
7114
7115 PR preprocessor/60723 - missing system-ness marks for macro tokens
7116 * c-ppoutput.c (struct print::prev_was_system_token): New data
7117 member.
7118 (init_pp_output): Initialize it.
7119 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
7120 (do_line_change): Return a flag saying if a line marker was
7121 emitted or not.
7122 (scan_translation_unit): Detect if the system-ness of the token we
7123 are about to emit is different from the one of the previously
7124 emitted token. If so, emit a line marker. Avoid emitting useless
7125 adjacent line markers. Avoid emitting line markers for tokens
7126 originating from the expansion of built-in macros.
7127 (scan_translation_unit_directives_only): Adjust.
7128
4d661eaa
MP
71292014-07-15 Marek Polacek <polacek@redhat.com>
7130
7131 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
7132 TYPE_MAX_VALUE is NULL.
7133
b108f48f
JJ
71342014-07-14 Jakub Jelinek <jakub@redhat.com>
7135
7136 PR middle-end/61294
7137 * c.opt (Wmemset-transposed-args): New warning.
7138
c0221884
JM
71392014-07-10 Jason Merrill <jason@redhat.com>
7140
7141 PR c++/61659
7142 PR c++/61687
7143 * c.opt (-fuse-all-virtuals): New.
7144
63dfbb95
RB
71452014-07-09 Richard Biener <rguenther@suse.de>
7146
7147 PR c-family/61741
7148 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
7149 using unsigned arithmetic if overflow does not wrap instead of
7150 if overflow is undefined.
7151
773ec47f
MP
71522014-07-06 Marek Polacek <polacek@redhat.com>
7153
7154 PR c/6940
7155 * c.opt (Wsizeof-array-argument): New option.
7156
00a7ba58
JJ
71572014-07-03 Jakub Jelinek <jakub@redhat.com>
7158
b1726d6c 7159 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
7160 comments->count <= 1, as comments->entries might be NULL.
7161
52ec0ea3
MP
71622014-07-01 Marek Polacek <polacek@redhat.com>
7163
7164 * c.opt (Wint-conversion): New option.
7165
d5c3d343
MP
71662014-07-01 Marek Polacek <polacek@redhat.com>
7167
7168 PR c/58286
7169 * c.opt (Wincompatible-pointer-types): New option.
7170
6e7ceb17
PC
71712014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
7172
7173 PR c++/51400
7174 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
7175 Do not discard TYPE_QUALS of type.
7176
da73100b
JM
71772014-06-26 Jason Merrill <jason@redhat.com>
7178
7179 * c-common.h (enum cxx_dialect): Add cxx1z.
7180 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
7181 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
7182
08eedf75
TJ
71832014-06-26 Teresa Johnson <tejohnson@google.com>
7184
7185 * c-common.h (get_dump_info): Declare.
7186 * c-gimplify.c (c_genericize): Use saved dump files.
7187 * c-opts.c (c_common_parse_file): Begin and end dumps
7188 once around parsing invocation.
7189 (get_dump_info): New function.
7190
7b56b2f8
MP
71912014-06-23 Marek Polacek <polacek@redhat.com>
7192 Andrew MacLeod <amacleod@redhat.com>
7193
7194 PR c/61553
7195 * c-common.c (get_atomic_generic_size): Don't segfault if the
7196 type doesn't have a size.
7197
0e37a2f3
MP
71982014-06-20 Marek Polacek <polacek@redhat.com>
7199
7200 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
7201 (ubsan_walk_array_refs_r): New function.
7202 (c_genericize): Instrument array bounds.
7203 * c-ubsan.c: Include "internal-fn.h".
7204 (ubsan_instrument_division): Mark instrumented arrays as having
7205 side effects. Adjust ubsan_type_descriptor call.
7206 (ubsan_instrument_shift): Likewise.
7207 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
7208 (ubsan_instrument_bounds): New function.
7209 (ubsan_array_ref_instrumented_p): New function.
7210 (ubsan_maybe_instrument_array_ref): New function.
7211 * c-ubsan.h (ubsan_instrument_bounds): Declare.
7212 (ubsan_array_ref_instrumented_p): Declare.
7213 (ubsan_maybe_instrument_array_ref): Declare.
7214
72152014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
7216
7217 PR lto/61123
7218 * c.opt (fshort-enums): Add to LTO.
7219 * c.opt (fshort-wchar): Likewise.
7220
5c3d09f7
MP
72212014-06-16 Marek Polacek <polacek@redhat.com>
7222
7223 PR c/60439
7224 * c.opt (Wswitch-bool): Add Var.
7225
9cf32741
JJ
72262014-06-12 Jakub Jelinek <jakub@redhat.com>
7227
7228 PR middle-end/61486
7229 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
7230 #pragma omp target teams or
7231 #pragma omp {,target }teams distribute simd.
7232
62984918
JM
72332014-06-12 Jason Merrill <jason@redhat.com>
7234
7235 * c.opt (Wabi=, fabi-compat-version): New.
7236 * c-opts.c (c_common_handle_option): Handle -Wabi=.
7237 (c_common_post_options): Handle flag_abi_compat_version default.
7238 Disallow -fabi-compat-version=1.
7239 * c-common.h (abi_version_crosses): New.
7240
f961457f
JH
72412014-06-11 Jan Hubicka <hubicka@ucw.cz>
7242
adfac8df 7243 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
7244 section names that are no longer trees.
7245
92d28cbb
JJ
72462014-06-10 Jakub Jelinek <jakub@redhat.com>
7247
7248 PR fortran/60928
7249 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
7250 (omp_pragmas): ... back here.
7251
742938c9
MP
72522014-06-05 Marek Polacek <polacek@redhat.com>
7253
7254 PR c/49706
7255 * c-common.c (warn_logical_not_parentheses): New function.
7256 * c-common.h (warn_logical_not_parentheses): Declare.
7257 * c.opt (Wlogical-not-parentheses): New option.
7258
9d548dfb
MP
72592014-06-04 Marek Polacek <polacek@redhat.com>
7260
7261 PR c/30020
7262 * c-common.c (check_case_bounds): Add location parameter.
7263 Use it.
7264 (c_add_case_label): Pass loc to check_case_bounds.
7265
fedfecef
MP
72662014-06-03 Marek Polacek <polacek@redhat.com>
7267
7268 PR c/60439
7269 * c.opt (Wswitch-bool): New option.
7270
f6a7cffc
TS
72712014-05-22 Thomas Schwinge <thomas@codesourcery.com>
7272
040d18b6
TS
7273 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
7274 Remove prototypes.
7275 (record_types_used_by_current_var_decl): Move prototype to where
7276 it belongs.
7277
f6a7cffc
TS
7278 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
7279 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
7280 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
7281
632f2871
RS
72822014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
7283
7284 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
7285 * c-common.c (c_common_nodes_and_builtins): Don't initialize
7286 void_zero_node.
7287 * c-pretty-print.c (pp_c_void_constant): New function.
7288 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
7289 (c_pretty_printer::expression): Handle VOID_CST.
7290 * cilk.c (extract_free_variables): Likewise.
7291 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
7292 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
7293
766090c2
TS
72942014-05-17 Trevor Saunders <tsaunders@mozilla.com>
7295
7296 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
7297 * c-pragma.c (push_alignment): Adjust.
7298 (handle_pragma_push_options): Likewise.
7299
661a0813
MP
73002014-05-09 Marek Polacek <polacek@redhat.com>
7301
7302 PR c/50459
7303 * c-common.c (check_user_alignment): Return -1 if alignment is error
7304 node.
7305 (handle_aligned_attribute): Don't call default_conversion on
7306 FUNCTION_DECLs.
7307 (handle_vector_size_attribute): Likewise.
7308 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
7309 (handle_sentinel_attribute): Call default_conversion and allow even
7310 integral types as an argument.
7311
2793eeab
MP
73122014-05-08 Marek Polacek <polacek@redhat.com>
7313
7314 PR c/61053
7315 * c-common.c (min_align_of_type): New function factored out from...
7316 (c_sizeof_or_alignof_type): ...here.
7317 * c-common.h (min_align_of_type): Declare.
7318
f827930a
MP
73192014-05-08 Marek Polacek <polacek@redhat.com>
7320
7321 PR c/61077
7322 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
7323 parameter type of main.
7324
ca49b74e
DD
73252014-05-07 DJ Delorie <dj@redhat.com>
7326
7327 * c-cppbuiltin.c (print_bits_of_hex): New.
7328 (builtin_define_type_minmax): Print values using hex so as not to
7329 require a pre-computed list of string values.
7330
1d60af08
KZ
73312014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
7332 Mike Stump <mikestump@comcast.net>
7333 Richard Sandiford <rdsandiford@googlemail.com>
7334
7335 * c-ada-spec.c: Include wide-int.h.
7336 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
7337 (dump_generic_ada_node): Use wide-int interfaces.
7338 * c-common.c: Include wide-int-print.h.
7339 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
7340 (pointer_int_sum): Use wide-int interfaces.
7341 (c_common_nodes_and_builtins): Use make_int_cst.
7342 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
7343 (handle_alloc_size_attribute): Use wide-int interfaces.
7344 (get_nonnull_operand): Likewise.
7345 * c-format.c (get_constant): Use tree_fits_uhwi_p.
7346 * c-lex.c: Include wide-int.h.
7347 (narrowest_unsigned_type): Take a widest_int rather than two
7348 HOST_WIDE_INTs.
7349 (narrowest_signed_type): Likewise.
7350 (interpret_integer): Update accordingly. Use wide-int interfaces.
7351 (lex_charconst): Use wide-int interfaces.
7352 * c-pretty-print.c: Include wide-int.h.
7353 (pp_c_integer_constant): Use wide-int interfaces.
7354 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
7355 INT_CST_LT_UNSIGNED.
7356
b15458be
RB
73572014-05-06 Richard Biener <rguenther@suse.de>
7358
7359 * c-opts.c (c_common_post_options): For -freestanding,
7360 -fno-hosted and -fno-builtin disable pattern recognition
7361 if not enabled explicitely.
7362
6577374e
MP
73632014-05-02 Marek Polacek <polacek@redhat.com>
7364
7365 * c.opt (Wsizeof-pointer-memaccess): Describe option.
7366
d00887e8
MP
73672014-05-01 Marek Polacek <polacek@redhat.com>
7368
7369 PR c/43245
7370 * c.opt (Wdiscarded-qualifiers): Add.
7371
f8ed5150
MP
73722014-04-30 Marek Polacek <polacek@redhat.com>
7373
7374 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
7375 INT_MIN / -1 sanitization only for integer types.
7376
45484dcf
MP
73772014-04-25 Marek Polacek <polacek@redhat.com>
7378
7379 PR c/18079
7380 * c-common.c (handle_noinline_attribute): Warn if the attribute
7381 conflicts with always_inline attribute.
7382 (handle_always_inline_attribute): Warn if the attribute conflicts
7383 with noinline attribute.
7384
38e514c0
MP
73852014-04-25 Marek Polacek <polacek@redhat.com>
7386
7387 PR c/60156
7388 * c-common.c (check_main_parameter_types): Warn about variadic main.
7389
44875f92
MS
73902014-04-24 Mike Stump <mikestump@comcast.net>
7391
7392 * c.opt (Wshadow-ivar): Default to on.
7393
dcaaa5a0
DP
73942014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
7395
7396 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
7397
c07d7c02
MP
73982014-04-23 Marek Polacek <polacek@redhat.com>
7399
7400 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
7401
1c33c9b7
JJ
74022014-04-22 Jakub Jelinek <jakub@redhat.com>
7403
7404 PR sanitizer/60275
7405 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
7406 if flag_sanitize_undefined_trap_on_error.
7407 (ubsan_instrument_division, ubsan_instrument_shift,
7408 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
7409 if !flag_sanitize_recover.
7410
793c625f
MG
74112014-04-22 Marc Glisse <marc.glisse@inria.fr>
7412
7413 PR libstdc++/43622
7414 * c-common.c (registered_builtin_types): Make non-static.
7415 * c-common.h (registered_builtin_types): Declare.
7416
b0f1bf36 74172014-04-14 Richard Biener <rguenther@suse.de>
ab20d992 7418 Marc Glisse <marc.glisse@inria.fr>
b0f1bf36
RB
7419
7420 PR c/60819
7421 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
7422 apply may-alias the scalar pointer type when applicable.
7423
3b07fa4a
IZ
74242014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
7425
7426 PR middle-end/60467
7427 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
7428 as possible argument for Cilk_spawn.
7429
cbbd2b1c
TB
74302014-04-11 Tobias Burnus <burnus@net-b.de>
7431
7432 PR c/60194
7433 * c.opt (Wformat-signedness): Add
7434 * c-format.c(check_format_types): Use it.
7435
6415bd5d
JM
74362014-04-11 Jason Merrill <jason@redhat.com>
7437
7438 PR c++/57926
7439 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
7440 default_conversion for an array argument.
7441
6525783a
MP
74422014-04-08 Marek Polacek <polacek@redhat.com>
7443
7444 PR sanitizer/60745
7445 * c-ubsan.c: Include asan.h.
7446 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
7447
880a467b
NS
74482014-04-03 Nathan Sidwell <nathan@codesourcery.com>
7449
7450 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
7451
7b59ff2d
MP
74522014-04-02 Marek Polacek <polacek@redhat.com>
7453
7454 * c-common.h (c_expand_expr): Remove declaration.
7455
8edbfaa6
JJ
74562014-03-28 Jakub Jelinek <jakub@redhat.com>
7457
7458 PR c++/60689
7459 * c-common.c (add_atomic_size_parameter): When creating new
7460 params vector, push the size argument first.
7461
07d72e1d
JJ
74622014-03-26 Jakub Jelinek <jakub@redhat.com>
7463
7464 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
7465 ubsan_instrument_vla, ubsan_instrument_return): Adjust
7466 ubsan_create_data callers.
7467
b35e0fa0
JJ
74682014-03-22 Jakub Jelinek <jakub@redhat.com>
7469
7470 PR debug/60603
7471 * c-opts.c (c_finish_options): Restore cb_file_change call to
7472 <built-in>.
7473
39a1ebb3
JJ
74742014-03-13 Jakub Jelinek <jakub@redhat.com>
7475
7476 PR middle-end/36282
7477 * c-pragma.c (apply_pragma_weak): Only look at
7478 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
7479 DECL_ASSEMBLER_NAME_SET_P (decl).
7480 (maybe_apply_pending_pragma_weaks): Exit early if
7481 vec_safe_is_empty (pending_weaks) rather than only when
7482 !pending_weaks.
7483 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
7484 set assembler name back to NULL afterwards.
7485
a07f6ed2
JM
74862014-03-11 Jason Merrill <jason@redhat.com>
7487
7488 * c.opt: Add -std=gnu++14.
7489
75b107f5
IB
74902014-03-11 Ian Bolton <ian.bolton@arm.com>
7491
7492 * c-opts.c (c_common_post_options): Don't override
7493 -ffp-contract=fast if unsafe-math-optimizations is on.
7494
f42c637e
PM
74952014-03-08 Paulo Matos <paulo@matos-sorge.com>
7496
22b15758 7497 * c.opt: Enable LTO FE for fshort-double.
f42c637e 7498
70e24808
JM
74992014-03-07 Jason Merrill <jason@redhat.com>
7500
7501 * c.opt: Add -std=c++14.
7502
3af9c5e9
MP
75032014-03-06 Marek Polacek <polacek@redhat.com>
7504
7505 PR c/60197
7506 * cilk.c (contains_cilk_spawn_stmt): New function.
7507 (contains_cilk_spawn_stmt_walker): Likewise.
7508 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
7509 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
7510
b3bdf019
JJ
75112014-03-03 Jakub Jelinek <jakub@redhat.com>
7512
7513 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
7514 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
7515 even when flag_preprocess_only.
7516
ca7e759d
JM
75172014-02-26 Jason Merrill <jason@redhat.com>
7518
7519 PR c++/59231
7520 PR c++/11586
7521 * c-common.c (shorten_compare): Don't check
7522 c_inhibit_evaluation_warnings.
7523
28e41874
JJ
75242014-02-19 Jakub Jelinek <jakub@redhat.com>
7525
cca615af
JJ
7526 PR c/37743
7527 * c-common.c (c_common_nodes_and_builtins): When initializing
7528 c_uint{16,32,64}_type_node, also set corresponding
7529 uint{16,32,64}_type_node to the same value.
7530
28e41874
JJ
7531 PR c++/60267
7532 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
7533 for PRAGMA_IVDEP if flag_preprocess_only.
7534
c2bf53a1
JJ
75352014-02-12 Jakub Jelinek <jakub@redhat.com>
7536
7537 PR c/60101
7538 * c-common.c (merge_tlist): If copy is true, call new_tlist,
7539 if false, add ADD itself, rather than vice versa.
7540 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
7541 copy. For SAVE_EXPR, only call merge_tlist once.
7542
8fcbce72
JJ
75432014-02-08 Jakub Jelinek <jakub@redhat.com>
7544
7545 PR middle-end/60092
7546 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
7547 and tree_to_uhwi.
7548 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
7549 functions.
7550 (c_common_attribute_table): Add alloc_align and assume_aligned
7551 attributes.
7552
0a756a3f
MP
75532014-02-06 Marek Polacek <polacek@redhat.com>
7554
7555 PR c/60087
7556 * c-common.c (warn_for_sign_compare): Call warning_at with location
7557 instead of warning.
7558
7ec4847a
MP
75592014-02-05 Marek Polacek <polacek@redhat.com>
7560
7561 PR c/53123
7562 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
7563 statement.
7564
66f20604
MP
75652014-02-04 Marek Polacek <polacek@redhat.com>
7566
7567 PR c/60036
7568 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
7569 SAVE_EXPR.
7570
5d77fb19
MG
75712014-02-03 Marc Glisse <marc.glisse@inria.fr>
7572
7573 PR c++/53017
7574 PR c++/59211
7575 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
7576 handle_vector_size_attribute, handle_nonnull_attribute): Call
7577 default_conversion on the attribute argument.
7578 (handle_nonnull_attribute): Increment the argument number.
7579
81e5eca8
MP
75802014-01-31 Marek Polacek <polacek@redhat.com>
7581
7582 PR c/59963
7583 * c-common.c (add_atomic_size_parameter): Pass vNULL to
7584 build_function_call_vec.
7585 (resolve_overloaded_builtin): Likewise.
7586 * c-common.h (build_function_call_vec): Adjust declaration.
7587
68fca595
MP
75882014-01-30 Marek Polacek <polacek@redhat.com>
7589
7590 PR c/59940
7591 * c-common.h (unsafe_conversion_p): Adjust declaration.
7592 (warnings_for_convert_and_check): Likewise.
7593 (convert_and_check): Likewise.
7594 * c-common.c (unsafe_conversion_p): Add location parameter. Call
7595 expansion_point_location_if_in_system_header on it.
7596 (warnings_for_convert_and_check): Add location parameter. Call
7597 expansion_point_location_if_in_system_header on it. Use it.
7598 (convert_and_check): Add location parameter. Use it.
7599 (conversion_warning): Likewise.
7600 (c_add_case_label): Adjust convert_and_check calls.
7601 (scalar_to_vector): Adjust unsafe_conversion_p calls.
7602
b72271b9
BI
76032014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
7604
7605 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
7606 flag_cilkplus.
7607 * c-pragma.c (init_pragma): Likewise.
7608 * c.opt: Likewise.
7609
393e8e8b
MP
76102014-01-23 Marek Polacek <polacek@redhat.com>
7611
7612 PR c/59846
7613 * c-common.c (shorten_compare): Add location_t parameter.
7614 * c-common.h (shorten_binary_op): Adjust declaration.
7615
f04dda30
MP
76162014-01-23 Marek Polacek <polacek@redhat.com>
7617
7618 PR c/58346
7619 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
7620 * c-common.h: Declare it.
7621
621955cb
EB
76222014-01-20 Eric Botcazou <ebotcazou@adacore.com>
7623
7624 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
7625 * c-ada-spec.c (dump_ads): Likewise.
7626 (cpp_check): Likewise.
7627 (dump_ada_specs): Likewise.
7628
76292014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
7630
7631 PR c++/49718
7632 * c-common.c (handle_no_instrument_function_attribute): Allow
7633 no_instrument_function attribute in class member
7634 definition/declaration.
7635
241f845a
JJ
76362014-01-15 Jakub Jelinek <jakub@redhat.com>
7637
7638 PR c/58943
7639 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
7640 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
7641 being COMPOUND_EXPR.
7642 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
7643 operand a SAVE_EXPR and second MODIFY_EXPR.
7644
e83b8e2e
JJ
76452014-01-09 Jakub Jelinek <jakub@redhat.com>
7646
7647 PR target/58115
7648 * c-pch.c (c_common_write_pch): Call
7649 prepare_target_option_nodes_for_pch.
7650
23a5b65a
RS
76512014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7652
7653 Update copyright years
7654
f9030485
RS
76552014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7656
7657 * array-notation-common.c, c-cilkplus.c: Use the standard form for
7658 the copyright notice.
7659
f2aa696b
EB
76602013-12-28 Eric Botcazou <ebotcazou@adacore.com>
7661
7662 * c-ada-spec.c (print_constructor): New function.
7663 (print_destructor): Retrieve the origin of the destructor.
7664 (print_ada_declaration): Revamp handling of constructors/destructors.
7665
3f8257db 76662013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
7667 Bill Maddox <maddox@google.com>
7668 Jason Merrill <jason@redhat.com>
7669
7670 * c.opt: Add -fdeclone-ctor-dtor.
7671 * c-opts.c (c_common_post_options): Default to on iff -Os.
7672
41958c28
BI
76732013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
7674
7675 * c-common.c (c_common_attribute_table): Added "cilk simd function"
7676 attribute.
7677 * c-pragma.h (enum pragma_cilk_clause): Remove.
ab20d992 7678 (enum pragma_omp_clause): Added the following fields:
41958c28
BI
7679 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
7680 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
7681 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
7682 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
7683 PRAGMA_CILK_CLAUSE_UNIFORM.
7684
b1726d6c 7685
12893402
BI
76862013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
7687
7688 * cilk.c (cilk_outline): Made this function non-static.
7689 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
7690 (create_cilk_wrapper): Added a new parameter: a function pointer.
7691 (c_install_body_w_frame_cleanup): Remove
7692 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
7693 * c-common.h (cilk_outline): New prototype.
7694 (gimplify_cilk_spawn): Removed two parameters.
7695 (cilk_install_body_with_frame_cleanup): New prototype.
7696 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
7697 CILK_SPAWN_STMT case.
7698
085b42ed
BS
76992013-12-11 Bernd Schmidt <bernds@codesourcery.com>
7700
2ce064c3
BS
7701 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
7702
085b42ed
BS
7703 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
7704 (int_array_type_node): Remove.
7705 * c-common.c (c_common_nodes_and_builtins): Don't build it.
7706
9e36c9ed
MP
77072013-12-05 Marek Polacek <polacek@redhat.com>
7708
7709 PR c/52023
7710 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
7711 [ADJUST_FIELD_ALIGN].
7712
296674db
JM
77132013-12-04 Joseph Myers <joseph@codesourcery.com>
7714
7715 PR c/52023
7716 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
7717 and check field alignment if set.
7718 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
7719 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
7720
b1726d6c 77212013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
7722 Marek Polacek <polacek@redhat.com>
7723
7724 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
7725 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
7726
d7947e19
L
77272013-11-29 H.J. Lu <hongjiu.lu@intel.com>
7728
7729 PR c/59309
7730 * cilk.c (gimplify_cilk_spawn): Properly handle function without
7731 arguments.
7732
fad7652e
JJ
77332013-11-29 Jakub Jelinek <jakub@redhat.com>
7734
7735 PR c/59280
7736 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
7737 goto invalid. If it is error_mark_node, don't issue further
7738 diagnostics.
7739
8b5e1202
SO
77402013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
7741
7742 * c.opt (Wopenmp-simd): New.
7743
0a508bb6
JJ
77442013-11-22 Jakub Jelinek <jakub@redhat.com>
7745
7746 * c-ubsan.h (ubsan_instrument_return): New prototype.
7747 * c-ubsan.c (ubsan_instrument_return): New function.
7748
2fb9a547
AM
77492013-11-22 Andrew MacLeod <amacleod@redhat.com>
7750
7751 * c-common.c: Add required include files from gimple.h.
ab20d992
JJ
7752 * c-gimplify.c: Likewise.
7753 * cilk.c: Likewise.
2fb9a547 7754
8400e75e
DM
77552013-11-22 David Malcolm <dmalcolm@redhat.com>
7756
7757 * c-common.c (unsafe_conversion_p): Remove use of
7758 EXPR_LOC_OR_HERE macro.
7759 (conversion_warning): Likewise.
7760 (warnings_for_convert_and_check): Likewise.
7761 (warn_for_collisions_1): Likewise.
7762 (shorten_compare): Likewise, and remove use of in_system_header
7763 macro, using the location from the former.
7764 * c-lex.c (dump_one_header): Remove use of input_filename macro.
7765 (cb_def_pragma): Remove use of in_system_header macro.
7766 (lex_string): Likewise.
7767 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
7768
eb1ce453
KZ
77692013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
7770 Mike Stump <mikestump@comcast.net>
7771 Richard Sandiford <rdsandiford@googlemail.com>
7772
7773 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
7774 instead of TREE_INT_CST_LOW, in cases where there is a protecting
7775 tree_fits_shwi_p or tree_fits_uhwi_p.
7776 (dump_generic_ada_node): Likewise.
7777 * c-format.c (check_format_arg): Likewise.
7778 * c-pretty-print.c (pp_c_integer_constant): Likewise.
7779
6b3b8c27
KZ
77802013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
7781
7782 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
7783
49b0aa18
JC
77842013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
7785
7786 PR c/53001
7787 * c-common.c (unsafe_conversion_p): Make this function
7788 return an enumeration with more detail.
7789 (conversion_warning): Use the new return type of
7790 unsafe_conversion_p to separately warn either about conversions
7791 that lower floating point number precision or about the other
7792 kinds of conversions.
7793 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
7794 (unsafe_conversion_p): switching return type to
7795 conversion_safety enumeration.
49b0aa18
JC
7796 * c.opt: Adding new warning -Wfloat-conversion and
7797 enabling it with -Wconversion.
7798
b826515a
BS
77992013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
7800
8e745a17
JJ
7801 * c-opts.c: Include plugin.h.
7802 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 7803
b9a55b13
MP
78042013-11-19 Marek Polacek <polacek@redhat.com>
7805
7806 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
7807 call.
7808 (ubsan_instrument_shift): Likewise.
7809 (ubsan_instrument_vla): Likewise.
7810
7d362f6c
RS
78112013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7812
7813 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
7814 cast to unsigned type.
7815
386b1f1f
RS
78162013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7817
7818 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
7819 tree_low_cst.
7820 (complete_array_type): Update comment to refer to tree_to_[su]hwi
7821 rather than tree_low_cst.
7822
ae7e9ddd
RS
78232013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7824
7825 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
7826 tree_to_uhwi throughout.
7827
9439e9a1
RS
78282013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7829
7830 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
7831 tree_low_cst (..., 0) with tree_to_shwi throughout.
7832
cc269bb6
RS
78332013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7834
7835 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
7836 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
7837
9541ffee
RS
78382013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7839
7840 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
7841 host_integerp (..., 0) with tree_fits_shwi_p throughout.
7842
c02065fc
AH
78432013-11-15 Aldy Hernandez <aldyh@redhat.com>
7844
7845 * c-cilkplus.c: New file.
7846 * c-common.c (readonly_error): Add location argument.
7847 * c-common.h (readonly_error): Same.
7848 (c_finish_cilk_clauses): Protoize.
7849 (c_check_cilk_loop): Same.
7850 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
7851 Do not fail on error_mark_node.
7852 Abstract increment canonicalization to here...
7853 (c_omp_for_incr_canonicalize_ptr): New.
7854 c-pragma.c (init_pragma): Register "simd" pragma.
7855 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
7856 (enum pragma_cilk_clause): New.
7857
9cc65f15
RS
78582013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
7859
7860 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
7861 wchar_type and host_integerp checks.
7862
18f429e2
AM
78632013-11-14 Andrew MacLeod <amacleod@redhat.com>
7864
7865 * c-common.c: Likewise.
7866 * c-gimplify.c: Likewise.
7867 * cilk.c: Likewise.
7868
d8a2d370
DN
78692013-11-14 Diego Novillo <dnovillo@google.com>
7870
7871 * c-common.c: Include fold-const.h.
7872 Include stor-layout.h.
7873 Include calls.h.
7874 Include stringpool.h.
7875 Include attribs.h.
7876 Include varasm.h.
7877 Include trans-mem.h.
7878 * c-cppbuiltin.c: Include stor-layout.h.
7879 Include stringpool.h.
7880 * c-format.c: Include stringpool.h.
7881 * c-lex.c: Include stringpool.h.
7882 Include stor-layout.h.
7883 * c-pragma.c: Include stringpool.h.
7884 Include attribs.h.
7885 Include varasm.h.
7886 Include gcc-symtab.h.
7887 * c-pretty-print.c: Include stor-layout.h.
7888 Include attribs.h.
7889 * cilk.c: Include stringpool.h.
7890 Include calls.h.
7891
38b7bc7f
JM
78922013-11-13 Joseph Myers <joseph@codesourcery.com>
7893
7894 * c-common.h (enum rid): Add RID_AUTO_TYPE.
7895 * c-common.c (c_common_reswords): Add __auto_type.
7896 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
7897
45b0be94
AM
78982013-11-12 Andrew MacLeod <amacleod@redhat.com>
7899
18f429e2
AM
7900 * c-common.c: Include gimplify.h.
7901 * c-gimplify.c: Likewise.
7902 * cilk.c: Likewise.
7903 * c-omp.c: Include gimple-expr.h instead of gimple.h.
7904 * c-ubsan.c: Don't include gimple.h.
45b0be94 7905
582d9b50
JM
79062013-11-12 Joseph Myers <joseph@codesourcery.com>
7907
7908 * c-common.c (c_common_reswords): Add _Thread_local.
7909
6b28e197
JM
79102013-11-09 Joseph Myers <joseph@codesourcery.com>
7911
7912 * c-common.c (atomic_size_supported_p): New function.
7913 (resolve_overloaded_atomic_exchange)
7914 (resolve_overloaded_atomic_compare_exchange)
7915 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
7916 Use it instead of comparing size with a local list of sizes.
7917
267bac10
JM
79182013-11-07 Andrew MacLeod <amacleod@redhat.com>
7919 Joseph Myers <joseph@codesourcery.com>
7920
7921 * c-common.h (enum rid): Add RID_ATOMIC.
7922 * c-common.c (c_common_reswords): Add _Atomic.
7923 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
7924 (keyword_is_type_qualifier): Accept RID_ATOMIC.
7925 * c-format.c (check_format_types): Check for extra _Atomic
7926 qualifiers in format argument.
7927 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
7928 (pp_c_type_qualifier_list): Mention _Atomic in comment.
7929
5157b91e
TB
79302013-11-06 Tobias Burnus <burnus@net-b.de>
7931
7932 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
7933
6dbe0958
JM
79342013-11-06 Joseph Myers <joseph@codesourcery.com>
7935
7936 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
7937 standards modes.
7938 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
7939 to mean lack of IEEE 754 support.
7940
e8ff5196
TB
79412013-11-05 Tobias Burnus <burnus@net-b.de>
7942
7943 * c.opt (-Wdate-time): New option
7944 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
7945
254a0760
JM
79462013-11-05 Joseph Myers <joseph@codesourcery.com>
7947
7948 * c-cppbuiltin.c (cpp_iec_559_value): Test
7949 flag_excess_precision_cmdline not flag_excess_precision.
7950
6d7f7e0a
TB
79512013-11-05 Tobias Burnus <burnus@net-b.de>
7952
7953 * c.opt (fopenmp-simd): New option.
7954 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
7955 (omp_pragmas): ... this new struct.
7956 (c_pp_lookup_pragma): Also walk omp_pragmas.
7957 (init_pragma): Init pragmas for -fopenmp-simd.
7958
55a7f02f
MP
79592013-11-04 Marek Polacek <polacek@redhat.com>
7960
7961 PR c++/58979
7962 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
7963
9193fb05
JM
79642013-11-04 Joseph Myers <joseph@codesourcery.com>
7965
7966 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
7967 New functions.
7968 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
7969
94159ecf
EB
79702013-11-04 Eric Botcazou <ebotcazou@adacore.com>
7971
7972 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
7973 (dump_ada_specs): Adjust prototype of second callback.
7974 * c-ada-spec.c (cpp_check): New global variable.
7975 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
7976 (print_generic_ada_decl): Likewise.
7977 (has_static_fields): Change return type to bool and add guard.
7978 (has_nontrivial_methods): New predicate.
7979 (is_tagged_type): Change return type to bool.
7980 (separate_class_package): Call has_nontrivial_methods.
7981 (pp_ada_tree_identifier): Minor tweaks.
7982 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
7983 (dump_ada_array_domains): Likewise.
7984 (dump_ada_array_type): Likewise.
7985 (dump_template_types): Remove cpp_check parameter and do not pass it to
7986 dump_generic_ada_node.
7987 (dump_ada_template): Likewise.
7988 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
7989 recursively.
7990 (print_ada_methods): Change return type to integer. Remove cpp_check
7991 parameter and do not pass it down.
7992 (dump_nested_types): Remove cpp_check parameter and do not pass it to
7993 dump_generic_ada_node.
7994 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
7995 accessing methods.
7996 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
7997 down. Use has_nontrivial_methods to recognize C++ classes. Use return
7998 value of print_ada_methods.
7999 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
8000 Set cpp_check to it before invoking dump_ada_nodes.
8001 (dump_ada_specs): Likewise.
8002
b906f4ca
MP
80032013-11-03 Marek Polacek <polacek@redhat.com>
8004
8005 * c-ubsan.c: Don't include hash-table.h.
8006 (ubsan_instrument_vla): New function.
8007 * c-ubsan.h: Declare it.
8008
5e20cdc9
DM
80092013-10-31 David Malcolm <dmalcolm@redhat.com>
8010
8011 Automated part of renaming of symtab_node_base to symtab_node.
8012
8013 Patch autogenerated by rename_symtab.py from
8014 https://github.com/davidmalcolm/gcc-refactoring-scripts
8015 revision 58bb219cc090b2f4516a9297d868c245495ee622
8016
8017 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
8018 symtab_node_base to symtab_node.
8019
7057e645
ESR
80202013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
8021
8e745a17 8022 Implement C++14 digit separators.
7057e645
ESR
8023 * c-lex.c (interpret_float): Remove digit separators from scratch string
8024 before building real literal.
8025
193ea7bc
JJ
80262013-10-30 Jakub Jelinek <jakub@redhat.com>
8027
8028 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
8029
939b37da
BI
80302013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
8031
8032 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
8033 fields.
8034 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
8035 enabled.
8036 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
8037 (insert_cilk_frame): New prototype.
8038 (cilk_init_builtins): Likewise.
8039 (gimplify_cilk_spawn): Likewise.
8040 (c_cilk_install_body_w_frame_cleanup): Likewise.
8041 (cilk_detect_spawn_and_unwrap): Likewise.
8042 (cilk_set_spawn_marker): Likewise.
8043 (build_cilk_sync): Likewise.
8044 (build_cilk_spawn): Likewise.
8045 * cilk.c: New file.
8046
67348ccc
DM
80472013-10-29 David Malcolm <dmalcolm@redhat.com>
8048
8049 Patch autogenerated by refactor_symtab.py from
8050 https://github.com/davidmalcolm/gcc-refactoring-scripts
8051 revision 58bb219cc090b2f4516a9297d868c245495ee622
8052
8053 * c-gimplify.c (c_genericize): Update for conversion of symtab types
8054 to a true class hierarchy.
8055 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
8056
d570872d
RS
80572013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
8058
8059 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
8060
98906124
JL
80612013-10-26 Jeff Law <law@redhat.com>
8062
adfac8df
JJ
8063 * c-common.c (c_define_builtins): Remove mudflap support.
8064 * c.opt: Ignore and warn for mudflap options.
98906124 8065
d73749df 80662013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
8067
8068 PR other/33426
8069 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
8070 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
8071
3f04b1bb
JM
80722013-10-23 Jason Merrill <jason@redhat.com>
8073
8074 * c-format.c (gcc_cxxdiag_char_table): Add %X.
8075
acf0174b
JJ
80762013-10-11 Jakub Jelinek <jakub@redhat.com>
8077
acd15a28
JJ
8078 * c-common.h (omp_clause_mask::operator !=): New method.
8079 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
8080 instead of if (mask & something) tests everywhere.
8081
acf0174b
JJ
8082 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
8083 201307 instead of 201107.
8084 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
8085 (c_common_attribute_table): Add "omp declare target" and
8086 "omp declare simd" attributes.
8087 (handle_omp_declare_target_attribute,
8088 handle_omp_declare_simd_attribute): New functions.
8089 * c-omp.c: Include c-pragma.h.
8090 (c_finish_omp_taskgroup): New function.
8091 (c_finish_omp_atomic): Add swapped argument, if true,
8092 build the operation first with rhs, lhs arguments and use NOP_EXPR
8093 build_modify_expr.
8094 (c_finish_omp_for): Add code argument, pass it down to make_code.
8095 (c_omp_split_clauses): New function.
8096 (c_split_parallel_clauses): Removed.
8097 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
8098 c_omp_declare_simd_clauses_to_decls): New functions.
8099 * c-common.h (omp_clause_mask): New type.
8100 (OMP_CLAUSE_MASK_1): Define.
8101 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
8102 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
8103 omp_clause_mask::operator |, omp_clause_mask::operator &,
8104 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
8105 omp_clause_mask::operator ==): New methods.
8106 (enum c_omp_clause_split): New.
8107 (c_finish_omp_taskgroup): New prototype.
8108 (c_finish_omp_atomic): Add swapped argument.
8109 (c_finish_omp_for): Add code argument.
8110 (c_omp_split_clauses): New prototype.
8111 (c_split_parallel_clauses): Removed.
8112 (c_omp_declare_simd_clauses_to_numbers,
8113 c_omp_declare_simd_clauses_to_decls): New prototypes.
8114 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
8115 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
8116 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
8117 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
8118 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
8119 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
8120 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
8121 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
8122 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
8123 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
8124 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
8125 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
8126 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
8127 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
8128 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
8129 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
8130 PRAGMA_OMP_CLAUSE_UNIFORM.
8131
826cacfe
MG
81322013-10-09 Marc Glisse <marc.glisse@inria.fr>
8133
8134 PR tree-optimization/20318
8135 * c-common.c (handle_returns_nonnull_attribute): New function.
8136 (c_common_attribute_table): Add returns_nonnull.
8137
2284b034
MG
81382013-10-03 Marc Glisse <marc.glisse@inria.fr>
8139
8140 PR c++/19476
8141 * c.opt (fcheck-new): Move to common.opt.
8142
b56e9788
MP
81432013-09-25 Marek Polacek <polacek@redhat.com>
8144 Jakub Jelinek <jakub@redhat.com>
8145
8146 PR sanitizer/58413
8147 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
8148 an expression if we can prove it is correct.
8149 (ubsan_instrument_division): Likewise. Remove unnecessary
8150 check.
8151
ce6923c5
MP
81522013-09-18 Marek Polacek <polacek@redhat.com>
8153
8154 PR sanitizer/58411
8155 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
8156 Declare it.
8157 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
8158
fb5610fb
IS
81592013-09-14 Iain Sandoe <iain@codesourcery.com>
8160
8161 PR target/48094
8162 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
8163 fobjc-gc, freplace-objc-classes): Accept for LTO.
8164
88b0e79e
JC
81652013-09-13 Jacek Caban <jacek@codeweavers.com>
8166
8167 * c-target.def: New hook
8168
c9b0866a
PC
81692013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
8170
8171 PR c++/43452
8172 * c.opt (Wdelete-incomplete): Add.
8173
0af94e6f
JR
81742013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
8175
8176 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
8177 (vector_types_compatible_elements_p): New function.
8178 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
8179 declaration.
8180 (vector_types_compatible_elements_p): Declare.
8181
7c26172c
GDR
81822013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8183
8184 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
8185 a virtual member function.
8186 (pp_simple_type_specifier): Remove.
8187 (pp_c_type_specifier): Likewise.
8188 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
8189 Rename from pp_c_type_specifier. Adjust.
8190 (c_pretty_printer::c_pretty_printer): Do not assign to
8191 simple_type_specifier.
8192
20059c8b
GDR
81932013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8194
8195 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
8196 member function.
8197 (c_pretty_printer::storage_class_specifier): Likewise.
8198 (c_pretty_printer::initializer): Likewise.
8199 (pp_declaration): Remove.
8200 (pp_declaration_specifiers): Likewise.
8201 (pp_abstract_declarator): Likewise.
8202 (pp_declarator): Likewise.
8203 (pp_type_id): Likewise.
8204 (pp_statement): Likewise.
8205 (pp_constant): Likewise.
8206 (pp_id_expression): Likewise.
8207 (pp_primary_expression): Likewise.
8208 (pp_unary_expression): Likewise.
8209 (pp_multiplicative_expression): Likewise.
8210 (pp_conditional_expression): Likewise.
8211 (pp_assignment_expression): Likewise.
8212 (pp_expression): Likewise.
8213 (pp_c_type_id): Likewise.
8214 (pp_c_storage_class_specifier): Likewise.
8215 * c-pretty-print.c (pp_c_type_cast): Tidy.
8216 (pp_c_pointer): Likewise.
8217 (pp_c_type_specifier): Likewise.
8218 (pp_c_parameter_type_list): Likewise.
8219 (pp_c_function_definition): Likewise.
8220 (pp_c_init_declarator): Likewise.
8221 (pp_c_initializer_list): Likewise.
8222 (pp_c_constructor_elts): Likewise.
8223 (c_pretty_printer::direct_abstract_declarator): Likewise.
8224 (c_pretty_printer::declaration_specifiers): Likewise.
8225 (c_pretty_printer::primary_expression): Likewise.
8226 (c_pretty_printer::postfix_expression): Likewise.
8227 (c_pretty_printer::type_id): Rename from pp_c_type_id.
8228 (c_pretty_printer::storage_class_specifier): Rename from
8229 pp_c_storage_class_specifier.
8230 (c_pretty_printer::initializer): Rename from pp_c_initializer.
8231 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
8232 storage_class_specifier, initializer, offset_list, flags.
8233
de5a5fa1
MP
82342013-08-30 Marek Polacek <polacek@redhat.com>
8235
8236 * c-ubsan.c: New file.
8237 * c-ubsan.h: New file.
8238
8f0e4d72
GDR
82392013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
8240
8241 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
8242 member function.
8243 (c_pretty_printer::declaration_specifiers): Likewise.
8244 (c_pretty_printer::declarator): Likewise.
8245 (c_pretty_printer::abstract_declarator): Likewise.
8246 (c_pretty_printer::direct_abstract_declarator): Likewise.
8247 (c_pretty_printer::direct_declarator): Likewise.
8248 (c_pretty_printer::function_specifier): Likewise.
8249 (pp_declaration): Adjust.
8250 (pp_declaration_specifiers): Likewise.
8251 (pp_abstract_declarator): Likewise.
8252 (pp_direct_declarator): Likewise.
8253 (pp_function_specifier): Likewise.
8254 (pp_direct_abstract_declarator): Remove as unused.
8255 (pp_c_declaration): Remove.
8256 (pp_c_declaration_specifiers): Likewise.
8257 (pp_c_declarator): Likewise.
8258 (pp_c_direct_declarator): Likewise.
8259 (pp_c_function_specifier): Likewise.
8260 (pp_c_direct_abstract_declarator): Likewise.
8261 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
8262 from pp_c_abstract_declarator. Adjust.
ab20d992 8263 (c_pretty_printer::direct_abstract_declarator): Rename from
8f0e4d72
GDR
8264 pp_c_direct_abstract_declarator. Adjust.
8265 (c_pretty_printer::function_specifier): Rename from
8266 pp_c_function_specifier. Adjust.
8267 (c_pretty_printer::declaration_specifiers): Rename from
8268 pp_c_declaration_specifiers. Adjust.
8269 (c_pretty_printer::direct_declarator): Rename from
8270 pp_c_direct_declarator. Adjust.
8271 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
8272 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
8273 (c_pretty_printer::c_pretty_printer): Do not assign to
8274 declaration, declaration_specifiers, declarator,
8275 direct_declarator, direct_abstract_declarator, function_specifier.
8276
00d34d3a
GDR
82772013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
8278
8279 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
8280 virtual member function.
8281 (c_pretty_printer::multiplicative_expression): Likewise.
8282 (c_pretty_printer::conditional_expression): Likewise.
8283 (c_pretty_printer::assignment_expression): Likewise.
8284 (c_pretty_printer::expression): Likewise.
8285 (pp_unary_expression): Adjust.
8286 (pp_multiplicative_expression): Likewise.
8287 (pp_assignment_expression): Likewise.
8288 (pp_conditional_expression): Likewise.
8289 (pp_expression): Likewise.
8290 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
8291 from pp_c_unary_expression. Adjust.
8292 (c_pretty_printer::multiplicative_expression): Rename from
8293 pp_c_multiplicative_expression. Adjust.
8294 (c_pretty_printer::conditional_expression): Rename from
8295 pp_c_conditional_expression. Adjust.
8296 (c_pretty_printer::assignment_expression): Rename from
8297 pp_c_assignment_expression. Adjust.
8298 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
8299 (c_pretty_printer::c_pretty_printer): Do not assign to
8300 unary_expression, multiplicative_expression,
8301 conditional_expression, expression.
8302
fb22178f
GDR
83032013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8304
8305 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
8306 virtual member function.
8307 (pp_postfix_expression): Adjust.
8308 (pp_c_postfix_expression): Remove.
8309 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
8310 from pp_c_postfix_expression. Adjust.
8311 (c_pretty_printer::c_pretty_printer): Do not assign to
8312 postfix_expression.
8313
7ecc2600
GDR
83142013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8315
8316 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
8317 virtua member function.
8318 (pp_primary_expression): Adjust.
8319 (pp_c_primary_expression): Remove.
8320 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
8321 from pp_c_primary_expression. Adjust.
8322 (pp_c_initializer_list): Use pp_primary_expression.
8323 (c_pretty_printer::c_pretty_printer): Do not assign to
8324 primary_expression.
8325
0691175f
GDR
83262013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8327
8328 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
8329 * c-pretty-print.c (M_): Remove.
8330 (c_pretty_printer::translate_string): Define.
8331 (pp_c_type_specifier): Use it.
8332 (pp_c_primary_expression): Likewise.
8333 (pp_c_expression): Likewise.
8334
66dfe4c4
GDR
83352013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
8336
8337 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
8338 virtual function.
8339 (pp_c_id_expression): Remove.
8340 (pp_id_expression): Adjust.
8341 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
8342 pp_c_id_expression. Adjust.
8343 (pp_c_postfix_expression): Use pp_id_expression.
8344 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
8345
ca43e9d5
GDR
83462013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
8347
8348 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
8349 member function.
8350 (pp_constant): Adjust.
8351 (pp_c_constant): Remove.
8352 * c-pretty-print.c (c_pretty_printer::constant): Rename from
8353 pp_c_constant. Adjust.
8354 (pp_c_constant)
8355 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
8356 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
8357
da6ca2b5
GDR
83582013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8359
8360 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
8361 (c_pretty_printer::c_pretty_printer): Declare.
8362 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
8363 c_pretty_printer_init. Adjust.
8364 (print_c_tree): Do not call c_pretty_printer_init.
8365 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
8366
65a372f4
AC
83672013-08-09 Arnaud Charlet <charlet@adacore.com>
8368
8369 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
8370
fd9b0f32
PC
83712013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
8372
8373 PR c++/58080
8374 * c-common.c (pointer_int_sum): Add bool parameter.
8375 * c-common.h (pointer_int_sum): Adjust declaration.
8376
e0aec1e9
GDR
83772013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
8378
8379 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
8380 c_pretty_printer variable.
8381
b066401f
GDR
83822013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8383
8384 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
8385 (pp_base): Remove.
8386 (pp_c_base): Likewise. Adjust users.
8387 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
8388 (pp_c_whitespace): Do not call pp_base.
8389 (pp_c_left_paren): Likewise.
8390 (pp_c_right_paren): Likewise.
8391 (pp_c_left_brace): Likewise.
8392 (pp_c_right_brace): Likewise.
8393 (pp_c_left_bracket): Likewise.
8394 (pp_c_right_bracket): Likewise.
8395 (pp_c_dot): Likewise.
8396 (pp_c_ampersand): Likewise.
8397 (pp_c_star): Likewise.
8398 (pp_c_arrow): Likewise.
8399 (pp_c_semicolon): Likewise.
8400 (pp_c_complement): Likewise.
8401 (pp_c_exclamation): Likewise.
8402 (pp_c_direct_declarator): Likewise.
8403 (pp_c_ws_string): Likewise.
8404 (pp_c_identifier): Likewise.
8405 (pp_c_statement): Likewise.
8406 (print_c_tree): Likewise.
8407
65e5a578
ESR
84082013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
8409
8410 PR c++/58072
8411 * c-common.c (c_parse_error): Catch user-defined literal tokens and
8412 provide useful error strings.
8413
137a1a27
GDR
84142013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8415
8416 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
8417 printer functions instead of pp_string or operators and punctuators.
8418 (dump_generic_ada_node): Likewise.
8419 * c-pretty-print.c (pp_c_type_specifier): Likewise.
8420 (pp_c_relational_expression): Likewise.
8421 (pp_c_logical_or_expression): Likewise.
8422
07838b13
GDR
84232013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8424
8425 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
8426 functions instead of pp_character.
8427 (pp_ada_tree_identifier): Likewise.
8428 (dump_ada_double_name): Likewise.
8429 (dump_ada_function_declaration): Likewise.
8430 (dump_ada_array_domains): Likewise.
8431 (dump_template_types): Likewise.
8432 (dump_generic_ada_node): Likewise.
8433 (print_ada_declaration): Likewise.
8434 (print_ada_struct_decl): Likewise.
8435 * c-pretty-print.c (pp_c_integer_constant): Likewise.
8436
433cc7b0
TT
84372013-07-23 Tom Tromey <tromey@redhat.com>
8438
8439 * c-common.h (enum rid) <RID_GENERIC>: New constant.
8440 * c-common.c (c_common_reswords): Add _Generic.
8441
688010ba
OB
84422013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
8443
8444 * c-common.c: Fix typos.
8445 * c-common.h: Likewise.
8446
2a99e5e6
LL
84472013-07-13 Lubos Lunak <l.lunak@suse.cz>
8448
8449 PR c++/55203
8450 * c-common.c (c_common_attribute_table): Add warn_unused.
8451 (handle_warn_unused_attribute): New.
8452
c26302d5
JJ
84532013-07-10 Jakub Jelinek <jakub@redhat.com>
8454
8455 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
8456 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
8457
dfeadaa0
PC
84582013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
8459
8460 PR c++/57869
8461 * c.opt: Add Wconditionally-supported.
8462
6a2fa4b2
GS
84632013-07-08 Graham Stott <graham.stott@btinternet.com>
8464
adfac8df 8465 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
8466 unused variables l_length and l_node.
8467
ecdbd01a 84682013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
8469
8470 PR c/57821
8471 * c-common.c (complete_array_type): Delay folding first index
8472 like other indices. When folding, check for index overflow.
8473
bedc293e
MG
84742013-06-27 Marc Glisse <marc.glisse@inria.fr>
8475
8476 PR c++/57509
8477 * c-common.h (c_build_vec_perm_expr): New complain argument.
8478 * c-common.c (c_build_vec_perm_expr): Likewise.
8479 Use save_expr also in C++.
8480
604b2bfc
GDR
84812013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8482
8483 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
8484 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
8485 * c-opts.c (c_common_post_options): Likewise.
8486
dfeadaa0 84872013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
8488
8489 * array-notation-common.c (length_mismatch_in_expr): Changed the
8490 parameter type's from a dynamic array to a vec_tree. Also removed
8491 the size parameters.
8492 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
8493 the change above.
8494
2ce86d2e
BI
84952013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
8496
8497 * c-common.h (struct cilkplus_an_parts): New structure.
8498 (struct cilkplus_an_loop_parts): Likewise.
8499 (cilkplus_extract_an_triplets): New prototype.
8500 (fix_sec_implicit_args): Likewise.
8501 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
8502 (fix_sec_implicit_args): Likewise.
604b2bfc 8503
07a6825b
BI
85042013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
8505
8506 * array-notation-common.c (find_inv_trees): Removed an unwanted
8507 typecasting.
8508 * c-common.h (struct inv_list::additional_tcodes): Changed type from
8509 enum rid to enum tree_code.
8510
08346abd
JH
85112013-06-11 Jan Hubicka <jh@suse.cz>
8512
8513 * c-common.c (handle_alias_ifunc_attribute): Do not set
8514 DECL_EXTERNAL for weakref variables.
8515 * c-pragma.c (handle_pragma_weak): Make sure aliases
8516 are not declared as external.
8517
d60f1706
BI
85182013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8519
8520 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
8521 function from c/c-array-notation.c.
8522 (is_cilkplus_reduce_builtin): Likewise.
8523 (find_rank): Likewise.
8524 (extract_array_notation_exprs): Likewise.
8525 (replace_array_notations): Likewise.
8526 (find_inv_trees): Likewise.
8527 (replace_inv_trees): Likewise.
8528 (contains_array_notation_expr): Likewise.
8529 (find_correct_array_notation_type): Likewise.
8530 * c-common.h (struct inv_list): Moved this struct from the file
8531 c/c-array-notation.c and added a new field called additional tcodes.
8532 (length_mismatch_in_expr_p): New prototype.
8533 (is_cilkplus_reduce_builtin): Likewise.
8534 (find_rank): Likewise.
8535 (extract_array_notation_exprs): Likewise.
8536 (replace_array_notation): Likewise.
8537 (find_inv_trees): Likewise.
8538 (replace_inv_trees): Likewise.
8539 (find_correct_array_notation_type): Likewise.
dfeadaa0 8540
36536d79
BI
85412013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8542
8543 * c-common.c (c_define_builtins): When cilkplus is enabled, the
8544 function array_notation_init_builtins is called.
8545 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
8546 * c-common.def (ARRAY_NOTATION_REF): New tree.
8547 * c-common.h (build_array_notation_expr): New function declaration.
8548 (build_array_notation_ref): Likewise.
8549 (extract_sec_implicit_index_arg): New extern declaration.
8550 (is_sec_implicit_index_fn): Likewise.
8551 (ARRAY_NOTATION_CHECK): New define.
8552 (ARRAY_NOTATION_ARRAY): Likewise.
8553 (ARRAY_NOTATION_START): Likewise.
8554 (ARRAY_NOTATION_LENGTH): Likewise.
8555 (ARRAY_NOTATION_STRIDE): Likewise.
8556 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
8557 ARRAY_NOTATION_REF.
8558 (pp_c_expression): Likewise.
8559 * c.opt (flag_enable_cilkplus): New flag.
8560 * array-notation-common.c: New file.
8561
f7716d57
JJ
85622013-05-14 Jakub Jelinek <jakub@redhat.com>
8563
8564 PR c++/57274
8565 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
8566
a5e0cd1d
MG
85672013-05-10 Marc Glisse <marc.glisse@inria.fr>
8568
8569 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
8570 vectors.
8571
f6bc1c4a
HS
85722013-05-07 Han Shen <shenhan@google.com>
8573
8574 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
8575
3f12f6e9
SKS
85762013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
8577
8578 * c-common.c (check_user_alignment): Emit error for negative values.
8579
61949153
PC
85802013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8581
8582 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
8583
e93e18e9
PC
85842013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8585
8586 * c-cppbuiltin.c (c_cpp_builtins): Do not define
8587 __GXX_EXPERIMENTAL_CXX1Y__.
8588
44d90fe1 85892013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 8590 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
8591
8592 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
8593 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
8594 to simply use OPT_Wpointer_arith.
8595 (c_sizeof_or_alignof_type): Likewise.
8596
13f39b2e
PC
85972013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8598
8599 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
8600
4b84d650
JJ
86012013-04-12 Jakub Jelinek <jakub@redhat.com>
8602
8603 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
8604 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
8605 specifiers.
8606
fb037b5d
SB
86072013-04-07 Steven Bosscher <steven@gcc.gnu.org>
8608
8609 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
8610
4e856798
PC
86112013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
8612
8613 * c-common.c (pointer_int_sum): Remove dead code.
8614
4b1baac8
RS
86152013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
8616
8617 PR middle-end/56524
8618 * c-common.c (handle_optimize_attribute): Don't call
8619 save_optabs_if_changed.
8620
0b50e654
JJ
86212013-03-05 Jakub Jelinek <jakub@redhat.com>
8622
8623 PR middle-end/56461
8624 * c-pch.c (pch_init): Free target_validity at the end.
8625
48c41403
JJ
86262013-03-04 Jakub Jelinek <jakub@redhat.com>
8627
8628 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
8629
e664c61c
KS
86302013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
8631 Jakub Jelinek <jakub@redhat.com>
8632
8633 PR sanitizer/56454
8634 * c-common.c (handle_no_sanitize_address_attribute): New function.
8635 (c_common_attribute_table): Add no_sanitize_address attribute.
8636 (handle_no_address_safety_analysis_attribute): Add
8637 no_sanitize_address attribute, not no_address_safety_analysis
8638 attribute.
8639
a475fd3d 86402013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
8641
8642 PR target/52555
8643 * c-common.c (handle_optimize_attribute): Call
8644 save_optabs_if_changed.
8645
f6007d99
JJ
86462013-02-18 Jakub Jelinek <jakub@redhat.com>
8647 Steven Bosscher <steven@gcc.gnu.org>
8648
8649 PR pch/54117
8650 * c-opts.c (c_common_post_options): If debug info is enabled
8651 and non-dwarf*, refuse to load PCH files and when writing PCH
8652 file warn.
8653
cf35e2b1
JJ
86542013-02-05 Jakub Jelinek <jakub@redhat.com>
8655
8656 PR middle-end/56167
8657 * c-common.c (handle_error_attribute): Fix condition.
8658
32887460
JJ
86592013-01-30 Jakub Jelinek <jakub@redhat.com>
8660
8661 PR c++/55742
8662 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
8663
5af057d8
JM
86642013-01-18 Jason Merrill <jason@redhat.com>
8665
8666 PR target/54908
8667 * c.opt (-fextern-tls-init): New.
8668 * c-opts.c (c_common_post_options): Handle it.
8669
cc83c823
JJ
86702013-01-09 Jakub Jelinek <jakub@redhat.com>
8671
8672 PR c/48418
8673 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
8674 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
8675 and is either negative or bigger or equal to type precision
8676 of the first operand.
8677
a859517f
MP
86782012-12-03 Marek Polacek <polacek@redhat.com>
8679
8680 PR c/55570
8681 * c-common.c (check_user_alignment): Swap order of tests,
8682 check TREE_CODE first.
8683
2d7aa578
ESR
86842012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
8685
8686 PR c++/52654
8687 * c-common.h (overflow_type): New enum.
8688 (build_userdef_literal): Add overflow_type argument.
8689 (tree_userdef_literal): Add overflow_type.
8690 (USERDEF_LITERAL_OVERFLOW): New access macro.
8691 * c-common.c (build_userdef_literal): Add overflow_type
8692 argument.
8693 * c-lex.c (c_lex_with_flags): Add overflow_type to
8694 build_userdef_literal calls.
8695 (interpret_integer, interpret_float): Add overflow_type argument.
8696
cc3c4f62
RB
86972012-11-28 Richard Biener <rguenther@suse.de>
8698
8699 PR c/35634
8700 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
8701 here and use a type with proper overflow behavior for types that would
8702 need to be promoted for the arithmetic.
8703
77bc5132
JJ
87042012-11-23 Jakub Jelinek <jakub@redhat.com>
8705
8706 PR sanitizer/55435
8707 * c-common.c (handle_no_address_safety_analysis_attribute): New
8708 function.
8709 (c_common_attribute_table): Add no_address_safety_analysis.
8710
5dc99c46
SB
87112012-11-16 Simon Baldwin <simonb@google.com>
8712
8713 * c.opt: Add f[no-]canonical-system-headers.
8714 * c-opts.c (c_common_handle_option): Handle
8715 OPT_fcanonical_system_headers.
8716
a4a0016d
ESR
87172012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
8718
8719 PR c++/54413
8720 * c-opts.c (c_common_handle_option): Set new flags.
8721 * c.opt: Describe new flags.
8722
7dbb85a7
JM
87232012-11-09 Jason Merrill <jason@redhat.com>
8724
8725 * c.opt (Wabi-tag): New.
8726
ad7bac31
AK
87272012-11-09 Andi Kleen <ak@linux.intel.com>
8728
8729 PR 55139
8730 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 8731 MEMMODEL_MASK
ad7bac31 8732
7332899a
MLI
87332012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8734
8735 PR c/53063
8736 * c.opt (Wformat): Make it Alias Wformat=1.
8737 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
8738 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
8739 LangEnabledBy.
8740 (Wformat=): RejectNegative. Use LangEnabledBy.
8741 (Wnonnull): Use LangEnabledBy.
8742 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
8743 * c-format.c (set_Wformat): Delete.
8744 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
ab20d992
JJ
8745 (maybe_read_dollar_number): Likewise.
8746 (avoid_dollar_number): Likewise.
8747 (finish_dollar_format_checking): Likewise.
8748 (check_format_info): Likewise.
8749 (check_format_info_main): Likewise.
8750 (check_format_types): Likewise.
8751 (format_type_warning): Likewise.
8752 * c-common.c (int): Likewise.
8753 (check_function_sentinel): Likewise.
8e745a17 8754 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 8755
34a180a6
MLI
87562012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8757
8758 PR c/53063
8759 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
8760 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
8761 Use LangEnabledBy.
8762 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
8763 common.opt.
8764 (Wvariadic-macros): Init(1).
8765 * c-opts.c (c_common_handle_option): Do not handle them
8766 explicitly.
8767 (c_common_post_options): Likewise.
8768 (sanitize_cpp_opts): warn_unused_macros is now
8769 cpp_warn_unused_macros.
8770 (push_command_line_include): Likewise.
8771 * c-common.c (warn_unknown_pragmas): Do not define.
8772 * c-common.h (warn_unknown_pragmas): Do not declare.
8773
3f46d6a5
MLI
87742012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8775
8776 PR c/51294
8777 * c-common.c (conversion_warning): Handle conditional expressions.
8778
880661a4
JW
87792012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
8780
8781 PR c++/54930
8782 * c.opt (Wreturn_local_addr): Define new option.
8783
4514a96b
JM
87842012-10-25 Jason Merrill <jason@redhat.com>
8785
f14edc1a
JM
8786 * c.opt (Wvirtual-move-assign): New.
8787
4514a96b
JM
8788 * c.opt (Winherited-variadic-ctor): New.
8789
93100c6b
MG
87902012-10-25 Marc Glisse <marc.glisse@inria.fr>
8791
8792 PR c++/54427
8793 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
8794
1efcb8c6
JM
87952012-10-23 Joseph Myers <joseph@codesourcery.com>
8796
8797 * c-common.h (pch_cpp_save_state): Declare.
8798 * c-target.def (c_preinclude): New hook.
8799 * c-opts.c (done_preinclude): New.
8800 (push_command_line_include): Handle default preincluded header.
8801 (cb_file_change): Call pch_cpp_save_state when calling
8802 push_command_line_include.
8803 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
8804 (pch_cpp_save_state): New.
8805 (pch_init): Call pch_cpp_save_state conditionally, instead of
8806 calling cpp_save_state.
8807
4a0ae68e
MLI
88082012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
8809
8810 PR c/53063
8811 PR c/40989
8812 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
8813 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
8814 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
8815 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
8816 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
8817 * c-opts.c (c_common_handle_option): Remove explicit handling from
8818 here.
8819 (c_common_post_options): Likewise.
8820
67e4210b
EB
88212012-10-18 Eric Botcazou <ebotcazou@adacore.com>
8822
8823 * c-ada-spec.c (LOCATION_COL): Delete.
8824 (compare_location): New function.
8825 (compare_node): Use it.
8826 (compare_comment): Likewise.
8827
65d4f2cd
MLI
88282012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
8829
8830 PR c/53063
8831 PR c/40989
8832 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
8833 * c-opts.c (c_common_handle_option): Do not set them here. Add
8834 comment.
8835 (c_common_post_options): Likewise.
8836
909881cb
EB
88372012-10-16 Eric Botcazou <ebotcazou@adacore.com>
8838
8839 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
8840 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
8841 Remove POINTER_TYPE handling, add large unsigned handling and use
8842 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
8843
3a785c97
JJ
88442012-10-12 Jakub Jelinek <jakub@redhat.com>
8845
8846 PR c/54381
8847 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
8848 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
8849 locs and array of 3 trees instead of just single loc and single
8850 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
8851 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
8852 For *cmp* builtins that take two sources strings report warnings
8853 about first and second source, not about destination and source.
8854
5e54f81d
MG
88552012-10-12 Marc Glisse <marc.glisse@inria.fr>
8856
8857 PR c++/53055
8858 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
8859
f5b02f1e
EB
88602012-10-11 Eric Botcazou <ebotcazou@adacore.com>
8861
8862 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
8863 declaring something coming from another file.
8864
b46dbc6c
AC
88652012-10-10 Arnaud Charlet <charlet@adacore.com>
8866
f5b02f1e 8867 PR ada/54845
b46dbc6c
AC
8868 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
8869
5d9de0d0
PC
88702012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
8871
8872 PR c++/54194
8873 * c-common.c (warn_about_parentheses): Add location_t parameter;
8874 use EXPR_LOC_OR_LOC.
8875 * c-common.h: Update declaration.
8876
a212e43f
MG
88772012-10-09 Marc Glisse <marc.glisse@inria.fr>
8878
8879 PR c++/54427
8880 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
8881 more operations. Make error messages optional.
8882 * c-common.h (enum stv_conv): Moved from c-typeck.c.
8883 (scalar_to_vector): Declare.
8884
b1db7f91
JM
88852012-10-08 Jason Merrill <jason@redhat.com>
8886
8887 * c-common.c (c_common_reswords): Add thread_local.
8888
e28d52cf
DS
88892012-10-08 Dodji Seketeli <dodji@redhat.com>
8890
8891 PR c++/53528 C++11 attribute support
8892 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
8893 new functions.
8894 * c-common.c (check_cxx_fundamental_alignment_constraints): New
8895 static function.
8896 (handle_aligned_attribute): In choose strictest alignment
8897 among many. Use new check_cxx_fundamental_alignment_constraints.
8898 (handle_transparent_union_attribute): In c++11 attribute syntax,
8899 don't look through typedefs.
8900
3b78de56
AC
89012012-10-04 Arnaud Charlet <charlet@adacore.com>
8902
8903 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
8904 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
8905 out of dumpfile.h.
8906
6040bb5f
DC
89072012-09-25 Dehao Chen <dehao@google.com>
8908
8909 PR middle-end/54645
3b78de56 8910 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
8911 map when read in the pch.
8912
3f8257db 89132012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
8914
8915 * c-ada-spec.c: Style fixes.
8916
3f8257db 89172012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
8918
8919 * c.opt (-fada-spec-parent): Define new command line switch.
8920 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
8921 is specified, generate binding spec as a child of the specified unit.
8922
0ccb505d
PC
89232012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
8924 Manuel López-Ibáñez <manu@gcc.gnu.org>
8925
8926 PR c++/53210
8927 * c.opt ([Winit-self]): Enabled by -Wall in C++.
8928
c583af79
AC
89292012-08-23 Arnaud Charlet <charlet@adacore.com>
8930
8931 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
8932 for pointers, and add missing Convention C pragma.
8933 (print_ada_struct_decl): Add missing aliased keyword.
8934 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
8935
1a4049e7
JJ
89362012-08-17 Jakub Jelinek <jakub@redhat.com>
8937
8938 * c-common.c (sizeof_pointer_memaccess_warning): New function.
8939 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
8940 * c-opts.c (c_common_handle_option): Enable it for -Wall.
8941 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
8942 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
8943
70b5e7dc
RG
89442012-08-10 Richard Guenther <rguenther@suse.de>
8945
8946 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
8947
f8923f7e
SB
89482012-08-07 Steven Bosscher <steven@gcc.gnu.org>
8949
8950 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
8951 instead of separate pp_newline and pp_flush.
8952 (print_c_tree): Likewise.
8953
e45abe1f
RH
89542012-07-26 Richard Henderson <rth@redhat.com>
8955
8956 * c-common.c (handle_hot_attribute): Allow labels.
8957 (handle_cold_attribute): Likewise.
8958
332f1d24
JJ
89592012-07-20 Jakub Jelinek <jakub@redhat.com>
8960
8961 PR c++/28656
8962 * c-common.c (check_function_nonnull): Handle multiple nonnull
8963 attributes properly.
8964
7ee2468b
SB
89652012-07-16 Steven Bosscher <steven@gcc.gnu.org>
8966
8967 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
8968 * c-ada-spec.c: Likewise.
8969 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
8970
ee7b28eb
SB
89712012-07-14 Steven Bosscher <steven@gcc.gnu.org>
8972
8973 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
8974 Remove code conditional on it.
8975
6bdf3519
SB
89762012-07-11 Steven Bosscher <steven@gcc.gnu.org>
8977
8978 * c-gimplify.c: Do not include basic-block.h.
8979 * c-common.c: Do not include linfuncs.h.
8980
532aafad
SB
89812012-07-08 Steven Bosscher <steven@gcc.gnu.org>
8982
8983 * c-common.h: Include tree.h.
8984
8d0d1915
JM
89852012-07-02 Jason Merrill <jason@redhat.com>
8986
8987 PR c++/53524
8988 * c-common.c (get_priority): Call default_conversion.
8989
fbc873ad
UB
89902012-07-01 Uros Bizjak <ubizjak@gmail.com>
8991
8992 * c-pch.c (c_common_write_pch): Remove unused variables.
8993
d4a10d0a
SB
89942012-06-29 Steven Bosscher <steven@gcc.gnu.org>
8995
8996 * cppspec.c: Moved from gcc/ to here.
8997
6f3a2e23
KT
89982012-06-27 Kai Tietz <ktietz@redhat.com>
8999
9000 PR preprocessor/37215
9001 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
9002
8ca92d04
SB
90032012-06-21 Steven Bosscher <steven@gcc.gnu.org>
9004
9005 * c-common.h (c_common_print_pch_checksum): Remove.
9006 * c-pch.c: Do not include output.h.
9007 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
9008 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
9009 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
9010 (struct c_pch_header): Remove.
9011 (get_ident): Update gpch version.
9012 (pch_init): Do not print executable_checksum to asm_out_file.
9013 Do not fail if there is no asm_out_file to read back from. Set
9014 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
9015 (c_common_write_pch): Verify that nothing was written to asm_out_file
9016 since pch_init was called. Do not write a c_pch_header, and do not
9017 copy from asm_out_file to the PCH.
9018 (c_common_read_pch): Do not read a c_pch_header, and do not restore
9019 the content of asm_out_file from the PCH.
9020 (c_common_print_pch_checksum): Remove.
9021 * c-opts.c (c_common_init): Print out executable_checksum directly.
9022
70f42967
SB
90232012-06-19 Steven Bosscher <steven@gcc.gnu.org>
9024
9025 * c-target.def (objc_declare_unresolved_class_reference,
9026 objc_declare_class_definition): Add new hooks.
9027
a8781821
SB
90282012-06-19 Steven Bosscher <steven@gcc.gnu.org>
9029
9030 * c-lex.c: Do not include output.h.
9031 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
9032 Remove uses of ASM_OUTPUT_IDENT.
9033
9e1a8dd1
RR
90342012-06-15 Marc Glisse <marc.glisse@inria.fr>
9035
9036 PR c++/51033
9037 * c-common.h (c_build_vec_perm_expr): Move decl here.
9038 * c-common.c (c_build_vec_perm_expr): Move definition
9039 here.
9040
6f07a821
SB
90412012-06-06 Steven Bosscher <steven@gcc.gnu.org>
9042
9043 * c.opt (fconserve-space): Turn into a no-op.
9044
9faeb493 90452012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
9046
9047 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
9048 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
9049 both the start and end of the function.
9050
a4b7d13c
SB
90512012-06-04 Steven Bosscher <steven@gcc.gnu.org>
9052
9053 * c-common.c: Do not include output.h.
9054 * c-pragma.c: Likewise.
9055
c265f413
SA
90562012-06-04 Steven Bosscher <steven@gcc.gnu.org>
9057
9058 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
9059 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
9060 (lang_decl_name): Handle namespace decls.
9061
be7a421e
SB
90622012-05-31 Steven Bosscher <steven@gcc.gnu.org>
9063
9064 * c-ada-spec.c: Do not include output.h.
9065 * c-semantics.c: Likewise.
9066
65de6659
JM
90672012-05-29 Joseph Myers <joseph@codesourcery.com>
9068
9069 * c-common.c: Fix typo.
9070
ca5f4331
MM
90712012-05-29 Michael Matz <matz@suse.de>
9072
9073 * c-common.h (c_expand_decl): Remove prototype.
9074
4f7f7aca
MLI
90752012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9076
9077 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
9078 * c-opts.c (c_common_handle_option): Remove code handling
9079 warn_missing_braces.
9080
4a792f9b
PC
90812012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
9082
9083 PR c++/25137
9084 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
9085 -Wmissing_braces.
9086
650dc14a
DS
90872012-05-22 Dodji Seketeli <dodji@redhat.com>
9088
9089 PR c++/53322
9090 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
9091
9b095bf1
MLI
90922012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
9093
9094 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
9095 * c-opts.c (c_common_handle_option): Do not handle explicitly
9096 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
9097
0b2c4be5
DS
90982012-05-16 Dodji Seketeli <dodji@redhat.com>
9099
9100 PR preprocessor/7263
ab20d992 9101 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
0b2c4be5
DS
9102 to cpp_classify_number. For diagnostics, use the precise location
9103 instead of the global input_location.
9104
a1bde5af
PC
91052012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
9106
d02924ef 9107 PR c++/11856
a1bde5af
PC
9108 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
9109
d1ede5f4
BS
91102012-05-14 Bernd Schmidt <bernds@codesourcery.com>
9111
a1bde5af 9112 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 9113
f2bc201f
MLI
91142012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
9115
9116 PR 53063
9117 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
9118 Wreorder): Use LangEnabledBy.
9119 * c-opts.c (c_common_handle_option): Do not enable them
9120 explicitly. Call lang-specific generated functions.
9121 (c_common_post_options): Do not set them here.
9122
95744782
MLI
91232012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
9124
9125 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
9126 Wmissing-field-initializers,Wmissing-parameter-type,
9127 Wold-style-declaration,Woverride-init): Use EnabledBy.
9128 * c-opts.c (c_common_post_options): Do not set here explicitly.
9129
7d5a5747
MLI
91302012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
9131
9132 PR 53063
9133 * c-opts.c (c_common_handle_option): Use handle_generated_option
9134 to enable sub-options.
9135
5a3c9cf2
PC
91362012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
9137
9138 PR c++/53158
9139 * c-common.c (warnings_for_convert_and_check): Use warning_at.
9140
3ac8781c
RG
91412012-05-10 Richard Guenther <rguenther@suse.de>
9142
9143 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
9144 adjust commentary about TYPE_IS_SIZETYPE types.
9145
1e537948
MLI
91462012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9147
9148 PR c++/53261
9149 * c-common.c (warn_logical_operator): Check that argument of
9150 integer_zerop is not NULL.
9151
f2c4a785
MLI
91522012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
9153
9154 PR c/43772
9155 * c-common.c (warn_logical_operator): Do not warn if either side
9156 is already true or false.
9157
50f305ca
MLI
91582012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
9159
9160 PR c/51712
9161 * c-common.c (expr_original_type): New.
9162 (shorten_compare): Do not warn for enumeration types.
9163
0c3641b0
MLI
91642012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
9165
9166 * c.opt (fpermissive): Add Var(flag_permissive).
9167
7edaa4d2
MG
91682012-04-30 Marc Glisse <marc.glisse@inria.fr>
9169
9170 PR c++/51033
9171 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
9172 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
9173
b9c8da34
DS
91742012-04-30 Dodji Seketeli <dodji@redhat.com>
9175
9176 Add -Wvarargs option
ab20d992 9177 * c.opt (Wvarargs): Define new option.
b9c8da34 9178
e6c69da0
MLI
91792012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9180
9181 * c-common.c (check_function_arguments): Replace
9182 Wmissing-format-attribute with Wsuggest-attribute=format.
9183
90137d8f
MLI
91842012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9185
9186 * c.opt (Wsuggest-attribute=format): New. Alias of
9187 Wmissing-format-attribute.
9188 * c-format.c (decode_format_type): Replace
9189 Wmissing-format-attribute with Wsuggest-attribute=format.
9190 (check_function_format): Likewise.
9191
9faeb493 91922012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
9193
9194 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
9195 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
9196 * c.opt: Add Wliteral-suffix.
9197
c1771a20
MLI
91982012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
9199
9200 PR c/44774
9201 * c.opt (Wpedantic): New.
9202 (pedantic): Alias Wpedantic.
9203 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
9204 (c_common_post_options): Likewise.
9205 (sanitize_cpp_opts): Likewise.
9206 * c-lex.c (interpret_float): Likewise.
9207 * c-format.c (check_format_types): Likewise.
9208 * c-common.c (pointer_int_sum): Likewise.
9209 (c_sizeof_or_alignof_type): Likewise.
9210 (c_add_case_label): Likewise.
9211 (c_do_switch_warnings): Likewise.
9212 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
9213
04b391c1
JM
92142012-04-15 Jason Merrill <jason@redhat.com>
9215
9216 PR c++/52818
9217 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
9218 (C_STD_NAME): Distinguish between C++98 and C++11.
9219
ac868f29
EB
92202012-04-11 Eric Botcazou <ebotcazou@adacore.com>
9221
9222 PR target/52624
9223 * c-common.h (uint16_type_node): Rename into...
9224 (c_uint16_type_node): ...this.
9225 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
9226 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
9227
fd4116f4
MLI
92282012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
9229
9230 * c-common.c (warn_if_unused_value): Move definition to here.
9231 * c-common.h (warn_if_unused_value): Move declaration to here.
9232
573ac65e
WB
92332012-03-23 William Bader <williambader@hotmail.com>
9234
9235 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
9236
552b8185
JM
92372012-03-20 Jason Merrill <jason@redhat.com>
9238
9239 * c-common.h (enum cxx_dialect): Add cxx1y.
9240 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
9241 test.
9242 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
9243 * c-opts.c (c_common_post_options): Likewise.
9244 (set_std_cxx1y): New.
9245 (c_common_handle_option): Call it.
9246 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
9247
04398fa8
PC
92482012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
9249
9250 PR c++/14710
9251 * c.opt ([Wuseless-cast]): Add.
9252
d2a12ae7
RG
92532012-03-16 Richard Guenther <rguenther@suse.de>
9254
9255 * c-pretty-print.c (pp_c_initializer_list): Adjust.
9256
a12bf402
MLI
92572012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9258
9259 PR c++/44783
9260 * c.opt (ftemplate-backtrace-limit) Add.
9261
5c30094f
RO
92622012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9263
9264 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
9265 handling.
9266 * c-pragma.c (handle_pragma_extern_prefix): Remove.
9267 (init_pragma): Don't register extern_prefix.
9268
21fa2faf
RG
92692012-03-12 Richard Guenther <rguenther@suse.de>
9270
9271 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
9272 (builtin_type_for_size): Likewise.
9273
e3793c6f
JJ
92742012-02-13 Jakub Jelinek <jakub@redhat.com>
9275
9276 PR c++/52215
9277 * c-common.c (sync_resolve_params): Don't decide whether to convert
9278 or not based on TYPE_SIZE comparison, convert whenever arg_type
9279 is unsigned INTEGER_TYPE.
9280
93286335
PC
92812012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
9282
9283 PR c/52118
9284 * c.opt ([Wunused-local-typedefs]): Fix description.
9285
7a421706
MS
92862012-01-24 Mike Stump <mikestump@comcast.net>
9287
9288 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
9289 exactly.
9290
ba9b1f11
RG
92912012-01-18 Richard Guenther <rguenther@suse.de>
9292
9293 * c-opts.c (c_common_post_options): Reset LTO flags if
9294 we are about to generate a PCH.
9295
465406be
PC
92962012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
9297
9298 PR c++/51777
9299 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
9300 use pp_unsigned_wide_integer.
9301
aee15221
RG
93022012-01-10 Richard Guenther <rguenther@suse.de>
9303
9304 PR middle-end/51806
9305 * c-opts.c (c_common_handle_option): Move -Werror handling
9306 to language independent code.
9307
5720c0dc
RG
93082012-01-05 Richard Guenther <rguenther@suse.de>
9309
9310 PR middle-end/51764
9311 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
9312 from common.opt.
9313
73ac190a
PC
93142011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
9315
9316 PR c++/51316
9317 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
9318 of array types with an unknown bound.
9319
48b0b196
JM
93202011-12-20 Joseph Myers <joseph@codesourcery.com>
9321
9322 * c-common.c (flag_isoc99): Update comment to refer to C11.
9323 (flag_isoc1x): Change to flag_isoc11.
9324 * c-common.h (flag_isoc99): Update comment to refer to C11.
9325 (flag_isoc1x): Change to flag_isoc11.
9326 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
9327 C11.
9328 * c-opts.c (set_std_c1x): Change to set_std_c11.
9329 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
9330 Call set_std_c11.
9331 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
9332 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
9333 * c.opt (std=c1x): Change to std=c11. Document as non-draft
9334 standard.
9335 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
9336 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
9337 (std=gnu1x): Make alias of std=gnu11.
9338
d58d6eb5
JM
93392011-12-19 Jason Merrill <jason@redhat.com>
9340
9341 PR c++/51228
9342 * c-common.c (handle_transparent_union_attribute): Check the first
9343 field if the type is complete.
9344
b3908fcc
JW
93452011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
9346
9347 PR libstdc++/51365
9348 * c-common.c (RID_IS_FINAL): Add.
9349 * c-common.h (RID_IS_FINAL): Add.
9350
fea3ca91
IS
93512011-11-30 Iain Sandoe <iains@gcc.gnu.org>
9352
9353 * c.opt (fgnu-runtime): Provide full description.
9354 (fnext-runtime): Likewise.
9355 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
9356
62bad7cd
AM
93572011-11-28 Andrew MacLeod <amacleod@redhat.com>
9358
9359 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
9360 predefines in one place. Add LOCK_FREE predefines.
9361 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
9362 new func.
9363
c466c4ff
AM
93642011-11-24 Andrew MacLeod <amacleod@redhat.com>
9365
9366 PR c/51256
9faeb493 9367 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 9368 conditions
9faeb493
UB
9369 (resolve_overloaded_atomic_exchange,
9370 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
9371 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
9372 error_mark_node for error conditions.
9faeb493 9373
a5952633
RG
93742011-11-08 Richard Guenther <rguenther@suse.de>
9375
9376 PR middle-end/51010
ab20d992 9377 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
a5952633 9378
0a35513e
AH
93792011-11-07 Richard Henderson <rth@redhat.com>
9380 Aldy Hernandez <aldyh@redhat.com>
9381 Torvald Riegel <triegel@redhat.com>
9382
9383 Merged from transactional-memory.
9384
9385 * c-common.c (handle_tm_wrap_attribute,
9386 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
9387 (struct c_common_reswords): Added __transaction* keywords.
9388 (struct c_common_attribute_table): Added transaction* and tm_regparm
9389 attributes.
9390 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
9391 masks.
9392 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
9393 find_tm_attribute): Declare.
9394
6d87092d
JM
93952011-11-07 Jason Merrill <jason@redhat.com>
9396
9397 PR c++/35688
9398 * c-common.c, c-common.h: Revert yesterday's changes.
9399
8e7860a1
JM
94002011-11-06 Jason Merrill <jason@redhat.com>
9401
9402 PR c++/35688
9403 * c-common.c (decl_has_visibility_attr): Split out from...
9404 (c_determine_visibility): ...here.
9405 * c-common.h: Declare it.
9406
d19fa6b5
JM
94072011-11-06 Joseph Myers <joseph@codesourcery.com>
9408
9409 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
9410 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
9411 type.
9412 (check_user_alignment): New. Split out of
9413 handle_aligned_attribute. Disallow integer constants with
9414 noninteger types. Conditionally allow zero.
9415 (handle_aligned_attribute): Use check_user_alignment.
9416 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
9417
86951993
AM
94182011-11-06 Andrew MacLeod <amacleod@redhat.com>
9419 Richard Henderson <rth@redhat.com>
9420
9421 Merged from cxx-mem-model.
9422
9423 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 9424 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
9425 parameters that are the same type size.
9426 (get_atomic_generic_size): New. Find size of generic
9427 atomic function parameters and do typechecking.
9428 (add_atomic_size_parameter): New. Insert size into parameter list.
9429 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
9430 either __atomic_exchange_n or external library call.
9faeb493 9431 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 9432 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 9433 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
9434 __atomic_load_n or an external library call.
9435 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
9436 __atomic_store_n or an external library call.
9437 (resolve_overloaded_builtin): Handle new __atomic builtins.
9438
cf9e9959
EB
94392011-11-04 Eric Botcazou <ebotcazou@adacore.com>
9440
9441 PR c++/50608
9442 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
9443 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
9444 <INDIRECT_REF>: Return the argument.
9445 <ARRAY_REF>: Remove special code for negative offset.
9446 Call fold_build_pointer_plus instead of size_binop.
9447 (fold_offsetof): Remove STOP_REF argument and adjust.
9448 * c-common.h (fold_offsetof_1): Declare.
9449 (fold_offsetof): Remove STOP_REF argument.
9450
25339f10
JM
94512011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
9452
9453 PR c++/50810
9454 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
9455 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
9456 Wnarrowing for C++0x and C++98.
9457 * c.opt ([Wnarrowing]): Update.
9458
89401152
PC
94592011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
9460
9461 PR c++/44277
9462 * c.opt: Add Wzero-as-null-pointer-constant.
9463
97e3ad20
JM
94642011-10-31 Jason Merrill <jason@redhat.com>
9465
15694fdd
JM
9466 * c.opt (-fdeduce-init-list): Off by default.
9467
97e3ad20
JM
9468 PR c++/50920
9469 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
9470 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
9471 and -Wc++11-compat.
9472 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
9473
fb9120e3
RAV
94742011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
9475
9476 PR c++/30066
9477 * c.opt (fvisibility-inlines-hidden): Description change.
9478
3ce4f9e4
ESR
94792011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
9480
9481 Implement C++11 user-defined literals.
9482 * c-common.c (build_userdef_literal): New.
9483 * c-common.def: New tree code.
9484 * c-common.h (tree_userdef_literal): New tree struct and accessors.
9485 * c-lex.c (interpret_float): Add suffix parm.
9486 (c_lex_with_flags): Build literal tokens.
9487
5f53c243
PC
94882011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
9489
9490 PR c++/50841
9491 Revert:
9492 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
9493
9494 PR c++/50810
9495 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
9496 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
9497 Wnarrowing for C++0x and C++98.
9498 * c.opt ([Wnarrowing]): Update.
9499
263734e1
PC
95002011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
9501
9502 PR c++/50810
9503 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
9504 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
9505 Wnarrowing for C++0x and C++98.
9506 * c.opt ([Wnarrowing]): Update.
9507
d2e312d7
PC
95082011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
9509
9510 PR c++/45385
9511 * c-common.c (conversion_warning): Remove code looking for
9512 artificial operands.
9513
d17687f6
DS
95142011-10-18 Dodji Seketeli <dodji@redhat.com>
9515
9516 PR bootstrap/50760
9517 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 9518 !NO_IMPLICIT_EXTERN_C.
d17687f6 9519
fc8396e9
PC
95202011-10-17 Michael Spertus <mike_spertus@symantec.com>
9521
9522 * c-common.c (c_common_reswords): Add __bases,
9523 __direct_bases.
9524 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
9525
95262011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
9527
9528 PR c++/50757
9529 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
9530
847e697a
TT
95312011-10-15 Tom Tromey <tromey@redhat.com>
9532 Dodji Seketeli <dodji@redhat.com>
9533
9534 * c.opt (fdebug-cpp): New option.
9535 * c-opts.c (c_common_handle_option): Handle the option.
9536 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
9537 output stream in parameter. Factorized from ...
9538 (maybe_print_line): ... this. Dump location debug information when
9539 -fdebug-cpp is in effect.
9540 (print_line_1): New static function. Takes an output stream in
9541 parameter. Factorized from ...
9542 (print_line): ... here. Dump location information when -fdebug-cpp
9543 is in effect.
9544 (scan_translation_unit): Dump location information when
9545 -fdebug-cpp is in effect.
9546
92582b75
TT
95472011-10-15 Tom Tromey <tromey@redhat.com>
9548 Dodji Seketeli <dodji@redhat.com>
9549
9550 * c.opt (ftrack-macro-expansion): New option. Handle it with and
9551 without argument.
9552 * c-opts.c (c_common_handle_option)<case
9553 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
9554 cases. Handle -ftrack-macro-expansion with and without argument.
9555
46427374
TT
95562011-10-15 Tom Tromey <tromey@redhat.com>
9557 Dodji Seketeli <dodji@redhat.com>
9558
9559 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
9560 (print_line, cb_define, do_line_change): Adjust to avoid touching
9561 the internals of struct line_map. Use the public API instead.
9562 * c-pch.c (c_common_read_pch): Likewise.
9563 * c-lex.c (fe_file_change): Likewise.
9564
fc8396e9
PC
95652011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
9566
9567 PR c++/17212
9568 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
9569
95702011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
9571
9572 PR c++/33067
9573 * c-pretty-print.c (pp_c_floating_constant): Output
9574 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
9575
e79983f4
MM
95762011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
9577
9578 * c-common.c (def_builtin_1): Delete old interface with two
9579 parallel arrays to hold standard builtin declarations, and replace
9580 it with a function based interface that can support creating
9581 builtins on the fly in the future. Change all uses, and poison
9582 the old names. Make sure 0 is not a legitimate builtin index.
9583 * c-omp.c (c_finish_omp_barrier): Ditto.
9584 (c_finish_omp_taskwait): Ditto.
9585 (c_finish_omp_flush): Ditto.
9586
6637388f
TG
95872011-10-11 Tristan Gingold <gingold@adacore.com>
9588
9589 * c.opt: (fallow-parameterless-variadic-functions): New.
9590
3797cb21
DS
95912011-09-08 Dodji Seketeli <dodji@redhat.com>
9592
9593 PR c++/33255 - Support -Wunused-local-typedefs warning
9594 * c-common.h (struct c_language_function::local_typedefs): New
9595 field.
9faeb493
UB
9596 (record_locally_defined_typedef, maybe_record_typedef_use)
9597 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 9598 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
9599 (maybe_record_typedef_use)
9600 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
9601 * c.opt: Declare new -Wunused-local-typedefs flag.
9602
693ddb1b
EB
96032011-09-06 Eric Botcazou <ebotcazou@adacore.com>
9604
9605 PR middle-end/50266
9606 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
9607 computations.
9608
830c740f
RG
96092011-09-05 Richard Guenther <rguenther@suse.de>
9610
9611 * c-common.c (complete_array_type): Use ssize_int (-1) instead
9612 of integer_minus_one_node for empty array upper bounds.
9613
892a371f
DS
96142011-08-28 Dodji Seketeli <dodji@redhat.com>
9615
9616 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
9617 it's the first time it's being called on this main TU.
9618
0e3fdb48
RB
96192011-08-24 Richard Guenther <rguenther@suse.de>
9620
9621 PR c/49396
9622 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
9623
96242011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
9625
9626 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
9627 defined in cpp_init_builtins and c_cpp_builtins.
9628
d4a83c10
JM
96292011-08-19 Joseph Myers <joseph@codesourcery.com>
9630
9631 * c-common.c (c_common_reswords): Add __builtin_complex.
9632 * c-common.h (RID_BUILTIN_COMPLEX): New.
9633
bbceee64
JM
96342011-08-18 Joseph Myers <joseph@codesourcery.com>
9635
9636 * c-common.c (c_common_reswords): Add _Noreturn.
9637 (keyword_is_function_specifier): Handle RID_NORETURN.
9638 * c-common.h (RID_NORETURN): New.
9639
3f8257db 96402011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
9641
9642 * c-common.c (unsafe_conversion_p): New function. Check if it is
9643 unsafe to convert an expression to the type.
9644 (conversion_warning): Adjust, use unsafe_conversion_p.
9645 * c-common.h (unsafe_conversion_p): New function declaration.
9646
20906c66
JJ
96472011-08-02 Jakub Jelinek <jakub@redhat.com>
9648
9649 * c-common.h (c_finish_omp_atomic): Adjust prototype.
9650 (c_finish_omp_taskyield): New prototype.
9651 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
9652 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
9653 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
9654 or RHS1 have side-effects, evaluate those too in the right spot,
9655 if it is a decl and LHS is also a decl, error out if they
9656 aren't the same.
9657 (c_finish_omp_taskyield): New function.
9658 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
9659 * c-pragma.c (omp_pragmas): Add taskyield.
9660 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
9661 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
9662 PRAGMA_OMP_CLAUSE_MERGEABLE.
9663
770e5a2e
DS
96642011-07-25 Dodji Seketeli <dodji@redhat.com>
9665
9666 * c-common.h (set_underlying_type): Remove parm name from
9667 declaration.
9668
1baae426
RG
96692011-07-25 Romain Geissler <romain.geissler@gmail.com>
9670
9671 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 9672
fcb21722
JM
96732011-07-22 Jason Merrill <jason@redhat.com>
9674
76f86d00
JM
9675 PR c++/49793
9676 * c.opt (Wnarrowing): New.
9677
3a636414
JM
9678 PR c++/30112
9679 * c-common.h: Declare c_linkage_bindings.
9680 * c-pragma.c (handle_pragma_redefine_extname): Use it.
9681
fcb21722
JM
9682 PR c++/49813
9683 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
9684 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
9685 as flag_isoc99 for 'restrict'.
9686 (pp_c_specifier_qualifier_list): Likewise for _Complex.
9687
02614448
ILT
96882011-07-21 Ian Lance Taylor <iant@google.com>
9689
9690 PR middle-end/49705
9691 * c-common.c (c_disable_warnings): New static function.
9692 (c_enable_warnings): New static function.
9693 (c_fully_fold_internal): Change local unused_p to bool. Call
9694 c_disable_warnings and c_enable_warnings rather than change
9695 c_inhibit_evaluation_warnings.
9696
34429675
JM
96972011-07-20 Jason Merrill <jason@redhat.com>
9698
9699 PR c++/6709 (DR 743)
9700 PR c++/42603 (DR 950)
9701 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
9702 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
9703 (CPP_DECLTYPE): New.
9704 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
9705
5d49b6a7
RG
97062011-07-19 Richard Guenther <rguenther@suse.de>
9707
9708 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
9709 * c-omp.c (c_finish_omp_for): Likewise.
9710
e84a58ff
EB
97112011-07-12 Eric Botcazou <ebotcazou@adacore.com>
9712
9713 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
9714 body on the next line.
9715
329af3c7
JM
97162011-07-08 Jason Merrill <jason@redhat.com>
9717
4063e61b
JM
9718 PR c++/45437
9719 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
9720
329af3c7
JM
9721 PR c++/49673
9722 * c-common.c (c_apply_type_quals_to_decl): Don't check
9723 TYPE_NEEDS_CONSTRUCTING.
9724
1a072294
RG
97252011-07-06 Richard Guenther <rguenther@suse.de>
9726
9727 * c-common.c (c_common_nodes_and_builtins):
9728 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
9729
fce5dddd
RG
97302011-07-05 Richard Guenther <rguenther@suse.de>
9731
9732 * c-common.c (c_common_nodes_and_builtins): Build all common
9733 tree nodes first.
9734
45d439ac
JJ
97352011-06-27 Jakub Jelinek <jakub@redhat.com>
9736
56300785
JJ
9737 * c-common.h (c_tree_chain_next): New static inline function.
9738
45d439ac
JJ
9739 * c-common.c (check_builtin_function_arguments): Handle
9740 BUILT_IN_ASSUME_ALIGNED.
9741
e0a8ecf2
AM
97422011-06-21 Andrew MacLeod <amacleod@redhat.com>
9743
9744 * c-common.c: Add sync_ or SYNC__ to builtin names.
9745 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
9746
97472011-06-20 Pierre Vittet <piervit@pvittet.com>
9748
9749 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
9750 handler.
9751 (gen_pragma_handler): New union.
9752 (internal_pragma_handler): New type.
9753 (c_register_pragma_with_data)
9754 (c_register_pragma_with_expansion_and_data): New functions.
9755
9756 * c-pragma.c (registered_pragmas, c_register_pragma_1)
9757 (c_register_pragma, c_register_pragma_with_expansion)
9758 (c_invoke_pragma_handler): Changed to work with
9759 internal_pragma_handler.
9760 (c_register_pragma_with_data)
9761 (c_register_pragma_with_expansion_and_data): New functions.
9762
677f3fa8
JM
97632011-06-14 Joseph Myers <joseph@codesourcery.com>
9764
9765 * c-common.c: Include common/common-target.h.
9766 (handle_section_attribute): Use
9767 targetm_common.have_named_sections.
9768 * c-cppbuiltin.c: Include common/common-target.h.
9769 (c_cpp_builtins): Use targetm_common.except_unwind_info.
9770
d7fc8c14
RG
97712011-06-10 Richard Guenther <rguenther@suse.de>
9772
9773 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
9774 to print a IDENTIFIER_NODE.
9775
10e48e39
RO
97762011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9777 Joseph Myers <joseph@codesourcery.com>
9778
9779 * c.opt (fbuilding-libgcc): New option.
9780 * c-cppbuiltin.c (c_cpp_builtins): Define
9781 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
9782
6976ae51
JM
97832011-06-07 Jason Merrill <jason@redhat.com>
9784
3ff60975
JM
9785 * c-common.c (max_tinst_depth): Lower default to 900.
9786
6976ae51
JM
9787 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
9788
009db074
RG
97892011-06-07 Richard Guenther <rguenther@suse.de>
9790
9791 * c-common.c (c_common_nodes_and_builtins): Do not set
9792 size_type_node or call set_sizetype.
9793
b4592b92
DS
97942011-06-07 Dodji Seketeli <dodji@redhat.com>
9795
9796 PR debug/49130
9797 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 9798 type when using pointer comparison to compare types.
b4592b92 9799
014ab419
JW
98002011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
9801
9802 * c.opt: Add -Wdelete-non-virtual-dtor.
9803 * c-opts.c (c_common_handle_option): Include it in -Wall.
9804
4f60111f
NF
98052011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
9806
9807 PR bootstrap/49190
9808
9809 Revert:
9810 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9811
9812 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
9813 not tree_common.
9814
4cc4f2f4
JJ
98152011-05-27 Jakub Jelinek <jakub@redhat.com>
9816
9817 PR c++/49165
9818 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
9819 C++ don't call c_common_truthvalue_conversion on void type arms.
9820
38e01f9e
NF
98212011-05-27 Nathan Froyd <froydnj@codesourcery.com>
9822
9823 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
9824 (stmt_list_stack): Define.
9825 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
9826 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
9827
92e948a8
NF
98282011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9829
9830 * c-common.c (warning_candidate_p): Check for BLOCKs.
9831
a2fc3e63
NF
98322011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9833
9834 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
9835 not tree_common.
9836
0957c029
JJ
98372011-05-25 Jakub Jelinek <jakub@redhat.com>
9838
9839 * c-common.c (def_fn_type): Remove extra va_end.
9840
828fb3ba
JM
98412011-05-23 Jason Merrill <jason@redhat.com>
9842
9843 PR c++/48106
9844 * c-common.c (c_common_get_narrower): New.
9845 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
9846
dde05067
NF
98472011-05-23 Nathan Froyd <froydnj@codesourcery.com>
9848
9849 * c-common.h (check_function_arguments): Tweak prototype of
9850 check_function_arguments.
9851 * c-common.c (check_function_arguments): Likewise. Adjust
9852 calls to check_function_nonnull, check_function_format, and
9853 check_function_sentinel.
9854 (check_function_sentinel): Take a FUNCTION_TYPE rather than
9855 separate attributes and typelist arguments. Use
9856 FOREACH_FUNCTION_ARGS to iterate over argument types.
9857
3c0d13bf
PC
98582011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
9859
9860 * c-common.c (c_common_reswords): Reorder.
9861 * c-common.h (rid): Likewise.
9862
8242dd04
NF
98632011-05-10 Nathan Froyd <froydnj@codesourcery.com>
9864
9865 * c-common.c (def_fn_type): Don't call build_function_type, call
9866 build_function_type_array or build_varargs_function_type_array
9867 instead.
9868 (c_common_nodes_and_builtins): Likewise.
9869
3d528853
NF
98702011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9871
9872 * c-common.c (c_add_case_label): Omit the loc argument to
9873 build_case_label.
9874 * c-common.h (build_case_label): Remove.
9875 * c-semantics.c (build_case_label): Remove.
9876
a04a722b
JM
98772011-05-05 Joseph Myers <joseph@codesourcery.com>
9878
9879 * c-objc.h (objc_start_method_definition): Update prototype.
9880 * stub-objc.c (objc_start_method_definition): Add extra parameter.
9881
e19a18d4
NF
98822011-05-04 Nathan Froyd <froydnj@codesourcery.com>
9883
9884 * c-common.c (check_main_parameter_types): Reindent. Don't use
9885 TYPE_ARG_TYPES directly.
9886 (handle_nonnull_attribute): Likewise.
9887 (sync_resolve_params): Likewise.
9888 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
9889 to check_format_string.
9890 (handle_format_attribute): Likewise.
9891 (check_format_string): Take a function type to examine instead of
9892 a type list. Use a function_arg_iterator to step through argument
9893 types.
9894
c62c040f
RG
98952011-05-04 Richard Guenther <rguenther@suse.de>
9896
9897 * c-common.c (fix_string_type): Use size_int for index type bounds.
9898 (start_fname_decls): Do not pass NULL to build_int_cst.
9899 (c_init_attributes): Likewise.
9900 * c-lex.c (c_lex_with_flags): Likewise.
9901
c12ff9d8
JM
99022011-04-27 Jason Merrill <jason@redhat.com>
9903
9904 * c-common.c (make_tree_vector_from_list): New.
9905 * c-common.h: Declare it.
9906
304dfbe3
RG
99072011-04-26 Richard Guenther <rguenther@suse.de>
9908
9909 PR preprocessor/48248
9910 * c-ppoutput.c (maybe_print_line): Always optimize newlines
9911 for output size with -P.
9912
3c0d13bf
PC
99132011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
9914
9915 * c-common.c (struct c_common_resword): Add __underlying_type.
9916 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
9917
04695783
JM
99182011-04-20 Jim Meyering <meyering@redhat.com>
9919
9920 * c-format.c (init_dollar_format_checking): Remove useless
9921 if-before-free.
9922
0dc33c3c
NP
99232011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
9924
9925 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 9926 (objc_detect_field_duplicates): New.
0dc33c3c 9927 * stub-objc.c: Likewise.
3c0d13bf 9928
c59633d9
NP
99292011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
9930
9931 * stub-objc.c (objc_declare_protocols): Renamed to
9932 objc_declare_protocol.
9933 * c-objc.h: Likewise.
3c0d13bf 9934
32dabdaf
NP
99352011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
9936
9937 * stub-objc.c (objc_declare_class): Updated argument name.
9938
81f653d6
NF
99392011-04-12 Nathan Froyd <froydnj@codesourcery.com>
9940
9941 * c-common.h (c_common_init_ts): Declare.
9942 * c-common.c (c_common_init_ts): Define.
9943
eb345401
NP
99442011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
9945
9946 * c-objc.h (objc_build_message_expr): Updated prototype.
9947 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 9948
a358e188
MJ
99492011-04-12 Martin Jambor <mjambor@suse.cz>
9950
9951 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
9952 of cgraph_node.
9953
e6313a78
RG
99542011-04-11 Richard Guenther <rguenther@suse.de>
9955
9956 * c-common.c (complete_array_type): Build a range type of
9957 proper type.
9958
dcf0c47e
NF
99592011-04-08 Nathan Froyd <froydnj@codesourcery.com>
9960
9961 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
9962 (handle_type_generic_attribute): Likewise.
9963
1ee44b26
JM
99642011-04-07 Jason Merrill <jason@redhat.com>
9965
9966 PR c++/48450
9967 * c-common.c (c_common_truthvalue_conversion): Don't ignore
9968 conversion from C++0x scoped enum.
9969
acce4e77
JM
99702011-04-06 Joseph Myers <joseph@codesourcery.com>
9971
9972 * c-target-def.h: New file.
9973 * c-target.def: New file.
9974 * c-target.h: New file.
9975 * c-common.c (targetcm): Don't define here.
9976 * c-common.h (default_handle_c_option): Declare.
9977 * c-format.c: Include c-target.h instead of target.h.
9978 * c-opts.c: Include c-target.h instead of target.h. Explicitly
9979 include tm.h.
9980 (default_handle_c_option): Move from targhooks.c.
9981
e2eefb55
JJ
99822011-03-29 Jakub Jelinek <jakub@redhat.com>
9983
9984 PR preprocessor/48248
9985 * c-ppoutput.c (print): Add src_file field.
9986 (init_pp_output): Initialize it.
9987 (maybe_print_line): Don't optimize by adding up to 8 newlines
9988 if map->to_file and print.src_file are different file.
9989 (print_line): Update print.src_file.
9990
ba78087b
KT
99912011-03-25 Kai Tietz <ktietz@redhat.com>
9992
9993 * c-ada-spec.c (compare_comment): Use filename_cmp
9994 instead of strcmp for filename.
9995
0edf1bb2
JL
99962011-03-25 Jeff Law <law@redhat.com>
9997
adfac8df 9998 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 9999
c7dc8804
JM
100002011-03-25 Jason Merrill <jason@redhat.com>
10001
10002 * c.opt: Add -std=c++03.
10003
d1d879b1
EB
100042011-03-22 Eric Botcazou <ebotcazou@adacore.com>
10005
10006 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
10007
3f8257db 100082011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
10009
10010 PR target/12171
5050afdf
KT
10011 * c-pretty-print.c (pp_c_specifier_qualifier_list):
10012 Display allowed attributes for function pointer types.
10013 (pp_c_attributes_display): New function to display
10014 attributes having affects_type_identity flag set to true.
10015 * c-pretty-print.h (pp_c_attributes_display): New prototype.
10016
62d784f7
KT
10017 * c-common.c (c_common_attribute_table):
10018 Add new element.
10019 (c_common_format_attribute_table): Likewise.
10020
82d37118
JM
100212011-03-18 Jason Merrill <jason@redhat.com>
10022
49a000c3
JM
10023 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
10024 * c-common.h: Don't declare it here.
10025 * c-common.c: Or define it here.
10026 * c-opts.c (c_common_handle_option): Or set it here.
10027
82d37118
JM
10028 PR c++/35315
10029 * c-common.c (handle_transparent_union_attribute): Don't
10030 make a duplicate type in C++.
10031
17bc631c
JM
100322011-03-15 Jason Merrill <jason@redhat.com>
10033
10034 * c-common.c (max_constexpr_depth): New.
10035 * c-common.h: Declare it.
10036 * c-opts.c (c_common_handle_option): Set it.
10037 * c.opt (fconstexpr-depth): New option.
10038
1b9b91a6
JM
100392011-03-11 Jason Merrill <jason@redhat.com>
10040
f231b5ff
JM
10041 * c-common.c (attribute_takes_identifier_p): Add missing const.
10042
1b9b91a6
JM
10043 PR c++/46803
10044 * c-common.c (attribute_takes_identifier_p): Assume that an
10045 unknown attribute takes an identifier.
10046
a19e4d44
NF
100472011-03-07 Nathan Froyd <froydnj@codesourcery.com>
10048
10049 PR c/47786
10050 * c-common.c (c_type_hash): Call list_length instead of iterating
10051 through DECL_CHAIN. Rename 'i' to 'n_elements'.
10052
982d62f6
JJ
100532011-02-19 Jakub Jelinek <jakub@redhat.com>
10054
10055 PR c/47809
10056 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
10057
0a256240
NP
100582011-02-17 Iain Sandoe <iains@gcc.gnu.org>
10059
10060 * c.opt (fobjc-abi-version=) New.
10061 (fobjc-nilcheck): New.
10062
ba9e6dd5
NF
100632011-02-03 Nathan Froyd <froydnj@codesourcery.com>
10064
10065 PR c++/46890
10066 * c-common.h (keyword_is_decl_specifier): Declare.
10067 * c-common.c (keyword_is_decl_specifier): Define.
10068 (keyword_is_function_specifier): New function.
10069
7273813a
JJ
100702011-01-26 Jakub Jelinek <jakub@redhat.com>
10071
10072 PR c/47473
10073 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
10074 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
10075 REAL_TYPE.
10076
908ef79b
AC
100772011-01-26 Arnaud Charlet <charlet@adacore.com>
10078
10079 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
10080
237e9384
JJ
100812011-01-26 Jakub Jelinek <jakub@redhat.com>
10082
10083 PR pch/47430
10084 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
10085 after init_c_lex if pch_file is set.
10086
47ea1edf
DK
100872011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
10088
d4dba752 10089 PR c++/43601
47ea1edf
DK
10090 * c.opt (-fkeep-inline-dllexport): New switch.
10091
2aa9c6ae
RG
100922011-01-12 Richard Guenther <rguenther@suse.de>
10093
10094 PR middle-end/32511
10095 * c-common.c (handle_weak_attribute): Warn instead of error
10096 on declaring an inline function weak.
10097
7bd11157
TT
100982011-01-05 Tom Tromey <tromey@redhat.com>
10099
10100 * c-common.h (lvalue_error): Update.
10101 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
10102 not error.
10103
0e66e494 101042010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 10105
b4f588c4
NP
10106 PR objc/47075
10107 * c-objc.h (objc_finish_message_expr): Added argument to
10108 prototype.
10109
f4da8dce
NF
101102010-12-22 Nathan Froyd <froydnj@codesourcery.com>
10111
10112 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
10113 Use prototype_p.
10114
46270f14
NP
101152010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
10116
10117 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 10118 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 10119
4816c593
NF
101202010-12-10 Nathan Froyd <froydnj@codesourcery.com>
10121
10122 * c-common.h (readonly_error): Declare.
10123 * c-common.c (readonly_error): Define.
10124
7a6daeb0
NF
101252010-12-09 Nathan Froyd <froydnj@codesourcery.com>
10126
10127 * c-common.h (invalid_indirection_error): Declare.
10128 * c-common.c (invalid_indirection_error): Define.
10129
892f6119
RG
101302010-12-03 Richard Guenther <rguenther@suse.de>
10131
10132 PR c/46745
10133 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
10134 (pp_c_unary_expression): Likewise.
10135 (pp_c_expression): Likewise.
10136
6c39e757
NP
101372010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
10138
10139 * c-common.h (objc_finish_function): New.
10140 (objc_non_volatilized_type): Removed.
10141 (objc_type_quals_match): Removed.
10142 * stub-objc.c (objc_finish_function): New.
10143 (objc_non_volatilized_type): Removed.
10144 (objc_type_quals_match): Removed.
9faeb493 10145
7c475d11
JM
101462010-11-30 Joseph Myers <joseph@codesourcery.com>
10147
10148 * c-common.h (parse_optimize_options): Declare.
10149 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
10150 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
10151
71f3e391
JM
101522010-11-29 Joseph Myers <joseph@codesourcery.com>
10153
10154 * c-opts.c (check_deps_environment_vars): Use getenv instead of
10155 GET_ENVIRONMENT.
10156 * c-pch.c (O_BINARY): Don't define here.
10157 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
10158
d5fabb58
JM
101592010-11-25 Joseph Myers <joseph@codesourcery.com>
10160
10161 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
10162 targetm.except_unwind_info.
10163
299404a1
JM
101642010-11-23 Joseph Myers <joseph@codesourcery.com>
10165
10166 * c-opts.c (c_common_handle_option): Pass location to
10167 set_struct_debug_option.
10168
c98cd5bf
JM
101692010-11-23 Joseph Myers <joseph@codesourcery.com>
10170
10171 * c-common.c (visibility_options): Move from ../opts.c.
10172 * c-common.h (struct visibility_flags, visibility_options):
10173 Declare here.
10174 * c-opts.c (finish_options): Rename to c_finish_options.
10175 (c_common_init): Update call to finish_options.
10176
a9546771
NP
101772010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
10178
10179 PR objc/34033
10180 * c-lex.c (lex_string): Check that each string in an Objective-C
10181 string concat sequence starts with either one or zero '@', and
10182 that there are no spurious '@' signs at the end.
10183
24a57808
JM
101842010-11-20 Joseph Myers <joseph@codesourcery.com>
10185
10186 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
10187 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
10188 HANDLE_PRAGMA_VISIBILITY.
10189 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
10190 HANDLE_PRAGMA_VISIBILITY): Don't define.
10191 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
10192
a9aa2c3a
NF
101932010-11-20 Nathan Froyd <froydnj@codesourcery.com>
10194
10195 PR c++/16189
10196 PR c++/36888
10197 PR c++/45331
10198 * c-common.h (keyword_begins_type_specifier): Declare.
10199 (keyword_is_storage_class_specifier): Declare.
10200 (keyword_is_type_qualifier): Declare.
10201 * c-common.c (keyword_begins_type_specifier): New function.
10202 (keyword_is_storage_class_specifier): New function.
10203 (keyword_is_type_qualifier): Declare.
10204
5386338c
JM
102052010-11-19 Joseph Myers <joseph@codesourcery.com>
10206
10207 PR c/46547
10208 * c-common.c (in_late_binary_op): Define.
10209 (c_common_truthvalue_conversion): Check in_late_binary_op before
10210 calling c_save_expr.
10211 * c-common.h (in_late_binary_op): Declare.
10212
69ccdddb
JM
102132010-11-19 Joseph Myers <joseph@codesourcery.com>
10214
10215 * c-opts.c (c_common_handle_option): Update calls to
10216 set_struct_debug_option.
10217
6b192a09
NP
102182010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
10219
10220 * c-common.h (objc_declare_protocols): Added additional argument.
10221 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 10222
fb52b50a
NF
102232010-11-18 Nathan Froyd <froydnj@codesourcery.com>
10224
10225 PR c/33193
10226 * c-common.h (build_real_imag_expr): Declare.
10227 * c-semantics.c (build_real_imag_expr): Define.
10228
b37421c6
JM
102292010-11-17 Joseph Myers <joseph@codesourcery.com>
10230
10231 * c-opts.c (c_common_parse_file): Take no arguments.
10232 * c-common.h (c_common_parse_file): Update prototype.
10233
07078664
JJ
102342010-11-16 Jakub Jelinek <jakub@redhat.com>
10235
10236 PR c++/46401
10237 * c-common.c (warning_candidate_p): Don't track non-const calls
10238 or STRING_CSTs.
10239
c6a13190
ILT
102402010-11-15 Ian Lance Taylor <iant@google.com>
10241
10242 * c-lex.c (init_c_lex): Set macro debug callbacks if
10243 flag_dump_go_spec is set.
10244
925e8657
NP
102452010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
10246
10247 * c-common.h (objc_build_incr_expr_for_property_ref): New.
10248 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
10249
bb0a9581
NF
102502010-11-15 Nathan Froyd <froydnj@codesourcery.com>
10251
10252 PR preprocessor/45038
10253 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
10254 dialects.
10255
c5fa0890
JM
102562010-11-12 Joseph Myers <joseph@codesourcery.com>
10257
10258 * c-common.h (c_family_lang_mask): Declare.
10259 * c-opts.c (c_family_lang_mask): Make extern.
10260 * c-pragma.c (handle_pragma_diagnostic): Use
10261 control_warning_option.
10262
a4d8c676
JM
102632010-11-12 Joseph Myers <joseph@codesourcery.com>
10264
10265 * c-common.c (parse_optimize_options): Update call to
10266 decode_options.
10267 * c-common.h (c_common_handle_option): Update prototype.
10268 * c-opts.c (c_common_handle_option): Take location_t parameter and
10269 pass it to other functions.
10270
f954bd2c
JM
102712010-11-11 Joseph Myers <joseph@codesourcery.com>
10272
10273 * c-opts.c (warning_as_error_callback): Remove.
10274 (c_common_initialize_diagnostics): Don't call
10275 register_warning_as_error_callback.
10276 (c_common_handle_option): Handle -Werror=normalized= here.
10277
d8a07487
JM
102782010-11-10 Joseph Myers <joseph@codesourcery.com>
10279
10280 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
10281 in diagnostic.
10282 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
10283 letter.
10284 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
10285 Remove trailing '.' from diagnostics.
10286 * c.opt (Wwrite-strings_: Avoid '`' in help text.
10287
d5478783
JM
102882010-11-10 Joseph Myers <joseph@codesourcery.com>
10289
10290 * c-common.c (parse_optimize_options): Pass global_dc to
10291 decode_options.
10292 * c-opts.c (c_common_handle_option): Pass &global_options to
10293 set_Wstrict_aliasing.
10294 * c.opt (v): Don't mark Common or document here.
10295
91ebb981
IS
102962010-11-06 Iain Sandoe <iains@gcc.gnu.org>
10297
10298 PR target/44981
10299 * c-format.c (format_type): New type gcc_objc_string_format_type.
10300 (valid_stringptr_type_p): New.
10301 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 10302 (check_format_string): Pass expected type, use
91ebb981
IS
10303 valid_stringptr_type_p (), check that the format string types are
10304 consistent with the format specification.
10305 (decode_format_attr): Warn if NSString is used outside objective-c.
10306 (format_types_orig): Add NSString.
10307 (format_name): New.
10308 (format_flags): New.
10309 (check_format_arg): Handle format strings requiring an external parser.
10310 first_target_format_type: New variable.
10311 (handle_format_attribute): Set up first_target_format_type, pass the
10312 expected format arg string type to check_format_string().
ab20d992 10313 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
91ebb981
IS
10314 * stub-objc.c (objc_string_ref_type_p): New.
10315 (objc_check_format_arg): New.
10316
bede2adc
NP
103172010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
10318
9faeb493 10319 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
10320 * c-common.h (objc_build_class_component_ref): New.
10321 * stub-objc.c (objc_build_class_component_ref): New.
10322
9a179d01
NP
103232010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
10324
10325 * c.opt (Wproperty-assign-default): New option.
10326
22d8d616
NP
103272010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
10328
10329 Implemented -fobjc-std=objc1 flag.
10330 * c.opt (fobjc-std=objc1): New option.
10331
2debdb4f
NP
103322010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
10333
10334 Implemented format and noreturn attributes for Objective-C methods.
10335 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
10336 attribute for Objective-C methods.
10337
ec52b111
JM
103382010-10-31 Jason Merrill <jason@redhat.com>
10339
10340 * c-common.c (conversion_warning, warn_for_collisions_1): Use
10341 EXPR_LOC_OR_HERE.
10342
46a88c12
NP
103432010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
10344
10345 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
10346 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
10347 (objc_add_property_declaration): Removed arguments for copies and
10348 ivar.
10349 (objc_build_getter_call): Renamed to
10350 objc_maybe_build_component_ref.
10351 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
10352 (objc_is_property_ref): New.
10353 * c-common.c (c_common_reswords): Removed copies and ivar.
10354 * stub-objc.c (objc_add_property_declaration): Removed arguments
10355 for copies and ivar.
10356 (objc_build_getter_call): Renamed to
10357 objc_maybe_build_component_ref.
10358 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
10359 (objc_is_property_ref): New.
9faeb493 10360
1e4bf85b
AC
103612010-10-29 Arnaud Charlet <charlet@adacore.com>
10362 Matthew Gingell <gingell@adacore.com>
10363
10364 * c-ada-spec.c (separate_class_package): New function.
10365 (pp_ada_tree_identifier): Prefix references to C++ classes with the
10366 name of their enclosing package.
10367 (print_ada_declaration): Use separate_class_package.
10368
81f0bab2
JM
103692010-10-27 Jason Merrill <jason@redhat.com>
10370
2b08f2c5
JM
10371 * c-common.c (c_common_reswords): Add __is_literal_type.
10372 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
10373
81f0bab2
JM
10374 * c-common.c (check_case_value): Remove special C++ code.
10375
200290f2
NP
103762010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
10377
10378 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
10379 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
10380 and RID_LAST_PATTR.
10381 (objc_add_property_declaration): Added additional arguments.
10382 (objc_property_attribute_kind): Removed.
10383 (objc_set_property_attr): Removed.
10384 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
10385 copy and nonatomic.
10386 * stub-objc.c (objc_add_property_declaration): Added additional
10387 arguments.
10388 (objc_set_property_attr): Removed.
9faeb493 10389
f614132b
NP
103902010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
10391
10392 * c-common.h (objc_add_property_variable): Renamed to
10393 objc_add_property_declaration. Added location argument.
10394 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 10395
b8a18805
NP
103962010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
10397
10398 * c-common.h (objc_maybe_printable_name): New.
10399 * stub-objc.c (objc_maybe_printable_name): New.
10400
3f8257db
JJ
104012010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
10402 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
10403
10404 * c-common.h (c_common_mark_addressable_vec): Declare.
10405 * c-common.c (c_common_mark_addressable_vec): New function.
10406
249a82c4
NP
104072010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
10408
10409 * c-common.h (objc_set_method_type): Removed.
10410 (objc_add_method_declaration): Added boolean argument.
10411 (objc_start_method_definition): Same change.
10412 (objc_build_method_signature): Same change.
10413 * stub-objc.c (objc_set_method_type): Removed.
10414 (objc_add_method_declaration): Added boolean argument.
10415 (objc_start_method_definition): Same change.
10416 (objc_build_method_signature): Same change.
10417
977e30bc
NP
104182010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
10419
10420 * c-common.h (finish_file): Removed.
10421 (objc_write_global_declarations): New.
10422 * c-opts.c (c_common_parse_file): Do not call finish_file.
10423 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 10424
da57d1b9
NP
104252010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
10426
10427 Implemented parsing @synthesize and @dynamic for
10428 Objective-C/Objective-C++.
10429 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
10430 (objc_add_synthesize_declaration): New.
10431 (objc_add_dynamic_declaration): New.
10432 * c-common.c (c_common_reswords): Add synthesize and dynamic.
10433 * stub-objc.c (objc_add_synthesize_declaration): New.
10434 (objc_add_dynamic_declaration): New.
9faeb493 10435
0069111f
MM
104362010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
10437
10438 PR target/46041
10439 * c-cppbuiltin.c (mode_has_fma): Move function here from
10440 builtins.c. Don't use the fma optab, instead just use the
10441 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
10442 using -save-temps.
10443
e426b47b
NP
104442010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
10445
10446 Merge from 'apple/trunk' branch on FSF servers.
0069111f 10447
3f8257db 10448 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 10449
9faeb493 10450 Radar 4330422
e426b47b
NP
10451 * c-common.h (objc_non_volatilized_type): New declaration
10452 * stub-objc.c (objc_non_volatilized_type): New stub.
10453
90fbfdc3
NP
104542010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
10455
e426b47b 10456 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 10457
ab20d992 10458 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 10459
9faeb493 10460 Radar 4133425
90fbfdc3 10461 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 10462 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 10463
c37d8c30
IS
104642010-10-17 Iain Sandoe <iains@gcc.gnu.org>
10465
10466 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
10467 * c-common.h (enum rid): Add RID_AT_PACKAGE.
10468 (objc_ivar_visibility_kind): New enum.
10469 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 10470 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
10471 visibility enum.
10472
1b1562a5
MM
104732010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
10474
10475 * c-cppbuiltin.c (builtin_define_float_constants): Emit
10476 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
10477 has the appropriate fma builtins.
10478 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
10479
668ea4b1
IS
104802010-10-14 Iain Sandoe <iains@gcc.gnu.org>
10481
1b1562a5 10482 merge from FSF apple 'trunk' branch.
3f8257db 10483 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 10484
668ea4b1
IS
10485 Radars 4436866, 4505126, 4506903, 4517826
10486 * c-common.c (c_common_resword): Define @property and its attributes.
10487 * c-common.h: Define property attribute enum entries.
10488 (OBJC_IS_PATTR_KEYWORD): New.
10489 (objc_property_attribute_kind): New enum.
10490 Declare objc_set_property_attr (), objc_add_property_variable (),
10491 objc_build_getter_call () and objc_build_setter_call ().
10492 * stub-objc.c (objc_set_property_attr): New stub.
10493 (objc_add_property_variable): Likewise.
10494 (objc_build_getter_call): Likewise.
10495 (objc_build_setter_call) Likewise.
1b1562a5 10496
a1178b30
IS
104972010-10-13 Iain Sandoe <iains@gcc.gnu.org>
10498
1b1562a5 10499 merge from FSF apple 'trunk' branch.
ab20d992 10500 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
10501
10502 Radar 3803157 (method attributes)
10503 * c-common.c (handle_deprecated_attribute): Recognize
10504 objc methods as valid declarations.
10505 * c-common.h: Declare objc_method_decl ().
1b1562a5 10506 * stub-objc.c (objc_method_decl): New stub.
a1178b30 10507
a75bfaa6
JM
105082010-10-08 Joseph Myers <joseph@codesourcery.com>
10509
10510 * c-common.c (parse_optimize_options): Call
10511 decode_cmdline_options_to_array_default_mask before
10512 decode_options. Update arguments to decode_options.
10513 * c-common.h (c_common_init_options_struct): Declare.
10514 * c-opts.c (c_common_init_options_struct): New. Split out from
10515 c_common_init_options.
10516
f05b9d93
NP
105172010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
10518
10519 Implemented fast enumeration for Objective-C.
10520 * c-common.h (objc_finish_foreach_loop): New.
10521 * stub-objc.c (objc_finish_foreach_loop): New.
10522
1ebe4b4f
JM
105232010-10-05 Joseph Myers <joseph@codesourcery.com>
10524
10525 * c-common.h (struct diagnostic_context): Don't declare here.
10526 (c_common_initialize_diagnostics): Declare using
10527 diagnostic_context typedef.
10528 * c-opts.c (c_common_handle_option): Pass global_dc to
10529 handle_generated_option.
10530
d4d24ba4
JM
105312010-10-04 Joseph Myers <joseph@codesourcery.com>
10532
10533 * c-opts.c (c_common_handle_option): Pass &global_options_set to
10534 handle_generated_option.
10535
478a1c5b
ILT
105362010-10-03 Ian Lance Taylor <iant@google.com>
10537
10538 * c.opt (-fplan9-extensions): New option.
10539
82a1c2fe
FXC
105402010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
10541
10542 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
10543 Remove.
10544 (c_cpp_builtins): Call functions from cppbuiltin.c instead
10545 of duplicating code.
10546
92902b1b
IS
105472010-09-30 Iain Sandoe <iains@gcc.gnu.org>
10548
10549 * c-common.c: Add two new entries for @optional
10550 and @required keywords.
10551
10552 merge from FSF 'apple/trunk' branch.
3f8257db 10553 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
10554
10555 Radar 4386773
10556 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
10557 objective-c keywords.
10558 (objc_set_method_opt): New declaration.
10559 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 10560
46625112
JM
105612010-09-30 Joseph Myers <joseph@codesourcery.com>
10562
10563 * c-common.c (handle_optimize_attribute): Pass &global_options to
10564 cl_optimization_save and cl_optimization_restore.
10565 * c-opts.c (c_common_handle_option): Pass &global_options to
10566 handle_generated_option.
10567 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
10568 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
10569 &global_options to cl_optimization_restore.
10570
49b91f05
NP
105712010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
10572
10573 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
10574 Objective-C/Objective-C++ keywords.
10575
13ed556f 105762010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 10577
9faeb493
UB
10578 Merge from 'apple/trunk' branch on FSF servers.
10579
3f8257db 10580 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
10581
10582 Radar 4281748
10583 * c-common.h (objc_check_global_decl): New declaration.
10584 * stub-objc.c (objc_check_global_decl): New stub.
10585
f0036cca
JM
105862010-09-29 Joseph Myers <joseph@codesourcery.com>
10587
10588 * c.opt: Don't use VarExists.
10589
e3339d0f
JM
105902010-09-29 Joseph Myers <joseph@codesourcery.com>
10591
10592 * c-common.c (c_cpp_error): Update names of diagnostic_context
10593 members.
10594 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
10595 cl_optimization members.
10596 * c-opts.c (warning_as_error_callback, c_common_handle_option,
10597 sanitize_cpp_opts, finish_options): Update names of cpp_options
10598 members.
10599
1973201f
NP
106002010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
10601
10602 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
10603 (objc_is_reserved_word): Removed.
10604 * c-common.c: Updated comments.
10605 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
10606 objc_is_reserved_word.
10607 * stub-objc.c (objc_is_reserved_word): Removed.
10608
f7e71da5
IS
106092010-09-28 Iain Sandoe <iains@gcc.gnu.org>
10610
9faeb493 10611 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
10612 include attributes.
10613 (objc_start_method_definition): Likewise.
10614 (objc_build_keyword_decl): Likewise.
10615 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
10616 (objc_start_method_definition): Likewise.
10617 (objc_build_keyword_decl): Likewise.
10618
c165dca7
IS
106192010-09-28 Iain Sandoe <iains@gcc.gnu.org>
10620
10621 * c-common.h (objc_start_class_interface): Adjust prototype.
10622 (objc_start_category_interface): Likewise.
10623 (objc_start_protocol): Likewise.
10624 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
10625 (objc_start_class_interface): Likewise.
10626 (objc_start_category_interface): Likewise.
10627
7458026b
ILT
106282010-09-27 Ian Lance Taylor <iant@google.com>
10629
10630 * c-common.c (c_common_attribute_table): Add no_split_stack.
10631 (handle_no_split_stack_attribute): New static function.
10632
b581b85b
NP
106332010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
10634
9faeb493 10635 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 10636
3f8257db 10637 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 10638
9faeb493 10639 Radar 4229905
b581b85b
NP
10640 * c-common.h (objc_have_common_type): New declaration.
10641 * stub-objc.c (objc_have_common_type): New stub.
10642
10643 2005-06-22 Ziemowit Laski <zlaski@apple.com>
10644
10645 Radar 4154928
10646 * c-common.h (objc_common_type): New prototype.
9faeb493 10647 * stub-objc.c (objc_common_type): New stub.
b581b85b 10648
46a4da10
JH
106492010-09-24 Jan Hubicka <jh@suse.cz>
10650
10651 * c-common.c (handle_leaf_attribute): New function.
10652 (struct attribute_spec c_common_att): Add leaf.
10653
e200444e
JM
106542010-09-22 Joseph Myers <joseph@codesourcery.com>
10655
10656 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
10657 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
10658 -dump, -dump=, -imacros, -imacros=, -include, -include=,
10659 -include-barrier, -include-directory, -include-directory=,
10660 -include-directory-after, -include-directory-after=,
10661 -include-prefix, -include-prefix=, -include-with-prefix,
10662 -include-with-prefix=, -include-with-prefix-after,
10663 -include-with-prefix-after=, -include-with-prefix-before,
10664 -include-with-prefix-before=, -no-integrated-cpp,
10665 -no-line-commands, -no-standard-includes, -no-warnings, -output,
10666 -output=, -pedantic, -pedantic-errors, -preprocess,
10667 -print-missing-file-dependencies, -trace-includes, -traditional,
10668 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
10669 -user-dependencies, -verbose, -write-dependencies,
10670 -write-user-dependencies, no-integrated-cpp, traditional): New.
10671
29a80ea6
NP
106722010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
10673
10674 PR objc/23710
ac1fc2fc
NP
10675 * c-common.h (objc_start_method_definition): Return bool instead
10676 of void.
10677 * stub-objc.c (objc_start_method_definition): Return bool instead
10678 of void.
10679
106802010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
10681
10682 PR objc/25965
10683 * c-common.h (objc_get_interface_ivars): New declaration.
10684 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 10685
de621752
ILT
106862010-09-15 Ian Lance Taylor <iant@google.com>
10687
10688 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 10689 messages. Remove period at end of warning message.
de621752 10690
ba885ec5
NS
106912010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10692
10693 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
10694 (handle_alias_attribute): ... here.
10695 (handle_ifunc_attribute): New.
10696
c5ee1358
MM
106972010-09-06 Mark Mitchell <mark@codesourcery.com>
10698
10699 * c-common.h (do_warn_double_promotion): Declare.
10700 * c-common.c (do_warn_double_promotion): Define.
10701
0a0b3574
MM
107022010-09-05 Mark Mitchell <mark@codesourcery.com>
10703
10704 * c.opt (Wdouble-promotion): New.
10705
d1779886
JM
107062010-09-02 Joseph Myers <joseph@codesourcery.com>
10707
10708 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
10709 fvtable-thunks, fxref): Mark no longer supported in help text.
10710
2d2bd949
JM
107112010-09-02 Joseph Myers <joseph@codesourcery.com>
10712
10713 * c.opt (Wimport, fall-virtual, falt-external-templates,
10714 fdefault-inline, fenum-int-equiv, fexternal-templates,
10715 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
10716 fname-mangling-version-, fnew-abi, fnonnull-objects,
10717 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
10718 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
10719 applicable.
10720 (fhandle-exceptions): Mark with Alias and Warn.
10721 * c-opts.c (c_common_handle_option): Don't handle options marked
10722 as ignored.
10723
5de8299c
JM
107242010-09-02 Joseph Myers <joseph@codesourcery.com>
10725
10726 * c.opt (Wcomments, Werror-implicit-function-declaration,
10727 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
10728 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
10729 aliases.
10730 * c-common.c (option_codes): Use OPT_Wcomment instead of
10731 OPT_Wcomments.
10732 * c-opts.c (warning_as_error_callback, c_common_handle_option):
10733 Don't handle options marked as aliases.
10734
0ceb0201
RG
107352010-08-25 Richard Guenther <rguenther@suse.de>
10736
10737 * c-common.c (c_common_get_alias_set): Remove special
10738 handling for pointers.
10739
ac47786e
NF
107402010-08-20 Nathan Froyd <froydnj@codesourcery.com>
10741
10742 * c-common.c: Use FOR_EACH_VEC_ELT.
10743 * c-gimplify.c: Likewise.
10744 * c-pragma.c: Likewise.
10745
c878765b
JM
107462010-08-16 Joseph Myers <joseph@codesourcery.com>
10747
10748 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
10749 RejectDriver.
10750 (MMDX): Change back to MMD. Mark NoDriverArg instead of
10751 RejectDriver.
10752 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
10753 instead of OPT_MDX and OPT_MMDX.
10754
603349bf
JM
107552010-08-16 Joseph Myers <joseph@codesourcery.com>
10756
10757 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
10758
644fa7ac
JM
107592010-08-12 Joseph Myers <joseph@codesourcery.com>
10760
10761 * c.opt (MD, MMD): Change to MDX and MMDX.
10762 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
10763
481e1176
JM
107642010-08-11 Joseph Myers <joseph@codesourcery.com>
10765
10766 * c-opts.c (c_common_handle_option): Call handle_generated_option
10767 instead of handle_option.
10768
ac8dc9f7
NF
107692010-08-08 Nathan Froyd <froydnj@codesourcery.com>
10770
10771 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
10772 (maybe_apply_renaming_pragma): Delete unneeded declarations.
10773
4f8c876d
NF
107742010-08-08 Nathan Froyd <froydnj@codesourcery.com>
10775
10776 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
10777 (pending_redefine_extname): Change type to a VEC.
10778 (add_to_renaming_pragma_list): Update for new type of
10779 pending_redefine_extname.
ac8dc9f7 10780 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 10781
3b0c690e
AC
107822010-08-04 Arnaud Charlet <charlet@adacore.com>
10783
10784 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
10785 visited.
10786 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
10787 decide whether a type has already been declared/seen.
10788 Do not go to the original type.
10789 (dump_nested_types): New parameter forward.
10790 Generate forward declaration if needed and mark type as visited.
10791 (print_ada_declaration): Call dump_nested_types if not already done.
10792 Mark types as visited.
10793
1890bccc
JM
107942010-08-03 Joseph Myers <joseph@codesourcery.com>
10795
10796 * c.opt (-print-pch-checksum): Remove option.
10797 * c-opts.c (c_common_handle_option): Don't handle
10798 OPT_print_pch_checksum.
10799
5f20c657
JM
108002010-07-27 Joseph Myers <joseph@codesourcery.com>
10801
10802 * c-common.h (c_common_handle_option): Update prototype and return
10803 value type.
10804 * c-opts.c (c_common_handle_option): Update prototype and return
10805 value type. Update calls to handle_option and
10806 enable_warning_as_error.
10807
f551f80c
JJ
108082010-07-27 Jakub Jelinek <jakub@redhat.com>
10809
10810 PR c/45079
10811 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
10812
61ff2bdc
JM
108132010-07-27 Joseph Myers <joseph@codesourcery.com>
10814
10815 * c-common.h (c_common_missing_argument): Remove.
10816 * c-opts.c (c_common_missing_argument): Remove.
10817 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
10818 idirafter, imacros, include, isysroot, isystem, iquote): Add
10819 MissingArgError.
10820 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
10821
7a9bf9a4
JM
108222010-07-27 Joseph Myers <joseph@codesourcery.com>
10823
10824 * c-common.h (c_common_option_lang_mask,
10825 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
10826 New.
10827 (c_common_init_options): Update prototype.
10828 * c-opts.c (c_common_option_lang_mask): New.
10829 (c_common_initialize_diagnostics): Split out of
10830 c_common_init_options.
10831 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
10832 New.
10833 (c_common_init_options): Update prototype. Use decoded options in
10834 search for -lang-asm.
10835
910ad8de
NF
108362010-07-15 Nathan Froyd <froydnj@codesourcery.com>
10837
10838 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
10839 * c-format.c: Likewise.
10840
718f9c0f
MLI
108412010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
10842
10843 * c-common.h: Include diagnostic-core.h. Error if already
10844 included.
10845 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
10846
4d451982
MLI
108472010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
10848
adfac8df 10849 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
10850 Do not include expr.h
10851 (vector_mode_valid_p): Move here.
10852
119fe915
SB
108532010-06-21 DJ Delorie <dj@redhat.com>
10854
10855 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
10856 allow these pragmas anywhere.
10857
108582010-06-14 Jakub Jelinek <jakub@redhat.com>
10859
10860 PR bootstrap/44509
10861 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
10862 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
10863 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
10864 ggc_strdup instead of xstrdup.
10865
108662010-06-10 Jakub Jelinek <jakub@redhat.com>
10867
10868 * c-cppbuiltin.c: Include cpp-id-data.h.
10869 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
10870 (lazy_hex_fp_value): New function.
10871 (builtin_define_with_hex_fp_value): Provide definitions lazily.
10872
6662d794
MLI
108732010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
10874
10875 * c-gimplify.c: Do not include tree-flow.h
10876
38f8b050
JR
108772010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
10878
10879 PR other/44034
10880 * c-common.c: Rename targetm member:
10881 targetm.enum_va_list -> targetm.enum_va_list_p
10882
9589f23e
AS
108832010-06-28 Anatoly Sokolov <aesok@post.ru>
10884
10885 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
10886
3b06d379
SB
108872010-06-28 Steven Bosscher <steven@gcc.gnu.org>
10888
10889 * c-cppbuiltin.c: Do not include except.h.
10890
d166d4c3
AK
108912010-06-24 Andi Kleen <ak@linux.intel.com>
10892
9faeb493
UB
10893 * c-common.c (warn_for_omitted_condop): New.
10894 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 10895
70cb8be6
JM
108962010-06-21 Joseph Myers <joseph@codesourcery.com>
10897
10898 * c.opt (lang-objc): Remove.
10899 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
10900
a4c97feb
JR
109012010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
10902
10903 * c-opts.c: Include "tm_p.h".
10904
6e2f1956
JM
109052010-06-20 Joseph Myers <joseph@codesourcery.com>
10906
10907 * c-common.c (parse_optimize_options): Update call to
10908 decode_options.
10909
bc87224e
NF
109102010-06-18 Nathan Froyd <froydnj@codesourcery.com>
10911
10912 * c-common.c (record_types_used_by_current_var_decl): Adjust for
10913 new type of types_used_by_cur_var_decl.
10914
b49cf425
JR
109152010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
10916
10917 PR bootstrap/44512
10918 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
10919 for C++ standard compliance.
10920
59f9c2ed
JM
109212010-06-16 Jason Merrill <jason@redhat.com>
10922
10923 * c.opt: Add -Wnoexcept.
10924
33766b66
RG
109252010-06-16 Richard Guenther <rguenther@suse.de>
10926
10927 PR c/44555
10928 * c-common.c (c_common_truthvalue_conversion): Remove
10929 premature and wrong optimization concering ADDR_EXPRs.
10930
eff7e30c
AC
109312010-06-15 Arnaud Charlet <charlet@adacore.com>
10932
10933 * c-ada-spec.c (dump_sloc): Remove column info.
10934 (is_simple_enum): New function.
10935 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
10936 enum types when relevant.
10937
6312e84d
MLI
109382010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
10939
9faeb493 10940 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
10941 location.
10942
1cb42611
JM
109432010-06-10 Joseph Myers <joseph@codesourcery.com>
10944
10945 * c-opts.c (c_common_handle_option): Don't handle
10946 OPT_fshow_column.
10947
a9429e29
LB
109482010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
10949
10950 * c-pragma.c (push_alignment): Use typed GC allocation.
10951 (handle_pragma_push_options): Likewise.
10952
10953 * c-common.c (parse_optimize_options): Likewise.
10954
10955 * c-common.h (struct sorted_fields_type): Add variable_size GTY
10956 option.
10957
5498f011
JM
109582010-06-07 Joseph Myers <joseph@codesourcery.com>
10959
10960 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
10961 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
10962 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
10963 flag_signed_bitfields, warn_strict_null_sentinel,
10964 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
10965 flag_gen_declaration, flag_no_gnu_keywords,
10966 flag_implement_inlines, flag_implicit_templates,
10967 flag_implicit_inline_templates, flag_optional_diags,
10968 flag_elide_constructors, flag_default_inline, flag_rtti,
10969 flag_conserve_space, flag_access_control, flag_check_new,
10970 flag_new_for_scope, flag_weak, flag_working_directory,
10971 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
10972 flag_enforce_eh_specs, flag_threadsafe_statics,
10973 flag_pretty_templates): Remove.
10974 * c-common.h (flag_preprocess_only, flag_nil_receivers,
10975 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
10976 flag_replace_objc_classes, flag_undef, flag_no_builtin,
10977 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
10978 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
10979 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
10980 flag_no_gnu_keywords, flag_implement_inlines,
10981 flag_implicit_templates, flag_implicit_inline_templates,
10982 flag_optional_diags, flag_elide_constructors, flag_default_inline,
10983 flag_rtti, flag_conserve_space, flag_access_control,
10984 flag_check_new, flag_new_for_scope, flag_weak,
10985 flag_working_directory, flag_use_cxa_atexit,
10986 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
10987 flag_threadsafe_statics, flag_pretty_templates,
10988 warn_strict_null_sentinel): Remove.
10989 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
10990 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
10991 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
10992 fimplicit-inline-templates, fimplicit-templates,
10993 flax-vector-conversions, fms-extensions, fnil-receivers,
10994 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
10995 frtti, fshort-double, fshort-enums, fshort-wchar,
10996 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
10997 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
10998 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
10999 gen-decls, undef): Use Var.
11000 (fdefault-inline, foptional-diags): Document as doing nothing.
11001 * c-opts.c (c_common_handle_option): Remove cases for options now
11002 using Var. Mark ignored options as such.
11003
39dabefd
SB
110042010-06-05 Steven Bosscher <steven@gcc.gnu.org>
11005
9faeb493 11006 * c-common.c: Moved to here from parent directory.
39dabefd
SB
11007 * c-common.def: Likewise.
11008 * c-common.h: Likewise.
11009 * c-cppbuiltin.c: Likewise.
11010 * c-dump.c: Likewise.
11011 * c-format.c: Likewise.
11012 * c-format.h : Likewise.
11013 * c-gimplify.c: Likewise.
11014 * c-lex.c: Likewise.
11015 * c-omp.c: Likewise.
11016 * c.opt: Likewise.
11017 * c-opts.c: Likewise.
11018 * c-pch.c: Likewise.
11019 * c-ppoutput.c: Likewise.
11020 * c-pragma.c: Likewise.
11021 * c-pragma.h: Likewise.
11022 * c-pretty-print.c: Likewise.
11023 * c-pretty-print.h: Likewise.
11024 * c-semantics.c: Likewise.
11025 * stub-objc.c: Likewise.
11026
11027 * c-common.c: Include gt-c-family-c-common.h.
11028 * c-pragma.c: Include gt-c-family-c-pragma.h.
11029\f
8d9254fc 11030Copyright (C) 2010-2020 Free Software Foundation, Inc.
39dabefd
SB
11031
11032Copying and distribution of this file, with or without modification,
11033are permitted in any medium without royalty provided the copyright
11034notice and this notice are preserved.
This page took 3.805081 seconds and 5 git commands to generate.