]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
Daily bump.
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
69273534
GA
12020-06-28 Martin Sebor <msebor@redhat.com>
2
3 PR c++/86568
4 * c-common.c (struct nonnull_arg_ctx): Add members.
5 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
6 C++ member functions specially. Consider the this pointer implicitly
7 nonnull.
8 (check_nonnull_arg): Use location of argument when available.
9 (check_function_arguments): Use nonnull_arg_ctx as argument.
10
9a33c41f
GA
112020-06-27 Jakub Jelinek <jakub@redhat.com>
12
13 PR middle-end/95903
14 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
15 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
16 smaller precision intop operands separately.
17
c9c05f73
GA
182020-06-26 Marek Polacek <polacek@redhat.com>
19
20 * c-opts.c (c_common_init_options): Default to gnu++17.
21
aff95ee7
GA
222020-06-17 Jonathan Wakely <jwakely@redhat.com>
23
bd0a89dc 24 PR c/95378
aff95ee7
GA
25 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
26 pointer arguments.
27
56638b9b
GA
282020-06-16 Jakub Jelinek <jakub@redhat.com>
29
30 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
31 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
32 idx members.
33 (c_omp_is_loop_iterator): New function.
34 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
35 if outer loop iterator is present. Perform duplicate checking through
36 hash_set in the function rather than expecting caller to do that.
37 Pass NULL instead of d->ppset to walk_tree_1.
38 (c_omp_check_nonrect_loop_iv): New function.
39 (c_omp_check_loop_iv): Use it. Fill in new members, allow
40 non-rectangular loop forms, diagnose multiple associated loops with
41 the same iterator. Pass NULL instead of &pset to walk_tree_1.
42 (c_omp_check_loop_iv_exprs): Likewise.
43
ec6ffbb9
GA
442020-06-10 Martin Liska <mliska@suse.cz>
45
46 PR tree-optimization/92860
47 * c-attribs.c (handle_optimize_attribute):
48 Save global options and compare it after parsing of function
49 attribute.
50 * c-pragma.c (opt_stack::saved_global_options): New field.
51 (handle_pragma_push_options): Save global_options.
52 (handle_pragma_pop_options): Compare them after pop.
53
b952c2cf
GA
542020-06-09 Jakub Jelinek <jakub@redhat.com>
55
56 PR c/95580
57 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
58 case when MEM_REF's first argument has type pointer to incomplete type.
59
1a59f3db
GA
602020-06-05 Jason Merrill <jason@redhat.com>
61
62 * c-pretty-print.c (pp_c_additive_expression): Handle negative
63 operand to POINTER_PLUS_EXPR.
64
3add3425
GA
652020-06-04 Martin Sebor <msebor@redhat.com>
66
67 PR middle-end/10138
68 PR middle-end/95136
69 * c-attribs.c (append_access_attrs): Handle attr_access::none.
70 (handle_access_attribute): Same.
71
9a5b7438
GA
722020-06-03 Mark Wielaard <mark@klomp.org>
73
74 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
75 New function.
76 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
77 New function declaration.
78
792020-06-03 Mark Wielaard <mark@klomp.org>
80
81 * known-headers.cc (get_string_macro_hint): New function.
82 (get_stdlib_header_for_name): Use get_string_macro_hint.
83 (get_c_stdlib_header_for_string_macro_name): New function.
84 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
85 New function declaration.
86
872020-06-03 Tobias Burnus <tobias@codesourcery.com>
88
89 * c-common.h (c_omp_predetermined_mapping): Declare.
90 * c-omp.c (c_omp_predetermined_mapping): New.
91
af114c38
MW
922020-05-22 Mark Wielaard <mark@klomp.org>
93
94 * known-headers.cc (get_stdlib_header_for_name): Add a new
95 stdlib_hint array for stdbool and stdint.
96
45c50b6a
MW
972020-05-22 Mark Wielaard <mark@klomp.org>
98
99 * known-headers.cc (get_stdlib_header_for_name): Return
100 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
101 flag_isoc99.
102
c22027a0
NS
1032020-05-20 Nathan Sidwell <nathan@acm.org>
104
38a4db21
NS
105 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
106
c22027a0
NS
107 * c-common.c (try_to_locate_new_include_insertion_point): Use
108 strcmp to compare filenames.
109 * c-lex.c (init_c_lex): Move declaration to initialization.
110 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
111 deferred count loop.
112
29f0e90d
JM
1132020-05-15 Jason Merrill <jason@redhat.com>
114
115 * c-opts.c (set_std_cxx20): Set flag_coroutines.
116
b04445d4
JM
1172020-05-13 Jason Merrill <jason@redhat.com>
118
119 * c.opt (std=c++20): Make c++2a the alias.
120 (std=gnu++20): Likewise.
121 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
122 * c-opts.c: Adjust.
123 * c-cppbuiltin.c: Adjust.
124 * c-ubsan.c: Adjust.
125 * c-warn.c: Adjust.
126
11dd3be5
EB
1272020-05-12 Eric Botcazou <ebotcazou@adacore.com>
128
129 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
130
b224c376
NS
1312020-05-08 Nathan Sidwell <nathan@acm.org>
132
133 Reimplement directives only processing.
134 * c-ppoutput.c (token_streamer): Ne.
135 (directives_only_cb): New. Swallow ...
136 (print_lines_directives_only): ... this.
137 (scan_translation_unit_directives_only): Reimplment using the
138 published interface.
139
f1d94677
MP
1402020-05-07 Marek Polacek <polacek@redhat.com>
141
142 * c-format.c (badwords): Add "nonstatic".
143
9b95bb52
JJ
144202-05-07 Jakub Jelinek <jakub@redhat.com>
145
146 PR c/94968
147 * c-common.c (speculation_safe_value_resolve_params): Return false if
148 error_operand_p (val2).
149 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
150 Remove extraneous semicolon.
151
530b4409 1522020-05-06 qing zhao <qing.zhao@oracle.com>
153
154 PR c/94230
155 * c-indentation.c (get_visual_column): Add a hint to use the new
156 -flarge-source-files option.
157
b776bdca
SSF
1582020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
159
160 * c-attribs.c (handle_vector_size_attribute): Add attribute
161 nonnull for argument args in order to silence warning of
162 uninitialized variable usage. Since this is local to the
163 compilation unit and thus cannot be checked at call sides by the
164 compiler, added an assert statement in order to verify this.
165
6607bdd9
L
1662020-05-01 H.J. Lu <hongjiu.lu@intel.com>
167
168 PR target/93492
169 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
170 value to USHRT_MAX (65535).
171
691eeb65
JJ
1722020-04-29 Jakub Jelinek <jakub@redhat.com>
173
174 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
175
26d76be7
JJ
1762020-04-27 Jakub Jelinek <jakub@redhat.com>
177
178 PR c/94755
179 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
180 fncode == BUILT_IN_NONE before initialization of first_param.
181
7291b2ed
MP
1822020-04-23 Marek Polacek <polacek@redhat.com>
183
184 PR c++/94733
185 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
186 TREE_PURPOSE.
187
58a29af8
PP
1882020-04-14 Patrick Palka <ppalka@redhat.com>
189
190 PR c++/85278
191 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
192 ampersand if it's an rvalue reference type.
193
09f04139
MS
1942020-04-13 Martin Sebor <msebor@redhat.com>
195
196 PR c/92326
197 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
198 printing array bound for flexible array members.
199
ee26baf4
IS
2002020-04-13 Iain Sandoe <iain@sandoe.co.uk>
201
202 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
203 define, per n4861.
204
75efe9cb
RB
2052020-04-02 Richard Biener <rguenther@suse.de>
206
207 PR c/94392
208 * c-opts.c (c_common_post_options): Enable -ffinite-loops
209 for -O2 and C++11 or newer.
210
75defde9
PP
2112020-03-28 Patrick Palka <ppalka@redhat.com>
212
213 * c.opt: Add -fconcepts-diagnostics-depth.
214
52f24a9e
MS
2152020-03-27 Martin Sebor <msebor@redhat.com>
216
217 PR c++/94346
218 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
219 to decl_attributes. Make handling of different kinds of entities
220 more robust.
221
ccacf77b
MS
2222020-03-27 Martin Sebor <msebor@redhat.com>
223
224 PR c++/94098
225 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
226 here.
227
ca6c7225
JJ
2282020-03-23 Jakub Jelinek <jakub@redhat.com>
229
230 PR c++/91993
231 * c-warn.c (warnings_for_convert_and_check): For expr and/or
232 result being COMPOUND_EXPRs, skip to ultimate rhs.
233
1aa22b19
RS
2342020-03-20 Richard Sandiford <richard.sandiford@arm.com>
235
236 PR middle-end/94072
237 * c-common.c (c_common_type_for_mode): Before using a registered
238 built-in type, check that the vectorness of the type matches
239 the vectorness of the mode.
240
700d4cb0
JJ
2412020-03-17 Jakub Jelinek <jakub@redhat.com>
242
243 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
244 issue in a diagnostic message.
245
b408e010
LH
2462020-03-15 Lewis Hyatt <lhyatt@gmail.com>
247
248 * c.opt: Avoid redundancy in the help text.
249
e78e50d5
MP
2502020-03-02 Marek Polacek <polacek@redhat.com>
251
252 PR c++/93958 - add missing -std=gnu++20.
253 * c.opt: Add -std=gnu++20.
254
649e1741
MS
2552020-03-01 Martin Sebor <msebor@redhat.com>
256
257 PR c++/92721
258 * c-attribs.c (append_access_attrs): Correctly handle attribute.
259 (handle_access_attribute): Same.
260
7b60f3ba
JJ
2612020-02-25 Jakub Jelinek <jakub@redhat.com>
262
263 PR c/93858
264 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
265 "did you mean" hint in diagnostics.
266
fb260504
JM
2672020-02-15 Jason Merrill <jason@redhat.com>
268
269 * c.opt: Add -std=c++20.
270
1d757b09
EB
2712020-02-14 Eric Botcazou <ebotcazou@adacore.com>
272
273 * c-ada-spec.c: Include bitmap.h.
274 (dump_ada_double_name): Rename into...
275 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
276 (dump_ada_array_type): Adjust to above renaming. Robustify.
277 (dump_nested_types_1): New function copied from... Add dumped_types
278 parameter and pass it down to dump_nested_type.
279 (dump_nested_types): ...this. Remove parent parameter. Just call
280 dump_nested_types_1 on an automatic bitmap.
281 (dump_nested_type): Add dumped_types parameter.
282 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
283 Adjust recursive calls and adjust to above renaming.
284 (dump_ada_declaration): Adjust call to dump_nested_types.
285 Tidy up and adjust to above renaming.
286 (dump_ada_specs): Initialize and release bitmap obstack.
287
0cc575e4
MS
2882020-02-10 Martin Sebor <msebor@redhat.com>
289
290 PR c/93640
291 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
292
a59aa302
JJ
2932020-02-10 Jakub Jelinek <jakub@redhat.com>
294
295 PR other/93641
296 * c-format.c (check_plain): Fix up last argument of strncasecmp.
297 Remove useless extra test.
298
e464fc90
TB
2992020-02-03 Julian Brown <julian@codesourcery.com>
300 Tobias Burnus <tobias@codesourcery.com>
301
302 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
303
e3b6c052
JM
3042020-01-29 Jason Merrill <jason@redhat.com>
305
306 PR c++/89357
307 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
308
6d00f052
JM
3092020-01-23 Jason Merrill <jason@redhat.com>
310
311 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
312
8a990ffa
MS
3132020-01-23 Martin Sebor <msebor@redhat.com>
314
315 PR c/84919
316 * c-common.c (check_function_arguments): Avoid overlap checking
317 of sprintf functions.
318
55b7df8b
JM
3192020-01-22 Jason Merrill <jason@redhat.com>
320
321 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
322 PR c++/40752
323 * c-warn.c (conversion_warning): Check operands only after checking
324 the whole expression. Don't check second operand of + for sign.
325
c77074d0
JM
3262020-01-21 Jason Merrill <jason@redhat.com>
327 Manuel López-Ibáñez <manu@gcc.gnu.org>
328
329 PR c++/40752 - useless -Wconversion with short +=.
330 * c.opt (-Warith-conversion): New.
331 * c-warn.c (conversion_warning): Recurse for operands of
332 operators. Only warn about the whole expression with
333 -Warith-conversion.
334
731dbfc3
JM
3352020-01-21 Jason Merrill <jason@redhat.com>
336
337 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
338 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
339
ad1a3914
NS
3402020-01-20 Nathan Sidwell <nathan@acm.org>
341
342 PR preprocessor/80005
343 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
344
49789fd0
IS
3452020-01-18 Iain Sandoe <iain@sandoe.co.uk>
346
347 * c-common.c (co_await, co_yield, co_return): New.
348 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
349 RID_CO_RETURN): New enumeration values.
350 (D_CXX_COROUTINES): Bit to identify coroutines are active.
351 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
352 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
353 * c.opt (fcoroutines): New command-line switch.
354
4bc1899b
DM
3552020-01-10 David Malcolm <dmalcolm@redhat.com>
356
357 * c-format.c (local_event_ptr_node): New.
358 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
359 (init_dynamic_diag_info): Initialize local_event_ptr_node.
360 * c-format.h (T_EVENT_PTR): New define.
361
f25e33fa
MS
3622020-01-10 Martin Sebor <msebor@redhat.com>
363
364 PR c/93132
365 * c-attribs.c (append_access_attrs): Validate against the translated
366 access string rather than the human-readable representation.
367
8d9254fc
JJ
3682020-01-01 Jakub Jelinek <jakub@redhat.com>
369
370 Update copyright years.
371
39292e25
EB
3722019-12-20 Eric Botcazou <ebotcazou@adacore.com>
373
374 * c-ada-spec.h (decl_sloc): Delete.
375 * c-ada-spec.c (decl_sloc): Make static.
376
519d7496
JB
3772019-12-19 Julian Brown <julian@codesourcery.com>
378
379 * c-common.h (c_omp_map_clause_name): Add prototype.
380 * c-omp.c (c_omp_map_clause_name): New function.
381 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
382 PRAGMA_OACC_CLAUSE_DETACH.
383
a6163563
JB
3842019-12-19 Julian Brown <julian@codesourcery.com>
385 Maciej W. Rozycki <macro@codesourcery.com>
386 Tobias Burnus <tobias@codesourcery.com>
387 Thomas Schwinge <thomas@codesourcery.com>
388
389 * c-pragma.h (pragma_omp_clause): Add
390 PRAGMA_OACC_CLAUSE_NO_CREATE.
391
e8f1ade2
MS
3922019-12-17 Martin Sebor <msebor@redhat.com>
393
394 PR c++/61339
395 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
396
368877a1
DM
3972019-12-11 David Malcolm <dmalcolm@redhat.com>
398
399 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
400 implementation.
401 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
402
d68f5d45
DM
4032019-12-09 David Malcolm <dmalcolm@redhat.com>
404
405 * c-format.c (range_label_for_format_type_mismatch::get_text):
406 Replace label_text ctor called with true with label_text::take.
407
d3e28653
DM
4082019-12-09 David Malcolm <dmalcolm@redhat.com>
409
410 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
411 initial newline from expected outputs.
412 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
413 call to diagnostic_show_locus.
414
abd6d8cc
JJ
4152019-12-06 Jakub Jelinek <jakub@redhat.com>
416
417 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
418 now.
419
7906797e
MP
4202019-12-05 Marek Polacek <polacek@redhat.com>
421 Jakub Jelinek <jakub@redhat.com>
422
423 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
424 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
425
5c04da88
MP
4262019-12-05 Marek Polacek <polacek@redhat.com>
427
428 PR c++/92271 - make __is_same alias for __is_same_as.
429 * c-common.c: Add __is_same, an alias for __is_same_as.
430
43aae289
MP
4312019-12-03 Marek Polacek <polacek@redhat.com>
432
433 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
434 * c-cppbuiltin.c (c_cpp_builtins): Predefine
435 __cpp_aggregate_paren_init=201902 for -std=c++2a.
436
d7ddfbcb
JH
4372019-11-30 Jan Hubicka <hubicka@ucw.cz>
438
439 * c-attribs.c (handle_symver_attribute): New function
440 (c_common_attributes): Add symver.
441
65ef05d0
RS
4422019-11-30 Richard Sandiford <richard.sandiford@arm.com>
443
444 * c-common.c (pointer_int_sum): Use verify_type_context to check
445 whether the target allows pointer arithmetic for the types involved.
446 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
447 to check whether the target allows sizeof and alignof operations
448 for the types involved.
449
1a291106
JM
4502019-11-27 Jason Merrill <jason@redhat.com>
451
452 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
453
05d6cb1a
JJ
4542019-11-26 Jakub Jelinek <jakub@redhat.com>
455
456 PR c++/61414
457 * c-attribs.c (handle_mode_attribute): Add mode attribute to
458 ENUMERAL_TYPEs.
459
5b8d9367
JM
4602019-11-25 Joseph Myers <joseph@codesourcery.com>
461
462 PR c/91985
463 * c-common.c (c_common_type_for_mode): Handle decimal
464 floating-point types being NULL_TREE.
465 * c-format.c (get_format_for_type_1): Handle specified types being
466 NULL_TREE.
467 * c-lex.c (interpret_float): Give an error for decimal
468 floating-point constants when decimal floating-point not
469 supported.
470
1fbf51cb
JJ
4712019-11-23 Jakub Jelinek <jakub@redhat.com>
472
473 PR middle-end/83859
474 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
475 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
476 group warning with inform together.
477 (handle_access_attribute): Formatting fix.
478
761df906
JJ
4792019-11-22 Jakub Jelinek <jakub@redhat.com>
480
bdaf8be1
JJ
481 PR c/90677
482 * c-common.h (identifier_global_tag): Declare.
483 * c-format.c (get_pointer_to_named_type): Renamed to ...
484 (get_named_type): ... this. Use identifier_global_tag instead of
485 identifier_global_value, handle the return value being a TYPE_P.
486 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
487 to call get_named_type instead. Formatting fixes.
488
c2ecce6d 489 Implement P1902R1, Missing feature-test macros 2017-2019.
761df906
JJ
490 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
491 and __cpp_generic_lambdas for -std=c++2a. Define
492 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
493 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
494 __cpp_concepts for -std=c++2a.
495
54aa6b58
MS
4962019-11-22 Martin Sebor <msebor@redhat.com>
497
498 PR middle-end/83859
499 * c-attribs.c (handle_access_attribute): New function.
500 (c_common_attribute_table): Add new attribute.
501 (get_argument_type): New function.
502 (append_access_attrs): New function.
503 (get_nonnull_operand): Rename...
504 (get_attribute_operand): ...to this.
505 * c-common.c (get_nonnull_operand): Rename...
506 (get_attribute_operand): ...to this.
507
6c80b1b5
JM
5082019-11-21 Joseph Myers <joseph@codesourcery.com>
509
510 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
511 of warning.
512
192961ff
JM
5132019-11-19 Joseph Myers <joseph@codesourcery.com>
514
515 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
516 warning for standard attributes mixed with fallthrough attributes.
517
f8aea5e3
JM
5182019-11-15 Joseph Myers <joseph@codesourcery.com>
519
520 * c-attribs.c (handle_fallthrough_attribute): Remove static.
521 * c-common.h (handle_fallthrough_attribute): Declare.
522
2cc94aa8
JM
5232019-11-15 Joseph Myers <joseph@codesourcery.com>
524
525 * c-attribs.c (handle_deprecated_attribute): Remove static.
526 * c-common.h (handle_deprecated_attribute): Declare.
527
7c5890cc
JM
5282019-11-14 Joseph Myers <joseph@codesourcery.com>
529
530 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
531 char for C.
532
b2417b59
JJ
5332019-11-14 Jakub Jelinek <jakub@redhat.com>
534
d0ec7c93
JJ
535 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
536 valid vendors.
537
b2417b59
JJ
538 * c-omp.c (c_omp_check_context_selector): Handle name lists
539 containing string literals. Don't diagnose atomic_default_mem_order
540 with multiple props.
541
00be2a5f
JM
5422019-11-13 Joseph Myers <joseph@codesourcery.com>
543
544 * c-cppbuiltin.c (builtin_define_float_constants): Also define
545 NORM_MAX constants. Update call to get_max_float.
546 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
547 constants.
548
2dbad62d
EB
5492019-11-13 Eric Botcazou <ebotcazou@adacore.com>
550
551 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
552 (dump_forward_type): Do not generate a declaration for function types.
553 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
554 of the component type if it is declared in another file.
555
6ed76044
ML
5562019-11-12 Martin Liska <mliska@suse.cz>
557
558 * c-opts.c (c_common_post_options):
559 Use SET_OPTION_IF_UNSET.
560
62aee289
MR
5612019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
562 Frederik Harwath <frederik@codesourcery.com>
563
564 gcc/c-family/
565 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
566 constant.
567 * c-pragma.c (oacc_pragmas): Add "serial" entry.
568
f486280c
RS
5692019-11-08 Richard Sandiford <richard.sandiford@arm.com>
570
571 * c-common.h (gnu_vector_type_p): New function.
572 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
573 vectors to satisfy gnu_vector_type_p.
574 (c_build_vec_convert): Likewise __builtin_convertvector.
575 (convert_vector_to_array_for_subscript): Likewise when applying
576 implicit vector to array conversion.
577 (scalar_to_vector): Likewise when converting vector-scalar
578 operations to vector-vector operations.
579
017c6491
JM
5802019-11-08 Joseph Myers <joseph@codesourcery.com>
581
582 * c.opt (Wold-style-definition): Initialize to -1.
583 * c-opts.c (c_common_post_options): Set warn_old_style_definition
584 to flag_isoc2x if not set explicitly.
585
c01bd174
JM
5862019-11-07 Joseph Myers <joseph@codesourcery.com>
587
588 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
589
0df65305
JM
5902019-11-05 Jason Merrill <jason@redhat.com>
591
592 * c-opts.c (c_common_post_options): -fconcepts-ts implies
593 -fconcepts.
594
e0c866dd
KK
5952019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
596
597 * c-opts.c (c_common_post_options): Update
598 latest_abi_version.
599
f968ef9b
JJ
6002019-11-02 Jakub Jelinek <jakub@redhat.com>
601
d0c464d2
JJ
602 * c-common.h (c_omp_get_context_selector): Remove.
603 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
604 and renamed to omp_get_context_selector.
605
917dd789
JJ
606 * c-omp.c (c_omp_mark_declare_variant): Use
607 omp_context_selector_set_compare.
608
f968ef9b
JJ
609 PR c++/88335 - Implement P1073R3: Immediate functions
610 * c-common.h (enum rid): Add RID_CONSTEVAL.
611 * c-common.c (c_common_reswords): Add consteval.
612
5f6705b7
JJ
6132019-11-01 Martin Sebor <msebor@redhat.com>
614
615 PR middle-end/91679
616 PR middle-end/91647
617 PR middle-end/91463
618 PR middle-end/92312
619 * c-pretty-print.c (direct_abstract_declarator): Print
620 bound in zero-length arrays.
621 * c.opt (-Wzero-length-bounds): New option.
622
43f1814c
NS
6232019-10-30 Nathan Sidwell <nathan@acm.org>
624
625 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
626 macros.
627
ad1539d5
MS
6282019-10-28 Martin Sebor <msebor@redhat.com>
629
630 PR c/66970
631 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
632 even when only preprocessing.
633 * c-common.h (names_builtin_p): Declare new function.
634 * c-lex.c (init_c_lex): Set has_builtin.
635 (c_common_has_builtin): Define a new function.
636 * c-ppoutput.c (init_pp_output): Set has_builtin.
637
135df52c
JJ
6382019-10-24 Jakub Jelinek <jakub@redhat.com>
639
640 * c-common.h (c_omp_context_selector_matches): Remove.
641 * c-omp.c (c_omp_context_selector_matches): Remove.
642 * c-attribs.c (c_common_attribute_table): Add
643 "omp declare target {host,nohost,block}" attributes.
644
8ad0c477
JM
6452019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
646
647 * c-lex.c (c_common_has_attribute): Update nodiscard value.
648
56898e43
RS
6492019-10-14 Richard Sandiford <richard.sandiford@arm.com>
650
651 * c-common.h (user_facing_original_type_p): Declare.
652 * c-common.c: Include c-spellcheck.h.
653 (user_facing_original_type_p): New function.
654
20de9568
JJ
6552019-10-12 Jakub Jelinek <jakub@redhat.com>
656
657 * c-common.h (c_omp_mark_declare_variant,
658 c_omp_context_selector_matches): Declare.
659 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
660 and hsa-common.h.
661 (c_omp_get_context_selector): Support second argument NULL.
662 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
663 functions.
664 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
665 attribute, add "omp declare variant base" and
666 "omp declare variant variant" attributes.
667
175a85b2
JM
6682019-10-11 Joseph Myers <joseph@codesourcery.com>
669
670 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
671 CppReason(CPP_W_C11_C2X_COMPAT).
672
fe2bc27c
JM
6732019-10-11 Joseph Myers <joseph@codesourcery.com>
674
675 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
676 _Decimal64 and _Decimal128.
677
27dfdc0f
JM
6782019-10-10 Joseph Myers <joseph@codesourcery.com>
679
680 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
681 types if DFP not supported.
682
94e7f906
JJ
6832019-10-10 Jakub Jelinek <jakub@redhat.com>
684
685 * c-common.h (c_omp_check_context_selector,
686 c_omp_get_context_selector): Declare.
687 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
688 in diagnostic message.
689 (c_omp_check_context_selector, c_omp_get_context_selector): New
690 functions.
691 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
692 attribute.
693 (handle_omp_declare_variant_attribute): New function.
694
a7160771
MS
6952019-10-09 Martin Sebor <msebor@redhat.com>
696
697 PR tree-optimization/90879
698 * c.opt (-Wstring-compare): New option.
699
cb57504a
JM
7002019-10-08 Andrew Sutton <asutton@lock3software.com>
701 Jason Merrill <jason@redhat.com>
702
703 Update the concepts implementation to conform to the C++20
704 specification, improve compile times, and generally clean up
705 the implementation.
706
707 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
708 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
709 * c.opt: Add -Wconcepts-ts.
710 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
711 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
712 (set_std_cxx2a): Enable concepts by default.
713
fbb2a6dc
JM
7142019-10-08 Joseph Myers <joseph@codesourcery.com>
715
716 * c-opts.c (c_common_post_options): Set
717 -fno-fp-int-builtin-inexact for C2X.
718
8e007055
JJ
7192019-10-05 Jakub Jelinek <jakub@redhat.com>
720
721 PR c++/91369 - Implement P0784R7: constexpr new
722 * c-cppbuiltin.c (c_cpp_builtins): Predefine
723 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
724
843f104d
JM
7252019-10-04 Joseph Myers <joseph@codesourcery.com>
726
727 PR c/82752
728 * c-format.c (C_STD_VER): Handle C2x.
729 (C_STD_NAME): Likewise.
730 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
731 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
732 modifier allowed and 'p' flag.
733 * c-format.h (enum format_std_version): Add STD_C2X.
734 (struct format_char_info): Mention 'p' in comment on flags2.
735
e9c9a142
DM
7362019-10-01 David Malcolm <dmalcolm@redhat.com>
737
738 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
739 calling diagnostic_show_locus, rather than destroying it afterwards.
740
7552c36a
JJ
7412019-10-01 Jakub Jelinek <jakub@redhat.com>
742
743 PR c++/91925
744 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
745 with NULL DECL_FIELD_OFFSET.
746
8209db25
RS
7472019-10-01 Richard Sandiford <richard.sandiford@arm.com>
748
749 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
750 has a type name, use it in preference to the __vector syntax.
751
9343bf99
RS
7522019-09-30 Richard Sandiford <richard.sandiford@arm.com>
753
754 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
755 two spaces between a comma and "...".
756
59bc434a
JJ
7572019-09-27 Jakub Jelinek <jakub@redhat.com>
758
759 PR c++/88203
760 * c-common.h (c_omp_predefined_variable): Declare.
761 * c-omp.c (c_omp_predefined_variable): New function.
762 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
763 for predefined variables.
764
c6447c20
RS
7652019-09-27 Richard Sandiford <richard.sandiford@arm.com>
766
767 * c-common.h (build_function_call_vec): Take the original
768 function decl as an optional final parameter.
769 (check_builtin_function_arguments): Take the original function decl.
770 * c-common.c (check_builtin_function_arguments): Likewise.
771 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
772 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
773
c4438114
JM
7742019-09-15 Jason Merrill <jason@redhat.com>
775
776 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
777 fold_for_warn in "|| mask" warning.
778
68a57628
ML
7792019-09-10 Martin Liska <mliska@suse.cz>
780
781 * c.opt: Use newly added WarnRemoved.
782
f48ef52e
ML
7832019-09-09 Martin Liska <mliska@suse.cz>
784
785 * c.opt: Update comment of removed
786 options that are preserved only for backward
787 compatibility.
788
67f6e649
ML
7892019-09-06 Martin Liska <mliska@suse.cz>
790
791 PR c++/91125
792 * c-common.c: Remove definition of flag_use_repository.
793 * c-common.h: Likewise.
794 * c-opts.c (c_common_handle_option):
795 Do not handle OPT_frepo option.
796 * c.opt: Mark the option with Deprecated.
797
db9d2274
MP
7982019-09-04 Marek Polacek <polacek@redhat.com>
799
800 * c.opt (fdeduce-init-list): Ignored.
801
68e2c199
PK
8022019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
803
804 PR c/78736
805 * c.opt (Wenum-conversion): New option.
806
7a4418a5
JL
8072019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
808
809 * c-attribs.c (handle_section_attribute): Call the
810 handle_generic_attribute target hook after performing target
811 independent processing.
812 (handle_noinit_attribute): Likewise.
813
5f76ab15
ILT
8142019-09-03 Ian Lance Taylor <iant@golang.org>
815
816 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
817 when using -fgo-dump-spec.
818
ae0d3f6a
ML
8192019-09-02 Martin Liska <mliska@suse.cz>
820
821 PR c++/91155
822 * c-common.c (fname_as_string): Use cxx_printable_name for
823 __PRETTY_FUNCTION__ same as was used before r265711.
824
8a902edb
MP
8252019-08-28 Marek Polacek <polacek@redhat.com>
826
827 Implement P1152R4: Deprecating some uses of volatile.
828 PR c++/91361
829 * c-opts.c (c_common_post_options): Enable -Wvolatile by
830 default for C++2a, unless -Wno-deprecated.
831 * c.opt (Wvolatile): New warning.
832
4742dbe7
MP
8332019-08-28 Marek Polacek <polacek@redhat.com>
834
835 PR c++/91360 - Implement C++20 P1143R2: constinit.
836 * c-common.c (c_common_reswords): Add constinit and __constinit.
837 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
838 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
839 RID_LAST_CXX20.
840 (D_CXX20): Define.
841 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
842 * c-format.c (cxx_keywords): Add "constinit".
843 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
844
6a074892
JJ
8452019-08-27 Jakub Jelinek <jakub@redhat.com>
846
847 PR c++/91415
848 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
849 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
850 like COMPOUND_EXPR rather than normal expression.
851
22f8849d
IS
8522019-08-23 Iain Sandoe <iain@sandoe.co.uk>
853
854 PR pch/61250
855 * c-lex.c (c_lex_with_flags): Don't call
856 c_common_no_more_pch () from here.
857
df375b03
JJ
8582019-08-23 Jakub Jelinek <jakub@redhat.com>
859
860 PR middle-end/91283
861 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
862 instead of flag_excess_precision_cmdline.
863 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
864 * c-opts.c (c_common_post_options): Likewise.
865
14b7950f
MS
8662019-08-22 Martin Sebor <msebor@redhat.com>
867
868 PR middle-end/91490
869 * c-common.c (braced_list_to_string): Add argument and overload.
870 Handle flexible length arrays and unions.
871
8bb2ee59
EB
8722019-08-21 Eric Botcazou <ebotcazou@adacore.com>
873
874 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
875 function declarations where arguments are missing. Rename variables.
876
21c1e205
RB
8772019-08-15 Richard Biener <rguenther@suse.de>
878
879 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
880 enabled, define __SIZETYPE__.
881
f0033821
CL
8822019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
883
884 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
885 exclusion with "section" attribute.
886 (attr_noinit_exclusions): New table.
887 (handle_noinit_attribute): New function.
888
4d732405
RS
8892019-08-13 Richard Sandiford <richard.sandiford@arm.com>
890
891 PR middle-end/91421
892 * c-common.c (resolve_overloaded_builtin): Use
893 copy_decl_built_in_function.
894
51ad8481
MS
8952019-08-13 Martin Sebor <msebor@redhat.com>
896
897 PR c/80619
898 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
899 (asm_fprintf_length_spec): Same.
900 * c-format.h (format_lengths): Add FMT_LEN_w.
901
77eb117f
JJ
9022019-08-10 Jakub Jelinek <jakub@redhat.com>
903
904 * c-pragma.h (enum pragma_omp_clause): Add
905 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
906
398e3feb
JJ
9072019-08-07 Jakub Jelinek <jakub@redhat.com>
908
909 * c-pragma.h (enum pragma_omp_clause): Add
910 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
911 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
912 enumeration value.
913
ab574db6
MP
9142019-08-05 Marek Polacek <polacek@redhat.com>
915
916 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
917 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
918 default for C++2a, unless -Wno-deprecated.
919 * c.opt (Wcomma-subscript): New warning.
920
554a530f
JJ
9212019-07-20 Jakub Jelinek <jakub@redhat.com>
922
923 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
924 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
925 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
926 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
927 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
928 constructs with the loop construct.
929
1a888209
JJ
9302019-07-13 Jakub Jelinek <jakub@redhat.com>
931
932 PR c/91149
933 * c-omp.c (c_omp_split_clauses): Fix a pasto in
934 OMP_CLAUSE_REDUCTION_TASK handling.
935
1fdd6f04
JJ
9362019-07-12 Jakub Jelinek <jakub@redhat.com>
937
938 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
939 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
940
99b1c316
MS
9412019-07-09 Martin Sebor <msebor@redhat.com>
942
943 PR c++/61339
1fdd6f04 944 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
945 and others to class.
946 * c-pretty-print.h: Same.
947
6c1dae73
MS
9482019-07-09 Martin Sebor <msebor@redhat.com>
949
950 PR c++/61339
951 * c-format.c (check_argument_type): Change class-key from class to
952 struct and vice versa to match convention and avoid -Wclass-is-pod
953 and -Wstruct-no-pod.
954 * c-pretty-print.h: Same.
955
8ba6ea87
ML
9562019-07-03 Martin Liska <mliska@suse.cz>
957
958 * c-common.c (try_to_locate_new_include_insertion_point): Remove
959 dead assignemts.
960
83eb9522
JJ
9612019-07-03 Jakub Jelinek <jakub@redhat.com>
962
963 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
964 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
965 with OMP_PARALLEL.
966
1c6ffbab
QZ
9672019-07-02 qing zhao <qing.zhao@oracle.com>
968
969 PR preprocessor/90581
970 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
971 * c.opt: Add new option -fmax-include-depth.
972
7ffc7de5
JM
9732019-06-26 Jason Merrill <jason@redhat.com>
974
975 PR c++/55442 - memory-hog with highly recursive constexpr.
976 * c.opt (fconstexpr-loop-limit): New.
977
361af3e4
JJ
9782019-06-25 Jakub Jelinek <jakub@redhat.com>
979
980 PR sanitizer/90954
981 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
982 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
983
ab20d992
JJ
9842019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
985
986 * c-common.c (c_common_nodes_and_builtins): Define
987 alternate "__intN__" name for "__intN" types.
988
f4af4019
JH
9892019-06-24 Jan Hubicka <jh@suse.cz>
990
991 * c-common.c (braced_lists_to_strings): Check that
992 type is array or integer prior checking string flag.
993
da9e9b57
MB
9942019-06-21 Matthew Beliveau <mbelivea@redhat.com>
995
996 PR c++/90875 - added -Wswitch-outside-range option
997 * c.opt (Wswitch-outside-range): Added new option.
998 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
999
3f3d6a6f
MP
10002019-06-21 Marek Polacek <polacek@redhat.com>
1001
1002 PR c++/90953 - ICE with -Wmissing-format-attribute.
1003 * c-common.c (check_function_arguments_recurse): Use
1004 get_attribute_name.
1005 (check_missing_format_attribute): Likewise.
1006
1bf32c11
MP
10072019-06-19 Marek Polacek <polacek@redhat.com>
1008
1009 PR c++/60364 - noreturn after first decl not diagnosed.
1010 * c-attribs.c (handle_noreturn_attribute): No longer static.
1011 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
1012 Declare.
1013 * c-format.c (check_function_format): Use get_attribute_name.
1014
a04c0734
MS
10152019-06-19 Martin Sebor <msebor@redhat.com>
1016
1017 PR translation/90156
1018 * c-format.c (function_format_info::format_type): Adjust type.
1019 (function_format_info::is_raw): New member.
1020 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
1021 (decode_format_attr): Adjust call to decode_format_type.
1022 Avoid a redundant call to convert_format_name_to_system_name.
1023 Avoid abbreviating the word "arguments" in a diagnostic.
1024 (format_warning_substr): New function.
1025 (avoid_dollar_number): Quote dollar sign in a diagnostic.
1026 (finish_dollar_format_checking): Same.
1027 (check_format_info): Same.
1028 (struct baltoks_t): New.
1029 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
1030 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
1031 functions.
1032 (check_format_info_main): Call check_plain. Use baltoks_t. Call
1033 maybe_diag_unbalanced_tokens.
1034 (handle_format_attribute): Spell out the word "arguments" in
1035 a diagnostic.
1036
d3786ebb
MB
10372019-06-11 Matthew Beliveau <mbelivea@redhat.com>
1038
1039 PR c++/90449 - add -Winaccessible-base option.
1040 * c.opt (Winaccessible-base): New option.
1041
bf38f7e9
JJ
10422019-06-10 Jakub Jelinek <jakub@redhat.com>
1043
1044 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
1045 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
1046 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
1047 combined/composite constructs where it is not allowed. Copy over
1048 OMP_CLAUSE_REDUCTION_INSCAN.
1049
0ecf545c
MS
10502019-06-05 Martin Sebor <msebor@redhat.com>
1051
1052 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
1053 (handle_alias_ifunc_attribute): Same.
1054 (handle_copy_attribute): Same.
1055 (handle_weakref_attribute): Same.
1056 (handle_nonnull_attribute): Same.
1057 * c-warn.c (warn_for_sign_compare): Same.
1058 (warn_for_restrict): Same.
1059 * c.opt: Same.
1060
36b34127
MS
10612019-06-05 Martin Sebor <msebor@redhat.com>
1062
1063 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
1064 * c.opt (-Wformat-diag): Remove a spurious period.
1065
357a352f
JJ
10662019-05-29 Jakub Jelinek <jakub@redhat.com>
1067
1068 PR c/90628
1069 * c-common.c (check_builtin_function_arguments)
1070 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
1071 as last argument.
1072
2b8235ea
EB
10732019-05-23 Eric Botcazou <ebotcazou@adacore.com>
1074
1075 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
1076
6d86ddc4
ML
10772019-05-22 Martin Liska <mliska@suse.cz>
1078
1079 PR lto/90500
1080 * c-attribs.c (handle_copy_attribute): Do not copy
1081 target_clones attribute.
1082
419ba5b9
EB
10832019-05-21 Eric Botcazou <ebotcazou@adacore.com>
1084
1085 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
1086 * c-ada-spec.c (print_assignment_operator): New function.
1087 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
1088 assignment operators declared as methods and filter out the others.
1089
e03436e7
TS
10902019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1091
1092 PR c/89433
1093 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
1094 "omp declare target".
1095
a9c697b8
MS
10962019-05-16 Martin Sebor <msebor@redhat.com>
1097
ab20d992
JJ
1098 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
1099 keywords, operators, and types in diagnostics.
1100 (handle_scalar_storage_order_attribute): Same.
1101 (handle_mode_attribute): Same.
1102 (handle_visibility_attribute): Same.
1103 (handle_assume_aligned_attribute): Same.
1104 (handle_no_split_stack_attribute): Same.
1105 * c-common.c (shorten_compare): Same.
1106 (c_common_truthvalue_conversion): Same.
1107 (cb_get_source_date_epoch): Same.
1108 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
1109 in diagnostics.
1110 (interpret_float): Same.
1111 * c-omp.c (c_finish_omp_for): Same.
1112 * c-opts.c (c_common_post_options): Same.
1113 * c-pch.c (c_common_pch_pragma): Same.
1114 * c-pragma.c (pop_alignment): Same.
1115 (handle_pragma_pack): Same.
1116 (apply_pragma_weak): Same.
1117 (handle_pragma_weak): Same.
1118 (handle_pragma_scalar_storage_order): Same.
1119 (handle_pragma_redefine_extname): Same.
1120 (add_to_renaming_pragma_list): Same.
1121 (maybe_apply_renaming_pragma): Same.
1122 (push_visibility): Same.
1123 (handle_pragma_visibility): Same.
1124 (handle_pragma_optimize): Same.
1125 (handle_pragma_message): Same.
1126 * c-warn.c (warn_for_omitted_condop): Same.
1127 (lvalue_error): Same.
a9c697b8 1128
6b943512
RB
11292019-05-15 Richard Biener <rguenther@suse.de>
1130
1131 PR c/90474
1132 * c-common.c (c_common_mark_addressable_vec): Also mark
1133 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
1134 c_mark_addressable.
ab20d992 1135
b744fc85
NS
11362019-05-06 Nathan Sidwell <nathan@acm.org>
1137
1138 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
1139
598f50d7
NS
11402019-04-30 Nathan Sidwell <nathan@acm.org>
1141
1142 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
1143
5bcc5a3b
ML
11442019-04-30 Martin Liska <mliska@suse.cz>
1145
1146 * c-pragma.c (handle_pragma_diagnostic): Provide hints
1147 for unknown options.
1148
e78a87f7
RS
11492019-04-26 Richard Sandiford <richard.sandiford@arm.com>
1150
1151 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
1152 the pointer target rather than the pointer itself.
1153
c280b7ee
JJ
11542019-04-19 Jakub Jelinek <jakub@redhat.com>
1155
1156 PR c/89888
1157 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
1158 arguments.
1159 (c_do_switch_warnings): Remove outside_range_p argument.
1160 * c-common.c (check_case_bounds): Removed.
1161 (c_add_case_label): Remove orig_type and outside_range_p arguments.
1162 Don't call check_case_bounds. Fold low_value as well as high_value.
1163 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
1164 Check for case labels outside of range of original type here and
1165 adjust them.
1166
8e8225e6
JJ
11672019-04-12 Jakub Jelinek <jakub@redhat.com>
1168
63b8a166
JJ
1169 PR translation/90041
1170 * c.opt (-fhandle-exceptions): Use %< and %> around option names
1171 in the Warn diagnostics.
1172
8e8225e6
JJ
1173 PR c/89946
1174 * c-attribs.c (handle_patchable_function_entry_attribute): Add
1175 function comment. Warn if arguments of the attribute are not positive
1176 integer constants.
1177
53a3f614
EB
11782019-04-09 Eric Botcazou <ebotcazou@adacore.com>
1179
1180 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
1181 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
1182
22be5873
EB
11832019-04-07 Eric Botcazou <ebotcazou@adacore.com>
1184
1185 * c-ada-spec.c (is_float128): New predicate extracted from...
1186 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
1187 <REAL_TYPE>: ...here. Call it.
1188
34facf20
DM
11892019-04-05 David Malcolm <dmalcolm@redhat.com>
1190
1191 PR c/89985
1192 * c-warn.c (check_address_or_pointer_of_packed_member): Add
1193 auto_diagnostic_group. Guard inform calls by result of
1194 warning_at call.
1195
05564120
MP
11962019-04-05 Marek Polacek <polacek@redhat.com>
1197
ab20d992 1198 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
05564120
MP
1199 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
1200 of RHS.
1201
7a506c3c
JM
12022019-04-03 Jason Merrill <jason@redhat.com>
1203
1204 PR c++/86586 - -fcompare-debug=-Wsign-compare.
1205 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
1206
ddeae8c8
MS
12072019-04-01 Martin Sebor <msebor@redhat.com>
1208
1209 PR c/89685
1210 * c-attribs.c (handle_copy_attribute): Handle references and
1211 non-constant expressions.
1212
a15ffa22
JJ
12132019-03-22 Jakub Jelinek <jakub@redhat.com>
1214
1215 PR c++/87481
1216 * c.opt (-fconstexpr-ops-limit=): New option.
1217
36a3a7a3
JJ
12182019-03-21 Jakub Jelinek <jakub@redhat.com>
1219
1220 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
1221 template param.
1222
bec1da64
MS
12232019-03-19 Martin Sebor <msebor@redhat.com>
1224
1225 PR tree-optimization/89688
1226 * c-common.c (braced_list_to_string): Make static.
1227 (braced_lists_to_strings): Define new function.
1228 * c-common.h (braced_list_to_string): Remove.
1229 (braced_lists_to_strings): Declare.
1230
1fe61adf
ML
12312019-03-12 Martin Liska <mliska@suse.cz>
1232
1233 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
1234
93964ebd
ML
12352019-03-11 Martin Liska <mliska@suse.cz>
1236
1237 * c-opts.c (c_common_post_options): Wrap apostrophes
1238 in gcc internal format with %'.
1239
a3f9f006
ML
12402019-03-11 Martin Liska <mliska@suse.cz>
1241
1242 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
1243 in a string format message and fix GNU coding style.
1244 * c-common.c (vector_types_convertible_p): Likewise.
1245 (c_build_vec_perm_expr): Likewise.
1246 * c-indentation.c (get_visual_column): Likewise.
1247 * c-opts.c (c_common_handle_option): Likewise.
1248 (c_common_post_options): Likewise.
1249 (sanitize_cpp_opts): Likewise.
1250 * c-pch.c (c_common_pch_pragma): Likewise.
1251 * c-pragma.c (handle_pragma_pack): Likewise.
1252
1db01ff9
JJ
12532019-03-08 Jakub Jelinek <jakub@redhat.com>
1254
1255 PR tree-optimization/89550
1256 * c-common.c (c_common_truthvalue_conversion): Only set
1257 TREE_NO_WARNING if warning_at returned true.
1258 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
1259
ba790e6f
JJ
12602019-02-25 Sandra Loosemore <sandra@codesourcery.com>
1261 Martin Sebor <msebor@gmail.com>
1262
1263 * c.opt (Wmissing-attributes): Clean up doc string.
1264
7da73ba7
JJ
12652019-02-25 Jakub Jelinek <jakub@redhat.com>
1266
1267 PR c/89495
1268 * c-format.c (maybe_read_dollar_number): Compute nargnum in
1269 HOST_WIDE_INT type to avoid overflows and change overflow_flag
1270 checking.
1271
921bb9d1
RB
12722019-02-22 Richard Biener <rguenther@suse.de>
1273
1274 * c-pch.c (no_checksum): Remove.
1275 (pch_init): Remove assertion that executable_checksum is not
1276 all zero.
1277 (c_common_valid_pch): Likewise.
1278
e2ebb05c
MS
12792019-02-18 Martin Sebor <msebor@redhat.com>
1280
1281 PR middle-end/89294
1282 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
1283
3fe53000
DM
12842019-02-16 David Malcolm <dmalcolm@redhat.com>
1285
1286 PR c++/88680
1287 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
1288 implementing -Wtype-limits.
1289
28a8cef1
MS
12902019-02-11 Martin Sebor <msebor@redhat.com>
1291
1292 PR c++/87996
1293 * c-common.c (invalid_array_size_error): New function.
1294 (valid_array_size_p): Call it. Handle size as well as type.
1295 * c-common.h (valid_constant_size_p): New function.
1296 (enum cst_size_error): New type.
1297
ec2be203
DM
12982019-01-31 David Malcolm <dmalcolm@redhat.com>
1299
1300 PR c/89122
1301 * known-headers.cc (get_stdlib_header_for_name): Add
1302 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
1303
8936f047
JJ
13042019-01-31 Jakub Jelinek <jakub@redhat.com>
1305
1306 PR libstdc++/88170
1307 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
1308 a C cast in pp_c_flag_gnu_v3 mode.
1309
6a335b96
JJ
13102019-01-29 Jakub Jelinek <jakub@redhat.com>
1311
1312 PR c/86125
1313 * c-common.c (c_common_nodes_and_builtins): Build type variants for
1314 builtin_structptr_types types even for C.
1315
2a06eba5
BE
13162019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
1317
1318 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
1319 when rhs is of array type correctly. Fix handling of nested structures.
1320 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
1321 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
1322 type casts within nested compound expressions.
1323
18a23298
JJ
13242019-01-22 Jakub Jelinek <jakub@redhat.com>
1325
1326 PR middle-end/88968
1327 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
1328 variable after using BIT_FIELD_REF.
1329
420183d9
L
13302019-01-18 H.J. Lu <hongjiu.lu@intel.com>
1331
1332 PR c/51628
1333 PR c/88664
1334 * c-common.h (warn_for_address_or_pointer_of_packed_member):
1335 Remove the boolean argument.
1336 * c-warn.c (check_address_of_packed_member): Renamed to ...
1337 (check_address_or_pointer_of_packed_member): This. Also
1338 warn pointer conversion.
1339 (check_and_warn_address_of_packed_member): Renamed to ...
1340 (check_and_warn_address_or_pointer_of_packed_member): This.
1341 Also warn pointer conversion.
1342 (warn_for_address_or_pointer_of_packed_member): Remove the
1343 boolean argument. Don't check pointer conversion here.
1344
99063eee
RS
13452019-01-15 Richard Sandiford <richard.sandiford@arm.com>
1346
1347 PR inline-asm/52813
1348 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
1349
a30d0196
JJ
13502019-01-14 Jakub Jelinek <jakub@redhat.com>
1351
1352 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
1353 and __cpp_nontype_template_parameter_auto. Add a comment that
1354 __cpp_template_auto is deprecated.
1355
2d91f79d
TH
13562019-01-14 Tom Honermann <tom@honermann.net>
1357
1358 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
1359 * c-common.c (c_common_reswords): Add char8_t.
1360 (fix_string_type): Use char8_t for the type of u8 string literals.
1361 (c_common_get_alias_set): char8_t doesn't alias.
1362 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
1363 C++.
1364 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
1365 (keyword_begins_type_specifier): Add RID_CHAR8.
1366 * c-common.h (rid): Add RID_CHAR8.
1367 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
1368 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
1369 Define char8_type_node and char8_array_type_node.
1370 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
1371 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
1372 (c_cpp_builtins): Predefine __cpp_char8_t.
1373 * c-lex.c (lex_string): Use char8_array_type_node as the type of
1374 CPP_UTF8STRING.
1375 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
1376 * c-opts.c: If not otherwise specified, enable -fchar8_t when
1377 targeting C++2a.
1378 * c.opt: Add the -fchar8_t command line option.
1379
23db6ced
MS
13802019-01-14 Martin Sebor <msebor@redhat.com>
1381
1382 PR target/88638
1383 * c-attribs.c (positional_argument): Call valid_format_string_type_p
1384 and issue errors if it fails.
1385 * c-common.h (valid_format_string_type_p): Declare.
1386 * c-format.c (valid_stringptr_type_p): Rename...
1387 (valid_format_string_type_p): ...to this and make extern.
1388 (handle_format_arg_attribute): Adjust to new name.
1389 (check_format_string): Same.
1390
234c3818
L
13912019-01-13 H.J. Lu <hongjiu.lu@intel.com>
1392
1393 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
1394 Replace "may may" with "may" in warning message.
1395
d8fcab68
JJ
13962019-01-07 Jakub Jelinek <jakub@redhat.com>
1397
1398 PR c++/85052
1399 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
1400 (c_build_vec_convert): Declare.
1401 * c-common.c (c_build_vec_convert): New function.
1402
29d24852
MS
14032019-01-04 Martin Sebor <msebor@redhat.com>
1404
1405 PR c/88546
1406 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
1407 Handle C++ empty throw specification and C11 _Noreturn.
1408 (has_attribute): Also handle C11 _Noreturn.
1409
9069a4c9
MS
14102019-01-04 Martin Sebor <msebor@redhat.com>
1411
1412 PR c/88363
1413 * c-attribs.c (positional_argument): Also accept enumerated types.
1414
a5544970
JJ
14152019-01-01 Jakub Jelinek <jakub@redhat.com>
1416
1417 Update copyright years.
1418
da77eace
L
14192018-12-20 H.J. Lu <hongjiu.lu@intel.com>
1420
1421 PR c/51628
1422 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
1423 * c-warn.c (check_alignment_of_packed_member): New function.
1424 (check_address_of_packed_member): Likewise.
1425 (check_and_warn_address_of_packed_member): Likewise.
1426 (warn_for_address_or_pointer_of_packed_member): Likewise.
1427 * c.opt: Add -Wno-address-of-packed-member.
1428
573767d4
DM
14292018-12-20 David Malcolm <dmalcolm@redhat.com>
1430
1431 PR c++/87504
1432 * c-warn.c (get_outermost_macro_expansion): New function.
1433 (spelled_the_same_p): Use it to unwind the macro expansions, and
1434 compare the outermost macro in each nested expansion, rather than
1435 the innermost.
1436
a14feb3c
DM
14372018-12-19 David Malcolm <dmalcolm@redhat.com>
1438
1439 PR c++/87504
1440 * c-common.h (warn_tautological_cmp): Convert 1st param from
1441 location_t to const op_location_t &.
1442 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
1443 when testing for INTEGER_CST.
1444 (warn_tautological_bitwise_comparison): Convert 1st param from
1445 location_t to const op_location_t &; use it to build a
1446 binary_op_rich_location, and use this.
1447 (spelled_the_same_p): New function.
1448 (warn_tautological_cmp): Convert 1st param from location_t to
1449 const op_location_t &. Warn for macro expansions if
1450 spelled_the_same_p. Use binary_op_rich_location.
1451
dfd7fdca
DM
14522018-12-19 David Malcolm <dmalcolm@redhat.com>
1453
1454 PR c++/43064
1455 PR c++/43486
1456 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
1457 (verify_tree): Handle location wrappers.
1458 (c_common_truthvalue_conversion): Strip any location wrapper.
1459 Handle CONST_DECL.
1460 (fold_offsetof): Strip any location wrapper.
1461 (complete_array_type): Likewise for initial_value.
1462 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
1463 index before checking for INTEGER_CST.
1464 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
1465 print parentheses around location wrappers.
1466 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
1467 before checking for INTEGER_CST.
1468 (warn_tautological_bitwise_comparison): Call
1469 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
1470 before checking for INTEGER_CST.
1471 (readonly_error): Strip any location wrapper.
1472 (warn_array_subscript_with_type_char): Strip location wrappers
1473 before checking for INTEGER_CST. Use the location of the index if
1474 available.
1475
5c8b3702
JM
14762018-12-06 Jason Merrill <jason@redhat.com>
1477
1478 PR c++/88136 - -Wdeprecated-copy false positives
1479 * c.opt (Wdeprecated-copy-dtor): New.
1480 (Wdeprecated-copy): Move to -Wextra.
1481
673670da
MS
14822018-11-29 Martin Sebor <msebor@redhat.com>
1483
1484 PR c/88172
1485 PR testsuite/88208
1486 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
1487 alignments to values less than the target requires.
1488 (has_attribute): For attribute aligned consider both the attribute
1489 and the alignment bits.
1490 * c-common.c (c_init_attributes): Optionally issue a warning for
1491 zero alignment.
1492
04864ec8
MS
14932018-11-28 Martin Sebor <msebor@redhat.com>
1494
1495 PR c/88065
1496 PR c/87297
1497 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
1498 or destination is an error.
1499
ace83db0
JJ
15002018-11-28 Jakub Jelinek <jakub@redhat.com>
1501
1502 PR c++/88215
1503 * c-ubsan.c: Include langhooks.h.
1504 (ubsan_instrument_division): Change gcc_assert that main variants
1505 of op0 and op1 types are equal to gcc_checking_assert that the
1506 main variants are compatible types.
1507
da193a27
EB
15082018-11-27 Eric Botcazou <ebotcazou@adacore.com>
1509
1510 * c-ada-spec.c: Include stringpool.h.
1511 (has_static_fields): Return false for incomplete types.
1512 (is_tagged_type): Likewise.
1513 (has_nontrivial_methods): Likewise.
1514 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
1515 (struct overloaded_name_hash): New structure.
1516 (struct overloaded_name_hasher): Likewise.
1517 (overloaded_names): New global variable.
1518 (init_overloaded_names): New static function.
1519 (overloaded_name_p): New predicate.
1520 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
1521 on the TYPE_STUB_DECL of the original type of a typedef, if any.
1522 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
1523 Remove always-true condition and dump forward types.
1524 (dump_ada_specs): Delete overloaded_names.
1525
98f08eb8
MS
15262018-11-20 Martin Sebor <msebor@redhat.com>
1527
1528 * c-attribs.c (type_for_vector_size): New function.
1529 (type_valid_for_vector_size): Same.
1530 (handle_vector_size_attribute): Move code to the functions above
1531 and call them.
1532 (validate_attribute, has_attribute): New functions.
1533 * c-common.h (has_attribute): Declare.
1534 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
1535 * c-common.c (c_common_resword): Same.
1536
2674fa47
JM
15372018-11-16 Jason Merrill <jason@redhat.com>
1538
1539 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
1540 * c-attribs.c (attr_cold_hot_exclusions): Make public.
1541
258b3854
JJ
15422018-11-16 Jakub Jelinek <jakub@redhat.com>
1543
1544 PR middle-end/87854
1545 * c-common.c (fix_string_type): Reject string literals larger than
1546 TYPE_MAX_VALUE (ssizetype) bytes.
1547
1d249509
MS
15482018-11-15 Martin Sebor <msebor@redhat.com>
1549
1550 PR c++/87541
1551 PR c++/87542
1552 * c-attribs.c (positional_argument): New function.
1553 (handle_alloc_size_attribute): Use it and simplify.
1554 (handle_alloc_align_attribute): Same.
1555 (handle_assume_aligned_attribute): Same.
1556 (handle_nonnull_attribute): Same.
1557 * c-common.c (check_function_arguments): Pass fntype to
1558 check_function_format.
1559 * c-common.h (check_function_format): Add an argument.
1560 (PosArgFlags, positional_argument): Declare new type and function.
1561 * c-format.c (decode_format_attr): Add arguments.
1562 (check_format_string, get_constant): Same.
1563 (convert_format_name_to_system_name): Adjust.
1564
478dd60d
DM
15652018-11-15 David Malcolm <dmalcolm@redhat.com>
1566
1567 PR other/19165
1568 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
1569
8cca0163
JJ
15702018-11-14 Jakub Jelinek <jakub@redhat.com>
1571
8ee09943
JJ
1572 P1236R1 - Signed integers are two's complement
1573 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
1574 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
1575 with in-range second operand well defined for -std=c++2a.
1576
8cca0163
JJ
1577 PR other/88007
1578 * c-common.c (parse_optimize_options): Allocate option string from
1579 opts_obstack rather than as GC memory. Move the allocation after
1580 warning for invalid option.
1581
620e594b
DM
15822018-11-13 David Malcolm <dmalcolm@redhat.com>
1583
1584 * c-common.c (c_get_substring_location): Update for renaming of
1585 get_source_location_for_substring to get_location_within_string.
1586 * c-lex.c: Replace "source_location" with "location_t".
1587 * c-opts.c: Likewise.
1588 * c-ppoutput.c: Likewise.
1589
f9731de3
MS
15902018-11-13 Martin Sebor <msebor@redhat.com>
1591
1592 PR middle-end/81824
1593 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
1594 (handle_tls_model_attribute): Improve diagnostics.
1595
e4bd6d5e
JM
15962018-11-12 Jason Merrill <jason@redhat.com>
1597
a6bb6b07
JM
1598 * c-cppbuiltin.c (c_cpp_builtins): Define
1599 __cpp_impl_destroying_delete.
1600
e4bd6d5e
JM
1601 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
1602 __cpp_conditional_explicit.
1603
79a2c428
MS
16042018-11-09 Martin Sebor <msebor@redhat.com>
1605
1606 PR middle-end/81824
1607 * c-attribs.c (handle_copy_attribute): New function.
1608
4c7bd361
MS
16092018-11-09 Martin Sebor <msebor@redhat.com>
1610
1611 PR c/87795
1612 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
1613
28567c40
JJ
16142018-11-08 Jakub Jelinek <jakub@redhat.com>
1615
1616 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
1617 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
1618 enum omp_memory_order MEMORY_ORDER.
1619 (c_finish_omp_flush): Add MO argument.
1620 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
1621 (c_finish_omp_for): Add FINAL_P argument.
1622 * c-omp.c: Include memmodel.h.
1623 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
1624 OMP_TASKGROUP_CLAUSES to it.
1625 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
1626 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
1627 instead of OMP_ATOMIC_SEQ_CST.
1628 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
1629 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
1630 __atomic_thread_fence call with the given value.
1631 (check_omp_for_incr_expr): Formatting fixes.
1632 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
1633 even in OpenMP loops, diagnose if NE_EXPR and incr expression
1634 is not constant expression 1 or -1. Transform NE_EXPR loops
1635 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
1636 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
1637 loops too.
1638 (c_omp_split_clauses): Add support for combined
1639 #pragma omp parallel master and
1640 #pragma omp {,parallel }master taskloop{, simd} constructs.
1641 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
1642 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
1643 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
1644 (c_omp_predetermined_sharing): Don't return
1645 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
1646 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
1647 PRAGMA_OMP_REQUIRES.
1648 * c-pragma.h (enum pragma_kind): Likewise.
1649 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
1650 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1651
204839e7
DM
16522018-11-08 David Malcolm <dmalcolm@redhat.com>
1653
1654 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
1655
d8010ee4
DM
16562018-11-08 David Malcolm <dmalcolm@redhat.com>
1657
1658 * c-format.c (local_cgraph_node_ptr_node): New variable.
1659 (gcc_dump_printf_char_table): Add entry for %C.
1660 (get_pointer_to_named_type): New function, taken from the handling
1661 code for "gimple *" from...
1662 (init_dynamic_diag_info): ...here. Add handling for
1663 "cgraph_node *".
1664 * c-format.h (T_CGRAPH_NODE): New.
1665
4be5c72c
JM
16662018-10-19 Jason Merrill <jason@redhat.com>
1667
1668 * c-cppbuiltin.c (c_cpp_builtins): Add
1669 __cpp_nontype_template_parameter_class.
1670
f3f6029d
NS
16712018-10-31 Nathan Sidwell <nathan@acm.org>
1672
ab5324fb
NS
1673 * c-opts.c (c_finish_options): Force command line macro
1674 location. Refactor to avoid repeating main debug hook.
1675 (push_command_line_include): Clarify comment.
1676
f3f6029d
NS
1677 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
1678
91e3ec29
MS
16792018-10-30 Martin Sebor <msebor@redhat.com>
1680
1681 PR middle-end/87041
1682 * c-format.c (check_format_types): Avoid diagnosing null pointer
1683 arguments to printf-family of functions.
1684
b5ff4f5c
MP
16852018-10-30 Marek Polacek <polacek@redhat.com>
1686
1687 Implement P0892R2, explicit(bool).
1688 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
1689
7e2de6df
DM
16902018-10-29 David Malcolm <dmalcolm@redhat.com>
1691
1692 * name-hint.h (name_hint::take_deferred): New member function.
1693
b2bf438c
DM
16942018-10-29 David Malcolm <dmalcolm@redhat.com>
1695
1696 PR c++/56856
1697 * c-common.c (check_function_sentinel): Call fold_for_warn on the
1698 argument.
1699 (check_function_restrict): Rename param "argarray" to
1700 "unfolded_argarray", and make a copy named "argarray", calling
1701 fold_for_warn on each argument.
1702 (check_function_arguments): Add note about responsibility for
1703 folding the arguments.
1704
9f936c86
JM
17052018-10-17 Joseph Myers <joseph@codesourcery.com>
1706
1707 * c-common.c (flag_isoc2x): New variable.
1708 * c-common.h (clk_c): Update comment to reference C2X.
1709 (flag_isoc99, flag_isoc11): Update comments to reference future
1710 standard versions in general.
1711 (flag_isoc2x): Declare.
1712 * c-opts.c (set_std_c2x): New function.
1713 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
1714 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
1715 flag_isoc2x to 0.
1716 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
1717
7a8a92c4
JM
17182018-10-17 Joseph Myers <joseph@codesourcery.com>
1719
1720 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
1721 (std=iso9899:2018): Document C17 as published in 2018.
1722
4dc003ff
CL
17232018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
1724
1725 PR c++/87364
1726 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
1727
79371671
WW
17282018-10-11 Will Wray <wjwray@gmail.com>
1729
1730 PR c++/87364
1731 * c-pretty-print.h (pp_c_type_cast): Prototype.
1732 (pp_c_integer_constant): Likewise.
1733 * c-pretty-print.c (pp_c_type_cast): No longer static.
1734 (pp_c_integer_constant): Likewise.
1735 (pp_c_enumeration_constant): Fix loop termination when finding
1736 name of constant. No longer returns a value. Call
1737 pp_c_integer_constant.
1738 (c_pretty_printer::constant): Update for changes to
1739 pp_c_enumeration_constant.
1740
46c62690
JJ
17412018-10-11 Jakub Jelinek <jakub@redhat.com>
1742
1743 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
1744 for no_unique_address.
1745
c24300ba
DM
17462018-10-09 David Malcolm <dmalcolm@redhat.com>
1747
1748 * c-common.c (c_option_controlling_cpp_error): Rename to...
1749 (c_option_controlling_cpp_diagnostic): ...this, and convert
1750 "reason" from int to enum.
1751 (c_cpp_error): Rename to...
1752 (c_cpp_diagnostic): ...this, converting level and reason to enums.
1753 * c-common.h (c_cpp_error): Rename to...
1754 (c_cpp_diagnostic): ...this, converting level and reason to enums.
1755 * c-opts.c (c_common_init_options): Update for renaming.
1756
8656dafa
RS
17572018-10-08 Richard Sandiford <richard.sandiford@arm.com>
1758
1759 PR c/87286
1760 * c-common.c (vector_types_compatible_elements_p): Use
1761 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
1762
8cff0652
VK
17632018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
1764
1765 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
1766 to generate constructor destructor priority warning.
1767 * c.opt (-Wprio-ctor-dtor): New option.
1768
bedf03a2
JM
17692018-10-01 Jason Merrill <jason@redhat.com>
1770
1771 * c-lex.c (c_common_has_attribute): Add no_unique_address.
1772
6cc430c1
EB
17732018-10-01 Eric Botcazou <ebotcazou@adacore.com>
1774
1775 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
1776 (dump_ada_node): Add const keyword.
1777
87677ac7
ML
17782018-09-25 Martin Liska <mliska@suse.cz>
1779
1780 * c-common.c (c_common_truthvalue_conversion):
1781 Remove Pascal from documentation.
1782
518196cb
EB
17832018-09-21 Eric Botcazou <ebotcazou@adacore.com>
1784
1785 * c-ada-spec.c: Include diagnostic.h.
1786 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
1787
a599af84
MP
17882018-09-19 Marek Polacek <polacek@redhat.com>
1789
1790 * c.opt (Wclass-conversion): New.
1791
9c4a4b3c
DM
17922018-09-17 David Malcolm <dmalcolm@redhat.com>
1793
1794 * c-format.c (range_label_for_format_type_mismatch::get_text):
1795 Update for new param.
1796
c896ecfe
DM
17972018-09-17 David Malcolm <dmalcolm@redhat.com>
1798
1799 * c-format.c (format_warning_at_char): Update for introduction of
1800 format_string_diagnostic_t.
1801 (format_type_warning): Likewise.
1802
80c6d1f4
MJ
18032018-09-17 Martin Jambor <mjambor@suse.cz>
1804
1805 PR c/63886
1806 * c.opt (Wabsolute-value): New.
1807
6d900107
BE
18082018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1809
1810 * c-common.c (complete_flexible_array_elts): New helper function.
1811 * c-common.h (complete_flexible_array_elts): Declare.
1812
b5764229
BE
18132018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1814
1815 * c-common.c (braced_list_to_string): Remove eval parameter.
1816 Add some more checks. Always create zero-terminated STRING_CST.
1817 * c-common.h (braced_list_to_string): Adjust prototype.
1818
85204e23
DM
18192018-08-27 David Malcolm <dmalcolm@redhat.com>
1820
1821 PR 87091
1822 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
1823 to a tri-state.
1824 (maybe_suggest_missing_token_insertion): Likewise.
1825 (maybe_add_include_fixit): Add param "override_location". If set,
1826 and source-printing is enabled, then override the rich_location's
1827 primary location with that of the insertion point for the fix-it
1828 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
1829 * c-common.h (extern void maybe_add_include_fixit): Add bool
1830 param.
1831 * c-format.c (selftest::test_type_mismatch_range_labels): Update
1832 for conversion of show_caret_p to a tri-state.
1833 * c-warn.c (warn_for_restrict): Likewise.
1834 * known-headers.cc
1835 (suggest_missing_header::~suggest_missing_header): Update call to
1836 maybe_add_include_fixit to suggest overriding the location, as it
1837 is for a note.
1838
3d78e008
ML
18392018-08-27 Martin Liska <mliska@suse.cz>
1840
1841 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
1842 fndecl_built_in_p and remove check for FUNCTION_DECL if
1843 possible.
3d78e008
ML
1844 (check_builtin_function_arguments): Likewise.
1845 (reject_gcc_builtin): Likewise.
1846 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
1847
b5be6d0c
MP
18482018-08-26 Marek Polacek <polacek@redhat.com>
1849
1850 PR c++/87029, Implement -Wredundant-move.
1851 * c.opt (Wredundant-move): New option.
1852
79ca9c35
MP
18532018-08-21 Marek Polacek <polacek@redhat.com>
1854
1855 PR c++/86981, Implement -Wpessimizing-move.
1856 * c.opt (Wpessimizing-move): New option.
1857
097f82ec
DM
18582018-08-20 David Malcolm <dmalcolm@redhat.com>
1859
1860 PR other/84889
1861 * c-attribs.c (common_handle_aligned_attribute): Add
1862 auto_diagnostic_group instance.
1863 * c-indentation.c (warn_for_misleading_indentation): Likewise.
1864 * c-opts.c (c_common_post_options): Likewise.
1865 * c-warn.c (warn_logical_not_parentheses): Likewise.
1866 (warn_duplicated_cond_add_or_warn): Likewise.
1867 (warn_for_multistatement_macros): Likewise.
1868
3fb558b1
NS
18692018-08-20 Nathan Sidwell <nathan@acm.org>
1870
1871 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
1872 access.
1873
800c0e98
NS
18742018-08-17 Nathan Sidwell <nathan@acm.org>
1875
1876 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
1877 field.
1878 (laxy_hex_fp_value_count): Make unsigned.
1879 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
1880 manipulate the macro.
1881 (builtin_defin_with_hex_fp_value): Adjust callback name, use
1882 cpp_define_lazily.
1883
6f795a92
DM
18842018-08-17 David Malcolm <dmalcolm@redhat.com>
1885
1886 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
1887 (gcc_dump_printf_length_specs): New.
1888 (gcc_dump_printf_flag_pairs): New.
1889 (gcc_dump_printf_flag_specs): New.
1890 (gcc_dump_printf_char_table): New.
1891 (format_types_orig): Add entry for "gcc_dump_printf".
1892 (init_dynamic_diag_info): Set up length_char_specs and
1893 conversion_specs for gcc_dump_printf_format_type.
1894 (handle_format_attribute): Handle gcc_dump_printf_format_type.
1895
c5d725c0
NS
18962018-08-17 Nathan Sidwell <nathan@acm.org>
1897
10f04917
NS
1898 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
1899
c5d725c0
NS
1900 * c-ada-spec.c: Don't #include "cpp-id-data.h"
1901 * c-cppbuiltin.c: Likewise.
1902
c0c12356
ML
19032018-08-17 Martin Liska <mliska@suse.cz>
1904
1905 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
1906 Ignore/Deprecated flag. Warning is done automatically for
1907 Deprecated flags.
c0c12356 1908
10fcc142
DM
19092018-08-16 David Malcolm <dmalcolm@redhat.com>
1910
1911 PR c++/70693
1912 * c-common.c (selftest::c_family_tests): Call
1913 selftest::c_indentation_c_tests.
1914 * c-common.h (selftest::c_indentation_c_tests): New decl.
1915 * c-indentation.c: Include "selftest.h".
1916 (next_tab_stop): Add "tab_width" param, rather than accessing
1917 cpp_opts.
1918 (get_visual_column): Likewise. Clarify comment. Bulletproof
1919 against reading past the end of the line.
1920 (get_first_nws_vis_column): Add "tab_width" param.
1921 (detect_intervening_unindent): Likewise.
1922 (should_warn_for_misleading_indentation): Read tab width from
1923 cpp_opts and pass around.
1924 (selftest::test_next_tab_stop): New test.
1925 (selftest::assert_get_visual_column_succeeds): New function.
1926 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
1927 (selftest::assert_get_visual_column_fails): New function.
1928 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
1929 (selftest::test_get_visual_column): New test.
1930 (selftest::c_indentation_c_tests): New function.
1931
3f6677f4
NS
19322018-08-16 Nathan Sidwell <nathan@acm.org>
1933
1934 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
1935 (store_ada_macro): Likewise.
1936 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
1937 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
1938
96e6ae57
DM
19392018-08-15 David Malcolm <dmalcolm@redhat.com>
1940
1941 * c-format.c: Include "selftest-diagnostic.h" and
1942 "gcc-rich-location.h".
1943 (format_warning_at_char): Pass NULL for new label params of
1944 format_warning_va.
1945 (class indirection_suffix): New class.
1946 (class range_label_for_format_type_mismatch): New class.
1947 (format_type_warning): Move logic for generating "*" suffix to
1948 class indirection_suffix. Create "fmt_label" and "param_label"
1949 to show their types, and pass them to the
1950 format_warning_at_substring calls.
1951 (selftest::test_type_mismatch_range_labels): New test.
1952 (selftest::c_format_c_tests): Call it.
1953
23aa9f7c
MS
19542018-08-13 Martin Sebor <msebor@redhat.com>
1955
1956 PR tree-optimization/71625
1957 * c-common.c (braced_list_to_string): New function.
1958 * c-common.h (braced_list_to_string): Declare it.
1959
f10a9135
NS
19602018-08-08 Nathan Sidwell <nathan@acm.org>
1961
1962 * c-common.c (try_to_locate_new_include_inertion_point): Use
1963 linemap_included_from_linemap.
1964 * c-lex.c (fe_file_change): Use linemap_included_from.
1965 * c-ppoutput.c (pp_file_change): Likewise.
1966
8a45b051
MS
19672018-08-01 Martin Sebor <msebor@redhat.com>
1968
1969 PR tree-optimization/86650
ab20d992 1970 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
8a45b051
MS
1971 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
1972 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
1973 * c-format.h (T89_G): Update to be "gimple *" rather than
1974 "gcall *".
1975 (local_gcall_ptr_node): Rename...
1976 (local_gimple_ptr_node): ...to this.
1977
e540ccc0
DM
19782018-07-31 David Malcolm <dmalcolm@redhat.com>
1979
1980 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
1981 table entries for gcc_diag_char_table, and the 'Z' entry from
1982 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
1983 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
1984 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
1985 adding missing "Z" for this table. Remove erroneous "G" and "K"
1986 entries.
1987 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
1988 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
1989 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
1990
425fc685
RE
19912018-07-31 Richard Earnshaw <rearnsha@arm.com>
1992
1993 * c-common.c (speculation_safe_resolve_call): New function.
1994 (speculation_safe_resolve_params): New function.
1995 (speculation_safe_resolve_return): New function.
1996 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
1997 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
1998 __HAVE_SPECULATION_SAFE_VALUE.
1999
181463c2
DM
20002018-07-20 David Malcolm <dmalcolm@redhat.com>
2001
2002 * c-common.c (c_cpp_error): Remove redundant "line_table"
2003 parameter from call to rich_location::set_range.
2004 (maybe_suggest_missing_token_insertion): Likewise.
2005
0d7f9065
MS
20062018-07-20 Martin Sebor <msebor@redhat.com>
2007
2008 PR middle-end/82063
ab20d992 2009 * c.opt (-Warray-bounds): Remove redundant -Wall.
0d7f9065 2010
00abf86c
MS
20112018-07-20 Martin Sebor <msebor@redhat.com>
2012
2013 PR middle-end/82063
2014 * c-common.h (c_common_handle_option): Change function argument
2015 to HOST_WIDE_INT.
2016 * c-opts.c (c_common_init_options): Same.
2017 (c_common_handle_option): Same. Remove special handling of
2018 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
2019 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
2020 options to take a HOST_WIDE_INT argument and accept a byte-size
2021 suffix. Initialize.
2022 (-Wvla-larger-than): Same.
2023 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
2024 (-Wno-vla-larger-than): Same.
2025
9b452033
JJ
20262018-07-12 Jakub Jelinek <jakub@redhat.com>
2027
2028 * c-attribs.c (c_common_attribute_table): Add
2029 "omp declare target implicit" attribute.
2030
cd0762f3
RB
20312018-07-12 Richard Biener <rguenther@suse.de>
2032
2033 PR c/86453
2034 * c-attribs.c (handle_packed_attribute): Do not build a variant
2035 type with TYPE_PACKED, instead ignore the attribute if we may
2036 not apply to the original type.
2037
0b27c3ed
JJ
20382018-07-10 Jakub Jelinek <jakub@redhat.com>
2039
2040 PR c++/86443
2041 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
2042 to contain TREE_LIST for both the original class iterator and the
2043 "last" helper var.
2044
e730a0ef
EB
20452018-07-07 Eric Botcazou <ebotcazou@adacore.com>
2046
2047 * c-ada-spec.c (to_ada_name): Remove index parameter.
2048 (pp_ada_tree_identifier): Likewise.
2049 (dump_ada_macros): Adjust call to to_ada_name.
2050 (struct overloaded_name_hash): Delete.
2051 (struct overloaded_name_hasher): Likewise.
2052 (overloaded_names): Likewise.
2053 (compute_overloading_index): Likewise.
2054 (dump_ada_decl_name): Do not call compute_overloading_index and
2055 adjust calls to pp_ada_tree_identifier.
2056 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
2057 (dump_ada_import): Add spc parameter and switch to aspect syntax.
2058 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
2059 (dump_ada_enum_type): Remove type and display_convention parameters.
2060 Adjust calls to pp_ada_tree_identifier.
2061 (dump_ada_node): Likewise and for dump_ada_structure.
2062 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
2063 and tidy up.
2064 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
2065 syntax.
2066 (print_constructor): Adjust call to pp_ada_tree_identifier.
2067 (print_destructor): Likewise.
2068 (dump_ada_declaration): Switch to aspect syntax.
2069 (dump_ada_structure): Likewise and tidy up. Replace display_convention
2070 parameter with nested parameter.
2071 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
2072 (dump_ada_specs): Do not delete overloaded_names table.
2073
8de583fc
PB
20742018-07-06 Peter Bergner <bergner@linux.ibm.com>
2075
2076 PR target/86324
e730a0ef 2077 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
2078 target hook.
2079
09cff37b
NS
20802018-07-05 Nathan Sidwell <nathan@acm.org>
2081
2082 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
2083 NO_IMPLICIT_EXTERN_C.
2084
98086b2b
ML
20852018-06-28 Martin Liska <mliska@suse.cz>
2086
2087 * cppspec.c: Include opt-suggestions.h.
2088
ab20d992
JJ
20892018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2090 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
2091 Cesar Philippidis <cesar@codesourcery.com>
2092
2093 * c-pragma.h (enum pragma_omp_clause): Add
2094 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
2095 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
2096
f41b7612
JJ
20972018-06-20 Jakub Jelinek <jakub@redhat.com>
2098
2099 PR c++/86210
2100 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
2101 comment.
2102
4252ccd7
MS
21032018-06-18 Martin Sebor <msebor@redhat.com>
2104
2105 PR middle-end/85602
2106 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
2107 nonstring.
2108
e197e64e
KV
21092018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2110
2111 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
2112
34a7a230
JM
21132018-06-13 Jason Merrill <jason@redhat.com>
2114
5cef3733
JM
2115 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
2116 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
2117 handling.
2118
34a7a230
JM
2119 PR c++/86094 - wrong code with defaulted move ctor.
2120 * c-opts.c (c_common_post_options): Bump the current ABI version to
2121 13. Set warn_abi_version and flag_abi_compat_version to the current
2122 version rather than 0. Fix defaulting flag_abi_compat_version from
2123 warn_abi_version.
2124
bb0f14ae
MS
21252018-06-12 Martin Sebor <msebor@redhat.com>
2126
2127 PR c/85931
2128 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
2129 sizeof source and destination yields the same value.
2130
3713f2e2
ML
21312018-06-12 Martin Liska <mliska@suse.cz>
2132
2133 * c.opt: Make MPX-related options as Deprecated.
2134
4af78ef8
DM
21352018-06-08 David Malcolm <dmalcolm@redhat.com>
2136
2137 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
2138 rather than 0.
2139
31db0fe0
ML
21402018-06-08 Martin Liska <mliska@suse.cz>
2141
2142 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
2143 for MPX (macros, related functions, fields in cgraph_node, ...).
2144 (handle_bnd_legacy): Likewise.
2145 (handle_bnd_instrument): Likewise.
2146 * c.opt: Likewise.
2147
fe16acf2
JJ
21482018-06-06 Jakub Jelinek <jakub@redhat.com>
2149
2150 PR c++/86068
2151 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
2152 __cpp_transactional_memory to 201500 instead of 210500.
2153
4dbdb49b
JM
21542018-06-06 Jason Merrill <jason@redhat.com>
2155
2156 PR c++/85710 - ICE with -Wmemset-elt-size.
2157 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
2158
f8ad043f
JM
21592018-06-01 Jason Merrill <jason@redhat.com>
2160
2161 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
2162 201703.
2163
abc24d93
EB
21642018-06-01 Eric Botcazou <ebotcazou@adacore.com>
2165
2166 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
2167 declaration for a typedef independently of whether the declaration of
2168 the subtype is generated.
2169
d258f4aa
MS
21702018-05-31 Martin Sebor <msebor@redhat.com>
2171
2172 PR c/82063
2173 * c.opt (-Wno-alloc-size-larger-than): New option.
2174
b67b9225
DP
21752018-04-22 David Pagan <dave.pagan@oracle.com>
2176
2177 PR c/55976
2178 * c-opts.c (c_common_post_options): Set default for warn_return_type
ab20d992 2179 for C++/C++ with ObjC extensions only. For C, makes it possible to
b67b9225
DP
2180 differentiate between default (no option), -Wreturn-type, and
2181 -Wno-return-type.
2182
04eb9c55
JM
21832018-05-29 Jason Merrill <jason@redhat.com>
2184
2185 * c.opt (Winit-list-lifetime): New flag.
2186
b0c31bc6
BE
21872018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
2188
2189 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
2190 splay_tree_delete_pointers.
2191
44284983
JJ
21922018-05-26 Jakub Jelinek <jakub@redhat.com>
2193
2194 PR bootstrap/85921
2195 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
2196 noinline variable to workaround broken kernel headers.
2197
b46b715d
JM
21982018-05-18 Jason Merrill <jason@redhat.com>
2199
2200 * c.opt (Wdeprecated-copy): New flag.
2201
40659769
ML
22022018-05-17 Martin Liska <mliska@suse.cz>
2203
2204 * c-warn.c (overflow_warning): Do not use
2205 space in between 'G_' and '('.
2206
403962ea
JM
22072018-05-09 Jason Merrill <jason@redhat.com>
2208
2209 * c-common.c (valid_array_size_p): Add complain parameter.
2210 * c-common.h: ...which defaults to true.
2211
1c9ee609
JJ
22122018-05-11 Jakub Jelinek <jakub@redhat.com>
2213
2214 PR c/85696
2215 * c-omp.c (c_omp_predetermined_sharing): Return
2216 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
2217
19916065
ML
22182018-05-11 Martin Liska <mliska@suse.cz>
2219
92a285c1 2220 PR sanitizer/85556
19916065
ML
2221 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
2222 TREE_LIST values.
2223
79e7b1fe
JJ
22242018-05-10 Jakub Jelinek <jakub@redhat.com>
2225
2226 PR c++/85662
2227 * c-common.h (fold_offsetof_1): Removed.
2228 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
2229 CTX argument defaulted to ERROR_MARK.
2230 * c-common.c (fold_offsetof_1): Renamed to ...
2231 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
2232 argument, convert the pointer constant to TYPE and use size_binop
2233 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
2234 a pointer type. Adjust recursive calls.
2235
86c12f76
EB
22362018-05-10 Eric Botcazou <ebotcazou@adacore.com>
2237
2238 PR c++/85400
2239 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
2240
ee336e84
NS
22412018-05-07 Nathan Sidwell <nathan@acm.org>
2242
2243 * c.opt (ffor-scope): Remove functionality, issue warning.
2244
6c072e21
NS
22452018-05-03 Nathan Sidwell <nathan@acm.org>
2246
2247 * c.opt (ffriend-injection): Remove functionality, issue warning.
2248
2cc7d3a7
DM
22492018-05-01 David Malcolm <dmalcolm@redhat.com>
2250
2251 PR c/84258
2252 * c-format.c (struct format_check_results): Add field
2253 "number_non_char".
2254 (check_format_info): Initialize it, and warn if encountered.
2255 (check_format_arg): Distinguish between wide char and
2256 everything else when detecting arrays of non-char.
2257
7761dfbe
DM
22582018-04-30 David Malcolm <dmalcolm@redhat.com>
2259
2260 * c-format.c (get_corrected_substring): Update for
2261 location_get_source_line returning a char_span. Use a char_span
2262 when handling the prefix of the correction.
2263 * c-indentation.c (get_visual_column): Update for
2264 location_get_source_line returning a char_span.
2265 (get_first_nws_vis_column): Likewise.
2266
62e98ef1
DM
22672018-03-29 David Malcolm <dmalcolm@redhat.com>
2268
2269 PR c++/84269
2270 * known-headers.cc (get_stdlib_header_for_name): Add various names
2271 from <assert.h>, <string.h>, and <memory.h>; add more names from
2272 <stdio.h>.
2273
a7dea617
JJ
22742018-03-27 Jakub Jelinek <jakub@redhat.com>
2275
2276 PR c++/85061
2277 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
2278 get_base_address of the second operand is a VAR_P, rather than the
2279 operand itself, and use gcc_checking_assert instead of gcc_assert.
2280
889a3a30
MP
22812018-03-23 Marek Polacek <polacek@redhat.com>
2282
2283 PR c++/85045
2284 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
2285 <case RDIV_EXPR>: Tweak condition.
2286
452154b9
EB
22872018-03-20 Eric Botcazou <ebotcazou@adacore.com>
2288
2289 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
2290
63ecb626
JJ
22912018-03-16 Jakub Jelinek <jakub@redhat.com>
2292
ce811fc4
JJ
2293 PR c/84909
2294 * c-warn.c (conversion_warning): Replace "to to" with "to" in
2295 diagnostics.
2296
63ecb626
JJ
2297 PR c/84910
2298 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
2299 diagnostics.
2300
a1295eec
RB
23012018-03-16 Richard Biener <rguenther@suse.de>
2302
2303 PR c/84873
2304 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
2305 unshare the possibly folded expression.
2306
919674fb
RB
23072018-03-15 Richard Biener <rguenther@suse.de>
2308
2309 PR c/84873
2310 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
2311
f99309b2
MS
23122018-03-13 Martin Sebor <msebor@redhat.com>
2313
2314 PR tree-optimization/84725
2315 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
2316 with all three narrow character types, including their qualified forms.
2317
e9b9fa4c
MS
23182018-03-12 Martin Sebor <msebor@redhat.com>
2319
2320 PR tree-optimization/83456
ab20d992 2321 * c-common.c (check_function_restrict): Return bool.
e9b9fa4c
MS
2322 Restore checking of bounded built-in functions.
2323 (check_function_arguments): Also return the result
2324 of warn_for_restrict.
ab20d992
JJ
2325 * c-common.c (check_function_restrict): Return bool.
2326 * c-warn.c (warn_for_restrict): Return bool.
e9b9fa4c 2327
0805d020
MP
23282018-03-02 Marek Polacek <polacek@redhat.com>
2329
2330 PR c++/84171
2331 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
2332 is erroneous.
2333
ed2a2f08
TS
23342018-03-02 Thomas Schwinge <thomas@codesourcery.com>
2335
2336 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
2337 function".
2338
90abdde0
MP
23392018-03-01 Marek Polacek <polacek@redhat.com>
2340
2341 PR c++/84639
2342 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
2343 alignment in computation.
2344
c6db43fa
EB
23452018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2346
2347 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
2348 <REAL_TYPE>: Deal specifically with _Float128/__float128.
2349
9e25c7ed
EB
23502018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2351
2352 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
2353 (is_char_array): Take a type instead of a declaration.
2354 (dump_ada_array_type): Likewise.
2355 (is_simple_enum): Minor tweak.
2356 (dump_ada_enum_type): New function extracted from...
2357 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
2358 <INTEGER_TYPE>: Remove unreachable code.
2359 <RECORD_TYPE>: Likewise. Minor tweaks.
2360 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
2361 <ENUMERAL_TYPE>: New case.
2362 <RECORD_TYPE>: Factor out common code.
2363 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
2364 Minor tweaks. Deal with enumeral types.
2365 (dump_ada_structure): Minor tweaks.
2366
09de3550
EB
23672018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2368
2369 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
2370 address for incomplete structures.
2371 (dump_forward_type): Do not bail out for incomplete structures.
2372 (dump_ada_declaration): Do not special-case incomplete structures
2373 for subtypes. Dump them as null records for types.
2374
095d8d4b
EB
23752018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2376
2377 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
2378 (is_char_array): Fix formatting.
2379 (dump_template_types): Likewise.
2380 (dump_generic_ada_node): Rename into...
2381 (dump_ada_node): ...this.
2382 <POINTER_TYPE>: Remove superfluous space. Use generic address for
2383 incomplete structures and not for empty structures. Do not use it
2384 when forward declarations are needed.
2385 (dump_forward_type): New function.
2386 (dump_nested_types): Remove FORWARD parameter. Do not consider
2387 TREE_VISITED and do not generate a forward declaration. Only dump
2388 original nested types for nested declaration.
2389 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
2390 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
2391 <RECORD_TYPE>: Do not consider TREE_VISITED.
2392 (dump_ada_declaration): Use booleans and fix formatting throughout.
2393 <TYPE_DECL>: Skip incomplete structures and not empty structures.
2394 Call dump_forward_type instead of dump_nested_types for a typedef.
2395 Remove superfluous check and adjust call to dump_nested_types.
2396 <POINTER_TYPE>: Call dump_forward_type and fall through.
2397 (dump_ada_struct_decl): Rename into...
2398 (dump_ada_structure): ...this. Do not special-case empty structures.
2399
d4cfd486
MS
24002018-02-27 Martin Sebor <msebor@redhat.com>
2401
2402 PR c++/83871
2403 * c.opt (-Wmissing-attributes): New option.
2404
b22dbd03
ML
24052018-02-21 Martin Liska <mliska@suse.cz>
2406
2407 * c.opt (Wcatch-value=): Add IntegerRange.
2408
883dfe2a
JM
24092018-02-15 Jason Merrill <jason@redhat.com>
2410
2411 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
2412
0444aa9c
NS
24132018-02-09 Nathan Sidwell <nathan@acm.org>
2414
2415 PR c/84293
2416 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
2417 arg.
2418 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
2419 arg. Adjust.
2420
cea71f0a
MS
24212018-02-09 Martin Sebor <msebor@redhat.com>
2422
2423 PR lto/84212
2424 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
2425 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
2426 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
2427 (-Wstrict-overflow, -Wsuggest-attribute): Same.
2428 (-Wuninitialized): Same.
2429
8c8b7be5
EB
24302018-02-09 Eric Botcazou <ebotcazou@adacore.com>
2431
2432 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
2433 keyword for components.
2434
7c30b12a
PC
24352018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2436
2437 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
2438
eece7fe5
JK
24392018-02-02 Julia Koval <julia.koval@intel.com>
2440
2441 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
2442
7d07a93a
MP
24432018-01-29 Marek Polacek <polacek@redhat.com>
2444
2445 PR c/83966
2446 * c-format.c (check_function_format): Check current_function_decl.
2447
53723269
JJ
24482018-01-27 Jakub Jelinek <jakub@redhat.com>
2449
2450 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
2451 argument.
2452 (LAZY_HEX_FP_VALUES_CNT): Define.
2453 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
2454 values rather than just 12.
2455 (builtin_define_with_hex_fp_value): Likewise.
2456
7365279f
BK
24572018-01-18 Boris Kolpackov <boris@codesynthesis.com>
2458
92a285c1
ML
2459 PR other/70268
2460 * c.opt (-fmacro-prefix-map): New option.
2461 * c-opts.c (c_common_handle_option): Handle it.
2462 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
2463 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 2464
bb9869d5
DM
24652018-01-17 David Malcolm <dmalcolm@redhat.com>
2466
2467 PR c++/83814
2468 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
2469
68dc87c3
EB
24702018-01-10 Eric Botcazou <ebotcazou@adacore.com>
2471
2472 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
2473 Skip 'f' and 'F' characters if it is true.
2474 (store_ada_macro): Minor tweak.
2475 (dump_ada_macros) <CPP_COMMENT>: Likewise.
2476 <CPP_WSTRING>: Likewise.
2477 <CPP_STRING>: Output '&' in the buffer if not the first string.
2478 <CPP_NUMBER>: Adjust calls to dump_number.
2479
9a004410
DM
24802018-01-10 David Malcolm <dmalcolm@redhat.com>
2481
2482 PR c++/43486
2483 * c-common.c: Include "selftest.h".
2484 (get_atomic_generic_size): Perform the test for integral type
2485 before the range test for any integer constant, fixing indentation
2486 of braces. Call fold_for_warn before testing for an INTEGER_CST.
2487 (reject_gcc_builtin): Strip any location wrapper from EXPR.
2488 (selftest::test_fold_for_warn): New function.
2489 (selftest::c_common_c_tests): New function.
2490 (selftest::c_family_tests): Call it, and
2491 selftest::c_pretty_print_c_tests.
2492 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
2493 * c-format.c (check_format_arg): Convert VAR_P check to a
2494 fold_for_warn.
2495 * c-pretty-print.c: Include "selftest.h".
2496 (pp_c_cast_expression): Don't print casts for location wrappers.
2497 (selftest::assert_c_pretty_printer_output): New function.
2498 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
2499 (selftest::test_location_wrappers): New function.
2500 (selftest::c_pretty_print_c_tests): New function.
2501 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
2502
5c0caeb3
RS
25032018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2504 Alan Hayward <alan.hayward@arm.com>
2505 David Sherwood <david.sherwood@arm.com>
2506
2507 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
2508
73a699ae
RS
25092018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2510 Alan Hayward <alan.hayward@arm.com>
2511 David Sherwood <david.sherwood@arm.com>
2512
2513 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
2514 as polynomial.
2515
928686b1
RS
25162018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2517 Alan Hayward <alan.hayward@arm.com>
2518 David Sherwood <david.sherwood@arm.com>
2519
2520 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
2521 (convert_vector_to_array_for_subscript): Handle polynomial
2522 TYPE_VECTOR_SUBPARTS.
2523 (c_common_type_for_mode): Check valid_vector_subparts_p.
2524 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
2525 VECTOR_CST_NELTS.
2526
85ec4feb
JJ
25272018-01-03 Jakub Jelinek <jakub@redhat.com>
2528
2529 Update copyright years.
2530
170a8bd6 25312017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 2532 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
2533
2534 * c-pragma.c (init_pragma): Register pragma GCC unroll.
2535 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
2536
ab20d992 25372017-12-22 Alexandre Oliva <aoliva@redhat.com>
18408e96
AO
2538
2539 PR debug/83527
2540 PR debug/83419
2541 * c-semantics.c (only_debug_stmts_after_p): New.
2542 (pop_stmt_list): Clear side effects in debug-only stmt list.
2543 Check for single nondebug stmt followed by debug stmts only.
2544
c12d20d4
AO
25452017-12-21 Alexandre Oliva <aoliva@redhat.com>
2546
2547 PR debug/83419
2548 * c-semantics.c (pop_stmt_list): Propagate side effects from
2549 single nondebug stmt to container list.
2550
01512446
JJ
25512017-12-19 Jakub Jelinek <jakub@redhat.com>
2552
2553 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
2554 conditions with typical order conditions.
2555
82cfbd01
MP
25562017-12-18 Marek Polacek <polacek@redhat.com>
2557
2558 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
2559 not in effect.
2560
99da11ec
MS
25612017-12-17 Martin Sebor <msebor@redhat.com>
2562
2563 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
2564 an error for attribute warn_if_not_aligned.
2565
cc8bea0a
MS
25662017-12-16 Martin Sebor <msebor@redhat.com>
2567
2568 PR tree-optimization/78918
2569 * c-common.c (check_function_restrict): Avoid checking built-ins.
2570 * c.opt (-Wrestrict): Include in -Wall.
2571
4849deb1
JJ
25722017-12-15 Jakub Jelinek <jakub@redhat.com>
2573
2574 * c-attribs.c (c_common_attribute_table,
2575 c_common_format_attribute_table): Swap affects_type_identity
2576 and handler fields, adjust comments.
2577
c65e18d3
BE
25782017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2579
2580 * c.opt (Wcast-function-type): New warning option.
2581 * c-lex.c (get_fileinfo): Avoid warning.
2582 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
2583
2004617a
QZ
25842017-12-14 Qing Zhao <qing.zhao@oracle.com>
2585
7365279f 2586 PR middle_end/79538
2004617a
QZ
2587 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
2588 Adjust the size of buf1 and buf2, add a new buf to avoid
2589 format-overflow warning.
2590
ab20d992 25912017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
2592
2593 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
2594 subsequent statement list.
2595
5d9ae53d
MS
25962017-12-07 Martin Sebor <msebor@redhat.com>
2597
2598 PR c/81544
2599 PR c/81566
2600 * c-attribs.c (attr_aligned_exclusions): New array.
2601 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
2602 (attr_common_exclusions, attr_const_pure_exclusions): Same.
2603 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
2604 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
2605 (attr_warn_unused_result_exclusions): Same.
2606 (handle_hot_attribute, handle_cold_attribute): Simplify.
2607 (handle_const_attribute): Warn on function returning void.
2608 (handle_pure_attribute): Same.
2609 (handle_aligned_attribute): Diagnose conflicting attribute
2610 specifications.
2611 * c-warn.c (diagnose_mismatched_attributes): Simplify.
2612
c79144f8
DM
26132017-12-06 David Malcolm <dmalcolm@redhat.com>
2614
2615 PR c/83236
2616 * c-common.c (selftest::c_family_tests): Call
2617 selftest::c_spellcheck_cc_tests.
2618 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
2619 * c-spellcheck.cc: Include "selftest.h".
2620 (name_reserved_for_implementation_p): New function.
2621 (should_suggest_as_macro_p): New function.
2622 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
2623 should_suggest_as_macro_p and call it.
2624 (selftest::test_name_reserved_for_implementation_p): New function.
2625 (selftest::c_spellcheck_cc_tests): New function.
2626 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
2627
613bc14f
DM
26282017-12-06 David Malcolm <dmalcolm@redhat.com>
2629
2630 * c-spellcheck.cc: New file, taken from macro-handling code in
2631 spellcheck-tree.c.
2632 * c-spellcheck.h: New file, taken from macro-handling code in
2633 spellcheck-tree.h.
2634
e76c7157
JJ
26352017-12-01 Jakub Jelinek <jakub@redhat.com>
2636
2637 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
2638 attribute.
2639 (handle_simd_attribute): Don't check for "cilk simd function"
2640 attribute. Reindent, formatting changes.
2641
b0da4034
JK
26422017-11-30 Julia Koval <julia.koval@intel.com>
2643
2644 * c-common.h (inv_list): Remove.
2645
058f0b9e
JJ
26462017-11-28 Jakub Jelinek <jakub@redhat.com>
2647
2648 PR sanitizer/81275
2649 * c-common.c (c_switch_covers_all_cases_p_1,
2650 c_switch_covers_all_cases_p): New functions.
2651 * c-common.h (c_switch_covers_all_cases_p): Declare.
2652
5e9d6aa4 26532017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 2654 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
2655
2656 * array-notation-common.c: Delete.
2657 * c-cilkplus.c: Ditto.
2658 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
2659 * c-common.def (ARRAY_NOTATION_REF): Remove.
2660 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
2661 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
2662 c_validate_cilk_plus_loop, cilkplus_an_parts,
2663 cilk_ignorable_spawn_rhs_op,
2664 cilk_recognize_spawn): Remove.
2665 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
2666 * c-omp.c: Remove CILK_SIMD check.
2667 * c-pragma.c: Ditto.
2668 * c-pragma.h: Remove CILK related pragmas.
2669 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
2670 ARRAY_NOTATION_REF condition.
2671 (c_pretty_printer::expression): Ditto.
2672 * c.opt (fcilkplus): Remove.
2673 * cilk.c: Delete.
2674
1af4ebf5
MG
26752017-11-21 Marc Glisse <marc.glisse@inria.fr>
2676
2677 * c-pretty-print.c (pp_c_additive_expression,
2678 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
2679
d44ed508
JJ
26802017-11-21 Jakub Jelinek <jakub@redhat.com>
2681
7d2f0f9b
JJ
2682 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
2683
d44ed508
JJ
2684 PR c++/83059
2685 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
2686 instead of tree_to_uhwi, formatting fix.
2687
26edace6
DM
26882017-11-20 David Malcolm <dmalcolm@redhat.com>
2689
2690 PR c/81404
2691 * known-headers.cc: New file, based on material from c/c-decl.c.
2692 (suggest_missing_header): Copied as-is.
2693 (get_stdlib_header_for_name): New, based on get_c_name_hint but
2694 heavily edited to add C++ support. Add some knowledge about
2695 <limits.h>, <stdint.h>, and <wchar.h>.
2696 * known-headers.h: Likewise.
2697
6c7a259b
DM
26982017-11-20 David Malcolm <dmalcolm@redhat.com>
2699
2700 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
2701 (lookup_name_fuzzy): Likewise. Convert return type from
2702 const char * to name_hint. Add location_t param.
2703 * name-hint.h: New header.
2704
f9c59f7e
JJ
27052017-11-19 Jakub Jelinek <jakub@redhat.com>
2706
2707 PR c/66618
2708 PR c/69960
2709 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
2710
1e39313a
JM
27112017-11-16 Joseph Myers <joseph@codesourcery.com>
2712
2713 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
2714 expected publication date of C17.
2715 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
2716
3ca0dc60
JM
27172017-11-15 Joseph Myers <joseph@codesourcery.com>
2718
2719 PR c/81156
2720 * c-common.c (c_common_reswords): Add __builtin_tgmath.
2721 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
2722
025d57f0
MS
27232017-11-10 Martin Sebor <msebor@redhat.com>
2724
2725 PR c/81117
2726 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
2727 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
2728 * c.opt (-Wstringop-truncation): New option.
2729
1b6fa695
ML
27302017-11-06 Martin Liska <mliska@suse.cz>
2731
2732 PR middle-end/82404
2733 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
2734 FE.
2735 * c.opt: Set default value of warn_return_type.
2736
64a5912c
DM
27372017-10-31 David Malcolm <dmalcolm@redhat.com>
2738
2739 * c-common.c (binary_op_error): Update for renaming of
2740 error_at_rich_loc.
2741 (c_parse_error): Likewise.
2742 * c-warn.c (warn_logical_not_parentheses): Likewise for
2743 renaming of inform_at_rich_loc.
2744 (warn_for_restrict): Likewise for renaming of
2745 warning_at_rich_loc_n.
2746
c76dc9c3
JM
27472017-10-30 Joseph Myers <joseph@codesourcery.com>
2748
2749 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
2750 * c-opts.c (set_std_c17): New function.
2751 (c_common_init_options): Use gnu17 as default C version.
2752 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
2753
ee5fd23a
MM
27542017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2755
2756 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
2757 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
2758 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
2759 __FP_FAST_FMA<N>X.
2760
d1047465
MP
27612017-10-23 Marek Polacek <polacek@redhat.com>
2762
2763 PR c/82681
2764 * c-warn.c (warnings_for_convert_and_check): Fix typos.
2765
9e878cf1
EB
27662017-10-19 Eric Botcazou <ebotcazou@adacore.com>
2767
2768 * c-common.c (check_builtin_function_arguments): Also check arguments
2769 of __builtin_alloca_with_align_and_max.
2770
89b6abbb
DM
27712017-10-17 David Malcolm <dmalcolm@redhat.com>
2772
2773 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
2774 rather than NULL to format_warning_va.
2775 (check_format_types): Likewise when calling format_type_warning.
2776 Remove code to extract source_ranges and source_range * in favor
2777 of just a location_t.
2778 (format_type_warning): Convert source_range * param to a
2779 location_t.
2780
39382c09
JJ
27812017-10-13 Jakub Jelinek <jakub@redhat.com>
2782
2783 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
2784 [LR]SHIFT_EXPR.
2785
62e1c678
DM
27862017-10-12 David Malcolm <dmalcolm@redhat.com>
2787
2788 * c-common.c (enum missing_token_insertion_kind): New enum.
2789 (get_missing_token_insertion_kind): New function.
2790 (maybe_suggest_missing_token_insertion): New function.
2791 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
2792
b90c9338
NS
27932017-10-11 Nathan Sidwell <nathan@acm.org>
2794
2795 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
2796 (c_common_handle_option): Update incpath_kind names.
2797
3a266bcd
ML
27982017-10-11 Martin Liska <mliska@suse.cz>
2799
2800 PR sanitizer/82490
2801 * c-attribs.c (handle_no_sanitize_attribute): Report directly
2802 Wattributes warning.
2803
8e6cdc90
RS
28042017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2805
2806 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
2807 operating on trees as wide_ints.
2808 * c-common.c (pointer_int_sum): Likewise.
2809 * c-pretty-print.c (pp_c_integer_constant): Likewise.
2810 * c-warn.c (match_case_to_enum_1): Likewise.
2811 (c_do_switch_warnings): Likewise.
2812 (maybe_warn_shift_overflow): Likewise.
2813
802b38c9
JJ
28142017-10-10 Jakub Jelinek <jakub@redhat.com>
2815
2816 PR c/82437
2817 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
2818 instead of wide_int::from.
2819
4e34b338
JJ
28202017-10-06 Jakub Jelinek <jakub@redhat.com>
2821
2822 PR c/82437
2823 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
2824 using to_widest use wide_int with the larger of the two precisions.
2825
4bc4b2b4
BE
28262017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
2827
2828 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
2829 functions.
2830
a1488398
RS
28312017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
2832
2833 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
2834 when combining the original unconverted comparison operands.
2835
01c9fb68
JJ
28362017-09-29 Jakub Jelinek <jakub@redhat.com>
2837
2838 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
2839 attribute.
2840
6e3e8419
EB
28412017-09-29 Eric Botcazou <ebotcazou@adacore.com>
2842
2843 * c-ada-spec.c (to_ada_name): Add index parameter.
2844 (pp_ada_tree_identifier): Likewise.
2845 (dump_ada_macros): Adjust call to to_ada_name.
2846 (struct overloaded_name_hash): New type.
2847 (struct overloaded_name_hasher): Likewise.
2848 (overloaded_names): New hash table.
2849 (compute_overloading_index): New function.
2850 (dump_ada_decl_name): Call it and pass the result to
2851 pp_ada_tree_identifier.
2852 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
2853 (dump_ada_function_declaration): Likewise.
2854 (dump_generic_ada_node): Likewise.
2855 (print_constructor): Likewise.
2856 (print_destructor): Likewise.
2857 (dump_ada_specs): Delete overloaded_names table.
2858
79310774
EB
28592017-09-29 Eric Botcazou <ebotcazou@adacore.com>
2860
2861 * c-ada-spec.c (max_ada_macros): Move around.
2862 (store_ada_macro_index): Likewise.
2863 (source_file): Rename into...
2864 (macro_source_file): ...this.
2865 (count_ada_macro): Move around.
2866 (store_ada_macro): Likewise.
2867 (compare_macro): Likewise.
2868 (print_ada_macros): Merge in...
2869 (dump_ada_macros): ...this.
2870 (source_file_base): Rename into...
2871 (current_source_file): ...this.
2872 (print_comment): Move around.
2873 (dump_ada_nodes): Call dump_ada_declaration directly.
2874 (struct with): Change type of limited field to bool.
2875 (append_withs): Change type of limited_access parameter to bool.
2876 (pp_ada_tree_identifie): Likewise.
2877 (dump_ada_decl_nam): Likewise.
2878 (dump_generic_ada_node): Likewise. Do not print the return type.
2879 (to_ada_name): Change type of space_found parameter to bool.
2880 (dump_ada_function_declaration): Return void and change type of
2881 parameters to bool. Also print the return type for a function.
2882 (print_ada_methods): Rename into...
2883 (dump_ada_methods): ...this.
2884 (print_ada_declaration): Rename into ...
2885 (dump_ada_declaration): ...this. Do not print the return type.
2886 (print_ada_struct_decl): Rename into...
2887 (dump_ada_struct_decl): ...this.
2888
7d386d45
JJ
28892017-09-29 Jakub Jelinek <jakub@redhat.com>
2890
2891 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
2892 rather than DECL_INITIAL.
2893 (common_handle_aligned_attribute): Likewise.
2894
ab20d992 28952017-09-20 Alexandre Oliva <aoliva@redhat.com>
9ed32e27
AO
2896
2897 * c.opt (gen-decls): Add RejectNegative.
2898
026a79f7
AS
28992017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
2900 Jakub Jelinek <jakub@redhat.com>
2901
2902 Add support for -std=c++2a.
2903 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
2904 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
2905 * c-opts.c (set_std_cxx2a): New.
2906 (c_common_handle_option): Set options when -std=c++2a is enabled.
2907 (c_common_post_options): Adjust comments.
2908 (set_std_cxx14, set_std_cxx17): Likewise.
2909
4a8ca690
EB
29102017-09-15 Eric Botcazou <ebotcazou@adacore.com>
2911
2912 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
2913 message for non-uniform endianness and issue a warning in C++.
2914
7b936140
JJ
29152017-09-15 Jakub Jelinek <jakub@redhat.com>
2916
2917 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
2918 (Wc++17-compat): Change from undocumented alias to option.
2919 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
2920 change C++1z to C++17 in description.
2921 (std=c++1z, std=gnu++1z): Change from option to undocumented
2922 deprecated alias.
2923 (std=c++17, std=gnu++17): Change from undocumented alias to option.
2924 Adjust description.
2925 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
2926 * c-opts.c (set_std_cxx1z): Rename to ...
2927 (set_std_cxx17): ... this.
2928 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
2929 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 2930 caller.
7b936140
JJ
2931 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
2932 comments.
2933
12263f13
L
29342017-09-12 H.J. Lu <hongjiu.lu@intel.com>
2935
2936 * c-attribs.c (common_handle_aligned_attribute): Don't warn
2937 function alignment if warn_if_not_aligned_p is true.
2938
6836632e
NS
29392017-09-12 Nathan Sidwell <nathan@acm.org>
2940
2941 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2942 resort_sorted_fields): Move to c/c-decl.c.
2943 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
2944 (struct sorted_fields_type): Move to c/c-lang.h.
2945
019bf9ad
JW
29462017-09-09 Jonathan Wakely <jwakely@redhat.com>
2947
2948 PR c++/81852
2949 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
2950
bc7fe952
MP
29512017-09-04 Marek Polacek <polacek@redhat.com>
2952
2953 PR c/81783
2954 * c-warn.c (warn_tautological_bitwise_comparison): New function.
2955 (warn_tautological_cmp): Call it.
2956
ab20d992 29572017-09-01 Boris Kolpackov <boris@codesynthesis.com>
de7c2c6a
BK
2958
2959 * c-opts.c (c_common_finish): Write dependency information even if
2960 there are errors.
2961
d2e05fcb
JJ
29622017-09-01 Jakub Jelinek <jakub@redhat.com>
2963
2964 PR c/81887
2965 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
2966 (omp_pragmas_simd): ... here.
2967 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
2968 create new clauses list containing just simd clause.
2969
18e2a8b8
RS
29702017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2971 Alan Hayward <alan.hayward@arm.com>
2972 David Sherwood <david.sherwood@arm.com>
2973
2974 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
2975 into scalar_mode_supported_p call.
2976 (handle_mode_attribute): Update call to scalar_mode_supported_p.
2977
16d22000
RS
29782017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2979 Alan Hayward <alan.hayward@arm.com>
2980 David Sherwood <david.sherwood@arm.com>
2981
2982 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
2983 for the mode iterator.
2984
b397965c
RS
29852017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2986 Alan Hayward <alan.hayward@arm.com>
2987 David Sherwood <david.sherwood@arm.com>
2988
2989 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
2990 * c-common.c (c_build_vec_perm_expr): Likewise.
2991
357b7604
RS
29922017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2993 Alan Hayward <alan.hayward@arm.com>
2994 David Sherwood <david.sherwood@arm.com>
2995
2996 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
2997
e05c94ba
RS
29982017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2999 Alan Hayward <alan.hayward@arm.com>
3000 David Sherwood <david.sherwood@arm.com>
3001
3002 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
3003 before calling targetm.addr_space.valid_pointer_mode.
3004
5c20c4af
RS
30052017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3006 Alan Hayward <alan.hayward@arm.com>
3007 David Sherwood <david.sherwood@arm.com>
3008
3009 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
3010
c94843d2 30112017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
3012 Alan Hayward <alan.hayward@arm.com>
3013 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
3014
3015 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
3016 iterators.
3017 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
3018
4e10a5a7
RS
30192017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3020 Alan Hayward <alan.hayward@arm.com>
3021 David Sherwood <david.sherwood@arm.com>
3022
3023 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
3024 case statements.
3025
130fcab0
ML
30262017-08-29 Martin Liska <mliska@suse.cz>
3027
3028 PR other/39851
3029 * c-common.c (parse_optimize_options): Add argument to function
3030 call.
3031 * c-pragma.c (handle_pragma_diagnostic): Likewise.
3032
14e18d71
DM
30332017-08-24 David Malcolm <dmalcolm@redhat.com>
3034
3035 * c-lex.c (interpret_float): Use token location
3036 when building an EXCESS_PRECISION_EXPR.
3037
2f687306
DM
30382017-08-21 David Malcolm <dmalcolm@redhat.com>
3039
3040 * c-common.c (check_function_arguments): Add "arglogs" param; pass
3041 it to check_function_format.
3042 * c-common.h (check_function_arguments): Add vec<location_t> *
3043 param.
3044 (check_function_format): Likewise.
3045 * c-format.c (struct format_check_context): Add field "arglocs".
3046 (check_function_format): Add param "arglocs"; pass it to
3047 check_format_info.
ab20d992 3048 (check_format_info): Add param "arglocs"; use it to initialize
2f687306
DM
3049 new field of format_ctx.
3050 (check_format_arg): Pass format_ctx->arglocs to new param of
3051 check_format_info_main.
3052 (class argument_parser): New field "arglocs".
3053 (argument_parser::argument_parser): Add "arglocs_" param and use
3054 it to initialize new field.
3055 (argument_parser::check_argument_type): Pass new arglocs field to
3056 check_format_types.
3057 (check_format_info_main): Add param "arglocs", and use it when
3058 constructing arg_parser.
3059 (check_format_types): Add param "arglocs"; use it if non-NULL when
3060 !EXPR_HAS_LOCATION (cur_param) to get at location information.
3061
00aa1fa2
L
30622017-08-18 H.J. Lu <hongjiu.lu@intel.com>
3063
3064 PR c/53037
3065 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
3066 (c_common_attribute_table): Add warn_if_not_aligned.
3067 (handle_aligned_attribute): Renamed to ...
3068 (common_handle_aligned_attribute): Remove argument, name, and add
3069 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
3070 (handle_aligned_attribute): New.
3071 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
3072
27be025d
MS
30732017-08-14 Martin Sebor <msebor@redhat.com>
3074
3075 PR c/81117
3076 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
3077 (handle_nonstring_attribute): New function.
3078
da67acb9
MS
30792017-08-14 Martin Sebor <msebor@redhat.com>
3080
3081 PR c/81117
3082 * c-format.h (T89_G): New macro.
3083 * c-format.c (local_gcall_ptr_node): New variable.
3084 (init_dynamic_diag_info): Initialize it.
3085
a8b522b4
ML
30862017-08-11 Martin Liska <mliska@suse.cz>
3087
3088 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
3089 TARGET_SUPPORTS_ALIASES.
3090
32129a17
DM
30912017-08-10 David Malcolm <dmalcolm@redhat.com>
3092
3093 * c-common.c (c_parse_error): Add rich_location * param, using it
3094 rather implicitly using input_location.
3095 * c-common.h (c_parse_error): Add rich_location * param.
3096
30af3a2b
MP
30972017-08-09 Marek Polacek <polacek@redhat.com>
3098
3099 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
3100 (c_common_truthvalue_conversion): Likewise.
3101 * c-omp.c (c_finish_omp_atomic): Likewise.
3102 * c-common.h (build_binary_op): Update declaration.
3103
314e6352
ML
31042017-08-08 Martin Liska <mliska@suse.cz>
3105
3106 * c-ada-spec.c: Include header files.
3107 * c-ubsan.c: Likewise.
3108 * c-warn.c: Likewise.
3109
56b5041c
JJ
31102017-08-07 Jakub Jelinek <jakub@redhat.com>
3111
3112 PR c/69389
3113 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
3114
db440138
EB
31152017-08-07 Eric Botcazou <ebotcazou@adacore.com>
3116
3117 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
3118 (print_ada_methods): Likewise.
3119 (print_ada_declaration): Likewise.
3120
577eec56
ML
31212017-08-07 Martin Liska <mliska@suse.cz>
3122
3123 * array-notation-common.c: Add new includes.
3124 * c-format.c( handle_format_attribute): Canonicalize a format
3125 function name.
3126 * c-lex.c (c_common_has_attribute): Canonicalize name of an
3127 attribute.
3128 * c-pretty-print.c: Add new include.
3129
b854df3c
EB
31302017-08-05 Eric Botcazou <ebotcazou@adacore.com>
3131
3132 * c-ada-spec.c (has_static_fields): Look only into variables.
3133 (print_constructor): Add TYPE parameter and use it for the name.
3134 (print_destructor): Likewise.
3135 (print_ada_declaration): Adjust to new constructor/destructor names.
3136 Adjust calls to print_constructor and print_destructor.
3137 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
3138 Look only into variables in the final loop.
3139
9f2cb25e
EB
31402017-08-01 Eric Botcazou <ebotcazou@adacore.com>
3141
3142 * c-ada-spec.c (has_static_fields): Look only into fields.
3143 (dump_generic_ada_node): Small tweak.
3144 (dump_nested_types): Look only into fields.
3145 (print_ada_declaration): Look only into methods. Small tweak.
3146 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
3147
f4bcd9eb
EB
31482017-08-01 Eric Botcazou <ebotcazou@adacore.com>
3149
3150 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
3151 (dump_ada_function_declaration): Likewise.
3152 (dump_generic_ada_node): Likewise.
3153 (print_ada_declaration): Add support for const-qualified variables.
3154
f34ebeb2
ML
31552017-07-31 Martin Liska <mliska@suse.cz>
3156
3157 PR sanitize/81530
3158 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
3159 Guard condition with flag_sanitize_p also with current_function_decl
3160 non-null equality.
3161 (ubsan_maybe_instrument_reference_or_call): Likewise.
3162
218e5d04
UB
31632017-07-30 Uros Bizjak <ubizjak@gmail.com>
3164
3165 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
3166
942047f2
EB
31672017-07-29 Eric Botcazou <ebotcazou@adacore.com>
3168
3169 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
3170 for enumeral types.
3171 (print_ada_declaration): Add missing guard for record types.
3172
a40ff0ae
JJ
31732017-07-27 Jakub Jelinek <jakub@redhat.com>
3174
3175 PR c/45784
3176 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
3177 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
3178 new COMPOUND_EXPRs around the rhs of the comparison.
3179
06bd22f6
MP
31802017-07-27 Marek Polacek <polacek@redhat.com>
3181
3182 PR c/81417
3183 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
3184 the types.
3185
036ea399
JJ
31862017-07-27 Jakub Jelinek <jakub@redhat.com>
3187
3188 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
3189 (handle_noipa_attribute): New function.
3190
417ca011
TD
31912017-07-07 Torsten Duwe <duwe@suse.de>
3192
3193 * c-attribs.c (c_common_attribute_table): Add entry for
3194 "patchable_function_entry".
3195
5aaa8fb4
NS
31962017-07-20 Nathan Sidwell <nathan@acm.org>
3197
3198 Remove TYPE_METHODS.
3199 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
3200 dump_ada_template, print_ada_methods,
3201 print_ada_declaration): Member fns are on TYPE_FIELDS.
3202
ff22eb12
NS
32032017-07-18 Nathan Sidwell <nathan@acm.org>
3204
3205 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
3206
eea77d1f
DM
32072017-07-14 David Malcolm <dmalcolm@redhat.com>
3208
3209 * c-common.c (try_to_locate_new_include_insertion_point): New
3210 function.
3211 (per_file_includes_t): New typedef.
3212 (added_includes_t): New typedef.
3213 (added_includes): New variable.
3214 (maybe_add_include_fixit): New function.
3215 * c-common.h (maybe_add_include_fixit): New decl.
3216
281ac396
MS
32172017-07-10 Martin Sebor <msebor@redhat.com>
3218
3219 PR other/81345
3220 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
3221
b6f43128
DM
32222017-07-06 David Malcolm <dmalcolm@redhat.com>
3223
3224 * c-common.c (selftest::c_family_tests): New.
3225 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
3226 (selftest::c_family_tests): New decl.
3227
efbf55b0
MP
32282017-07-04 Marek Polacek <polacek@redhat.com>
3229
3230 PR c/81231
3231 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
3232 types.
3233
6c86bd88
MP
32342017-07-04 Marek Polacek <polacek@redhat.com>
3235
3236 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
3237
17a7218b
ML
32382017-06-28 Martin Liska <mliska@suse.cz>
3239
3240 PR ipa/81128
3241 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
3242 to a function declaration.
3243
63010089
ML
32442017-06-28 Martin Liska <mliska@suse.cz>
3245
3246 PR driver/79659
3247 * c.opt: Add IntegerRange to various options.
3248
3e2becc4
MP
32492017-06-26 Marek Polacek <polacek@redhat.com>
3250
3251 PR c/80116
3252 * c-common.h (warn_for_multistatement_macros): Declare.
3253 * c-warn.c: Include "c-family/c-indentation.h".
3254 (warn_for_multistatement_macros): New function.
3255 * c.opt (Wmultistatement-macros): New option.
3256 * c-indentation.c (guard_tinfo_to_string): No longer static.
3257 Change the parameter type to "enum rid". Handle RID_SWITCH.
3258 * c-indentation.h (guard_tinfo_to_string): Declare.
3259
2db9b7cd
MG
32602017-06-23 Marc Glisse <marc.glisse@inria.fr>
3261
3262 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
3263
c3684b7b
MS
32642017-06-15 Martin Sebor <msebor@redhat.com>
3265
3266 PR c++/80560
3267 * c.opt (-Wclass-memaccess): New option.
3268
e72c4afd
BK
32692017-06-14 Boris Kolpackov <boris@codesynthesis.com>
3270
3271 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
3272
8a516588
MP
32732017-06-13 Marek Polacek <polacek@redhat.com>
3274
3275 PR objc/80949
3276 * c-warn.c (do_warn_duplicated_branches): Return if any of the
3277 branches is null.
3278
45b2222a
ML
32792017-06-13 Martin Liska <mliska@suse.cz>
3280
3281 PR sanitize/78204
3282 * c-attribs.c (add_no_sanitize_value): New function.
3283 (handle_no_sanitize_attribute): Likewise.
3284 (handle_no_sanitize_address_attribute): Use the function.
3285 (handle_no_sanitize_thread_attribute): New function.
3286 (handle_no_address_safety_analysis_attribute): Use
3287 add_no_sanitize_value.
3288 (handle_no_sanitize_undefined_attribute): Likewise.
3289 * c-common.h: Declare new functions.
3290 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
3291 (ubsan_instrument_shift): Likewise.
3292 (ubsan_instrument_bounds): Likewise.
3293 (ubsan_maybe_instrument_array_ref): Likewise.
3294 (ubsan_maybe_instrument_reference_or_call): Likewise.
3295
a01f151f
JM
32962017-06-11 Jason Merrill <jason@redhat.com>
3297
3298 * c-ada-spec.c, c-pragma.c: Use id_equal.
3299
3de4ac6d
MP
33002017-06-04 Marek Polacek <polacek@redhat.com>
3301
3302 PR c/80919
3303 * c-format.c (matching_type_p): Return false if any of the types
3304 requires structural equality.
3305
2474f48f
MS
33062017-06-02 Martin Sebor <msebor@redhat.com>
3307
3308 PR c/80892
3309 * c-warn.c (conversion_warning): Use -Wconversion for integer
3310 conversion and -Wfloat-conversion for floating one.
3311
40ffd95f
BE
33122017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3313
3314 * c.opt (Wsizeof-pointer-div): New warning option.
3315
3fa4634c
VR
33162017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
3317
3318 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
3319 (Wcatch-value=1): Enable by -Wall.
3320
f012c8ef
DM
33212017-05-30 David Malcolm <dmalcolm@redhat.com>
3322
3323 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
3324 format_chars.
3325 * c.opt (fdiagnostics-show-template-tree): New option.
3326 (felide-type): New option.
3327
63dbcd13
VR
33282017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
3329
3330 * c.opt (Wcatch-value=): New C++ warning flag.
3331
be136b5c
NS
33322017-05-24 Nathan Sidwell <nathan@acm.org>
3333
3334 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
3335 const casts to avoid warning.
3336
3cd211af
MS
33372017-05-24 Martin Sebor <msebor@redhat.com>
3338
3339 PR c/80731
3340 * c-common.h (unsafe_conversion_p): Add a function argument.
3341 * c-common.c (unsafe_conversion_p): Same.
3342 Add type names and values to diagnostics.
3343 (scalar_to_vector): Adjust.
3344 * c-warn.c (constant_expression_error): Add a function argument.
3345 Add type names and values to diagnostics.
3346 (conversion_warning): Add a function argument.
3347 Add type names and values to diagnostics.
3348 (warnings_for_convert_and_check): Same.
3349
1ff7be5a
JM
33502017-05-19 Jason Merrill <jason@redhat.com>
3351
3352 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
3353 enumerators.
3354
ff502317
BE
33552017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3356
3357 * c-format.c (locus): Move out of function scope,
3358 add GTY attribute.
3359
2a8a8d7b
NS
33602017-05-19 Nathan Sidwell <nathan@acm.org>
3361
3362 * c-opts.c (class_dump_file, class_dump_flags): Delete.
3363 (c_common_parse_file): Remove class dump handling.
3364 (get_dump_info): Likewise.
3365
39aac208
RB
33662017-05-19 Richard Biener <rguenther@suse.de>
3367
3368 PR c++/80593
3369 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
3370 to alias-set zero memory.
3371
6ecd2339
BE
33722017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3373
3374 * c-format.c (local_tree_type_node): Add GTY attribute.
3375
6574d78e
MP
33762017-05-18 Marek Polacek <polacek@redhat.com>
3377
3378 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
3379 (c_common_fixed_point_type_for_size): Likewise.
3380 (c_common_type_for_mode): Likewise.
3381 (shorten_compare): Likewise.
3382 (c_promoting_integer_type_p): Use false/true instead of 0/1.
3383 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
3384
e3455240
MP
33852017-05-18 Marek Polacek <polacek@redhat.com>
3386
3387 * c-common.c (self_promoting_args_p): Change the return type to bool.
3388 Use false/true instead of 0/1.
3389 * c-common.h (self_promoting_args_p): Update.
3390
3fa8871b
MP
33912017-05-17 Marek Polacek <polacek@redhat.com>
3392
3393 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
3394 * c-warn.c: Likewise.
3395
b42cc3ca
VV
33962017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
3397
3398 Implement new C++ intrinsics __is_assignable and __is_constructible.
3399 * c-common.c (__is_assignable, __is_constructible): New.
3400 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
3401
1a817418
ML
34022017-05-17 Martin Liska <mliska@suse.cz>
3403
3404 * c-common.h: Introduce dump_flags_t type and
3405 use it instead of int type.
3406 * c-gimplify.c (c_genericize): Likewise.
3407 * c-opts.c: Likewise.
3408
b2fa0a8b
MP
34092017-05-17 Marek Polacek <polacek@redhat.com>
3410
3411 * c-common.c (c_save_expr): Remove.
3412 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
3413 * c-common.h (c_save_expr): Remove declaration.
3414
31c2d57d
VR
34152017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
3416
3417 PR c/35441
3418 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
3419 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
3420 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
3421 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
3422 RDIV_EXPR.
3423 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
3424
684f84de
MP
34252017-05-09 Marek Polacek <polacek@redhat.com>
3426
3427 PR c/80525
3428 * c-warn.c (unwrap_c_maybe_const): New.
3429 (warn_logical_operator): Call it.
3430
641da50a
NS
34312017-05-09 Nathan Sidwell <nathan@acm.org>
3432
3433 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
3434 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
3435
631238ac
MS
34362017-05-08 Martin Sebor <msebor@redhat.com>
3437
3438 PR translation/80280
3439 * c-format.h (struct format_flag_spec): Add new member.
3440 (T89_T): New macro.
3441 * c-format.c (local_tree_type_node): New global.
3442 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
3443 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
3444 (strfmon_flag_specs): Likewise.
3445 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
3446 with distinct quoting properties.
3447 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
3448 (flag_chars_t::validate): Add argument and handle bad quoting.
3449 (check_format_info_main): Handle quoting problems.
3450 (init_dynamic_diag_info): Simplify.
3451
49f0c04c
JM
34522017-05-08 Jason Merrill <jason@redhat.com>
3453
3454 * c-opts.c (c_common_post_options): Update defaults for
3455 flag_abi_version and flag_abi_compat_version.
3456
56d35585
DM
34572017-05-05 David Malcolm <dmalcolm@redhat.com>
3458
3459 * c-common.c (c_cpp_error): Replace report_diagnostic
3460 with diagnostic_report_diagnostic.
3461
0f2c4a8f
MS
34622017-05-04 Martin Sebor <msebor@redhat.com>
3463
3464 PR translation/80280
3465 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
3466 (handle_weakref_attribute): Same.
3467
6fe63fb4
NS
34682017-05-03 Nathan Sidwell <nathan@acm.org>
3469
3470 Canonicalize canonical type hashing
3471 * c-common.c (complete_array_type): Use type_hash_canon.
3472
815d9cc6
XR
34732017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3474
92a285c1 3475 PR c++/80038
815d9cc6
XR
3476 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
3477 prototype.
3478 (cilk_install_body_pedigree_operations): Likewise.
3479 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
3480 detatched.
3481 (cilk_gimplify_call_params_in_spawned_fn): Remove.
3482 (cilk_install_body_pedigree_operations): Likewise.
3483 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
3484 unwrapping.
3485
f8a36447
JJ
34862017-04-27 Jakub Jelinek <jakub@redhat.com>
3487
3488 PR c++/80534
3489 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
3490 flag on non-aggregate element types.
3491
7c145456
BE
34922017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
3493
3494 * c-common.c (c_type_hasher, type_hash_table): Remove.
3495 (c_common_get_alias_set): Remove unreachable code.
3496 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
3497
c3cbcd45
VR
34982017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
3499
3500 * c.opt (Wextra-semi): New C++ warning flag.
3501
8a59d466
JJ
35022017-04-20 Jakub Jelinek <jakub@redhat.com>
3503
3504 PR middle-end/80423
3505 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
3506
8487c9a5
JJ
35072017-04-18 Jakub Jelinek <jakub@redhat.com>
3508
3509 PR middle-end/79788
3510 PR middle-end/80375
3511 * c-common.c (c_common_type_for_mode): Don't handle
3512 widest_*_literal_type_node here.
3513 c_common_signed_or_unsigned_type): Likewise.
3514 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
3515 to *intTI_type_node or *intDI_type_node depending on whether
3516 TImode is supported by the target or not.
3517
3ee0fb02
ML
35182017-04-10 Martin Liska <mliska@suse.cz>
3519
3520 PR sanitizer/80350
3521 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
3522 doing an UBSAN check.
3523
5764ee3c
JW
35242017-04-03 Jonathan Wakely <jwakely@redhat.com>
3525
3526 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
3527
6f3af356
JJ
35282017-03-31 Jakub Jelinek <jakub@redhat.com>
3529
3530 PR c++/79572
3531 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
3532 tree *.
3533 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
3534 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
3535 REFERENCE_TYPE.
3536
f6a7a9d5
DM
35372017-03-31 David Malcolm <dmalcolm@redhat.com>
3538
3539 PR documentation/78732
3540 * c.opt (Wendif-labels): Fix description to refer to
3541 #else rather than #elif.
3542
af88f557
JJ
35432017-03-31 Jakub Jelinek <jakub@redhat.com>
3544
3545 PR libstdc++/80251
3546 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
3547 * c-common.c (c_common_reswords): Add __is_aggregate trait.
3548
a9e4a1a5
JJ
35492017-03-27 Jakub Jelinek <jakub@redhat.com>
3550
3551 PR middle-end/80162
3552 * c-common.c (c_common_mark_addressable_vec): Don't set
3553 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
3554
3f01b620
MS
35552017-03-21 Martin Sebor <msebor@redhat.com>
3556
3557 PR c++/79548
3558 * c-common.c (set_underlying_type): Mark type used only when
3559 original del is declared unused.
3560
2f6f187a
DM
35612017-03-10 David Malcolm <dmalcolm@redhat.com>
3562
3563 PR translation/79848
3564 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
3565 "%qs".
3566
a02fa805
DM
35672017-03-10 David Malcolm <dmalcolm@redhat.com>
3568
3569 PR c/79921
3570 * c-indentation.c (warn_for_misleading_indentation): Remove parens
3571 from inform's message, so that xgettext can locate it.
3572
822a132c
MP
35732017-03-09 Marek Polacek <polacek@redhat.com>
3574
3575 PR c++/79962
3576 PR c++/79984
3577 * c-attribs.c (handle_nonnull_attribute): Save the result of default
3578 conversion to the attribute list.
3579
bba81f1c
ML
35802017-03-09 Martin Liska <mliska@suse.cz>
3581
3582 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
3583
108154ff
JM
35842017-03-03 Jason Merrill <jason@redhat.com>
3585
3586 * c.opt (Wnoexcept-type): New.
3587
eb0e7c34
RB
35882017-03-02 Richard Biener <rguenther@suse.de>
3589
3590 PR c/79756
3591 * c-common.c (c_common_mark_addressable_vec): Look through
3592 C_MAYBE_CONST_EXPR.
3593
9453ba0a
ML
35942017-02-28 Martin Liska <mliska@suse.cz>
3595
3596 * c.opt: Replace space with tabular for options of <number>
3597 type.
3598
6a825afe
ML
35992017-02-28 Martin Liska <mliska@suse.cz>
3600
3601 * c.opt: Fix --help=option -Q for options which are of
3602 an enum type.
3603
4227c9ad
JJ
36042017-02-24 Jakub Jelinek <jakub@redhat.com>
3605
3606 PR c++/79588
3607 * c-common.c (check_function_restrict): New function.
3608 (check_function_arguments): Add FNDECL argument. Call
3609 check_function_restrict if -Wrestrict.
3610 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
3611 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
3612 * c-common.h (check_function_arguments): Add FNDECL argument.
3613 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
3614
59909673
EB
36152017-02-24 Eric Botcazou <ebotcazou@adacore.com>
3616
3617 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
3618 treatment of parameters with pointer-to-tagged type and tidy up.
3619 (print_ada_methods): Remove the special treatment of C++ static member
3620 functions.
3621
54dcd526
ML
36222017-02-22 Martin Liska <mliska@suse.cz>
3623
3624 * c.opt: Replace inequality signs with square brackets
3625 for -Wnornalized.
3626
00bc9de3
JJ
36272017-02-21 Jakub Jelinek <jakub@redhat.com>
3628
3629 PR c++/79641
3630 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
3631 preserve quals.
3632
97fcf744
JM
36332017-02-17 Joseph Myers <joseph@codesourcery.com>
3634
3635 * c-cppbuiltin.c (builtin_define_float_constants): Define
3636 __DECIMAL_DIG__ to the value for long double.
3637
c7545f1c
MP
36382017-02-15 Marek Polacek <polacek@redhat.com>
3639
3640 PR c/79515
3641 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
3642 conversion has occured.
3643
c2e84327
DM
36442017-01-24 David Malcolm <dmalcolm@redhat.com>
3645
3646 * c-common.c (c_common_reswords): Add "__RTL".
3647 * c-common.h (enum rid): Add RID_RTL.
3648
2ebd93e1
MP
36492017-01-20 Marek Polacek <polacek@redhat.com>
3650
3651 PR c/64279
3652 * c-common.h (do_warn_duplicated_branches_r): Declare.
3653 * c-gimplify.c (c_genericize): Walk the function tree calling
3654 do_warn_duplicated_branches_r.
3655 * c-warn.c (expr_from_macro_expansion_r): New.
3656 (do_warn_duplicated_branches): New.
3657 (do_warn_duplicated_branches_r): New.
3658 * c.opt (Wduplicated-branches): New option.
3659
0d80ab91
DM
36602017-01-17 David Malcolm <dmalcolm@redhat.com>
3661
3662 PR c++/71497
3663 * c-indentation.c (warn_for_misleading_indentation): Use the past
3664 subjunctive in the note.
3665
7f991c36
AH
36662017-01-17 Aldy Hernandez <aldyh@redhat.com>
3667
3668 PR c/79116
3669 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
3670 start type to integer_type.
3671
1c70261c
JJ
36722017-01-16 Jakub Jelinek <jakub@redhat.com>
3673
3674 PR driver/49726
3675 * c.opt (gen-decls): Add Driver flag.
3676
1ddca3f3
PC
36772017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3678
3679 Revert:
3680 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3681
3682 PR c++/71737
3683 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
3684
7d2f3f1d
PC
36852017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3686
3687 PR c++/71737
3688 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
3689
bce6f760
MS
36902017-01-12 Martin Sebor <msebor@redhat.com>
3691
3692 (-Wformat-overflow): ...to this.
3693
bf5fbf46
MS
36942017-01-11 Martin Sebor <msebor@redhat.com>
3695
3696 PR c/78768
3697 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
3698 Also enable for LTO.
3699
e363df3f
JM
37002017-01-10 Jason Merrill <jason@redhat.com>
3701
3702 Implement P0195R2, C++17 variadic using.
3703 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
3704
bd2c6270
JJ
37052017-01-09 Jakub Jelinek <jakub@redhat.com>
3706
3707 PR translation/79019
3708 PR translation/79020
3709 * c.opt (Wnormalized=): Fix typo in description.
3710
efcc8d38
MS
37112017-01-08 Martin Sebor <msebor@redhat.com>
3712
3713 PR middle-end/77708
3714 * c.opt (-Wformat-truncation): New option.
3715
ab20d992 37162017-01-06 Alexandre Oliva <aoliva@redhat.com>
435f3f7a
AO
3717
3718 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
3719 value to unsigned short to fit in 4 hex digits without
3720 warnings.
3721
4e89adf9
EB
37222017-01-05 Eric Botcazou <ebotcazou@adacore.com>
3723
3724 * c.opt (fsso-struct): Add 'native' value.
3725
cd445b54
ML
37262017-01-05 Martin Liska <mliska@suse.cz>
3727
3728 PR pch/78970
3729 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
3730 header.
3731
a9342885
MP
37322017-01-04 Marek Polacek <polacek@redhat.com>
3733
3734 PR c++/64767
3735 * c.opt (Wpointer-compare): New option.
3736
fc73e60c
JJ
37372017-01-04 Jakub Jelinek <jakub@redhat.com>
3738
3739 PR driver/78957
3740 * c.opt (fsso-struct=): Add RejectNegative.
3741
cbe34bb5
JJ
37422017-01-01 Jakub Jelinek <jakub@redhat.com>
3743
3744 Update copyright years.
3745
d4a6c0ea
ML
37462016-12-29 Martin Liska <mliska@suse.cz>
3747
3748 PR c/78933
3749 * c.opt (strong-eval-order): Add RejectNegative keyword.
3750
67a5ad7c
JM
37512016-12-22 Jason Merrill <jason@redhat.com>
3752
3753 Implement P0522R0, matching of template template arguments.
3754 * c-cppbuiltin.c (c_cpp_builtins): Define
3755 __cpp_template_template_args.
3756
0dba7960
JJ
37572016-12-21 Jakub Jelinek <jakub@redhat.com>
3758
3759 PR bootstrap/78817
3760 * c-common.c (struct nonnull_arg_ctx): New type.
3761 (check_function_nonnull): Return bool instead of void. Use
3762 nonnull_arg_ctx as context rather than just location_t.
3763 (check_nonnull_arg): Adjust for the new context type, set
3764 warned_p to true if a warning has been diagnosed.
3765 (check_function_arguments): Return bool instead of void.
3766 * c-common.h (check_function_arguments): Adjust prototype.
3767
31bfc9b9
JM
37682016-12-21 Jason Merrill <jason@redhat.com>
3769
3770 * c.opt (-fnew-ttp-matching): New flag.
3771 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
3772
629b3d75
MJ
37732016-12-14 Martin Jambor <mjambor@suse.cz>
3774
3775 * c-omp.c: Include omp-general.h instead of omp-low.h.
3776 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
3777 name.
3778
474da67e
MS
37792016-12-14 Martin Sebor <msebor@redhat.com>
3780
3781 PR c/17308
3782 * c-common.c (check_nonnull_arg): Disable when optimization
3783 is enabled.
3784
fe366b87
MP
37852016-12-12 Marek Polacek <polacek@redhat.com>
3786
3787 PR c++/78647
3788 * c-common.c (attribute_fallthrough_p): Return false for
3789 error_mark_node.
3790
8bd9f164
MS
37912016-12-08 Martin Sebor <msebor@redhat.com>
3792
3793 PR c/78284
3794 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
3795
060162e0
MS
37962016-12-08 Martin Sebor <msebor@redhat.com>
3797
3798 PR c/78165
92a285c1
ML
3799 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
3800 suffix.
060162e0 3801
ee92e7ba
MS
38022016-12-07 Martin Sebor <msebor@redhat.com>
3803
3804 PR c/53562
3805 PR middle-end/77784
3806 PR middle-end/78149
3807 PR middle-end/78138
3808 * c.opt (-Wstringop-overflow): New option.
3809
84b0769e
MO
38102016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
3811
3812 * c-attribs.c (asan odr indicator): New attribute.
3813 (handle_asan_odr_indicator_attribute): New function.
3814
7fa6a965
PK
38152016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3816
3817 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
3818 ptrdiff_type_node;
3819
56d8ffc1
JG
38202016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
3821
3822 * c-common.c (excess_precision_mode_join): New.
3823 (c_ts18661_flt_eval_method): New.
3824 (c_c11_flt_eval_method): Likewise.
3825 (c_flt_eval_method): Likewise.
3826 * c-common.h (excess_precision_mode_join): New.
3827 (c_flt_eval_method): Likewise.
3828 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
3829 (cpp_iec_559_value): Call it.
3830 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
3831 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
3832 __FLT_EVAL_METHOD_TS_18661_3__.
3833
04f0fcf7
JG
38342016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
3835
3836 * c-opts.c (c_common_post_options): Add logic to handle the default
3837 case for -fpermitted-flt-eval-methods.
3838
fb2675cb
PB
38392016-11-23 Paolo Bonzini <bonzini@gnu.org>
3840
3841 * c.opt (Wexpansion-to-defined): New.
3842
ec1c5694
JJ
38432016-11-23 Jakub Jelinek <jakub@redhat.com>
3844
3845 PR target/78451
3846 * c-pragma.c (handle_pragma_target): Don't replace
3847 current_target_pragma, but chainon the new args to the current one.
3848
730c9e75
NS
38492016-11-22 Nathan Sidwell <nathan@acm.org>
3850
3851 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 3852 indentation and formatting.
730c9e75 3853
89990732
MS
38542016-11-21 Martin Sebor <msebor@redhat.com>
3855
3856 * c.opt (-fprintf-return-value): Enable by default.
3857
48330c93
BE
38582016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3859
3860 PR c++/71973
3861 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
3862 * c-common.c (c_common_nodes_and_builtins): Initialize
3863 const_tm_ptr_type_node.
3864
0d939c95
MP
38652016-11-16 Marek Polacek <polacek@redhat.com>
3866
3867 PR c/78285
3868 * c-common.c (c_add_case_label): Turn error_at calls into inform.
3869
8e745a17
JJ
38702016-11-14 Jakub Jelinek <jakub@redhat.com>
3871
3872 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
3873
1ee62b92 38742016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
3875 Richard Biener <rguenther@suse.de>
3876
3877 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
3878 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
3879 * c.opt (fgimple): New option.
1ee62b92 3880
22b15758
UB
38812016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3882
3883 PR c/35503
3884 * c-common.h (warn_for_restrict): Declare.
3885 * c-warn.c: Include gcc-rich-location.h.
3886 (warn_for_restrict): New function.
3887 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
3888 (gcc_cdiag_char_table): Likewise.
3889 (gcc_cxxdiag_char_table): Likewise.
3890 * c.opt (Wrestrict): New option.
3891
4be719cd
EB
38922016-11-13 Eric Botcazou <ebotcazou@adacore.com>
3893
3894 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
3895 for nested types only if the type is a record or union and dump SLOC.
3896
4a826ca6
JM
38972016-11-09 Jason Merrill <jason@redhat.com>
3898
3899 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
3900
2e955d50
JJ
39012016-11-09 Jakub Jelinek <jakub@redhat.com>
3902
3903 * c-ubsan.c (ubsan_instrument_shift): Handle split
3904 -fsanitize=shift-base and -fsanitize=shift-exponent.
3905
51dc6603
JM
39062016-11-07 Jason Merrill <jason@redhat.com>
3907
3908 * c.opt (Wc++1z-compat): New.
3909 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
3910
6dc4a604
ML
39112016-11-07 Martin Liska <mliska@suse.cz>
3912
3913 * c-warn.c (warn_for_unused_label): Save all labels used
3914 in goto or in &label.
3915
b302001e
JM
39162016-11-03 Jason Merrill <jason@redhat.com>
3917
3918 * c-cppbuiltin.c (c_cpp_builtins): Correct
3919 __cpp_inheriting_constructors.
3920
31f7f784
JM
39212016-11-01 Jason Merrill <jason@redhat.com>
3922
2bc78e3c
JM
3923 * c-cppbuiltin.c (c_cpp_builtins): Update
3924 __cpp_inheriting_constructors.
3925
31f7f784
JM
3926 * c.opt (-fnew-inheriting-ctors): New.
3927 * c-opts.c: Default to on for ABI 11+.
3928
dcb466ec
JJ
39292016-10-31 Jakub Jelinek <jakub@redhat.com>
3930
3931 PR c++/77948
3932 * c.opt (fext-numeric-literals): Add Var and Init.
3933 * c-opts.c (c_common_handle_option): Don't clear
3934 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
3935 (c_common_post_options): Clear it here if not set
3936 explicitly.
3937
52e1b91e
AH
39382016-10-28 Aldy Hernandez <aldyh@redhat.com>
3939
3940 PR debug/77773
3941 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
3942 if NULL.
3943
e16f1cc7
JJ
39442016-10-25 Jakub Jelinek <jakub@redhat.com>
3945
3946 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
3947 * c-common.c (c_common_reswords): Add __builtin_launder.
3948
f8348061
BE
39492016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
3950
3951 * c-common.c (c_common_truthvalue_conversion): Warn for
3952 multiplications in boolean context. Fix the quoting of '<<' and '<'
3953 in the shift warning.
3954
eff89e01
BE
39552016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
3956
3957 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
3958
24bc7bf4
JM
39592016-10-20 Jason Merrill <jason@redhat.com>
3960
3961 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
3962
4c712374
BE
39632016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3964
3965 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
3966 integer shift ops in boolean context.
3967
39682016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
3969
3970 * c.opt (Walloca): New.
3971 (Walloca-larger-than=): New.
3972 (Wvla-larger-than=): New.
3973
8fa18c06
MP
39742016-10-17 Marek Polacek <polacek@redhat.com>
3975
3976 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
3977 Return immediately when finding a match.
3978 (warn_tautological_cmp): Remove a boolean variable that is no longer
3979 needed.
3980
b12b1915
MP
39812016-10-17 Marek Polacek <polacek@redhat.com>
3982
3983 * c-attribs.c: New file.
3984 * c-common.c: Move attributes handling to c-attribs.c.
3985 (get_nonnull_operand): No longer static.
3986 * c-common.h: Move the declarations from c-attribs.c to its own section.
3987
2045acd9
JM
39882016-10-14 Jason Merrill <jason@redhat.com>
3989
3990 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
3991 and __cpp_deduction_guides.
3992
14a2c9aa
JM
39932016-10-13 Jason Merrill <jason@redhat.com>
3994
3995 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
3996
4d0cdd0c
TP
39972016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3998
3999 * c-cppbuiltin.c: Include memmodel.h.
4000 * c-opts.c: Likewise.
4001 * c-pragma.c: Likewise.
4002 * c-warn.c: Likewise.
4003
70f6d5e1
JJ
40042016-10-12 Jakub Jelinek <jakub@redhat.com>
4005
4006 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
4007 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
4008 * c-opts.c (sanitize_cpp_opts): Initialize
4009 cpp_opts->cpp_warn_implicit_fallthrough.
4010
78f61294
MP
40112016-10-11 Marek Polacek <polacek@redhat.com>
4012
4013 * c-common.c (warning_candidate_p): Change the return type to bool
4014 and return true/false instead of 1/0.
4015 (vector_mode_valid_p): Likewise.
4016
038b5cc0
MP
40172016-10-11 Marek Polacek <polacek@redhat.com>
4018
4019 * c-common.c (fold_for_warn): No longer static.
4020 (bool_promoted_to_int_p): Likewise.
4021 (c_common_get_narrower): Likewise.
4022 (constant_expression_warning): Move to c-warn.c.
4023 (constant_expression_error): Likewise.
4024 (overflow_warning): Likewise.
4025 (warn_logical_operator): Likewise.
4026 (find_array_ref_with_const_idx_r): Likewise.
4027 (warn_tautological_cmp): Likewise.
4028 (expr_has_boolean_operands_p): Likewise.
4029 (warn_logical_not_parentheses): Likewise.
4030 (warn_if_unused_value): Likewise.
4031 (strict_aliasing_warning): Likewise.
4032 (sizeof_pointer_memaccess_warning): Likewise.
4033 (check_main_parameter_types): Likewise.
4034 (conversion_warning): Likewise.
4035 (warnings_for_convert_and_check): Likewise.
4036 (match_case_to_enum_1): Likewise.
4037 (match_case_to_enum): Likewise.
4038 (c_do_switch_warnings): Likewise.
4039 (warn_for_omitted_condop): Likewise.
4040 (readonly_error): Likewise.
4041 (lvalue_error): Likewise.
4042 (invalid_indirection_error): Likewise.
4043 (warn_array_subscript_with_type_char): Likewise.
4044 (warn_about_parentheses): Likewise.
4045 (warn_for_unused_label): Likewise.
4046 (warn_for_div_by_zero): Likewise.
4047 (warn_for_memset): Likewise.
4048 (warn_for_sign_compare): Likewise.
4049 (do_warn_double_promotion): Likewise.
4050 (do_warn_unused_parameter): Likewise.
4051 (record_locally_defined_typedef): Likewise.
4052 (maybe_record_typedef_use): Likewise.
4053 (maybe_warn_unused_local_typedefs): Likewise.
4054 (maybe_warn_bool_compare): Likewise.
4055 (maybe_warn_shift_overflow): Likewise.
4056 (warn_duplicated_cond_add_or_warn): Likewise.
4057 (diagnose_mismatched_attributes): Likewise.
4058 * c-common.h: Move the declarations from c-warn.c to its own section.
4059 * c-warn.c: New file.
4060
627be19f
JM
40612016-10-08 Jason Merrill <jason@redhat.com>
4062
4063 * c-common.c (c_common_truthvalue_conversion): Don't distribute
4064 into COND_EXPR in C++.
4065
7bad794a
JJ
40662016-10-08 Jakub Jelinek <jakub@redhat.com>
4067
4068 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
4069 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
4070 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
4071
be845b04
JJ
40722016-10-07 Jakub Jelinek <jakub@redhat.com>
4073
4074 Implement LWG2296 helper intrinsic
4075 * c-common.h (enum rid): Add RID_ADDRESSOF.
4076 * c-common.c (c_common_reswords): Add __builtin_addressof.
4077
c09c4992
BE
40782016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
4079
4080 PR c++/77700
4081 * c-common.c (c_common_truthvalue_conversion): Warn also for
4082 suspicious enum values in boolean context.
4083
342cfb3e
JJ
40842016-10-06 Jakub Jelinek <jakub@redhat.com>
4085
4086 Implement P0258R2 - helper for C++17
4087 std::has_unique_object_representations trait
4088 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
4089 * c-common.c (c_common_reswords): Add
4090 __has_unique_object_representations.
4091
2e69f143
JJ
40922016-10-05 Jakub Jelinek <jakub@redhat.com>
4093
4094 PR sanitizer/66343
4095 * c-ubsan.c (ubsan_instrument_return): Don't call
4096 initialize_sanitizer_builtins here.
4097
700fff34
BE
40982016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
4099
4100 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
4101 conditional expression in boolean context when only one arm is
4102 non-boolean.
4103
9563bfcd
JJ
41042016-10-05 Jakub Jelinek <jakub@redhat.com>
4105
04a32443
JJ
4106 PR sanitizer/77823
4107 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
4108 is not integral.
4109
9563bfcd
JJ
4110 * c-common.c (c_common_reswords): Update comment for C++11.
4111
f1644724
JM
41122016-10-04 Jason Merrill <jason@redhat.com>
4113
4114 * c-common.c (make_tree_vector_from_ctor): New.
4115 * c-common.h: Declare it.
4116
5a79befb
JJ
41172016-10-04 Jakub Jelinek <jakub@redhat.com>
4118
4119 * c-cppbuiltin.c (c_cpp_builtins): Don't define
4120 __LIBGCC_JCR_SECTION_NAME__.
4121
1633d3b9
BE
41222016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
4123
4124 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
4125 left shift in boolean context.
4126
a2c6e7f2
JJ
41272016-09-29 Jakub Jelinek <jakub@redhat.com>
4128
4129 Implement P0001R1 - C++17 removal of register storage class specifier
4130 * c.opt (Wregister): New warning.
4131 * c-opts.c (c_common_post_options): Enable -Wregister by
4132 default for C++17.
4133
75304c87
JG
41342016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
4135
4136 * c-opts.c (c_common_post_options): Remove special case for
4137 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
4138 in C++.
4139
bbfac6da
JJ
41402016-09-27 Jakub Jelinek <jakub@redhat.com>
4141
6e39060a
JJ
4142 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
4143 -std=c++1z.
4144
bbfac6da
JJ
4145 * c-ada-spec.c (print_ada_declaration): Remove break after return.
4146
e73cf9a2
TP
41472016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
4148
4149 * c-common.c: Include memmodel.h.
4150
c6147dc4
MP
41512016-09-26 Marek Polacek <polacek@redhat.com>
4152
4153 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
4154
81fea426
MP
41552016-09-26 Marek Polacek <polacek@redhat.com>
4156
4157 PR c/7652
4158 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
4159 (handle_fallthrough_attribute): New function.
4160 (attribute_fallthrough_p): New function.
4161 * c-common.h (attribute_fallthrough_p): Declare.
4162
9a2300e9
MP
41632016-09-24 Marek Polacek <polacek@redhat.com>
4164
4165 PR c/77490
4166 * c.opt (Wbool-operation): New.
4167
a09e9e35
BE
41682016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4169
4170 * c-common.c (c_common_truthvalue_conversion): Inhibit
4171 Wint-in-bool-context warning with from_macro_definition_at.
4172 Mention the expression will always evaluate to true.
4173
d43b4ccc
MS
41742016-09-21 Martin Sebor <msebor@redhat.com>
4175
4176 PR bootstrap/77676
4177 * c.opt (fprintf-return-value): Temporarily initialize to zero
4178 to unblock bootstrap failures.
4179
2e1c20b1
JJ
41802016-09-21 Jakub Jelinek <jakub@redhat.com>
4181
4182 PR c++/77651
4183 * c.opt (Waligned-new=): Add RejectNegative.
4184 (faligned-new=): Likewise. Spelling fix - change
4185 aligned_new_threshhold to aligned_new_threshold.
4186 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
4187 to aligned_new_threshold.
4188
88d0c3f0
MS
41892016-09-20 Martin Sebor <msebor@redhat.com>
4190
4191 PR middle-end/49905
4192 * c.opt: Add -Wformat-length and -fprintf-return-value.
4193
144a96e4
BE
41942016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4195
4196 PR c++/77434
4197 * c.opt (Wint-in-bool-context): New warning.
4198 * c-common.c (c_common_truthvalue_conversion): Warn on integer
4199 constants in boolean context.
4200
63012d9a
JM
42012016-09-19 Joseph Myers <joseph@codesourcery.com>
4202
4203 * c-common.c (max_align_t_align): Also consider alignment of
4204 float128_type_node.
4205
931388ce
JM
42062016-09-15 Jason Merrill <jason@redhat.com>
4207
4208 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
4209 DECL_EXTERNAL.
4210
38711381
JM
42112016-09-14 Jason Merrill <jason@redhat.com>
4212
4213 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
4214 limit FIELD_DECL, either.
4215
e51fbec3
MP
42162016-09-14 Marek Polacek <polacek@redhat.com>
4217
4218 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
4219 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
4220 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
4221
254830ba
DM
42222016-09-13 David Malcolm <dmalcolm@redhat.com>
4223
4224 * c-common.c (warn_logical_not_parentheses): Replace
4225 rich_location::add_fixit_insert calls with add_fixit_insert_before
4226 and add_fixit_insert_after, eliminating the "next_loc" calculation.
4227
42763690
JM
42282016-09-13 Jason Merrill <jason@redhat.com>
4229 Tom de Vries <tom@codesourcery.com>
4230
4231 PR c++/77427
4232 * c-common.c (set_underlying_type): Don't treat array as builtin type.
4233
9453eee9
JM
42342016-09-13 Jason Merrill <jason@redhat.com>
4235
4236 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
4237 limit types at all.
4238
e96809e3
JM
42392016-09-12 Jason Merrill <jason@redhat.com>
4240
4241 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
4242 bit/byte confusion, allow large alignment for types.
4243
54dcdb88
BE
42442016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
4245
4246 PR c++/77496
4247 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
4248
d1463eb9
DM
42492016-09-12 David Malcolm <dmalcolm@redhat.com>
4250
4251 PR c/72858
4252 * c-format.c (argument_parser::check_argument_type): Add params
4253 "type_start" and "conversion_char". Use the former to generate
4254 offset_to_type_start and pass it and conversion_char to
4255 check_format_types.
4256 (check_format_info_main): Capture the start of the type
4257 information as "type_start", and pass it an format_char
4258 to arg_parser.check_argument_type.
4259 (check_format_types): Provide an example in the leading comment.
4260 Add params "offset_to_type_start" and "conversion_char"; pass
4261 them to format_type_warning calls.
4262 (test_get_modifier_for_format_len): Likewise.
4263 (matching_type_p): New function.
4264 (get_format_for_type): Add param "conversion_char" and move
4265 implementation into...
4266 (get_format_for_type_1): ...new function, called twice.
4267 Use new function matching_type_p rather than checking for
4268 TYPE_CANONICAL equality.
4269 (get_corrected_substring): New function.
4270 (format_type_warning): Provide an example in the leading comment.
4271 Add params "offset_to_type_start" and "conversion_char". Replace
4272 call to get_format_for_type with call to get_corrected_substring
4273 and move rejection of hints for widths/precisions there.
4274 (assert_format_for_type_streq): Add param "conversion_char".
4275 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
4276 (test_get_format_for_type_printf): Add conversion chars to the
4277 tests, adding coverage for various combinations of integer
4278 vs double conversions, and for preserving octal and hexadecimal
4279 conversions.
4280 (test_get_format_for_type_scanf): Add conversion chars to the
4281 tests.
4282
5b28efbb
TV
42832016-09-10 Tom de Vries <tom@codesourcery.com>
4284
4285 PR C/71602
4286 * c-common.c (build_va_arg): Handle more strict
4287 targetm.canonical_va_list_type. Replace first argument type error with
4288 assert.
4289
3f0177e7
MS
42902016-09-09 Martin Sebor <msebor@redhat.com>
4291
4292 PR c/77520
4293 PR c/77521
4294 * c-format.c (argument_parser::find_format_char_info): Use %qc
4295 format directive unconditionally.
4296
af63ba4b
JM
42972016-09-09 Jason Merrill <jason@redhat.com>
4298
4299 Implement C++17 new of over-aligned types.
4300 * c.opt: Add -faligned-new and -Waligned-new.
4301 * c-common.c (max_align_t_align): Split out from...
4302 (cxx_fundamental_alignment_p): ...here.
4303 * c-common.h: Declare it.
4304 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
4305
c65248cb
JM
43062016-09-09 Joseph Myers <joseph@codesourcery.com>
4307
4308 * c-cppbuiltin.c (builtin_define_type_width): New function.
4309 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
4310 macros.
4311
e5106e27
DM
43122016-09-07 David Malcolm <dmalcolm@redhat.com>
4313
4314 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
4315 a POINTER_TYPE.
4316 (substring_loc::get_location): Move to substring-locations.c,
4317 keeping implementation as...
4318 (c_get_substring_location): New function, from the above, reworked
4319 to use accessors rather than member lookup.
4320 * c-common.h (class substring_loc): Move to substring-locations.h,
4321 replacing with a forward decl.
4322 (c_get_substring_location): New decl.
4323 * c-format.c: Include "substring-locations.h".
4324 (format_warning_va): Move to substring-locations.c.
4325 (format_warning_at_substring): Likewise.
4326
ab20d992 43272016-09-06 Martin Sebor <msebor@redhat.com>
a42e7952
MS
4328
4329 PR c/77336
4330 * c-format.c (check_function_format): Avoid issuing warnings for
4331 functions unless they call format functions with non-constant
4332 format strings.
4333
b772a565
RB
43342016-09-06 Richard Biener <rguenther@suse.de>
4335
4336 PR c/77450
4337 * c-common.c (c_common_mark_addressable_vec): Handle
4338 COMPOUND_LITERAL_EXPR.
4339
25ff5dd3
MP
43402016-09-05 Marek Polacek <polacek@redhat.com>
4341
4342 PR c/77423
4343 * c-common.c (bool_promoted_to_int_p): New function.
4344 (expr_has_boolean_operands_p): New function.
4345 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
4346 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
4347
21234eb5
TV
43482016-09-04 Tom de Vries <tom@codesourcery.com>
4349
4350 revert:
4351 2016-08-29 Tom de Vries <tom@codesourcery.com>
4352
4353 * c-common.c (build_va_arg): Replace first argument type error
4354 with assert.
4355
9dc5773f
JJ
43562016-09-02 Jakub Jelinek <jakub@redhat.com>
4357
4358 PR c/65467
4359 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
4360 (c_finish_omp_for): Reject _Atomic qualified iterators.
4361
43622016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
4363
4364 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
4365 size to guarantee it fits the output of the formatted function
4366 regardless of its arguments.
4367
295844f6
MP
43682016-09-01 Marek Polacek <polacek@redhat.com>
4369
4370 PR c/7652
4371 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
4372 FALLTHRU comments.
4373
3d06b6f2
MP
43742016-08-29 Marek Polacek <polacek@redhat.com>
4375
4376 PR c/77292
4377 * c-common.c (warn_logical_not_parentheses): Don't warn for
4378 a comparison or a logical operator.
4379
34cedad5
TV
43802016-08-29 Tom de Vries <tom@codesourcery.com>
4381
4382 * c-common.c (build_va_arg): Fix type comparison assert.
4383
f162d717
TV
43842016-08-29 Tom de Vries <tom@codesourcery.com>
4385
4386 * c-common.c (build_va_arg): Replace first argument type error
4387 with assert.
4388
ba9bbd6f
TV
43892016-08-29 Tom de Vries <tom@codesourcery.com>
4390
4391 PR c/77398
4392 * c-common.c (build_va_arg): Add first argument error. Build va_arg
4393 with error_mark_node as va_list instead of with illegal va_list.
4394
ebef225f
MP
43952016-08-25 Marek Polacek <polacek@redhat.com>
4396 David Malcolm <dmalcolm@redhat.com>
4397
4398 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
4399 * c-common.h (warn_logical_not_parentheses): Update declaration.
4400
b00e6e75
MP
44012016-08-22 Marek Polacek <polacek@redhat.com>
4402
4403 PR c++/77321
4404 * c-common.c (warn_for_memset): Check type for null.
4405
6dc198e3
JM
44062016-08-22 Joseph Myers <joseph@codesourcery.com>
4407
14ec014e 4408 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
4409 _FloatNx types for suffixes for built-in functions.
4410
c65699ef
JM
44112016-08-19 Joseph Myers <joseph@codesourcery.com>
4412
4413 PR c/32187
4414 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
4415 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
4416 (RID_FLOAT128X): New enum rid values.
4417 (CASE_RID_FLOATN_NX): New macro.
4418 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
4419 keywords.
4420 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
4421 corresponding complex types.
4422 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
4423 _FloatNx and corresponding complex types.
4424 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
4425 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
4426 and _FloatNx types for the widest type for determining
4427 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
4428 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
4429 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
4430 and _FloatNx types.
4431 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
4432 constants.
4433 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
4434 _FloatNx types.
4435
cc015f3a
DM
44362016-08-18 David Malcolm <dmalcolm@redhat.com>
4437
4438 * c-opts.c (c_diagnostic_finalizer): Update for change to
4439 diagnostic_show_locus.
4440
cb18fd07
DM
44412016-08-18 David Malcolm <dmalcolm@redhat.com>
4442
4443 * c-common.c: Include "spellcheck.h".
4444 (cb_get_suggestion): New function.
4445 * c-common.h (cb_get_suggestion): New decl.
4446 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
4447 cb_get_suggestion.
4448
a76989dc
MP
44492016-08-18 Marek Polacek <polacek@redhat.com>
4450
4451 PR c/71514
4452 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
4453 and pointer-to-VLA.
4454
65e736c0
DM
44552016-08-16 David Malcolm <dmalcolm@redhat.com>
4456
4457 PR c/72857
4458 * c-common.c (substring_loc::get_range): Rename to...
4459 (substring_loc::get_location): ...this, converting param from a
4460 source_range * to a location_t *. Call
4461 get_source_location_for_substring rather than
4462 get_source_range_for_substring, and pass in m_caret_idx.
4463 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
4464 (substring_loc::get_range): Replace with...
4465 (substring_loc::get_location): ...this.
4466 (substring_loc::set_caret_index): New method.
4467 (substring_loc): Add field m_caret_idx.
4468 * c-format.c (format_warning_va): Update for above changes.
4469 Rename local "substring_loc" to "fmt_substring_loc" to avoid
4470 clashing with type name.
4471 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
4472 (check_argument_type): Likewise.
4473 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
4474 Use a copy when emitting warnings, setting the caret index from TYPE.
4475
7e1dde14 44762016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 4477 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
4478
4479 * c-ada-spec.c (dump_number): New function.
4480 (handle_escape_character): Likewise.
4481 (print_ada_macros): Add handling of constant integers and strings.
4482
191816a3
MP
44832016-08-12 Marek Polacek <polacek@redhat.com>
4484
4485 PR c/7652
4486 * c-common.c (scalar_to_vector): Adjust fall through comment.
4487 * c-opts.c (c_common_handle_option): Likewise.
4488 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
4489 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
4490 fall through comment.
4491 * cilk.c (extract_free_variables): Add FALLTHRU.
4492
452df4a4
JM
44932016-08-10 Jason Merrill <jason@redhat.com>
4494
4495 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
4496
f3365c12
JM
44972016-08-09 Jason Merrill <jason@redhat.com>
4498
4499 * c-common.c (c_common_attribute_table): vector_size affects type
4500 identity.
4501
f0bc3323
MP
45022016-08-09 Marek Polacek <polacek@redhat.com>
4503
4504 PR c/7652
4505 * c-ada-spec.c (dump_generic_ada_node): Add return.
4506
98e5a19a
JM
45072016-08-09 Jason Merrill <jason@redhat.com>
4508
4509 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
4510 C++17 constexpr lambdas.
4511
895aa8e1
DM
45122016-08-08 David Malcolm <dmalcolm@redhat.com>
4513
4514 PR c/64955
4515 * c-common.h (selftest::c_format_c_tests): New declaration.
4516 (selftest::run_c_tests): New declaration.
4517 * c-format.c: Include "selftest.h.
4518 (format_warning_va): Add param "corrected_substring" and use
4519 it to add a replacement fix-it hint.
4520 (format_warning_at_substring): Likewise.
4521 (format_warning_at_char): Update for new param of
4522 format_warning_va.
4523 (argument_parser::check_argument_type): Pass "fki" to
4524 check_format_types.
4525 (check_format_types): Add param "fki" and pass it to
4526 format_type_warning.
4527 (deref_n_times): New function.
4528 (get_modifier_for_format_len): New function.
4529 (selftest::test_get_modifier_for_format_len): New function.
4530 (get_format_for_type): New function.
4531 (format_type_warning): Add param "fki" and use it to attempt
4532 to provide hints for argument types when calling
4533 format_warning_at_substring.
4534 (selftest::get_info): New function.
4535 (selftest::assert_format_for_type_streq): New function.
4536 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
4537 (selftest::test_get_format_for_type_printf): New function.
4538 (selftest::test_get_format_for_type_scanf): New function.
4539 (selftest::c_format_c_tests): New function.
4540
e52ed3fe
DM
45412016-08-08 David Malcolm <dmalcolm@redhat.com>
4542
4543 PR c/52952
4544 * c-format.c: Include "diagnostic.h".
4545 (location_column_from_byte_offset): Delete.
4546 (location_from_offset): Delete.
4547 (format_warning_va): New function.
4548 (format_warning_at_substring): New function.
4549 (format_warning_at_char): New function.
4550 (check_format_arg): Capture location of format_tree and pass to
4551 check_format_info_main.
4552 (argument_parser): Add fields "start_of_this_format" and
4553 "format_string_cst".
4554 (flag_chars_t::validate): Add param "format_string_cst". Convert
4555 warning_at call using location_from_offset to call to
4556 format_warning_at_char.
4557 (argument_parser::argument_parser): Add param "format_string_cst_"
4558 and use use it to initialize field "format_string_cst".
4559 Initialize new field "start_of_this_format".
4560 (argument_parser::read_format_flags): Convert warning_at call
4561 using location_from_offset to a call to format_warning_at_char.
4562 (argument_parser::read_any_format_left_precision): Likewise.
4563 (argument_parser::read_any_format_precision): Likewise.
4564 (argument_parser::read_any_other_modifier): Likewise.
4565 (argument_parser::find_format_char_info): Likewise, in three places.
4566 (argument_parser::parse_any_scan_set): Likewise, in one place.
4567 (argument_parser::handle_conversions): Likewise, in two places.
4568 (argument_parser::check_argument_type): Add param "fmt_param_loc"
4569 and use it to make a substring_loc. Pass the latter to
4570 check_format_types.
4571 (check_format_info_main): Add params "fmt_param_loc" and
4572 "format_string_cst". Convert warning_at calls using
4573 location_from_offset to calls to format_warning_at_char. Pass the
4574 new params to the arg_parser ctor. Pass "format_string_cst" to
4575 flag_chars.validate. Pass "fmt_param_loc" to
4576 arg_parser.check_argument_type.
4577 (check_format_types): Convert first param from a location_t
4578 to a const substring_loc & and rename to "fmt_loc". Attempt
4579 to extract the range of the relevant parameter and pass it
4580 to format_type_warning.
4581 (format_type_warning): Convert first param from a location_t
4582 to a const substring_loc & and rename to "fmt_loc". Add
4583 params "param_range" and "type". Replace calls to warning_at
4584 with calls to format_warning_at_substring.
4585
1c4d457e
DM
45862016-08-08 David Malcolm <dmalcolm@redhat.com>
4587
4588 * c-format.c (class flag_chars_t): New class.
4589 (struct length_modifier): New struct.
4590 (class argument_parser): New class.
4591 (flag_chars_t::flag_chars_t): New ctor.
4592 (flag_chars_t::has_char_p): New method.
4593 (flag_chars_t::add_char): New method.
4594 (flag_chars_t::validate): New method.
4595 (flag_chars_t::get_alloc_flag): New method.
4596 (flag_chars_t::assignment_suppression_p): New method.
4597 (argument_parser::argument_parser): New ctor.
4598 (argument_parser::read_any_dollar): New method.
4599 (argument_parser::read_format_flags): New method.
4600 (argument_parser::read_any_format_width): New method.
4601 (argument_parser::read_any_format_left_precision): New method.
4602 (argument_parser::read_any_format_precision): New method.
4603 (argument_parser::handle_alloc_chars): New method.
4604 (argument_parser::read_any_length_modifier): New method.
4605 (argument_parser::read_any_other_modifier): New method.
4606 (argument_parser::find_format_char_info): New method.
4607 (argument_parser::validate_flag_pairs): New method.
4608 (argument_parser::give_y2k_warnings): New method.
4609 (argument_parser::parse_any_scan_set): New method.
4610 (argument_parser::handle_conversions): New method.
4611 (argument_parser::check_argument_type): New method.
4612 (check_format_info_main): Introduce classes argument_parser
4613 and flag_chars_t, moving the code within the loop into methods
4614 of these classes. Make various locals "const".
4615
88fa5555
DM
46162016-08-05 David Malcolm <dmalcolm@redhat.com>
4617
4618 * c-common.c: Include "substring-locations.h".
4619 (get_cpp_ttype_from_string_type): New function.
4620 (g_string_concat_db): New global.
4621 (substring_loc::get_range): New method.
4622 * c-common.h (g_string_concat_db): New declaration.
4623 (class substring_loc): New class.
4624 * c-lex.c (lex_string): When concatenating strings, capture the
4625 locations of all tokens using a new obstack, and record the
4626 concatenation locations within g_string_concat_db.
4627 * c-opts.c (c_common_init_options): Construct g_string_concat_db
4628 on the ggc-heap.
4629
78169471
MP
46302016-07-29 Marek Polacek <polacek@redhat.com>
4631
638fc14f
MP
4632 PR c/71926
4633 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
4634 parentheses warning.
4635
78169471
MP
4636 PR c/71574
4637 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
4638
1225d6b1
ML
46392016-07-28 Martin Liska <mliska@suse.cz>
4640
4641 PR gcov-profile/68025
4642 * c-common.c (handle_no_profile_instrument_function_attribute):
4643
ec1e2a40
BE
46442016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
4645
4646 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
4647 BITS_PER_UNIT_LOG.
4648
5ec2cd9f
JM
46492016-07-25 Jason Merrill <jason@redhat.com>
4650
4651 PR c++/65970
4652 * c.opt (fconstexpr-loop-limit): New.
4653
9dc5773f 46542016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
4655
4656 PR c++/71675
4657 * c-common.c (resolve_overloaded_builtin): Avoid converting
4658 __atomic_compare_exchange_n return type to that of what its
4659 first argument points to.
4660
e3fe09c1
UB
46612016-07-22 Uros Bizjak <ubizjak@gmail.com>
4662
4663 * c-common.c: Use HOST_WIDE_INT_M1U instead of
4664 ~(unsigned HOST_WIDE_INT) 0.
4665
bc91c436
ML
46662016-07-22 Martin Liska <mliska@suse.cz>
4667
4668 PR gcov-profile/69028
4669 PR gcov-profile/62047
4670 * cilk.c (create_cilk_helper_decl): Set location of a new decl
4671 to the current_function_decl.
4672
451dcc66
JM
46732016-07-21 Jason Merrill <jason@redhat.com>
4674
4675 PR c++/65168
4676 * c-common.c (c_common_truthvalue_conversion): Check
4677 c_inhibit_evaluation_warnings for warning about address of
4678 reference.
4679
de6a69ee
DM
46802016-07-20 David Malcolm <dmalcolm@redhat.com>
4681
4682 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
4683 const char *.
4684
d022c55a
JM
46852016-07-15 Jason Merrill <jason@redhat.com>
4686
4687 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
4688
ddbbcb19
JJ
46892016-07-15 Jakub Jelinek <jakub@redhat.com>
4690
4691 PR c/71858
4692 * c-common.h (enum lookup_name_fuzzy_kind): Add
4693 FUZZY_LOOKUP_FUNCTION_NAME.
4694
d0cf395a
JM
46952016-07-08 Jason Merrill <jason@redhat.com>
4696
4697 P0145: Refining Expression Order for C++.
4698 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
4699 * c-opts.c: Adjust.
4700
98d44e93
MT
47012016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
4702
4703 PR c++/71214
4704 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
4705
f9d8d994
TS
47062016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4707
4708 * c-pragma.h (enum pragma_kind): Rename
4709 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
4710 users.
4711
4aa83879
RB
47122016-06-29 Richard Biener <rguenther@suse.de>
4713
4714 PR middle-end/71002
4715 * c-common.c (c_common_get_alias_set): Remove union type punning case.
4716
a25bd9e6
JM
47172016-06-24 Jason Merrill <jason@redhat.com>
4718
4719 P0145R2: Refining Expression Order for C++.
4720 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
4721 MODIFY_EXPR.
4722
a86451b9
JJ
47232016-06-24 Jakub Jelinek <jakub@redhat.com>
4724
4725 * c-common.c (check_builtin_function_arguments): Require last
4726 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
4727 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
4728 if the last argument is pointer to enumerated or boolean type.
4729
1a4f11c8
DM
47302016-06-22 David Malcolm <dmalcolm@redhat.com>
4731
4732 PR c/70339
4733 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
4734 (lookup_name_fuzzy): New prototype.
4735
fe55692c
JDA
47362016-06-21 John David Anglin <danglin@gcc.gnu.org>
4737
4738 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
4739
4eb24e01
JM
47402016-06-14 Jason Merrill <jason@redhat.com>
4741
4742 P0145R2: Refining Expression Order for C++.
4743 * c.opt (fargs-in-order): New.
4744 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
4745
ef7cf206
JJ
47462016-06-13 Jakub Jelinek <jakub@redhat.com>
4747
0dda258b
JJ
4748 PR sanitizer/71498
4749 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
4750 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
4751
ef7cf206
JJ
4752 PR preprocessor/71183
4753 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
4754 to cb_get_source_date_epoch.
4755
50b15873
JJ
47562016-06-10 Jakub Jelinek <jakub@redhat.com>
4757
4758 PR c/68657
4759 * c.opt (Wpsabi): Add Warning flag.
4760
4d926e34
MS
47612016-06-10 Martin Sebor <msebor@redhat.com>
4762
4763 PR c/71392
14ec014e 4764 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
4765 the nonnull attribute in type-generic builtins.
4766
e01b4e16
MS
47672016-06-09 Martin Sebor <msebor@redhat.com>
4768
4769 PR c/70883
4770 * c-common.c (builtin_function_validate_nargs): Make text of error
4771 message consistent with others like it.
4772
44a845ca
MS
47732016-06-08 Martin Sebor <msebor@redhat.com>
4774 Jakub Jelinek <jakub@redhat.com>
4775
4776 PR c++/70507
4777 PR c/68120
4778 * c-common.c (check_builtin_function_arguments): Handle
4779 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4780
a80a7051
RB
47812016-06-08 Richard Biener <rguenther@suse.de>
4782
4783 * c-common.c (parse_optimize_options): Improve diagnostic messages.
4784
bfd67b47
RB
47852016-06-07 Richard Biener <rguenther@suse.de>
4786
4787 PR c/61564
4788 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
4789 options and warn about others.
4790
15c98b2e
ES
47912016-06-01 Eduard Sanou <dhole@openmailbox.org>
4792
4793 * c-common.c (get_source_date_epoch): Rename to
4794 cb_get_source_date_epoch.
4795 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
4796 message when the parsing fails. Use error_at instead of fatal_error.
4797 * c-common.h (get_source_date_epoch): Rename to
4798 cb_get_source_date_epoch.
4799 * c-common.h (cb_get_source_date_epoch): Prototype.
4800 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
4801 * c-common.h (c_omp_region_type): Remove trailing comma.
4802 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
4803 * c-lex.c (c_lex_with_flags): Remove initialization of
4804 pfile->source_date_epoch.
4805
00631022
JJ
48062016-05-30 Jakub Jelinek <jakub@redhat.com>
4807
4808 PR c++/71349
4809 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
4810 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
4811 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
4812 instead of C_OMP_CLAUSE_SPLIT_FOR.
4813
f17a223d
RB
48142016-05-24 Richard Biener <rguenther@suse.de>
4815
4816 PR middle-end/70434
4817 PR c/69504
4818 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
4819 (convert_vector_to_array_for_subscript): ... this.
4820 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
4821 VIEW_CONVERT_EXPR to an array type. Rename to ...
4822 (convert_vector_to_array_for_subscript): ... this.
4823
4f2e1536
MP
48242016-05-12 Marek Polacek <polacek@redhat.com>
4825
4826 PR c/70756
4827 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
4828 size_in_bytes and pass LOC to it.
4829
d6e83a8d
MM
48302016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4831
4832 PR c/43651
4833 * c.opt (Wduplicate-decl-specifier): New option.
4834
5c3a10fb
MP
48352016-05-11 Marek Polacek <polacek@redhat.com>
4836
4837 PR c++/71024
4838 * c-common.c (diagnose_mismatched_attributes): New function.
4839 * c-common.h (diagnose_mismatched_attributes): Declare.
4840
deef7113
MP
48412016-05-04 Marek Polacek <polacek@redhat.com>
4842
4843 * c.opt (Wdangling-else): New option.
4844
79ce98bc
MP
48452016-05-03 Marek Polacek <polacek@redhat.com>
4846
4847 PR c/70859
4848 * c-common.c (builtin_function_validate_nargs): Add location
4849 parameter. Use it.
4850 (check_builtin_function_arguments): Add location and arguments
4851 parameters. Use them.
4852 * c-common.h (check_builtin_function_arguments): Update declaration.
4853
381cdae4
RB
48542016-05-03 Richard Biener <rguenther@suse.de>
4855
4856 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
4857 allow call args to gimplify to SSA names.
4858
1d793c34
MP
48592016-05-03 Marek Polacek <polacek@redhat.com>
4860
4861 * c-common.h (enum c_omp_region_type): Remove stray comma.
4862
77886428
CP
48632016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4864
4865 * c-common.h (enum c_omp_region_type): Define.
4866
697e0b28
RS
48672016-05-02 Richard Sandiford <richard.sandiford@arm.com>
4868
4869 * c-common.c (shorten_compare): Use wi::to_wide.
4870
e7ff0319
CP
48712016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4872
4873 PR middle-end/70626
4874 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
4875 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
4876 reduction clauses in acc parallel loops.
4877
2fff3db8
MP
48782016-04-29 Marek Polacek <polacek@redhat.com>
4879
4880 PR c/70852
4881 * c-common.c (warn_for_memset): Check domain before accessing it.
4882
509063eb
DV
48832016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
4884
4885 PR/69089
4886 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
4887 "aligned" attribute.
4888
b632761d
JM
48892016-04-28 Jason Merrill <jason@redhat.com>
4890
4891 * c-lex.c (c_common_has_attribute): Handle nodiscard.
4892
174f6622
ES
48932016-04-28 Eduard Sanou <dhole@openmailbox.org>
4894 Matthias Klose <doko@debian.org>
4895
4896 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 4897 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
4898 handling.
4899 * c-common.h (get_source_date_epoch): Prototype.
4900 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
4901
6bc2bb18
RB
49022015-04-27 Ryan Burn <contact@rnburn.com>
4903
4904 PR c++/69024
4905 PR c++/68997
4906 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
4907 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
4908 external linkage.
4909 (cilk_detect_and_unwrap): Corresponding changes.
4910 (extract_free_variables): Don't extract free variables from
4911 AGGR_INIT_EXPR slot.
4912 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
4913 (cilk_recognize_spawn): Likewise.
4914
c1e1f433
BS
49152016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4916
4917 * c.opt (Wmemset-elt-size): New option.
4918 * c-common.c (warn_for_memset): New function.
4919 * c-common.h (warn_for_memset): Declare.
4920
d067e05f
JM
49212016-04-25 Jason Merrill <jason@redhat.com>
4922
4923 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
4924 No longer static.
4925 * c-common.h: Declare it.
4926 * c-lex.c (c_common_has_attribute): Add maybe_unused.
4927
9aa36ae5
JM
49282016-04-22 Jason Merrill <jason@redhat.com>
4929
4930 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
4931
477d4906
IV
49322016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4933
4934 PR c++/69363
4935 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
4936 * c-common.h (c_finish_cilk_clauses): Remove declaration.
4937
fe37c7af
MM
49382016-04-18 Michael Matz <matz@suse.de>
4939
4940 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
4941 and SET_DECL_ALIGN.
4942
23f2660f
EB
49432016-04-17 Eric Botcazou <ebotcazou@adacore.com>
4944
4945 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
4946 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
4947 to incomplete types.
4948 (dump_nested_type): Remove redundant tests and tidy up.
4949 (print_ada_declaration): Also set TREE_VISITED on the declaration of
4950 a type which is the typedef of an original type.
4951
1e77281b
MP
49522016-04-15 Marek Polacek <polacek@redhat.com>
4953
4954 PR c/70651
4955 * c-common.c (build_va_arg): Change two asserts into errors and return
4956 error_mark_node.
4957
b3a77f21
MP
49582016-04-13 Marek Polacek <polacek@redhat.com>
4959
4960 PR c++/70639
4961 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
4962 for switch statements, too.
4963
322b8466
JM
49642016-03-28 Jason Merrill <jason@redhat.com>
4965
4966 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
4967
fbdb6baf
MP
49682016-03-23 Marek Polacek <polacek@redhat.com>
4969
4970 PR c++/69884
4971 * c.opt (Wignored-attributes): New option.
4972
5c240f4d
DM
49732016-03-22 David Malcolm <dmalcolm@redhat.com>
4974
4975 PR c/69993
4976 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
4977 diagnostic text, reversing the order of the warning and note so
4978 that they appear in source order.
4979
14ba7b28
MP
49802016-03-17 Marek Polacek <polacek@redhat.com>
4981
4982 PR c/69407
4983 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
4984 operations.
4985
08a1cadc
JM
49862016-03-14 Jason Merrill <jason@redhat.com>
4987
2aaeea19
JM
4988 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
4989
08a1cadc
JM
4990 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
4991
c06d25bb
RB
49922016-03-09 Richard Biener <rguenther@suse.de>
4993
4994 PR c/70143
4995 * c-common.c (strict_aliasing_warning): Add back
4996 alias_sets_conflict_p check.
4997
80aac5c8
JM
49982016-03-08 Jason Merrill <jason@redhat.com>
4999
5000 * c-opts.c (set_std_cxx1z): Don't enable concepts.
5001
64b23c13
DM
50022016-03-04 David Malcolm <dmalcolm@redhat.com>
5003
5004 PR c/68187
5005 * c-indentation.c (get_visual_column): Move code to determine next
5006 tab stop to...
5007 (next_tab_stop): ...this new function.
5008 (line_contains_hash_if): Delete function.
5009 (detect_preprocessor_logic): Delete function.
5010 (get_first_nws_vis_column): New function.
5011 (detect_intervening_unindent): New function.
5012 (should_warn_for_misleading_indentation): Replace call to
5013 detect_preprocessor_logic with a call to
5014 detect_intervening_unindent.
5015
729526f5
DM
50162016-03-04 David Malcolm <dmalcolm@redhat.com>
5017
5018 PR c/68187
5019 * c-indentation.c (should_warn_for_misleading_indentation): When
5020 suppressing warnings about cases where the guard and body are on
5021 the same column, only use the first non-whitespace column in place
5022 of the guard token column when dealing with "else" clauses.
5023 When rejecting aligned BODY and NEXT, loosen the requirement
5024 from equality with the first non-whitespace of guard to simply
5025 that they not be indented relative to it.
5026
e9a35493
RB
50272016-03-04 Richard Biener <rguenther@suse.de>
5028
5029 PR c++/70054
5030 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
5031 instead of alias_sets_conflict_p.
5032
1be56bc5
MP
50332016-03-01 Marek Polacek <polacek@redhat.com>
5034
5035 PR c++/69795
5036 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
5037 any DECL.
5038
35886f0b
MS
50392016-02-22 Martin Sebor <msebor@redhat.com>
5040
5041 PR middle-end/69780
5042 * c-common.c (check_builtin_function_arguments): Validate and
5043 reject invalid arguments to __builtin_alloca_with_align.
5044
4246c8da
MW
50452016-02-20 Mark Wielaard <mjw@redhat.com>
5046
5047 PR c/28901
5048 * c.opt (Wunused-const-variable): Turn into Alias for...
5049 (Wunused-const-variable=): New option.
5050
268be88c
BE
50512016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5052
5053 PR c++/69865
5054 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
5055 here...
5056 (c_common_init_options): ...to here.
5057 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
5058
871b3f47
JJ
50592016-02-19 Jakub Jelinek <jakub@redhat.com>
5060
5061 PR c++/69826
5062 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
5063 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
5064 flag_preprocess_only.
5065
bf14eba2
JJ
50662016-02-16 Jakub Jelinek <jakub@redhat.com>
5067
5068 PR c/69835
5069 * c.opt (Wnonnull-compare): Enable for -Wall.
5070
ba6b3795
JJ
50712016-02-15 Jakub Jelinek <jakub@redhat.com>
5072
5073 PR c++/69797
5074 * c-common.c (sync_resolve_size): Diagnose too few arguments
5075 even when params is non-NULL empty vector.
5076
a011cd92
BS
50772016-02-08 Bernd Schmidt <bschmidt@redhat.com>
5078
5079 PR target/60410
5080 * c.opt (fshort-double): Remove.
5081
46cb9332
MS
50822016-02-05 Martin Sebor <msebor@redhat.com>
5083
5084 PR c++/69662
5085 * c.opt (Warning options): Update -Wplacement-new to take
5086 an optional argument.
5087
e1b81f2b
JJ
50882016-02-01 Jakub Jelinek <jakub@redhat.com>
5089
5090 PR preprocessor/69543
5091 PR c/69558
5092 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
5093 instead of loc to control_warning_option.
5094
b6adbb9f
NS
50952016-02-01 Nathan Sidwell <nathan@codesourcery.com>
5096
5097 * c.opt (fopenacc-dim=): New option.
5098
5d70666e
RB
50992016-01-27 Ryan Burn <contact@rnburn.com>
5100
5101 PR cilkplus/69267
5102 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
5103 gimplify_arg. Removed superfluous post_p argument.
5104 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
5105 superfluous post_p argument.
5106 * c-gimplify.c (c_gimplify_expr): Likewise.
5107
01e1dea3
DM
51082016-01-26 David Malcolm <dmalcolm@redhat.com>
5109
5110 PR other/69006
5111 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
5112 pp_newline_and_flush with pp_flush.
5113
9f04a53e
MS
51142016-01-20 Martin Sebor <msebor@redhat.com>
5115
5116 PR c/69405
5117 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
5118 an incompatible argument when the argument isn't a valid tree node.
5119
7f26f7df
JM
51202016-01-18 Jason Merrill <jason@redhat.com>
5121
5122 PR c++/68767
5123 * c-common.c (check_function_arguments_recurse): Fold the whole
5124 COND_EXPR, not just the condition.
5125
f62bf092
TV
51262016-01-18 Tom de Vries <tom@codesourcery.com>
5127
5128 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
5129 classify as loop clause.
5130
e0a575ff
JJ
51312016-01-15 Jakub Jelinek <jakub@redhat.com>
5132
5133 PR bootstrap/68271
5134 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
5135 C++ FE no longer has limit on number of pragmas.
5136
51372015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
5138
5139 PR c++/69048
5140 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 5141 to add missing cleanup point.
b6e3db06 5142
c7df95d8
DM
51432016-01-14 David Malcolm <dmalcolm@redhat.com>
5144
5145 PR c++/68819
5146 * c-indentation.c (get_visual_column): Add location_t param.
5147 Handle the column number being zero by effectively disabling the
5148 warning, with an "inform".
5149 (should_warn_for_misleading_indentation): Add location_t argument
5150 for all uses of get_visual_column.
5151
21efdd80
PP
51522016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
5153
5154 PR c++/69029
5155 * c-indentation.c (should_warn_for_misleading_indentation):
5156 Don't warn about do-while statements.
5157
7a127fa7
MS
51582016-01-07 Martin Sebor <msebor@redhat.com>
5159
5160 PR c/68966
5161 * c-common.c (sync_resolve_size): Reject first argument when it's
5162 a pointer to _Bool.
5163
c589e975
DM
51642016-01-05 David Malcolm <dmalcolm@redhat.com>
5165
5166 PR c/69122
5167 * c-indentation.c (get_visual_column): Remove default argument.
5168 (should_warn_for_misleading_indentation): For the multiline case,
5169 update call to get_visual_column for next_stmt_exploc so that it
5170 captures the location of the first non-whitespace character in the
5171 relevant line. Don't issue warnings if there is non-whitespace
5172 before the next statement.
5173
818ab71a
JJ
51742016-01-04 Jakub Jelinek <jakub@redhat.com>
5175
5176 Update copyright years.
5177
745e411d
DM
51782015-12-21 David Malcolm <dmalcolm@redhat.com>
5179
5180 * c-common.c (binary_op_error): Convert first param from
5181 location_t to rich_location * and use it when emitting an error.
5182 * c-common.h (binary_op_error): Convert first param from
5183 location_t to rich_location *.
5184
de67c4c3
DM
51852015-12-16 David Malcolm <dmalcolm@redhat.com>
5186
5187 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
5188 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
5189
4a38b02b
IV
51902015-12-15 Ilya Verbin <ilya.verbin@intel.com>
5191
5192 * c-common.c (c_common_attribute_table): Handle "omp declare target
5193 link" attribute.
5194
54d62f51
JJ
51952015-12-14 Jakub Jelinek <jakub@redhat.com>
5196
5197 PR c/68833
5198 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
5199
8d4227c8
TB
52002014-12-12 Tobias Burnus <burnus@net-b.de>
5201
5202 PR fortran/68815
5203 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
5204 specifiers (%d, %i,%u and %c).
5205
f6069ccc
DM
52062015-12-10 David Malcolm <dmalcolm@redhat.com>
5207
5208 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
5209
63bbf46d
JJ
52102015-12-08 Jakub Jelinek <jakub@redhat.com>
5211
5212 PR c/48088
5213 PR c/68657
5214 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
5215 * c-pragma.c (handle_pragma_diagnostic): Adjust
5216 control_warning_option caller.
5217
f79520bb
DM
52182015-12-07 David Malcolm <dmalcolm@redhat.com>
5219
5220 * c-common.c (c_cpp_error): Update for change to
5221 rich_location::set_range.
5222
b3d5bc62
JJ
52232015-12-04 Paolo Bonzini <bonzini@gnu.org>
5224
5225 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
5226 shifting 1 out of the sign bit.
5227
52282015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
5229
5230 * c-common.c (c_common_attribute_table[]): Update max arguments
5231 count for "simd" attribute.
5232 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
5233
6eb4a537
JJ
52342015-12-03 Jakub Jelinek <jakub@redhat.com>
5235
5236 PR preprocessor/57580
5237 * c-ppoutput.c (print): Change printed field to bool.
5238 Move src_file last for smaller padding.
5239 (init_pp_output): Set print.printed to false instead of 0.
5240 (scan_translation_unit): Fix up formatting. Set print.printed
5241 to true after printing something other than newline.
5242 (scan_translation_unit_trad): Set print.printed to true instead of 1.
5243 (maybe_print_line_1): Set print.printed to false instead of 0.
5244 (print_line_1): Likewise.
5245 (do_line_change): Set print.printed to true instead of 1.
5246 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
5247 dump_macro): Set print.printed to false after printing newline.
5248
4250754e
JM
52492015-12-02 Jason Merrill <jason@redhat.com>
5250
f479b43d
JM
5251 * c-common.c (fold_for_warn): New.
5252 (warn_logical_operator, warn_tautological_cmp)
5253 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
5254
4250754e
JM
5255 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
5256 (c_fully_fold_internal, decl_constant_value_for_optimization):
5257 Move to c/c-fold.c.
5258 * c-common.h: Don't declare decl_constant_value_for_optimization.
5259
e9e32ee6
JM
52602015-12-02 Joseph Myers <joseph@codesourcery.com>
5261
5262 PR c/68162
5263 * c-common.h (c_build_qualified_type): Add extra default
5264 arguments.
5265
37d5ad46
JB
52662015-12-01 Julian Brown <julian@codesourcery.com>
5267 Cesar Philippidis <cesar@codesourcery.com>
5268 James Norris <James_Norris@mentor.com>
5269
5270 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
5271 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
5272 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
5273
f07862c7
EB
52742015-11-30 Eric Botcazou <ebotcazou@adacore.com>
5275
5276 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
5277 (decl_sloc_common): Delete and move bulk of processing to...
5278 (decl_sloc): ...here.
5279 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
5280 (dump_ada_double_name): Remove S parameter and compute the suffix.
5281 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
5282 element type and deal with an anonymous one.
5283 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
5284 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
5285 and remove reference to QUAL_UNION_TYPE.
5286 (dump_nested_types): Make 2 passes on the fields and move bulk to...
5287 (dump_nested_type): ...here. New function extracted from above.
5288 Generate a full declaration for anonymous element type of arrays.
5289 (print_ada_declaration): Really skip anonymous declarations. Remove
5290 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
5291 Clean up processing of declarations of array types and objects.
5292 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
5293 Remove obsolete code and tidy up.
5294
75c8aac3
JH
52952015-11-29 Jan Hubicka <hubicka@ucw.cz>
5296
5297 PR c/67581
5298 * c-common.c (handle_transparent_union_attribute): Update
5299 also type variants.
5300
b58d3df2
ML
53012015-11-27 Martin Liska <mliska@suse.cz>
5302
5303 PR c++/68312
5304 * array-notation-common.c (cilkplus_extract_an_triplets):
5305 Release vector of vectors.
5306 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
5307
89a01fcf
EB
53082015-11-26 Eric Botcazou <ebotcazou@adacore.com>
5309
5310 PR c++/68527
5311 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
5312 (print_ada_struct_decl): Likewise.
5313
cc5c5226
IZ
53142015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
5315
5316 PR c++/68001
5317 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
5318 * cilk.c (recognize_spawn): Determine location in a more precise
5319 way.
5320
269adb9d
JM
53212015-11-19 Jason Merrill <jason@redhat.com>
5322
5323 * c-common.c (shorten_compare): But look through macros from
5324 system headers.
5325
d0eccfcd
JM
53262015-11-18 Jason Merrill <jason@redhat.com>
5327
5328 * c-common.c (shorten_compare): Don't -Wtype-limits if the
5329 non-constant operand comes from a macro.
5330
3e44547c
JM
53312015-11-17 Jason Merrill <jason@redhat.com>
5332
5333 PR bootstrap/68346
5334 * c-common.c (warn_tautological_cmp): Fold before checking for
5335 constants.
5336
0f62c7a0
MP
53372015-11-16 Marek Polacek <polacek@redhat.com>
5338
5339 PR c++/68362
5340 * c-common.c (check_case_bounds): Fold low and high cases.
5341
a868811e
MP
53422015-11-16 Marek Polacek <polacek@redhat.com>
5343
5344 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
5345 * c-common.c (c_common_get_alias_set): Likewise.
5346 (handle_visibility_attribute): Likewise.
5347
fff77217
KY
53482015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
5349
5350 * c-common.c (handle_simd_attribute): New.
5351 (struct attribute_spec): Add entry for "simd".
5352 (handle_simd_attribute): New.
5353
269e63b7
KT
53542015-11-13 Kai Tietz <ktietz70@googlemail.com>
5355
5356 * c-lex.c (interpret_float): Use fold_convert.
5357
ebedc9a3
DM
53582015-11-13 David Malcolm <dmalcolm@redhat.com>
5359
5360 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
5361 and store it on the result.
5362 * c-opts.c (c_common_init_options): Set
5363 global_dc->colorize_source_p.
5364
6e232ba4
JN
53652015-11-12 James Norris <jnorris@codesourcery.com>
5366 Joseph Myers <joseph@codesourcery.com>
5367
7365279f 5368 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
5369 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
5370 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
5371 PRAGMA_OACC_CLAUSE_LINK.
5372
e78bede6
MP
53732015-11-11 Marek Polacek <polacek@redhat.com>
5374
5375 PR c/68107
5376 PR c++/68266
5377 * c-common.c (valid_array_size_p): New function.
5378 * c-common.h (valid_array_size_p): Declare.
5379
3f8257db 53802015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
5381
5382 PR bootstrap/68271
5383 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
5384
69f293c9
AM
53852015-11-11 Andrew MacLeod <amacleod@redhat.com>
5386
5387 * array-notation-common.c: Remove unused header files.
5388 * c-ada-spec.c: Likewise.
5389 * c-cilkplus.c: Likewise.
5390 * c-common.c: Likewise.
5391 * c-cppbuiltin.c: Likewise.
5392 * c-dump.c: Likewise.
5393 * c-format.c: Likewise.
5394 * c-gimplify.c: Likewise.
5395 * c-indentation.c: Likewise.
5396 * c-lex.c: Likewise.
5397 * c-omp.c: Likewise.
5398 * c-opts.c: Likewise.
5399 * c-pch.c: Likewise.
5400 * c-ppoutput.c: Likewise.
5401 * c-pragma.c: Likewise.
5402 * c-pretty-print.c: Likewise.
5403 * c-semantics.c: Likewise.
5404 * c-ubsan.c: Likewise.
5405 * cilk.c: Likewise.
5406 * stub-objc.c: Likewise.
5407
3a40d81d
NS
54082015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5409 Cesar Philippidis <cesar@codesourcery.com>
5410 James Norris <jnorris@codesourcery.com>
5411 Julian Brown <julian@codesourcery.com>
5412 Nathan Sidwell <nathan@codesourcery.com>
5413
5414 * c-pragma.c (oacc_pragmas): Add "routine".
5415 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
5416
ee45a32d
EB
54172015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5418
5419 * c-common.c (c_common_attributes): Add scalar_storage_order.
5420 (handle_scalar_storage_order_attribute): New function.
5421 * c-pragma.c (global_sso): New variable.
5422 (maybe_apply_pragma_scalar_storage_order): New function.
5423 (handle_pragma_scalar_storage_order): Likewise.
5424 (init_pragma): Register scalar_storage_order.
5425 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
5426 * c.opt (Wscalar-storage-order): New warning.
5427 (fsso-struct=): New option.
5428
eb11eb15
MS
54292015-11-08 Martin Sebor <msebor@redhat.com>
5430
5431 * c.opt (Wplacement-new): Add a period to the end of a sentence.
5432
0aad0198
RS
54332015-11-07 Richard Sandiford <richard.sandiford@arm.com>
5434
5435 * c-common.c: Don't undef DEF_BUILTIN.
5436
8a645150
DM
54372015-11-06 David Malcolm <dmalcolm@redhat.com>
5438
5439 * c-common.c (c_cpp_error): Convert parameter from location_t to
5440 rich_location *. Eliminate the "column_override" parameter and
5441 the call to diagnostic_override_column.
5442 Update the "done_lexing" clause to set range 0
5443 on the rich_location, rather than overwriting a location_t.
5444 * c-common.h (c_cpp_error): Convert parameter from location_t to
5445 rich_location *. Eliminate the "column_override" parameter.
5446
7a5e4956
CP
54472015-11-05 Cesar Philippidis <cesar@codesourcery.com>
5448 Thomas Schwinge <thomas@codesourcery.com>
5449 James Norris <jnorris@codesourcery.com>
5450
5451 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
5452 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
5453 clauses with parallel and kernels and loops.
5454 * c-pragma.h (enum pragma_omp_clause): Add entries for
5455 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
5456 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
5457 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
5458 INDEPENDENT,SEQ}.
5459 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
5460
e2f5cc96
MS
54612015-11-05 Martin Sebor <msebor@redhat.com>
5462
5463 PR c++/67942
5464 * c.opt (-Wplacement-new): New option.
5465
e01d41e5
JJ
54662015-11-05 Jakub Jelinek <jakub@redhat.com>
5467
5468 * c-common.h (c_finish_omp_atomic): Add TEST argument.
5469 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
5470 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
5471 save_expr or create_tmp_var* if TEST is true.
5472 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
5473 Don't call add_stmt here.
5474 (struct c_omp_check_loop_iv_data): New type.
5475 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
5476 c_omp_check_loop_iv_exprs): New functions.
5477 (c_omp_split_clauses): Adjust for lastprivate being allowed on
5478 distribute.
5479 (c_omp_declare_simd_clauses_to_numbers): Change
5480 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
5481 (c_omp_declare_simd_clauses_to_decls): Similarly change those
5482 from numbers to PARM_DECLs.
5483
595278be
MM
54842015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
5485
5486 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
5487 flag_checking.
5488
3f8257db 54892015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
5490
5491 PR c++-common/67882
b3d5bc62
JJ
5492 * c-common.h (fold_offsetof_1): Add argument.
5493 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
5494 offsetof expressions that reference elements past the end of
5495 an array.
5496
4bf9e5a8
TS
54972015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5498 Chung-Lin Tang <cltang@codesourcery.com>
5499
5500 * c-pragma.c (oacc_pragmas): Add "atomic".
5501 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
5502
3b1661a9
ES
55032015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
5504
5505 * c-common.c (handle_target_clones_attribute): New.
5506 (c_common_attribute_table): Add handle_target_clones_attribute.
5507 (handle_always_inline_attribute): Add check on target_clones attribute.
5508 (handle_target_attribute): Ditto.
5509
2adfab87
AM
55102015-10-29 Andrew MacLeod <amacleod@redhat.com>
5511
5512 * array-notation-common.c: Reorder #include's and remove duplicates.
5513 * c-ada-spec.c: Likewise.
5514 * c-cilkplus.c: Likewise.
5515 * c-common.c: Likewise.
5516 * c-cppbuiltin.c: Likewise.
5517 * c-dump.c: Likewise.
5518 * c-format.c: Likewise.
5519 * c-gimplify.c: Likewise.
5520 * c-indentation.c: Likewise.
5521 * c-lex.c: Likewise.
5522 * c-omp.c: Likewise.
5523 * c-opts.c: Likewise.
5524 * c-pch.c: Likewise.
5525 * c-ppoutput.c: Likewise.
5526 * c-pragma.c: Likewise.
5527 * c-pretty-print.c: Likewise.
5528 * c-semantics.c: Likewise.
5529 * c-ubsan.c: Likewise.
5530 * cilk.c: Likewise.
5531 * stub-objc.c: Likewise.
5532
d90ec4f2
JM
55332015-10-28 Jason Merrill <jason@redhat.com>
5534
5535 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
5536
88bae6f4
TS
55372015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5538 James Norris <jnorris@codesourcery.com>
5539 Cesar Philippidis <cesar@codesourcery.com>
5540
5541 PR c/64765
5542 PR c/64880
5543 * c-common.h (c_oacc_split_loop_clauses): Declare function.
5544 * c-omp.c (c_oacc_split_loop_clauses): New function.
5545
b1726d6c
MS
55462015-10-21 Martin Sebor <msebor@redhat.com>
5547
5548 PR driver/68043
5549 * c.opt: End each sentence that describes an option with a period.
5550
fa60eeb9
MP
55512015-10-20 Marek Polacek <polacek@redhat.com>
5552
5553 * array-notation-common.c (is_cilkplus_vector_p): Define.
5554 * c-common.h (is_cilkplus_vector_p): Declare.
5555
95979049
MP
55562015-10-20 Marek Polacek <polacek@redhat.com>
5557
5558 * c.opt (std=gnu++11): Do not describe as experimental.
5559 (std=gnu++14): Likewise.
5560
2a9fb712
JM
55612015-10-19 Jason Merrill <jason@redhat.com>
5562
5563 * c-cppbuiltin.c (c_cpp_builtins): Define
5564 __cpp_nontype_template_args.
5565
13b380a3
JM
55662015-10-19 Jason Merrill <jason@redhat.com>
5567
5568 * c-cppbuiltin.c (c_cpp_builtins): Define
5569 __cpp_enumerator_attributes, __cpp_fold_expressions,
5570 __cpp_unicode_characters.
5571
d9a6bd32
JJ
55722015-10-13 Jakub Jelinek <jakub@redhat.com>
5573 Aldy Hernandez <aldyh@redhat.com>
5574
5575 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
5576 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
5577 (c_define_builtins): Likewise.
5578 * c-common.h (enum c_omp_clause_split): Add
5579 C_OMP_CLAUSE_SPLIT_TASKLOOP.
5580 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
5581 (c_finish_omp_for): Add ORIG_DECLV argument.
5582 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
5583 201511 instead of 201307.
5584 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
5585 OMP_CRITICAL_CLAUSES to it.
5586 (c_finish_omp_ordered): Add CLAUSES argument, set
5587 OMP_ORDERED_CLAUSES to it.
5588 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
5589 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
5590 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
5591 constructs and new OpenMP 4.5 clauses. Clear
5592 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
5593 verification code.
5594 * c-pragma.c (omp_pragmas_simd): Add taskloop.
5595 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
5596 (enum pragma_omp_clause): Add
5597 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
5598 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
5599
624d31fe
RS
56002015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5601
5602 * c-lex.c (interpret_float): Use real_equal instead of
5603 REAL_VALUES_EQUAL.
5604
b8fd7909
JM
56052015-10-04 Jason Merrill <jason@redhat.com>
5606
5607 Implement N4514, C++ Extensions for Transactional Memory.
5608 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
5609 (c_common_attribute_table): Add transaction_safe_dynamic.
5610 transaction_safe now affects type identity.
5611 (handle_tm_attribute): Handle transaction_safe_dynamic.
5612 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
5613 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
5614 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
5615 (D_TRANSMEM): New.
5616 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
5617 * c-pretty-print.c (pp_c_attributes_display): Don't print
5618 transaction_safe in C++.
5619
12651878
MP
56202015-10-02 Marek Polacek <polacek@redhat.com>
5621
5622 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
5623
3e3b8d63
MP
56242015-10-02 Marek Polacek <polacek@redhat.com>
5625
5626 PR c/64249
5627 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
5628 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
5629 * c.opt (Wduplicated-cond): New option.
5630
0d1a8f75
JM
56312015-10-01 Joseph Myers <joseph@codesourcery.com>
5632
5633 * c.opt (std=c11): Do not describe as experimental.
5634 (std=gnu11): Likewise.
5635 (std=iso9899:2011): Likewise.
5636
3e32ee19
NS
56372015-09-28 Nathan Sidwell <nathan@codesourcery.com>
5638
5639 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
5640 (DEF_FUNCTION_TYPE_VAR_11): Delete.
5641
974348ee
MP
56422015-09-25 Marek Polacek <polacek@redhat.com>
5643
5644 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
5645 (ubsan_instrument_shift): Likewise.
5646
15dbc1a6
MP
56472015-09-25 Marek Polacek <polacek@redhat.com>
5648
5649 PR sanitizer/64906
5650 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
5651
6b95d7cc
PP
56522015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
5653
5654 * c-indentation.c (should_warn_for_misleading_indentation):
5655 Compare next_stmt_vis_column with guard_line_first_nws instead
5656 of with guard_line_vis_column.
5657
c1822f9c
MLI
56582015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
5659
5660 PR c/49654
5661 PR c/49655
5662 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
5663 options and options not valid for the current language.
5664
d5398058
PP
56652015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
5666
5667 * c-indentation.c (should_warn_for_misleading_indentation):
5668 Float out and consolidate the calls to get_visual_column that
5669 are passed guard_exploc as an argument. Compare
5670 next_stmt_vis_column with guard_line_first_nws instead of with
5671 body_line_first_nws.
5672
6b333269
NS
56732015-09-22 Nathan Sidwell <nathan@codesourcery.com>
5674
5675 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
5676 Wnamespaces): New C++ warnings.
5677
a75f1574
JM
56782015-09-22 Jason Merrill <jason@redhat.com>
5679
5680 * c-common.h (abi_compat_version_crosses): New.
5681 (warn_abi_version): Declare.
5682 * c-common.c: Define it.
5683 * c-opts.c (c_common_post_options): Handle it.
5684 flag_abi_compat_version defaults to 8.
5685
bdaaa8b7
VV
56862015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
5687
5688 Complete the implementation of N4230, Nested namespace definition.
5689 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
5690 __cpp_nested_namespace_definitions.
5691
eaa797e8
MLI
56922015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5693
5694 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
5695
c4914de6
MLI
56962015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5697
5698 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
5699 when warning.
5700 * c-pragma.h (pragma_lex): Add optional loc argument.
5701
fcb87c50
MM
57022015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
5703
5704 * c-format.c (check_format_arg): Adjust to use common block size in all
5705 object pools.
5706
31bdd08a
DM
57072015-09-15 David Malcolm <dmalcolm@redhat.com>
5708
5709 * c-format.c (location_from_offset): Update for change in
5710 signature of location_get_source_line.
5711 * c-indentation.c (get_visual_column): Likewise.
5712 (line_contains_hash_if): Likewise.
5713
aa9f4b4c
MP
57142015-09-14 Marek Polacek <polacek@redhat.com>
5715
5716 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
5717 setting various warnings.
5718
aa256c4a
MP
57192015-09-14 Marek Polacek <polacek@redhat.com>
5720
5721 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
5722 a negative value.
5723
0f876f22
MW
57242015-09-11 Mark Wielaard <mjw@redhat.com>
5725
5726 PR c/28901
5727 * c.opt (Wunused-variable): Option from common.opt.
5728 (Wunused-const-variable): New option.
5729
273aa49e
PC
57302015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
5731
5732 PR c++/53184
5733 * c.opt ([Wsubobject-linkage]): Add.
5734
1807ffc1
MS
57352015-09-03 Martin Sebor <msebor@redhat.com>
5736
5737 PR c/66516
5738 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
5739 functions.
5740 * c-common.c (reject_gcc_builtin): Define.
5741
38942840
BI
57422015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
5743
5744 PR middle-end/60586
5745 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
5746 prototype.
5747 * c-gimplify.c (c_gimplify_expr): Added a call to the function
5748 cilk_gimplify_call_params_in_spawned_fn.
5749 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
5750 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
5751 unwrapping.
5752
c316b5e4
MP
57532015-08-25 Marek Polacek <polacek@redhat.com>
5754
5755 PR middle-end/67330
5756 * c-common.c (handle_weak_attribute): Don't check whether the
5757 visibility can be changed here.
5758
584a7c46
MLI
57592015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
5760
5761 * c-lex.c (c_lex_with_flags): Use explicit locations.
5762
a79683d5
TS
57632015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5764
5765 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
5766 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
5767
61717a45
FXC
57682015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
5769
5770 PR middle-end/36757
5771 * c-common.c (check_builtin_function_arguments): Add check
5772 for BUILT_IN_SIGNBIT argument.
5773
329524f5
PC
57742015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
5775
5776 PR c++/67160
5777 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
5778 in c++1z mode.
5779
4ee55665
MP
57802015-08-17 Marek Polacek <polacek@redhat.com>
5781
5782 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
5783 with whitespaces before qualifier names.
5784
b893e375
MP
57852015-08-12 Marek Polacek <polacek@redhat.com>
5786
5787 PR c++/55095
5788 * c-common.c (maybe_warn_shift_overflow): Properly handle
5789 left-shifting 1 into the sign bit.
5790
c2d89095
MLI
57912015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5792
5793 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
5794
971e17ff
AS
57952015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
5796 Braden Obrzut <admin@maniacsvault.net>
5797 Jason Merrill <jason@redhat.com>
5798
5799 Add C++ Concepts TS support.
5800 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
5801 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
5802 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
5803 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
5804 * c-opts.c (set_std_cxx1z): Set flag_concepts.
5805 * c.opt (fconcepts): New.
5806
b3d5bc62
JJ
58072015-08-02 Martin Sebor <msebor@redhat.com>
5808
5809 * c.opt (-Wframe-address): New warning option.
5810
8ebca419
PP
58112015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5812
5813 * c-indentation.c (should_warn_for_misleading_indentation):
5814 Improve heuristics.
5815
1a1e101f
PP
58162015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5817
5818 * c-indentation.c (get_visual_column): Add parameter first_nws,
5819 use it. Update comment documenting the function.
5820 (is_first_nonwhitespace_on_line): Remove.
5821 (should_warn_for_misleading_indentation): Replace usage of
5822 of is_first_nonwhitespace_on_line with get_visual_column.
5823
992118a1
PP
58242015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5825
5826 * c-indentation.h (struct token_indent_info): Define.
5827 (get_token_indent_info): Define.
5828 (warn_for_misleading_information): Declare.
5829 * c-common.h (warn_for_misleading_information): Remove.
5830 * c-identation.c (warn_for_misleading_indentation):
5831 Change declaration to take three token_indent_infos. Adjust
5832 accordingly.
5833 * c-identation.c (should_warn_for_misleading_indentation):
5834 Likewise. Bail out early if the body is a compound statement.
5835 (guard_tinfo_to_string): Define.
5836
e8fa3817
JM
58372015-07-30 Jason Merrill <jason@redhat.com>
5838
5839 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
5840 '*' for reference decay.
5841
173864e8
MP
58422015-07-30 Marek Polacek <polacek@redhat.com>
5843
5844 * c-common.c (warn_tautological_cmp): Bail for float types.
5845
f2afe6dd
MP
58462015-07-27 Marek Polacek <polacek@redhat.com>
5847
5848 PR bootstrap/67030
5849 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
5850
05b28fd6
MP
58512015-07-27 Marek Polacek <polacek@redhat.com>
5852
5853 PR c++/66555
5854 PR c/54979
5855 * c-common.c (find_array_ref_with_const_idx_r): New function.
5856 (warn_tautological_cmp): New function.
5857 * c-common.h (warn_tautological_cmp): Declare.
5858 * c.opt (Wtautological-compare): New option.
5859
5a5062b8
MP
58602015-07-23 Marek Polacek <polacek@redhat.com>
5861
5862 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
5863 (ubsan_instrument_shift): Likewise.
5864
dc891fe7
MP
58652015-07-23 Marek Polacek <polacek@redhat.com>
5866
5867 PR sanitizer/66908
5868 * c-ubsan.c: Include gimplify.h.
5869 (ubsan_instrument_division): Unshare OP0 and OP1.
5870 (ubsan_instrument_shift): Likewise.
5871
451b5e48
MP
58722015-07-20 Marek Polacek <polacek@redhat.com>
5873 Richard Sandiford <richard.sandiford@arm.com>
5874
5875 PR c++/55095
5876 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
5877 Use EXPR_LOC_OR_LOC.
5878 (maybe_warn_shift_overflow): New function.
5879 * c-common.h (maybe_warn_shift_overflow): Declare.
5880 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
5881 * c.opt (Wshift-overflow): New option.
5882
fb0b2914
ML
58832015-07-16 Martin Liska <mliska@suse.cz>
5884
5885 * c-format.c (static void check_format_info_main): Use
5886 object_allocator instead of pool_allocator.
5887 (check_format_arg): Likewise.
5888 (check_format_info_main): Likewise.
5889
903f5c23
AM
58902015-07-15 Andrew MacLeod <amacleod@redhat.com>
5891
5892 * c-opts.c: Remove multiline #include comment.
5893
026c3cfd
AH
58942015-07-12 Aldy Hernandez <aldyh@redhat.com>
5895
5896 * c-common.c: Fix double word typos.
5897
bb49ee66
EB
58982015-07-10 Eric Botcazou <ebotcazou@adacore.com>
5899
5900 * c-ada-spec.h (cpp_operation): Revert latest change.
5901 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
5902 constructors and destructors.
5903
1916bcb5
AM
59042015-07-09 Andrew MacLeod <amacleod@redhat.com>
5905
5906 * c-common.h: Adjust includes for flags.h changes.
5907 * stub-objc.c: Likewise.
026c3cfd 5908
a9dcd529
EB
59092015-07-08 Eric Botcazou <ebotcazou@adacore.com>
5910
5911 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
5912 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
5913
b03b462f
JJ
59142015-07-08 Jakub Jelinek <jakub@redhat.com>
5915
5916 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
5917 are to be removed, return NULL rather than original clauses list.
5918
c7131fb2
AM
59192015-07-07 Andrew MacLeod <amacleod@redhat.com>
5920
5921 * array-notation-common.c: Adjust includes.
5922 * c-ada-spec.c: Likewise.
5923 * c-cilkplus.c: Likewise.
5924 * c-common.h: Likewise.
5925 * c-cppbuiltin.c: Likewise.
5926 * c-dump.c: Likewise.
5927 * c-format.c: Likewise.
5928 * c-gimplify.c: Likewise.
5929 * c-indentation.c: Likewise.
5930 * c-lex.c: Likewise.
5931 * c-omp.c: Likewise.
5932 * c-opts.c: Likewise.
5933 * c-pch.c: Likewise.
5934 * c-ppoutput.c: Likewise.
5935 * c-pragma.c: Likewise.
5936 * c-pretty-print.c: Likewise.
5937 * c-semantics.c: Likewise.
5938 * c-ubsan.c: Likewise.
5939 * cilk.c: Likewise.
5940 * stub-objc.c: Likewise.
5941
2a7fb83f
EB
59422015-07-07 Eric Botcazou <ebotcazou@adacore.com>
5943
5944 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
5945 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
5946
a03c9bf1
JM
59472015-07-01 Jason Merrill <jason@redhat.com>
5948
36a85135
JM
5949 * c-common.h (D_CXX11): Rename from D_CXX0X.
5950 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
5951 * c-common.c: Adjust.
5952
e7fa68d5
JM
5953 * c-opts.c (c_common_post_options): Default to C++14.
5954
a03c9bf1
JM
5955 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
5956
fe95b036
ESR
59572015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
5958
5959 Implement N4197 - Adding u8 character literals
b3d5bc62 5960 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 5961 CPP_CHAR.
b3d5bc62 5962 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 5963 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 5964 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
5965 and CPP_UTF8CHAR tokens.
5966 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 5967
da2e71c9
MLI
59682015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5969
5970 PR fortran/66605
5971 * c-common.c (do_warn_unused_parameter): Move here.
5972 * c-common.h (do_warn_unused_parameter): Declare.
5973
b155cfd9
MP
59742015-06-29 Marek Polacek <polacek@redhat.com>
5975
5976 PR c/66322
5977 * c-common.c (check_case_bounds): Add bool * parameter. Set
5978 OUTSIDE_RANGE_P.
5979 (c_add_case_label): Add bool * parameter. Pass it down to
5980 check_case_bounds.
5981 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
5982 warning here.
5983 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
5984 declarations.
5985
31521951
MP
59862015-06-27 Marek Polacek <polacek@redhat.com>
5987
5988 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
5989 or VECTOR_INTEGER_TYPE_P throughout.
5990 * c-gimplify.c: Likewise.
5991
22d03525
MP
59922015-06-26 Marek Polacek <polacek@redhat.com>
5993
5994 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
5995 * c-common.c (c_fully_fold_internal): Likewise.
5996 (c_alignof_expr): Likewise.
5997 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
5998 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 5999 * cilk.c (create_parm_list): Likewise.
22d03525 6000
af05e6e5
MP
60012015-06-26 Marek Polacek <polacek@redhat.com>
6002
6003 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
6004
f0889939
AM
60052015-06-25 Andrew MacLeod <amacleod@redhat.com>
6006
6007 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
6008 * c-gimplify.c: Likewise.
6009 * c-pragma.c: Likewise.
6010 * c-ubsan.c: Likewise.
6011 * cilk.c: Likewise.
6012
ca752f39
RS
60132015-06-25 Richard Sandiford <richard.sandiford@arm.com>
6014
6015 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
6016 ggc_hasher.
6017
16a16ec7
AM
60182015-06-25 Andrew MacLeod <amacleod@redhat.com>
6019
6020 * cilk.c: Move calls.h after tm.h in the include chain.
6021
0ae9bd27
MP
60222015-06-25 Marek Polacek <polacek@redhat.com>
6023
6024 * array-notation-common.c: Use VAR_P throughout.
6025 * c-ada-spec.c: Likewise.
6026 * c-common.c: Likewise.
6027 * c-format.c: Likewise.
6028 * c-gimplify.c: Likewise.
6029 * c-omp.c: Likewise.
6030 * c-pragma.c: Likewise.
6031 * c-pretty-print.c: Likewise.
6032 * cilk.c: Likewise.
6033
62f9079a
MP
60342015-06-25 Marek Polacek <polacek@redhat.com>
6035
6036 * cilk.c (extract_free_variables): Use is_global_var.
6037
0fa16060
RS
60382015-06-23 Richard Sandiford <richard.sandiford@arm.com>
6039
6040 * c-common.c: Don't include target-def.h.
6041
a68ae2e1
MP
60422015-06-23 Marek Polacek <polacek@redhat.com>
6043
6044 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
6045 when comparing INTEGER_CSTs.
6046
c6a2f2d9
PMR
60472015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
6048
6049 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
6050 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
6051 (dump_ada_template): Skip partially specialized types.
6052
6b4db501
MM
60532015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
6054
6055 * c-common.c (scalar_to_vector): Use std::swap instead of manually
6056 swapping.
6057
abb226c9
AM
60582015-06-17 Andrew MacLeod <amacleod@redhat.com>
6059
6060 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
6061 * c-ada-spec.c: Likewise.
6062 * c-cilkplus.c: Likewise.
6063 * c-common.c: Likewise.
6064 * c-common.h: Likewise.
6065 * c-cppbuiltin.c: Likewise.
6066 * c-dump.c: Likewise.
6067 * c-format.c: Likewise.
6068 * c-gimplify.c: Likewise.
6069 * c-indentation.c: Likewise.
6070 * c-lex.c: Likewise.
6071 * c-omp.c: Likewise.
6072 * c-opts.c: Likewise.
6073 * c-pch.c: Likewise.
6074 * c-ppoutput.c: Likewise.
6075 * c-pragma.c: Likewise.
6076 * c-pretty-print.c: Likewise.
6077 * c-semantics.c: Likewise.
6078 * c-ubsan.c: Likewise.
6079 * cilk.c: Likewise.
6080 * stub-objc.c: Likewise.
6081
076fecad
PP
60822015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
6083
6084 PR c++/65168
6085 * c-common.c (c_common_truthvalue_conversion): Warn when
6086 converting an address of a reference to a truth value.
6087
13fdf2e2
AM
60882015-06-08 Andrew MacLeod <amacleod@redhat.com>
6089
6090 * array-notation-common.c : Adjust include files.
6091 * c-ada-spec.c : Likewise.
6092 * c-cilkplus.c : Likewise.
6093 * c-common.c : Likewise.
6094 * c-common.h : Likewise.
6095 * c-cppbuiltin.c : Likewise.
6096 * c-dump.c : Likewise.
6097 * c-format.c : Likewise.
6098 * c-gimplify.c : Likewise.
6099 * c-indentation.c : Likewise.
6100 * c-lex.c : Likewise.
6101 * c-omp.c : Likewise.
6102 * c-opts.c : Likewise.
6103 * c-pch.c : Likewise.
6104 * c-ppoutput.c : Likewise.
6105 * c-pragma.c : Likewise.
6106 * c-pretty-print.c : Likewise.
6107 * c-semantics.c : Likewise.
6108 * c-ubsan.c : Likewise.
6109 * cilk.c : Likewise.
6110 * stub-objc.c : Likewise.
6111
a1661b90
MP
61122015-06-08 Marek Polacek <polacek@redhat.com>
6113
6114 PR c/66415
6115 * c-format.c (location_from_offset): Return LOC if LINE is null.
6116
d7438551
AH
61172015-06-05 Aldy Hernandez <aldyh@redhat.com>
6118
6119 * c-common.h (c_parse_final_cleanups): New prototype.
6120 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
6121
b3d5bc62
JJ
61222015-06-04 Sriraman Tallam <tmsriram@google.com>
6123
6124 * c-common.c (noplt): New attribute.
6125 (handle_noplt_attribute): New handler.
6126
ecb9f223
AM
61272015-06-04 Andrew MacLeod <amacleod@redhat.com>
6128
6129 * array-notation-common.c: Adjust includes for restructured coretypes.h.
6130 * c-ada-spec.c: Likewise.
6131 * c-cilkplus.c: Likewise.
6132 * c-common.c: Likewise.
6133 * c-common.h: Likewise.
6134 * c-cppbuiltin.c: Likewise.
6135 * c-dump.c: Likewise.
6136 * c-format.c: Likewise.
6137 * c-gimplify.c: Likewise.
6138 * c-indentation.c: Likewise.
6139 * c-lex.c: Likewise.
6140 * c-omp.c: Likewise.
6141 * c-opts.c: Likewise.
6142 * c-pch.c: Likewise.
6143 * c-ppoutput.c: Likewise.
6144 * c-pragma.c: Likewise.
6145 * c-pretty-print.c: Likewise.
6146 * c-semantics.c: Likewise.
6147 * c-ubsan.c: Likewise.
6148 * cilk.c: Likewise.
6149 * stub-objc.c: Likewise.
6150
6ac48155
DM
61512015-06-02 David Malcolm <dmalcolm@redhat.com>
6152
6153 PR c/66220:
6154 * c-indentation.c (should_warn_for_misleading_indentation): Use
6155 expand_location rather than expand_location_to_spelling_point.
6156 Don't warn if the guarding statement is more indented than the
6157 next/body stmts.
6158
773ce42e
DM
61592015-06-02 David Malcolm <dmalcolm@redhat.com>
6160
6161 * c-indentation.c (warn_for_misleading_indentation): Bail out
6162 immediately if -Wmisleading-indentation isn't enabled.
6163
4fef8379
ML
61642015-06-01 Martin Liska <mliska@suse.cz>
6165
6166 * c-format.c (check_format_arg):Use new type-based pool allocator.
6167 (check_format_info_main) Likewise.
6168
1edfb384
EB
61692015-05-31 Eric Botcazou <ebotcazou@adacore.com>
6170
6171 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
6172 (has_nontrivial_methods): Likewise.
6173
9677ef52
MP
61742015-05-25 Marek Polacek <polacek@redhat.com>
6175
6176 * c-ubsan.c (ubsan_instrument_shift): Use type0.
6177
fd5c817a
MP
61782015-05-22 Marek Polacek <polacek@redhat.com>
6179
6180 PR c/47043
6181 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
6182
a2f45fe6 61832015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
6184
6185 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
6186 STACK_GROWS_DOWNWARD.
6187
a2f45fe6 61882015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
6189
6190 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
6191 STACK_GROWS_DOWNWARD rather than if it is defined.
6192
0fee2ac2 61932015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 6194
0fee2ac2
MLI
6195 PR c/52952
6196 * c-format.c (location_column_from_byte_offset): New.
6197 (location_from_offset): New.
6198 (struct format_wanted_type): Add offset_loc field.
6199 (check_format_info): Move handling of location for extra arguments
6200 closer to the point of warning.
6201 (check_format_info_main): Pass the result of location_from_offset
6202 to warning_at.
6203 (format_type_warning): Pass the result of location_from_offset
6204 to warning_at.
6205
cf4ef6f7
MP
62062015-05-20 Marek Polacek <polacek@redhat.com>
6207
6208 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
6209
3a65ee74
MP
62102015-05-20 Marek Polacek <polacek@redhat.com>
6211
6212 * c-ada-spec.c (dump_sloc): Use DECL_P.
6213
21b634ae
MP
62142015-05-20 Marek Polacek <polacek@redhat.com>
6215
6216 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
6217 * c-common.c: Likewise.
6218
0e50b624
DM
62192015-05-19 David Malcolm <dmalcolm@redhat.com>
6220
6221 * c-common.h (fe_file_change): Strengthen param from
6222 const line_map * to const line_map_ordinary *.
6223 (pp_file_change): Likewise.
6224 * c-lex.c (fe_file_change): Likewise.
6225 (cb_define): Use linemap_check_ordinary when invoking
6226 SOURCE_LINE.
6227 (cb_undef): Likewise.
6228 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
6229 invoking cb_file_change.
6230 (c_finish_options): Likewise.
6231 (push_command_line_include): Likewise.
6232 (cb_file_change): Strengthen param "new_map" from
6233 const line_map * to const line_map_ordinary *.
6234 * c-ppoutput.c (cb_define): Likewise for local "map".
6235 (pp_file_change): Likewise for param "map" and local "from".
6236
fab27f52
MM
62372015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
6238
6239 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
6240
2fe1d762
TV
62412015-05-18 Tom de Vries <tom@codesourcery.com>
6242
6243 * c-common.c (build_va_arg_1): New function.
6244 (build_va_arg): Add address operator to va_list operand if necessary.
6245
7a37fa90
MM
62462015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
6247
6248 PR c/48956
6249 * c-common.c (int_safely_convertible_to_real_p): Define.
6250 (unsafe_conversion_p): Check conversions involving complex types.
6251 (conversion_warning): Add new warning message for conversions which
6252 discard imaginary component.
6253 * c-common.h: (enum conversion_safety): Add new enumerator for such
6254 conversions.
6255
3aa3c9fc
MP
62562015-05-14 Marek Polacek <polacek@redhat.com>
6257
6258 PR c/66066
6259 PR c/66127
6260 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
6261 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
6262 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
6263 use it. If FOR_INT_CONST, require that all evaluated operands be
6264 INTEGER_CSTs.
6265
c3388e62
DM
62662015-05-12 David Malcolm <dmalcolm@redhat.com>
6267
6268 * c-common.h (warn_for_misleading_indentation): New prototype.
6269 * c-indentation.c: New file.
6270 * c.opt (Wmisleading-indentation): New option.
6271
c7b38fd5
TV
62722015-05-12 Tom de Vries <tom@codesourcery.com>
6273
6274 PR tree-optimization/66010
6275 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
6276
381bf11e
JM
62772015-05-09 Jason Merrill <jason@redhat.com>
6278
edff0c06
JM
6279 * c-opts.c (c_common_post_options): Also clear
6280 cpp_opts->cpp_warn_cxx11_compat.
6281
129211bc
JM
6282 * c-common.h (enum cxx_dialect): Add cxx_unset.
6283 * c-common.c (cxx_dialect): Initialize to cxx_unset.
6284 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
6285
381bf11e
JM
6286 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
6287 (std=gnu++0x): Mark as Undocumented.
6288 (std=gnu++1y): Add deprecated message.
6289
fe191308
JM
62902015-05-08 Jason Merrill <jason@redhat.com>
6291
765189ff
JM
6292 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
6293 * c-opts.c: Adjust.
6294
fe191308
JM
6295 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
6296
755e528f
MP
62972015-05-08 Marek Polacek <polacek@redhat.com>
6298
6299 PR c/64918
6300 * c.opt (Woverride-init-side-effects): New option.
6301
0173bd2a
MP
63022015-05-07 Marek Polacek <polacek@redhat.com>
6303
6304 PR c/65179
6305 * c-common.c (c_fully_fold_internal): Warn when left shifting a
6306 negative value.
6307 * c.opt (Wshift-negative-value): New option.
6308 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
6309 when -Wextra and C99/C++11 mode.
6310
e0f0d3b9
MP
63112015-05-07 Marek Polacek <polacek@redhat.com>
6312 Martin Uecker <uecker@eecs.berkeley.edu>
6313
6314 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
6315 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
6316
8243e2a9
JM
63172015-05-05 Jason Merrill <jason@redhat.com>
6318
6319 * c.opt (Wterminate): New.
6320
577cd070
MP
63212015-04-30 Marek Polacek <polacek@redhat.com>
6322
6323 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
6324 require that the non-constant be of a boolean type.
6325
0373796b
JT
63262015-04-29 Josh Triplett <josh@joshtriplett.org>
6327
e0f0d3b9
MP
6328 * c-common.c (handle_section_attribute): Refactor to reduce
6329 nesting and distinguish between error cases.
0373796b 6330
716c0ba6
MP
63312015-04-29 Marek Polacek <polacek@redhat.com>
6332
6333 PR c/64610
6334 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
6335 with 0/1.
6336
8848828b
JJ
63372015-04-29 Jakub Jelinek <jakub@redhat.com>
6338
6339 * c-common.h (omp_clause_mask): Unconditionally define as a class.
6340 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
6341 HOST_BITS_PER_WIDE_INT.
6342
ecd0e562
TV
63432015-04-28 Tom de Vries <tom@codesourcery.com>
6344
6345 PR tree-optimization/65887
6346 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
6347
2a877204 63482015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 6349 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
6350
6351 * c-ada-spec.c (in_function): Delete.
6352 (dump_generic_ada_node): Do not change in_function and remove the
6353 redundant code dealing with it.
6354 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
6355 (print_ada_methods): Output the static member functions in a nested
6356 package after the regular methods as well as associated renamings.
6357
4853031e
MP
63582015-04-24 Marek Polacek <polacek@redhat.com>
6359
6360 PR c/65830
6361 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
6362 and OPT_Wshift_count_overflow.
6363
8c2b7f79
MP
6364 PR c/63357
6365 * c-common.c (warn_logical_operator): Warn if the operands have the
6366 same expressions.
6367
b8787813
MP
63682015-04-24 Marek Polacek <polacek@redhat.com>
6369
6370 PR c/61534
6371 * c-common.c (warn_logical_operator): Bail if either operand comes
6372 from a macro expansion.
6373
8fba1830
BRF
63742015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
6375
6376 PR target/55143
6377 * c-common.c (c_default_pointer_mode): Add definition.
6378 * c-common.h (c_default_pointer_mode): Add declaration.
6379
17958621
JJ
63802015-03-11 Jakub Jelinek <jakub@redhat.com>
6381
6382 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
6383 on record_builtin_type argument.
6384
7ccb1a11
JJ
63852015-03-10 Jakub Jelinek <jakub@redhat.com>
6386
6387 PR c/65120
6388 * c-common.c (warn_logical_not_parentheses): Don't warn for
6389 !x == 0 or !x != 0.
6390
04fd785e
MP
63912015-03-07 Marek Polacek <polacek@redhat.com>
6392
6393 PR sanitizer/65280
6394 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
6395 before trying to figure out whether we have a flexible array member.
6396
a4e26206 63972015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 6398 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
6399
6400 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
6401
0d2489f4
EB
64022015-03-05 Eric Botcazou <ebotcazou@adacore.com>
6403
6404 PR ada/65319
6405 * c-ada-spec.c (print_destructor): Remove obsolete code.
6406
83ed54d7
EB
64072015-03-01 Eric Botcazou <ebotcazou@adacore.com>
6408
6409 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
6410 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
6411 DECL_TEMPLATE_RESULT emulations.
6412 (dump_ada_template)): Add guard for TYPE_METHODS.
6413
7631f0e2
MP
64142015-02-27 Marek Polacek <polacek@redhat.com>
6415
6416 PR c/65040
6417 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
6418
d1783ae5
KT
64192015-02-27 Kai Tietz <ktietz@redhat.com>
6420
6421 PR c/35330
6422 * c-pragma.c (handle_pragma_weak): Do not try to create
6423 weak/alias of declarations not being function, or variable
6424 declarations.
6425
56a9f6bc
TS
64262015-02-24 Thomas Schwinge <thomas@codesourcery.com>
6427
6428 PR libgomp/64625
6429 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
6430 Remove macros.
6431 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
6432
3d5cb23d
MP
64332015-02-16 Marek Polacek <polacek@redhat.com>
6434
6435 PR c/65066
6436 * c-format.c (check_format_types): Handle null param.
6437
fa008882
MP
64382015-02-13 Marek Polacek <polacek@redhat.com>
6439
6440 PR c/65040
6441 * c-format.c (check_format_types): Don't warn about different
6442 signedness if the original value is in the range of WANTED_TYPE.
6443
785f21af
JM
64442015-02-12 Jason Merrill <jason@redhat.com>
6445
6446 PR c++/64956
6447 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
6448 to the current highest version.
6449 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
6450
4886ec8e
JJ
64512015-02-04 Jakub Jelinek <jakub@redhat.com>
6452
6453 PR c/64824
6454 PR c/64868
6455 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
6456 instead of RDIV_EXPR. Use build_binary_op instead of
6457 build2_loc.
6458
40fecdd6
JM
64592015-01-30 Joseph Myers <joseph@codesourcery.com>
6460
6461 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
6462 to pass input_location as first argument.
6463
a0c88d06
TV
64642015-01-23 Tom de Vries <tom@codesourcery.com>
6465
6466 PR libgomp/64672
6467 * c.opt (fopenacc): Mark as LTO option.
6468
1506ae0e
TV
64692015-01-23 Tom de Vries <tom@codesourcery.com>
6470
6471 PR libgomp/64707
6472 * c.opt (fopenmp): Mark as LTO option.
6473
31be63ab
JJ
64742015-01-21 Jakub Jelinek <jakub@redhat.com>
6475
6476 PR c/63307
b1726d6c 6477 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
6478 (compare_decls): Fix up formatting.
6479
64802015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
6481
6482 PR c/63307
6483 * cilk.c: Include vec.h.
6484 (struct cilk_decls): New structure.
6485 (wrapper_parm_cb): Split this function to...
6486 (fill_decls_vec): ...this...
6487 (create_parm_list): ...and this.
6488 (compare_decls): New function.
6489 (for_local_cb): Remove.
6490 (wrapper_local_cb): Ditto.
6491 (build_wrapper_type): For now first traverse and fill vector of
6492 declarations then sort it and then deal with sorted vector.
6493 (cilk_outline): Ditto.
6494 (declare_one_free_variable): Ditto.
6495
6875457f
JM
64962015-01-21 Jason Merrill <jason@redhat.com>
6497
6498 PR c++/64629
6499 * c-format.c (check_format_arg): Call decl_constant_value.
6500
185c9e56
ML
65012015-01-19 Martin Liska <mliska@suse.cz>
6502
6503 * c-common.c (handle_noicf_attribute): New function.
6504
41dbbb37
TS
65052015-01-15 Thomas Schwinge <thomas@codesourcery.com>
6506 Bernd Schmidt <bernds@codesourcery.com>
6507 James Norris <jnorris@codesourcery.com>
6508 Cesar Philippidis <cesar@codesourcery.com>
6509 Ilmir Usmanov <i.usmanov@samsung.com>
6510 Jakub Jelinek <jakub@redhat.com>
6511
6512 * c.opt (fopenacc): New option.
6513 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
6514 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
6515 New macros.
6516 * c-common.h (c_finish_oacc_wait): New prototype.
6517 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
6518 (c_finish_oacc_wait): New function.
6519 * c-pragma.c (oacc_pragmas): New variable.
6520 (c_pp_lookup_pragma, init_pragma): Handle it.
6521 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
6522 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
6523 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
6524 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
6525 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
6526 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
6527 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
6528 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
6529 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
6530 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
6531 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
6532 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
6533 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
6534 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
6535 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
6536 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
6537 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
6538 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
6539 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
6540 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
6541 PRAGMA_OACC_CLAUSE_WORKER.
6542
3f8257db 65432015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
6544
6545 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
6546 for the new option fstack-protector_explicit.
6547 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
6548 (handle_stack_protect_attribute): New function.
6549
3f8257db 65502015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
6551
6552 * c.opt: New option -Warray-bounds=.
6553
adfac8df
JJ
65542015-01-09 Michael Collison <michael.collison@linaro.org>
6555
6556 * array-notation-common.c: Include hash-set.h, machmode.h,
6557 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6558 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
6559 * c-ada-spec.c: Ditto.
6560 * c-cilkplus.c: Ditto.
6561 * c-common.c: Include input.h due to flattening of tree.h.
6562 Define macro GCC_C_COMMON_C.
6563 * c-common.h: Flatten tree.h header files into c-common.h.
6564 Remove include of tree-core.h.
6565 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
6566 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6567 fold-const.h, wide-int.h, and inchash.h due to
6568 flattening of tree.h.
6569 * c-dump.c: Ditto.
6570 * c-format.c: Flatten tree.h header files into c-common.h.
6571 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
6572 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6573 fold-const.h, wide-int.h, and inchash.h due to
6574 flattening of tree.h.
6575 * c-dump.c: Include hash-set.h, machmode.h,
6576 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6577 fold-const.h, wide-int.h, and inchash.h due to
6578 flattening of tree.h.
6579 * c-format.c: Include hash-set.h, machmode.h,
6580 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6581 fold-const.h, wide-int.h, inchash.h and real.h due to
6582 flattening of tree.h.
6583 * c-gimplify.c: Include hash-set.h, machmode.h,
6584 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6585 fold-const.h, wide-int.h, and inchash.h due to
6586 flattening of tree.h.
6587 * cilk.c: Ditto.
6588 * c-lex.c: Ditto.
6589 * c-omp.c: Ditto.
6590 * c-opts.c: Ditto.
6591 * c-pch.c: Ditto.
6592 * c-ppoutput.c: Ditto.
6593 * c-pragma.c: Ditto.
6594 * c-pretty-print.c: Ditto.
6595 * c-semantics.c: Ditto.
6596 * c-ubsan.c: Ditto.
6597 * stub-objc.c: Ditto.
6598
f5481fc4
JM
65992015-01-08 Jason Merrill <jason@redhat.com>
6600
6601 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
6602 do_ubsan_in_current_function.
6603 (ubsan_maybe_instrument_reference_or_call): Likewise.
6604 * c-ubsan.h: Declare it.
6605
de35aa66
MS
66062015-01-08 Mike Stump <mikestump@comcast.net>
6607
6608 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
6609
4a9a42ab
MP
66102015-01-07 Marek Polacek <polacek@redhat.com>
6611
6612 PR c/64440
6613 * c-common.c (c_fully_fold_internal): Warn for division and modulo
6614 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
6615
2f42e5de
TS
66162015-01-05 Trevor Saunders <tsaunders@mozilla.com>
6617
6618 PR c++/31397
6619 * c.opt (Wsuggest-override): New option.
6620
5624e564
JJ
66212015-01-05 Jakub Jelinek <jakub@redhat.com>
6622
6623 Update copyright years.
6624
5bd012f8
MP
66252015-01-05 Marek Polacek <polacek@redhat.com>
6626
6627 PR c/64423
6628 * c-common.c (warn_array_subscript_with_type_char): Add location_t
6629 parameter. Use it.
6630 * c-common.h (warn_array_subscript_with_type_char): Update
6631 declaration.
6632
a7fa8d18
ESR
66332014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
6634
6635 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
6636 Control macro with flag_sized_deallocation.
6637
3f8257db 66382014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
6639
6640 * c.opt (Wdiscarded-array-qualifiers): New option.
6641
1f8d3e84
JJ
66422014-12-19 Jakub Jelinek <jakub@redhat.com>
6643
6644 PR preprocessor/63831
6645 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
6646 and __has_cpp_attribute here.
6647 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
6648 c_common_has_attribute.
6649 * c-common.h (c_common_has_attribute): New prototype.
6650 * c-lex.c (init_c_lex): Set cb->has_attribute to
6651 c_common_has_attribute instead of cb_has_attribute.
6652 (get_token_no_padding): New function.
6653 (cb_has_attribute): Renamed to ...
6654 (c_common_has_attribute): ... this. No longer static. Use
6655 get_token_no_padding, require ()s, don't build TREE_LIST
6656 unnecessarily, fix up formatting, adjust diagnostics, call
6657 init_attributes.
6658
20b06add
JM
66592014-12-15 Jason Merrill <jason@redhat.com>
6660
6661 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
6662 (-Wsized-deallocation): New.
6663 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
6664 to on in C++14 and up.
6665
94a073b2
JM
66662014-12-11 Jason Merrill <jason@redhat.com>
6667
acaa5911
JM
6668 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
6669
94a073b2
JM
6670 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
6671 we aren't complaining about VLAs.
6672
7fb66c15
MP
66732014-12-06 Marek Polacek <polacek@redhat.com>
6674
6675 PR tree-optimization/64183
6676 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
6677 shift-expression if it is integer_type_node. Use types_compatible_p.
6678
b731b390
JJ
66792014-11-29 Jakub Jelinek <jakub@redhat.com>
6680
6681 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
6682 last argument from create_tmp_var_raw and create_tmp_var calls.
6683 * cilk.c (gimplify_cilk_spawn): Likewise.
6684 * c-omp.c (c_finish_omp_atomic): Likewise.
6685
6a4da643
MP
66862014-11-28 Marek Polacek <polacek@redhat.com>
6687
6688 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
6689 instead of unsigned_type_node.
6690
541e35a6
MP
66912014-11-28 Marek Polacek <polacek@redhat.com>
6692
6693 PR c/63862
6694 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
6695 to op1_utype.
6696 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
6697 expression to unsigned_type_node.
6698
dcc97066
MW
66992014-11-20 Mark Wielaard <mjw@redhat.com>
6700
6701 PR debug/38757
6702 * c-opts.c (set_std_c89): Set lang_hooks.name.
6703 (set_std_c99): Likewise.
6704 (set_std_c11): Likewise.
6705 (set_std_cxx98): Likewise.
6706 (set_std_cxx11): Likewise.
6707 (set_std_cxx14): Likewise.
6708 (set_std_cxx1z): Likewise.
6709
aa7da51a
JJ
67102014-11-21 Jakub Jelinek <jakub@redhat.com>
6711
6712 PR target/63764
6713 * c-common.h (convert_vector_to_pointer_for_subscript): Change
6714 return type to bool.
009a3480 6715 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
6716 (convert_vector_to_pointer_for_subscript): Change return type to
6717 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
6718 and copy it into a TARGET_EXPR and use that instead of *vecp
6719 directly.
6720
538dd0b7
DM
67212014-11-19 David Malcolm <dmalcolm@redhat.com>
6722
6723 Merger of git branch "gimple-classes-v2-option-3".
6724 * ChangeLog.gimple-classes: New.
6725 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
6726 from being just a vec<gimple> to a vec<gbind *>.
6727
c39a5e99
JJ
67282014-11-18 Jakub Jelinek <jakub@redhat.com>
6729
6730 PR sanitizer/63813
6731 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
6732 argument to ptype, set type to TREE_TYPE (ptype). Don't call
6733 get_pointer_alignment for non-pointers. Use ptype, or if it is
6734 reference type, corresponding pointer type, as type of kind
6735 argument.
6736 (ubsan_maybe_instrument_reference,
6737 ubsan_maybe_instrument_member_call): Adjust callers.
6738
8537a4a9
MP
67392014-11-15 Marek Polacek <polacek@redhat.com>
6740
6741 PR middle-end/63884
6742 * array-notation-common.c (is_sec_implicit_index_fn): Return false
6743 for NULL fndecl.
6744 (extract_array_notation_exprs): Return for NULL node.
6745
2079956a
JM
67462014-11-12 Joseph Myers <joseph@codesourcery.com>
6747
6748 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
6749 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
6750
1304953e
JJ
67512014-11-12 Jakub Jelinek <jakub@redhat.com>
6752
6753 PR c/59708
6754 * c-common.c (check_builtin_function_arguments): Handle
6755 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
6756
e5e44252
AK
67572014-11-10 Andi Kleen <ak@linux.intel.com>
6758
6759 PR c/60804
6760 * c-common.h (check_no_cilk): Declare.
6761 * cilk.c (get_error_location): New function.
6762 (check_no_cilk): Dito.
6763
e64b984d
AK
67642014-11-10 Andi Kleen <ak@linux.intel.com>
6765
6766 * cilk.c (recognize_spawn): Use expression location
6767 for error message.
6768
13c21655
PC
67692014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
6770
6771 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
6772
42fd12b1
ESR
67732014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
6774
6775 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
6776 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
6777 (__cpp_range_based_for, __cpp_initializer_lists,
6778 __cpp_delegating_constructors, __cpp_nsdmi,
6779 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
6780 for C++11; (__cpp_attribute_deprecated): Remove in favor of
6781 __has_cpp_attribute.
6782 * c-lex.c (cb_has_attribute): New callback CPP function;
6783 (init_c_lex): Set has_attribute callback.
6784
6f450181
RB
67852014-11-04 Richard Biener <rguenther@suse.de>
6786
6787 * c-common.c (shorten_compare): Do not shorten mixed
6788 DFP and non-DFP compares.
6789
26f0e1d6
ESR
67902014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
6791
6792 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
6793 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
6794 Commentary and rearrangement of tests.
6795 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
6796 Commentary and rearrangement of tests.
ab20d992 6797 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
26f0e1d6
ESR
6798 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
6799
ef4bddc2
RS
68002014-10-29 Richard Sandiford <richard.sandiford@arm.com>
6801
6802 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
6803 enum from machine_mode.
6804
c582198b
AM
68052014-10-28 Andrew MacLeod <amacleod@redhat.com>
6806
adfac8df
JJ
6807 * c-common.c: Adjust include files.
6808 * c-gimplify.c: Ditto.
6809 * cilk.c: Ditto.
6810 * c-pragma.c: Ditto.
6811 * c-ubsan.c: Ditto.
c582198b 6812
60393bbc
AM
68132014-10-27 Andrew MacLeod <amacleod@redhat.com>
6814
6815 * c-gimplify.c: Adjust include files.
6816
d723bb7c
MLI
68172014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
6818
6819 PR c++/53061
6820 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
6821 c_common_initialize_diagnostics.
6822 * c-common.h: Likewise.
6823
90f3520e
MP
68242014-10-24 Marek Polacek <polacek@redhat.com>
6825
6826 PR c/56980
6827 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
6828 print "struct"/"union"/"enum" for typedefed names.
6829
59d7607a
MP
68302014-10-23 Marek Polacek <polacek@redhat.com>
6831
6832 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
6833 in unsigned type.
6834
d95a2703
JJ
68352014-10-22 Jakub Jelinek <jakub@redhat.com>
6836 Yury Gribov <y.gribov@samsung.com>
6837
6838 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6839 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
6840 instead of flag_sanitize_recover as bool flag.
6841
8e6ef852
KY
68422014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
6843
6844 * cilk.c: Revert previous change.
6845
948cf550
IZ
68462014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
6847
6848 PR c/63307
6849 * cilk.c: Include vec.h.
6850 (struct cilk_decls): New structure.
6851 (wrapper_parm_cb): Split this function to...
6852 (fill_decls_vec): ...this...
6853 (create_parm_list): ...and this.
6854 (compare_decls): New function.
6855 (for_local_cb): Remove.
6856 (wrapper_local_cb): Ditto.
6857 (build_wrapper_type): For now first traverse and fill vector of
6858 declarations then sort it and then deal with sorted vector.
6859 (cilk_outline): Ditto.
6860 (declare_one_free_variable): Ditto.
6861
92574c7c
MP
68622014-10-17 Marek Polacek <polacek@redhat.com>
6863
6864 * c-opts.c (c_common_post_options): Set warn_implicit_int.
6865 * c.opt (Wimplicit-int): Initialize to -1.
6866
83685514
AM
68672014-10-16 Andrew MacLeod <amacleod@redhat.com>
6868
6869 * c-pragma.c: Adjust include files.
6870 * c-semantics.c: Likewise.
6871
5b8300ea
DD
68722014-10-16 DJ Delorie <dj@redhat.com>
6873
6874 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
6875 multiples of bytes.
6876
5f83e90b
JM
68772014-10-14 Jason Merrill <jason@redhat.com>
6878
6879 PR c++/63455
6880 * c-common.h (CPP_PREPARSED_EXPR): New.
6881 (N_CP_TTYPES): Adjust.
6882
d73326ca
MP
68832014-10-15 Marek Polacek <polacek@redhat.com>
6884
6885 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
6886
78a7c317
DD
68872014-10-14 DJ Delorie <dj@redhat.com>
6888
6889 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
6890 types, not just __int128.
6891 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
6892 types, not just __int128.
6893 (cpp_atomic_builtins): Round pointer sizes up.
6894 (type_suffix): Use type precision, not specific types.
6895 * c-common.c (c_common_reswords): Remove __int128 special case.
6896 (c_common_type_for_size): Check for all __intN types, not just
6897 __int128.
6898 (c_common_type_for_mode): Likewise.
6899 (c_common_signed_or_unsigned_type): Likewise.
6900 (c_build_bitfield_integer_type): Likewise.
6901 (c_common_nodes_and_builtins): Likewise.
6902 (keyword_begins_type_specifier): Likewise.
6903 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
6904 __intN variants.
6905
2a22f99c
TS
69062014-10-12 Trevor Saunders <tsaunders@mozilla.com>
6907
6908 * c-common.c: Use hash_table instead of hashtab.
6909
2a8ef767
ESR
69102014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
6911
adfac8df 6912 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
6913 C++11 section.
6914
3c9aabbd
MG
69152014-10-03 Marc Glisse <marc.glisse@inria.fr>
6916
6917 PR c++/54427
6918 PR c++/57198
6919 PR c++/58845
6920 * c-common.c (warn_logical_operator): Punt for vectors.
6921
a15f7cb8
ESR
69222014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
6923
6924 Implement SD-6: SG10 Feature Test Recommendations
6925 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
6926 macros and the __has_header macro.
6927
8d0cf15e
JM
69282014-09-30 Jason Merrill <jason@redhat.com>
6929
dd5d5481
JM
6930 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
6931 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
6932 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
6933
b752325e
JM
6934 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
6935 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
6936
8d0cf15e
JM
6937 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
6938 * c-common.c (c_common_reswords): Remove __is_convertible_to.
6939
083e891e
MP
69402014-09-24 Marek Polacek <polacek@redhat.com>
6941
6942 PR c/61405
6943 PR c/53874
6944 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
6945
7861b648
AK
69462014-09-23 Andi Kleen <ak@linux.intel.com>
6947
6948 * c-common.c (handle_no_reorder_attribute): New function.
6949 (c_common_attribute_table): Add no_reorder attribute.
6950
9a79452d
JM
69512014-09-22 Joseph Myers <joseph@codesourcery.com>
6952
6953 * c-cppbuiltin.c (c_cpp_builtins): Define
6954 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
6955 modes.
6956
dd69f047
JM
69572014-09-18 Joseph Myers <joseph@codesourcery.com>
6958
6959 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
6960 for supported floating-point modes.
6961
737a4826
MLI
69622014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
6963
6964 * c.opt (Wpsabi): Use LangEnabledBy.
6965 * c-opts.c (c_common_handle_option): Do not handle here.
6966
8cc4b7a2
JM
69672014-09-12 Joseph Myers <joseph@codesourcery.com>
6968
6969 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
6970 macros for floating-point modes.
6971
179b5a55
MG
69722014-09-11 Marc Glisse <marc.glisse@inria.fr>
6973
6974 PR target/58757
6975 * c-cppbuiltin.c (builtin_define_float_constants): Correct
6976 __*_DENORM_MIN__ without denormals.
6977
570a11fe
JJ
69782014-09-10 Jakub Jelinek <jakub@redhat.com>
6979
6980 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6981 ubsan_instrument_vla, ubsan_instrument_return): Adjust
6982 ubsan_create_data callers.
6983 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
6984 index is constant or BIT_AND_EXPR with constant mask and is
6985 small enough for the bound.
6986 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
6987 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
6988
b559c810
MLI
69892014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6990
6991 * c.opt: Add CppReason to various flags.
6992 (Wdate-time): Re-sort.
6993 * c-common.c: Include c-common.h earlier.
6994 (struct reason_option_codes_t): Delete.
6995 (c_option_controlling_cpp_error): Prefix global type and struct
6996 with cpp_.
6997
1ef33fd4
MLI
69982014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6999
7000 * c.opt (Wnormalized): New.
7001 (Wnormalized=): Use Enum and Reject Negative.
7002 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
7003
66bb34c0
JM
70042014-09-08 Joseph Myers <joseph@codesourcery.com>
7005
7006 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
7007 digits of floating-point modes if -fbuilding-libgcc.
7008
53d68b9f
JM
70092014-09-05 Joseph Myers <joseph@codesourcery.com>
7010
7011 * c-cppbuiltin.c (c_cpp_builtins): Also define
7012 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
7013 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
7014 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
7015 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
7016 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
7017 __LIBGCC_STACK_GROWS_DOWNWARD__,
7018 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
7019 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
7020 __LIBGCC_DWARF_FRAME_REGISTERS__,
7021 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
7022 __LIBGCC_STACK_POINTER_REGNUM__ and
7023 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
7024 (builtin_define_with_value): Handle backslash-escaping in string
7025 macro values.
7026
f65586dc
RB
70272014-09-05 Richard Biener <rguenther@suse.de>
7028
7029 PR middle-end/63148
7030 * c-format.c (check_format_arg): Properly handle
7031 effectively signed POINTER_PLUS_EXPR offset.
7032
2b71f4a4
MLI
70332014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
7034
7035 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
7036 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
7037 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
7038 and Init.
7039 * c-opts.c (c_common_handle_option): Do not handle here.
7040 (sanitize_cpp_opts): Likewise.
7041 * c-common.c (struct reason_option_codes_t): Handle
7042 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
7043
d2e4feca
MP
70442014-09-03 Marek Polacek <polacek@redhat.com>
7045
7046 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
7047
9a771876
JJ
70482014-09-02 Jakub Jelinek <jakub@redhat.com>
7049 Balaji V. Iyer <balaji.v.iyer@intel.com>
7050 Igor Zamyatin <igor.zamyatin@intel.com>
7051
7052 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
7053 * c-common.c (c_common_reswords): Added _Cilk_for.
7054 * c-common.h (enum rid): Added RID_CILK_FOR.
7055 (cilk_for_number_of_iterations): Add declaration.
7056 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
7057 CILK_FOR.
7058 * c-pragma.c (init_pragma): Register "grainsize" pragma.
7059 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
7060
81b5d104
MLI
70612014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7062
7063 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
7064 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
7065 Wundef): Use CPP, Var and Init.
7066 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
7067
b753b37b
MLI
70682014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7069
7070 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
7071 * c-opts.c (c_common_handle_option): Do not handle here.
7072
028aee17
JM
70732014-08-25 Jason Merrill <jason@redhat.com>
7074
7075 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
7076 -std=c++14 and -std=gnu++14, rather than the reverse.
7077 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
7078 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
7079 * c-common.h (cxx_dialect): Remove cxx1y.
7080
e4276ba5
ESR
70812014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
7082
7083 * c-common.h (enum cxx_dialect): Add cxx14.
7084 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
7085 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
7086 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
7087
a545cacd
JM
70882014-08-22 Jason Merrill <jason@redhat.com>
7089
7090 * c.opt (std=gnu++17): Fix alias.
7091
59ea0364
MP
70922014-08-22 Marek Polacek <polacek@redhat.com>
7093
7094 PR c++/62199
7095 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
7096 check for vector types. Drop LHS argument.
7097 * c-common.h (warn_logical_not_parentheses): Adjust.
7098
596e808c
MLI
70992014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
7100
7101 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
7102 (Wmultichar): Likewise.
7103 (Wdate-time): Use C-family languages instead of Common. Use CPP
7104 and Var.
7105 * c-opts.c (c_common_handle_option): Do not handle the above
7106 options here.
7107 (sanitize_cpp_opts): Likewise.
7108
18767f65
MLI
71092014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
7110
7111 PR fortran/44054
7112 * c-opts.c: Include tree-diagnostics.h.
7113 (c_diagnostic_finalizer): New.
7114 (c_common_initialize_diagnostics): Use it.
7115
b4413594
MLI
71162014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
7117
7118 PR preprocessor/51303
7119 * c-common.c (struct reason_option_codes_t option_codes):
7120 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
7121
43f9a13c
MLI
71222014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
7123
7124 PR c/60975
7125 PR c/53063
7126 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
7127 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
7128 (c_common_post_options): Call init_global_opts_from_cpp.
7129 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
7130
04159acf
MP
71312014-08-19 Marek Polacek <polacek@redhat.com>
7132
7133 PR c++/62153
7134 * c-common.c (maybe_warn_bool_compare): New function.
7135 * c-common.h (maybe_warn_bool_compare): Declare.
7136 * c.opt (Wbool-compare): New option.
7137
35aff4fb
MP
71382014-08-19 Marek Polacek <polacek@redhat.com>
7139
7140 * c.opt (Wc99-c11-compat): New option.
7141
177cce46
MP
71422014-08-19 Marek Polacek <polacek@redhat.com>
7143
7144 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
7145 to warn_c90_c99_compat.
7146 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
7147 to -1.
7148
6ae9194f
MLI
71492014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
7150 Steven Bosscher <steven@gcc.gnu.org>
7151
7152 PR c/52952
7153 * c-format.c: Add extra_arg_loc and format_string_loc to struct
7154 format_check_results.
7155 (check_function_format): Use true and add comment for boolean
7156 argument.
7157 (finish_dollar_format_checking): Use explicit location when warning.
7158 (check_format_info): Likewise.
7159 (check_format_arg): Set extra_arg_loc and format_string_loc.
7160 (check_format_info_main): Use explicit location when warning.
7161 (check_format_types): Pass explicit location.
7162 (format_type_warning): Likewise.
7163
8e54f6d3
MLI
71642014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
7165
7166 PR fortran/44054
7167 * c-format.c: Handle Fortran flags.
7168
cd4e76fc
IZ
71692014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
7170
7171 PR other/61962
7172 * array-notation-common.c (find_rank): Added handling for other
7173 types of references.
7174
f3bede71
MP
71752014-08-10 Marek Polacek <polacek@redhat.com>
7176
7177 PR c/51849
7178 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
7179 * c.opt (Wc90-c99-compat): Add option.
7180
9f25a338
TS
71812014-08-07 Trevor Saunders <tsaunders@mozilla.com>
7182
7183 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
7184
62e4eb35
MP
71852014-08-03 Marek Polacek <polacek@redhat.com>
7186
ab20d992 7187 * c-common.c (check_case_value): Add location_t parameter. Use it.
62e4eb35
MP
7188 (c_add_case_label): Pass loc to check_case_value.
7189
b787e7a2
TS
71902014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7191
7192 * cilk.c: Use hash_map instead of pointer_map.
7193
6e2830c3
TS
71942014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7195
7196 * c-gimplify.c: Use hash_set instead of pointer_set.
7197
a7ee52fb
IZ
71982014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
7199
7200 PR middle-end/61455
7201 * array-notation-common.c (extract_array_notation_exprs): Handling
7202 of DECL_EXPR added.
7203
944fa280
JJ
72042014-08-01 Jakub Jelinek <jakub@redhat.com>
7205
7206 * c-common.h (min_align_of_type): Removed prototype.
7207 * c-common.c (min_align_of_type): Removed.
7208 * c-ubsan.h (ubsan_maybe_instrument_reference,
7209 ubsan_maybe_instrument_member_call): New prototypes.
7210 * c-ubsan.c: Include stor-layout.h and builtins.h.
7211 (ubsan_maybe_instrument_reference_or_call,
7212 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
7213 functions.
7214
b4dfdc11
MG
72152014-07-31 Marc Glisse <marc.glisse@inria.fr>
7216
7217 PR c++/60517
7218 * c.opt (-Wreturn-local-addr): Move to common.opt.
7219
a41844e5
JM
72202014-07-30 Jason Merrill <jason@redhat.com>
7221
7222 PR c++/61659
7223 PR c++/61687
7224 Revert:
7225 * c.opt (-fuse-all-virtuals): New.
7226
976d5a22
TT
72272014-07-30 Tom Tromey <tromey@redhat.com>
7228
7229 PR c/59855
7230 * c.opt (Wdesignated-init): New option.
7231 * c-common.c (c_common_attribute_table): Add "designated_init".
7232 (handle_designated_init): New function.
7233
cdc94aca
MP
72342014-07-24 Marek Polacek <polacek@redhat.com>
7235
7236 PR c/57653
7237 * c-opts.c (c_finish_options): If -imacros is in effect, return.
7238
f41373b6
DS
72392014-07-16 Dodji Seketeli <dodji@redhat.com>
7240
7241 PR preprocessor/60723 - missing system-ness marks for macro tokens
7242 * c-ppoutput.c (struct print::prev_was_system_token): New data
7243 member.
7244 (init_pp_output): Initialize it.
7245 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
7246 (do_line_change): Return a flag saying if a line marker was
7247 emitted or not.
7248 (scan_translation_unit): Detect if the system-ness of the token we
7249 are about to emit is different from the one of the previously
7250 emitted token. If so, emit a line marker. Avoid emitting useless
7251 adjacent line markers. Avoid emitting line markers for tokens
7252 originating from the expansion of built-in macros.
7253 (scan_translation_unit_directives_only): Adjust.
7254
4d661eaa
MP
72552014-07-15 Marek Polacek <polacek@redhat.com>
7256
7257 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
7258 TYPE_MAX_VALUE is NULL.
7259
b108f48f
JJ
72602014-07-14 Jakub Jelinek <jakub@redhat.com>
7261
7262 PR middle-end/61294
7263 * c.opt (Wmemset-transposed-args): New warning.
7264
c0221884
JM
72652014-07-10 Jason Merrill <jason@redhat.com>
7266
7267 PR c++/61659
7268 PR c++/61687
7269 * c.opt (-fuse-all-virtuals): New.
7270
63dfbb95
RB
72712014-07-09 Richard Biener <rguenther@suse.de>
7272
7273 PR c-family/61741
7274 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
7275 using unsigned arithmetic if overflow does not wrap instead of
7276 if overflow is undefined.
7277
773ec47f
MP
72782014-07-06 Marek Polacek <polacek@redhat.com>
7279
7280 PR c/6940
7281 * c.opt (Wsizeof-array-argument): New option.
7282
00a7ba58
JJ
72832014-07-03 Jakub Jelinek <jakub@redhat.com>
7284
b1726d6c 7285 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
7286 comments->count <= 1, as comments->entries might be NULL.
7287
52ec0ea3
MP
72882014-07-01 Marek Polacek <polacek@redhat.com>
7289
7290 * c.opt (Wint-conversion): New option.
7291
d5c3d343
MP
72922014-07-01 Marek Polacek <polacek@redhat.com>
7293
7294 PR c/58286
7295 * c.opt (Wincompatible-pointer-types): New option.
7296
6e7ceb17
PC
72972014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
7298
7299 PR c++/51400
7300 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
7301 Do not discard TYPE_QUALS of type.
7302
da73100b
JM
73032014-06-26 Jason Merrill <jason@redhat.com>
7304
7305 * c-common.h (enum cxx_dialect): Add cxx1z.
7306 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
7307 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
7308
08eedf75
TJ
73092014-06-26 Teresa Johnson <tejohnson@google.com>
7310
7311 * c-common.h (get_dump_info): Declare.
7312 * c-gimplify.c (c_genericize): Use saved dump files.
7313 * c-opts.c (c_common_parse_file): Begin and end dumps
7314 once around parsing invocation.
7315 (get_dump_info): New function.
7316
7b56b2f8
MP
73172014-06-23 Marek Polacek <polacek@redhat.com>
7318 Andrew MacLeod <amacleod@redhat.com>
7319
7320 PR c/61553
7321 * c-common.c (get_atomic_generic_size): Don't segfault if the
7322 type doesn't have a size.
7323
0e37a2f3
MP
73242014-06-20 Marek Polacek <polacek@redhat.com>
7325
7326 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
7327 (ubsan_walk_array_refs_r): New function.
7328 (c_genericize): Instrument array bounds.
7329 * c-ubsan.c: Include "internal-fn.h".
7330 (ubsan_instrument_division): Mark instrumented arrays as having
7331 side effects. Adjust ubsan_type_descriptor call.
7332 (ubsan_instrument_shift): Likewise.
7333 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
7334 (ubsan_instrument_bounds): New function.
7335 (ubsan_array_ref_instrumented_p): New function.
7336 (ubsan_maybe_instrument_array_ref): New function.
7337 * c-ubsan.h (ubsan_instrument_bounds): Declare.
7338 (ubsan_array_ref_instrumented_p): Declare.
7339 (ubsan_maybe_instrument_array_ref): Declare.
7340
73412014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
7342
7343 PR lto/61123
7344 * c.opt (fshort-enums): Add to LTO.
7345 * c.opt (fshort-wchar): Likewise.
7346
5c3d09f7
MP
73472014-06-16 Marek Polacek <polacek@redhat.com>
7348
7349 PR c/60439
7350 * c.opt (Wswitch-bool): Add Var.
7351
9cf32741
JJ
73522014-06-12 Jakub Jelinek <jakub@redhat.com>
7353
7354 PR middle-end/61486
7355 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
7356 #pragma omp target teams or
7357 #pragma omp {,target }teams distribute simd.
7358
62984918
JM
73592014-06-12 Jason Merrill <jason@redhat.com>
7360
7361 * c.opt (Wabi=, fabi-compat-version): New.
7362 * c-opts.c (c_common_handle_option): Handle -Wabi=.
7363 (c_common_post_options): Handle flag_abi_compat_version default.
7364 Disallow -fabi-compat-version=1.
7365 * c-common.h (abi_version_crosses): New.
7366
f961457f
JH
73672014-06-11 Jan Hubicka <hubicka@ucw.cz>
7368
adfac8df 7369 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
7370 section names that are no longer trees.
7371
92d28cbb
JJ
73722014-06-10 Jakub Jelinek <jakub@redhat.com>
7373
7374 PR fortran/60928
7375 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
7376 (omp_pragmas): ... back here.
7377
742938c9
MP
73782014-06-05 Marek Polacek <polacek@redhat.com>
7379
7380 PR c/49706
7381 * c-common.c (warn_logical_not_parentheses): New function.
7382 * c-common.h (warn_logical_not_parentheses): Declare.
7383 * c.opt (Wlogical-not-parentheses): New option.
7384
9d548dfb
MP
73852014-06-04 Marek Polacek <polacek@redhat.com>
7386
7387 PR c/30020
7388 * c-common.c (check_case_bounds): Add location parameter.
7389 Use it.
7390 (c_add_case_label): Pass loc to check_case_bounds.
7391
fedfecef
MP
73922014-06-03 Marek Polacek <polacek@redhat.com>
7393
7394 PR c/60439
7395 * c.opt (Wswitch-bool): New option.
7396
f6a7cffc
TS
73972014-05-22 Thomas Schwinge <thomas@codesourcery.com>
7398
040d18b6
TS
7399 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
7400 Remove prototypes.
7401 (record_types_used_by_current_var_decl): Move prototype to where
7402 it belongs.
7403
f6a7cffc
TS
7404 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
7405 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
7406 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
7407
632f2871
RS
74082014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
7409
7410 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
7411 * c-common.c (c_common_nodes_and_builtins): Don't initialize
7412 void_zero_node.
7413 * c-pretty-print.c (pp_c_void_constant): New function.
7414 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
7415 (c_pretty_printer::expression): Handle VOID_CST.
7416 * cilk.c (extract_free_variables): Likewise.
7417 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
7418 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
7419
766090c2
TS
74202014-05-17 Trevor Saunders <tsaunders@mozilla.com>
7421
7422 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
7423 * c-pragma.c (push_alignment): Adjust.
7424 (handle_pragma_push_options): Likewise.
7425
661a0813
MP
74262014-05-09 Marek Polacek <polacek@redhat.com>
7427
7428 PR c/50459
7429 * c-common.c (check_user_alignment): Return -1 if alignment is error
7430 node.
7431 (handle_aligned_attribute): Don't call default_conversion on
7432 FUNCTION_DECLs.
7433 (handle_vector_size_attribute): Likewise.
7434 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
7435 (handle_sentinel_attribute): Call default_conversion and allow even
7436 integral types as an argument.
7437
2793eeab
MP
74382014-05-08 Marek Polacek <polacek@redhat.com>
7439
7440 PR c/61053
7441 * c-common.c (min_align_of_type): New function factored out from...
7442 (c_sizeof_or_alignof_type): ...here.
7443 * c-common.h (min_align_of_type): Declare.
7444
f827930a
MP
74452014-05-08 Marek Polacek <polacek@redhat.com>
7446
7447 PR c/61077
7448 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
7449 parameter type of main.
7450
ca49b74e
DD
74512014-05-07 DJ Delorie <dj@redhat.com>
7452
7453 * c-cppbuiltin.c (print_bits_of_hex): New.
7454 (builtin_define_type_minmax): Print values using hex so as not to
7455 require a pre-computed list of string values.
7456
1d60af08
KZ
74572014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
7458 Mike Stump <mikestump@comcast.net>
7459 Richard Sandiford <rdsandiford@googlemail.com>
7460
7461 * c-ada-spec.c: Include wide-int.h.
7462 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
7463 (dump_generic_ada_node): Use wide-int interfaces.
7464 * c-common.c: Include wide-int-print.h.
7465 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
7466 (pointer_int_sum): Use wide-int interfaces.
7467 (c_common_nodes_and_builtins): Use make_int_cst.
7468 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
7469 (handle_alloc_size_attribute): Use wide-int interfaces.
7470 (get_nonnull_operand): Likewise.
7471 * c-format.c (get_constant): Use tree_fits_uhwi_p.
7472 * c-lex.c: Include wide-int.h.
7473 (narrowest_unsigned_type): Take a widest_int rather than two
7474 HOST_WIDE_INTs.
7475 (narrowest_signed_type): Likewise.
7476 (interpret_integer): Update accordingly. Use wide-int interfaces.
7477 (lex_charconst): Use wide-int interfaces.
7478 * c-pretty-print.c: Include wide-int.h.
7479 (pp_c_integer_constant): Use wide-int interfaces.
7480 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
7481 INT_CST_LT_UNSIGNED.
7482
b15458be
RB
74832014-05-06 Richard Biener <rguenther@suse.de>
7484
7485 * c-opts.c (c_common_post_options): For -freestanding,
7486 -fno-hosted and -fno-builtin disable pattern recognition
7487 if not enabled explicitely.
7488
6577374e
MP
74892014-05-02 Marek Polacek <polacek@redhat.com>
7490
7491 * c.opt (Wsizeof-pointer-memaccess): Describe option.
7492
d00887e8
MP
74932014-05-01 Marek Polacek <polacek@redhat.com>
7494
7495 PR c/43245
7496 * c.opt (Wdiscarded-qualifiers): Add.
7497
f8ed5150
MP
74982014-04-30 Marek Polacek <polacek@redhat.com>
7499
7500 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
7501 INT_MIN / -1 sanitization only for integer types.
7502
45484dcf
MP
75032014-04-25 Marek Polacek <polacek@redhat.com>
7504
7505 PR c/18079
7506 * c-common.c (handle_noinline_attribute): Warn if the attribute
7507 conflicts with always_inline attribute.
7508 (handle_always_inline_attribute): Warn if the attribute conflicts
7509 with noinline attribute.
7510
38e514c0
MP
75112014-04-25 Marek Polacek <polacek@redhat.com>
7512
7513 PR c/60156
7514 * c-common.c (check_main_parameter_types): Warn about variadic main.
7515
44875f92
MS
75162014-04-24 Mike Stump <mikestump@comcast.net>
7517
7518 * c.opt (Wshadow-ivar): Default to on.
7519
dcaaa5a0
DP
75202014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
7521
7522 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
7523
c07d7c02
MP
75242014-04-23 Marek Polacek <polacek@redhat.com>
7525
7526 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
7527
1c33c9b7
JJ
75282014-04-22 Jakub Jelinek <jakub@redhat.com>
7529
7530 PR sanitizer/60275
7531 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
7532 if flag_sanitize_undefined_trap_on_error.
7533 (ubsan_instrument_division, ubsan_instrument_shift,
7534 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
7535 if !flag_sanitize_recover.
7536
793c625f
MG
75372014-04-22 Marc Glisse <marc.glisse@inria.fr>
7538
7539 PR libstdc++/43622
7540 * c-common.c (registered_builtin_types): Make non-static.
7541 * c-common.h (registered_builtin_types): Declare.
7542
b0f1bf36 75432014-04-14 Richard Biener <rguenther@suse.de>
ab20d992 7544 Marc Glisse <marc.glisse@inria.fr>
b0f1bf36
RB
7545
7546 PR c/60819
7547 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
7548 apply may-alias the scalar pointer type when applicable.
7549
3b07fa4a
IZ
75502014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
7551
7552 PR middle-end/60467
7553 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
7554 as possible argument for Cilk_spawn.
7555
cbbd2b1c
TB
75562014-04-11 Tobias Burnus <burnus@net-b.de>
7557
7558 PR c/60194
7559 * c.opt (Wformat-signedness): Add
7560 * c-format.c(check_format_types): Use it.
7561
6415bd5d
JM
75622014-04-11 Jason Merrill <jason@redhat.com>
7563
7564 PR c++/57926
7565 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
7566 default_conversion for an array argument.
7567
6525783a
MP
75682014-04-08 Marek Polacek <polacek@redhat.com>
7569
7570 PR sanitizer/60745
7571 * c-ubsan.c: Include asan.h.
7572 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
7573
880a467b
NS
75742014-04-03 Nathan Sidwell <nathan@codesourcery.com>
7575
7576 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
7577
7b59ff2d
MP
75782014-04-02 Marek Polacek <polacek@redhat.com>
7579
7580 * c-common.h (c_expand_expr): Remove declaration.
7581
8edbfaa6
JJ
75822014-03-28 Jakub Jelinek <jakub@redhat.com>
7583
7584 PR c++/60689
7585 * c-common.c (add_atomic_size_parameter): When creating new
7586 params vector, push the size argument first.
7587
07d72e1d
JJ
75882014-03-26 Jakub Jelinek <jakub@redhat.com>
7589
7590 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
7591 ubsan_instrument_vla, ubsan_instrument_return): Adjust
7592 ubsan_create_data callers.
7593
b35e0fa0
JJ
75942014-03-22 Jakub Jelinek <jakub@redhat.com>
7595
7596 PR debug/60603
7597 * c-opts.c (c_finish_options): Restore cb_file_change call to
7598 <built-in>.
7599
39a1ebb3
JJ
76002014-03-13 Jakub Jelinek <jakub@redhat.com>
7601
7602 PR middle-end/36282
7603 * c-pragma.c (apply_pragma_weak): Only look at
7604 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
7605 DECL_ASSEMBLER_NAME_SET_P (decl).
7606 (maybe_apply_pending_pragma_weaks): Exit early if
7607 vec_safe_is_empty (pending_weaks) rather than only when
7608 !pending_weaks.
7609 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
7610 set assembler name back to NULL afterwards.
7611
a07f6ed2
JM
76122014-03-11 Jason Merrill <jason@redhat.com>
7613
7614 * c.opt: Add -std=gnu++14.
7615
75b107f5
IB
76162014-03-11 Ian Bolton <ian.bolton@arm.com>
7617
7618 * c-opts.c (c_common_post_options): Don't override
7619 -ffp-contract=fast if unsafe-math-optimizations is on.
7620
f42c637e
PM
76212014-03-08 Paulo Matos <paulo@matos-sorge.com>
7622
22b15758 7623 * c.opt: Enable LTO FE for fshort-double.
f42c637e 7624
70e24808
JM
76252014-03-07 Jason Merrill <jason@redhat.com>
7626
7627 * c.opt: Add -std=c++14.
7628
3af9c5e9
MP
76292014-03-06 Marek Polacek <polacek@redhat.com>
7630
7631 PR c/60197
7632 * cilk.c (contains_cilk_spawn_stmt): New function.
7633 (contains_cilk_spawn_stmt_walker): Likewise.
7634 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
7635 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
7636
b3bdf019
JJ
76372014-03-03 Jakub Jelinek <jakub@redhat.com>
7638
7639 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
7640 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
7641 even when flag_preprocess_only.
7642
ca7e759d
JM
76432014-02-26 Jason Merrill <jason@redhat.com>
7644
7645 PR c++/59231
7646 PR c++/11586
7647 * c-common.c (shorten_compare): Don't check
7648 c_inhibit_evaluation_warnings.
7649
28e41874
JJ
76502014-02-19 Jakub Jelinek <jakub@redhat.com>
7651
cca615af
JJ
7652 PR c/37743
7653 * c-common.c (c_common_nodes_and_builtins): When initializing
7654 c_uint{16,32,64}_type_node, also set corresponding
7655 uint{16,32,64}_type_node to the same value.
7656
28e41874
JJ
7657 PR c++/60267
7658 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
7659 for PRAGMA_IVDEP if flag_preprocess_only.
7660
c2bf53a1
JJ
76612014-02-12 Jakub Jelinek <jakub@redhat.com>
7662
7663 PR c/60101
7664 * c-common.c (merge_tlist): If copy is true, call new_tlist,
7665 if false, add ADD itself, rather than vice versa.
7666 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
7667 copy. For SAVE_EXPR, only call merge_tlist once.
7668
8fcbce72
JJ
76692014-02-08 Jakub Jelinek <jakub@redhat.com>
7670
7671 PR middle-end/60092
7672 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
7673 and tree_to_uhwi.
7674 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
7675 functions.
7676 (c_common_attribute_table): Add alloc_align and assume_aligned
7677 attributes.
7678
0a756a3f
MP
76792014-02-06 Marek Polacek <polacek@redhat.com>
7680
7681 PR c/60087
7682 * c-common.c (warn_for_sign_compare): Call warning_at with location
7683 instead of warning.
7684
7ec4847a
MP
76852014-02-05 Marek Polacek <polacek@redhat.com>
7686
7687 PR c/53123
7688 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
7689 statement.
7690
66f20604
MP
76912014-02-04 Marek Polacek <polacek@redhat.com>
7692
7693 PR c/60036
7694 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
7695 SAVE_EXPR.
7696
5d77fb19
MG
76972014-02-03 Marc Glisse <marc.glisse@inria.fr>
7698
7699 PR c++/53017
7700 PR c++/59211
7701 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
7702 handle_vector_size_attribute, handle_nonnull_attribute): Call
7703 default_conversion on the attribute argument.
7704 (handle_nonnull_attribute): Increment the argument number.
7705
81e5eca8
MP
77062014-01-31 Marek Polacek <polacek@redhat.com>
7707
7708 PR c/59963
7709 * c-common.c (add_atomic_size_parameter): Pass vNULL to
7710 build_function_call_vec.
7711 (resolve_overloaded_builtin): Likewise.
7712 * c-common.h (build_function_call_vec): Adjust declaration.
7713
68fca595
MP
77142014-01-30 Marek Polacek <polacek@redhat.com>
7715
7716 PR c/59940
7717 * c-common.h (unsafe_conversion_p): Adjust declaration.
7718 (warnings_for_convert_and_check): Likewise.
7719 (convert_and_check): Likewise.
7720 * c-common.c (unsafe_conversion_p): Add location parameter. Call
7721 expansion_point_location_if_in_system_header on it.
7722 (warnings_for_convert_and_check): Add location parameter. Call
7723 expansion_point_location_if_in_system_header on it. Use it.
7724 (convert_and_check): Add location parameter. Use it.
7725 (conversion_warning): Likewise.
7726 (c_add_case_label): Adjust convert_and_check calls.
7727 (scalar_to_vector): Adjust unsafe_conversion_p calls.
7728
b72271b9
BI
77292014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
7730
7731 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
7732 flag_cilkplus.
7733 * c-pragma.c (init_pragma): Likewise.
7734 * c.opt: Likewise.
7735
393e8e8b
MP
77362014-01-23 Marek Polacek <polacek@redhat.com>
7737
7738 PR c/59846
7739 * c-common.c (shorten_compare): Add location_t parameter.
7740 * c-common.h (shorten_binary_op): Adjust declaration.
7741
f04dda30
MP
77422014-01-23 Marek Polacek <polacek@redhat.com>
7743
7744 PR c/58346
7745 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
7746 * c-common.h: Declare it.
7747
621955cb
EB
77482014-01-20 Eric Botcazou <ebotcazou@adacore.com>
7749
7750 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
7751 * c-ada-spec.c (dump_ads): Likewise.
7752 (cpp_check): Likewise.
7753 (dump_ada_specs): Likewise.
7754
77552014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
7756
7757 PR c++/49718
7758 * c-common.c (handle_no_instrument_function_attribute): Allow
7759 no_instrument_function attribute in class member
7760 definition/declaration.
7761
241f845a
JJ
77622014-01-15 Jakub Jelinek <jakub@redhat.com>
7763
7764 PR c/58943
7765 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
7766 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
7767 being COMPOUND_EXPR.
7768 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
7769 operand a SAVE_EXPR and second MODIFY_EXPR.
7770
e83b8e2e
JJ
77712014-01-09 Jakub Jelinek <jakub@redhat.com>
7772
7773 PR target/58115
7774 * c-pch.c (c_common_write_pch): Call
7775 prepare_target_option_nodes_for_pch.
7776
23a5b65a
RS
77772014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7778
7779 Update copyright years
7780
f9030485
RS
77812014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7782
7783 * array-notation-common.c, c-cilkplus.c: Use the standard form for
7784 the copyright notice.
7785
f2aa696b
EB
77862013-12-28 Eric Botcazou <ebotcazou@adacore.com>
7787
7788 * c-ada-spec.c (print_constructor): New function.
7789 (print_destructor): Retrieve the origin of the destructor.
7790 (print_ada_declaration): Revamp handling of constructors/destructors.
7791
3f8257db 77922013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
7793 Bill Maddox <maddox@google.com>
7794 Jason Merrill <jason@redhat.com>
7795
7796 * c.opt: Add -fdeclone-ctor-dtor.
7797 * c-opts.c (c_common_post_options): Default to on iff -Os.
7798
41958c28
BI
77992013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
7800
7801 * c-common.c (c_common_attribute_table): Added "cilk simd function"
7802 attribute.
7803 * c-pragma.h (enum pragma_cilk_clause): Remove.
ab20d992 7804 (enum pragma_omp_clause): Added the following fields:
41958c28
BI
7805 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
7806 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
7807 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
7808 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
7809 PRAGMA_CILK_CLAUSE_UNIFORM.
7810
b1726d6c 7811
12893402
BI
78122013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
7813
7814 * cilk.c (cilk_outline): Made this function non-static.
7815 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
7816 (create_cilk_wrapper): Added a new parameter: a function pointer.
7817 (c_install_body_w_frame_cleanup): Remove
7818 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
7819 * c-common.h (cilk_outline): New prototype.
7820 (gimplify_cilk_spawn): Removed two parameters.
7821 (cilk_install_body_with_frame_cleanup): New prototype.
7822 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
7823 CILK_SPAWN_STMT case.
7824
085b42ed
BS
78252013-12-11 Bernd Schmidt <bernds@codesourcery.com>
7826
2ce064c3
BS
7827 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
7828
085b42ed
BS
7829 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
7830 (int_array_type_node): Remove.
7831 * c-common.c (c_common_nodes_and_builtins): Don't build it.
7832
9e36c9ed
MP
78332013-12-05 Marek Polacek <polacek@redhat.com>
7834
7835 PR c/52023
7836 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
7837 [ADJUST_FIELD_ALIGN].
7838
296674db
JM
78392013-12-04 Joseph Myers <joseph@codesourcery.com>
7840
7841 PR c/52023
7842 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
7843 and check field alignment if set.
7844 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
7845 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
7846
b1726d6c 78472013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
7848 Marek Polacek <polacek@redhat.com>
7849
7850 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
7851 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
7852
d7947e19
L
78532013-11-29 H.J. Lu <hongjiu.lu@intel.com>
7854
7855 PR c/59309
7856 * cilk.c (gimplify_cilk_spawn): Properly handle function without
7857 arguments.
7858
fad7652e
JJ
78592013-11-29 Jakub Jelinek <jakub@redhat.com>
7860
7861 PR c/59280
7862 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
7863 goto invalid. If it is error_mark_node, don't issue further
7864 diagnostics.
7865
8b5e1202
SO
78662013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
7867
7868 * c.opt (Wopenmp-simd): New.
7869
0a508bb6
JJ
78702013-11-22 Jakub Jelinek <jakub@redhat.com>
7871
7872 * c-ubsan.h (ubsan_instrument_return): New prototype.
7873 * c-ubsan.c (ubsan_instrument_return): New function.
7874
2fb9a547
AM
78752013-11-22 Andrew MacLeod <amacleod@redhat.com>
7876
7877 * c-common.c: Add required include files from gimple.h.
ab20d992
JJ
7878 * c-gimplify.c: Likewise.
7879 * cilk.c: Likewise.
2fb9a547 7880
8400e75e
DM
78812013-11-22 David Malcolm <dmalcolm@redhat.com>
7882
7883 * c-common.c (unsafe_conversion_p): Remove use of
7884 EXPR_LOC_OR_HERE macro.
7885 (conversion_warning): Likewise.
7886 (warnings_for_convert_and_check): Likewise.
7887 (warn_for_collisions_1): Likewise.
7888 (shorten_compare): Likewise, and remove use of in_system_header
7889 macro, using the location from the former.
7890 * c-lex.c (dump_one_header): Remove use of input_filename macro.
7891 (cb_def_pragma): Remove use of in_system_header macro.
7892 (lex_string): Likewise.
7893 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
7894
eb1ce453
KZ
78952013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
7896 Mike Stump <mikestump@comcast.net>
7897 Richard Sandiford <rdsandiford@googlemail.com>
7898
7899 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
7900 instead of TREE_INT_CST_LOW, in cases where there is a protecting
7901 tree_fits_shwi_p or tree_fits_uhwi_p.
7902 (dump_generic_ada_node): Likewise.
7903 * c-format.c (check_format_arg): Likewise.
7904 * c-pretty-print.c (pp_c_integer_constant): Likewise.
7905
6b3b8c27
KZ
79062013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
7907
7908 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
7909
49b0aa18
JC
79102013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
7911
7912 PR c/53001
7913 * c-common.c (unsafe_conversion_p): Make this function
7914 return an enumeration with more detail.
7915 (conversion_warning): Use the new return type of
7916 unsafe_conversion_p to separately warn either about conversions
7917 that lower floating point number precision or about the other
7918 kinds of conversions.
7919 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
7920 (unsafe_conversion_p): switching return type to
7921 conversion_safety enumeration.
49b0aa18
JC
7922 * c.opt: Adding new warning -Wfloat-conversion and
7923 enabling it with -Wconversion.
7924
b826515a
BS
79252013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
7926
8e745a17
JJ
7927 * c-opts.c: Include plugin.h.
7928 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 7929
b9a55b13
MP
79302013-11-19 Marek Polacek <polacek@redhat.com>
7931
7932 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
7933 call.
7934 (ubsan_instrument_shift): Likewise.
7935 (ubsan_instrument_vla): Likewise.
7936
7d362f6c
RS
79372013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7938
7939 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
7940 cast to unsigned type.
7941
386b1f1f
RS
79422013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7943
7944 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
7945 tree_low_cst.
7946 (complete_array_type): Update comment to refer to tree_to_[su]hwi
7947 rather than tree_low_cst.
7948
ae7e9ddd
RS
79492013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7950
7951 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
7952 tree_to_uhwi throughout.
7953
9439e9a1
RS
79542013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7955
7956 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
7957 tree_low_cst (..., 0) with tree_to_shwi throughout.
7958
cc269bb6
RS
79592013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7960
7961 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
7962 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
7963
9541ffee
RS
79642013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7965
7966 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
7967 host_integerp (..., 0) with tree_fits_shwi_p throughout.
7968
c02065fc
AH
79692013-11-15 Aldy Hernandez <aldyh@redhat.com>
7970
7971 * c-cilkplus.c: New file.
7972 * c-common.c (readonly_error): Add location argument.
7973 * c-common.h (readonly_error): Same.
7974 (c_finish_cilk_clauses): Protoize.
7975 (c_check_cilk_loop): Same.
7976 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
7977 Do not fail on error_mark_node.
7978 Abstract increment canonicalization to here...
7979 (c_omp_for_incr_canonicalize_ptr): New.
7980 c-pragma.c (init_pragma): Register "simd" pragma.
7981 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
7982 (enum pragma_cilk_clause): New.
7983
9cc65f15
RS
79842013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
7985
7986 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
7987 wchar_type and host_integerp checks.
7988
18f429e2
AM
79892013-11-14 Andrew MacLeod <amacleod@redhat.com>
7990
7991 * c-common.c: Likewise.
7992 * c-gimplify.c: Likewise.
7993 * cilk.c: Likewise.
7994
d8a2d370
DN
79952013-11-14 Diego Novillo <dnovillo@google.com>
7996
7997 * c-common.c: Include fold-const.h.
7998 Include stor-layout.h.
7999 Include calls.h.
8000 Include stringpool.h.
8001 Include attribs.h.
8002 Include varasm.h.
8003 Include trans-mem.h.
8004 * c-cppbuiltin.c: Include stor-layout.h.
8005 Include stringpool.h.
8006 * c-format.c: Include stringpool.h.
8007 * c-lex.c: Include stringpool.h.
8008 Include stor-layout.h.
8009 * c-pragma.c: Include stringpool.h.
8010 Include attribs.h.
8011 Include varasm.h.
8012 Include gcc-symtab.h.
8013 * c-pretty-print.c: Include stor-layout.h.
8014 Include attribs.h.
8015 * cilk.c: Include stringpool.h.
8016 Include calls.h.
8017
38b7bc7f
JM
80182013-11-13 Joseph Myers <joseph@codesourcery.com>
8019
8020 * c-common.h (enum rid): Add RID_AUTO_TYPE.
8021 * c-common.c (c_common_reswords): Add __auto_type.
8022 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
8023
45b0be94
AM
80242013-11-12 Andrew MacLeod <amacleod@redhat.com>
8025
18f429e2
AM
8026 * c-common.c: Include gimplify.h.
8027 * c-gimplify.c: Likewise.
8028 * cilk.c: Likewise.
8029 * c-omp.c: Include gimple-expr.h instead of gimple.h.
8030 * c-ubsan.c: Don't include gimple.h.
45b0be94 8031
582d9b50
JM
80322013-11-12 Joseph Myers <joseph@codesourcery.com>
8033
8034 * c-common.c (c_common_reswords): Add _Thread_local.
8035
6b28e197
JM
80362013-11-09 Joseph Myers <joseph@codesourcery.com>
8037
8038 * c-common.c (atomic_size_supported_p): New function.
8039 (resolve_overloaded_atomic_exchange)
8040 (resolve_overloaded_atomic_compare_exchange)
8041 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
8042 Use it instead of comparing size with a local list of sizes.
8043
267bac10
JM
80442013-11-07 Andrew MacLeod <amacleod@redhat.com>
8045 Joseph Myers <joseph@codesourcery.com>
8046
8047 * c-common.h (enum rid): Add RID_ATOMIC.
8048 * c-common.c (c_common_reswords): Add _Atomic.
8049 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
8050 (keyword_is_type_qualifier): Accept RID_ATOMIC.
8051 * c-format.c (check_format_types): Check for extra _Atomic
8052 qualifiers in format argument.
8053 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
8054 (pp_c_type_qualifier_list): Mention _Atomic in comment.
8055
5157b91e
TB
80562013-11-06 Tobias Burnus <burnus@net-b.de>
8057
8058 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
8059
6dbe0958
JM
80602013-11-06 Joseph Myers <joseph@codesourcery.com>
8061
8062 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
8063 standards modes.
8064 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
8065 to mean lack of IEEE 754 support.
8066
e8ff5196
TB
80672013-11-05 Tobias Burnus <burnus@net-b.de>
8068
8069 * c.opt (-Wdate-time): New option
8070 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
8071
254a0760
JM
80722013-11-05 Joseph Myers <joseph@codesourcery.com>
8073
8074 * c-cppbuiltin.c (cpp_iec_559_value): Test
8075 flag_excess_precision_cmdline not flag_excess_precision.
8076
6d7f7e0a
TB
80772013-11-05 Tobias Burnus <burnus@net-b.de>
8078
8079 * c.opt (fopenmp-simd): New option.
8080 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
8081 (omp_pragmas): ... this new struct.
8082 (c_pp_lookup_pragma): Also walk omp_pragmas.
8083 (init_pragma): Init pragmas for -fopenmp-simd.
8084
55a7f02f
MP
80852013-11-04 Marek Polacek <polacek@redhat.com>
8086
8087 PR c++/58979
8088 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
8089
9193fb05
JM
80902013-11-04 Joseph Myers <joseph@codesourcery.com>
8091
8092 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
8093 New functions.
8094 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
8095
94159ecf
EB
80962013-11-04 Eric Botcazou <ebotcazou@adacore.com>
8097
8098 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
8099 (dump_ada_specs): Adjust prototype of second callback.
8100 * c-ada-spec.c (cpp_check): New global variable.
8101 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
8102 (print_generic_ada_decl): Likewise.
8103 (has_static_fields): Change return type to bool and add guard.
8104 (has_nontrivial_methods): New predicate.
8105 (is_tagged_type): Change return type to bool.
8106 (separate_class_package): Call has_nontrivial_methods.
8107 (pp_ada_tree_identifier): Minor tweaks.
8108 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
8109 (dump_ada_array_domains): Likewise.
8110 (dump_ada_array_type): Likewise.
8111 (dump_template_types): Remove cpp_check parameter and do not pass it to
8112 dump_generic_ada_node.
8113 (dump_ada_template): Likewise.
8114 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
8115 recursively.
8116 (print_ada_methods): Change return type to integer. Remove cpp_check
8117 parameter and do not pass it down.
8118 (dump_nested_types): Remove cpp_check parameter and do not pass it to
8119 dump_generic_ada_node.
8120 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
8121 accessing methods.
8122 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
8123 down. Use has_nontrivial_methods to recognize C++ classes. Use return
8124 value of print_ada_methods.
8125 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
8126 Set cpp_check to it before invoking dump_ada_nodes.
8127 (dump_ada_specs): Likewise.
8128
b906f4ca
MP
81292013-11-03 Marek Polacek <polacek@redhat.com>
8130
8131 * c-ubsan.c: Don't include hash-table.h.
8132 (ubsan_instrument_vla): New function.
8133 * c-ubsan.h: Declare it.
8134
5e20cdc9
DM
81352013-10-31 David Malcolm <dmalcolm@redhat.com>
8136
8137 Automated part of renaming of symtab_node_base to symtab_node.
8138
8139 Patch autogenerated by rename_symtab.py from
8140 https://github.com/davidmalcolm/gcc-refactoring-scripts
8141 revision 58bb219cc090b2f4516a9297d868c245495ee622
8142
8143 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
8144 symtab_node_base to symtab_node.
8145
7057e645
ESR
81462013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
8147
8e745a17 8148 Implement C++14 digit separators.
7057e645
ESR
8149 * c-lex.c (interpret_float): Remove digit separators from scratch string
8150 before building real literal.
8151
193ea7bc
JJ
81522013-10-30 Jakub Jelinek <jakub@redhat.com>
8153
8154 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
8155
939b37da
BI
81562013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
8157
8158 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
8159 fields.
8160 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
8161 enabled.
8162 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
8163 (insert_cilk_frame): New prototype.
8164 (cilk_init_builtins): Likewise.
8165 (gimplify_cilk_spawn): Likewise.
8166 (c_cilk_install_body_w_frame_cleanup): Likewise.
8167 (cilk_detect_spawn_and_unwrap): Likewise.
8168 (cilk_set_spawn_marker): Likewise.
8169 (build_cilk_sync): Likewise.
8170 (build_cilk_spawn): Likewise.
8171 * cilk.c: New file.
8172
67348ccc
DM
81732013-10-29 David Malcolm <dmalcolm@redhat.com>
8174
8175 Patch autogenerated by refactor_symtab.py from
8176 https://github.com/davidmalcolm/gcc-refactoring-scripts
8177 revision 58bb219cc090b2f4516a9297d868c245495ee622
8178
8179 * c-gimplify.c (c_genericize): Update for conversion of symtab types
8180 to a true class hierarchy.
8181 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
8182
d570872d
RS
81832013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
8184
8185 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
8186
98906124
JL
81872013-10-26 Jeff Law <law@redhat.com>
8188
adfac8df
JJ
8189 * c-common.c (c_define_builtins): Remove mudflap support.
8190 * c.opt: Ignore and warn for mudflap options.
98906124 8191
d73749df 81922013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
8193
8194 PR other/33426
8195 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
8196 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
8197
3f04b1bb
JM
81982013-10-23 Jason Merrill <jason@redhat.com>
8199
8200 * c-format.c (gcc_cxxdiag_char_table): Add %X.
8201
acf0174b
JJ
82022013-10-11 Jakub Jelinek <jakub@redhat.com>
8203
acd15a28
JJ
8204 * c-common.h (omp_clause_mask::operator !=): New method.
8205 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
8206 instead of if (mask & something) tests everywhere.
8207
acf0174b
JJ
8208 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
8209 201307 instead of 201107.
8210 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
8211 (c_common_attribute_table): Add "omp declare target" and
8212 "omp declare simd" attributes.
8213 (handle_omp_declare_target_attribute,
8214 handle_omp_declare_simd_attribute): New functions.
8215 * c-omp.c: Include c-pragma.h.
8216 (c_finish_omp_taskgroup): New function.
8217 (c_finish_omp_atomic): Add swapped argument, if true,
8218 build the operation first with rhs, lhs arguments and use NOP_EXPR
8219 build_modify_expr.
8220 (c_finish_omp_for): Add code argument, pass it down to make_code.
8221 (c_omp_split_clauses): New function.
8222 (c_split_parallel_clauses): Removed.
8223 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
8224 c_omp_declare_simd_clauses_to_decls): New functions.
8225 * c-common.h (omp_clause_mask): New type.
8226 (OMP_CLAUSE_MASK_1): Define.
8227 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
8228 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
8229 omp_clause_mask::operator |, omp_clause_mask::operator &,
8230 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
8231 omp_clause_mask::operator ==): New methods.
8232 (enum c_omp_clause_split): New.
8233 (c_finish_omp_taskgroup): New prototype.
8234 (c_finish_omp_atomic): Add swapped argument.
8235 (c_finish_omp_for): Add code argument.
8236 (c_omp_split_clauses): New prototype.
8237 (c_split_parallel_clauses): Removed.
8238 (c_omp_declare_simd_clauses_to_numbers,
8239 c_omp_declare_simd_clauses_to_decls): New prototypes.
8240 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
8241 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
8242 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
8243 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
8244 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
8245 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
8246 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
8247 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
8248 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
8249 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
8250 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
8251 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
8252 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
8253 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
8254 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
8255 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
8256 PRAGMA_OMP_CLAUSE_UNIFORM.
8257
826cacfe
MG
82582013-10-09 Marc Glisse <marc.glisse@inria.fr>
8259
8260 PR tree-optimization/20318
8261 * c-common.c (handle_returns_nonnull_attribute): New function.
8262 (c_common_attribute_table): Add returns_nonnull.
8263
2284b034
MG
82642013-10-03 Marc Glisse <marc.glisse@inria.fr>
8265
8266 PR c++/19476
8267 * c.opt (fcheck-new): Move to common.opt.
8268
b56e9788
MP
82692013-09-25 Marek Polacek <polacek@redhat.com>
8270 Jakub Jelinek <jakub@redhat.com>
8271
8272 PR sanitizer/58413
8273 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
8274 an expression if we can prove it is correct.
8275 (ubsan_instrument_division): Likewise. Remove unnecessary
8276 check.
8277
ce6923c5
MP
82782013-09-18 Marek Polacek <polacek@redhat.com>
8279
8280 PR sanitizer/58411
8281 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
8282 Declare it.
8283 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
8284
fb5610fb
IS
82852013-09-14 Iain Sandoe <iain@codesourcery.com>
8286
8287 PR target/48094
8288 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
8289 fobjc-gc, freplace-objc-classes): Accept for LTO.
8290
88b0e79e
JC
82912013-09-13 Jacek Caban <jacek@codeweavers.com>
8292
8293 * c-target.def: New hook
8294
c9b0866a
PC
82952013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
8296
8297 PR c++/43452
8298 * c.opt (Wdelete-incomplete): Add.
8299
0af94e6f
JR
83002013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
8301
8302 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
8303 (vector_types_compatible_elements_p): New function.
8304 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
8305 declaration.
8306 (vector_types_compatible_elements_p): Declare.
8307
7c26172c
GDR
83082013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8309
8310 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
8311 a virtual member function.
8312 (pp_simple_type_specifier): Remove.
8313 (pp_c_type_specifier): Likewise.
8314 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
8315 Rename from pp_c_type_specifier. Adjust.
8316 (c_pretty_printer::c_pretty_printer): Do not assign to
8317 simple_type_specifier.
8318
20059c8b
GDR
83192013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8320
8321 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
8322 member function.
8323 (c_pretty_printer::storage_class_specifier): Likewise.
8324 (c_pretty_printer::initializer): Likewise.
8325 (pp_declaration): Remove.
8326 (pp_declaration_specifiers): Likewise.
8327 (pp_abstract_declarator): Likewise.
8328 (pp_declarator): Likewise.
8329 (pp_type_id): Likewise.
8330 (pp_statement): Likewise.
8331 (pp_constant): Likewise.
8332 (pp_id_expression): Likewise.
8333 (pp_primary_expression): Likewise.
8334 (pp_unary_expression): Likewise.
8335 (pp_multiplicative_expression): Likewise.
8336 (pp_conditional_expression): Likewise.
8337 (pp_assignment_expression): Likewise.
8338 (pp_expression): Likewise.
8339 (pp_c_type_id): Likewise.
8340 (pp_c_storage_class_specifier): Likewise.
8341 * c-pretty-print.c (pp_c_type_cast): Tidy.
8342 (pp_c_pointer): Likewise.
8343 (pp_c_type_specifier): Likewise.
8344 (pp_c_parameter_type_list): Likewise.
8345 (pp_c_function_definition): Likewise.
8346 (pp_c_init_declarator): Likewise.
8347 (pp_c_initializer_list): Likewise.
8348 (pp_c_constructor_elts): Likewise.
8349 (c_pretty_printer::direct_abstract_declarator): Likewise.
8350 (c_pretty_printer::declaration_specifiers): Likewise.
8351 (c_pretty_printer::primary_expression): Likewise.
8352 (c_pretty_printer::postfix_expression): Likewise.
8353 (c_pretty_printer::type_id): Rename from pp_c_type_id.
8354 (c_pretty_printer::storage_class_specifier): Rename from
8355 pp_c_storage_class_specifier.
8356 (c_pretty_printer::initializer): Rename from pp_c_initializer.
8357 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
8358 storage_class_specifier, initializer, offset_list, flags.
8359
de5a5fa1
MP
83602013-08-30 Marek Polacek <polacek@redhat.com>
8361
8362 * c-ubsan.c: New file.
8363 * c-ubsan.h: New file.
8364
8f0e4d72
GDR
83652013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
8366
8367 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
8368 member function.
8369 (c_pretty_printer::declaration_specifiers): Likewise.
8370 (c_pretty_printer::declarator): Likewise.
8371 (c_pretty_printer::abstract_declarator): Likewise.
8372 (c_pretty_printer::direct_abstract_declarator): Likewise.
8373 (c_pretty_printer::direct_declarator): Likewise.
8374 (c_pretty_printer::function_specifier): Likewise.
8375 (pp_declaration): Adjust.
8376 (pp_declaration_specifiers): Likewise.
8377 (pp_abstract_declarator): Likewise.
8378 (pp_direct_declarator): Likewise.
8379 (pp_function_specifier): Likewise.
8380 (pp_direct_abstract_declarator): Remove as unused.
8381 (pp_c_declaration): Remove.
8382 (pp_c_declaration_specifiers): Likewise.
8383 (pp_c_declarator): Likewise.
8384 (pp_c_direct_declarator): Likewise.
8385 (pp_c_function_specifier): Likewise.
8386 (pp_c_direct_abstract_declarator): Likewise.
8387 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
8388 from pp_c_abstract_declarator. Adjust.
ab20d992 8389 (c_pretty_printer::direct_abstract_declarator): Rename from
8f0e4d72
GDR
8390 pp_c_direct_abstract_declarator. Adjust.
8391 (c_pretty_printer::function_specifier): Rename from
8392 pp_c_function_specifier. Adjust.
8393 (c_pretty_printer::declaration_specifiers): Rename from
8394 pp_c_declaration_specifiers. Adjust.
8395 (c_pretty_printer::direct_declarator): Rename from
8396 pp_c_direct_declarator. Adjust.
8397 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
8398 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
8399 (c_pretty_printer::c_pretty_printer): Do not assign to
8400 declaration, declaration_specifiers, declarator,
8401 direct_declarator, direct_abstract_declarator, function_specifier.
8402
00d34d3a
GDR
84032013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
8404
8405 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
8406 virtual member function.
8407 (c_pretty_printer::multiplicative_expression): Likewise.
8408 (c_pretty_printer::conditional_expression): Likewise.
8409 (c_pretty_printer::assignment_expression): Likewise.
8410 (c_pretty_printer::expression): Likewise.
8411 (pp_unary_expression): Adjust.
8412 (pp_multiplicative_expression): Likewise.
8413 (pp_assignment_expression): Likewise.
8414 (pp_conditional_expression): Likewise.
8415 (pp_expression): Likewise.
8416 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
8417 from pp_c_unary_expression. Adjust.
8418 (c_pretty_printer::multiplicative_expression): Rename from
8419 pp_c_multiplicative_expression. Adjust.
8420 (c_pretty_printer::conditional_expression): Rename from
8421 pp_c_conditional_expression. Adjust.
8422 (c_pretty_printer::assignment_expression): Rename from
8423 pp_c_assignment_expression. Adjust.
8424 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
8425 (c_pretty_printer::c_pretty_printer): Do not assign to
8426 unary_expression, multiplicative_expression,
8427 conditional_expression, expression.
8428
fb22178f
GDR
84292013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8430
8431 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
8432 virtual member function.
8433 (pp_postfix_expression): Adjust.
8434 (pp_c_postfix_expression): Remove.
8435 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
8436 from pp_c_postfix_expression. Adjust.
8437 (c_pretty_printer::c_pretty_printer): Do not assign to
8438 postfix_expression.
8439
7ecc2600
GDR
84402013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8441
8442 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
8443 virtua member function.
8444 (pp_primary_expression): Adjust.
8445 (pp_c_primary_expression): Remove.
8446 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
8447 from pp_c_primary_expression. Adjust.
8448 (pp_c_initializer_list): Use pp_primary_expression.
8449 (c_pretty_printer::c_pretty_printer): Do not assign to
8450 primary_expression.
8451
0691175f
GDR
84522013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8453
8454 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
8455 * c-pretty-print.c (M_): Remove.
8456 (c_pretty_printer::translate_string): Define.
8457 (pp_c_type_specifier): Use it.
8458 (pp_c_primary_expression): Likewise.
8459 (pp_c_expression): Likewise.
8460
66dfe4c4
GDR
84612013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
8462
8463 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
8464 virtual function.
8465 (pp_c_id_expression): Remove.
8466 (pp_id_expression): Adjust.
8467 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
8468 pp_c_id_expression. Adjust.
8469 (pp_c_postfix_expression): Use pp_id_expression.
8470 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
8471
ca43e9d5
GDR
84722013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
8473
8474 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
8475 member function.
8476 (pp_constant): Adjust.
8477 (pp_c_constant): Remove.
8478 * c-pretty-print.c (c_pretty_printer::constant): Rename from
8479 pp_c_constant. Adjust.
8480 (pp_c_constant)
8481 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
8482 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
8483
da6ca2b5
GDR
84842013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8485
8486 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
8487 (c_pretty_printer::c_pretty_printer): Declare.
8488 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
8489 c_pretty_printer_init. Adjust.
8490 (print_c_tree): Do not call c_pretty_printer_init.
8491 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
8492
65a372f4
AC
84932013-08-09 Arnaud Charlet <charlet@adacore.com>
8494
8495 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
8496
fd9b0f32
PC
84972013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
8498
8499 PR c++/58080
8500 * c-common.c (pointer_int_sum): Add bool parameter.
8501 * c-common.h (pointer_int_sum): Adjust declaration.
8502
e0aec1e9
GDR
85032013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
8504
8505 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
8506 c_pretty_printer variable.
8507
b066401f
GDR
85082013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8509
8510 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
8511 (pp_base): Remove.
8512 (pp_c_base): Likewise. Adjust users.
8513 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
8514 (pp_c_whitespace): Do not call pp_base.
8515 (pp_c_left_paren): Likewise.
8516 (pp_c_right_paren): Likewise.
8517 (pp_c_left_brace): Likewise.
8518 (pp_c_right_brace): Likewise.
8519 (pp_c_left_bracket): Likewise.
8520 (pp_c_right_bracket): Likewise.
8521 (pp_c_dot): Likewise.
8522 (pp_c_ampersand): Likewise.
8523 (pp_c_star): Likewise.
8524 (pp_c_arrow): Likewise.
8525 (pp_c_semicolon): Likewise.
8526 (pp_c_complement): Likewise.
8527 (pp_c_exclamation): Likewise.
8528 (pp_c_direct_declarator): Likewise.
8529 (pp_c_ws_string): Likewise.
8530 (pp_c_identifier): Likewise.
8531 (pp_c_statement): Likewise.
8532 (print_c_tree): Likewise.
8533
65e5a578
ESR
85342013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
8535
8536 PR c++/58072
8537 * c-common.c (c_parse_error): Catch user-defined literal tokens and
8538 provide useful error strings.
8539
137a1a27
GDR
85402013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8541
8542 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
8543 printer functions instead of pp_string or operators and punctuators.
8544 (dump_generic_ada_node): Likewise.
8545 * c-pretty-print.c (pp_c_type_specifier): Likewise.
8546 (pp_c_relational_expression): Likewise.
8547 (pp_c_logical_or_expression): Likewise.
8548
07838b13
GDR
85492013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8550
8551 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
8552 functions instead of pp_character.
8553 (pp_ada_tree_identifier): Likewise.
8554 (dump_ada_double_name): Likewise.
8555 (dump_ada_function_declaration): Likewise.
8556 (dump_ada_array_domains): Likewise.
8557 (dump_template_types): Likewise.
8558 (dump_generic_ada_node): Likewise.
8559 (print_ada_declaration): Likewise.
8560 (print_ada_struct_decl): Likewise.
8561 * c-pretty-print.c (pp_c_integer_constant): Likewise.
8562
433cc7b0
TT
85632013-07-23 Tom Tromey <tromey@redhat.com>
8564
8565 * c-common.h (enum rid) <RID_GENERIC>: New constant.
8566 * c-common.c (c_common_reswords): Add _Generic.
8567
688010ba
OB
85682013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
8569
8570 * c-common.c: Fix typos.
8571 * c-common.h: Likewise.
8572
2a99e5e6
LL
85732013-07-13 Lubos Lunak <l.lunak@suse.cz>
8574
8575 PR c++/55203
8576 * c-common.c (c_common_attribute_table): Add warn_unused.
8577 (handle_warn_unused_attribute): New.
8578
c26302d5
JJ
85792013-07-10 Jakub Jelinek <jakub@redhat.com>
8580
8581 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
8582 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
8583
dfeadaa0
PC
85842013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
8585
8586 PR c++/57869
8587 * c.opt: Add Wconditionally-supported.
8588
6a2fa4b2
GS
85892013-07-08 Graham Stott <graham.stott@btinternet.com>
8590
adfac8df 8591 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
8592 unused variables l_length and l_node.
8593
ecdbd01a 85942013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
8595
8596 PR c/57821
8597 * c-common.c (complete_array_type): Delay folding first index
8598 like other indices. When folding, check for index overflow.
8599
bedc293e
MG
86002013-06-27 Marc Glisse <marc.glisse@inria.fr>
8601
8602 PR c++/57509
8603 * c-common.h (c_build_vec_perm_expr): New complain argument.
8604 * c-common.c (c_build_vec_perm_expr): Likewise.
8605 Use save_expr also in C++.
8606
604b2bfc
GDR
86072013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8608
8609 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
8610 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
8611 * c-opts.c (c_common_post_options): Likewise.
8612
dfeadaa0 86132013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
8614
8615 * array-notation-common.c (length_mismatch_in_expr): Changed the
8616 parameter type's from a dynamic array to a vec_tree. Also removed
8617 the size parameters.
8618 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
8619 the change above.
8620
2ce86d2e
BI
86212013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
8622
8623 * c-common.h (struct cilkplus_an_parts): New structure.
8624 (struct cilkplus_an_loop_parts): Likewise.
8625 (cilkplus_extract_an_triplets): New prototype.
8626 (fix_sec_implicit_args): Likewise.
8627 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
8628 (fix_sec_implicit_args): Likewise.
604b2bfc 8629
07a6825b
BI
86302013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
8631
8632 * array-notation-common.c (find_inv_trees): Removed an unwanted
8633 typecasting.
8634 * c-common.h (struct inv_list::additional_tcodes): Changed type from
8635 enum rid to enum tree_code.
8636
08346abd
JH
86372013-06-11 Jan Hubicka <jh@suse.cz>
8638
8639 * c-common.c (handle_alias_ifunc_attribute): Do not set
8640 DECL_EXTERNAL for weakref variables.
8641 * c-pragma.c (handle_pragma_weak): Make sure aliases
8642 are not declared as external.
8643
d60f1706
BI
86442013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8645
8646 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
8647 function from c/c-array-notation.c.
8648 (is_cilkplus_reduce_builtin): Likewise.
8649 (find_rank): Likewise.
8650 (extract_array_notation_exprs): Likewise.
8651 (replace_array_notations): Likewise.
8652 (find_inv_trees): Likewise.
8653 (replace_inv_trees): Likewise.
8654 (contains_array_notation_expr): Likewise.
8655 (find_correct_array_notation_type): Likewise.
8656 * c-common.h (struct inv_list): Moved this struct from the file
8657 c/c-array-notation.c and added a new field called additional tcodes.
8658 (length_mismatch_in_expr_p): New prototype.
8659 (is_cilkplus_reduce_builtin): Likewise.
8660 (find_rank): Likewise.
8661 (extract_array_notation_exprs): Likewise.
8662 (replace_array_notation): Likewise.
8663 (find_inv_trees): Likewise.
8664 (replace_inv_trees): Likewise.
8665 (find_correct_array_notation_type): Likewise.
dfeadaa0 8666
36536d79
BI
86672013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8668
8669 * c-common.c (c_define_builtins): When cilkplus is enabled, the
8670 function array_notation_init_builtins is called.
8671 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
8672 * c-common.def (ARRAY_NOTATION_REF): New tree.
8673 * c-common.h (build_array_notation_expr): New function declaration.
8674 (build_array_notation_ref): Likewise.
8675 (extract_sec_implicit_index_arg): New extern declaration.
8676 (is_sec_implicit_index_fn): Likewise.
8677 (ARRAY_NOTATION_CHECK): New define.
8678 (ARRAY_NOTATION_ARRAY): Likewise.
8679 (ARRAY_NOTATION_START): Likewise.
8680 (ARRAY_NOTATION_LENGTH): Likewise.
8681 (ARRAY_NOTATION_STRIDE): Likewise.
8682 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
8683 ARRAY_NOTATION_REF.
8684 (pp_c_expression): Likewise.
8685 * c.opt (flag_enable_cilkplus): New flag.
8686 * array-notation-common.c: New file.
8687
f7716d57
JJ
86882013-05-14 Jakub Jelinek <jakub@redhat.com>
8689
8690 PR c++/57274
8691 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
8692
a5e0cd1d
MG
86932013-05-10 Marc Glisse <marc.glisse@inria.fr>
8694
8695 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
8696 vectors.
8697
f6bc1c4a
HS
86982013-05-07 Han Shen <shenhan@google.com>
8699
8700 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
8701
3f12f6e9
SKS
87022013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
8703
8704 * c-common.c (check_user_alignment): Emit error for negative values.
8705
61949153
PC
87062013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8707
8708 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
8709
e93e18e9
PC
87102013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8711
8712 * c-cppbuiltin.c (c_cpp_builtins): Do not define
8713 __GXX_EXPERIMENTAL_CXX1Y__.
8714
44d90fe1 87152013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 8716 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
8717
8718 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
8719 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
8720 to simply use OPT_Wpointer_arith.
8721 (c_sizeof_or_alignof_type): Likewise.
8722
13f39b2e
PC
87232013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8724
8725 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
8726
4b84d650
JJ
87272013-04-12 Jakub Jelinek <jakub@redhat.com>
8728
8729 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
8730 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
8731 specifiers.
8732
fb037b5d
SB
87332013-04-07 Steven Bosscher <steven@gcc.gnu.org>
8734
8735 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
8736
4e856798
PC
87372013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
8738
8739 * c-common.c (pointer_int_sum): Remove dead code.
8740
4b1baac8
RS
87412013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
8742
8743 PR middle-end/56524
8744 * c-common.c (handle_optimize_attribute): Don't call
8745 save_optabs_if_changed.
8746
0b50e654
JJ
87472013-03-05 Jakub Jelinek <jakub@redhat.com>
8748
8749 PR middle-end/56461
8750 * c-pch.c (pch_init): Free target_validity at the end.
8751
48c41403
JJ
87522013-03-04 Jakub Jelinek <jakub@redhat.com>
8753
8754 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
8755
e664c61c
KS
87562013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
8757 Jakub Jelinek <jakub@redhat.com>
8758
8759 PR sanitizer/56454
8760 * c-common.c (handle_no_sanitize_address_attribute): New function.
8761 (c_common_attribute_table): Add no_sanitize_address attribute.
8762 (handle_no_address_safety_analysis_attribute): Add
8763 no_sanitize_address attribute, not no_address_safety_analysis
8764 attribute.
8765
a475fd3d 87662013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
8767
8768 PR target/52555
8769 * c-common.c (handle_optimize_attribute): Call
8770 save_optabs_if_changed.
8771
f6007d99
JJ
87722013-02-18 Jakub Jelinek <jakub@redhat.com>
8773 Steven Bosscher <steven@gcc.gnu.org>
8774
8775 PR pch/54117
8776 * c-opts.c (c_common_post_options): If debug info is enabled
8777 and non-dwarf*, refuse to load PCH files and when writing PCH
8778 file warn.
8779
cf35e2b1
JJ
87802013-02-05 Jakub Jelinek <jakub@redhat.com>
8781
8782 PR middle-end/56167
8783 * c-common.c (handle_error_attribute): Fix condition.
8784
32887460
JJ
87852013-01-30 Jakub Jelinek <jakub@redhat.com>
8786
8787 PR c++/55742
8788 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
8789
5af057d8
JM
87902013-01-18 Jason Merrill <jason@redhat.com>
8791
8792 PR target/54908
8793 * c.opt (-fextern-tls-init): New.
8794 * c-opts.c (c_common_post_options): Handle it.
8795
cc83c823
JJ
87962013-01-09 Jakub Jelinek <jakub@redhat.com>
8797
8798 PR c/48418
8799 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
8800 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
8801 and is either negative or bigger or equal to type precision
8802 of the first operand.
8803
a859517f
MP
88042012-12-03 Marek Polacek <polacek@redhat.com>
8805
8806 PR c/55570
8807 * c-common.c (check_user_alignment): Swap order of tests,
8808 check TREE_CODE first.
8809
2d7aa578
ESR
88102012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
8811
8812 PR c++/52654
8813 * c-common.h (overflow_type): New enum.
8814 (build_userdef_literal): Add overflow_type argument.
8815 (tree_userdef_literal): Add overflow_type.
8816 (USERDEF_LITERAL_OVERFLOW): New access macro.
8817 * c-common.c (build_userdef_literal): Add overflow_type
8818 argument.
8819 * c-lex.c (c_lex_with_flags): Add overflow_type to
8820 build_userdef_literal calls.
8821 (interpret_integer, interpret_float): Add overflow_type argument.
8822
cc3c4f62
RB
88232012-11-28 Richard Biener <rguenther@suse.de>
8824
8825 PR c/35634
8826 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
8827 here and use a type with proper overflow behavior for types that would
8828 need to be promoted for the arithmetic.
8829
77bc5132
JJ
88302012-11-23 Jakub Jelinek <jakub@redhat.com>
8831
8832 PR sanitizer/55435
8833 * c-common.c (handle_no_address_safety_analysis_attribute): New
8834 function.
8835 (c_common_attribute_table): Add no_address_safety_analysis.
8836
5dc99c46
SB
88372012-11-16 Simon Baldwin <simonb@google.com>
8838
8839 * c.opt: Add f[no-]canonical-system-headers.
8840 * c-opts.c (c_common_handle_option): Handle
8841 OPT_fcanonical_system_headers.
8842
a4a0016d
ESR
88432012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
8844
8845 PR c++/54413
8846 * c-opts.c (c_common_handle_option): Set new flags.
8847 * c.opt: Describe new flags.
8848
7dbb85a7
JM
88492012-11-09 Jason Merrill <jason@redhat.com>
8850
8851 * c.opt (Wabi-tag): New.
8852
ad7bac31
AK
88532012-11-09 Andi Kleen <ak@linux.intel.com>
8854
8855 PR 55139
8856 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 8857 MEMMODEL_MASK
ad7bac31 8858
7332899a
MLI
88592012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8860
8861 PR c/53063
8862 * c.opt (Wformat): Make it Alias Wformat=1.
8863 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
8864 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
8865 LangEnabledBy.
8866 (Wformat=): RejectNegative. Use LangEnabledBy.
8867 (Wnonnull): Use LangEnabledBy.
8868 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
8869 * c-format.c (set_Wformat): Delete.
8870 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
ab20d992
JJ
8871 (maybe_read_dollar_number): Likewise.
8872 (avoid_dollar_number): Likewise.
8873 (finish_dollar_format_checking): Likewise.
8874 (check_format_info): Likewise.
8875 (check_format_info_main): Likewise.
8876 (check_format_types): Likewise.
8877 (format_type_warning): Likewise.
8878 * c-common.c (int): Likewise.
8879 (check_function_sentinel): Likewise.
8e745a17 8880 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 8881
34a180a6
MLI
88822012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8883
8884 PR c/53063
8885 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
8886 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
8887 Use LangEnabledBy.
8888 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
8889 common.opt.
8890 (Wvariadic-macros): Init(1).
8891 * c-opts.c (c_common_handle_option): Do not handle them
8892 explicitly.
8893 (c_common_post_options): Likewise.
8894 (sanitize_cpp_opts): warn_unused_macros is now
8895 cpp_warn_unused_macros.
8896 (push_command_line_include): Likewise.
8897 * c-common.c (warn_unknown_pragmas): Do not define.
8898 * c-common.h (warn_unknown_pragmas): Do not declare.
8899
3f46d6a5
MLI
89002012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8901
8902 PR c/51294
8903 * c-common.c (conversion_warning): Handle conditional expressions.
8904
880661a4
JW
89052012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
8906
8907 PR c++/54930
8908 * c.opt (Wreturn_local_addr): Define new option.
8909
4514a96b
JM
89102012-10-25 Jason Merrill <jason@redhat.com>
8911
f14edc1a
JM
8912 * c.opt (Wvirtual-move-assign): New.
8913
4514a96b
JM
8914 * c.opt (Winherited-variadic-ctor): New.
8915
93100c6b
MG
89162012-10-25 Marc Glisse <marc.glisse@inria.fr>
8917
8918 PR c++/54427
8919 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
8920
1efcb8c6
JM
89212012-10-23 Joseph Myers <joseph@codesourcery.com>
8922
8923 * c-common.h (pch_cpp_save_state): Declare.
8924 * c-target.def (c_preinclude): New hook.
8925 * c-opts.c (done_preinclude): New.
8926 (push_command_line_include): Handle default preincluded header.
8927 (cb_file_change): Call pch_cpp_save_state when calling
8928 push_command_line_include.
8929 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
8930 (pch_cpp_save_state): New.
8931 (pch_init): Call pch_cpp_save_state conditionally, instead of
8932 calling cpp_save_state.
8933
4a0ae68e
MLI
89342012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
8935
8936 PR c/53063
8937 PR c/40989
8938 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
8939 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
8940 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
8941 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
8942 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
8943 * c-opts.c (c_common_handle_option): Remove explicit handling from
8944 here.
8945 (c_common_post_options): Likewise.
8946
67e4210b
EB
89472012-10-18 Eric Botcazou <ebotcazou@adacore.com>
8948
8949 * c-ada-spec.c (LOCATION_COL): Delete.
8950 (compare_location): New function.
8951 (compare_node): Use it.
8952 (compare_comment): Likewise.
8953
65d4f2cd
MLI
89542012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
8955
8956 PR c/53063
8957 PR c/40989
8958 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
8959 * c-opts.c (c_common_handle_option): Do not set them here. Add
8960 comment.
8961 (c_common_post_options): Likewise.
8962
909881cb
EB
89632012-10-16 Eric Botcazou <ebotcazou@adacore.com>
8964
8965 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
8966 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
8967 Remove POINTER_TYPE handling, add large unsigned handling and use
8968 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
8969
3a785c97
JJ
89702012-10-12 Jakub Jelinek <jakub@redhat.com>
8971
8972 PR c/54381
8973 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
8974 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
8975 locs and array of 3 trees instead of just single loc and single
8976 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
8977 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
8978 For *cmp* builtins that take two sources strings report warnings
8979 about first and second source, not about destination and source.
8980
5e54f81d
MG
89812012-10-12 Marc Glisse <marc.glisse@inria.fr>
8982
8983 PR c++/53055
8984 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
8985
f5b02f1e
EB
89862012-10-11 Eric Botcazou <ebotcazou@adacore.com>
8987
8988 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
8989 declaring something coming from another file.
8990
b46dbc6c
AC
89912012-10-10 Arnaud Charlet <charlet@adacore.com>
8992
f5b02f1e 8993 PR ada/54845
b46dbc6c
AC
8994 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
8995
5d9de0d0
PC
89962012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
8997
8998 PR c++/54194
8999 * c-common.c (warn_about_parentheses): Add location_t parameter;
9000 use EXPR_LOC_OR_LOC.
9001 * c-common.h: Update declaration.
9002
a212e43f
MG
90032012-10-09 Marc Glisse <marc.glisse@inria.fr>
9004
9005 PR c++/54427
9006 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
9007 more operations. Make error messages optional.
9008 * c-common.h (enum stv_conv): Moved from c-typeck.c.
9009 (scalar_to_vector): Declare.
9010
b1db7f91
JM
90112012-10-08 Jason Merrill <jason@redhat.com>
9012
9013 * c-common.c (c_common_reswords): Add thread_local.
9014
e28d52cf
DS
90152012-10-08 Dodji Seketeli <dodji@redhat.com>
9016
9017 PR c++/53528 C++11 attribute support
9018 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
9019 new functions.
9020 * c-common.c (check_cxx_fundamental_alignment_constraints): New
9021 static function.
9022 (handle_aligned_attribute): In choose strictest alignment
9023 among many. Use new check_cxx_fundamental_alignment_constraints.
9024 (handle_transparent_union_attribute): In c++11 attribute syntax,
9025 don't look through typedefs.
9026
3b78de56
AC
90272012-10-04 Arnaud Charlet <charlet@adacore.com>
9028
9029 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
9030 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
9031 out of dumpfile.h.
9032
6040bb5f
DC
90332012-09-25 Dehao Chen <dehao@google.com>
9034
9035 PR middle-end/54645
3b78de56 9036 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
9037 map when read in the pch.
9038
3f8257db 90392012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
9040
9041 * c-ada-spec.c: Style fixes.
9042
3f8257db 90432012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
9044
9045 * c.opt (-fada-spec-parent): Define new command line switch.
9046 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
9047 is specified, generate binding spec as a child of the specified unit.
9048
0ccb505d
PC
90492012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
9050 Manuel López-Ibáñez <manu@gcc.gnu.org>
9051
9052 PR c++/53210
9053 * c.opt ([Winit-self]): Enabled by -Wall in C++.
9054
c583af79
AC
90552012-08-23 Arnaud Charlet <charlet@adacore.com>
9056
9057 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
9058 for pointers, and add missing Convention C pragma.
9059 (print_ada_struct_decl): Add missing aliased keyword.
9060 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
9061
1a4049e7
JJ
90622012-08-17 Jakub Jelinek <jakub@redhat.com>
9063
9064 * c-common.c (sizeof_pointer_memaccess_warning): New function.
9065 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
9066 * c-opts.c (c_common_handle_option): Enable it for -Wall.
9067 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
9068 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
9069
70b5e7dc
RG
90702012-08-10 Richard Guenther <rguenther@suse.de>
9071
9072 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
9073
f8923f7e
SB
90742012-08-07 Steven Bosscher <steven@gcc.gnu.org>
9075
9076 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
9077 instead of separate pp_newline and pp_flush.
9078 (print_c_tree): Likewise.
9079
e45abe1f
RH
90802012-07-26 Richard Henderson <rth@redhat.com>
9081
9082 * c-common.c (handle_hot_attribute): Allow labels.
9083 (handle_cold_attribute): Likewise.
9084
332f1d24
JJ
90852012-07-20 Jakub Jelinek <jakub@redhat.com>
9086
9087 PR c++/28656
9088 * c-common.c (check_function_nonnull): Handle multiple nonnull
9089 attributes properly.
9090
7ee2468b
SB
90912012-07-16 Steven Bosscher <steven@gcc.gnu.org>
9092
9093 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
9094 * c-ada-spec.c: Likewise.
9095 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
9096
ee7b28eb
SB
90972012-07-14 Steven Bosscher <steven@gcc.gnu.org>
9098
9099 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
9100 Remove code conditional on it.
9101
6bdf3519
SB
91022012-07-11 Steven Bosscher <steven@gcc.gnu.org>
9103
9104 * c-gimplify.c: Do not include basic-block.h.
9105 * c-common.c: Do not include linfuncs.h.
9106
532aafad
SB
91072012-07-08 Steven Bosscher <steven@gcc.gnu.org>
9108
9109 * c-common.h: Include tree.h.
9110
8d0d1915
JM
91112012-07-02 Jason Merrill <jason@redhat.com>
9112
9113 PR c++/53524
9114 * c-common.c (get_priority): Call default_conversion.
9115
fbc873ad
UB
91162012-07-01 Uros Bizjak <ubizjak@gmail.com>
9117
9118 * c-pch.c (c_common_write_pch): Remove unused variables.
9119
d4a10d0a
SB
91202012-06-29 Steven Bosscher <steven@gcc.gnu.org>
9121
9122 * cppspec.c: Moved from gcc/ to here.
9123
6f3a2e23
KT
91242012-06-27 Kai Tietz <ktietz@redhat.com>
9125
9126 PR preprocessor/37215
9127 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
9128
8ca92d04
SB
91292012-06-21 Steven Bosscher <steven@gcc.gnu.org>
9130
9131 * c-common.h (c_common_print_pch_checksum): Remove.
9132 * c-pch.c: Do not include output.h.
9133 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
9134 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
9135 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
9136 (struct c_pch_header): Remove.
9137 (get_ident): Update gpch version.
9138 (pch_init): Do not print executable_checksum to asm_out_file.
9139 Do not fail if there is no asm_out_file to read back from. Set
9140 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
9141 (c_common_write_pch): Verify that nothing was written to asm_out_file
9142 since pch_init was called. Do not write a c_pch_header, and do not
9143 copy from asm_out_file to the PCH.
9144 (c_common_read_pch): Do not read a c_pch_header, and do not restore
9145 the content of asm_out_file from the PCH.
9146 (c_common_print_pch_checksum): Remove.
9147 * c-opts.c (c_common_init): Print out executable_checksum directly.
9148
70f42967
SB
91492012-06-19 Steven Bosscher <steven@gcc.gnu.org>
9150
9151 * c-target.def (objc_declare_unresolved_class_reference,
9152 objc_declare_class_definition): Add new hooks.
9153
a8781821
SB
91542012-06-19 Steven Bosscher <steven@gcc.gnu.org>
9155
9156 * c-lex.c: Do not include output.h.
9157 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
9158 Remove uses of ASM_OUTPUT_IDENT.
9159
9e1a8dd1
RR
91602012-06-15 Marc Glisse <marc.glisse@inria.fr>
9161
9162 PR c++/51033
9163 * c-common.h (c_build_vec_perm_expr): Move decl here.
9164 * c-common.c (c_build_vec_perm_expr): Move definition
9165 here.
9166
6f07a821
SB
91672012-06-06 Steven Bosscher <steven@gcc.gnu.org>
9168
9169 * c.opt (fconserve-space): Turn into a no-op.
9170
9faeb493 91712012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
9172
9173 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
9174 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
9175 both the start and end of the function.
9176
a4b7d13c
SB
91772012-06-04 Steven Bosscher <steven@gcc.gnu.org>
9178
9179 * c-common.c: Do not include output.h.
9180 * c-pragma.c: Likewise.
9181
c265f413
SA
91822012-06-04 Steven Bosscher <steven@gcc.gnu.org>
9183
9184 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
9185 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
9186 (lang_decl_name): Handle namespace decls.
9187
be7a421e
SB
91882012-05-31 Steven Bosscher <steven@gcc.gnu.org>
9189
9190 * c-ada-spec.c: Do not include output.h.
9191 * c-semantics.c: Likewise.
9192
65de6659
JM
91932012-05-29 Joseph Myers <joseph@codesourcery.com>
9194
9195 * c-common.c: Fix typo.
9196
ca5f4331
MM
91972012-05-29 Michael Matz <matz@suse.de>
9198
9199 * c-common.h (c_expand_decl): Remove prototype.
9200
4f7f7aca
MLI
92012012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9202
9203 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
9204 * c-opts.c (c_common_handle_option): Remove code handling
9205 warn_missing_braces.
9206
4a792f9b
PC
92072012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
9208
9209 PR c++/25137
9210 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
9211 -Wmissing_braces.
9212
650dc14a
DS
92132012-05-22 Dodji Seketeli <dodji@redhat.com>
9214
9215 PR c++/53322
9216 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
9217
9b095bf1
MLI
92182012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
9219
9220 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
9221 * c-opts.c (c_common_handle_option): Do not handle explicitly
9222 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
9223
0b2c4be5
DS
92242012-05-16 Dodji Seketeli <dodji@redhat.com>
9225
9226 PR preprocessor/7263
ab20d992 9227 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
0b2c4be5
DS
9228 to cpp_classify_number. For diagnostics, use the precise location
9229 instead of the global input_location.
9230
a1bde5af
PC
92312012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
9232
d02924ef 9233 PR c++/11856
a1bde5af
PC
9234 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
9235
d1ede5f4
BS
92362012-05-14 Bernd Schmidt <bernds@codesourcery.com>
9237
a1bde5af 9238 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 9239
f2bc201f
MLI
92402012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
9241
9242 PR 53063
9243 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
9244 Wreorder): Use LangEnabledBy.
9245 * c-opts.c (c_common_handle_option): Do not enable them
9246 explicitly. Call lang-specific generated functions.
9247 (c_common_post_options): Do not set them here.
9248
95744782
MLI
92492012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
9250
9251 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
9252 Wmissing-field-initializers,Wmissing-parameter-type,
9253 Wold-style-declaration,Woverride-init): Use EnabledBy.
9254 * c-opts.c (c_common_post_options): Do not set here explicitly.
9255
7d5a5747
MLI
92562012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
9257
9258 PR 53063
9259 * c-opts.c (c_common_handle_option): Use handle_generated_option
9260 to enable sub-options.
9261
5a3c9cf2
PC
92622012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
9263
9264 PR c++/53158
9265 * c-common.c (warnings_for_convert_and_check): Use warning_at.
9266
3ac8781c
RG
92672012-05-10 Richard Guenther <rguenther@suse.de>
9268
9269 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
9270 adjust commentary about TYPE_IS_SIZETYPE types.
9271
1e537948
MLI
92722012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9273
9274 PR c++/53261
9275 * c-common.c (warn_logical_operator): Check that argument of
9276 integer_zerop is not NULL.
9277
f2c4a785
MLI
92782012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
9279
9280 PR c/43772
9281 * c-common.c (warn_logical_operator): Do not warn if either side
9282 is already true or false.
9283
50f305ca
MLI
92842012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
9285
9286 PR c/51712
9287 * c-common.c (expr_original_type): New.
9288 (shorten_compare): Do not warn for enumeration types.
9289
0c3641b0
MLI
92902012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
9291
9292 * c.opt (fpermissive): Add Var(flag_permissive).
9293
7edaa4d2
MG
92942012-04-30 Marc Glisse <marc.glisse@inria.fr>
9295
9296 PR c++/51033
9297 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
9298 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
9299
b9c8da34
DS
93002012-04-30 Dodji Seketeli <dodji@redhat.com>
9301
9302 Add -Wvarargs option
ab20d992 9303 * c.opt (Wvarargs): Define new option.
b9c8da34 9304
e6c69da0
MLI
93052012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9306
9307 * c-common.c (check_function_arguments): Replace
9308 Wmissing-format-attribute with Wsuggest-attribute=format.
9309
90137d8f
MLI
93102012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9311
9312 * c.opt (Wsuggest-attribute=format): New. Alias of
9313 Wmissing-format-attribute.
9314 * c-format.c (decode_format_type): Replace
9315 Wmissing-format-attribute with Wsuggest-attribute=format.
9316 (check_function_format): Likewise.
9317
9faeb493 93182012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
9319
9320 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
9321 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
9322 * c.opt: Add Wliteral-suffix.
9323
c1771a20
MLI
93242012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
9325
9326 PR c/44774
9327 * c.opt (Wpedantic): New.
9328 (pedantic): Alias Wpedantic.
9329 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
9330 (c_common_post_options): Likewise.
9331 (sanitize_cpp_opts): Likewise.
9332 * c-lex.c (interpret_float): Likewise.
9333 * c-format.c (check_format_types): Likewise.
9334 * c-common.c (pointer_int_sum): Likewise.
9335 (c_sizeof_or_alignof_type): Likewise.
9336 (c_add_case_label): Likewise.
9337 (c_do_switch_warnings): Likewise.
9338 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
9339
04b391c1
JM
93402012-04-15 Jason Merrill <jason@redhat.com>
9341
9342 PR c++/52818
9343 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
9344 (C_STD_NAME): Distinguish between C++98 and C++11.
9345
ac868f29
EB
93462012-04-11 Eric Botcazou <ebotcazou@adacore.com>
9347
9348 PR target/52624
9349 * c-common.h (uint16_type_node): Rename into...
9350 (c_uint16_type_node): ...this.
9351 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
9352 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
9353
fd4116f4
MLI
93542012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
9355
9356 * c-common.c (warn_if_unused_value): Move definition to here.
9357 * c-common.h (warn_if_unused_value): Move declaration to here.
9358
573ac65e
WB
93592012-03-23 William Bader <williambader@hotmail.com>
9360
9361 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
9362
552b8185
JM
93632012-03-20 Jason Merrill <jason@redhat.com>
9364
9365 * c-common.h (enum cxx_dialect): Add cxx1y.
9366 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
9367 test.
9368 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
9369 * c-opts.c (c_common_post_options): Likewise.
9370 (set_std_cxx1y): New.
9371 (c_common_handle_option): Call it.
9372 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
9373
04398fa8
PC
93742012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
9375
9376 PR c++/14710
9377 * c.opt ([Wuseless-cast]): Add.
9378
d2a12ae7
RG
93792012-03-16 Richard Guenther <rguenther@suse.de>
9380
9381 * c-pretty-print.c (pp_c_initializer_list): Adjust.
9382
a12bf402
MLI
93832012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9384
9385 PR c++/44783
9386 * c.opt (ftemplate-backtrace-limit) Add.
9387
5c30094f
RO
93882012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9389
9390 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
9391 handling.
9392 * c-pragma.c (handle_pragma_extern_prefix): Remove.
9393 (init_pragma): Don't register extern_prefix.
9394
21fa2faf
RG
93952012-03-12 Richard Guenther <rguenther@suse.de>
9396
9397 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
9398 (builtin_type_for_size): Likewise.
9399
e3793c6f
JJ
94002012-02-13 Jakub Jelinek <jakub@redhat.com>
9401
9402 PR c++/52215
9403 * c-common.c (sync_resolve_params): Don't decide whether to convert
9404 or not based on TYPE_SIZE comparison, convert whenever arg_type
9405 is unsigned INTEGER_TYPE.
9406
93286335
PC
94072012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
9408
9409 PR c/52118
9410 * c.opt ([Wunused-local-typedefs]): Fix description.
9411
7a421706
MS
94122012-01-24 Mike Stump <mikestump@comcast.net>
9413
9414 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
9415 exactly.
9416
ba9b1f11
RG
94172012-01-18 Richard Guenther <rguenther@suse.de>
9418
9419 * c-opts.c (c_common_post_options): Reset LTO flags if
9420 we are about to generate a PCH.
9421
465406be
PC
94222012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
9423
9424 PR c++/51777
9425 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
9426 use pp_unsigned_wide_integer.
9427
aee15221
RG
94282012-01-10 Richard Guenther <rguenther@suse.de>
9429
9430 PR middle-end/51806
9431 * c-opts.c (c_common_handle_option): Move -Werror handling
9432 to language independent code.
9433
5720c0dc
RG
94342012-01-05 Richard Guenther <rguenther@suse.de>
9435
9436 PR middle-end/51764
9437 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
9438 from common.opt.
9439
73ac190a
PC
94402011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
9441
9442 PR c++/51316
9443 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
9444 of array types with an unknown bound.
9445
48b0b196
JM
94462011-12-20 Joseph Myers <joseph@codesourcery.com>
9447
9448 * c-common.c (flag_isoc99): Update comment to refer to C11.
9449 (flag_isoc1x): Change to flag_isoc11.
9450 * c-common.h (flag_isoc99): Update comment to refer to C11.
9451 (flag_isoc1x): Change to flag_isoc11.
9452 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
9453 C11.
9454 * c-opts.c (set_std_c1x): Change to set_std_c11.
9455 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
9456 Call set_std_c11.
9457 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
9458 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
9459 * c.opt (std=c1x): Change to std=c11. Document as non-draft
9460 standard.
9461 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
9462 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
9463 (std=gnu1x): Make alias of std=gnu11.
9464
d58d6eb5
JM
94652011-12-19 Jason Merrill <jason@redhat.com>
9466
9467 PR c++/51228
9468 * c-common.c (handle_transparent_union_attribute): Check the first
9469 field if the type is complete.
9470
b3908fcc
JW
94712011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
9472
9473 PR libstdc++/51365
9474 * c-common.c (RID_IS_FINAL): Add.
9475 * c-common.h (RID_IS_FINAL): Add.
9476
fea3ca91
IS
94772011-11-30 Iain Sandoe <iains@gcc.gnu.org>
9478
9479 * c.opt (fgnu-runtime): Provide full description.
9480 (fnext-runtime): Likewise.
9481 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
9482
62bad7cd
AM
94832011-11-28 Andrew MacLeod <amacleod@redhat.com>
9484
9485 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
9486 predefines in one place. Add LOCK_FREE predefines.
9487 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
9488 new func.
9489
c466c4ff
AM
94902011-11-24 Andrew MacLeod <amacleod@redhat.com>
9491
9492 PR c/51256
9faeb493 9493 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 9494 conditions
9faeb493
UB
9495 (resolve_overloaded_atomic_exchange,
9496 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
9497 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
9498 error_mark_node for error conditions.
9faeb493 9499
a5952633
RG
95002011-11-08 Richard Guenther <rguenther@suse.de>
9501
9502 PR middle-end/51010
ab20d992 9503 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
a5952633 9504
0a35513e
AH
95052011-11-07 Richard Henderson <rth@redhat.com>
9506 Aldy Hernandez <aldyh@redhat.com>
9507 Torvald Riegel <triegel@redhat.com>
9508
9509 Merged from transactional-memory.
9510
9511 * c-common.c (handle_tm_wrap_attribute,
9512 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
9513 (struct c_common_reswords): Added __transaction* keywords.
9514 (struct c_common_attribute_table): Added transaction* and tm_regparm
9515 attributes.
9516 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
9517 masks.
9518 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
9519 find_tm_attribute): Declare.
9520
6d87092d
JM
95212011-11-07 Jason Merrill <jason@redhat.com>
9522
9523 PR c++/35688
9524 * c-common.c, c-common.h: Revert yesterday's changes.
9525
8e7860a1
JM
95262011-11-06 Jason Merrill <jason@redhat.com>
9527
9528 PR c++/35688
9529 * c-common.c (decl_has_visibility_attr): Split out from...
9530 (c_determine_visibility): ...here.
9531 * c-common.h: Declare it.
9532
d19fa6b5
JM
95332011-11-06 Joseph Myers <joseph@codesourcery.com>
9534
9535 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
9536 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
9537 type.
9538 (check_user_alignment): New. Split out of
9539 handle_aligned_attribute. Disallow integer constants with
9540 noninteger types. Conditionally allow zero.
9541 (handle_aligned_attribute): Use check_user_alignment.
9542 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
9543
86951993
AM
95442011-11-06 Andrew MacLeod <amacleod@redhat.com>
9545 Richard Henderson <rth@redhat.com>
9546
9547 Merged from cxx-mem-model.
9548
9549 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 9550 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
9551 parameters that are the same type size.
9552 (get_atomic_generic_size): New. Find size of generic
9553 atomic function parameters and do typechecking.
9554 (add_atomic_size_parameter): New. Insert size into parameter list.
9555 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
9556 either __atomic_exchange_n or external library call.
9faeb493 9557 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 9558 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 9559 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
9560 __atomic_load_n or an external library call.
9561 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
9562 __atomic_store_n or an external library call.
9563 (resolve_overloaded_builtin): Handle new __atomic builtins.
9564
cf9e9959
EB
95652011-11-04 Eric Botcazou <ebotcazou@adacore.com>
9566
9567 PR c++/50608
9568 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
9569 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
9570 <INDIRECT_REF>: Return the argument.
9571 <ARRAY_REF>: Remove special code for negative offset.
9572 Call fold_build_pointer_plus instead of size_binop.
9573 (fold_offsetof): Remove STOP_REF argument and adjust.
9574 * c-common.h (fold_offsetof_1): Declare.
9575 (fold_offsetof): Remove STOP_REF argument.
9576
25339f10
JM
95772011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
9578
9579 PR c++/50810
9580 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
9581 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
9582 Wnarrowing for C++0x and C++98.
9583 * c.opt ([Wnarrowing]): Update.
9584
89401152
PC
95852011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
9586
9587 PR c++/44277
9588 * c.opt: Add Wzero-as-null-pointer-constant.
9589
97e3ad20
JM
95902011-10-31 Jason Merrill <jason@redhat.com>
9591
15694fdd
JM
9592 * c.opt (-fdeduce-init-list): Off by default.
9593
97e3ad20
JM
9594 PR c++/50920
9595 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
9596 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
9597 and -Wc++11-compat.
9598 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
9599
fb9120e3
RAV
96002011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
9601
9602 PR c++/30066
9603 * c.opt (fvisibility-inlines-hidden): Description change.
9604
3ce4f9e4
ESR
96052011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
9606
9607 Implement C++11 user-defined literals.
9608 * c-common.c (build_userdef_literal): New.
9609 * c-common.def: New tree code.
9610 * c-common.h (tree_userdef_literal): New tree struct and accessors.
9611 * c-lex.c (interpret_float): Add suffix parm.
9612 (c_lex_with_flags): Build literal tokens.
9613
5f53c243
PC
96142011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
9615
9616 PR c++/50841
9617 Revert:
9618 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
9619
9620 PR c++/50810
9621 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
9622 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
9623 Wnarrowing for C++0x and C++98.
9624 * c.opt ([Wnarrowing]): Update.
9625
263734e1
PC
96262011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
9627
9628 PR c++/50810
9629 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
9630 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
9631 Wnarrowing for C++0x and C++98.
9632 * c.opt ([Wnarrowing]): Update.
9633
d2e312d7
PC
96342011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
9635
9636 PR c++/45385
9637 * c-common.c (conversion_warning): Remove code looking for
9638 artificial operands.
9639
d17687f6
DS
96402011-10-18 Dodji Seketeli <dodji@redhat.com>
9641
9642 PR bootstrap/50760
9643 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 9644 !NO_IMPLICIT_EXTERN_C.
d17687f6 9645
fc8396e9
PC
96462011-10-17 Michael Spertus <mike_spertus@symantec.com>
9647
9648 * c-common.c (c_common_reswords): Add __bases,
9649 __direct_bases.
9650 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
9651
96522011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
9653
9654 PR c++/50757
9655 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
9656
847e697a
TT
96572011-10-15 Tom Tromey <tromey@redhat.com>
9658 Dodji Seketeli <dodji@redhat.com>
9659
9660 * c.opt (fdebug-cpp): New option.
9661 * c-opts.c (c_common_handle_option): Handle the option.
9662 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
9663 output stream in parameter. Factorized from ...
9664 (maybe_print_line): ... this. Dump location debug information when
9665 -fdebug-cpp is in effect.
9666 (print_line_1): New static function. Takes an output stream in
9667 parameter. Factorized from ...
9668 (print_line): ... here. Dump location information when -fdebug-cpp
9669 is in effect.
9670 (scan_translation_unit): Dump location information when
9671 -fdebug-cpp is in effect.
9672
92582b75
TT
96732011-10-15 Tom Tromey <tromey@redhat.com>
9674 Dodji Seketeli <dodji@redhat.com>
9675
9676 * c.opt (ftrack-macro-expansion): New option. Handle it with and
9677 without argument.
9678 * c-opts.c (c_common_handle_option)<case
9679 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
9680 cases. Handle -ftrack-macro-expansion with and without argument.
9681
46427374
TT
96822011-10-15 Tom Tromey <tromey@redhat.com>
9683 Dodji Seketeli <dodji@redhat.com>
9684
9685 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
9686 (print_line, cb_define, do_line_change): Adjust to avoid touching
9687 the internals of struct line_map. Use the public API instead.
9688 * c-pch.c (c_common_read_pch): Likewise.
9689 * c-lex.c (fe_file_change): Likewise.
9690
fc8396e9
PC
96912011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
9692
9693 PR c++/17212
9694 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
9695
96962011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
9697
9698 PR c++/33067
9699 * c-pretty-print.c (pp_c_floating_constant): Output
9700 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
9701
e79983f4
MM
97022011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
9703
9704 * c-common.c (def_builtin_1): Delete old interface with two
9705 parallel arrays to hold standard builtin declarations, and replace
9706 it with a function based interface that can support creating
9707 builtins on the fly in the future. Change all uses, and poison
9708 the old names. Make sure 0 is not a legitimate builtin index.
9709 * c-omp.c (c_finish_omp_barrier): Ditto.
9710 (c_finish_omp_taskwait): Ditto.
9711 (c_finish_omp_flush): Ditto.
9712
6637388f
TG
97132011-10-11 Tristan Gingold <gingold@adacore.com>
9714
9715 * c.opt: (fallow-parameterless-variadic-functions): New.
9716
3797cb21
DS
97172011-09-08 Dodji Seketeli <dodji@redhat.com>
9718
9719 PR c++/33255 - Support -Wunused-local-typedefs warning
9720 * c-common.h (struct c_language_function::local_typedefs): New
9721 field.
9faeb493
UB
9722 (record_locally_defined_typedef, maybe_record_typedef_use)
9723 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 9724 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
9725 (maybe_record_typedef_use)
9726 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
9727 * c.opt: Declare new -Wunused-local-typedefs flag.
9728
693ddb1b
EB
97292011-09-06 Eric Botcazou <ebotcazou@adacore.com>
9730
9731 PR middle-end/50266
9732 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
9733 computations.
9734
830c740f
RG
97352011-09-05 Richard Guenther <rguenther@suse.de>
9736
9737 * c-common.c (complete_array_type): Use ssize_int (-1) instead
9738 of integer_minus_one_node for empty array upper bounds.
9739
892a371f
DS
97402011-08-28 Dodji Seketeli <dodji@redhat.com>
9741
9742 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
9743 it's the first time it's being called on this main TU.
9744
0e3fdb48
RB
97452011-08-24 Richard Guenther <rguenther@suse.de>
9746
9747 PR c/49396
9748 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
9749
97502011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
9751
9752 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
9753 defined in cpp_init_builtins and c_cpp_builtins.
9754
d4a83c10
JM
97552011-08-19 Joseph Myers <joseph@codesourcery.com>
9756
9757 * c-common.c (c_common_reswords): Add __builtin_complex.
9758 * c-common.h (RID_BUILTIN_COMPLEX): New.
9759
bbceee64
JM
97602011-08-18 Joseph Myers <joseph@codesourcery.com>
9761
9762 * c-common.c (c_common_reswords): Add _Noreturn.
9763 (keyword_is_function_specifier): Handle RID_NORETURN.
9764 * c-common.h (RID_NORETURN): New.
9765
3f8257db 97662011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
9767
9768 * c-common.c (unsafe_conversion_p): New function. Check if it is
9769 unsafe to convert an expression to the type.
9770 (conversion_warning): Adjust, use unsafe_conversion_p.
9771 * c-common.h (unsafe_conversion_p): New function declaration.
9772
20906c66
JJ
97732011-08-02 Jakub Jelinek <jakub@redhat.com>
9774
9775 * c-common.h (c_finish_omp_atomic): Adjust prototype.
9776 (c_finish_omp_taskyield): New prototype.
9777 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
9778 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
9779 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
9780 or RHS1 have side-effects, evaluate those too in the right spot,
9781 if it is a decl and LHS is also a decl, error out if they
9782 aren't the same.
9783 (c_finish_omp_taskyield): New function.
9784 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
9785 * c-pragma.c (omp_pragmas): Add taskyield.
9786 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
9787 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
9788 PRAGMA_OMP_CLAUSE_MERGEABLE.
9789
770e5a2e
DS
97902011-07-25 Dodji Seketeli <dodji@redhat.com>
9791
9792 * c-common.h (set_underlying_type): Remove parm name from
9793 declaration.
9794
1baae426
RG
97952011-07-25 Romain Geissler <romain.geissler@gmail.com>
9796
9797 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 9798
fcb21722
JM
97992011-07-22 Jason Merrill <jason@redhat.com>
9800
76f86d00
JM
9801 PR c++/49793
9802 * c.opt (Wnarrowing): New.
9803
3a636414
JM
9804 PR c++/30112
9805 * c-common.h: Declare c_linkage_bindings.
9806 * c-pragma.c (handle_pragma_redefine_extname): Use it.
9807
fcb21722
JM
9808 PR c++/49813
9809 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
9810 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
9811 as flag_isoc99 for 'restrict'.
9812 (pp_c_specifier_qualifier_list): Likewise for _Complex.
9813
02614448
ILT
98142011-07-21 Ian Lance Taylor <iant@google.com>
9815
9816 PR middle-end/49705
9817 * c-common.c (c_disable_warnings): New static function.
9818 (c_enable_warnings): New static function.
9819 (c_fully_fold_internal): Change local unused_p to bool. Call
9820 c_disable_warnings and c_enable_warnings rather than change
9821 c_inhibit_evaluation_warnings.
9822
34429675
JM
98232011-07-20 Jason Merrill <jason@redhat.com>
9824
9825 PR c++/6709 (DR 743)
9826 PR c++/42603 (DR 950)
9827 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
9828 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
9829 (CPP_DECLTYPE): New.
9830 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
9831
5d49b6a7
RG
98322011-07-19 Richard Guenther <rguenther@suse.de>
9833
9834 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
9835 * c-omp.c (c_finish_omp_for): Likewise.
9836
e84a58ff
EB
98372011-07-12 Eric Botcazou <ebotcazou@adacore.com>
9838
9839 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
9840 body on the next line.
9841
329af3c7
JM
98422011-07-08 Jason Merrill <jason@redhat.com>
9843
4063e61b
JM
9844 PR c++/45437
9845 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
9846
329af3c7
JM
9847 PR c++/49673
9848 * c-common.c (c_apply_type_quals_to_decl): Don't check
9849 TYPE_NEEDS_CONSTRUCTING.
9850
1a072294
RG
98512011-07-06 Richard Guenther <rguenther@suse.de>
9852
9853 * c-common.c (c_common_nodes_and_builtins):
9854 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
9855
fce5dddd
RG
98562011-07-05 Richard Guenther <rguenther@suse.de>
9857
9858 * c-common.c (c_common_nodes_and_builtins): Build all common
9859 tree nodes first.
9860
45d439ac
JJ
98612011-06-27 Jakub Jelinek <jakub@redhat.com>
9862
56300785
JJ
9863 * c-common.h (c_tree_chain_next): New static inline function.
9864
45d439ac
JJ
9865 * c-common.c (check_builtin_function_arguments): Handle
9866 BUILT_IN_ASSUME_ALIGNED.
9867
e0a8ecf2
AM
98682011-06-21 Andrew MacLeod <amacleod@redhat.com>
9869
9870 * c-common.c: Add sync_ or SYNC__ to builtin names.
9871 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
9872
98732011-06-20 Pierre Vittet <piervit@pvittet.com>
9874
9875 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
9876 handler.
9877 (gen_pragma_handler): New union.
9878 (internal_pragma_handler): New type.
9879 (c_register_pragma_with_data)
9880 (c_register_pragma_with_expansion_and_data): New functions.
9881
9882 * c-pragma.c (registered_pragmas, c_register_pragma_1)
9883 (c_register_pragma, c_register_pragma_with_expansion)
9884 (c_invoke_pragma_handler): Changed to work with
9885 internal_pragma_handler.
9886 (c_register_pragma_with_data)
9887 (c_register_pragma_with_expansion_and_data): New functions.
9888
677f3fa8
JM
98892011-06-14 Joseph Myers <joseph@codesourcery.com>
9890
9891 * c-common.c: Include common/common-target.h.
9892 (handle_section_attribute): Use
9893 targetm_common.have_named_sections.
9894 * c-cppbuiltin.c: Include common/common-target.h.
9895 (c_cpp_builtins): Use targetm_common.except_unwind_info.
9896
d7fc8c14
RG
98972011-06-10 Richard Guenther <rguenther@suse.de>
9898
9899 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
9900 to print a IDENTIFIER_NODE.
9901
10e48e39
RO
99022011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9903 Joseph Myers <joseph@codesourcery.com>
9904
9905 * c.opt (fbuilding-libgcc): New option.
9906 * c-cppbuiltin.c (c_cpp_builtins): Define
9907 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
9908
6976ae51
JM
99092011-06-07 Jason Merrill <jason@redhat.com>
9910
3ff60975
JM
9911 * c-common.c (max_tinst_depth): Lower default to 900.
9912
6976ae51
JM
9913 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
9914
009db074
RG
99152011-06-07 Richard Guenther <rguenther@suse.de>
9916
9917 * c-common.c (c_common_nodes_and_builtins): Do not set
9918 size_type_node or call set_sizetype.
9919
b4592b92
DS
99202011-06-07 Dodji Seketeli <dodji@redhat.com>
9921
9922 PR debug/49130
9923 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 9924 type when using pointer comparison to compare types.
b4592b92 9925
014ab419
JW
99262011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
9927
9928 * c.opt: Add -Wdelete-non-virtual-dtor.
9929 * c-opts.c (c_common_handle_option): Include it in -Wall.
9930
4f60111f
NF
99312011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
9932
9933 PR bootstrap/49190
9934
9935 Revert:
9936 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9937
9938 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
9939 not tree_common.
9940
4cc4f2f4
JJ
99412011-05-27 Jakub Jelinek <jakub@redhat.com>
9942
9943 PR c++/49165
9944 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
9945 C++ don't call c_common_truthvalue_conversion on void type arms.
9946
38e01f9e
NF
99472011-05-27 Nathan Froyd <froydnj@codesourcery.com>
9948
9949 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
9950 (stmt_list_stack): Define.
9951 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
9952 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
9953
92e948a8
NF
99542011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9955
9956 * c-common.c (warning_candidate_p): Check for BLOCKs.
9957
a2fc3e63
NF
99582011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9959
9960 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
9961 not tree_common.
9962
0957c029
JJ
99632011-05-25 Jakub Jelinek <jakub@redhat.com>
9964
9965 * c-common.c (def_fn_type): Remove extra va_end.
9966
828fb3ba
JM
99672011-05-23 Jason Merrill <jason@redhat.com>
9968
9969 PR c++/48106
9970 * c-common.c (c_common_get_narrower): New.
9971 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
9972
dde05067
NF
99732011-05-23 Nathan Froyd <froydnj@codesourcery.com>
9974
9975 * c-common.h (check_function_arguments): Tweak prototype of
9976 check_function_arguments.
9977 * c-common.c (check_function_arguments): Likewise. Adjust
9978 calls to check_function_nonnull, check_function_format, and
9979 check_function_sentinel.
9980 (check_function_sentinel): Take a FUNCTION_TYPE rather than
9981 separate attributes and typelist arguments. Use
9982 FOREACH_FUNCTION_ARGS to iterate over argument types.
9983
3c0d13bf
PC
99842011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
9985
9986 * c-common.c (c_common_reswords): Reorder.
9987 * c-common.h (rid): Likewise.
9988
8242dd04
NF
99892011-05-10 Nathan Froyd <froydnj@codesourcery.com>
9990
9991 * c-common.c (def_fn_type): Don't call build_function_type, call
9992 build_function_type_array or build_varargs_function_type_array
9993 instead.
9994 (c_common_nodes_and_builtins): Likewise.
9995
3d528853
NF
99962011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9997
9998 * c-common.c (c_add_case_label): Omit the loc argument to
9999 build_case_label.
10000 * c-common.h (build_case_label): Remove.
10001 * c-semantics.c (build_case_label): Remove.
10002
a04a722b
JM
100032011-05-05 Joseph Myers <joseph@codesourcery.com>
10004
10005 * c-objc.h (objc_start_method_definition): Update prototype.
10006 * stub-objc.c (objc_start_method_definition): Add extra parameter.
10007
e19a18d4
NF
100082011-05-04 Nathan Froyd <froydnj@codesourcery.com>
10009
10010 * c-common.c (check_main_parameter_types): Reindent. Don't use
10011 TYPE_ARG_TYPES directly.
10012 (handle_nonnull_attribute): Likewise.
10013 (sync_resolve_params): Likewise.
10014 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
10015 to check_format_string.
10016 (handle_format_attribute): Likewise.
10017 (check_format_string): Take a function type to examine instead of
10018 a type list. Use a function_arg_iterator to step through argument
10019 types.
10020
c62c040f
RG
100212011-05-04 Richard Guenther <rguenther@suse.de>
10022
10023 * c-common.c (fix_string_type): Use size_int for index type bounds.
10024 (start_fname_decls): Do not pass NULL to build_int_cst.
10025 (c_init_attributes): Likewise.
10026 * c-lex.c (c_lex_with_flags): Likewise.
10027
c12ff9d8
JM
100282011-04-27 Jason Merrill <jason@redhat.com>
10029
10030 * c-common.c (make_tree_vector_from_list): New.
10031 * c-common.h: Declare it.
10032
304dfbe3
RG
100332011-04-26 Richard Guenther <rguenther@suse.de>
10034
10035 PR preprocessor/48248
10036 * c-ppoutput.c (maybe_print_line): Always optimize newlines
10037 for output size with -P.
10038
3c0d13bf
PC
100392011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
10040
10041 * c-common.c (struct c_common_resword): Add __underlying_type.
10042 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
10043
04695783
JM
100442011-04-20 Jim Meyering <meyering@redhat.com>
10045
10046 * c-format.c (init_dollar_format_checking): Remove useless
10047 if-before-free.
10048
0dc33c3c
NP
100492011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
10050
10051 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 10052 (objc_detect_field_duplicates): New.
0dc33c3c 10053 * stub-objc.c: Likewise.
3c0d13bf 10054
c59633d9
NP
100552011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
10056
10057 * stub-objc.c (objc_declare_protocols): Renamed to
10058 objc_declare_protocol.
10059 * c-objc.h: Likewise.
3c0d13bf 10060
32dabdaf
NP
100612011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
10062
10063 * stub-objc.c (objc_declare_class): Updated argument name.
10064
81f653d6
NF
100652011-04-12 Nathan Froyd <froydnj@codesourcery.com>
10066
10067 * c-common.h (c_common_init_ts): Declare.
10068 * c-common.c (c_common_init_ts): Define.
10069
eb345401
NP
100702011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
10071
10072 * c-objc.h (objc_build_message_expr): Updated prototype.
10073 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 10074
a358e188
MJ
100752011-04-12 Martin Jambor <mjambor@suse.cz>
10076
10077 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
10078 of cgraph_node.
10079
e6313a78
RG
100802011-04-11 Richard Guenther <rguenther@suse.de>
10081
10082 * c-common.c (complete_array_type): Build a range type of
10083 proper type.
10084
dcf0c47e
NF
100852011-04-08 Nathan Froyd <froydnj@codesourcery.com>
10086
10087 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
10088 (handle_type_generic_attribute): Likewise.
10089
1ee44b26
JM
100902011-04-07 Jason Merrill <jason@redhat.com>
10091
10092 PR c++/48450
10093 * c-common.c (c_common_truthvalue_conversion): Don't ignore
10094 conversion from C++0x scoped enum.
10095
acce4e77
JM
100962011-04-06 Joseph Myers <joseph@codesourcery.com>
10097
10098 * c-target-def.h: New file.
10099 * c-target.def: New file.
10100 * c-target.h: New file.
10101 * c-common.c (targetcm): Don't define here.
10102 * c-common.h (default_handle_c_option): Declare.
10103 * c-format.c: Include c-target.h instead of target.h.
10104 * c-opts.c: Include c-target.h instead of target.h. Explicitly
10105 include tm.h.
10106 (default_handle_c_option): Move from targhooks.c.
10107
e2eefb55
JJ
101082011-03-29 Jakub Jelinek <jakub@redhat.com>
10109
10110 PR preprocessor/48248
10111 * c-ppoutput.c (print): Add src_file field.
10112 (init_pp_output): Initialize it.
10113 (maybe_print_line): Don't optimize by adding up to 8 newlines
10114 if map->to_file and print.src_file are different file.
10115 (print_line): Update print.src_file.
10116
ba78087b
KT
101172011-03-25 Kai Tietz <ktietz@redhat.com>
10118
10119 * c-ada-spec.c (compare_comment): Use filename_cmp
10120 instead of strcmp for filename.
10121
0edf1bb2
JL
101222011-03-25 Jeff Law <law@redhat.com>
10123
adfac8df 10124 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 10125
c7dc8804
JM
101262011-03-25 Jason Merrill <jason@redhat.com>
10127
10128 * c.opt: Add -std=c++03.
10129
d1d879b1
EB
101302011-03-22 Eric Botcazou <ebotcazou@adacore.com>
10131
10132 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
10133
3f8257db 101342011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
10135
10136 PR target/12171
5050afdf
KT
10137 * c-pretty-print.c (pp_c_specifier_qualifier_list):
10138 Display allowed attributes for function pointer types.
10139 (pp_c_attributes_display): New function to display
10140 attributes having affects_type_identity flag set to true.
10141 * c-pretty-print.h (pp_c_attributes_display): New prototype.
10142
62d784f7
KT
10143 * c-common.c (c_common_attribute_table):
10144 Add new element.
10145 (c_common_format_attribute_table): Likewise.
10146
82d37118
JM
101472011-03-18 Jason Merrill <jason@redhat.com>
10148
49a000c3
JM
10149 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
10150 * c-common.h: Don't declare it here.
10151 * c-common.c: Or define it here.
10152 * c-opts.c (c_common_handle_option): Or set it here.
10153
82d37118
JM
10154 PR c++/35315
10155 * c-common.c (handle_transparent_union_attribute): Don't
10156 make a duplicate type in C++.
10157
17bc631c
JM
101582011-03-15 Jason Merrill <jason@redhat.com>
10159
10160 * c-common.c (max_constexpr_depth): New.
10161 * c-common.h: Declare it.
10162 * c-opts.c (c_common_handle_option): Set it.
10163 * c.opt (fconstexpr-depth): New option.
10164
1b9b91a6
JM
101652011-03-11 Jason Merrill <jason@redhat.com>
10166
f231b5ff
JM
10167 * c-common.c (attribute_takes_identifier_p): Add missing const.
10168
1b9b91a6
JM
10169 PR c++/46803
10170 * c-common.c (attribute_takes_identifier_p): Assume that an
10171 unknown attribute takes an identifier.
10172
a19e4d44
NF
101732011-03-07 Nathan Froyd <froydnj@codesourcery.com>
10174
10175 PR c/47786
10176 * c-common.c (c_type_hash): Call list_length instead of iterating
10177 through DECL_CHAIN. Rename 'i' to 'n_elements'.
10178
982d62f6
JJ
101792011-02-19 Jakub Jelinek <jakub@redhat.com>
10180
10181 PR c/47809
10182 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
10183
0a256240
NP
101842011-02-17 Iain Sandoe <iains@gcc.gnu.org>
10185
10186 * c.opt (fobjc-abi-version=) New.
10187 (fobjc-nilcheck): New.
10188
ba9e6dd5
NF
101892011-02-03 Nathan Froyd <froydnj@codesourcery.com>
10190
10191 PR c++/46890
10192 * c-common.h (keyword_is_decl_specifier): Declare.
10193 * c-common.c (keyword_is_decl_specifier): Define.
10194 (keyword_is_function_specifier): New function.
10195
7273813a
JJ
101962011-01-26 Jakub Jelinek <jakub@redhat.com>
10197
10198 PR c/47473
10199 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
10200 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
10201 REAL_TYPE.
10202
908ef79b
AC
102032011-01-26 Arnaud Charlet <charlet@adacore.com>
10204
10205 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
10206
237e9384
JJ
102072011-01-26 Jakub Jelinek <jakub@redhat.com>
10208
10209 PR pch/47430
10210 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
10211 after init_c_lex if pch_file is set.
10212
47ea1edf
DK
102132011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
10214
d4dba752 10215 PR c++/43601
47ea1edf
DK
10216 * c.opt (-fkeep-inline-dllexport): New switch.
10217
2aa9c6ae
RG
102182011-01-12 Richard Guenther <rguenther@suse.de>
10219
10220 PR middle-end/32511
10221 * c-common.c (handle_weak_attribute): Warn instead of error
10222 on declaring an inline function weak.
10223
7bd11157
TT
102242011-01-05 Tom Tromey <tromey@redhat.com>
10225
10226 * c-common.h (lvalue_error): Update.
10227 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
10228 not error.
10229
0e66e494 102302010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 10231
b4f588c4
NP
10232 PR objc/47075
10233 * c-objc.h (objc_finish_message_expr): Added argument to
10234 prototype.
10235
f4da8dce
NF
102362010-12-22 Nathan Froyd <froydnj@codesourcery.com>
10237
10238 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
10239 Use prototype_p.
10240
46270f14
NP
102412010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
10242
10243 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 10244 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 10245
4816c593
NF
102462010-12-10 Nathan Froyd <froydnj@codesourcery.com>
10247
10248 * c-common.h (readonly_error): Declare.
10249 * c-common.c (readonly_error): Define.
10250
7a6daeb0
NF
102512010-12-09 Nathan Froyd <froydnj@codesourcery.com>
10252
10253 * c-common.h (invalid_indirection_error): Declare.
10254 * c-common.c (invalid_indirection_error): Define.
10255
892f6119
RG
102562010-12-03 Richard Guenther <rguenther@suse.de>
10257
10258 PR c/46745
10259 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
10260 (pp_c_unary_expression): Likewise.
10261 (pp_c_expression): Likewise.
10262
6c39e757
NP
102632010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
10264
10265 * c-common.h (objc_finish_function): New.
10266 (objc_non_volatilized_type): Removed.
10267 (objc_type_quals_match): Removed.
10268 * stub-objc.c (objc_finish_function): New.
10269 (objc_non_volatilized_type): Removed.
10270 (objc_type_quals_match): Removed.
9faeb493 10271
7c475d11
JM
102722010-11-30 Joseph Myers <joseph@codesourcery.com>
10273
10274 * c-common.h (parse_optimize_options): Declare.
10275 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
10276 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
10277
71f3e391
JM
102782010-11-29 Joseph Myers <joseph@codesourcery.com>
10279
10280 * c-opts.c (check_deps_environment_vars): Use getenv instead of
10281 GET_ENVIRONMENT.
10282 * c-pch.c (O_BINARY): Don't define here.
10283 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
10284
d5fabb58
JM
102852010-11-25 Joseph Myers <joseph@codesourcery.com>
10286
10287 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
10288 targetm.except_unwind_info.
10289
299404a1
JM
102902010-11-23 Joseph Myers <joseph@codesourcery.com>
10291
10292 * c-opts.c (c_common_handle_option): Pass location to
10293 set_struct_debug_option.
10294
c98cd5bf
JM
102952010-11-23 Joseph Myers <joseph@codesourcery.com>
10296
10297 * c-common.c (visibility_options): Move from ../opts.c.
10298 * c-common.h (struct visibility_flags, visibility_options):
10299 Declare here.
10300 * c-opts.c (finish_options): Rename to c_finish_options.
10301 (c_common_init): Update call to finish_options.
10302
a9546771
NP
103032010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
10304
10305 PR objc/34033
10306 * c-lex.c (lex_string): Check that each string in an Objective-C
10307 string concat sequence starts with either one or zero '@', and
10308 that there are no spurious '@' signs at the end.
10309
24a57808
JM
103102010-11-20 Joseph Myers <joseph@codesourcery.com>
10311
10312 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
10313 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
10314 HANDLE_PRAGMA_VISIBILITY.
10315 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
10316 HANDLE_PRAGMA_VISIBILITY): Don't define.
10317 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
10318
a9aa2c3a
NF
103192010-11-20 Nathan Froyd <froydnj@codesourcery.com>
10320
10321 PR c++/16189
10322 PR c++/36888
10323 PR c++/45331
10324 * c-common.h (keyword_begins_type_specifier): Declare.
10325 (keyword_is_storage_class_specifier): Declare.
10326 (keyword_is_type_qualifier): Declare.
10327 * c-common.c (keyword_begins_type_specifier): New function.
10328 (keyword_is_storage_class_specifier): New function.
10329 (keyword_is_type_qualifier): Declare.
10330
5386338c
JM
103312010-11-19 Joseph Myers <joseph@codesourcery.com>
10332
10333 PR c/46547
10334 * c-common.c (in_late_binary_op): Define.
10335 (c_common_truthvalue_conversion): Check in_late_binary_op before
10336 calling c_save_expr.
10337 * c-common.h (in_late_binary_op): Declare.
10338
69ccdddb
JM
103392010-11-19 Joseph Myers <joseph@codesourcery.com>
10340
10341 * c-opts.c (c_common_handle_option): Update calls to
10342 set_struct_debug_option.
10343
6b192a09
NP
103442010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
10345
10346 * c-common.h (objc_declare_protocols): Added additional argument.
10347 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 10348
fb52b50a
NF
103492010-11-18 Nathan Froyd <froydnj@codesourcery.com>
10350
10351 PR c/33193
10352 * c-common.h (build_real_imag_expr): Declare.
10353 * c-semantics.c (build_real_imag_expr): Define.
10354
b37421c6
JM
103552010-11-17 Joseph Myers <joseph@codesourcery.com>
10356
10357 * c-opts.c (c_common_parse_file): Take no arguments.
10358 * c-common.h (c_common_parse_file): Update prototype.
10359
07078664
JJ
103602010-11-16 Jakub Jelinek <jakub@redhat.com>
10361
10362 PR c++/46401
10363 * c-common.c (warning_candidate_p): Don't track non-const calls
10364 or STRING_CSTs.
10365
c6a13190
ILT
103662010-11-15 Ian Lance Taylor <iant@google.com>
10367
10368 * c-lex.c (init_c_lex): Set macro debug callbacks if
10369 flag_dump_go_spec is set.
10370
925e8657
NP
103712010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
10372
10373 * c-common.h (objc_build_incr_expr_for_property_ref): New.
10374 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
10375
bb0a9581
NF
103762010-11-15 Nathan Froyd <froydnj@codesourcery.com>
10377
10378 PR preprocessor/45038
10379 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
10380 dialects.
10381
c5fa0890
JM
103822010-11-12 Joseph Myers <joseph@codesourcery.com>
10383
10384 * c-common.h (c_family_lang_mask): Declare.
10385 * c-opts.c (c_family_lang_mask): Make extern.
10386 * c-pragma.c (handle_pragma_diagnostic): Use
10387 control_warning_option.
10388
a4d8c676
JM
103892010-11-12 Joseph Myers <joseph@codesourcery.com>
10390
10391 * c-common.c (parse_optimize_options): Update call to
10392 decode_options.
10393 * c-common.h (c_common_handle_option): Update prototype.
10394 * c-opts.c (c_common_handle_option): Take location_t parameter and
10395 pass it to other functions.
10396
f954bd2c
JM
103972010-11-11 Joseph Myers <joseph@codesourcery.com>
10398
10399 * c-opts.c (warning_as_error_callback): Remove.
10400 (c_common_initialize_diagnostics): Don't call
10401 register_warning_as_error_callback.
10402 (c_common_handle_option): Handle -Werror=normalized= here.
10403
d8a07487
JM
104042010-11-10 Joseph Myers <joseph@codesourcery.com>
10405
10406 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
10407 in diagnostic.
10408 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
10409 letter.
10410 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
10411 Remove trailing '.' from diagnostics.
10412 * c.opt (Wwrite-strings_: Avoid '`' in help text.
10413
d5478783
JM
104142010-11-10 Joseph Myers <joseph@codesourcery.com>
10415
10416 * c-common.c (parse_optimize_options): Pass global_dc to
10417 decode_options.
10418 * c-opts.c (c_common_handle_option): Pass &global_options to
10419 set_Wstrict_aliasing.
10420 * c.opt (v): Don't mark Common or document here.
10421
91ebb981
IS
104222010-11-06 Iain Sandoe <iains@gcc.gnu.org>
10423
10424 PR target/44981
10425 * c-format.c (format_type): New type gcc_objc_string_format_type.
10426 (valid_stringptr_type_p): New.
10427 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 10428 (check_format_string): Pass expected type, use
91ebb981
IS
10429 valid_stringptr_type_p (), check that the format string types are
10430 consistent with the format specification.
10431 (decode_format_attr): Warn if NSString is used outside objective-c.
10432 (format_types_orig): Add NSString.
10433 (format_name): New.
10434 (format_flags): New.
10435 (check_format_arg): Handle format strings requiring an external parser.
10436 first_target_format_type: New variable.
10437 (handle_format_attribute): Set up first_target_format_type, pass the
10438 expected format arg string type to check_format_string().
ab20d992 10439 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
91ebb981
IS
10440 * stub-objc.c (objc_string_ref_type_p): New.
10441 (objc_check_format_arg): New.
10442
bede2adc
NP
104432010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
10444
9faeb493 10445 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
10446 * c-common.h (objc_build_class_component_ref): New.
10447 * stub-objc.c (objc_build_class_component_ref): New.
10448
9a179d01
NP
104492010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
10450
10451 * c.opt (Wproperty-assign-default): New option.
10452
22d8d616
NP
104532010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
10454
10455 Implemented -fobjc-std=objc1 flag.
10456 * c.opt (fobjc-std=objc1): New option.
10457
2debdb4f
NP
104582010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
10459
10460 Implemented format and noreturn attributes for Objective-C methods.
10461 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
10462 attribute for Objective-C methods.
10463
ec52b111
JM
104642010-10-31 Jason Merrill <jason@redhat.com>
10465
10466 * c-common.c (conversion_warning, warn_for_collisions_1): Use
10467 EXPR_LOC_OR_HERE.
10468
46a88c12
NP
104692010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
10470
10471 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
10472 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
10473 (objc_add_property_declaration): Removed arguments for copies and
10474 ivar.
10475 (objc_build_getter_call): Renamed to
10476 objc_maybe_build_component_ref.
10477 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
10478 (objc_is_property_ref): New.
10479 * c-common.c (c_common_reswords): Removed copies and ivar.
10480 * stub-objc.c (objc_add_property_declaration): Removed arguments
10481 for copies and ivar.
10482 (objc_build_getter_call): Renamed to
10483 objc_maybe_build_component_ref.
10484 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
10485 (objc_is_property_ref): New.
9faeb493 10486
1e4bf85b
AC
104872010-10-29 Arnaud Charlet <charlet@adacore.com>
10488 Matthew Gingell <gingell@adacore.com>
10489
10490 * c-ada-spec.c (separate_class_package): New function.
10491 (pp_ada_tree_identifier): Prefix references to C++ classes with the
10492 name of their enclosing package.
10493 (print_ada_declaration): Use separate_class_package.
10494
81f0bab2
JM
104952010-10-27 Jason Merrill <jason@redhat.com>
10496
2b08f2c5
JM
10497 * c-common.c (c_common_reswords): Add __is_literal_type.
10498 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
10499
81f0bab2
JM
10500 * c-common.c (check_case_value): Remove special C++ code.
10501
200290f2
NP
105022010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
10503
10504 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
10505 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
10506 and RID_LAST_PATTR.
10507 (objc_add_property_declaration): Added additional arguments.
10508 (objc_property_attribute_kind): Removed.
10509 (objc_set_property_attr): Removed.
10510 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
10511 copy and nonatomic.
10512 * stub-objc.c (objc_add_property_declaration): Added additional
10513 arguments.
10514 (objc_set_property_attr): Removed.
9faeb493 10515
f614132b
NP
105162010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
10517
10518 * c-common.h (objc_add_property_variable): Renamed to
10519 objc_add_property_declaration. Added location argument.
10520 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 10521
b8a18805
NP
105222010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
10523
10524 * c-common.h (objc_maybe_printable_name): New.
10525 * stub-objc.c (objc_maybe_printable_name): New.
10526
3f8257db
JJ
105272010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
10528 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
10529
10530 * c-common.h (c_common_mark_addressable_vec): Declare.
10531 * c-common.c (c_common_mark_addressable_vec): New function.
10532
249a82c4
NP
105332010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
10534
10535 * c-common.h (objc_set_method_type): Removed.
10536 (objc_add_method_declaration): Added boolean argument.
10537 (objc_start_method_definition): Same change.
10538 (objc_build_method_signature): Same change.
10539 * stub-objc.c (objc_set_method_type): Removed.
10540 (objc_add_method_declaration): Added boolean argument.
10541 (objc_start_method_definition): Same change.
10542 (objc_build_method_signature): Same change.
10543
977e30bc
NP
105442010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
10545
10546 * c-common.h (finish_file): Removed.
10547 (objc_write_global_declarations): New.
10548 * c-opts.c (c_common_parse_file): Do not call finish_file.
10549 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 10550
da57d1b9
NP
105512010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
10552
10553 Implemented parsing @synthesize and @dynamic for
10554 Objective-C/Objective-C++.
10555 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
10556 (objc_add_synthesize_declaration): New.
10557 (objc_add_dynamic_declaration): New.
10558 * c-common.c (c_common_reswords): Add synthesize and dynamic.
10559 * stub-objc.c (objc_add_synthesize_declaration): New.
10560 (objc_add_dynamic_declaration): New.
9faeb493 10561
0069111f
MM
105622010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
10563
10564 PR target/46041
10565 * c-cppbuiltin.c (mode_has_fma): Move function here from
10566 builtins.c. Don't use the fma optab, instead just use the
10567 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
10568 using -save-temps.
10569
e426b47b
NP
105702010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
10571
10572 Merge from 'apple/trunk' branch on FSF servers.
0069111f 10573
3f8257db 10574 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 10575
9faeb493 10576 Radar 4330422
e426b47b
NP
10577 * c-common.h (objc_non_volatilized_type): New declaration
10578 * stub-objc.c (objc_non_volatilized_type): New stub.
10579
90fbfdc3
NP
105802010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
10581
e426b47b 10582 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 10583
ab20d992 10584 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 10585
9faeb493 10586 Radar 4133425
90fbfdc3 10587 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 10588 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 10589
c37d8c30
IS
105902010-10-17 Iain Sandoe <iains@gcc.gnu.org>
10591
10592 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
10593 * c-common.h (enum rid): Add RID_AT_PACKAGE.
10594 (objc_ivar_visibility_kind): New enum.
10595 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 10596 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
10597 visibility enum.
10598
1b1562a5
MM
105992010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
10600
10601 * c-cppbuiltin.c (builtin_define_float_constants): Emit
10602 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
10603 has the appropriate fma builtins.
10604 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
10605
668ea4b1
IS
106062010-10-14 Iain Sandoe <iains@gcc.gnu.org>
10607
1b1562a5 10608 merge from FSF apple 'trunk' branch.
3f8257db 10609 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 10610
668ea4b1
IS
10611 Radars 4436866, 4505126, 4506903, 4517826
10612 * c-common.c (c_common_resword): Define @property and its attributes.
10613 * c-common.h: Define property attribute enum entries.
10614 (OBJC_IS_PATTR_KEYWORD): New.
10615 (objc_property_attribute_kind): New enum.
10616 Declare objc_set_property_attr (), objc_add_property_variable (),
10617 objc_build_getter_call () and objc_build_setter_call ().
10618 * stub-objc.c (objc_set_property_attr): New stub.
10619 (objc_add_property_variable): Likewise.
10620 (objc_build_getter_call): Likewise.
10621 (objc_build_setter_call) Likewise.
1b1562a5 10622
a1178b30
IS
106232010-10-13 Iain Sandoe <iains@gcc.gnu.org>
10624
1b1562a5 10625 merge from FSF apple 'trunk' branch.
ab20d992 10626 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
10627
10628 Radar 3803157 (method attributes)
10629 * c-common.c (handle_deprecated_attribute): Recognize
10630 objc methods as valid declarations.
10631 * c-common.h: Declare objc_method_decl ().
1b1562a5 10632 * stub-objc.c (objc_method_decl): New stub.
a1178b30 10633
a75bfaa6
JM
106342010-10-08 Joseph Myers <joseph@codesourcery.com>
10635
10636 * c-common.c (parse_optimize_options): Call
10637 decode_cmdline_options_to_array_default_mask before
10638 decode_options. Update arguments to decode_options.
10639 * c-common.h (c_common_init_options_struct): Declare.
10640 * c-opts.c (c_common_init_options_struct): New. Split out from
10641 c_common_init_options.
10642
f05b9d93
NP
106432010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
10644
10645 Implemented fast enumeration for Objective-C.
10646 * c-common.h (objc_finish_foreach_loop): New.
10647 * stub-objc.c (objc_finish_foreach_loop): New.
10648
1ebe4b4f
JM
106492010-10-05 Joseph Myers <joseph@codesourcery.com>
10650
10651 * c-common.h (struct diagnostic_context): Don't declare here.
10652 (c_common_initialize_diagnostics): Declare using
10653 diagnostic_context typedef.
10654 * c-opts.c (c_common_handle_option): Pass global_dc to
10655 handle_generated_option.
10656
d4d24ba4
JM
106572010-10-04 Joseph Myers <joseph@codesourcery.com>
10658
10659 * c-opts.c (c_common_handle_option): Pass &global_options_set to
10660 handle_generated_option.
10661
478a1c5b
ILT
106622010-10-03 Ian Lance Taylor <iant@google.com>
10663
10664 * c.opt (-fplan9-extensions): New option.
10665
82a1c2fe
FXC
106662010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
10667
10668 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
10669 Remove.
10670 (c_cpp_builtins): Call functions from cppbuiltin.c instead
10671 of duplicating code.
10672
92902b1b
IS
106732010-09-30 Iain Sandoe <iains@gcc.gnu.org>
10674
10675 * c-common.c: Add two new entries for @optional
10676 and @required keywords.
10677
10678 merge from FSF 'apple/trunk' branch.
3f8257db 10679 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
10680
10681 Radar 4386773
10682 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
10683 objective-c keywords.
10684 (objc_set_method_opt): New declaration.
10685 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 10686
46625112
JM
106872010-09-30 Joseph Myers <joseph@codesourcery.com>
10688
10689 * c-common.c (handle_optimize_attribute): Pass &global_options to
10690 cl_optimization_save and cl_optimization_restore.
10691 * c-opts.c (c_common_handle_option): Pass &global_options to
10692 handle_generated_option.
10693 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
10694 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
10695 &global_options to cl_optimization_restore.
10696
49b91f05
NP
106972010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
10698
10699 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
10700 Objective-C/Objective-C++ keywords.
10701
13ed556f 107022010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 10703
9faeb493
UB
10704 Merge from 'apple/trunk' branch on FSF servers.
10705
3f8257db 10706 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
10707
10708 Radar 4281748
10709 * c-common.h (objc_check_global_decl): New declaration.
10710 * stub-objc.c (objc_check_global_decl): New stub.
10711
f0036cca
JM
107122010-09-29 Joseph Myers <joseph@codesourcery.com>
10713
10714 * c.opt: Don't use VarExists.
10715
e3339d0f
JM
107162010-09-29 Joseph Myers <joseph@codesourcery.com>
10717
10718 * c-common.c (c_cpp_error): Update names of diagnostic_context
10719 members.
10720 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
10721 cl_optimization members.
10722 * c-opts.c (warning_as_error_callback, c_common_handle_option,
10723 sanitize_cpp_opts, finish_options): Update names of cpp_options
10724 members.
10725
1973201f
NP
107262010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
10727
10728 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
10729 (objc_is_reserved_word): Removed.
10730 * c-common.c: Updated comments.
10731 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
10732 objc_is_reserved_word.
10733 * stub-objc.c (objc_is_reserved_word): Removed.
10734
f7e71da5
IS
107352010-09-28 Iain Sandoe <iains@gcc.gnu.org>
10736
9faeb493 10737 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
10738 include attributes.
10739 (objc_start_method_definition): Likewise.
10740 (objc_build_keyword_decl): Likewise.
10741 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
10742 (objc_start_method_definition): Likewise.
10743 (objc_build_keyword_decl): Likewise.
10744
c165dca7
IS
107452010-09-28 Iain Sandoe <iains@gcc.gnu.org>
10746
10747 * c-common.h (objc_start_class_interface): Adjust prototype.
10748 (objc_start_category_interface): Likewise.
10749 (objc_start_protocol): Likewise.
10750 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
10751 (objc_start_class_interface): Likewise.
10752 (objc_start_category_interface): Likewise.
10753
7458026b
ILT
107542010-09-27 Ian Lance Taylor <iant@google.com>
10755
10756 * c-common.c (c_common_attribute_table): Add no_split_stack.
10757 (handle_no_split_stack_attribute): New static function.
10758
b581b85b
NP
107592010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
10760
9faeb493 10761 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 10762
3f8257db 10763 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 10764
9faeb493 10765 Radar 4229905
b581b85b
NP
10766 * c-common.h (objc_have_common_type): New declaration.
10767 * stub-objc.c (objc_have_common_type): New stub.
10768
10769 2005-06-22 Ziemowit Laski <zlaski@apple.com>
10770
10771 Radar 4154928
10772 * c-common.h (objc_common_type): New prototype.
9faeb493 10773 * stub-objc.c (objc_common_type): New stub.
b581b85b 10774
46a4da10
JH
107752010-09-24 Jan Hubicka <jh@suse.cz>
10776
10777 * c-common.c (handle_leaf_attribute): New function.
10778 (struct attribute_spec c_common_att): Add leaf.
10779
e200444e
JM
107802010-09-22 Joseph Myers <joseph@codesourcery.com>
10781
10782 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
10783 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
10784 -dump, -dump=, -imacros, -imacros=, -include, -include=,
10785 -include-barrier, -include-directory, -include-directory=,
10786 -include-directory-after, -include-directory-after=,
10787 -include-prefix, -include-prefix=, -include-with-prefix,
10788 -include-with-prefix=, -include-with-prefix-after,
10789 -include-with-prefix-after=, -include-with-prefix-before,
10790 -include-with-prefix-before=, -no-integrated-cpp,
10791 -no-line-commands, -no-standard-includes, -no-warnings, -output,
10792 -output=, -pedantic, -pedantic-errors, -preprocess,
10793 -print-missing-file-dependencies, -trace-includes, -traditional,
10794 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
10795 -user-dependencies, -verbose, -write-dependencies,
10796 -write-user-dependencies, no-integrated-cpp, traditional): New.
10797
29a80ea6
NP
107982010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
10799
10800 PR objc/23710
ac1fc2fc
NP
10801 * c-common.h (objc_start_method_definition): Return bool instead
10802 of void.
10803 * stub-objc.c (objc_start_method_definition): Return bool instead
10804 of void.
10805
108062010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
10807
10808 PR objc/25965
10809 * c-common.h (objc_get_interface_ivars): New declaration.
10810 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 10811
de621752
ILT
108122010-09-15 Ian Lance Taylor <iant@google.com>
10813
10814 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 10815 messages. Remove period at end of warning message.
de621752 10816
ba885ec5
NS
108172010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10818
10819 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
10820 (handle_alias_attribute): ... here.
10821 (handle_ifunc_attribute): New.
10822
c5ee1358
MM
108232010-09-06 Mark Mitchell <mark@codesourcery.com>
10824
10825 * c-common.h (do_warn_double_promotion): Declare.
10826 * c-common.c (do_warn_double_promotion): Define.
10827
0a0b3574
MM
108282010-09-05 Mark Mitchell <mark@codesourcery.com>
10829
10830 * c.opt (Wdouble-promotion): New.
10831
d1779886
JM
108322010-09-02 Joseph Myers <joseph@codesourcery.com>
10833
10834 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
10835 fvtable-thunks, fxref): Mark no longer supported in help text.
10836
2d2bd949
JM
108372010-09-02 Joseph Myers <joseph@codesourcery.com>
10838
10839 * c.opt (Wimport, fall-virtual, falt-external-templates,
10840 fdefault-inline, fenum-int-equiv, fexternal-templates,
10841 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
10842 fname-mangling-version-, fnew-abi, fnonnull-objects,
10843 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
10844 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
10845 applicable.
10846 (fhandle-exceptions): Mark with Alias and Warn.
10847 * c-opts.c (c_common_handle_option): Don't handle options marked
10848 as ignored.
10849
5de8299c
JM
108502010-09-02 Joseph Myers <joseph@codesourcery.com>
10851
10852 * c.opt (Wcomments, Werror-implicit-function-declaration,
10853 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
10854 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
10855 aliases.
10856 * c-common.c (option_codes): Use OPT_Wcomment instead of
10857 OPT_Wcomments.
10858 * c-opts.c (warning_as_error_callback, c_common_handle_option):
10859 Don't handle options marked as aliases.
10860
0ceb0201
RG
108612010-08-25 Richard Guenther <rguenther@suse.de>
10862
10863 * c-common.c (c_common_get_alias_set): Remove special
10864 handling for pointers.
10865
ac47786e
NF
108662010-08-20 Nathan Froyd <froydnj@codesourcery.com>
10867
10868 * c-common.c: Use FOR_EACH_VEC_ELT.
10869 * c-gimplify.c: Likewise.
10870 * c-pragma.c: Likewise.
10871
c878765b
JM
108722010-08-16 Joseph Myers <joseph@codesourcery.com>
10873
10874 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
10875 RejectDriver.
10876 (MMDX): Change back to MMD. Mark NoDriverArg instead of
10877 RejectDriver.
10878 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
10879 instead of OPT_MDX and OPT_MMDX.
10880
603349bf
JM
108812010-08-16 Joseph Myers <joseph@codesourcery.com>
10882
10883 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
10884
644fa7ac
JM
108852010-08-12 Joseph Myers <joseph@codesourcery.com>
10886
10887 * c.opt (MD, MMD): Change to MDX and MMDX.
10888 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
10889
481e1176
JM
108902010-08-11 Joseph Myers <joseph@codesourcery.com>
10891
10892 * c-opts.c (c_common_handle_option): Call handle_generated_option
10893 instead of handle_option.
10894
ac8dc9f7
NF
108952010-08-08 Nathan Froyd <froydnj@codesourcery.com>
10896
10897 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
10898 (maybe_apply_renaming_pragma): Delete unneeded declarations.
10899
4f8c876d
NF
109002010-08-08 Nathan Froyd <froydnj@codesourcery.com>
10901
10902 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
10903 (pending_redefine_extname): Change type to a VEC.
10904 (add_to_renaming_pragma_list): Update for new type of
10905 pending_redefine_extname.
ac8dc9f7 10906 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 10907
3b0c690e
AC
109082010-08-04 Arnaud Charlet <charlet@adacore.com>
10909
10910 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
10911 visited.
10912 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
10913 decide whether a type has already been declared/seen.
10914 Do not go to the original type.
10915 (dump_nested_types): New parameter forward.
10916 Generate forward declaration if needed and mark type as visited.
10917 (print_ada_declaration): Call dump_nested_types if not already done.
10918 Mark types as visited.
10919
1890bccc
JM
109202010-08-03 Joseph Myers <joseph@codesourcery.com>
10921
10922 * c.opt (-print-pch-checksum): Remove option.
10923 * c-opts.c (c_common_handle_option): Don't handle
10924 OPT_print_pch_checksum.
10925
5f20c657
JM
109262010-07-27 Joseph Myers <joseph@codesourcery.com>
10927
10928 * c-common.h (c_common_handle_option): Update prototype and return
10929 value type.
10930 * c-opts.c (c_common_handle_option): Update prototype and return
10931 value type. Update calls to handle_option and
10932 enable_warning_as_error.
10933
f551f80c
JJ
109342010-07-27 Jakub Jelinek <jakub@redhat.com>
10935
10936 PR c/45079
10937 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
10938
61ff2bdc
JM
109392010-07-27 Joseph Myers <joseph@codesourcery.com>
10940
10941 * c-common.h (c_common_missing_argument): Remove.
10942 * c-opts.c (c_common_missing_argument): Remove.
10943 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
10944 idirafter, imacros, include, isysroot, isystem, iquote): Add
10945 MissingArgError.
10946 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
10947
7a9bf9a4
JM
109482010-07-27 Joseph Myers <joseph@codesourcery.com>
10949
10950 * c-common.h (c_common_option_lang_mask,
10951 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
10952 New.
10953 (c_common_init_options): Update prototype.
10954 * c-opts.c (c_common_option_lang_mask): New.
10955 (c_common_initialize_diagnostics): Split out of
10956 c_common_init_options.
10957 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
10958 New.
10959 (c_common_init_options): Update prototype. Use decoded options in
10960 search for -lang-asm.
10961
910ad8de
NF
109622010-07-15 Nathan Froyd <froydnj@codesourcery.com>
10963
10964 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
10965 * c-format.c: Likewise.
10966
718f9c0f
MLI
109672010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
10968
10969 * c-common.h: Include diagnostic-core.h. Error if already
10970 included.
10971 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
10972
4d451982
MLI
109732010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
10974
adfac8df 10975 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
10976 Do not include expr.h
10977 (vector_mode_valid_p): Move here.
10978
119fe915
SB
109792010-06-21 DJ Delorie <dj@redhat.com>
10980
10981 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
10982 allow these pragmas anywhere.
10983
109842010-06-14 Jakub Jelinek <jakub@redhat.com>
10985
10986 PR bootstrap/44509
10987 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
10988 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
10989 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
10990 ggc_strdup instead of xstrdup.
10991
109922010-06-10 Jakub Jelinek <jakub@redhat.com>
10993
10994 * c-cppbuiltin.c: Include cpp-id-data.h.
10995 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
10996 (lazy_hex_fp_value): New function.
10997 (builtin_define_with_hex_fp_value): Provide definitions lazily.
10998
6662d794
MLI
109992010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11000
11001 * c-gimplify.c: Do not include tree-flow.h
11002
38f8b050
JR
110032010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
11004
11005 PR other/44034
11006 * c-common.c: Rename targetm member:
11007 targetm.enum_va_list -> targetm.enum_va_list_p
11008
9589f23e
AS
110092010-06-28 Anatoly Sokolov <aesok@post.ru>
11010
11011 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
11012
3b06d379
SB
110132010-06-28 Steven Bosscher <steven@gcc.gnu.org>
11014
11015 * c-cppbuiltin.c: Do not include except.h.
11016
d166d4c3
AK
110172010-06-24 Andi Kleen <ak@linux.intel.com>
11018
9faeb493
UB
11019 * c-common.c (warn_for_omitted_condop): New.
11020 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 11021
70cb8be6
JM
110222010-06-21 Joseph Myers <joseph@codesourcery.com>
11023
11024 * c.opt (lang-objc): Remove.
11025 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
11026
a4c97feb
JR
110272010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
11028
11029 * c-opts.c: Include "tm_p.h".
11030
6e2f1956
JM
110312010-06-20 Joseph Myers <joseph@codesourcery.com>
11032
11033 * c-common.c (parse_optimize_options): Update call to
11034 decode_options.
11035
bc87224e
NF
110362010-06-18 Nathan Froyd <froydnj@codesourcery.com>
11037
11038 * c-common.c (record_types_used_by_current_var_decl): Adjust for
11039 new type of types_used_by_cur_var_decl.
11040
b49cf425
JR
110412010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
11042
11043 PR bootstrap/44512
11044 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
11045 for C++ standard compliance.
11046
59f9c2ed
JM
110472010-06-16 Jason Merrill <jason@redhat.com>
11048
11049 * c.opt: Add -Wnoexcept.
11050
33766b66
RG
110512010-06-16 Richard Guenther <rguenther@suse.de>
11052
11053 PR c/44555
11054 * c-common.c (c_common_truthvalue_conversion): Remove
11055 premature and wrong optimization concering ADDR_EXPRs.
11056
eff7e30c
AC
110572010-06-15 Arnaud Charlet <charlet@adacore.com>
11058
11059 * c-ada-spec.c (dump_sloc): Remove column info.
11060 (is_simple_enum): New function.
11061 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
11062 enum types when relevant.
11063
6312e84d
MLI
110642010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
11065
9faeb493 11066 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
11067 location.
11068
1cb42611
JM
110692010-06-10 Joseph Myers <joseph@codesourcery.com>
11070
11071 * c-opts.c (c_common_handle_option): Don't handle
11072 OPT_fshow_column.
11073
a9429e29
LB
110742010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
11075
11076 * c-pragma.c (push_alignment): Use typed GC allocation.
11077 (handle_pragma_push_options): Likewise.
11078
11079 * c-common.c (parse_optimize_options): Likewise.
11080
11081 * c-common.h (struct sorted_fields_type): Add variable_size GTY
11082 option.
11083
5498f011
JM
110842010-06-07 Joseph Myers <joseph@codesourcery.com>
11085
11086 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
11087 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
11088 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
11089 flag_signed_bitfields, warn_strict_null_sentinel,
11090 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
11091 flag_gen_declaration, flag_no_gnu_keywords,
11092 flag_implement_inlines, flag_implicit_templates,
11093 flag_implicit_inline_templates, flag_optional_diags,
11094 flag_elide_constructors, flag_default_inline, flag_rtti,
11095 flag_conserve_space, flag_access_control, flag_check_new,
11096 flag_new_for_scope, flag_weak, flag_working_directory,
11097 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
11098 flag_enforce_eh_specs, flag_threadsafe_statics,
11099 flag_pretty_templates): Remove.
11100 * c-common.h (flag_preprocess_only, flag_nil_receivers,
11101 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
11102 flag_replace_objc_classes, flag_undef, flag_no_builtin,
11103 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
11104 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
11105 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
11106 flag_no_gnu_keywords, flag_implement_inlines,
11107 flag_implicit_templates, flag_implicit_inline_templates,
11108 flag_optional_diags, flag_elide_constructors, flag_default_inline,
11109 flag_rtti, flag_conserve_space, flag_access_control,
11110 flag_check_new, flag_new_for_scope, flag_weak,
11111 flag_working_directory, flag_use_cxa_atexit,
11112 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
11113 flag_threadsafe_statics, flag_pretty_templates,
11114 warn_strict_null_sentinel): Remove.
11115 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
11116 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
11117 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
11118 fimplicit-inline-templates, fimplicit-templates,
11119 flax-vector-conversions, fms-extensions, fnil-receivers,
11120 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
11121 frtti, fshort-double, fshort-enums, fshort-wchar,
11122 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
11123 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
11124 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
11125 gen-decls, undef): Use Var.
11126 (fdefault-inline, foptional-diags): Document as doing nothing.
11127 * c-opts.c (c_common_handle_option): Remove cases for options now
11128 using Var. Mark ignored options as such.
11129
39dabefd
SB
111302010-06-05 Steven Bosscher <steven@gcc.gnu.org>
11131
9faeb493 11132 * c-common.c: Moved to here from parent directory.
39dabefd
SB
11133 * c-common.def: Likewise.
11134 * c-common.h: Likewise.
11135 * c-cppbuiltin.c: Likewise.
11136 * c-dump.c: Likewise.
11137 * c-format.c: Likewise.
11138 * c-format.h : Likewise.
11139 * c-gimplify.c: Likewise.
11140 * c-lex.c: Likewise.
11141 * c-omp.c: Likewise.
11142 * c.opt: Likewise.
11143 * c-opts.c: Likewise.
11144 * c-pch.c: Likewise.
11145 * c-ppoutput.c: Likewise.
11146 * c-pragma.c: Likewise.
11147 * c-pragma.h: Likewise.
11148 * c-pretty-print.c: Likewise.
11149 * c-pretty-print.h: Likewise.
11150 * c-semantics.c: Likewise.
11151 * stub-objc.c: Likewise.
11152
11153 * c-common.c: Include gt-c-family-c-common.h.
11154 * c-pragma.c: Include gt-c-family-c-pragma.h.
11155\f
8d9254fc 11156Copyright (C) 2010-2020 Free Software Foundation, Inc.
39dabefd
SB
11157
11158Copying and distribution of this file, with or without modification,
11159are permitted in any medium without royalty provided the copyright
11160notice and this notice are preserved.