]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
[OpenMP, gimplifier] 'inform' after 'error' diagnostic
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
56638b9b
GA
12020-06-16 Jakub Jelinek <jakub@redhat.com>
2
3 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
4 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
5 idx members.
6 (c_omp_is_loop_iterator): New function.
7 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
8 if outer loop iterator is present. Perform duplicate checking through
9 hash_set in the function rather than expecting caller to do that.
10 Pass NULL instead of d->ppset to walk_tree_1.
11 (c_omp_check_nonrect_loop_iv): New function.
12 (c_omp_check_loop_iv): Use it. Fill in new members, allow
13 non-rectangular loop forms, diagnose multiple associated loops with
14 the same iterator. Pass NULL instead of &pset to walk_tree_1.
15 (c_omp_check_loop_iv_exprs): Likewise.
16
ec6ffbb9
GA
172020-06-10 Martin Liska <mliska@suse.cz>
18
19 PR tree-optimization/92860
20 * c-attribs.c (handle_optimize_attribute):
21 Save global options and compare it after parsing of function
22 attribute.
23 * c-pragma.c (opt_stack::saved_global_options): New field.
24 (handle_pragma_push_options): Save global_options.
25 (handle_pragma_pop_options): Compare them after pop.
26
b952c2cf
GA
272020-06-09 Jakub Jelinek <jakub@redhat.com>
28
29 PR c/95580
30 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
31 case when MEM_REF's first argument has type pointer to incomplete type.
32
1a59f3db
GA
332020-06-05 Jason Merrill <jason@redhat.com>
34
35 * c-pretty-print.c (pp_c_additive_expression): Handle negative
36 operand to POINTER_PLUS_EXPR.
37
3add3425
GA
382020-06-04 Martin Sebor <msebor@redhat.com>
39
40 PR middle-end/10138
41 PR middle-end/95136
42 * c-attribs.c (append_access_attrs): Handle attr_access::none.
43 (handle_access_attribute): Same.
44
9a5b7438
GA
452020-06-03 Mark Wielaard <mark@klomp.org>
46
47 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
48 New function.
49 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
50 New function declaration.
51
522020-06-03 Mark Wielaard <mark@klomp.org>
53
54 * known-headers.cc (get_string_macro_hint): New function.
55 (get_stdlib_header_for_name): Use get_string_macro_hint.
56 (get_c_stdlib_header_for_string_macro_name): New function.
57 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
58 New function declaration.
59
602020-06-03 Tobias Burnus <tobias@codesourcery.com>
61
62 * c-common.h (c_omp_predetermined_mapping): Declare.
63 * c-omp.c (c_omp_predetermined_mapping): New.
64
af114c38
MW
652020-05-22 Mark Wielaard <mark@klomp.org>
66
67 * known-headers.cc (get_stdlib_header_for_name): Add a new
68 stdlib_hint array for stdbool and stdint.
69
45c50b6a
MW
702020-05-22 Mark Wielaard <mark@klomp.org>
71
72 * known-headers.cc (get_stdlib_header_for_name): Return
73 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
74 flag_isoc99.
75
c22027a0
NS
762020-05-20 Nathan Sidwell <nathan@acm.org>
77
38a4db21
NS
78 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
79
c22027a0
NS
80 * c-common.c (try_to_locate_new_include_insertion_point): Use
81 strcmp to compare filenames.
82 * c-lex.c (init_c_lex): Move declaration to initialization.
83 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
84 deferred count loop.
85
29f0e90d
JM
862020-05-15 Jason Merrill <jason@redhat.com>
87
88 * c-opts.c (set_std_cxx20): Set flag_coroutines.
89
b04445d4
JM
902020-05-13 Jason Merrill <jason@redhat.com>
91
92 * c.opt (std=c++20): Make c++2a the alias.
93 (std=gnu++20): Likewise.
94 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
95 * c-opts.c: Adjust.
96 * c-cppbuiltin.c: Adjust.
97 * c-ubsan.c: Adjust.
98 * c-warn.c: Adjust.
99
11dd3be5
EB
1002020-05-12 Eric Botcazou <ebotcazou@adacore.com>
101
102 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
103
b224c376
NS
1042020-05-08 Nathan Sidwell <nathan@acm.org>
105
106 Reimplement directives only processing.
107 * c-ppoutput.c (token_streamer): Ne.
108 (directives_only_cb): New. Swallow ...
109 (print_lines_directives_only): ... this.
110 (scan_translation_unit_directives_only): Reimplment using the
111 published interface.
112
f1d94677
MP
1132020-05-07 Marek Polacek <polacek@redhat.com>
114
115 * c-format.c (badwords): Add "nonstatic".
116
9b95bb52
JJ
117202-05-07 Jakub Jelinek <jakub@redhat.com>
118
119 PR c/94968
120 * c-common.c (speculation_safe_value_resolve_params): Return false if
121 error_operand_p (val2).
122 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
123 Remove extraneous semicolon.
124
530b4409 1252020-05-06 qing zhao <qing.zhao@oracle.com>
126
127 PR c/94230
128 * c-indentation.c (get_visual_column): Add a hint to use the new
129 -flarge-source-files option.
130
b776bdca
SSF
1312020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
132
133 * c-attribs.c (handle_vector_size_attribute): Add attribute
134 nonnull for argument args in order to silence warning of
135 uninitialized variable usage. Since this is local to the
136 compilation unit and thus cannot be checked at call sides by the
137 compiler, added an assert statement in order to verify this.
138
6607bdd9
L
1392020-05-01 H.J. Lu <hongjiu.lu@intel.com>
140
141 PR target/93492
142 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
143 value to USHRT_MAX (65535).
144
691eeb65
JJ
1452020-04-29 Jakub Jelinek <jakub@redhat.com>
146
147 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
148
26d76be7
JJ
1492020-04-27 Jakub Jelinek <jakub@redhat.com>
150
151 PR c/94755
152 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
153 fncode == BUILT_IN_NONE before initialization of first_param.
154
7291b2ed
MP
1552020-04-23 Marek Polacek <polacek@redhat.com>
156
157 PR c++/94733
158 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
159 TREE_PURPOSE.
160
58a29af8
PP
1612020-04-14 Patrick Palka <ppalka@redhat.com>
162
163 PR c++/85278
164 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
165 ampersand if it's an rvalue reference type.
166
09f04139
MS
1672020-04-13 Martin Sebor <msebor@redhat.com>
168
169 PR c/92326
170 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
171 printing array bound for flexible array members.
172
ee26baf4
IS
1732020-04-13 Iain Sandoe <iain@sandoe.co.uk>
174
175 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
176 define, per n4861.
177
75efe9cb
RB
1782020-04-02 Richard Biener <rguenther@suse.de>
179
180 PR c/94392
181 * c-opts.c (c_common_post_options): Enable -ffinite-loops
182 for -O2 and C++11 or newer.
183
75defde9
PP
1842020-03-28 Patrick Palka <ppalka@redhat.com>
185
186 * c.opt: Add -fconcepts-diagnostics-depth.
187
52f24a9e
MS
1882020-03-27 Martin Sebor <msebor@redhat.com>
189
190 PR c++/94346
191 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
192 to decl_attributes. Make handling of different kinds of entities
193 more robust.
194
ccacf77b
MS
1952020-03-27 Martin Sebor <msebor@redhat.com>
196
197 PR c++/94098
198 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
199 here.
200
ca6c7225
JJ
2012020-03-23 Jakub Jelinek <jakub@redhat.com>
202
203 PR c++/91993
204 * c-warn.c (warnings_for_convert_and_check): For expr and/or
205 result being COMPOUND_EXPRs, skip to ultimate rhs.
206
1aa22b19
RS
2072020-03-20 Richard Sandiford <richard.sandiford@arm.com>
208
209 PR middle-end/94072
210 * c-common.c (c_common_type_for_mode): Before using a registered
211 built-in type, check that the vectorness of the type matches
212 the vectorness of the mode.
213
700d4cb0
JJ
2142020-03-17 Jakub Jelinek <jakub@redhat.com>
215
216 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
217 issue in a diagnostic message.
218
b408e010
LH
2192020-03-15 Lewis Hyatt <lhyatt@gmail.com>
220
221 * c.opt: Avoid redundancy in the help text.
222
e78e50d5
MP
2232020-03-02 Marek Polacek <polacek@redhat.com>
224
225 PR c++/93958 - add missing -std=gnu++20.
226 * c.opt: Add -std=gnu++20.
227
649e1741
MS
2282020-03-01 Martin Sebor <msebor@redhat.com>
229
230 PR c++/92721
231 * c-attribs.c (append_access_attrs): Correctly handle attribute.
232 (handle_access_attribute): Same.
233
7b60f3ba
JJ
2342020-02-25 Jakub Jelinek <jakub@redhat.com>
235
236 PR c/93858
237 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
238 "did you mean" hint in diagnostics.
239
fb260504
JM
2402020-02-15 Jason Merrill <jason@redhat.com>
241
242 * c.opt: Add -std=c++20.
243
1d757b09
EB
2442020-02-14 Eric Botcazou <ebotcazou@adacore.com>
245
246 * c-ada-spec.c: Include bitmap.h.
247 (dump_ada_double_name): Rename into...
248 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
249 (dump_ada_array_type): Adjust to above renaming. Robustify.
250 (dump_nested_types_1): New function copied from... Add dumped_types
251 parameter and pass it down to dump_nested_type.
252 (dump_nested_types): ...this. Remove parent parameter. Just call
253 dump_nested_types_1 on an automatic bitmap.
254 (dump_nested_type): Add dumped_types parameter.
255 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
256 Adjust recursive calls and adjust to above renaming.
257 (dump_ada_declaration): Adjust call to dump_nested_types.
258 Tidy up and adjust to above renaming.
259 (dump_ada_specs): Initialize and release bitmap obstack.
260
0cc575e4
MS
2612020-02-10 Martin Sebor <msebor@redhat.com>
262
263 PR c/93640
264 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
265
a59aa302
JJ
2662020-02-10 Jakub Jelinek <jakub@redhat.com>
267
268 PR other/93641
269 * c-format.c (check_plain): Fix up last argument of strncasecmp.
270 Remove useless extra test.
271
e464fc90
TB
2722020-02-03 Julian Brown <julian@codesourcery.com>
273 Tobias Burnus <tobias@codesourcery.com>
274
275 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
276
e3b6c052
JM
2772020-01-29 Jason Merrill <jason@redhat.com>
278
279 PR c++/89357
280 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
281
6d00f052
JM
2822020-01-23 Jason Merrill <jason@redhat.com>
283
284 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
285
8a990ffa
MS
2862020-01-23 Martin Sebor <msebor@redhat.com>
287
288 PR c/84919
289 * c-common.c (check_function_arguments): Avoid overlap checking
290 of sprintf functions.
291
55b7df8b
JM
2922020-01-22 Jason Merrill <jason@redhat.com>
293
294 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
295 PR c++/40752
296 * c-warn.c (conversion_warning): Check operands only after checking
297 the whole expression. Don't check second operand of + for sign.
298
c77074d0
JM
2992020-01-21 Jason Merrill <jason@redhat.com>
300 Manuel López-Ibáñez <manu@gcc.gnu.org>
301
302 PR c++/40752 - useless -Wconversion with short +=.
303 * c.opt (-Warith-conversion): New.
304 * c-warn.c (conversion_warning): Recurse for operands of
305 operators. Only warn about the whole expression with
306 -Warith-conversion.
307
731dbfc3
JM
3082020-01-21 Jason Merrill <jason@redhat.com>
309
310 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
311 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
312
ad1a3914
NS
3132020-01-20 Nathan Sidwell <nathan@acm.org>
314
315 PR preprocessor/80005
316 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
317
49789fd0
IS
3182020-01-18 Iain Sandoe <iain@sandoe.co.uk>
319
320 * c-common.c (co_await, co_yield, co_return): New.
321 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
322 RID_CO_RETURN): New enumeration values.
323 (D_CXX_COROUTINES): Bit to identify coroutines are active.
324 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
325 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
326 * c.opt (fcoroutines): New command-line switch.
327
4bc1899b
DM
3282020-01-10 David Malcolm <dmalcolm@redhat.com>
329
330 * c-format.c (local_event_ptr_node): New.
331 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
332 (init_dynamic_diag_info): Initialize local_event_ptr_node.
333 * c-format.h (T_EVENT_PTR): New define.
334
f25e33fa
MS
3352020-01-10 Martin Sebor <msebor@redhat.com>
336
337 PR c/93132
338 * c-attribs.c (append_access_attrs): Validate against the translated
339 access string rather than the human-readable representation.
340
8d9254fc
JJ
3412020-01-01 Jakub Jelinek <jakub@redhat.com>
342
343 Update copyright years.
344
39292e25
EB
3452019-12-20 Eric Botcazou <ebotcazou@adacore.com>
346
347 * c-ada-spec.h (decl_sloc): Delete.
348 * c-ada-spec.c (decl_sloc): Make static.
349
519d7496
JB
3502019-12-19 Julian Brown <julian@codesourcery.com>
351
352 * c-common.h (c_omp_map_clause_name): Add prototype.
353 * c-omp.c (c_omp_map_clause_name): New function.
354 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
355 PRAGMA_OACC_CLAUSE_DETACH.
356
a6163563
JB
3572019-12-19 Julian Brown <julian@codesourcery.com>
358 Maciej W. Rozycki <macro@codesourcery.com>
359 Tobias Burnus <tobias@codesourcery.com>
360 Thomas Schwinge <thomas@codesourcery.com>
361
362 * c-pragma.h (pragma_omp_clause): Add
363 PRAGMA_OACC_CLAUSE_NO_CREATE.
364
e8f1ade2
MS
3652019-12-17 Martin Sebor <msebor@redhat.com>
366
367 PR c++/61339
368 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
369
368877a1
DM
3702019-12-11 David Malcolm <dmalcolm@redhat.com>
371
372 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
373 implementation.
374 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
375
d68f5d45
DM
3762019-12-09 David Malcolm <dmalcolm@redhat.com>
377
378 * c-format.c (range_label_for_format_type_mismatch::get_text):
379 Replace label_text ctor called with true with label_text::take.
380
d3e28653
DM
3812019-12-09 David Malcolm <dmalcolm@redhat.com>
382
383 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
384 initial newline from expected outputs.
385 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
386 call to diagnostic_show_locus.
387
abd6d8cc
JJ
3882019-12-06 Jakub Jelinek <jakub@redhat.com>
389
390 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
391 now.
392
7906797e
MP
3932019-12-05 Marek Polacek <polacek@redhat.com>
394 Jakub Jelinek <jakub@redhat.com>
395
396 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
397 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
398
5c04da88
MP
3992019-12-05 Marek Polacek <polacek@redhat.com>
400
401 PR c++/92271 - make __is_same alias for __is_same_as.
402 * c-common.c: Add __is_same, an alias for __is_same_as.
403
43aae289
MP
4042019-12-03 Marek Polacek <polacek@redhat.com>
405
406 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
407 * c-cppbuiltin.c (c_cpp_builtins): Predefine
408 __cpp_aggregate_paren_init=201902 for -std=c++2a.
409
d7ddfbcb
JH
4102019-11-30 Jan Hubicka <hubicka@ucw.cz>
411
412 * c-attribs.c (handle_symver_attribute): New function
413 (c_common_attributes): Add symver.
414
65ef05d0
RS
4152019-11-30 Richard Sandiford <richard.sandiford@arm.com>
416
417 * c-common.c (pointer_int_sum): Use verify_type_context to check
418 whether the target allows pointer arithmetic for the types involved.
419 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
420 to check whether the target allows sizeof and alignof operations
421 for the types involved.
422
1a291106
JM
4232019-11-27 Jason Merrill <jason@redhat.com>
424
425 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
426
05d6cb1a
JJ
4272019-11-26 Jakub Jelinek <jakub@redhat.com>
428
429 PR c++/61414
430 * c-attribs.c (handle_mode_attribute): Add mode attribute to
431 ENUMERAL_TYPEs.
432
5b8d9367
JM
4332019-11-25 Joseph Myers <joseph@codesourcery.com>
434
435 PR c/91985
436 * c-common.c (c_common_type_for_mode): Handle decimal
437 floating-point types being NULL_TREE.
438 * c-format.c (get_format_for_type_1): Handle specified types being
439 NULL_TREE.
440 * c-lex.c (interpret_float): Give an error for decimal
441 floating-point constants when decimal floating-point not
442 supported.
443
1fbf51cb
JJ
4442019-11-23 Jakub Jelinek <jakub@redhat.com>
445
446 PR middle-end/83859
447 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
448 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
449 group warning with inform together.
450 (handle_access_attribute): Formatting fix.
451
761df906
JJ
4522019-11-22 Jakub Jelinek <jakub@redhat.com>
453
bdaf8be1
JJ
454 PR c/90677
455 * c-common.h (identifier_global_tag): Declare.
456 * c-format.c (get_pointer_to_named_type): Renamed to ...
457 (get_named_type): ... this. Use identifier_global_tag instead of
458 identifier_global_value, handle the return value being a TYPE_P.
459 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
460 to call get_named_type instead. Formatting fixes.
461
c2ecce6d 462 Implement P1902R1, Missing feature-test macros 2017-2019.
761df906
JJ
463 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
464 and __cpp_generic_lambdas for -std=c++2a. Define
465 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
466 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
467 __cpp_concepts for -std=c++2a.
468
54aa6b58
MS
4692019-11-22 Martin Sebor <msebor@redhat.com>
470
471 PR middle-end/83859
472 * c-attribs.c (handle_access_attribute): New function.
473 (c_common_attribute_table): Add new attribute.
474 (get_argument_type): New function.
475 (append_access_attrs): New function.
476 (get_nonnull_operand): Rename...
477 (get_attribute_operand): ...to this.
478 * c-common.c (get_nonnull_operand): Rename...
479 (get_attribute_operand): ...to this.
480
6c80b1b5
JM
4812019-11-21 Joseph Myers <joseph@codesourcery.com>
482
483 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
484 of warning.
485
192961ff
JM
4862019-11-19 Joseph Myers <joseph@codesourcery.com>
487
488 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
489 warning for standard attributes mixed with fallthrough attributes.
490
f8aea5e3
JM
4912019-11-15 Joseph Myers <joseph@codesourcery.com>
492
493 * c-attribs.c (handle_fallthrough_attribute): Remove static.
494 * c-common.h (handle_fallthrough_attribute): Declare.
495
2cc94aa8
JM
4962019-11-15 Joseph Myers <joseph@codesourcery.com>
497
498 * c-attribs.c (handle_deprecated_attribute): Remove static.
499 * c-common.h (handle_deprecated_attribute): Declare.
500
7c5890cc
JM
5012019-11-14 Joseph Myers <joseph@codesourcery.com>
502
503 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
504 char for C.
505
b2417b59
JJ
5062019-11-14 Jakub Jelinek <jakub@redhat.com>
507
d0ec7c93
JJ
508 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
509 valid vendors.
510
b2417b59
JJ
511 * c-omp.c (c_omp_check_context_selector): Handle name lists
512 containing string literals. Don't diagnose atomic_default_mem_order
513 with multiple props.
514
00be2a5f
JM
5152019-11-13 Joseph Myers <joseph@codesourcery.com>
516
517 * c-cppbuiltin.c (builtin_define_float_constants): Also define
518 NORM_MAX constants. Update call to get_max_float.
519 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
520 constants.
521
2dbad62d
EB
5222019-11-13 Eric Botcazou <ebotcazou@adacore.com>
523
524 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
525 (dump_forward_type): Do not generate a declaration for function types.
526 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
527 of the component type if it is declared in another file.
528
6ed76044
ML
5292019-11-12 Martin Liska <mliska@suse.cz>
530
531 * c-opts.c (c_common_post_options):
532 Use SET_OPTION_IF_UNSET.
533
62aee289
MR
5342019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
535 Frederik Harwath <frederik@codesourcery.com>
536
537 gcc/c-family/
538 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
539 constant.
540 * c-pragma.c (oacc_pragmas): Add "serial" entry.
541
f486280c
RS
5422019-11-08 Richard Sandiford <richard.sandiford@arm.com>
543
544 * c-common.h (gnu_vector_type_p): New function.
545 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
546 vectors to satisfy gnu_vector_type_p.
547 (c_build_vec_convert): Likewise __builtin_convertvector.
548 (convert_vector_to_array_for_subscript): Likewise when applying
549 implicit vector to array conversion.
550 (scalar_to_vector): Likewise when converting vector-scalar
551 operations to vector-vector operations.
552
017c6491
JM
5532019-11-08 Joseph Myers <joseph@codesourcery.com>
554
555 * c.opt (Wold-style-definition): Initialize to -1.
556 * c-opts.c (c_common_post_options): Set warn_old_style_definition
557 to flag_isoc2x if not set explicitly.
558
c01bd174
JM
5592019-11-07 Joseph Myers <joseph@codesourcery.com>
560
561 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
562
0df65305
JM
5632019-11-05 Jason Merrill <jason@redhat.com>
564
565 * c-opts.c (c_common_post_options): -fconcepts-ts implies
566 -fconcepts.
567
e0c866dd
KK
5682019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
569
570 * c-opts.c (c_common_post_options): Update
571 latest_abi_version.
572
f968ef9b
JJ
5732019-11-02 Jakub Jelinek <jakub@redhat.com>
574
d0c464d2
JJ
575 * c-common.h (c_omp_get_context_selector): Remove.
576 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
577 and renamed to omp_get_context_selector.
578
917dd789
JJ
579 * c-omp.c (c_omp_mark_declare_variant): Use
580 omp_context_selector_set_compare.
581
f968ef9b
JJ
582 PR c++/88335 - Implement P1073R3: Immediate functions
583 * c-common.h (enum rid): Add RID_CONSTEVAL.
584 * c-common.c (c_common_reswords): Add consteval.
585
5f6705b7
JJ
5862019-11-01 Martin Sebor <msebor@redhat.com>
587
588 PR middle-end/91679
589 PR middle-end/91647
590 PR middle-end/91463
591 PR middle-end/92312
592 * c-pretty-print.c (direct_abstract_declarator): Print
593 bound in zero-length arrays.
594 * c.opt (-Wzero-length-bounds): New option.
595
43f1814c
NS
5962019-10-30 Nathan Sidwell <nathan@acm.org>
597
598 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
599 macros.
600
ad1539d5
MS
6012019-10-28 Martin Sebor <msebor@redhat.com>
602
603 PR c/66970
604 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
605 even when only preprocessing.
606 * c-common.h (names_builtin_p): Declare new function.
607 * c-lex.c (init_c_lex): Set has_builtin.
608 (c_common_has_builtin): Define a new function.
609 * c-ppoutput.c (init_pp_output): Set has_builtin.
610
135df52c
JJ
6112019-10-24 Jakub Jelinek <jakub@redhat.com>
612
613 * c-common.h (c_omp_context_selector_matches): Remove.
614 * c-omp.c (c_omp_context_selector_matches): Remove.
615 * c-attribs.c (c_common_attribute_table): Add
616 "omp declare target {host,nohost,block}" attributes.
617
8ad0c477
JM
6182019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
619
620 * c-lex.c (c_common_has_attribute): Update nodiscard value.
621
56898e43
RS
6222019-10-14 Richard Sandiford <richard.sandiford@arm.com>
623
624 * c-common.h (user_facing_original_type_p): Declare.
625 * c-common.c: Include c-spellcheck.h.
626 (user_facing_original_type_p): New function.
627
20de9568
JJ
6282019-10-12 Jakub Jelinek <jakub@redhat.com>
629
630 * c-common.h (c_omp_mark_declare_variant,
631 c_omp_context_selector_matches): Declare.
632 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
633 and hsa-common.h.
634 (c_omp_get_context_selector): Support second argument NULL.
635 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
636 functions.
637 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
638 attribute, add "omp declare variant base" and
639 "omp declare variant variant" attributes.
640
175a85b2
JM
6412019-10-11 Joseph Myers <joseph@codesourcery.com>
642
643 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
644 CppReason(CPP_W_C11_C2X_COMPAT).
645
fe2bc27c
JM
6462019-10-11 Joseph Myers <joseph@codesourcery.com>
647
648 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
649 _Decimal64 and _Decimal128.
650
27dfdc0f
JM
6512019-10-10 Joseph Myers <joseph@codesourcery.com>
652
653 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
654 types if DFP not supported.
655
94e7f906
JJ
6562019-10-10 Jakub Jelinek <jakub@redhat.com>
657
658 * c-common.h (c_omp_check_context_selector,
659 c_omp_get_context_selector): Declare.
660 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
661 in diagnostic message.
662 (c_omp_check_context_selector, c_omp_get_context_selector): New
663 functions.
664 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
665 attribute.
666 (handle_omp_declare_variant_attribute): New function.
667
a7160771
MS
6682019-10-09 Martin Sebor <msebor@redhat.com>
669
670 PR tree-optimization/90879
671 * c.opt (-Wstring-compare): New option.
672
cb57504a
JM
6732019-10-08 Andrew Sutton <asutton@lock3software.com>
674 Jason Merrill <jason@redhat.com>
675
676 Update the concepts implementation to conform to the C++20
677 specification, improve compile times, and generally clean up
678 the implementation.
679
680 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
681 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
682 * c.opt: Add -Wconcepts-ts.
683 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
684 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
685 (set_std_cxx2a): Enable concepts by default.
686
fbb2a6dc
JM
6872019-10-08 Joseph Myers <joseph@codesourcery.com>
688
689 * c-opts.c (c_common_post_options): Set
690 -fno-fp-int-builtin-inexact for C2X.
691
8e007055
JJ
6922019-10-05 Jakub Jelinek <jakub@redhat.com>
693
694 PR c++/91369 - Implement P0784R7: constexpr new
695 * c-cppbuiltin.c (c_cpp_builtins): Predefine
696 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
697
843f104d
JM
6982019-10-04 Joseph Myers <joseph@codesourcery.com>
699
700 PR c/82752
701 * c-format.c (C_STD_VER): Handle C2x.
702 (C_STD_NAME): Likewise.
703 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
704 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
705 modifier allowed and 'p' flag.
706 * c-format.h (enum format_std_version): Add STD_C2X.
707 (struct format_char_info): Mention 'p' in comment on flags2.
708
e9c9a142
DM
7092019-10-01 David Malcolm <dmalcolm@redhat.com>
710
711 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
712 calling diagnostic_show_locus, rather than destroying it afterwards.
713
7552c36a
JJ
7142019-10-01 Jakub Jelinek <jakub@redhat.com>
715
716 PR c++/91925
717 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
718 with NULL DECL_FIELD_OFFSET.
719
8209db25
RS
7202019-10-01 Richard Sandiford <richard.sandiford@arm.com>
721
722 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
723 has a type name, use it in preference to the __vector syntax.
724
9343bf99
RS
7252019-09-30 Richard Sandiford <richard.sandiford@arm.com>
726
727 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
728 two spaces between a comma and "...".
729
59bc434a
JJ
7302019-09-27 Jakub Jelinek <jakub@redhat.com>
731
732 PR c++/88203
733 * c-common.h (c_omp_predefined_variable): Declare.
734 * c-omp.c (c_omp_predefined_variable): New function.
735 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
736 for predefined variables.
737
c6447c20
RS
7382019-09-27 Richard Sandiford <richard.sandiford@arm.com>
739
740 * c-common.h (build_function_call_vec): Take the original
741 function decl as an optional final parameter.
742 (check_builtin_function_arguments): Take the original function decl.
743 * c-common.c (check_builtin_function_arguments): Likewise.
744 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
745 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
746
c4438114
JM
7472019-09-15 Jason Merrill <jason@redhat.com>
748
749 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
750 fold_for_warn in "|| mask" warning.
751
68a57628
ML
7522019-09-10 Martin Liska <mliska@suse.cz>
753
754 * c.opt: Use newly added WarnRemoved.
755
f48ef52e
ML
7562019-09-09 Martin Liska <mliska@suse.cz>
757
758 * c.opt: Update comment of removed
759 options that are preserved only for backward
760 compatibility.
761
67f6e649
ML
7622019-09-06 Martin Liska <mliska@suse.cz>
763
764 PR c++/91125
765 * c-common.c: Remove definition of flag_use_repository.
766 * c-common.h: Likewise.
767 * c-opts.c (c_common_handle_option):
768 Do not handle OPT_frepo option.
769 * c.opt: Mark the option with Deprecated.
770
db9d2274
MP
7712019-09-04 Marek Polacek <polacek@redhat.com>
772
773 * c.opt (fdeduce-init-list): Ignored.
774
68e2c199
PK
7752019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
776
777 PR c/78736
778 * c.opt (Wenum-conversion): New option.
779
7a4418a5
JL
7802019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
781
782 * c-attribs.c (handle_section_attribute): Call the
783 handle_generic_attribute target hook after performing target
784 independent processing.
785 (handle_noinit_attribute): Likewise.
786
5f76ab15
ILT
7872019-09-03 Ian Lance Taylor <iant@golang.org>
788
789 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
790 when using -fgo-dump-spec.
791
ae0d3f6a
ML
7922019-09-02 Martin Liska <mliska@suse.cz>
793
794 PR c++/91155
795 * c-common.c (fname_as_string): Use cxx_printable_name for
796 __PRETTY_FUNCTION__ same as was used before r265711.
797
8a902edb
MP
7982019-08-28 Marek Polacek <polacek@redhat.com>
799
800 Implement P1152R4: Deprecating some uses of volatile.
801 PR c++/91361
802 * c-opts.c (c_common_post_options): Enable -Wvolatile by
803 default for C++2a, unless -Wno-deprecated.
804 * c.opt (Wvolatile): New warning.
805
4742dbe7
MP
8062019-08-28 Marek Polacek <polacek@redhat.com>
807
808 PR c++/91360 - Implement C++20 P1143R2: constinit.
809 * c-common.c (c_common_reswords): Add constinit and __constinit.
810 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
811 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
812 RID_LAST_CXX20.
813 (D_CXX20): Define.
814 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
815 * c-format.c (cxx_keywords): Add "constinit".
816 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
817
6a074892
JJ
8182019-08-27 Jakub Jelinek <jakub@redhat.com>
819
820 PR c++/91415
821 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
822 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
823 like COMPOUND_EXPR rather than normal expression.
824
22f8849d
IS
8252019-08-23 Iain Sandoe <iain@sandoe.co.uk>
826
827 PR pch/61250
828 * c-lex.c (c_lex_with_flags): Don't call
829 c_common_no_more_pch () from here.
830
df375b03
JJ
8312019-08-23 Jakub Jelinek <jakub@redhat.com>
832
833 PR middle-end/91283
834 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
835 instead of flag_excess_precision_cmdline.
836 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
837 * c-opts.c (c_common_post_options): Likewise.
838
14b7950f
MS
8392019-08-22 Martin Sebor <msebor@redhat.com>
840
841 PR middle-end/91490
842 * c-common.c (braced_list_to_string): Add argument and overload.
843 Handle flexible length arrays and unions.
844
8bb2ee59
EB
8452019-08-21 Eric Botcazou <ebotcazou@adacore.com>
846
847 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
848 function declarations where arguments are missing. Rename variables.
849
21c1e205
RB
8502019-08-15 Richard Biener <rguenther@suse.de>
851
852 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
853 enabled, define __SIZETYPE__.
854
f0033821
CL
8552019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
856
857 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
858 exclusion with "section" attribute.
859 (attr_noinit_exclusions): New table.
860 (handle_noinit_attribute): New function.
861
4d732405
RS
8622019-08-13 Richard Sandiford <richard.sandiford@arm.com>
863
864 PR middle-end/91421
865 * c-common.c (resolve_overloaded_builtin): Use
866 copy_decl_built_in_function.
867
51ad8481
MS
8682019-08-13 Martin Sebor <msebor@redhat.com>
869
870 PR c/80619
871 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
872 (asm_fprintf_length_spec): Same.
873 * c-format.h (format_lengths): Add FMT_LEN_w.
874
77eb117f
JJ
8752019-08-10 Jakub Jelinek <jakub@redhat.com>
876
877 * c-pragma.h (enum pragma_omp_clause): Add
878 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
879
398e3feb
JJ
8802019-08-07 Jakub Jelinek <jakub@redhat.com>
881
882 * c-pragma.h (enum pragma_omp_clause): Add
883 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
884 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
885 enumeration value.
886
ab574db6
MP
8872019-08-05 Marek Polacek <polacek@redhat.com>
888
889 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
890 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
891 default for C++2a, unless -Wno-deprecated.
892 * c.opt (Wcomma-subscript): New warning.
893
554a530f
JJ
8942019-07-20 Jakub Jelinek <jakub@redhat.com>
895
896 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
897 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
898 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
899 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
900 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
901 constructs with the loop construct.
902
1a888209
JJ
9032019-07-13 Jakub Jelinek <jakub@redhat.com>
904
905 PR c/91149
906 * c-omp.c (c_omp_split_clauses): Fix a pasto in
907 OMP_CLAUSE_REDUCTION_TASK handling.
908
1fdd6f04
JJ
9092019-07-12 Jakub Jelinek <jakub@redhat.com>
910
911 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
912 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
913
99b1c316
MS
9142019-07-09 Martin Sebor <msebor@redhat.com>
915
916 PR c++/61339
1fdd6f04 917 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
918 and others to class.
919 * c-pretty-print.h: Same.
920
6c1dae73
MS
9212019-07-09 Martin Sebor <msebor@redhat.com>
922
923 PR c++/61339
924 * c-format.c (check_argument_type): Change class-key from class to
925 struct and vice versa to match convention and avoid -Wclass-is-pod
926 and -Wstruct-no-pod.
927 * c-pretty-print.h: Same.
928
8ba6ea87
ML
9292019-07-03 Martin Liska <mliska@suse.cz>
930
931 * c-common.c (try_to_locate_new_include_insertion_point): Remove
932 dead assignemts.
933
83eb9522
JJ
9342019-07-03 Jakub Jelinek <jakub@redhat.com>
935
936 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
937 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
938 with OMP_PARALLEL.
939
1c6ffbab
QZ
9402019-07-02 qing zhao <qing.zhao@oracle.com>
941
942 PR preprocessor/90581
943 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
944 * c.opt: Add new option -fmax-include-depth.
945
7ffc7de5
JM
9462019-06-26 Jason Merrill <jason@redhat.com>
947
948 PR c++/55442 - memory-hog with highly recursive constexpr.
949 * c.opt (fconstexpr-loop-limit): New.
950
361af3e4
JJ
9512019-06-25 Jakub Jelinek <jakub@redhat.com>
952
953 PR sanitizer/90954
954 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
955 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
956
ab20d992
JJ
9572019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
958
959 * c-common.c (c_common_nodes_and_builtins): Define
960 alternate "__intN__" name for "__intN" types.
961
f4af4019
JH
9622019-06-24 Jan Hubicka <jh@suse.cz>
963
964 * c-common.c (braced_lists_to_strings): Check that
965 type is array or integer prior checking string flag.
966
da9e9b57
MB
9672019-06-21 Matthew Beliveau <mbelivea@redhat.com>
968
969 PR c++/90875 - added -Wswitch-outside-range option
970 * c.opt (Wswitch-outside-range): Added new option.
971 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
972
3f3d6a6f
MP
9732019-06-21 Marek Polacek <polacek@redhat.com>
974
975 PR c++/90953 - ICE with -Wmissing-format-attribute.
976 * c-common.c (check_function_arguments_recurse): Use
977 get_attribute_name.
978 (check_missing_format_attribute): Likewise.
979
1bf32c11
MP
9802019-06-19 Marek Polacek <polacek@redhat.com>
981
982 PR c++/60364 - noreturn after first decl not diagnosed.
983 * c-attribs.c (handle_noreturn_attribute): No longer static.
984 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
985 Declare.
986 * c-format.c (check_function_format): Use get_attribute_name.
987
a04c0734
MS
9882019-06-19 Martin Sebor <msebor@redhat.com>
989
990 PR translation/90156
991 * c-format.c (function_format_info::format_type): Adjust type.
992 (function_format_info::is_raw): New member.
993 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
994 (decode_format_attr): Adjust call to decode_format_type.
995 Avoid a redundant call to convert_format_name_to_system_name.
996 Avoid abbreviating the word "arguments" in a diagnostic.
997 (format_warning_substr): New function.
998 (avoid_dollar_number): Quote dollar sign in a diagnostic.
999 (finish_dollar_format_checking): Same.
1000 (check_format_info): Same.
1001 (struct baltoks_t): New.
1002 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
1003 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
1004 functions.
1005 (check_format_info_main): Call check_plain. Use baltoks_t. Call
1006 maybe_diag_unbalanced_tokens.
1007 (handle_format_attribute): Spell out the word "arguments" in
1008 a diagnostic.
1009
d3786ebb
MB
10102019-06-11 Matthew Beliveau <mbelivea@redhat.com>
1011
1012 PR c++/90449 - add -Winaccessible-base option.
1013 * c.opt (Winaccessible-base): New option.
1014
bf38f7e9
JJ
10152019-06-10 Jakub Jelinek <jakub@redhat.com>
1016
1017 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
1018 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
1019 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
1020 combined/composite constructs where it is not allowed. Copy over
1021 OMP_CLAUSE_REDUCTION_INSCAN.
1022
0ecf545c
MS
10232019-06-05 Martin Sebor <msebor@redhat.com>
1024
1025 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
1026 (handle_alias_ifunc_attribute): Same.
1027 (handle_copy_attribute): Same.
1028 (handle_weakref_attribute): Same.
1029 (handle_nonnull_attribute): Same.
1030 * c-warn.c (warn_for_sign_compare): Same.
1031 (warn_for_restrict): Same.
1032 * c.opt: Same.
1033
36b34127
MS
10342019-06-05 Martin Sebor <msebor@redhat.com>
1035
1036 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
1037 * c.opt (-Wformat-diag): Remove a spurious period.
1038
357a352f
JJ
10392019-05-29 Jakub Jelinek <jakub@redhat.com>
1040
1041 PR c/90628
1042 * c-common.c (check_builtin_function_arguments)
1043 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
1044 as last argument.
1045
2b8235ea
EB
10462019-05-23 Eric Botcazou <ebotcazou@adacore.com>
1047
1048 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
1049
6d86ddc4
ML
10502019-05-22 Martin Liska <mliska@suse.cz>
1051
1052 PR lto/90500
1053 * c-attribs.c (handle_copy_attribute): Do not copy
1054 target_clones attribute.
1055
419ba5b9
EB
10562019-05-21 Eric Botcazou <ebotcazou@adacore.com>
1057
1058 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
1059 * c-ada-spec.c (print_assignment_operator): New function.
1060 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
1061 assignment operators declared as methods and filter out the others.
1062
e03436e7
TS
10632019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1064
1065 PR c/89433
1066 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
1067 "omp declare target".
1068
a9c697b8
MS
10692019-05-16 Martin Sebor <msebor@redhat.com>
1070
ab20d992
JJ
1071 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
1072 keywords, operators, and types in diagnostics.
1073 (handle_scalar_storage_order_attribute): Same.
1074 (handle_mode_attribute): Same.
1075 (handle_visibility_attribute): Same.
1076 (handle_assume_aligned_attribute): Same.
1077 (handle_no_split_stack_attribute): Same.
1078 * c-common.c (shorten_compare): Same.
1079 (c_common_truthvalue_conversion): Same.
1080 (cb_get_source_date_epoch): Same.
1081 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
1082 in diagnostics.
1083 (interpret_float): Same.
1084 * c-omp.c (c_finish_omp_for): Same.
1085 * c-opts.c (c_common_post_options): Same.
1086 * c-pch.c (c_common_pch_pragma): Same.
1087 * c-pragma.c (pop_alignment): Same.
1088 (handle_pragma_pack): Same.
1089 (apply_pragma_weak): Same.
1090 (handle_pragma_weak): Same.
1091 (handle_pragma_scalar_storage_order): Same.
1092 (handle_pragma_redefine_extname): Same.
1093 (add_to_renaming_pragma_list): Same.
1094 (maybe_apply_renaming_pragma): Same.
1095 (push_visibility): Same.
1096 (handle_pragma_visibility): Same.
1097 (handle_pragma_optimize): Same.
1098 (handle_pragma_message): Same.
1099 * c-warn.c (warn_for_omitted_condop): Same.
1100 (lvalue_error): Same.
a9c697b8 1101
6b943512
RB
11022019-05-15 Richard Biener <rguenther@suse.de>
1103
1104 PR c/90474
1105 * c-common.c (c_common_mark_addressable_vec): Also mark
1106 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
1107 c_mark_addressable.
ab20d992 1108
b744fc85
NS
11092019-05-06 Nathan Sidwell <nathan@acm.org>
1110
1111 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
1112
598f50d7
NS
11132019-04-30 Nathan Sidwell <nathan@acm.org>
1114
1115 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
1116
5bcc5a3b
ML
11172019-04-30 Martin Liska <mliska@suse.cz>
1118
1119 * c-pragma.c (handle_pragma_diagnostic): Provide hints
1120 for unknown options.
1121
e78a87f7
RS
11222019-04-26 Richard Sandiford <richard.sandiford@arm.com>
1123
1124 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
1125 the pointer target rather than the pointer itself.
1126
c280b7ee
JJ
11272019-04-19 Jakub Jelinek <jakub@redhat.com>
1128
1129 PR c/89888
1130 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
1131 arguments.
1132 (c_do_switch_warnings): Remove outside_range_p argument.
1133 * c-common.c (check_case_bounds): Removed.
1134 (c_add_case_label): Remove orig_type and outside_range_p arguments.
1135 Don't call check_case_bounds. Fold low_value as well as high_value.
1136 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
1137 Check for case labels outside of range of original type here and
1138 adjust them.
1139
8e8225e6
JJ
11402019-04-12 Jakub Jelinek <jakub@redhat.com>
1141
63b8a166
JJ
1142 PR translation/90041
1143 * c.opt (-fhandle-exceptions): Use %< and %> around option names
1144 in the Warn diagnostics.
1145
8e8225e6
JJ
1146 PR c/89946
1147 * c-attribs.c (handle_patchable_function_entry_attribute): Add
1148 function comment. Warn if arguments of the attribute are not positive
1149 integer constants.
1150
53a3f614
EB
11512019-04-09 Eric Botcazou <ebotcazou@adacore.com>
1152
1153 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
1154 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
1155
22be5873
EB
11562019-04-07 Eric Botcazou <ebotcazou@adacore.com>
1157
1158 * c-ada-spec.c (is_float128): New predicate extracted from...
1159 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
1160 <REAL_TYPE>: ...here. Call it.
1161
34facf20
DM
11622019-04-05 David Malcolm <dmalcolm@redhat.com>
1163
1164 PR c/89985
1165 * c-warn.c (check_address_or_pointer_of_packed_member): Add
1166 auto_diagnostic_group. Guard inform calls by result of
1167 warning_at call.
1168
05564120
MP
11692019-04-05 Marek Polacek <polacek@redhat.com>
1170
ab20d992 1171 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
05564120
MP
1172 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
1173 of RHS.
1174
7a506c3c
JM
11752019-04-03 Jason Merrill <jason@redhat.com>
1176
1177 PR c++/86586 - -fcompare-debug=-Wsign-compare.
1178 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
1179
ddeae8c8
MS
11802019-04-01 Martin Sebor <msebor@redhat.com>
1181
1182 PR c/89685
1183 * c-attribs.c (handle_copy_attribute): Handle references and
1184 non-constant expressions.
1185
a15ffa22
JJ
11862019-03-22 Jakub Jelinek <jakub@redhat.com>
1187
1188 PR c++/87481
1189 * c.opt (-fconstexpr-ops-limit=): New option.
1190
36a3a7a3
JJ
11912019-03-21 Jakub Jelinek <jakub@redhat.com>
1192
1193 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
1194 template param.
1195
bec1da64
MS
11962019-03-19 Martin Sebor <msebor@redhat.com>
1197
1198 PR tree-optimization/89688
1199 * c-common.c (braced_list_to_string): Make static.
1200 (braced_lists_to_strings): Define new function.
1201 * c-common.h (braced_list_to_string): Remove.
1202 (braced_lists_to_strings): Declare.
1203
1fe61adf
ML
12042019-03-12 Martin Liska <mliska@suse.cz>
1205
1206 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
1207
93964ebd
ML
12082019-03-11 Martin Liska <mliska@suse.cz>
1209
1210 * c-opts.c (c_common_post_options): Wrap apostrophes
1211 in gcc internal format with %'.
1212
a3f9f006
ML
12132019-03-11 Martin Liska <mliska@suse.cz>
1214
1215 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
1216 in a string format message and fix GNU coding style.
1217 * c-common.c (vector_types_convertible_p): Likewise.
1218 (c_build_vec_perm_expr): Likewise.
1219 * c-indentation.c (get_visual_column): Likewise.
1220 * c-opts.c (c_common_handle_option): Likewise.
1221 (c_common_post_options): Likewise.
1222 (sanitize_cpp_opts): Likewise.
1223 * c-pch.c (c_common_pch_pragma): Likewise.
1224 * c-pragma.c (handle_pragma_pack): Likewise.
1225
1db01ff9
JJ
12262019-03-08 Jakub Jelinek <jakub@redhat.com>
1227
1228 PR tree-optimization/89550
1229 * c-common.c (c_common_truthvalue_conversion): Only set
1230 TREE_NO_WARNING if warning_at returned true.
1231 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
1232
ba790e6f
JJ
12332019-02-25 Sandra Loosemore <sandra@codesourcery.com>
1234 Martin Sebor <msebor@gmail.com>
1235
1236 * c.opt (Wmissing-attributes): Clean up doc string.
1237
7da73ba7
JJ
12382019-02-25 Jakub Jelinek <jakub@redhat.com>
1239
1240 PR c/89495
1241 * c-format.c (maybe_read_dollar_number): Compute nargnum in
1242 HOST_WIDE_INT type to avoid overflows and change overflow_flag
1243 checking.
1244
921bb9d1
RB
12452019-02-22 Richard Biener <rguenther@suse.de>
1246
1247 * c-pch.c (no_checksum): Remove.
1248 (pch_init): Remove assertion that executable_checksum is not
1249 all zero.
1250 (c_common_valid_pch): Likewise.
1251
e2ebb05c
MS
12522019-02-18 Martin Sebor <msebor@redhat.com>
1253
1254 PR middle-end/89294
1255 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
1256
3fe53000
DM
12572019-02-16 David Malcolm <dmalcolm@redhat.com>
1258
1259 PR c++/88680
1260 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
1261 implementing -Wtype-limits.
1262
28a8cef1
MS
12632019-02-11 Martin Sebor <msebor@redhat.com>
1264
1265 PR c++/87996
1266 * c-common.c (invalid_array_size_error): New function.
1267 (valid_array_size_p): Call it. Handle size as well as type.
1268 * c-common.h (valid_constant_size_p): New function.
1269 (enum cst_size_error): New type.
1270
ec2be203
DM
12712019-01-31 David Malcolm <dmalcolm@redhat.com>
1272
1273 PR c/89122
1274 * known-headers.cc (get_stdlib_header_for_name): Add
1275 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
1276
8936f047
JJ
12772019-01-31 Jakub Jelinek <jakub@redhat.com>
1278
1279 PR libstdc++/88170
1280 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
1281 a C cast in pp_c_flag_gnu_v3 mode.
1282
6a335b96
JJ
12832019-01-29 Jakub Jelinek <jakub@redhat.com>
1284
1285 PR c/86125
1286 * c-common.c (c_common_nodes_and_builtins): Build type variants for
1287 builtin_structptr_types types even for C.
1288
2a06eba5
BE
12892019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
1290
1291 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
1292 when rhs is of array type correctly. Fix handling of nested structures.
1293 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
1294 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
1295 type casts within nested compound expressions.
1296
18a23298
JJ
12972019-01-22 Jakub Jelinek <jakub@redhat.com>
1298
1299 PR middle-end/88968
1300 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
1301 variable after using BIT_FIELD_REF.
1302
420183d9
L
13032019-01-18 H.J. Lu <hongjiu.lu@intel.com>
1304
1305 PR c/51628
1306 PR c/88664
1307 * c-common.h (warn_for_address_or_pointer_of_packed_member):
1308 Remove the boolean argument.
1309 * c-warn.c (check_address_of_packed_member): Renamed to ...
1310 (check_address_or_pointer_of_packed_member): This. Also
1311 warn pointer conversion.
1312 (check_and_warn_address_of_packed_member): Renamed to ...
1313 (check_and_warn_address_or_pointer_of_packed_member): This.
1314 Also warn pointer conversion.
1315 (warn_for_address_or_pointer_of_packed_member): Remove the
1316 boolean argument. Don't check pointer conversion here.
1317
99063eee
RS
13182019-01-15 Richard Sandiford <richard.sandiford@arm.com>
1319
1320 PR inline-asm/52813
1321 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
1322
a30d0196
JJ
13232019-01-14 Jakub Jelinek <jakub@redhat.com>
1324
1325 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
1326 and __cpp_nontype_template_parameter_auto. Add a comment that
1327 __cpp_template_auto is deprecated.
1328
2d91f79d
TH
13292019-01-14 Tom Honermann <tom@honermann.net>
1330
1331 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
1332 * c-common.c (c_common_reswords): Add char8_t.
1333 (fix_string_type): Use char8_t for the type of u8 string literals.
1334 (c_common_get_alias_set): char8_t doesn't alias.
1335 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
1336 C++.
1337 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
1338 (keyword_begins_type_specifier): Add RID_CHAR8.
1339 * c-common.h (rid): Add RID_CHAR8.
1340 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
1341 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
1342 Define char8_type_node and char8_array_type_node.
1343 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
1344 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
1345 (c_cpp_builtins): Predefine __cpp_char8_t.
1346 * c-lex.c (lex_string): Use char8_array_type_node as the type of
1347 CPP_UTF8STRING.
1348 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
1349 * c-opts.c: If not otherwise specified, enable -fchar8_t when
1350 targeting C++2a.
1351 * c.opt: Add the -fchar8_t command line option.
1352
23db6ced
MS
13532019-01-14 Martin Sebor <msebor@redhat.com>
1354
1355 PR target/88638
1356 * c-attribs.c (positional_argument): Call valid_format_string_type_p
1357 and issue errors if it fails.
1358 * c-common.h (valid_format_string_type_p): Declare.
1359 * c-format.c (valid_stringptr_type_p): Rename...
1360 (valid_format_string_type_p): ...to this and make extern.
1361 (handle_format_arg_attribute): Adjust to new name.
1362 (check_format_string): Same.
1363
234c3818
L
13642019-01-13 H.J. Lu <hongjiu.lu@intel.com>
1365
1366 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
1367 Replace "may may" with "may" in warning message.
1368
d8fcab68
JJ
13692019-01-07 Jakub Jelinek <jakub@redhat.com>
1370
1371 PR c++/85052
1372 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
1373 (c_build_vec_convert): Declare.
1374 * c-common.c (c_build_vec_convert): New function.
1375
29d24852
MS
13762019-01-04 Martin Sebor <msebor@redhat.com>
1377
1378 PR c/88546
1379 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
1380 Handle C++ empty throw specification and C11 _Noreturn.
1381 (has_attribute): Also handle C11 _Noreturn.
1382
9069a4c9
MS
13832019-01-04 Martin Sebor <msebor@redhat.com>
1384
1385 PR c/88363
1386 * c-attribs.c (positional_argument): Also accept enumerated types.
1387
a5544970
JJ
13882019-01-01 Jakub Jelinek <jakub@redhat.com>
1389
1390 Update copyright years.
1391
da77eace
L
13922018-12-20 H.J. Lu <hongjiu.lu@intel.com>
1393
1394 PR c/51628
1395 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
1396 * c-warn.c (check_alignment_of_packed_member): New function.
1397 (check_address_of_packed_member): Likewise.
1398 (check_and_warn_address_of_packed_member): Likewise.
1399 (warn_for_address_or_pointer_of_packed_member): Likewise.
1400 * c.opt: Add -Wno-address-of-packed-member.
1401
573767d4
DM
14022018-12-20 David Malcolm <dmalcolm@redhat.com>
1403
1404 PR c++/87504
1405 * c-warn.c (get_outermost_macro_expansion): New function.
1406 (spelled_the_same_p): Use it to unwind the macro expansions, and
1407 compare the outermost macro in each nested expansion, rather than
1408 the innermost.
1409
a14feb3c
DM
14102018-12-19 David Malcolm <dmalcolm@redhat.com>
1411
1412 PR c++/87504
1413 * c-common.h (warn_tautological_cmp): Convert 1st param from
1414 location_t to const op_location_t &.
1415 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
1416 when testing for INTEGER_CST.
1417 (warn_tautological_bitwise_comparison): Convert 1st param from
1418 location_t to const op_location_t &; use it to build a
1419 binary_op_rich_location, and use this.
1420 (spelled_the_same_p): New function.
1421 (warn_tautological_cmp): Convert 1st param from location_t to
1422 const op_location_t &. Warn for macro expansions if
1423 spelled_the_same_p. Use binary_op_rich_location.
1424
dfd7fdca
DM
14252018-12-19 David Malcolm <dmalcolm@redhat.com>
1426
1427 PR c++/43064
1428 PR c++/43486
1429 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
1430 (verify_tree): Handle location wrappers.
1431 (c_common_truthvalue_conversion): Strip any location wrapper.
1432 Handle CONST_DECL.
1433 (fold_offsetof): Strip any location wrapper.
1434 (complete_array_type): Likewise for initial_value.
1435 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
1436 index before checking for INTEGER_CST.
1437 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
1438 print parentheses around location wrappers.
1439 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
1440 before checking for INTEGER_CST.
1441 (warn_tautological_bitwise_comparison): Call
1442 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
1443 before checking for INTEGER_CST.
1444 (readonly_error): Strip any location wrapper.
1445 (warn_array_subscript_with_type_char): Strip location wrappers
1446 before checking for INTEGER_CST. Use the location of the index if
1447 available.
1448
5c8b3702
JM
14492018-12-06 Jason Merrill <jason@redhat.com>
1450
1451 PR c++/88136 - -Wdeprecated-copy false positives
1452 * c.opt (Wdeprecated-copy-dtor): New.
1453 (Wdeprecated-copy): Move to -Wextra.
1454
673670da
MS
14552018-11-29 Martin Sebor <msebor@redhat.com>
1456
1457 PR c/88172
1458 PR testsuite/88208
1459 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
1460 alignments to values less than the target requires.
1461 (has_attribute): For attribute aligned consider both the attribute
1462 and the alignment bits.
1463 * c-common.c (c_init_attributes): Optionally issue a warning for
1464 zero alignment.
1465
04864ec8
MS
14662018-11-28 Martin Sebor <msebor@redhat.com>
1467
1468 PR c/88065
1469 PR c/87297
1470 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
1471 or destination is an error.
1472
ace83db0
JJ
14732018-11-28 Jakub Jelinek <jakub@redhat.com>
1474
1475 PR c++/88215
1476 * c-ubsan.c: Include langhooks.h.
1477 (ubsan_instrument_division): Change gcc_assert that main variants
1478 of op0 and op1 types are equal to gcc_checking_assert that the
1479 main variants are compatible types.
1480
da193a27
EB
14812018-11-27 Eric Botcazou <ebotcazou@adacore.com>
1482
1483 * c-ada-spec.c: Include stringpool.h.
1484 (has_static_fields): Return false for incomplete types.
1485 (is_tagged_type): Likewise.
1486 (has_nontrivial_methods): Likewise.
1487 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
1488 (struct overloaded_name_hash): New structure.
1489 (struct overloaded_name_hasher): Likewise.
1490 (overloaded_names): New global variable.
1491 (init_overloaded_names): New static function.
1492 (overloaded_name_p): New predicate.
1493 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
1494 on the TYPE_STUB_DECL of the original type of a typedef, if any.
1495 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
1496 Remove always-true condition and dump forward types.
1497 (dump_ada_specs): Delete overloaded_names.
1498
98f08eb8
MS
14992018-11-20 Martin Sebor <msebor@redhat.com>
1500
1501 * c-attribs.c (type_for_vector_size): New function.
1502 (type_valid_for_vector_size): Same.
1503 (handle_vector_size_attribute): Move code to the functions above
1504 and call them.
1505 (validate_attribute, has_attribute): New functions.
1506 * c-common.h (has_attribute): Declare.
1507 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
1508 * c-common.c (c_common_resword): Same.
1509
2674fa47
JM
15102018-11-16 Jason Merrill <jason@redhat.com>
1511
1512 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
1513 * c-attribs.c (attr_cold_hot_exclusions): Make public.
1514
258b3854
JJ
15152018-11-16 Jakub Jelinek <jakub@redhat.com>
1516
1517 PR middle-end/87854
1518 * c-common.c (fix_string_type): Reject string literals larger than
1519 TYPE_MAX_VALUE (ssizetype) bytes.
1520
1d249509
MS
15212018-11-15 Martin Sebor <msebor@redhat.com>
1522
1523 PR c++/87541
1524 PR c++/87542
1525 * c-attribs.c (positional_argument): New function.
1526 (handle_alloc_size_attribute): Use it and simplify.
1527 (handle_alloc_align_attribute): Same.
1528 (handle_assume_aligned_attribute): Same.
1529 (handle_nonnull_attribute): Same.
1530 * c-common.c (check_function_arguments): Pass fntype to
1531 check_function_format.
1532 * c-common.h (check_function_format): Add an argument.
1533 (PosArgFlags, positional_argument): Declare new type and function.
1534 * c-format.c (decode_format_attr): Add arguments.
1535 (check_format_string, get_constant): Same.
1536 (convert_format_name_to_system_name): Adjust.
1537
478dd60d
DM
15382018-11-15 David Malcolm <dmalcolm@redhat.com>
1539
1540 PR other/19165
1541 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
1542
8cca0163
JJ
15432018-11-14 Jakub Jelinek <jakub@redhat.com>
1544
8ee09943
JJ
1545 P1236R1 - Signed integers are two's complement
1546 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
1547 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
1548 with in-range second operand well defined for -std=c++2a.
1549
8cca0163
JJ
1550 PR other/88007
1551 * c-common.c (parse_optimize_options): Allocate option string from
1552 opts_obstack rather than as GC memory. Move the allocation after
1553 warning for invalid option.
1554
620e594b
DM
15552018-11-13 David Malcolm <dmalcolm@redhat.com>
1556
1557 * c-common.c (c_get_substring_location): Update for renaming of
1558 get_source_location_for_substring to get_location_within_string.
1559 * c-lex.c: Replace "source_location" with "location_t".
1560 * c-opts.c: Likewise.
1561 * c-ppoutput.c: Likewise.
1562
f9731de3
MS
15632018-11-13 Martin Sebor <msebor@redhat.com>
1564
1565 PR middle-end/81824
1566 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
1567 (handle_tls_model_attribute): Improve diagnostics.
1568
e4bd6d5e
JM
15692018-11-12 Jason Merrill <jason@redhat.com>
1570
a6bb6b07
JM
1571 * c-cppbuiltin.c (c_cpp_builtins): Define
1572 __cpp_impl_destroying_delete.
1573
e4bd6d5e
JM
1574 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
1575 __cpp_conditional_explicit.
1576
79a2c428
MS
15772018-11-09 Martin Sebor <msebor@redhat.com>
1578
1579 PR middle-end/81824
1580 * c-attribs.c (handle_copy_attribute): New function.
1581
4c7bd361
MS
15822018-11-09 Martin Sebor <msebor@redhat.com>
1583
1584 PR c/87795
1585 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
1586
28567c40
JJ
15872018-11-08 Jakub Jelinek <jakub@redhat.com>
1588
1589 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
1590 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
1591 enum omp_memory_order MEMORY_ORDER.
1592 (c_finish_omp_flush): Add MO argument.
1593 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
1594 (c_finish_omp_for): Add FINAL_P argument.
1595 * c-omp.c: Include memmodel.h.
1596 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
1597 OMP_TASKGROUP_CLAUSES to it.
1598 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
1599 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
1600 instead of OMP_ATOMIC_SEQ_CST.
1601 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
1602 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
1603 __atomic_thread_fence call with the given value.
1604 (check_omp_for_incr_expr): Formatting fixes.
1605 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
1606 even in OpenMP loops, diagnose if NE_EXPR and incr expression
1607 is not constant expression 1 or -1. Transform NE_EXPR loops
1608 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
1609 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
1610 loops too.
1611 (c_omp_split_clauses): Add support for combined
1612 #pragma omp parallel master and
1613 #pragma omp {,parallel }master taskloop{, simd} constructs.
1614 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
1615 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
1616 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
1617 (c_omp_predetermined_sharing): Don't return
1618 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
1619 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
1620 PRAGMA_OMP_REQUIRES.
1621 * c-pragma.h (enum pragma_kind): Likewise.
1622 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
1623 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1624
204839e7
DM
16252018-11-08 David Malcolm <dmalcolm@redhat.com>
1626
1627 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
1628
d8010ee4
DM
16292018-11-08 David Malcolm <dmalcolm@redhat.com>
1630
1631 * c-format.c (local_cgraph_node_ptr_node): New variable.
1632 (gcc_dump_printf_char_table): Add entry for %C.
1633 (get_pointer_to_named_type): New function, taken from the handling
1634 code for "gimple *" from...
1635 (init_dynamic_diag_info): ...here. Add handling for
1636 "cgraph_node *".
1637 * c-format.h (T_CGRAPH_NODE): New.
1638
4be5c72c
JM
16392018-10-19 Jason Merrill <jason@redhat.com>
1640
1641 * c-cppbuiltin.c (c_cpp_builtins): Add
1642 __cpp_nontype_template_parameter_class.
1643
f3f6029d
NS
16442018-10-31 Nathan Sidwell <nathan@acm.org>
1645
ab5324fb
NS
1646 * c-opts.c (c_finish_options): Force command line macro
1647 location. Refactor to avoid repeating main debug hook.
1648 (push_command_line_include): Clarify comment.
1649
f3f6029d
NS
1650 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
1651
91e3ec29
MS
16522018-10-30 Martin Sebor <msebor@redhat.com>
1653
1654 PR middle-end/87041
1655 * c-format.c (check_format_types): Avoid diagnosing null pointer
1656 arguments to printf-family of functions.
1657
b5ff4f5c
MP
16582018-10-30 Marek Polacek <polacek@redhat.com>
1659
1660 Implement P0892R2, explicit(bool).
1661 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
1662
7e2de6df
DM
16632018-10-29 David Malcolm <dmalcolm@redhat.com>
1664
1665 * name-hint.h (name_hint::take_deferred): New member function.
1666
b2bf438c
DM
16672018-10-29 David Malcolm <dmalcolm@redhat.com>
1668
1669 PR c++/56856
1670 * c-common.c (check_function_sentinel): Call fold_for_warn on the
1671 argument.
1672 (check_function_restrict): Rename param "argarray" to
1673 "unfolded_argarray", and make a copy named "argarray", calling
1674 fold_for_warn on each argument.
1675 (check_function_arguments): Add note about responsibility for
1676 folding the arguments.
1677
9f936c86
JM
16782018-10-17 Joseph Myers <joseph@codesourcery.com>
1679
1680 * c-common.c (flag_isoc2x): New variable.
1681 * c-common.h (clk_c): Update comment to reference C2X.
1682 (flag_isoc99, flag_isoc11): Update comments to reference future
1683 standard versions in general.
1684 (flag_isoc2x): Declare.
1685 * c-opts.c (set_std_c2x): New function.
1686 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
1687 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
1688 flag_isoc2x to 0.
1689 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
1690
7a8a92c4
JM
16912018-10-17 Joseph Myers <joseph@codesourcery.com>
1692
1693 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
1694 (std=iso9899:2018): Document C17 as published in 2018.
1695
4dc003ff
CL
16962018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
1697
1698 PR c++/87364
1699 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
1700
79371671
WW
17012018-10-11 Will Wray <wjwray@gmail.com>
1702
1703 PR c++/87364
1704 * c-pretty-print.h (pp_c_type_cast): Prototype.
1705 (pp_c_integer_constant): Likewise.
1706 * c-pretty-print.c (pp_c_type_cast): No longer static.
1707 (pp_c_integer_constant): Likewise.
1708 (pp_c_enumeration_constant): Fix loop termination when finding
1709 name of constant. No longer returns a value. Call
1710 pp_c_integer_constant.
1711 (c_pretty_printer::constant): Update for changes to
1712 pp_c_enumeration_constant.
1713
46c62690
JJ
17142018-10-11 Jakub Jelinek <jakub@redhat.com>
1715
1716 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
1717 for no_unique_address.
1718
c24300ba
DM
17192018-10-09 David Malcolm <dmalcolm@redhat.com>
1720
1721 * c-common.c (c_option_controlling_cpp_error): Rename to...
1722 (c_option_controlling_cpp_diagnostic): ...this, and convert
1723 "reason" from int to enum.
1724 (c_cpp_error): Rename to...
1725 (c_cpp_diagnostic): ...this, converting level and reason to enums.
1726 * c-common.h (c_cpp_error): Rename to...
1727 (c_cpp_diagnostic): ...this, converting level and reason to enums.
1728 * c-opts.c (c_common_init_options): Update for renaming.
1729
8656dafa
RS
17302018-10-08 Richard Sandiford <richard.sandiford@arm.com>
1731
1732 PR c/87286
1733 * c-common.c (vector_types_compatible_elements_p): Use
1734 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
1735
8cff0652
VK
17362018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
1737
1738 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
1739 to generate constructor destructor priority warning.
1740 * c.opt (-Wprio-ctor-dtor): New option.
1741
bedf03a2
JM
17422018-10-01 Jason Merrill <jason@redhat.com>
1743
1744 * c-lex.c (c_common_has_attribute): Add no_unique_address.
1745
6cc430c1
EB
17462018-10-01 Eric Botcazou <ebotcazou@adacore.com>
1747
1748 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
1749 (dump_ada_node): Add const keyword.
1750
87677ac7
ML
17512018-09-25 Martin Liska <mliska@suse.cz>
1752
1753 * c-common.c (c_common_truthvalue_conversion):
1754 Remove Pascal from documentation.
1755
518196cb
EB
17562018-09-21 Eric Botcazou <ebotcazou@adacore.com>
1757
1758 * c-ada-spec.c: Include diagnostic.h.
1759 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
1760
a599af84
MP
17612018-09-19 Marek Polacek <polacek@redhat.com>
1762
1763 * c.opt (Wclass-conversion): New.
1764
9c4a4b3c
DM
17652018-09-17 David Malcolm <dmalcolm@redhat.com>
1766
1767 * c-format.c (range_label_for_format_type_mismatch::get_text):
1768 Update for new param.
1769
c896ecfe
DM
17702018-09-17 David Malcolm <dmalcolm@redhat.com>
1771
1772 * c-format.c (format_warning_at_char): Update for introduction of
1773 format_string_diagnostic_t.
1774 (format_type_warning): Likewise.
1775
80c6d1f4
MJ
17762018-09-17 Martin Jambor <mjambor@suse.cz>
1777
1778 PR c/63886
1779 * c.opt (Wabsolute-value): New.
1780
6d900107
BE
17812018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1782
1783 * c-common.c (complete_flexible_array_elts): New helper function.
1784 * c-common.h (complete_flexible_array_elts): Declare.
1785
b5764229
BE
17862018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1787
1788 * c-common.c (braced_list_to_string): Remove eval parameter.
1789 Add some more checks. Always create zero-terminated STRING_CST.
1790 * c-common.h (braced_list_to_string): Adjust prototype.
1791
85204e23
DM
17922018-08-27 David Malcolm <dmalcolm@redhat.com>
1793
1794 PR 87091
1795 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
1796 to a tri-state.
1797 (maybe_suggest_missing_token_insertion): Likewise.
1798 (maybe_add_include_fixit): Add param "override_location". If set,
1799 and source-printing is enabled, then override the rich_location's
1800 primary location with that of the insertion point for the fix-it
1801 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
1802 * c-common.h (extern void maybe_add_include_fixit): Add bool
1803 param.
1804 * c-format.c (selftest::test_type_mismatch_range_labels): Update
1805 for conversion of show_caret_p to a tri-state.
1806 * c-warn.c (warn_for_restrict): Likewise.
1807 * known-headers.cc
1808 (suggest_missing_header::~suggest_missing_header): Update call to
1809 maybe_add_include_fixit to suggest overriding the location, as it
1810 is for a note.
1811
3d78e008
ML
18122018-08-27 Martin Liska <mliska@suse.cz>
1813
1814 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
1815 fndecl_built_in_p and remove check for FUNCTION_DECL if
1816 possible.
3d78e008
ML
1817 (check_builtin_function_arguments): Likewise.
1818 (reject_gcc_builtin): Likewise.
1819 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
1820
b5be6d0c
MP
18212018-08-26 Marek Polacek <polacek@redhat.com>
1822
1823 PR c++/87029, Implement -Wredundant-move.
1824 * c.opt (Wredundant-move): New option.
1825
79ca9c35
MP
18262018-08-21 Marek Polacek <polacek@redhat.com>
1827
1828 PR c++/86981, Implement -Wpessimizing-move.
1829 * c.opt (Wpessimizing-move): New option.
1830
097f82ec
DM
18312018-08-20 David Malcolm <dmalcolm@redhat.com>
1832
1833 PR other/84889
1834 * c-attribs.c (common_handle_aligned_attribute): Add
1835 auto_diagnostic_group instance.
1836 * c-indentation.c (warn_for_misleading_indentation): Likewise.
1837 * c-opts.c (c_common_post_options): Likewise.
1838 * c-warn.c (warn_logical_not_parentheses): Likewise.
1839 (warn_duplicated_cond_add_or_warn): Likewise.
1840 (warn_for_multistatement_macros): Likewise.
1841
3fb558b1
NS
18422018-08-20 Nathan Sidwell <nathan@acm.org>
1843
1844 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
1845 access.
1846
800c0e98
NS
18472018-08-17 Nathan Sidwell <nathan@acm.org>
1848
1849 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
1850 field.
1851 (laxy_hex_fp_value_count): Make unsigned.
1852 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
1853 manipulate the macro.
1854 (builtin_defin_with_hex_fp_value): Adjust callback name, use
1855 cpp_define_lazily.
1856
6f795a92
DM
18572018-08-17 David Malcolm <dmalcolm@redhat.com>
1858
1859 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
1860 (gcc_dump_printf_length_specs): New.
1861 (gcc_dump_printf_flag_pairs): New.
1862 (gcc_dump_printf_flag_specs): New.
1863 (gcc_dump_printf_char_table): New.
1864 (format_types_orig): Add entry for "gcc_dump_printf".
1865 (init_dynamic_diag_info): Set up length_char_specs and
1866 conversion_specs for gcc_dump_printf_format_type.
1867 (handle_format_attribute): Handle gcc_dump_printf_format_type.
1868
c5d725c0
NS
18692018-08-17 Nathan Sidwell <nathan@acm.org>
1870
10f04917
NS
1871 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
1872
c5d725c0
NS
1873 * c-ada-spec.c: Don't #include "cpp-id-data.h"
1874 * c-cppbuiltin.c: Likewise.
1875
c0c12356
ML
18762018-08-17 Martin Liska <mliska@suse.cz>
1877
1878 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
1879 Ignore/Deprecated flag. Warning is done automatically for
1880 Deprecated flags.
c0c12356 1881
10fcc142
DM
18822018-08-16 David Malcolm <dmalcolm@redhat.com>
1883
1884 PR c++/70693
1885 * c-common.c (selftest::c_family_tests): Call
1886 selftest::c_indentation_c_tests.
1887 * c-common.h (selftest::c_indentation_c_tests): New decl.
1888 * c-indentation.c: Include "selftest.h".
1889 (next_tab_stop): Add "tab_width" param, rather than accessing
1890 cpp_opts.
1891 (get_visual_column): Likewise. Clarify comment. Bulletproof
1892 against reading past the end of the line.
1893 (get_first_nws_vis_column): Add "tab_width" param.
1894 (detect_intervening_unindent): Likewise.
1895 (should_warn_for_misleading_indentation): Read tab width from
1896 cpp_opts and pass around.
1897 (selftest::test_next_tab_stop): New test.
1898 (selftest::assert_get_visual_column_succeeds): New function.
1899 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
1900 (selftest::assert_get_visual_column_fails): New function.
1901 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
1902 (selftest::test_get_visual_column): New test.
1903 (selftest::c_indentation_c_tests): New function.
1904
3f6677f4
NS
19052018-08-16 Nathan Sidwell <nathan@acm.org>
1906
1907 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
1908 (store_ada_macro): Likewise.
1909 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
1910 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
1911
96e6ae57
DM
19122018-08-15 David Malcolm <dmalcolm@redhat.com>
1913
1914 * c-format.c: Include "selftest-diagnostic.h" and
1915 "gcc-rich-location.h".
1916 (format_warning_at_char): Pass NULL for new label params of
1917 format_warning_va.
1918 (class indirection_suffix): New class.
1919 (class range_label_for_format_type_mismatch): New class.
1920 (format_type_warning): Move logic for generating "*" suffix to
1921 class indirection_suffix. Create "fmt_label" and "param_label"
1922 to show their types, and pass them to the
1923 format_warning_at_substring calls.
1924 (selftest::test_type_mismatch_range_labels): New test.
1925 (selftest::c_format_c_tests): Call it.
1926
23aa9f7c
MS
19272018-08-13 Martin Sebor <msebor@redhat.com>
1928
1929 PR tree-optimization/71625
1930 * c-common.c (braced_list_to_string): New function.
1931 * c-common.h (braced_list_to_string): Declare it.
1932
f10a9135
NS
19332018-08-08 Nathan Sidwell <nathan@acm.org>
1934
1935 * c-common.c (try_to_locate_new_include_inertion_point): Use
1936 linemap_included_from_linemap.
1937 * c-lex.c (fe_file_change): Use linemap_included_from.
1938 * c-ppoutput.c (pp_file_change): Likewise.
1939
8a45b051
MS
19402018-08-01 Martin Sebor <msebor@redhat.com>
1941
1942 PR tree-optimization/86650
ab20d992 1943 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
8a45b051
MS
1944 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
1945 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
1946 * c-format.h (T89_G): Update to be "gimple *" rather than
1947 "gcall *".
1948 (local_gcall_ptr_node): Rename...
1949 (local_gimple_ptr_node): ...to this.
1950
e540ccc0
DM
19512018-07-31 David Malcolm <dmalcolm@redhat.com>
1952
1953 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
1954 table entries for gcc_diag_char_table, and the 'Z' entry from
1955 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
1956 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
1957 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
1958 adding missing "Z" for this table. Remove erroneous "G" and "K"
1959 entries.
1960 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
1961 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
1962 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
1963
425fc685
RE
19642018-07-31 Richard Earnshaw <rearnsha@arm.com>
1965
1966 * c-common.c (speculation_safe_resolve_call): New function.
1967 (speculation_safe_resolve_params): New function.
1968 (speculation_safe_resolve_return): New function.
1969 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
1970 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
1971 __HAVE_SPECULATION_SAFE_VALUE.
1972
181463c2
DM
19732018-07-20 David Malcolm <dmalcolm@redhat.com>
1974
1975 * c-common.c (c_cpp_error): Remove redundant "line_table"
1976 parameter from call to rich_location::set_range.
1977 (maybe_suggest_missing_token_insertion): Likewise.
1978
0d7f9065
MS
19792018-07-20 Martin Sebor <msebor@redhat.com>
1980
1981 PR middle-end/82063
ab20d992 1982 * c.opt (-Warray-bounds): Remove redundant -Wall.
0d7f9065 1983
00abf86c
MS
19842018-07-20 Martin Sebor <msebor@redhat.com>
1985
1986 PR middle-end/82063
1987 * c-common.h (c_common_handle_option): Change function argument
1988 to HOST_WIDE_INT.
1989 * c-opts.c (c_common_init_options): Same.
1990 (c_common_handle_option): Same. Remove special handling of
1991 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
1992 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
1993 options to take a HOST_WIDE_INT argument and accept a byte-size
1994 suffix. Initialize.
1995 (-Wvla-larger-than): Same.
1996 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
1997 (-Wno-vla-larger-than): Same.
1998
9b452033
JJ
19992018-07-12 Jakub Jelinek <jakub@redhat.com>
2000
2001 * c-attribs.c (c_common_attribute_table): Add
2002 "omp declare target implicit" attribute.
2003
cd0762f3
RB
20042018-07-12 Richard Biener <rguenther@suse.de>
2005
2006 PR c/86453
2007 * c-attribs.c (handle_packed_attribute): Do not build a variant
2008 type with TYPE_PACKED, instead ignore the attribute if we may
2009 not apply to the original type.
2010
0b27c3ed
JJ
20112018-07-10 Jakub Jelinek <jakub@redhat.com>
2012
2013 PR c++/86443
2014 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
2015 to contain TREE_LIST for both the original class iterator and the
2016 "last" helper var.
2017
e730a0ef
EB
20182018-07-07 Eric Botcazou <ebotcazou@adacore.com>
2019
2020 * c-ada-spec.c (to_ada_name): Remove index parameter.
2021 (pp_ada_tree_identifier): Likewise.
2022 (dump_ada_macros): Adjust call to to_ada_name.
2023 (struct overloaded_name_hash): Delete.
2024 (struct overloaded_name_hasher): Likewise.
2025 (overloaded_names): Likewise.
2026 (compute_overloading_index): Likewise.
2027 (dump_ada_decl_name): Do not call compute_overloading_index and
2028 adjust calls to pp_ada_tree_identifier.
2029 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
2030 (dump_ada_import): Add spc parameter and switch to aspect syntax.
2031 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
2032 (dump_ada_enum_type): Remove type and display_convention parameters.
2033 Adjust calls to pp_ada_tree_identifier.
2034 (dump_ada_node): Likewise and for dump_ada_structure.
2035 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
2036 and tidy up.
2037 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
2038 syntax.
2039 (print_constructor): Adjust call to pp_ada_tree_identifier.
2040 (print_destructor): Likewise.
2041 (dump_ada_declaration): Switch to aspect syntax.
2042 (dump_ada_structure): Likewise and tidy up. Replace display_convention
2043 parameter with nested parameter.
2044 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
2045 (dump_ada_specs): Do not delete overloaded_names table.
2046
8de583fc
PB
20472018-07-06 Peter Bergner <bergner@linux.ibm.com>
2048
2049 PR target/86324
e730a0ef 2050 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
2051 target hook.
2052
09cff37b
NS
20532018-07-05 Nathan Sidwell <nathan@acm.org>
2054
2055 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
2056 NO_IMPLICIT_EXTERN_C.
2057
98086b2b
ML
20582018-06-28 Martin Liska <mliska@suse.cz>
2059
2060 * cppspec.c: Include opt-suggestions.h.
2061
ab20d992
JJ
20622018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2063 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
2064 Cesar Philippidis <cesar@codesourcery.com>
2065
2066 * c-pragma.h (enum pragma_omp_clause): Add
2067 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
2068 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
2069
f41b7612
JJ
20702018-06-20 Jakub Jelinek <jakub@redhat.com>
2071
2072 PR c++/86210
2073 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
2074 comment.
2075
4252ccd7
MS
20762018-06-18 Martin Sebor <msebor@redhat.com>
2077
2078 PR middle-end/85602
2079 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
2080 nonstring.
2081
e197e64e
KV
20822018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2083
2084 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
2085
34a7a230
JM
20862018-06-13 Jason Merrill <jason@redhat.com>
2087
5cef3733
JM
2088 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
2089 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
2090 handling.
2091
34a7a230
JM
2092 PR c++/86094 - wrong code with defaulted move ctor.
2093 * c-opts.c (c_common_post_options): Bump the current ABI version to
2094 13. Set warn_abi_version and flag_abi_compat_version to the current
2095 version rather than 0. Fix defaulting flag_abi_compat_version from
2096 warn_abi_version.
2097
bb0f14ae
MS
20982018-06-12 Martin Sebor <msebor@redhat.com>
2099
2100 PR c/85931
2101 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
2102 sizeof source and destination yields the same value.
2103
3713f2e2
ML
21042018-06-12 Martin Liska <mliska@suse.cz>
2105
2106 * c.opt: Make MPX-related options as Deprecated.
2107
4af78ef8
DM
21082018-06-08 David Malcolm <dmalcolm@redhat.com>
2109
2110 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
2111 rather than 0.
2112
31db0fe0
ML
21132018-06-08 Martin Liska <mliska@suse.cz>
2114
2115 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
2116 for MPX (macros, related functions, fields in cgraph_node, ...).
2117 (handle_bnd_legacy): Likewise.
2118 (handle_bnd_instrument): Likewise.
2119 * c.opt: Likewise.
2120
fe16acf2
JJ
21212018-06-06 Jakub Jelinek <jakub@redhat.com>
2122
2123 PR c++/86068
2124 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
2125 __cpp_transactional_memory to 201500 instead of 210500.
2126
4dbdb49b
JM
21272018-06-06 Jason Merrill <jason@redhat.com>
2128
2129 PR c++/85710 - ICE with -Wmemset-elt-size.
2130 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
2131
f8ad043f
JM
21322018-06-01 Jason Merrill <jason@redhat.com>
2133
2134 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
2135 201703.
2136
abc24d93
EB
21372018-06-01 Eric Botcazou <ebotcazou@adacore.com>
2138
2139 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
2140 declaration for a typedef independently of whether the declaration of
2141 the subtype is generated.
2142
d258f4aa
MS
21432018-05-31 Martin Sebor <msebor@redhat.com>
2144
2145 PR c/82063
2146 * c.opt (-Wno-alloc-size-larger-than): New option.
2147
b67b9225
DP
21482018-04-22 David Pagan <dave.pagan@oracle.com>
2149
2150 PR c/55976
2151 * c-opts.c (c_common_post_options): Set default for warn_return_type
ab20d992 2152 for C++/C++ with ObjC extensions only. For C, makes it possible to
b67b9225
DP
2153 differentiate between default (no option), -Wreturn-type, and
2154 -Wno-return-type.
2155
04eb9c55
JM
21562018-05-29 Jason Merrill <jason@redhat.com>
2157
2158 * c.opt (Winit-list-lifetime): New flag.
2159
b0c31bc6
BE
21602018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
2161
2162 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
2163 splay_tree_delete_pointers.
2164
44284983
JJ
21652018-05-26 Jakub Jelinek <jakub@redhat.com>
2166
2167 PR bootstrap/85921
2168 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
2169 noinline variable to workaround broken kernel headers.
2170
b46b715d
JM
21712018-05-18 Jason Merrill <jason@redhat.com>
2172
2173 * c.opt (Wdeprecated-copy): New flag.
2174
40659769
ML
21752018-05-17 Martin Liska <mliska@suse.cz>
2176
2177 * c-warn.c (overflow_warning): Do not use
2178 space in between 'G_' and '('.
2179
403962ea
JM
21802018-05-09 Jason Merrill <jason@redhat.com>
2181
2182 * c-common.c (valid_array_size_p): Add complain parameter.
2183 * c-common.h: ...which defaults to true.
2184
1c9ee609
JJ
21852018-05-11 Jakub Jelinek <jakub@redhat.com>
2186
2187 PR c/85696
2188 * c-omp.c (c_omp_predetermined_sharing): Return
2189 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
2190
19916065
ML
21912018-05-11 Martin Liska <mliska@suse.cz>
2192
92a285c1 2193 PR sanitizer/85556
19916065
ML
2194 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
2195 TREE_LIST values.
2196
79e7b1fe
JJ
21972018-05-10 Jakub Jelinek <jakub@redhat.com>
2198
2199 PR c++/85662
2200 * c-common.h (fold_offsetof_1): Removed.
2201 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
2202 CTX argument defaulted to ERROR_MARK.
2203 * c-common.c (fold_offsetof_1): Renamed to ...
2204 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
2205 argument, convert the pointer constant to TYPE and use size_binop
2206 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
2207 a pointer type. Adjust recursive calls.
2208
86c12f76
EB
22092018-05-10 Eric Botcazou <ebotcazou@adacore.com>
2210
2211 PR c++/85400
2212 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
2213
ee336e84
NS
22142018-05-07 Nathan Sidwell <nathan@acm.org>
2215
2216 * c.opt (ffor-scope): Remove functionality, issue warning.
2217
6c072e21
NS
22182018-05-03 Nathan Sidwell <nathan@acm.org>
2219
2220 * c.opt (ffriend-injection): Remove functionality, issue warning.
2221
2cc7d3a7
DM
22222018-05-01 David Malcolm <dmalcolm@redhat.com>
2223
2224 PR c/84258
2225 * c-format.c (struct format_check_results): Add field
2226 "number_non_char".
2227 (check_format_info): Initialize it, and warn if encountered.
2228 (check_format_arg): Distinguish between wide char and
2229 everything else when detecting arrays of non-char.
2230
7761dfbe
DM
22312018-04-30 David Malcolm <dmalcolm@redhat.com>
2232
2233 * c-format.c (get_corrected_substring): Update for
2234 location_get_source_line returning a char_span. Use a char_span
2235 when handling the prefix of the correction.
2236 * c-indentation.c (get_visual_column): Update for
2237 location_get_source_line returning a char_span.
2238 (get_first_nws_vis_column): Likewise.
2239
62e98ef1
DM
22402018-03-29 David Malcolm <dmalcolm@redhat.com>
2241
2242 PR c++/84269
2243 * known-headers.cc (get_stdlib_header_for_name): Add various names
2244 from <assert.h>, <string.h>, and <memory.h>; add more names from
2245 <stdio.h>.
2246
a7dea617
JJ
22472018-03-27 Jakub Jelinek <jakub@redhat.com>
2248
2249 PR c++/85061
2250 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
2251 get_base_address of the second operand is a VAR_P, rather than the
2252 operand itself, and use gcc_checking_assert instead of gcc_assert.
2253
889a3a30
MP
22542018-03-23 Marek Polacek <polacek@redhat.com>
2255
2256 PR c++/85045
2257 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
2258 <case RDIV_EXPR>: Tweak condition.
2259
452154b9
EB
22602018-03-20 Eric Botcazou <ebotcazou@adacore.com>
2261
2262 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
2263
63ecb626
JJ
22642018-03-16 Jakub Jelinek <jakub@redhat.com>
2265
ce811fc4
JJ
2266 PR c/84909
2267 * c-warn.c (conversion_warning): Replace "to to" with "to" in
2268 diagnostics.
2269
63ecb626
JJ
2270 PR c/84910
2271 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
2272 diagnostics.
2273
a1295eec
RB
22742018-03-16 Richard Biener <rguenther@suse.de>
2275
2276 PR c/84873
2277 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
2278 unshare the possibly folded expression.
2279
919674fb
RB
22802018-03-15 Richard Biener <rguenther@suse.de>
2281
2282 PR c/84873
2283 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
2284
f99309b2
MS
22852018-03-13 Martin Sebor <msebor@redhat.com>
2286
2287 PR tree-optimization/84725
2288 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
2289 with all three narrow character types, including their qualified forms.
2290
e9b9fa4c
MS
22912018-03-12 Martin Sebor <msebor@redhat.com>
2292
2293 PR tree-optimization/83456
ab20d992 2294 * c-common.c (check_function_restrict): Return bool.
e9b9fa4c
MS
2295 Restore checking of bounded built-in functions.
2296 (check_function_arguments): Also return the result
2297 of warn_for_restrict.
ab20d992
JJ
2298 * c-common.c (check_function_restrict): Return bool.
2299 * c-warn.c (warn_for_restrict): Return bool.
e9b9fa4c 2300
0805d020
MP
23012018-03-02 Marek Polacek <polacek@redhat.com>
2302
2303 PR c++/84171
2304 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
2305 is erroneous.
2306
ed2a2f08
TS
23072018-03-02 Thomas Schwinge <thomas@codesourcery.com>
2308
2309 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
2310 function".
2311
90abdde0
MP
23122018-03-01 Marek Polacek <polacek@redhat.com>
2313
2314 PR c++/84639
2315 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
2316 alignment in computation.
2317
c6db43fa
EB
23182018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2319
2320 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
2321 <REAL_TYPE>: Deal specifically with _Float128/__float128.
2322
9e25c7ed
EB
23232018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2324
2325 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
2326 (is_char_array): Take a type instead of a declaration.
2327 (dump_ada_array_type): Likewise.
2328 (is_simple_enum): Minor tweak.
2329 (dump_ada_enum_type): New function extracted from...
2330 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
2331 <INTEGER_TYPE>: Remove unreachable code.
2332 <RECORD_TYPE>: Likewise. Minor tweaks.
2333 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
2334 <ENUMERAL_TYPE>: New case.
2335 <RECORD_TYPE>: Factor out common code.
2336 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
2337 Minor tweaks. Deal with enumeral types.
2338 (dump_ada_structure): Minor tweaks.
2339
09de3550
EB
23402018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2341
2342 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
2343 address for incomplete structures.
2344 (dump_forward_type): Do not bail out for incomplete structures.
2345 (dump_ada_declaration): Do not special-case incomplete structures
2346 for subtypes. Dump them as null records for types.
2347
095d8d4b
EB
23482018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2349
2350 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
2351 (is_char_array): Fix formatting.
2352 (dump_template_types): Likewise.
2353 (dump_generic_ada_node): Rename into...
2354 (dump_ada_node): ...this.
2355 <POINTER_TYPE>: Remove superfluous space. Use generic address for
2356 incomplete structures and not for empty structures. Do not use it
2357 when forward declarations are needed.
2358 (dump_forward_type): New function.
2359 (dump_nested_types): Remove FORWARD parameter. Do not consider
2360 TREE_VISITED and do not generate a forward declaration. Only dump
2361 original nested types for nested declaration.
2362 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
2363 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
2364 <RECORD_TYPE>: Do not consider TREE_VISITED.
2365 (dump_ada_declaration): Use booleans and fix formatting throughout.
2366 <TYPE_DECL>: Skip incomplete structures and not empty structures.
2367 Call dump_forward_type instead of dump_nested_types for a typedef.
2368 Remove superfluous check and adjust call to dump_nested_types.
2369 <POINTER_TYPE>: Call dump_forward_type and fall through.
2370 (dump_ada_struct_decl): Rename into...
2371 (dump_ada_structure): ...this. Do not special-case empty structures.
2372
d4cfd486
MS
23732018-02-27 Martin Sebor <msebor@redhat.com>
2374
2375 PR c++/83871
2376 * c.opt (-Wmissing-attributes): New option.
2377
b22dbd03
ML
23782018-02-21 Martin Liska <mliska@suse.cz>
2379
2380 * c.opt (Wcatch-value=): Add IntegerRange.
2381
883dfe2a
JM
23822018-02-15 Jason Merrill <jason@redhat.com>
2383
2384 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
2385
0444aa9c
NS
23862018-02-09 Nathan Sidwell <nathan@acm.org>
2387
2388 PR c/84293
2389 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
2390 arg.
2391 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
2392 arg. Adjust.
2393
cea71f0a
MS
23942018-02-09 Martin Sebor <msebor@redhat.com>
2395
2396 PR lto/84212
2397 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
2398 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
2399 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
2400 (-Wstrict-overflow, -Wsuggest-attribute): Same.
2401 (-Wuninitialized): Same.
2402
8c8b7be5
EB
24032018-02-09 Eric Botcazou <ebotcazou@adacore.com>
2404
2405 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
2406 keyword for components.
2407
7c30b12a
PC
24082018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2409
2410 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
2411
eece7fe5
JK
24122018-02-02 Julia Koval <julia.koval@intel.com>
2413
2414 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
2415
7d07a93a
MP
24162018-01-29 Marek Polacek <polacek@redhat.com>
2417
2418 PR c/83966
2419 * c-format.c (check_function_format): Check current_function_decl.
2420
53723269
JJ
24212018-01-27 Jakub Jelinek <jakub@redhat.com>
2422
2423 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
2424 argument.
2425 (LAZY_HEX_FP_VALUES_CNT): Define.
2426 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
2427 values rather than just 12.
2428 (builtin_define_with_hex_fp_value): Likewise.
2429
7365279f
BK
24302018-01-18 Boris Kolpackov <boris@codesynthesis.com>
2431
92a285c1
ML
2432 PR other/70268
2433 * c.opt (-fmacro-prefix-map): New option.
2434 * c-opts.c (c_common_handle_option): Handle it.
2435 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
2436 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 2437
bb9869d5
DM
24382018-01-17 David Malcolm <dmalcolm@redhat.com>
2439
2440 PR c++/83814
2441 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
2442
68dc87c3
EB
24432018-01-10 Eric Botcazou <ebotcazou@adacore.com>
2444
2445 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
2446 Skip 'f' and 'F' characters if it is true.
2447 (store_ada_macro): Minor tweak.
2448 (dump_ada_macros) <CPP_COMMENT>: Likewise.
2449 <CPP_WSTRING>: Likewise.
2450 <CPP_STRING>: Output '&' in the buffer if not the first string.
2451 <CPP_NUMBER>: Adjust calls to dump_number.
2452
9a004410
DM
24532018-01-10 David Malcolm <dmalcolm@redhat.com>
2454
2455 PR c++/43486
2456 * c-common.c: Include "selftest.h".
2457 (get_atomic_generic_size): Perform the test for integral type
2458 before the range test for any integer constant, fixing indentation
2459 of braces. Call fold_for_warn before testing for an INTEGER_CST.
2460 (reject_gcc_builtin): Strip any location wrapper from EXPR.
2461 (selftest::test_fold_for_warn): New function.
2462 (selftest::c_common_c_tests): New function.
2463 (selftest::c_family_tests): Call it, and
2464 selftest::c_pretty_print_c_tests.
2465 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
2466 * c-format.c (check_format_arg): Convert VAR_P check to a
2467 fold_for_warn.
2468 * c-pretty-print.c: Include "selftest.h".
2469 (pp_c_cast_expression): Don't print casts for location wrappers.
2470 (selftest::assert_c_pretty_printer_output): New function.
2471 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
2472 (selftest::test_location_wrappers): New function.
2473 (selftest::c_pretty_print_c_tests): New function.
2474 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
2475
5c0caeb3
RS
24762018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2477 Alan Hayward <alan.hayward@arm.com>
2478 David Sherwood <david.sherwood@arm.com>
2479
2480 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
2481
73a699ae
RS
24822018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2483 Alan Hayward <alan.hayward@arm.com>
2484 David Sherwood <david.sherwood@arm.com>
2485
2486 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
2487 as polynomial.
2488
928686b1
RS
24892018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2490 Alan Hayward <alan.hayward@arm.com>
2491 David Sherwood <david.sherwood@arm.com>
2492
2493 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
2494 (convert_vector_to_array_for_subscript): Handle polynomial
2495 TYPE_VECTOR_SUBPARTS.
2496 (c_common_type_for_mode): Check valid_vector_subparts_p.
2497 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
2498 VECTOR_CST_NELTS.
2499
85ec4feb
JJ
25002018-01-03 Jakub Jelinek <jakub@redhat.com>
2501
2502 Update copyright years.
2503
170a8bd6 25042017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 2505 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
2506
2507 * c-pragma.c (init_pragma): Register pragma GCC unroll.
2508 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
2509
ab20d992 25102017-12-22 Alexandre Oliva <aoliva@redhat.com>
18408e96
AO
2511
2512 PR debug/83527
2513 PR debug/83419
2514 * c-semantics.c (only_debug_stmts_after_p): New.
2515 (pop_stmt_list): Clear side effects in debug-only stmt list.
2516 Check for single nondebug stmt followed by debug stmts only.
2517
c12d20d4
AO
25182017-12-21 Alexandre Oliva <aoliva@redhat.com>
2519
2520 PR debug/83419
2521 * c-semantics.c (pop_stmt_list): Propagate side effects from
2522 single nondebug stmt to container list.
2523
01512446
JJ
25242017-12-19 Jakub Jelinek <jakub@redhat.com>
2525
2526 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
2527 conditions with typical order conditions.
2528
82cfbd01
MP
25292017-12-18 Marek Polacek <polacek@redhat.com>
2530
2531 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
2532 not in effect.
2533
99da11ec
MS
25342017-12-17 Martin Sebor <msebor@redhat.com>
2535
2536 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
2537 an error for attribute warn_if_not_aligned.
2538
cc8bea0a
MS
25392017-12-16 Martin Sebor <msebor@redhat.com>
2540
2541 PR tree-optimization/78918
2542 * c-common.c (check_function_restrict): Avoid checking built-ins.
2543 * c.opt (-Wrestrict): Include in -Wall.
2544
4849deb1
JJ
25452017-12-15 Jakub Jelinek <jakub@redhat.com>
2546
2547 * c-attribs.c (c_common_attribute_table,
2548 c_common_format_attribute_table): Swap affects_type_identity
2549 and handler fields, adjust comments.
2550
c65e18d3
BE
25512017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2552
2553 * c.opt (Wcast-function-type): New warning option.
2554 * c-lex.c (get_fileinfo): Avoid warning.
2555 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
2556
2004617a
QZ
25572017-12-14 Qing Zhao <qing.zhao@oracle.com>
2558
7365279f 2559 PR middle_end/79538
2004617a
QZ
2560 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
2561 Adjust the size of buf1 and buf2, add a new buf to avoid
2562 format-overflow warning.
2563
ab20d992 25642017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
2565
2566 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
2567 subsequent statement list.
2568
5d9ae53d
MS
25692017-12-07 Martin Sebor <msebor@redhat.com>
2570
2571 PR c/81544
2572 PR c/81566
2573 * c-attribs.c (attr_aligned_exclusions): New array.
2574 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
2575 (attr_common_exclusions, attr_const_pure_exclusions): Same.
2576 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
2577 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
2578 (attr_warn_unused_result_exclusions): Same.
2579 (handle_hot_attribute, handle_cold_attribute): Simplify.
2580 (handle_const_attribute): Warn on function returning void.
2581 (handle_pure_attribute): Same.
2582 (handle_aligned_attribute): Diagnose conflicting attribute
2583 specifications.
2584 * c-warn.c (diagnose_mismatched_attributes): Simplify.
2585
c79144f8
DM
25862017-12-06 David Malcolm <dmalcolm@redhat.com>
2587
2588 PR c/83236
2589 * c-common.c (selftest::c_family_tests): Call
2590 selftest::c_spellcheck_cc_tests.
2591 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
2592 * c-spellcheck.cc: Include "selftest.h".
2593 (name_reserved_for_implementation_p): New function.
2594 (should_suggest_as_macro_p): New function.
2595 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
2596 should_suggest_as_macro_p and call it.
2597 (selftest::test_name_reserved_for_implementation_p): New function.
2598 (selftest::c_spellcheck_cc_tests): New function.
2599 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
2600
613bc14f
DM
26012017-12-06 David Malcolm <dmalcolm@redhat.com>
2602
2603 * c-spellcheck.cc: New file, taken from macro-handling code in
2604 spellcheck-tree.c.
2605 * c-spellcheck.h: New file, taken from macro-handling code in
2606 spellcheck-tree.h.
2607
e76c7157
JJ
26082017-12-01 Jakub Jelinek <jakub@redhat.com>
2609
2610 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
2611 attribute.
2612 (handle_simd_attribute): Don't check for "cilk simd function"
2613 attribute. Reindent, formatting changes.
2614
b0da4034
JK
26152017-11-30 Julia Koval <julia.koval@intel.com>
2616
2617 * c-common.h (inv_list): Remove.
2618
058f0b9e
JJ
26192017-11-28 Jakub Jelinek <jakub@redhat.com>
2620
2621 PR sanitizer/81275
2622 * c-common.c (c_switch_covers_all_cases_p_1,
2623 c_switch_covers_all_cases_p): New functions.
2624 * c-common.h (c_switch_covers_all_cases_p): Declare.
2625
5e9d6aa4 26262017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 2627 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
2628
2629 * array-notation-common.c: Delete.
2630 * c-cilkplus.c: Ditto.
2631 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
2632 * c-common.def (ARRAY_NOTATION_REF): Remove.
2633 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
2634 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
2635 c_validate_cilk_plus_loop, cilkplus_an_parts,
2636 cilk_ignorable_spawn_rhs_op,
2637 cilk_recognize_spawn): Remove.
2638 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
2639 * c-omp.c: Remove CILK_SIMD check.
2640 * c-pragma.c: Ditto.
2641 * c-pragma.h: Remove CILK related pragmas.
2642 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
2643 ARRAY_NOTATION_REF condition.
2644 (c_pretty_printer::expression): Ditto.
2645 * c.opt (fcilkplus): Remove.
2646 * cilk.c: Delete.
2647
1af4ebf5
MG
26482017-11-21 Marc Glisse <marc.glisse@inria.fr>
2649
2650 * c-pretty-print.c (pp_c_additive_expression,
2651 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
2652
d44ed508
JJ
26532017-11-21 Jakub Jelinek <jakub@redhat.com>
2654
7d2f0f9b
JJ
2655 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
2656
d44ed508
JJ
2657 PR c++/83059
2658 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
2659 instead of tree_to_uhwi, formatting fix.
2660
26edace6
DM
26612017-11-20 David Malcolm <dmalcolm@redhat.com>
2662
2663 PR c/81404
2664 * known-headers.cc: New file, based on material from c/c-decl.c.
2665 (suggest_missing_header): Copied as-is.
2666 (get_stdlib_header_for_name): New, based on get_c_name_hint but
2667 heavily edited to add C++ support. Add some knowledge about
2668 <limits.h>, <stdint.h>, and <wchar.h>.
2669 * known-headers.h: Likewise.
2670
6c7a259b
DM
26712017-11-20 David Malcolm <dmalcolm@redhat.com>
2672
2673 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
2674 (lookup_name_fuzzy): Likewise. Convert return type from
2675 const char * to name_hint. Add location_t param.
2676 * name-hint.h: New header.
2677
f9c59f7e
JJ
26782017-11-19 Jakub Jelinek <jakub@redhat.com>
2679
2680 PR c/66618
2681 PR c/69960
2682 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
2683
1e39313a
JM
26842017-11-16 Joseph Myers <joseph@codesourcery.com>
2685
2686 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
2687 expected publication date of C17.
2688 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
2689
3ca0dc60
JM
26902017-11-15 Joseph Myers <joseph@codesourcery.com>
2691
2692 PR c/81156
2693 * c-common.c (c_common_reswords): Add __builtin_tgmath.
2694 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
2695
025d57f0
MS
26962017-11-10 Martin Sebor <msebor@redhat.com>
2697
2698 PR c/81117
2699 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
2700 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
2701 * c.opt (-Wstringop-truncation): New option.
2702
1b6fa695
ML
27032017-11-06 Martin Liska <mliska@suse.cz>
2704
2705 PR middle-end/82404
2706 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
2707 FE.
2708 * c.opt: Set default value of warn_return_type.
2709
64a5912c
DM
27102017-10-31 David Malcolm <dmalcolm@redhat.com>
2711
2712 * c-common.c (binary_op_error): Update for renaming of
2713 error_at_rich_loc.
2714 (c_parse_error): Likewise.
2715 * c-warn.c (warn_logical_not_parentheses): Likewise for
2716 renaming of inform_at_rich_loc.
2717 (warn_for_restrict): Likewise for renaming of
2718 warning_at_rich_loc_n.
2719
c76dc9c3
JM
27202017-10-30 Joseph Myers <joseph@codesourcery.com>
2721
2722 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
2723 * c-opts.c (set_std_c17): New function.
2724 (c_common_init_options): Use gnu17 as default C version.
2725 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
2726
ee5fd23a
MM
27272017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2728
2729 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
2730 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
2731 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
2732 __FP_FAST_FMA<N>X.
2733
d1047465
MP
27342017-10-23 Marek Polacek <polacek@redhat.com>
2735
2736 PR c/82681
2737 * c-warn.c (warnings_for_convert_and_check): Fix typos.
2738
9e878cf1
EB
27392017-10-19 Eric Botcazou <ebotcazou@adacore.com>
2740
2741 * c-common.c (check_builtin_function_arguments): Also check arguments
2742 of __builtin_alloca_with_align_and_max.
2743
89b6abbb
DM
27442017-10-17 David Malcolm <dmalcolm@redhat.com>
2745
2746 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
2747 rather than NULL to format_warning_va.
2748 (check_format_types): Likewise when calling format_type_warning.
2749 Remove code to extract source_ranges and source_range * in favor
2750 of just a location_t.
2751 (format_type_warning): Convert source_range * param to a
2752 location_t.
2753
39382c09
JJ
27542017-10-13 Jakub Jelinek <jakub@redhat.com>
2755
2756 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
2757 [LR]SHIFT_EXPR.
2758
62e1c678
DM
27592017-10-12 David Malcolm <dmalcolm@redhat.com>
2760
2761 * c-common.c (enum missing_token_insertion_kind): New enum.
2762 (get_missing_token_insertion_kind): New function.
2763 (maybe_suggest_missing_token_insertion): New function.
2764 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
2765
b90c9338
NS
27662017-10-11 Nathan Sidwell <nathan@acm.org>
2767
2768 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
2769 (c_common_handle_option): Update incpath_kind names.
2770
3a266bcd
ML
27712017-10-11 Martin Liska <mliska@suse.cz>
2772
2773 PR sanitizer/82490
2774 * c-attribs.c (handle_no_sanitize_attribute): Report directly
2775 Wattributes warning.
2776
8e6cdc90
RS
27772017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2778
2779 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
2780 operating on trees as wide_ints.
2781 * c-common.c (pointer_int_sum): Likewise.
2782 * c-pretty-print.c (pp_c_integer_constant): Likewise.
2783 * c-warn.c (match_case_to_enum_1): Likewise.
2784 (c_do_switch_warnings): Likewise.
2785 (maybe_warn_shift_overflow): Likewise.
2786
802b38c9
JJ
27872017-10-10 Jakub Jelinek <jakub@redhat.com>
2788
2789 PR c/82437
2790 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
2791 instead of wide_int::from.
2792
4e34b338
JJ
27932017-10-06 Jakub Jelinek <jakub@redhat.com>
2794
2795 PR c/82437
2796 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
2797 using to_widest use wide_int with the larger of the two precisions.
2798
4bc4b2b4
BE
27992017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
2800
2801 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
2802 functions.
2803
a1488398
RS
28042017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
2805
2806 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
2807 when combining the original unconverted comparison operands.
2808
01c9fb68
JJ
28092017-09-29 Jakub Jelinek <jakub@redhat.com>
2810
2811 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
2812 attribute.
2813
6e3e8419
EB
28142017-09-29 Eric Botcazou <ebotcazou@adacore.com>
2815
2816 * c-ada-spec.c (to_ada_name): Add index parameter.
2817 (pp_ada_tree_identifier): Likewise.
2818 (dump_ada_macros): Adjust call to to_ada_name.
2819 (struct overloaded_name_hash): New type.
2820 (struct overloaded_name_hasher): Likewise.
2821 (overloaded_names): New hash table.
2822 (compute_overloading_index): New function.
2823 (dump_ada_decl_name): Call it and pass the result to
2824 pp_ada_tree_identifier.
2825 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
2826 (dump_ada_function_declaration): Likewise.
2827 (dump_generic_ada_node): Likewise.
2828 (print_constructor): Likewise.
2829 (print_destructor): Likewise.
2830 (dump_ada_specs): Delete overloaded_names table.
2831
79310774
EB
28322017-09-29 Eric Botcazou <ebotcazou@adacore.com>
2833
2834 * c-ada-spec.c (max_ada_macros): Move around.
2835 (store_ada_macro_index): Likewise.
2836 (source_file): Rename into...
2837 (macro_source_file): ...this.
2838 (count_ada_macro): Move around.
2839 (store_ada_macro): Likewise.
2840 (compare_macro): Likewise.
2841 (print_ada_macros): Merge in...
2842 (dump_ada_macros): ...this.
2843 (source_file_base): Rename into...
2844 (current_source_file): ...this.
2845 (print_comment): Move around.
2846 (dump_ada_nodes): Call dump_ada_declaration directly.
2847 (struct with): Change type of limited field to bool.
2848 (append_withs): Change type of limited_access parameter to bool.
2849 (pp_ada_tree_identifie): Likewise.
2850 (dump_ada_decl_nam): Likewise.
2851 (dump_generic_ada_node): Likewise. Do not print the return type.
2852 (to_ada_name): Change type of space_found parameter to bool.
2853 (dump_ada_function_declaration): Return void and change type of
2854 parameters to bool. Also print the return type for a function.
2855 (print_ada_methods): Rename into...
2856 (dump_ada_methods): ...this.
2857 (print_ada_declaration): Rename into ...
2858 (dump_ada_declaration): ...this. Do not print the return type.
2859 (print_ada_struct_decl): Rename into...
2860 (dump_ada_struct_decl): ...this.
2861
7d386d45
JJ
28622017-09-29 Jakub Jelinek <jakub@redhat.com>
2863
2864 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
2865 rather than DECL_INITIAL.
2866 (common_handle_aligned_attribute): Likewise.
2867
ab20d992 28682017-09-20 Alexandre Oliva <aoliva@redhat.com>
9ed32e27
AO
2869
2870 * c.opt (gen-decls): Add RejectNegative.
2871
026a79f7
AS
28722017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
2873 Jakub Jelinek <jakub@redhat.com>
2874
2875 Add support for -std=c++2a.
2876 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
2877 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
2878 * c-opts.c (set_std_cxx2a): New.
2879 (c_common_handle_option): Set options when -std=c++2a is enabled.
2880 (c_common_post_options): Adjust comments.
2881 (set_std_cxx14, set_std_cxx17): Likewise.
2882
4a8ca690
EB
28832017-09-15 Eric Botcazou <ebotcazou@adacore.com>
2884
2885 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
2886 message for non-uniform endianness and issue a warning in C++.
2887
7b936140
JJ
28882017-09-15 Jakub Jelinek <jakub@redhat.com>
2889
2890 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
2891 (Wc++17-compat): Change from undocumented alias to option.
2892 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
2893 change C++1z to C++17 in description.
2894 (std=c++1z, std=gnu++1z): Change from option to undocumented
2895 deprecated alias.
2896 (std=c++17, std=gnu++17): Change from undocumented alias to option.
2897 Adjust description.
2898 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
2899 * c-opts.c (set_std_cxx1z): Rename to ...
2900 (set_std_cxx17): ... this.
2901 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
2902 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 2903 caller.
7b936140
JJ
2904 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
2905 comments.
2906
12263f13
L
29072017-09-12 H.J. Lu <hongjiu.lu@intel.com>
2908
2909 * c-attribs.c (common_handle_aligned_attribute): Don't warn
2910 function alignment if warn_if_not_aligned_p is true.
2911
6836632e
NS
29122017-09-12 Nathan Sidwell <nathan@acm.org>
2913
2914 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2915 resort_sorted_fields): Move to c/c-decl.c.
2916 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
2917 (struct sorted_fields_type): Move to c/c-lang.h.
2918
019bf9ad
JW
29192017-09-09 Jonathan Wakely <jwakely@redhat.com>
2920
2921 PR c++/81852
2922 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
2923
bc7fe952
MP
29242017-09-04 Marek Polacek <polacek@redhat.com>
2925
2926 PR c/81783
2927 * c-warn.c (warn_tautological_bitwise_comparison): New function.
2928 (warn_tautological_cmp): Call it.
2929
ab20d992 29302017-09-01 Boris Kolpackov <boris@codesynthesis.com>
de7c2c6a
BK
2931
2932 * c-opts.c (c_common_finish): Write dependency information even if
2933 there are errors.
2934
d2e05fcb
JJ
29352017-09-01 Jakub Jelinek <jakub@redhat.com>
2936
2937 PR c/81887
2938 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
2939 (omp_pragmas_simd): ... here.
2940 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
2941 create new clauses list containing just simd clause.
2942
18e2a8b8
RS
29432017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2944 Alan Hayward <alan.hayward@arm.com>
2945 David Sherwood <david.sherwood@arm.com>
2946
2947 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
2948 into scalar_mode_supported_p call.
2949 (handle_mode_attribute): Update call to scalar_mode_supported_p.
2950
16d22000
RS
29512017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2952 Alan Hayward <alan.hayward@arm.com>
2953 David Sherwood <david.sherwood@arm.com>
2954
2955 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
2956 for the mode iterator.
2957
b397965c
RS
29582017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2959 Alan Hayward <alan.hayward@arm.com>
2960 David Sherwood <david.sherwood@arm.com>
2961
2962 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
2963 * c-common.c (c_build_vec_perm_expr): Likewise.
2964
357b7604
RS
29652017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2966 Alan Hayward <alan.hayward@arm.com>
2967 David Sherwood <david.sherwood@arm.com>
2968
2969 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
2970
e05c94ba
RS
29712017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2972 Alan Hayward <alan.hayward@arm.com>
2973 David Sherwood <david.sherwood@arm.com>
2974
2975 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
2976 before calling targetm.addr_space.valid_pointer_mode.
2977
5c20c4af
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-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
2983
c94843d2 29842017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
2985 Alan Hayward <alan.hayward@arm.com>
2986 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
2987
2988 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
2989 iterators.
2990 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
2991
4e10a5a7
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-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
2997 case statements.
2998
130fcab0
ML
29992017-08-29 Martin Liska <mliska@suse.cz>
3000
3001 PR other/39851
3002 * c-common.c (parse_optimize_options): Add argument to function
3003 call.
3004 * c-pragma.c (handle_pragma_diagnostic): Likewise.
3005
14e18d71
DM
30062017-08-24 David Malcolm <dmalcolm@redhat.com>
3007
3008 * c-lex.c (interpret_float): Use token location
3009 when building an EXCESS_PRECISION_EXPR.
3010
2f687306
DM
30112017-08-21 David Malcolm <dmalcolm@redhat.com>
3012
3013 * c-common.c (check_function_arguments): Add "arglogs" param; pass
3014 it to check_function_format.
3015 * c-common.h (check_function_arguments): Add vec<location_t> *
3016 param.
3017 (check_function_format): Likewise.
3018 * c-format.c (struct format_check_context): Add field "arglocs".
3019 (check_function_format): Add param "arglocs"; pass it to
3020 check_format_info.
ab20d992 3021 (check_format_info): Add param "arglocs"; use it to initialize
2f687306
DM
3022 new field of format_ctx.
3023 (check_format_arg): Pass format_ctx->arglocs to new param of
3024 check_format_info_main.
3025 (class argument_parser): New field "arglocs".
3026 (argument_parser::argument_parser): Add "arglocs_" param and use
3027 it to initialize new field.
3028 (argument_parser::check_argument_type): Pass new arglocs field to
3029 check_format_types.
3030 (check_format_info_main): Add param "arglocs", and use it when
3031 constructing arg_parser.
3032 (check_format_types): Add param "arglocs"; use it if non-NULL when
3033 !EXPR_HAS_LOCATION (cur_param) to get at location information.
3034
00aa1fa2
L
30352017-08-18 H.J. Lu <hongjiu.lu@intel.com>
3036
3037 PR c/53037
3038 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
3039 (c_common_attribute_table): Add warn_if_not_aligned.
3040 (handle_aligned_attribute): Renamed to ...
3041 (common_handle_aligned_attribute): Remove argument, name, and add
3042 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
3043 (handle_aligned_attribute): New.
3044 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
3045
27be025d
MS
30462017-08-14 Martin Sebor <msebor@redhat.com>
3047
3048 PR c/81117
3049 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
3050 (handle_nonstring_attribute): New function.
3051
da67acb9
MS
30522017-08-14 Martin Sebor <msebor@redhat.com>
3053
3054 PR c/81117
3055 * c-format.h (T89_G): New macro.
3056 * c-format.c (local_gcall_ptr_node): New variable.
3057 (init_dynamic_diag_info): Initialize it.
3058
a8b522b4
ML
30592017-08-11 Martin Liska <mliska@suse.cz>
3060
3061 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
3062 TARGET_SUPPORTS_ALIASES.
3063
32129a17
DM
30642017-08-10 David Malcolm <dmalcolm@redhat.com>
3065
3066 * c-common.c (c_parse_error): Add rich_location * param, using it
3067 rather implicitly using input_location.
3068 * c-common.h (c_parse_error): Add rich_location * param.
3069
30af3a2b
MP
30702017-08-09 Marek Polacek <polacek@redhat.com>
3071
3072 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
3073 (c_common_truthvalue_conversion): Likewise.
3074 * c-omp.c (c_finish_omp_atomic): Likewise.
3075 * c-common.h (build_binary_op): Update declaration.
3076
314e6352
ML
30772017-08-08 Martin Liska <mliska@suse.cz>
3078
3079 * c-ada-spec.c: Include header files.
3080 * c-ubsan.c: Likewise.
3081 * c-warn.c: Likewise.
3082
56b5041c
JJ
30832017-08-07 Jakub Jelinek <jakub@redhat.com>
3084
3085 PR c/69389
3086 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
3087
db440138
EB
30882017-08-07 Eric Botcazou <ebotcazou@adacore.com>
3089
3090 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
3091 (print_ada_methods): Likewise.
3092 (print_ada_declaration): Likewise.
3093
577eec56
ML
30942017-08-07 Martin Liska <mliska@suse.cz>
3095
3096 * array-notation-common.c: Add new includes.
3097 * c-format.c( handle_format_attribute): Canonicalize a format
3098 function name.
3099 * c-lex.c (c_common_has_attribute): Canonicalize name of an
3100 attribute.
3101 * c-pretty-print.c: Add new include.
3102
b854df3c
EB
31032017-08-05 Eric Botcazou <ebotcazou@adacore.com>
3104
3105 * c-ada-spec.c (has_static_fields): Look only into variables.
3106 (print_constructor): Add TYPE parameter and use it for the name.
3107 (print_destructor): Likewise.
3108 (print_ada_declaration): Adjust to new constructor/destructor names.
3109 Adjust calls to print_constructor and print_destructor.
3110 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
3111 Look only into variables in the final loop.
3112
9f2cb25e
EB
31132017-08-01 Eric Botcazou <ebotcazou@adacore.com>
3114
3115 * c-ada-spec.c (has_static_fields): Look only into fields.
3116 (dump_generic_ada_node): Small tweak.
3117 (dump_nested_types): Look only into fields.
3118 (print_ada_declaration): Look only into methods. Small tweak.
3119 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
3120
f4bcd9eb
EB
31212017-08-01 Eric Botcazou <ebotcazou@adacore.com>
3122
3123 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
3124 (dump_ada_function_declaration): Likewise.
3125 (dump_generic_ada_node): Likewise.
3126 (print_ada_declaration): Add support for const-qualified variables.
3127
f34ebeb2
ML
31282017-07-31 Martin Liska <mliska@suse.cz>
3129
3130 PR sanitize/81530
3131 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
3132 Guard condition with flag_sanitize_p also with current_function_decl
3133 non-null equality.
3134 (ubsan_maybe_instrument_reference_or_call): Likewise.
3135
218e5d04
UB
31362017-07-30 Uros Bizjak <ubizjak@gmail.com>
3137
3138 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
3139
942047f2
EB
31402017-07-29 Eric Botcazou <ebotcazou@adacore.com>
3141
3142 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
3143 for enumeral types.
3144 (print_ada_declaration): Add missing guard for record types.
3145
a40ff0ae
JJ
31462017-07-27 Jakub Jelinek <jakub@redhat.com>
3147
3148 PR c/45784
3149 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
3150 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
3151 new COMPOUND_EXPRs around the rhs of the comparison.
3152
06bd22f6
MP
31532017-07-27 Marek Polacek <polacek@redhat.com>
3154
3155 PR c/81417
3156 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
3157 the types.
3158
036ea399
JJ
31592017-07-27 Jakub Jelinek <jakub@redhat.com>
3160
3161 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
3162 (handle_noipa_attribute): New function.
3163
417ca011
TD
31642017-07-07 Torsten Duwe <duwe@suse.de>
3165
3166 * c-attribs.c (c_common_attribute_table): Add entry for
3167 "patchable_function_entry".
3168
5aaa8fb4
NS
31692017-07-20 Nathan Sidwell <nathan@acm.org>
3170
3171 Remove TYPE_METHODS.
3172 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
3173 dump_ada_template, print_ada_methods,
3174 print_ada_declaration): Member fns are on TYPE_FIELDS.
3175
ff22eb12
NS
31762017-07-18 Nathan Sidwell <nathan@acm.org>
3177
3178 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
3179
eea77d1f
DM
31802017-07-14 David Malcolm <dmalcolm@redhat.com>
3181
3182 * c-common.c (try_to_locate_new_include_insertion_point): New
3183 function.
3184 (per_file_includes_t): New typedef.
3185 (added_includes_t): New typedef.
3186 (added_includes): New variable.
3187 (maybe_add_include_fixit): New function.
3188 * c-common.h (maybe_add_include_fixit): New decl.
3189
281ac396
MS
31902017-07-10 Martin Sebor <msebor@redhat.com>
3191
3192 PR other/81345
3193 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
3194
b6f43128
DM
31952017-07-06 David Malcolm <dmalcolm@redhat.com>
3196
3197 * c-common.c (selftest::c_family_tests): New.
3198 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
3199 (selftest::c_family_tests): New decl.
3200
efbf55b0
MP
32012017-07-04 Marek Polacek <polacek@redhat.com>
3202
3203 PR c/81231
3204 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
3205 types.
3206
6c86bd88
MP
32072017-07-04 Marek Polacek <polacek@redhat.com>
3208
3209 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
3210
17a7218b
ML
32112017-06-28 Martin Liska <mliska@suse.cz>
3212
3213 PR ipa/81128
3214 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
3215 to a function declaration.
3216
63010089
ML
32172017-06-28 Martin Liska <mliska@suse.cz>
3218
3219 PR driver/79659
3220 * c.opt: Add IntegerRange to various options.
3221
3e2becc4
MP
32222017-06-26 Marek Polacek <polacek@redhat.com>
3223
3224 PR c/80116
3225 * c-common.h (warn_for_multistatement_macros): Declare.
3226 * c-warn.c: Include "c-family/c-indentation.h".
3227 (warn_for_multistatement_macros): New function.
3228 * c.opt (Wmultistatement-macros): New option.
3229 * c-indentation.c (guard_tinfo_to_string): No longer static.
3230 Change the parameter type to "enum rid". Handle RID_SWITCH.
3231 * c-indentation.h (guard_tinfo_to_string): Declare.
3232
2db9b7cd
MG
32332017-06-23 Marc Glisse <marc.glisse@inria.fr>
3234
3235 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
3236
c3684b7b
MS
32372017-06-15 Martin Sebor <msebor@redhat.com>
3238
3239 PR c++/80560
3240 * c.opt (-Wclass-memaccess): New option.
3241
e72c4afd
BK
32422017-06-14 Boris Kolpackov <boris@codesynthesis.com>
3243
3244 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
3245
8a516588
MP
32462017-06-13 Marek Polacek <polacek@redhat.com>
3247
3248 PR objc/80949
3249 * c-warn.c (do_warn_duplicated_branches): Return if any of the
3250 branches is null.
3251
45b2222a
ML
32522017-06-13 Martin Liska <mliska@suse.cz>
3253
3254 PR sanitize/78204
3255 * c-attribs.c (add_no_sanitize_value): New function.
3256 (handle_no_sanitize_attribute): Likewise.
3257 (handle_no_sanitize_address_attribute): Use the function.
3258 (handle_no_sanitize_thread_attribute): New function.
3259 (handle_no_address_safety_analysis_attribute): Use
3260 add_no_sanitize_value.
3261 (handle_no_sanitize_undefined_attribute): Likewise.
3262 * c-common.h: Declare new functions.
3263 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
3264 (ubsan_instrument_shift): Likewise.
3265 (ubsan_instrument_bounds): Likewise.
3266 (ubsan_maybe_instrument_array_ref): Likewise.
3267 (ubsan_maybe_instrument_reference_or_call): Likewise.
3268
a01f151f
JM
32692017-06-11 Jason Merrill <jason@redhat.com>
3270
3271 * c-ada-spec.c, c-pragma.c: Use id_equal.
3272
3de4ac6d
MP
32732017-06-04 Marek Polacek <polacek@redhat.com>
3274
3275 PR c/80919
3276 * c-format.c (matching_type_p): Return false if any of the types
3277 requires structural equality.
3278
2474f48f
MS
32792017-06-02 Martin Sebor <msebor@redhat.com>
3280
3281 PR c/80892
3282 * c-warn.c (conversion_warning): Use -Wconversion for integer
3283 conversion and -Wfloat-conversion for floating one.
3284
40ffd95f
BE
32852017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3286
3287 * c.opt (Wsizeof-pointer-div): New warning option.
3288
3fa4634c
VR
32892017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
3290
3291 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
3292 (Wcatch-value=1): Enable by -Wall.
3293
f012c8ef
DM
32942017-05-30 David Malcolm <dmalcolm@redhat.com>
3295
3296 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
3297 format_chars.
3298 * c.opt (fdiagnostics-show-template-tree): New option.
3299 (felide-type): New option.
3300
63dbcd13
VR
33012017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
3302
3303 * c.opt (Wcatch-value=): New C++ warning flag.
3304
be136b5c
NS
33052017-05-24 Nathan Sidwell <nathan@acm.org>
3306
3307 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
3308 const casts to avoid warning.
3309
3cd211af
MS
33102017-05-24 Martin Sebor <msebor@redhat.com>
3311
3312 PR c/80731
3313 * c-common.h (unsafe_conversion_p): Add a function argument.
3314 * c-common.c (unsafe_conversion_p): Same.
3315 Add type names and values to diagnostics.
3316 (scalar_to_vector): Adjust.
3317 * c-warn.c (constant_expression_error): Add a function argument.
3318 Add type names and values to diagnostics.
3319 (conversion_warning): Add a function argument.
3320 Add type names and values to diagnostics.
3321 (warnings_for_convert_and_check): Same.
3322
1ff7be5a
JM
33232017-05-19 Jason Merrill <jason@redhat.com>
3324
3325 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
3326 enumerators.
3327
ff502317
BE
33282017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3329
3330 * c-format.c (locus): Move out of function scope,
3331 add GTY attribute.
3332
2a8a8d7b
NS
33332017-05-19 Nathan Sidwell <nathan@acm.org>
3334
3335 * c-opts.c (class_dump_file, class_dump_flags): Delete.
3336 (c_common_parse_file): Remove class dump handling.
3337 (get_dump_info): Likewise.
3338
39aac208
RB
33392017-05-19 Richard Biener <rguenther@suse.de>
3340
3341 PR c++/80593
3342 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
3343 to alias-set zero memory.
3344
6ecd2339
BE
33452017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3346
3347 * c-format.c (local_tree_type_node): Add GTY attribute.
3348
6574d78e
MP
33492017-05-18 Marek Polacek <polacek@redhat.com>
3350
3351 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
3352 (c_common_fixed_point_type_for_size): Likewise.
3353 (c_common_type_for_mode): Likewise.
3354 (shorten_compare): Likewise.
3355 (c_promoting_integer_type_p): Use false/true instead of 0/1.
3356 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
3357
e3455240
MP
33582017-05-18 Marek Polacek <polacek@redhat.com>
3359
3360 * c-common.c (self_promoting_args_p): Change the return type to bool.
3361 Use false/true instead of 0/1.
3362 * c-common.h (self_promoting_args_p): Update.
3363
3fa8871b
MP
33642017-05-17 Marek Polacek <polacek@redhat.com>
3365
3366 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
3367 * c-warn.c: Likewise.
3368
b42cc3ca
VV
33692017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
3370
3371 Implement new C++ intrinsics __is_assignable and __is_constructible.
3372 * c-common.c (__is_assignable, __is_constructible): New.
3373 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
3374
1a817418
ML
33752017-05-17 Martin Liska <mliska@suse.cz>
3376
3377 * c-common.h: Introduce dump_flags_t type and
3378 use it instead of int type.
3379 * c-gimplify.c (c_genericize): Likewise.
3380 * c-opts.c: Likewise.
3381
b2fa0a8b
MP
33822017-05-17 Marek Polacek <polacek@redhat.com>
3383
3384 * c-common.c (c_save_expr): Remove.
3385 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
3386 * c-common.h (c_save_expr): Remove declaration.
3387
31c2d57d
VR
33882017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
3389
3390 PR c/35441
3391 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
3392 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
3393 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
3394 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
3395 RDIV_EXPR.
3396 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
3397
684f84de
MP
33982017-05-09 Marek Polacek <polacek@redhat.com>
3399
3400 PR c/80525
3401 * c-warn.c (unwrap_c_maybe_const): New.
3402 (warn_logical_operator): Call it.
3403
641da50a
NS
34042017-05-09 Nathan Sidwell <nathan@acm.org>
3405
3406 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
3407 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
3408
631238ac
MS
34092017-05-08 Martin Sebor <msebor@redhat.com>
3410
3411 PR translation/80280
3412 * c-format.h (struct format_flag_spec): Add new member.
3413 (T89_T): New macro.
3414 * c-format.c (local_tree_type_node): New global.
3415 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
3416 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
3417 (strfmon_flag_specs): Likewise.
3418 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
3419 with distinct quoting properties.
3420 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
3421 (flag_chars_t::validate): Add argument and handle bad quoting.
3422 (check_format_info_main): Handle quoting problems.
3423 (init_dynamic_diag_info): Simplify.
3424
49f0c04c
JM
34252017-05-08 Jason Merrill <jason@redhat.com>
3426
3427 * c-opts.c (c_common_post_options): Update defaults for
3428 flag_abi_version and flag_abi_compat_version.
3429
56d35585
DM
34302017-05-05 David Malcolm <dmalcolm@redhat.com>
3431
3432 * c-common.c (c_cpp_error): Replace report_diagnostic
3433 with diagnostic_report_diagnostic.
3434
0f2c4a8f
MS
34352017-05-04 Martin Sebor <msebor@redhat.com>
3436
3437 PR translation/80280
3438 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
3439 (handle_weakref_attribute): Same.
3440
6fe63fb4
NS
34412017-05-03 Nathan Sidwell <nathan@acm.org>
3442
3443 Canonicalize canonical type hashing
3444 * c-common.c (complete_array_type): Use type_hash_canon.
3445
815d9cc6
XR
34462017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3447
92a285c1 3448 PR c++/80038
815d9cc6
XR
3449 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
3450 prototype.
3451 (cilk_install_body_pedigree_operations): Likewise.
3452 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
3453 detatched.
3454 (cilk_gimplify_call_params_in_spawned_fn): Remove.
3455 (cilk_install_body_pedigree_operations): Likewise.
3456 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
3457 unwrapping.
3458
f8a36447
JJ
34592017-04-27 Jakub Jelinek <jakub@redhat.com>
3460
3461 PR c++/80534
3462 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
3463 flag on non-aggregate element types.
3464
7c145456
BE
34652017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
3466
3467 * c-common.c (c_type_hasher, type_hash_table): Remove.
3468 (c_common_get_alias_set): Remove unreachable code.
3469 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
3470
c3cbcd45
VR
34712017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
3472
3473 * c.opt (Wextra-semi): New C++ warning flag.
3474
8a59d466
JJ
34752017-04-20 Jakub Jelinek <jakub@redhat.com>
3476
3477 PR middle-end/80423
3478 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
3479
8487c9a5
JJ
34802017-04-18 Jakub Jelinek <jakub@redhat.com>
3481
3482 PR middle-end/79788
3483 PR middle-end/80375
3484 * c-common.c (c_common_type_for_mode): Don't handle
3485 widest_*_literal_type_node here.
3486 c_common_signed_or_unsigned_type): Likewise.
3487 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
3488 to *intTI_type_node or *intDI_type_node depending on whether
3489 TImode is supported by the target or not.
3490
3ee0fb02
ML
34912017-04-10 Martin Liska <mliska@suse.cz>
3492
3493 PR sanitizer/80350
3494 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
3495 doing an UBSAN check.
3496
5764ee3c
JW
34972017-04-03 Jonathan Wakely <jwakely@redhat.com>
3498
3499 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
3500
6f3af356
JJ
35012017-03-31 Jakub Jelinek <jakub@redhat.com>
3502
3503 PR c++/79572
3504 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
3505 tree *.
3506 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
3507 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
3508 REFERENCE_TYPE.
3509
f6a7a9d5
DM
35102017-03-31 David Malcolm <dmalcolm@redhat.com>
3511
3512 PR documentation/78732
3513 * c.opt (Wendif-labels): Fix description to refer to
3514 #else rather than #elif.
3515
af88f557
JJ
35162017-03-31 Jakub Jelinek <jakub@redhat.com>
3517
3518 PR libstdc++/80251
3519 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
3520 * c-common.c (c_common_reswords): Add __is_aggregate trait.
3521
a9e4a1a5
JJ
35222017-03-27 Jakub Jelinek <jakub@redhat.com>
3523
3524 PR middle-end/80162
3525 * c-common.c (c_common_mark_addressable_vec): Don't set
3526 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
3527
3f01b620
MS
35282017-03-21 Martin Sebor <msebor@redhat.com>
3529
3530 PR c++/79548
3531 * c-common.c (set_underlying_type): Mark type used only when
3532 original del is declared unused.
3533
2f6f187a
DM
35342017-03-10 David Malcolm <dmalcolm@redhat.com>
3535
3536 PR translation/79848
3537 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
3538 "%qs".
3539
a02fa805
DM
35402017-03-10 David Malcolm <dmalcolm@redhat.com>
3541
3542 PR c/79921
3543 * c-indentation.c (warn_for_misleading_indentation): Remove parens
3544 from inform's message, so that xgettext can locate it.
3545
822a132c
MP
35462017-03-09 Marek Polacek <polacek@redhat.com>
3547
3548 PR c++/79962
3549 PR c++/79984
3550 * c-attribs.c (handle_nonnull_attribute): Save the result of default
3551 conversion to the attribute list.
3552
bba81f1c
ML
35532017-03-09 Martin Liska <mliska@suse.cz>
3554
3555 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
3556
108154ff
JM
35572017-03-03 Jason Merrill <jason@redhat.com>
3558
3559 * c.opt (Wnoexcept-type): New.
3560
eb0e7c34
RB
35612017-03-02 Richard Biener <rguenther@suse.de>
3562
3563 PR c/79756
3564 * c-common.c (c_common_mark_addressable_vec): Look through
3565 C_MAYBE_CONST_EXPR.
3566
9453ba0a
ML
35672017-02-28 Martin Liska <mliska@suse.cz>
3568
3569 * c.opt: Replace space with tabular for options of <number>
3570 type.
3571
6a825afe
ML
35722017-02-28 Martin Liska <mliska@suse.cz>
3573
3574 * c.opt: Fix --help=option -Q for options which are of
3575 an enum type.
3576
4227c9ad
JJ
35772017-02-24 Jakub Jelinek <jakub@redhat.com>
3578
3579 PR c++/79588
3580 * c-common.c (check_function_restrict): New function.
3581 (check_function_arguments): Add FNDECL argument. Call
3582 check_function_restrict if -Wrestrict.
3583 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
3584 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
3585 * c-common.h (check_function_arguments): Add FNDECL argument.
3586 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
3587
59909673
EB
35882017-02-24 Eric Botcazou <ebotcazou@adacore.com>
3589
3590 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
3591 treatment of parameters with pointer-to-tagged type and tidy up.
3592 (print_ada_methods): Remove the special treatment of C++ static member
3593 functions.
3594
54dcd526
ML
35952017-02-22 Martin Liska <mliska@suse.cz>
3596
3597 * c.opt: Replace inequality signs with square brackets
3598 for -Wnornalized.
3599
00bc9de3
JJ
36002017-02-21 Jakub Jelinek <jakub@redhat.com>
3601
3602 PR c++/79641
3603 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
3604 preserve quals.
3605
97fcf744
JM
36062017-02-17 Joseph Myers <joseph@codesourcery.com>
3607
3608 * c-cppbuiltin.c (builtin_define_float_constants): Define
3609 __DECIMAL_DIG__ to the value for long double.
3610
c7545f1c
MP
36112017-02-15 Marek Polacek <polacek@redhat.com>
3612
3613 PR c/79515
3614 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
3615 conversion has occured.
3616
c2e84327
DM
36172017-01-24 David Malcolm <dmalcolm@redhat.com>
3618
3619 * c-common.c (c_common_reswords): Add "__RTL".
3620 * c-common.h (enum rid): Add RID_RTL.
3621
2ebd93e1
MP
36222017-01-20 Marek Polacek <polacek@redhat.com>
3623
3624 PR c/64279
3625 * c-common.h (do_warn_duplicated_branches_r): Declare.
3626 * c-gimplify.c (c_genericize): Walk the function tree calling
3627 do_warn_duplicated_branches_r.
3628 * c-warn.c (expr_from_macro_expansion_r): New.
3629 (do_warn_duplicated_branches): New.
3630 (do_warn_duplicated_branches_r): New.
3631 * c.opt (Wduplicated-branches): New option.
3632
0d80ab91
DM
36332017-01-17 David Malcolm <dmalcolm@redhat.com>
3634
3635 PR c++/71497
3636 * c-indentation.c (warn_for_misleading_indentation): Use the past
3637 subjunctive in the note.
3638
7f991c36
AH
36392017-01-17 Aldy Hernandez <aldyh@redhat.com>
3640
3641 PR c/79116
3642 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
3643 start type to integer_type.
3644
1c70261c
JJ
36452017-01-16 Jakub Jelinek <jakub@redhat.com>
3646
3647 PR driver/49726
3648 * c.opt (gen-decls): Add Driver flag.
3649
1ddca3f3
PC
36502017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3651
3652 Revert:
3653 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3654
3655 PR c++/71737
3656 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
3657
7d2f3f1d
PC
36582017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3659
3660 PR c++/71737
3661 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
3662
bce6f760
MS
36632017-01-12 Martin Sebor <msebor@redhat.com>
3664
3665 (-Wformat-overflow): ...to this.
3666
bf5fbf46
MS
36672017-01-11 Martin Sebor <msebor@redhat.com>
3668
3669 PR c/78768
3670 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
3671 Also enable for LTO.
3672
e363df3f
JM
36732017-01-10 Jason Merrill <jason@redhat.com>
3674
3675 Implement P0195R2, C++17 variadic using.
3676 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
3677
bd2c6270
JJ
36782017-01-09 Jakub Jelinek <jakub@redhat.com>
3679
3680 PR translation/79019
3681 PR translation/79020
3682 * c.opt (Wnormalized=): Fix typo in description.
3683
efcc8d38
MS
36842017-01-08 Martin Sebor <msebor@redhat.com>
3685
3686 PR middle-end/77708
3687 * c.opt (-Wformat-truncation): New option.
3688
ab20d992 36892017-01-06 Alexandre Oliva <aoliva@redhat.com>
435f3f7a
AO
3690
3691 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
3692 value to unsigned short to fit in 4 hex digits without
3693 warnings.
3694
4e89adf9
EB
36952017-01-05 Eric Botcazou <ebotcazou@adacore.com>
3696
3697 * c.opt (fsso-struct): Add 'native' value.
3698
cd445b54
ML
36992017-01-05 Martin Liska <mliska@suse.cz>
3700
3701 PR pch/78970
3702 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
3703 header.
3704
a9342885
MP
37052017-01-04 Marek Polacek <polacek@redhat.com>
3706
3707 PR c++/64767
3708 * c.opt (Wpointer-compare): New option.
3709
fc73e60c
JJ
37102017-01-04 Jakub Jelinek <jakub@redhat.com>
3711
3712 PR driver/78957
3713 * c.opt (fsso-struct=): Add RejectNegative.
3714
cbe34bb5
JJ
37152017-01-01 Jakub Jelinek <jakub@redhat.com>
3716
3717 Update copyright years.
3718
d4a6c0ea
ML
37192016-12-29 Martin Liska <mliska@suse.cz>
3720
3721 PR c/78933
3722 * c.opt (strong-eval-order): Add RejectNegative keyword.
3723
67a5ad7c
JM
37242016-12-22 Jason Merrill <jason@redhat.com>
3725
3726 Implement P0522R0, matching of template template arguments.
3727 * c-cppbuiltin.c (c_cpp_builtins): Define
3728 __cpp_template_template_args.
3729
0dba7960
JJ
37302016-12-21 Jakub Jelinek <jakub@redhat.com>
3731
3732 PR bootstrap/78817
3733 * c-common.c (struct nonnull_arg_ctx): New type.
3734 (check_function_nonnull): Return bool instead of void. Use
3735 nonnull_arg_ctx as context rather than just location_t.
3736 (check_nonnull_arg): Adjust for the new context type, set
3737 warned_p to true if a warning has been diagnosed.
3738 (check_function_arguments): Return bool instead of void.
3739 * c-common.h (check_function_arguments): Adjust prototype.
3740
31bfc9b9
JM
37412016-12-21 Jason Merrill <jason@redhat.com>
3742
3743 * c.opt (-fnew-ttp-matching): New flag.
3744 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
3745
629b3d75
MJ
37462016-12-14 Martin Jambor <mjambor@suse.cz>
3747
3748 * c-omp.c: Include omp-general.h instead of omp-low.h.
3749 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
3750 name.
3751
474da67e
MS
37522016-12-14 Martin Sebor <msebor@redhat.com>
3753
3754 PR c/17308
3755 * c-common.c (check_nonnull_arg): Disable when optimization
3756 is enabled.
3757
fe366b87
MP
37582016-12-12 Marek Polacek <polacek@redhat.com>
3759
3760 PR c++/78647
3761 * c-common.c (attribute_fallthrough_p): Return false for
3762 error_mark_node.
3763
8bd9f164
MS
37642016-12-08 Martin Sebor <msebor@redhat.com>
3765
3766 PR c/78284
3767 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
3768
060162e0
MS
37692016-12-08 Martin Sebor <msebor@redhat.com>
3770
3771 PR c/78165
92a285c1
ML
3772 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
3773 suffix.
060162e0 3774
ee92e7ba
MS
37752016-12-07 Martin Sebor <msebor@redhat.com>
3776
3777 PR c/53562
3778 PR middle-end/77784
3779 PR middle-end/78149
3780 PR middle-end/78138
3781 * c.opt (-Wstringop-overflow): New option.
3782
84b0769e
MO
37832016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
3784
3785 * c-attribs.c (asan odr indicator): New attribute.
3786 (handle_asan_odr_indicator_attribute): New function.
3787
7fa6a965
PK
37882016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3789
3790 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
3791 ptrdiff_type_node;
3792
56d8ffc1
JG
37932016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
3794
3795 * c-common.c (excess_precision_mode_join): New.
3796 (c_ts18661_flt_eval_method): New.
3797 (c_c11_flt_eval_method): Likewise.
3798 (c_flt_eval_method): Likewise.
3799 * c-common.h (excess_precision_mode_join): New.
3800 (c_flt_eval_method): Likewise.
3801 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
3802 (cpp_iec_559_value): Call it.
3803 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
3804 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
3805 __FLT_EVAL_METHOD_TS_18661_3__.
3806
04f0fcf7
JG
38072016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
3808
3809 * c-opts.c (c_common_post_options): Add logic to handle the default
3810 case for -fpermitted-flt-eval-methods.
3811
fb2675cb
PB
38122016-11-23 Paolo Bonzini <bonzini@gnu.org>
3813
3814 * c.opt (Wexpansion-to-defined): New.
3815
ec1c5694
JJ
38162016-11-23 Jakub Jelinek <jakub@redhat.com>
3817
3818 PR target/78451
3819 * c-pragma.c (handle_pragma_target): Don't replace
3820 current_target_pragma, but chainon the new args to the current one.
3821
730c9e75
NS
38222016-11-22 Nathan Sidwell <nathan@acm.org>
3823
3824 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 3825 indentation and formatting.
730c9e75 3826
89990732
MS
38272016-11-21 Martin Sebor <msebor@redhat.com>
3828
3829 * c.opt (-fprintf-return-value): Enable by default.
3830
48330c93
BE
38312016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3832
3833 PR c++/71973
3834 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
3835 * c-common.c (c_common_nodes_and_builtins): Initialize
3836 const_tm_ptr_type_node.
3837
0d939c95
MP
38382016-11-16 Marek Polacek <polacek@redhat.com>
3839
3840 PR c/78285
3841 * c-common.c (c_add_case_label): Turn error_at calls into inform.
3842
8e745a17
JJ
38432016-11-14 Jakub Jelinek <jakub@redhat.com>
3844
3845 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
3846
1ee62b92 38472016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
3848 Richard Biener <rguenther@suse.de>
3849
3850 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
3851 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
3852 * c.opt (fgimple): New option.
1ee62b92 3853
22b15758
UB
38542016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3855
3856 PR c/35503
3857 * c-common.h (warn_for_restrict): Declare.
3858 * c-warn.c: Include gcc-rich-location.h.
3859 (warn_for_restrict): New function.
3860 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
3861 (gcc_cdiag_char_table): Likewise.
3862 (gcc_cxxdiag_char_table): Likewise.
3863 * c.opt (Wrestrict): New option.
3864
4be719cd
EB
38652016-11-13 Eric Botcazou <ebotcazou@adacore.com>
3866
3867 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
3868 for nested types only if the type is a record or union and dump SLOC.
3869
4a826ca6
JM
38702016-11-09 Jason Merrill <jason@redhat.com>
3871
3872 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
3873
2e955d50
JJ
38742016-11-09 Jakub Jelinek <jakub@redhat.com>
3875
3876 * c-ubsan.c (ubsan_instrument_shift): Handle split
3877 -fsanitize=shift-base and -fsanitize=shift-exponent.
3878
51dc6603
JM
38792016-11-07 Jason Merrill <jason@redhat.com>
3880
3881 * c.opt (Wc++1z-compat): New.
3882 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
3883
6dc4a604
ML
38842016-11-07 Martin Liska <mliska@suse.cz>
3885
3886 * c-warn.c (warn_for_unused_label): Save all labels used
3887 in goto or in &label.
3888
b302001e
JM
38892016-11-03 Jason Merrill <jason@redhat.com>
3890
3891 * c-cppbuiltin.c (c_cpp_builtins): Correct
3892 __cpp_inheriting_constructors.
3893
31f7f784
JM
38942016-11-01 Jason Merrill <jason@redhat.com>
3895
2bc78e3c
JM
3896 * c-cppbuiltin.c (c_cpp_builtins): Update
3897 __cpp_inheriting_constructors.
3898
31f7f784
JM
3899 * c.opt (-fnew-inheriting-ctors): New.
3900 * c-opts.c: Default to on for ABI 11+.
3901
dcb466ec
JJ
39022016-10-31 Jakub Jelinek <jakub@redhat.com>
3903
3904 PR c++/77948
3905 * c.opt (fext-numeric-literals): Add Var and Init.
3906 * c-opts.c (c_common_handle_option): Don't clear
3907 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
3908 (c_common_post_options): Clear it here if not set
3909 explicitly.
3910
52e1b91e
AH
39112016-10-28 Aldy Hernandez <aldyh@redhat.com>
3912
3913 PR debug/77773
3914 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
3915 if NULL.
3916
e16f1cc7
JJ
39172016-10-25 Jakub Jelinek <jakub@redhat.com>
3918
3919 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
3920 * c-common.c (c_common_reswords): Add __builtin_launder.
3921
f8348061
BE
39222016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
3923
3924 * c-common.c (c_common_truthvalue_conversion): Warn for
3925 multiplications in boolean context. Fix the quoting of '<<' and '<'
3926 in the shift warning.
3927
eff89e01
BE
39282016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
3929
3930 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
3931
24bc7bf4
JM
39322016-10-20 Jason Merrill <jason@redhat.com>
3933
3934 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
3935
4c712374
BE
39362016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3937
3938 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
3939 integer shift ops in boolean context.
3940
39412016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
3942
3943 * c.opt (Walloca): New.
3944 (Walloca-larger-than=): New.
3945 (Wvla-larger-than=): New.
3946
8fa18c06
MP
39472016-10-17 Marek Polacek <polacek@redhat.com>
3948
3949 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
3950 Return immediately when finding a match.
3951 (warn_tautological_cmp): Remove a boolean variable that is no longer
3952 needed.
3953
b12b1915
MP
39542016-10-17 Marek Polacek <polacek@redhat.com>
3955
3956 * c-attribs.c: New file.
3957 * c-common.c: Move attributes handling to c-attribs.c.
3958 (get_nonnull_operand): No longer static.
3959 * c-common.h: Move the declarations from c-attribs.c to its own section.
3960
2045acd9
JM
39612016-10-14 Jason Merrill <jason@redhat.com>
3962
3963 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
3964 and __cpp_deduction_guides.
3965
14a2c9aa
JM
39662016-10-13 Jason Merrill <jason@redhat.com>
3967
3968 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
3969
4d0cdd0c
TP
39702016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3971
3972 * c-cppbuiltin.c: Include memmodel.h.
3973 * c-opts.c: Likewise.
3974 * c-pragma.c: Likewise.
3975 * c-warn.c: Likewise.
3976
70f6d5e1
JJ
39772016-10-12 Jakub Jelinek <jakub@redhat.com>
3978
3979 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
3980 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
3981 * c-opts.c (sanitize_cpp_opts): Initialize
3982 cpp_opts->cpp_warn_implicit_fallthrough.
3983
78f61294
MP
39842016-10-11 Marek Polacek <polacek@redhat.com>
3985
3986 * c-common.c (warning_candidate_p): Change the return type to bool
3987 and return true/false instead of 1/0.
3988 (vector_mode_valid_p): Likewise.
3989
038b5cc0
MP
39902016-10-11 Marek Polacek <polacek@redhat.com>
3991
3992 * c-common.c (fold_for_warn): No longer static.
3993 (bool_promoted_to_int_p): Likewise.
3994 (c_common_get_narrower): Likewise.
3995 (constant_expression_warning): Move to c-warn.c.
3996 (constant_expression_error): Likewise.
3997 (overflow_warning): Likewise.
3998 (warn_logical_operator): Likewise.
3999 (find_array_ref_with_const_idx_r): Likewise.
4000 (warn_tautological_cmp): Likewise.
4001 (expr_has_boolean_operands_p): Likewise.
4002 (warn_logical_not_parentheses): Likewise.
4003 (warn_if_unused_value): Likewise.
4004 (strict_aliasing_warning): Likewise.
4005 (sizeof_pointer_memaccess_warning): Likewise.
4006 (check_main_parameter_types): Likewise.
4007 (conversion_warning): Likewise.
4008 (warnings_for_convert_and_check): Likewise.
4009 (match_case_to_enum_1): Likewise.
4010 (match_case_to_enum): Likewise.
4011 (c_do_switch_warnings): Likewise.
4012 (warn_for_omitted_condop): Likewise.
4013 (readonly_error): Likewise.
4014 (lvalue_error): Likewise.
4015 (invalid_indirection_error): Likewise.
4016 (warn_array_subscript_with_type_char): Likewise.
4017 (warn_about_parentheses): Likewise.
4018 (warn_for_unused_label): Likewise.
4019 (warn_for_div_by_zero): Likewise.
4020 (warn_for_memset): Likewise.
4021 (warn_for_sign_compare): Likewise.
4022 (do_warn_double_promotion): Likewise.
4023 (do_warn_unused_parameter): Likewise.
4024 (record_locally_defined_typedef): Likewise.
4025 (maybe_record_typedef_use): Likewise.
4026 (maybe_warn_unused_local_typedefs): Likewise.
4027 (maybe_warn_bool_compare): Likewise.
4028 (maybe_warn_shift_overflow): Likewise.
4029 (warn_duplicated_cond_add_or_warn): Likewise.
4030 (diagnose_mismatched_attributes): Likewise.
4031 * c-common.h: Move the declarations from c-warn.c to its own section.
4032 * c-warn.c: New file.
4033
627be19f
JM
40342016-10-08 Jason Merrill <jason@redhat.com>
4035
4036 * c-common.c (c_common_truthvalue_conversion): Don't distribute
4037 into COND_EXPR in C++.
4038
7bad794a
JJ
40392016-10-08 Jakub Jelinek <jakub@redhat.com>
4040
4041 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
4042 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
4043 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
4044
be845b04
JJ
40452016-10-07 Jakub Jelinek <jakub@redhat.com>
4046
4047 Implement LWG2296 helper intrinsic
4048 * c-common.h (enum rid): Add RID_ADDRESSOF.
4049 * c-common.c (c_common_reswords): Add __builtin_addressof.
4050
c09c4992
BE
40512016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
4052
4053 PR c++/77700
4054 * c-common.c (c_common_truthvalue_conversion): Warn also for
4055 suspicious enum values in boolean context.
4056
342cfb3e
JJ
40572016-10-06 Jakub Jelinek <jakub@redhat.com>
4058
4059 Implement P0258R2 - helper for C++17
4060 std::has_unique_object_representations trait
4061 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
4062 * c-common.c (c_common_reswords): Add
4063 __has_unique_object_representations.
4064
2e69f143
JJ
40652016-10-05 Jakub Jelinek <jakub@redhat.com>
4066
4067 PR sanitizer/66343
4068 * c-ubsan.c (ubsan_instrument_return): Don't call
4069 initialize_sanitizer_builtins here.
4070
700fff34
BE
40712016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
4072
4073 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
4074 conditional expression in boolean context when only one arm is
4075 non-boolean.
4076
9563bfcd
JJ
40772016-10-05 Jakub Jelinek <jakub@redhat.com>
4078
04a32443
JJ
4079 PR sanitizer/77823
4080 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
4081 is not integral.
4082
9563bfcd
JJ
4083 * c-common.c (c_common_reswords): Update comment for C++11.
4084
f1644724
JM
40852016-10-04 Jason Merrill <jason@redhat.com>
4086
4087 * c-common.c (make_tree_vector_from_ctor): New.
4088 * c-common.h: Declare it.
4089
5a79befb
JJ
40902016-10-04 Jakub Jelinek <jakub@redhat.com>
4091
4092 * c-cppbuiltin.c (c_cpp_builtins): Don't define
4093 __LIBGCC_JCR_SECTION_NAME__.
4094
1633d3b9
BE
40952016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
4096
4097 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
4098 left shift in boolean context.
4099
a2c6e7f2
JJ
41002016-09-29 Jakub Jelinek <jakub@redhat.com>
4101
4102 Implement P0001R1 - C++17 removal of register storage class specifier
4103 * c.opt (Wregister): New warning.
4104 * c-opts.c (c_common_post_options): Enable -Wregister by
4105 default for C++17.
4106
75304c87
JG
41072016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
4108
4109 * c-opts.c (c_common_post_options): Remove special case for
4110 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
4111 in C++.
4112
bbfac6da
JJ
41132016-09-27 Jakub Jelinek <jakub@redhat.com>
4114
6e39060a
JJ
4115 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
4116 -std=c++1z.
4117
bbfac6da
JJ
4118 * c-ada-spec.c (print_ada_declaration): Remove break after return.
4119
e73cf9a2
TP
41202016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
4121
4122 * c-common.c: Include memmodel.h.
4123
c6147dc4
MP
41242016-09-26 Marek Polacek <polacek@redhat.com>
4125
4126 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
4127
81fea426
MP
41282016-09-26 Marek Polacek <polacek@redhat.com>
4129
4130 PR c/7652
4131 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
4132 (handle_fallthrough_attribute): New function.
4133 (attribute_fallthrough_p): New function.
4134 * c-common.h (attribute_fallthrough_p): Declare.
4135
9a2300e9
MP
41362016-09-24 Marek Polacek <polacek@redhat.com>
4137
4138 PR c/77490
4139 * c.opt (Wbool-operation): New.
4140
a09e9e35
BE
41412016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4142
4143 * c-common.c (c_common_truthvalue_conversion): Inhibit
4144 Wint-in-bool-context warning with from_macro_definition_at.
4145 Mention the expression will always evaluate to true.
4146
d43b4ccc
MS
41472016-09-21 Martin Sebor <msebor@redhat.com>
4148
4149 PR bootstrap/77676
4150 * c.opt (fprintf-return-value): Temporarily initialize to zero
4151 to unblock bootstrap failures.
4152
2e1c20b1
JJ
41532016-09-21 Jakub Jelinek <jakub@redhat.com>
4154
4155 PR c++/77651
4156 * c.opt (Waligned-new=): Add RejectNegative.
4157 (faligned-new=): Likewise. Spelling fix - change
4158 aligned_new_threshhold to aligned_new_threshold.
4159 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
4160 to aligned_new_threshold.
4161
88d0c3f0
MS
41622016-09-20 Martin Sebor <msebor@redhat.com>
4163
4164 PR middle-end/49905
4165 * c.opt: Add -Wformat-length and -fprintf-return-value.
4166
144a96e4
BE
41672016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4168
4169 PR c++/77434
4170 * c.opt (Wint-in-bool-context): New warning.
4171 * c-common.c (c_common_truthvalue_conversion): Warn on integer
4172 constants in boolean context.
4173
63012d9a
JM
41742016-09-19 Joseph Myers <joseph@codesourcery.com>
4175
4176 * c-common.c (max_align_t_align): Also consider alignment of
4177 float128_type_node.
4178
931388ce
JM
41792016-09-15 Jason Merrill <jason@redhat.com>
4180
4181 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
4182 DECL_EXTERNAL.
4183
38711381
JM
41842016-09-14 Jason Merrill <jason@redhat.com>
4185
4186 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
4187 limit FIELD_DECL, either.
4188
e51fbec3
MP
41892016-09-14 Marek Polacek <polacek@redhat.com>
4190
4191 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
4192 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
4193 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
4194
254830ba
DM
41952016-09-13 David Malcolm <dmalcolm@redhat.com>
4196
4197 * c-common.c (warn_logical_not_parentheses): Replace
4198 rich_location::add_fixit_insert calls with add_fixit_insert_before
4199 and add_fixit_insert_after, eliminating the "next_loc" calculation.
4200
42763690
JM
42012016-09-13 Jason Merrill <jason@redhat.com>
4202 Tom de Vries <tom@codesourcery.com>
4203
4204 PR c++/77427
4205 * c-common.c (set_underlying_type): Don't treat array as builtin type.
4206
9453eee9
JM
42072016-09-13 Jason Merrill <jason@redhat.com>
4208
4209 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
4210 limit types at all.
4211
e96809e3
JM
42122016-09-12 Jason Merrill <jason@redhat.com>
4213
4214 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
4215 bit/byte confusion, allow large alignment for types.
4216
54dcdb88
BE
42172016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
4218
4219 PR c++/77496
4220 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
4221
d1463eb9
DM
42222016-09-12 David Malcolm <dmalcolm@redhat.com>
4223
4224 PR c/72858
4225 * c-format.c (argument_parser::check_argument_type): Add params
4226 "type_start" and "conversion_char". Use the former to generate
4227 offset_to_type_start and pass it and conversion_char to
4228 check_format_types.
4229 (check_format_info_main): Capture the start of the type
4230 information as "type_start", and pass it an format_char
4231 to arg_parser.check_argument_type.
4232 (check_format_types): Provide an example in the leading comment.
4233 Add params "offset_to_type_start" and "conversion_char"; pass
4234 them to format_type_warning calls.
4235 (test_get_modifier_for_format_len): Likewise.
4236 (matching_type_p): New function.
4237 (get_format_for_type): Add param "conversion_char" and move
4238 implementation into...
4239 (get_format_for_type_1): ...new function, called twice.
4240 Use new function matching_type_p rather than checking for
4241 TYPE_CANONICAL equality.
4242 (get_corrected_substring): New function.
4243 (format_type_warning): Provide an example in the leading comment.
4244 Add params "offset_to_type_start" and "conversion_char". Replace
4245 call to get_format_for_type with call to get_corrected_substring
4246 and move rejection of hints for widths/precisions there.
4247 (assert_format_for_type_streq): Add param "conversion_char".
4248 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
4249 (test_get_format_for_type_printf): Add conversion chars to the
4250 tests, adding coverage for various combinations of integer
4251 vs double conversions, and for preserving octal and hexadecimal
4252 conversions.
4253 (test_get_format_for_type_scanf): Add conversion chars to the
4254 tests.
4255
5b28efbb
TV
42562016-09-10 Tom de Vries <tom@codesourcery.com>
4257
4258 PR C/71602
4259 * c-common.c (build_va_arg): Handle more strict
4260 targetm.canonical_va_list_type. Replace first argument type error with
4261 assert.
4262
3f0177e7
MS
42632016-09-09 Martin Sebor <msebor@redhat.com>
4264
4265 PR c/77520
4266 PR c/77521
4267 * c-format.c (argument_parser::find_format_char_info): Use %qc
4268 format directive unconditionally.
4269
af63ba4b
JM
42702016-09-09 Jason Merrill <jason@redhat.com>
4271
4272 Implement C++17 new of over-aligned types.
4273 * c.opt: Add -faligned-new and -Waligned-new.
4274 * c-common.c (max_align_t_align): Split out from...
4275 (cxx_fundamental_alignment_p): ...here.
4276 * c-common.h: Declare it.
4277 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
4278
c65248cb
JM
42792016-09-09 Joseph Myers <joseph@codesourcery.com>
4280
4281 * c-cppbuiltin.c (builtin_define_type_width): New function.
4282 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
4283 macros.
4284
e5106e27
DM
42852016-09-07 David Malcolm <dmalcolm@redhat.com>
4286
4287 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
4288 a POINTER_TYPE.
4289 (substring_loc::get_location): Move to substring-locations.c,
4290 keeping implementation as...
4291 (c_get_substring_location): New function, from the above, reworked
4292 to use accessors rather than member lookup.
4293 * c-common.h (class substring_loc): Move to substring-locations.h,
4294 replacing with a forward decl.
4295 (c_get_substring_location): New decl.
4296 * c-format.c: Include "substring-locations.h".
4297 (format_warning_va): Move to substring-locations.c.
4298 (format_warning_at_substring): Likewise.
4299
ab20d992 43002016-09-06 Martin Sebor <msebor@redhat.com>
a42e7952
MS
4301
4302 PR c/77336
4303 * c-format.c (check_function_format): Avoid issuing warnings for
4304 functions unless they call format functions with non-constant
4305 format strings.
4306
b772a565
RB
43072016-09-06 Richard Biener <rguenther@suse.de>
4308
4309 PR c/77450
4310 * c-common.c (c_common_mark_addressable_vec): Handle
4311 COMPOUND_LITERAL_EXPR.
4312
25ff5dd3
MP
43132016-09-05 Marek Polacek <polacek@redhat.com>
4314
4315 PR c/77423
4316 * c-common.c (bool_promoted_to_int_p): New function.
4317 (expr_has_boolean_operands_p): New function.
4318 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
4319 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
4320
21234eb5
TV
43212016-09-04 Tom de Vries <tom@codesourcery.com>
4322
4323 revert:
4324 2016-08-29 Tom de Vries <tom@codesourcery.com>
4325
4326 * c-common.c (build_va_arg): Replace first argument type error
4327 with assert.
4328
9dc5773f
JJ
43292016-09-02 Jakub Jelinek <jakub@redhat.com>
4330
4331 PR c/65467
4332 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
4333 (c_finish_omp_for): Reject _Atomic qualified iterators.
4334
43352016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
4336
4337 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
4338 size to guarantee it fits the output of the formatted function
4339 regardless of its arguments.
4340
295844f6
MP
43412016-09-01 Marek Polacek <polacek@redhat.com>
4342
4343 PR c/7652
4344 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
4345 FALLTHRU comments.
4346
3d06b6f2
MP
43472016-08-29 Marek Polacek <polacek@redhat.com>
4348
4349 PR c/77292
4350 * c-common.c (warn_logical_not_parentheses): Don't warn for
4351 a comparison or a logical operator.
4352
34cedad5
TV
43532016-08-29 Tom de Vries <tom@codesourcery.com>
4354
4355 * c-common.c (build_va_arg): Fix type comparison assert.
4356
f162d717
TV
43572016-08-29 Tom de Vries <tom@codesourcery.com>
4358
4359 * c-common.c (build_va_arg): Replace first argument type error
4360 with assert.
4361
ba9bbd6f
TV
43622016-08-29 Tom de Vries <tom@codesourcery.com>
4363
4364 PR c/77398
4365 * c-common.c (build_va_arg): Add first argument error. Build va_arg
4366 with error_mark_node as va_list instead of with illegal va_list.
4367
ebef225f
MP
43682016-08-25 Marek Polacek <polacek@redhat.com>
4369 David Malcolm <dmalcolm@redhat.com>
4370
4371 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
4372 * c-common.h (warn_logical_not_parentheses): Update declaration.
4373
b00e6e75
MP
43742016-08-22 Marek Polacek <polacek@redhat.com>
4375
4376 PR c++/77321
4377 * c-common.c (warn_for_memset): Check type for null.
4378
6dc198e3
JM
43792016-08-22 Joseph Myers <joseph@codesourcery.com>
4380
14ec014e 4381 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
4382 _FloatNx types for suffixes for built-in functions.
4383
c65699ef
JM
43842016-08-19 Joseph Myers <joseph@codesourcery.com>
4385
4386 PR c/32187
4387 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
4388 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
4389 (RID_FLOAT128X): New enum rid values.
4390 (CASE_RID_FLOATN_NX): New macro.
4391 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
4392 keywords.
4393 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
4394 corresponding complex types.
4395 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
4396 _FloatNx and corresponding complex types.
4397 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
4398 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
4399 and _FloatNx types for the widest type for determining
4400 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
4401 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
4402 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
4403 and _FloatNx types.
4404 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
4405 constants.
4406 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
4407 _FloatNx types.
4408
cc015f3a
DM
44092016-08-18 David Malcolm <dmalcolm@redhat.com>
4410
4411 * c-opts.c (c_diagnostic_finalizer): Update for change to
4412 diagnostic_show_locus.
4413
cb18fd07
DM
44142016-08-18 David Malcolm <dmalcolm@redhat.com>
4415
4416 * c-common.c: Include "spellcheck.h".
4417 (cb_get_suggestion): New function.
4418 * c-common.h (cb_get_suggestion): New decl.
4419 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
4420 cb_get_suggestion.
4421
a76989dc
MP
44222016-08-18 Marek Polacek <polacek@redhat.com>
4423
4424 PR c/71514
4425 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
4426 and pointer-to-VLA.
4427
65e736c0
DM
44282016-08-16 David Malcolm <dmalcolm@redhat.com>
4429
4430 PR c/72857
4431 * c-common.c (substring_loc::get_range): Rename to...
4432 (substring_loc::get_location): ...this, converting param from a
4433 source_range * to a location_t *. Call
4434 get_source_location_for_substring rather than
4435 get_source_range_for_substring, and pass in m_caret_idx.
4436 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
4437 (substring_loc::get_range): Replace with...
4438 (substring_loc::get_location): ...this.
4439 (substring_loc::set_caret_index): New method.
4440 (substring_loc): Add field m_caret_idx.
4441 * c-format.c (format_warning_va): Update for above changes.
4442 Rename local "substring_loc" to "fmt_substring_loc" to avoid
4443 clashing with type name.
4444 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
4445 (check_argument_type): Likewise.
4446 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
4447 Use a copy when emitting warnings, setting the caret index from TYPE.
4448
7e1dde14 44492016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 4450 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
4451
4452 * c-ada-spec.c (dump_number): New function.
4453 (handle_escape_character): Likewise.
4454 (print_ada_macros): Add handling of constant integers and strings.
4455
191816a3
MP
44562016-08-12 Marek Polacek <polacek@redhat.com>
4457
4458 PR c/7652
4459 * c-common.c (scalar_to_vector): Adjust fall through comment.
4460 * c-opts.c (c_common_handle_option): Likewise.
4461 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
4462 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
4463 fall through comment.
4464 * cilk.c (extract_free_variables): Add FALLTHRU.
4465
452df4a4
JM
44662016-08-10 Jason Merrill <jason@redhat.com>
4467
4468 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
4469
f3365c12
JM
44702016-08-09 Jason Merrill <jason@redhat.com>
4471
4472 * c-common.c (c_common_attribute_table): vector_size affects type
4473 identity.
4474
f0bc3323
MP
44752016-08-09 Marek Polacek <polacek@redhat.com>
4476
4477 PR c/7652
4478 * c-ada-spec.c (dump_generic_ada_node): Add return.
4479
98e5a19a
JM
44802016-08-09 Jason Merrill <jason@redhat.com>
4481
4482 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
4483 C++17 constexpr lambdas.
4484
895aa8e1
DM
44852016-08-08 David Malcolm <dmalcolm@redhat.com>
4486
4487 PR c/64955
4488 * c-common.h (selftest::c_format_c_tests): New declaration.
4489 (selftest::run_c_tests): New declaration.
4490 * c-format.c: Include "selftest.h.
4491 (format_warning_va): Add param "corrected_substring" and use
4492 it to add a replacement fix-it hint.
4493 (format_warning_at_substring): Likewise.
4494 (format_warning_at_char): Update for new param of
4495 format_warning_va.
4496 (argument_parser::check_argument_type): Pass "fki" to
4497 check_format_types.
4498 (check_format_types): Add param "fki" and pass it to
4499 format_type_warning.
4500 (deref_n_times): New function.
4501 (get_modifier_for_format_len): New function.
4502 (selftest::test_get_modifier_for_format_len): New function.
4503 (get_format_for_type): New function.
4504 (format_type_warning): Add param "fki" and use it to attempt
4505 to provide hints for argument types when calling
4506 format_warning_at_substring.
4507 (selftest::get_info): New function.
4508 (selftest::assert_format_for_type_streq): New function.
4509 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
4510 (selftest::test_get_format_for_type_printf): New function.
4511 (selftest::test_get_format_for_type_scanf): New function.
4512 (selftest::c_format_c_tests): New function.
4513
e52ed3fe
DM
45142016-08-08 David Malcolm <dmalcolm@redhat.com>
4515
4516 PR c/52952
4517 * c-format.c: Include "diagnostic.h".
4518 (location_column_from_byte_offset): Delete.
4519 (location_from_offset): Delete.
4520 (format_warning_va): New function.
4521 (format_warning_at_substring): New function.
4522 (format_warning_at_char): New function.
4523 (check_format_arg): Capture location of format_tree and pass to
4524 check_format_info_main.
4525 (argument_parser): Add fields "start_of_this_format" and
4526 "format_string_cst".
4527 (flag_chars_t::validate): Add param "format_string_cst". Convert
4528 warning_at call using location_from_offset to call to
4529 format_warning_at_char.
4530 (argument_parser::argument_parser): Add param "format_string_cst_"
4531 and use use it to initialize field "format_string_cst".
4532 Initialize new field "start_of_this_format".
4533 (argument_parser::read_format_flags): Convert warning_at call
4534 using location_from_offset to a call to format_warning_at_char.
4535 (argument_parser::read_any_format_left_precision): Likewise.
4536 (argument_parser::read_any_format_precision): Likewise.
4537 (argument_parser::read_any_other_modifier): Likewise.
4538 (argument_parser::find_format_char_info): Likewise, in three places.
4539 (argument_parser::parse_any_scan_set): Likewise, in one place.
4540 (argument_parser::handle_conversions): Likewise, in two places.
4541 (argument_parser::check_argument_type): Add param "fmt_param_loc"
4542 and use it to make a substring_loc. Pass the latter to
4543 check_format_types.
4544 (check_format_info_main): Add params "fmt_param_loc" and
4545 "format_string_cst". Convert warning_at calls using
4546 location_from_offset to calls to format_warning_at_char. Pass the
4547 new params to the arg_parser ctor. Pass "format_string_cst" to
4548 flag_chars.validate. Pass "fmt_param_loc" to
4549 arg_parser.check_argument_type.
4550 (check_format_types): Convert first param from a location_t
4551 to a const substring_loc & and rename to "fmt_loc". Attempt
4552 to extract the range of the relevant parameter and pass it
4553 to format_type_warning.
4554 (format_type_warning): Convert first param from a location_t
4555 to a const substring_loc & and rename to "fmt_loc". Add
4556 params "param_range" and "type". Replace calls to warning_at
4557 with calls to format_warning_at_substring.
4558
1c4d457e
DM
45592016-08-08 David Malcolm <dmalcolm@redhat.com>
4560
4561 * c-format.c (class flag_chars_t): New class.
4562 (struct length_modifier): New struct.
4563 (class argument_parser): New class.
4564 (flag_chars_t::flag_chars_t): New ctor.
4565 (flag_chars_t::has_char_p): New method.
4566 (flag_chars_t::add_char): New method.
4567 (flag_chars_t::validate): New method.
4568 (flag_chars_t::get_alloc_flag): New method.
4569 (flag_chars_t::assignment_suppression_p): New method.
4570 (argument_parser::argument_parser): New ctor.
4571 (argument_parser::read_any_dollar): New method.
4572 (argument_parser::read_format_flags): New method.
4573 (argument_parser::read_any_format_width): New method.
4574 (argument_parser::read_any_format_left_precision): New method.
4575 (argument_parser::read_any_format_precision): New method.
4576 (argument_parser::handle_alloc_chars): New method.
4577 (argument_parser::read_any_length_modifier): New method.
4578 (argument_parser::read_any_other_modifier): New method.
4579 (argument_parser::find_format_char_info): New method.
4580 (argument_parser::validate_flag_pairs): New method.
4581 (argument_parser::give_y2k_warnings): New method.
4582 (argument_parser::parse_any_scan_set): New method.
4583 (argument_parser::handle_conversions): New method.
4584 (argument_parser::check_argument_type): New method.
4585 (check_format_info_main): Introduce classes argument_parser
4586 and flag_chars_t, moving the code within the loop into methods
4587 of these classes. Make various locals "const".
4588
88fa5555
DM
45892016-08-05 David Malcolm <dmalcolm@redhat.com>
4590
4591 * c-common.c: Include "substring-locations.h".
4592 (get_cpp_ttype_from_string_type): New function.
4593 (g_string_concat_db): New global.
4594 (substring_loc::get_range): New method.
4595 * c-common.h (g_string_concat_db): New declaration.
4596 (class substring_loc): New class.
4597 * c-lex.c (lex_string): When concatenating strings, capture the
4598 locations of all tokens using a new obstack, and record the
4599 concatenation locations within g_string_concat_db.
4600 * c-opts.c (c_common_init_options): Construct g_string_concat_db
4601 on the ggc-heap.
4602
78169471
MP
46032016-07-29 Marek Polacek <polacek@redhat.com>
4604
638fc14f
MP
4605 PR c/71926
4606 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
4607 parentheses warning.
4608
78169471
MP
4609 PR c/71574
4610 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
4611
1225d6b1
ML
46122016-07-28 Martin Liska <mliska@suse.cz>
4613
4614 PR gcov-profile/68025
4615 * c-common.c (handle_no_profile_instrument_function_attribute):
4616
ec1e2a40
BE
46172016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
4618
4619 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
4620 BITS_PER_UNIT_LOG.
4621
5ec2cd9f
JM
46222016-07-25 Jason Merrill <jason@redhat.com>
4623
4624 PR c++/65970
4625 * c.opt (fconstexpr-loop-limit): New.
4626
9dc5773f 46272016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
4628
4629 PR c++/71675
4630 * c-common.c (resolve_overloaded_builtin): Avoid converting
4631 __atomic_compare_exchange_n return type to that of what its
4632 first argument points to.
4633
e3fe09c1
UB
46342016-07-22 Uros Bizjak <ubizjak@gmail.com>
4635
4636 * c-common.c: Use HOST_WIDE_INT_M1U instead of
4637 ~(unsigned HOST_WIDE_INT) 0.
4638
bc91c436
ML
46392016-07-22 Martin Liska <mliska@suse.cz>
4640
4641 PR gcov-profile/69028
4642 PR gcov-profile/62047
4643 * cilk.c (create_cilk_helper_decl): Set location of a new decl
4644 to the current_function_decl.
4645
451dcc66
JM
46462016-07-21 Jason Merrill <jason@redhat.com>
4647
4648 PR c++/65168
4649 * c-common.c (c_common_truthvalue_conversion): Check
4650 c_inhibit_evaluation_warnings for warning about address of
4651 reference.
4652
de6a69ee
DM
46532016-07-20 David Malcolm <dmalcolm@redhat.com>
4654
4655 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
4656 const char *.
4657
d022c55a
JM
46582016-07-15 Jason Merrill <jason@redhat.com>
4659
4660 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
4661
ddbbcb19
JJ
46622016-07-15 Jakub Jelinek <jakub@redhat.com>
4663
4664 PR c/71858
4665 * c-common.h (enum lookup_name_fuzzy_kind): Add
4666 FUZZY_LOOKUP_FUNCTION_NAME.
4667
d0cf395a
JM
46682016-07-08 Jason Merrill <jason@redhat.com>
4669
4670 P0145: Refining Expression Order for C++.
4671 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
4672 * c-opts.c: Adjust.
4673
98d44e93
MT
46742016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
4675
4676 PR c++/71214
4677 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
4678
f9d8d994
TS
46792016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4680
4681 * c-pragma.h (enum pragma_kind): Rename
4682 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
4683 users.
4684
4aa83879
RB
46852016-06-29 Richard Biener <rguenther@suse.de>
4686
4687 PR middle-end/71002
4688 * c-common.c (c_common_get_alias_set): Remove union type punning case.
4689
a25bd9e6
JM
46902016-06-24 Jason Merrill <jason@redhat.com>
4691
4692 P0145R2: Refining Expression Order for C++.
4693 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
4694 MODIFY_EXPR.
4695
a86451b9
JJ
46962016-06-24 Jakub Jelinek <jakub@redhat.com>
4697
4698 * c-common.c (check_builtin_function_arguments): Require last
4699 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
4700 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
4701 if the last argument is pointer to enumerated or boolean type.
4702
1a4f11c8
DM
47032016-06-22 David Malcolm <dmalcolm@redhat.com>
4704
4705 PR c/70339
4706 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
4707 (lookup_name_fuzzy): New prototype.
4708
fe55692c
JDA
47092016-06-21 John David Anglin <danglin@gcc.gnu.org>
4710
4711 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
4712
4eb24e01
JM
47132016-06-14 Jason Merrill <jason@redhat.com>
4714
4715 P0145R2: Refining Expression Order for C++.
4716 * c.opt (fargs-in-order): New.
4717 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
4718
ef7cf206
JJ
47192016-06-13 Jakub Jelinek <jakub@redhat.com>
4720
0dda258b
JJ
4721 PR sanitizer/71498
4722 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
4723 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
4724
ef7cf206
JJ
4725 PR preprocessor/71183
4726 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
4727 to cb_get_source_date_epoch.
4728
50b15873
JJ
47292016-06-10 Jakub Jelinek <jakub@redhat.com>
4730
4731 PR c/68657
4732 * c.opt (Wpsabi): Add Warning flag.
4733
4d926e34
MS
47342016-06-10 Martin Sebor <msebor@redhat.com>
4735
4736 PR c/71392
14ec014e 4737 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
4738 the nonnull attribute in type-generic builtins.
4739
e01b4e16
MS
47402016-06-09 Martin Sebor <msebor@redhat.com>
4741
4742 PR c/70883
4743 * c-common.c (builtin_function_validate_nargs): Make text of error
4744 message consistent with others like it.
4745
44a845ca
MS
47462016-06-08 Martin Sebor <msebor@redhat.com>
4747 Jakub Jelinek <jakub@redhat.com>
4748
4749 PR c++/70507
4750 PR c/68120
4751 * c-common.c (check_builtin_function_arguments): Handle
4752 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4753
a80a7051
RB
47542016-06-08 Richard Biener <rguenther@suse.de>
4755
4756 * c-common.c (parse_optimize_options): Improve diagnostic messages.
4757
bfd67b47
RB
47582016-06-07 Richard Biener <rguenther@suse.de>
4759
4760 PR c/61564
4761 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
4762 options and warn about others.
4763
15c98b2e
ES
47642016-06-01 Eduard Sanou <dhole@openmailbox.org>
4765
4766 * c-common.c (get_source_date_epoch): Rename to
4767 cb_get_source_date_epoch.
4768 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
4769 message when the parsing fails. Use error_at instead of fatal_error.
4770 * c-common.h (get_source_date_epoch): Rename to
4771 cb_get_source_date_epoch.
4772 * c-common.h (cb_get_source_date_epoch): Prototype.
4773 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
4774 * c-common.h (c_omp_region_type): Remove trailing comma.
4775 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
4776 * c-lex.c (c_lex_with_flags): Remove initialization of
4777 pfile->source_date_epoch.
4778
00631022
JJ
47792016-05-30 Jakub Jelinek <jakub@redhat.com>
4780
4781 PR c++/71349
4782 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
4783 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
4784 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
4785 instead of C_OMP_CLAUSE_SPLIT_FOR.
4786
f17a223d
RB
47872016-05-24 Richard Biener <rguenther@suse.de>
4788
4789 PR middle-end/70434
4790 PR c/69504
4791 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
4792 (convert_vector_to_array_for_subscript): ... this.
4793 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
4794 VIEW_CONVERT_EXPR to an array type. Rename to ...
4795 (convert_vector_to_array_for_subscript): ... this.
4796
4f2e1536
MP
47972016-05-12 Marek Polacek <polacek@redhat.com>
4798
4799 PR c/70756
4800 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
4801 size_in_bytes and pass LOC to it.
4802
d6e83a8d
MM
48032016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4804
4805 PR c/43651
4806 * c.opt (Wduplicate-decl-specifier): New option.
4807
5c3a10fb
MP
48082016-05-11 Marek Polacek <polacek@redhat.com>
4809
4810 PR c++/71024
4811 * c-common.c (diagnose_mismatched_attributes): New function.
4812 * c-common.h (diagnose_mismatched_attributes): Declare.
4813
deef7113
MP
48142016-05-04 Marek Polacek <polacek@redhat.com>
4815
4816 * c.opt (Wdangling-else): New option.
4817
79ce98bc
MP
48182016-05-03 Marek Polacek <polacek@redhat.com>
4819
4820 PR c/70859
4821 * c-common.c (builtin_function_validate_nargs): Add location
4822 parameter. Use it.
4823 (check_builtin_function_arguments): Add location and arguments
4824 parameters. Use them.
4825 * c-common.h (check_builtin_function_arguments): Update declaration.
4826
381cdae4
RB
48272016-05-03 Richard Biener <rguenther@suse.de>
4828
4829 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
4830 allow call args to gimplify to SSA names.
4831
1d793c34
MP
48322016-05-03 Marek Polacek <polacek@redhat.com>
4833
4834 * c-common.h (enum c_omp_region_type): Remove stray comma.
4835
77886428
CP
48362016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4837
4838 * c-common.h (enum c_omp_region_type): Define.
4839
697e0b28
RS
48402016-05-02 Richard Sandiford <richard.sandiford@arm.com>
4841
4842 * c-common.c (shorten_compare): Use wi::to_wide.
4843
e7ff0319
CP
48442016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4845
4846 PR middle-end/70626
4847 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
4848 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
4849 reduction clauses in acc parallel loops.
4850
2fff3db8
MP
48512016-04-29 Marek Polacek <polacek@redhat.com>
4852
4853 PR c/70852
4854 * c-common.c (warn_for_memset): Check domain before accessing it.
4855
509063eb
DV
48562016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
4857
4858 PR/69089
4859 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
4860 "aligned" attribute.
4861
b632761d
JM
48622016-04-28 Jason Merrill <jason@redhat.com>
4863
4864 * c-lex.c (c_common_has_attribute): Handle nodiscard.
4865
174f6622
ES
48662016-04-28 Eduard Sanou <dhole@openmailbox.org>
4867 Matthias Klose <doko@debian.org>
4868
4869 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 4870 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
4871 handling.
4872 * c-common.h (get_source_date_epoch): Prototype.
4873 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
4874
6bc2bb18
RB
48752015-04-27 Ryan Burn <contact@rnburn.com>
4876
4877 PR c++/69024
4878 PR c++/68997
4879 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
4880 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
4881 external linkage.
4882 (cilk_detect_and_unwrap): Corresponding changes.
4883 (extract_free_variables): Don't extract free variables from
4884 AGGR_INIT_EXPR slot.
4885 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
4886 (cilk_recognize_spawn): Likewise.
4887
c1e1f433
BS
48882016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4889
4890 * c.opt (Wmemset-elt-size): New option.
4891 * c-common.c (warn_for_memset): New function.
4892 * c-common.h (warn_for_memset): Declare.
4893
d067e05f
JM
48942016-04-25 Jason Merrill <jason@redhat.com>
4895
4896 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
4897 No longer static.
4898 * c-common.h: Declare it.
4899 * c-lex.c (c_common_has_attribute): Add maybe_unused.
4900
9aa36ae5
JM
49012016-04-22 Jason Merrill <jason@redhat.com>
4902
4903 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
4904
477d4906
IV
49052016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4906
4907 PR c++/69363
4908 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
4909 * c-common.h (c_finish_cilk_clauses): Remove declaration.
4910
fe37c7af
MM
49112016-04-18 Michael Matz <matz@suse.de>
4912
4913 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
4914 and SET_DECL_ALIGN.
4915
23f2660f
EB
49162016-04-17 Eric Botcazou <ebotcazou@adacore.com>
4917
4918 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
4919 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
4920 to incomplete types.
4921 (dump_nested_type): Remove redundant tests and tidy up.
4922 (print_ada_declaration): Also set TREE_VISITED on the declaration of
4923 a type which is the typedef of an original type.
4924
1e77281b
MP
49252016-04-15 Marek Polacek <polacek@redhat.com>
4926
4927 PR c/70651
4928 * c-common.c (build_va_arg): Change two asserts into errors and return
4929 error_mark_node.
4930
b3a77f21
MP
49312016-04-13 Marek Polacek <polacek@redhat.com>
4932
4933 PR c++/70639
4934 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
4935 for switch statements, too.
4936
322b8466
JM
49372016-03-28 Jason Merrill <jason@redhat.com>
4938
4939 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
4940
fbdb6baf
MP
49412016-03-23 Marek Polacek <polacek@redhat.com>
4942
4943 PR c++/69884
4944 * c.opt (Wignored-attributes): New option.
4945
5c240f4d
DM
49462016-03-22 David Malcolm <dmalcolm@redhat.com>
4947
4948 PR c/69993
4949 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
4950 diagnostic text, reversing the order of the warning and note so
4951 that they appear in source order.
4952
14ba7b28
MP
49532016-03-17 Marek Polacek <polacek@redhat.com>
4954
4955 PR c/69407
4956 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
4957 operations.
4958
08a1cadc
JM
49592016-03-14 Jason Merrill <jason@redhat.com>
4960
2aaeea19
JM
4961 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
4962
08a1cadc
JM
4963 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
4964
c06d25bb
RB
49652016-03-09 Richard Biener <rguenther@suse.de>
4966
4967 PR c/70143
4968 * c-common.c (strict_aliasing_warning): Add back
4969 alias_sets_conflict_p check.
4970
80aac5c8
JM
49712016-03-08 Jason Merrill <jason@redhat.com>
4972
4973 * c-opts.c (set_std_cxx1z): Don't enable concepts.
4974
64b23c13
DM
49752016-03-04 David Malcolm <dmalcolm@redhat.com>
4976
4977 PR c/68187
4978 * c-indentation.c (get_visual_column): Move code to determine next
4979 tab stop to...
4980 (next_tab_stop): ...this new function.
4981 (line_contains_hash_if): Delete function.
4982 (detect_preprocessor_logic): Delete function.
4983 (get_first_nws_vis_column): New function.
4984 (detect_intervening_unindent): New function.
4985 (should_warn_for_misleading_indentation): Replace call to
4986 detect_preprocessor_logic with a call to
4987 detect_intervening_unindent.
4988
729526f5
DM
49892016-03-04 David Malcolm <dmalcolm@redhat.com>
4990
4991 PR c/68187
4992 * c-indentation.c (should_warn_for_misleading_indentation): When
4993 suppressing warnings about cases where the guard and body are on
4994 the same column, only use the first non-whitespace column in place
4995 of the guard token column when dealing with "else" clauses.
4996 When rejecting aligned BODY and NEXT, loosen the requirement
4997 from equality with the first non-whitespace of guard to simply
4998 that they not be indented relative to it.
4999
e9a35493
RB
50002016-03-04 Richard Biener <rguenther@suse.de>
5001
5002 PR c++/70054
5003 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
5004 instead of alias_sets_conflict_p.
5005
1be56bc5
MP
50062016-03-01 Marek Polacek <polacek@redhat.com>
5007
5008 PR c++/69795
5009 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
5010 any DECL.
5011
35886f0b
MS
50122016-02-22 Martin Sebor <msebor@redhat.com>
5013
5014 PR middle-end/69780
5015 * c-common.c (check_builtin_function_arguments): Validate and
5016 reject invalid arguments to __builtin_alloca_with_align.
5017
4246c8da
MW
50182016-02-20 Mark Wielaard <mjw@redhat.com>
5019
5020 PR c/28901
5021 * c.opt (Wunused-const-variable): Turn into Alias for...
5022 (Wunused-const-variable=): New option.
5023
268be88c
BE
50242016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5025
5026 PR c++/69865
5027 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
5028 here...
5029 (c_common_init_options): ...to here.
5030 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
5031
871b3f47
JJ
50322016-02-19 Jakub Jelinek <jakub@redhat.com>
5033
5034 PR c++/69826
5035 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
5036 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
5037 flag_preprocess_only.
5038
bf14eba2
JJ
50392016-02-16 Jakub Jelinek <jakub@redhat.com>
5040
5041 PR c/69835
5042 * c.opt (Wnonnull-compare): Enable for -Wall.
5043
ba6b3795
JJ
50442016-02-15 Jakub Jelinek <jakub@redhat.com>
5045
5046 PR c++/69797
5047 * c-common.c (sync_resolve_size): Diagnose too few arguments
5048 even when params is non-NULL empty vector.
5049
a011cd92
BS
50502016-02-08 Bernd Schmidt <bschmidt@redhat.com>
5051
5052 PR target/60410
5053 * c.opt (fshort-double): Remove.
5054
46cb9332
MS
50552016-02-05 Martin Sebor <msebor@redhat.com>
5056
5057 PR c++/69662
5058 * c.opt (Warning options): Update -Wplacement-new to take
5059 an optional argument.
5060
e1b81f2b
JJ
50612016-02-01 Jakub Jelinek <jakub@redhat.com>
5062
5063 PR preprocessor/69543
5064 PR c/69558
5065 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
5066 instead of loc to control_warning_option.
5067
b6adbb9f
NS
50682016-02-01 Nathan Sidwell <nathan@codesourcery.com>
5069
5070 * c.opt (fopenacc-dim=): New option.
5071
5d70666e
RB
50722016-01-27 Ryan Burn <contact@rnburn.com>
5073
5074 PR cilkplus/69267
5075 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
5076 gimplify_arg. Removed superfluous post_p argument.
5077 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
5078 superfluous post_p argument.
5079 * c-gimplify.c (c_gimplify_expr): Likewise.
5080
01e1dea3
DM
50812016-01-26 David Malcolm <dmalcolm@redhat.com>
5082
5083 PR other/69006
5084 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
5085 pp_newline_and_flush with pp_flush.
5086
9f04a53e
MS
50872016-01-20 Martin Sebor <msebor@redhat.com>
5088
5089 PR c/69405
5090 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
5091 an incompatible argument when the argument isn't a valid tree node.
5092
7f26f7df
JM
50932016-01-18 Jason Merrill <jason@redhat.com>
5094
5095 PR c++/68767
5096 * c-common.c (check_function_arguments_recurse): Fold the whole
5097 COND_EXPR, not just the condition.
5098
f62bf092
TV
50992016-01-18 Tom de Vries <tom@codesourcery.com>
5100
5101 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
5102 classify as loop clause.
5103
e0a575ff
JJ
51042016-01-15 Jakub Jelinek <jakub@redhat.com>
5105
5106 PR bootstrap/68271
5107 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
5108 C++ FE no longer has limit on number of pragmas.
5109
51102015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
5111
5112 PR c++/69048
5113 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 5114 to add missing cleanup point.
b6e3db06 5115
c7df95d8
DM
51162016-01-14 David Malcolm <dmalcolm@redhat.com>
5117
5118 PR c++/68819
5119 * c-indentation.c (get_visual_column): Add location_t param.
5120 Handle the column number being zero by effectively disabling the
5121 warning, with an "inform".
5122 (should_warn_for_misleading_indentation): Add location_t argument
5123 for all uses of get_visual_column.
5124
21efdd80
PP
51252016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
5126
5127 PR c++/69029
5128 * c-indentation.c (should_warn_for_misleading_indentation):
5129 Don't warn about do-while statements.
5130
7a127fa7
MS
51312016-01-07 Martin Sebor <msebor@redhat.com>
5132
5133 PR c/68966
5134 * c-common.c (sync_resolve_size): Reject first argument when it's
5135 a pointer to _Bool.
5136
c589e975
DM
51372016-01-05 David Malcolm <dmalcolm@redhat.com>
5138
5139 PR c/69122
5140 * c-indentation.c (get_visual_column): Remove default argument.
5141 (should_warn_for_misleading_indentation): For the multiline case,
5142 update call to get_visual_column for next_stmt_exploc so that it
5143 captures the location of the first non-whitespace character in the
5144 relevant line. Don't issue warnings if there is non-whitespace
5145 before the next statement.
5146
818ab71a
JJ
51472016-01-04 Jakub Jelinek <jakub@redhat.com>
5148
5149 Update copyright years.
5150
745e411d
DM
51512015-12-21 David Malcolm <dmalcolm@redhat.com>
5152
5153 * c-common.c (binary_op_error): Convert first param from
5154 location_t to rich_location * and use it when emitting an error.
5155 * c-common.h (binary_op_error): Convert first param from
5156 location_t to rich_location *.
5157
de67c4c3
DM
51582015-12-16 David Malcolm <dmalcolm@redhat.com>
5159
5160 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
5161 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
5162
4a38b02b
IV
51632015-12-15 Ilya Verbin <ilya.verbin@intel.com>
5164
5165 * c-common.c (c_common_attribute_table): Handle "omp declare target
5166 link" attribute.
5167
54d62f51
JJ
51682015-12-14 Jakub Jelinek <jakub@redhat.com>
5169
5170 PR c/68833
5171 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
5172
8d4227c8
TB
51732014-12-12 Tobias Burnus <burnus@net-b.de>
5174
5175 PR fortran/68815
5176 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
5177 specifiers (%d, %i,%u and %c).
5178
f6069ccc
DM
51792015-12-10 David Malcolm <dmalcolm@redhat.com>
5180
5181 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
5182
63bbf46d
JJ
51832015-12-08 Jakub Jelinek <jakub@redhat.com>
5184
5185 PR c/48088
5186 PR c/68657
5187 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
5188 * c-pragma.c (handle_pragma_diagnostic): Adjust
5189 control_warning_option caller.
5190
f79520bb
DM
51912015-12-07 David Malcolm <dmalcolm@redhat.com>
5192
5193 * c-common.c (c_cpp_error): Update for change to
5194 rich_location::set_range.
5195
b3d5bc62
JJ
51962015-12-04 Paolo Bonzini <bonzini@gnu.org>
5197
5198 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
5199 shifting 1 out of the sign bit.
5200
52012015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
5202
5203 * c-common.c (c_common_attribute_table[]): Update max arguments
5204 count for "simd" attribute.
5205 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
5206
6eb4a537
JJ
52072015-12-03 Jakub Jelinek <jakub@redhat.com>
5208
5209 PR preprocessor/57580
5210 * c-ppoutput.c (print): Change printed field to bool.
5211 Move src_file last for smaller padding.
5212 (init_pp_output): Set print.printed to false instead of 0.
5213 (scan_translation_unit): Fix up formatting. Set print.printed
5214 to true after printing something other than newline.
5215 (scan_translation_unit_trad): Set print.printed to true instead of 1.
5216 (maybe_print_line_1): Set print.printed to false instead of 0.
5217 (print_line_1): Likewise.
5218 (do_line_change): Set print.printed to true instead of 1.
5219 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
5220 dump_macro): Set print.printed to false after printing newline.
5221
4250754e
JM
52222015-12-02 Jason Merrill <jason@redhat.com>
5223
f479b43d
JM
5224 * c-common.c (fold_for_warn): New.
5225 (warn_logical_operator, warn_tautological_cmp)
5226 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
5227
4250754e
JM
5228 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
5229 (c_fully_fold_internal, decl_constant_value_for_optimization):
5230 Move to c/c-fold.c.
5231 * c-common.h: Don't declare decl_constant_value_for_optimization.
5232
e9e32ee6
JM
52332015-12-02 Joseph Myers <joseph@codesourcery.com>
5234
5235 PR c/68162
5236 * c-common.h (c_build_qualified_type): Add extra default
5237 arguments.
5238
37d5ad46
JB
52392015-12-01 Julian Brown <julian@codesourcery.com>
5240 Cesar Philippidis <cesar@codesourcery.com>
5241 James Norris <James_Norris@mentor.com>
5242
5243 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
5244 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
5245 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
5246
f07862c7
EB
52472015-11-30 Eric Botcazou <ebotcazou@adacore.com>
5248
5249 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
5250 (decl_sloc_common): Delete and move bulk of processing to...
5251 (decl_sloc): ...here.
5252 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
5253 (dump_ada_double_name): Remove S parameter and compute the suffix.
5254 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
5255 element type and deal with an anonymous one.
5256 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
5257 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
5258 and remove reference to QUAL_UNION_TYPE.
5259 (dump_nested_types): Make 2 passes on the fields and move bulk to...
5260 (dump_nested_type): ...here. New function extracted from above.
5261 Generate a full declaration for anonymous element type of arrays.
5262 (print_ada_declaration): Really skip anonymous declarations. Remove
5263 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
5264 Clean up processing of declarations of array types and objects.
5265 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
5266 Remove obsolete code and tidy up.
5267
75c8aac3
JH
52682015-11-29 Jan Hubicka <hubicka@ucw.cz>
5269
5270 PR c/67581
5271 * c-common.c (handle_transparent_union_attribute): Update
5272 also type variants.
5273
b58d3df2
ML
52742015-11-27 Martin Liska <mliska@suse.cz>
5275
5276 PR c++/68312
5277 * array-notation-common.c (cilkplus_extract_an_triplets):
5278 Release vector of vectors.
5279 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
5280
89a01fcf
EB
52812015-11-26 Eric Botcazou <ebotcazou@adacore.com>
5282
5283 PR c++/68527
5284 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
5285 (print_ada_struct_decl): Likewise.
5286
cc5c5226
IZ
52872015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
5288
5289 PR c++/68001
5290 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
5291 * cilk.c (recognize_spawn): Determine location in a more precise
5292 way.
5293
269adb9d
JM
52942015-11-19 Jason Merrill <jason@redhat.com>
5295
5296 * c-common.c (shorten_compare): But look through macros from
5297 system headers.
5298
d0eccfcd
JM
52992015-11-18 Jason Merrill <jason@redhat.com>
5300
5301 * c-common.c (shorten_compare): Don't -Wtype-limits if the
5302 non-constant operand comes from a macro.
5303
3e44547c
JM
53042015-11-17 Jason Merrill <jason@redhat.com>
5305
5306 PR bootstrap/68346
5307 * c-common.c (warn_tautological_cmp): Fold before checking for
5308 constants.
5309
0f62c7a0
MP
53102015-11-16 Marek Polacek <polacek@redhat.com>
5311
5312 PR c++/68362
5313 * c-common.c (check_case_bounds): Fold low and high cases.
5314
a868811e
MP
53152015-11-16 Marek Polacek <polacek@redhat.com>
5316
5317 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
5318 * c-common.c (c_common_get_alias_set): Likewise.
5319 (handle_visibility_attribute): Likewise.
5320
fff77217
KY
53212015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
5322
5323 * c-common.c (handle_simd_attribute): New.
5324 (struct attribute_spec): Add entry for "simd".
5325 (handle_simd_attribute): New.
5326
269e63b7
KT
53272015-11-13 Kai Tietz <ktietz70@googlemail.com>
5328
5329 * c-lex.c (interpret_float): Use fold_convert.
5330
ebedc9a3
DM
53312015-11-13 David Malcolm <dmalcolm@redhat.com>
5332
5333 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
5334 and store it on the result.
5335 * c-opts.c (c_common_init_options): Set
5336 global_dc->colorize_source_p.
5337
6e232ba4
JN
53382015-11-12 James Norris <jnorris@codesourcery.com>
5339 Joseph Myers <joseph@codesourcery.com>
5340
7365279f 5341 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
5342 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
5343 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
5344 PRAGMA_OACC_CLAUSE_LINK.
5345
e78bede6
MP
53462015-11-11 Marek Polacek <polacek@redhat.com>
5347
5348 PR c/68107
5349 PR c++/68266
5350 * c-common.c (valid_array_size_p): New function.
5351 * c-common.h (valid_array_size_p): Declare.
5352
3f8257db 53532015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
5354
5355 PR bootstrap/68271
5356 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
5357
69f293c9
AM
53582015-11-11 Andrew MacLeod <amacleod@redhat.com>
5359
5360 * array-notation-common.c: Remove unused header files.
5361 * c-ada-spec.c: Likewise.
5362 * c-cilkplus.c: Likewise.
5363 * c-common.c: Likewise.
5364 * c-cppbuiltin.c: Likewise.
5365 * c-dump.c: Likewise.
5366 * c-format.c: Likewise.
5367 * c-gimplify.c: Likewise.
5368 * c-indentation.c: Likewise.
5369 * c-lex.c: Likewise.
5370 * c-omp.c: Likewise.
5371 * c-opts.c: Likewise.
5372 * c-pch.c: Likewise.
5373 * c-ppoutput.c: Likewise.
5374 * c-pragma.c: Likewise.
5375 * c-pretty-print.c: Likewise.
5376 * c-semantics.c: Likewise.
5377 * c-ubsan.c: Likewise.
5378 * cilk.c: Likewise.
5379 * stub-objc.c: Likewise.
5380
3a40d81d
NS
53812015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5382 Cesar Philippidis <cesar@codesourcery.com>
5383 James Norris <jnorris@codesourcery.com>
5384 Julian Brown <julian@codesourcery.com>
5385 Nathan Sidwell <nathan@codesourcery.com>
5386
5387 * c-pragma.c (oacc_pragmas): Add "routine".
5388 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
5389
ee45a32d
EB
53902015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5391
5392 * c-common.c (c_common_attributes): Add scalar_storage_order.
5393 (handle_scalar_storage_order_attribute): New function.
5394 * c-pragma.c (global_sso): New variable.
5395 (maybe_apply_pragma_scalar_storage_order): New function.
5396 (handle_pragma_scalar_storage_order): Likewise.
5397 (init_pragma): Register scalar_storage_order.
5398 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
5399 * c.opt (Wscalar-storage-order): New warning.
5400 (fsso-struct=): New option.
5401
eb11eb15
MS
54022015-11-08 Martin Sebor <msebor@redhat.com>
5403
5404 * c.opt (Wplacement-new): Add a period to the end of a sentence.
5405
0aad0198
RS
54062015-11-07 Richard Sandiford <richard.sandiford@arm.com>
5407
5408 * c-common.c: Don't undef DEF_BUILTIN.
5409
8a645150
DM
54102015-11-06 David Malcolm <dmalcolm@redhat.com>
5411
5412 * c-common.c (c_cpp_error): Convert parameter from location_t to
5413 rich_location *. Eliminate the "column_override" parameter and
5414 the call to diagnostic_override_column.
5415 Update the "done_lexing" clause to set range 0
5416 on the rich_location, rather than overwriting a location_t.
5417 * c-common.h (c_cpp_error): Convert parameter from location_t to
5418 rich_location *. Eliminate the "column_override" parameter.
5419
7a5e4956
CP
54202015-11-05 Cesar Philippidis <cesar@codesourcery.com>
5421 Thomas Schwinge <thomas@codesourcery.com>
5422 James Norris <jnorris@codesourcery.com>
5423
5424 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
5425 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
5426 clauses with parallel and kernels and loops.
5427 * c-pragma.h (enum pragma_omp_clause): Add entries for
5428 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
5429 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
5430 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
5431 INDEPENDENT,SEQ}.
5432 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
5433
e2f5cc96
MS
54342015-11-05 Martin Sebor <msebor@redhat.com>
5435
5436 PR c++/67942
5437 * c.opt (-Wplacement-new): New option.
5438
e01d41e5
JJ
54392015-11-05 Jakub Jelinek <jakub@redhat.com>
5440
5441 * c-common.h (c_finish_omp_atomic): Add TEST argument.
5442 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
5443 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
5444 save_expr or create_tmp_var* if TEST is true.
5445 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
5446 Don't call add_stmt here.
5447 (struct c_omp_check_loop_iv_data): New type.
5448 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
5449 c_omp_check_loop_iv_exprs): New functions.
5450 (c_omp_split_clauses): Adjust for lastprivate being allowed on
5451 distribute.
5452 (c_omp_declare_simd_clauses_to_numbers): Change
5453 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
5454 (c_omp_declare_simd_clauses_to_decls): Similarly change those
5455 from numbers to PARM_DECLs.
5456
595278be
MM
54572015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
5458
5459 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
5460 flag_checking.
5461
3f8257db 54622015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
5463
5464 PR c++-common/67882
b3d5bc62
JJ
5465 * c-common.h (fold_offsetof_1): Add argument.
5466 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
5467 offsetof expressions that reference elements past the end of
5468 an array.
5469
4bf9e5a8
TS
54702015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5471 Chung-Lin Tang <cltang@codesourcery.com>
5472
5473 * c-pragma.c (oacc_pragmas): Add "atomic".
5474 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
5475
3b1661a9
ES
54762015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
5477
5478 * c-common.c (handle_target_clones_attribute): New.
5479 (c_common_attribute_table): Add handle_target_clones_attribute.
5480 (handle_always_inline_attribute): Add check on target_clones attribute.
5481 (handle_target_attribute): Ditto.
5482
2adfab87
AM
54832015-10-29 Andrew MacLeod <amacleod@redhat.com>
5484
5485 * array-notation-common.c: Reorder #include's and remove duplicates.
5486 * c-ada-spec.c: Likewise.
5487 * c-cilkplus.c: Likewise.
5488 * c-common.c: Likewise.
5489 * c-cppbuiltin.c: Likewise.
5490 * c-dump.c: Likewise.
5491 * c-format.c: Likewise.
5492 * c-gimplify.c: Likewise.
5493 * c-indentation.c: Likewise.
5494 * c-lex.c: Likewise.
5495 * c-omp.c: Likewise.
5496 * c-opts.c: Likewise.
5497 * c-pch.c: Likewise.
5498 * c-ppoutput.c: Likewise.
5499 * c-pragma.c: Likewise.
5500 * c-pretty-print.c: Likewise.
5501 * c-semantics.c: Likewise.
5502 * c-ubsan.c: Likewise.
5503 * cilk.c: Likewise.
5504 * stub-objc.c: Likewise.
5505
d90ec4f2
JM
55062015-10-28 Jason Merrill <jason@redhat.com>
5507
5508 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
5509
88bae6f4
TS
55102015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5511 James Norris <jnorris@codesourcery.com>
5512 Cesar Philippidis <cesar@codesourcery.com>
5513
5514 PR c/64765
5515 PR c/64880
5516 * c-common.h (c_oacc_split_loop_clauses): Declare function.
5517 * c-omp.c (c_oacc_split_loop_clauses): New function.
5518
b1726d6c
MS
55192015-10-21 Martin Sebor <msebor@redhat.com>
5520
5521 PR driver/68043
5522 * c.opt: End each sentence that describes an option with a period.
5523
fa60eeb9
MP
55242015-10-20 Marek Polacek <polacek@redhat.com>
5525
5526 * array-notation-common.c (is_cilkplus_vector_p): Define.
5527 * c-common.h (is_cilkplus_vector_p): Declare.
5528
95979049
MP
55292015-10-20 Marek Polacek <polacek@redhat.com>
5530
5531 * c.opt (std=gnu++11): Do not describe as experimental.
5532 (std=gnu++14): Likewise.
5533
2a9fb712
JM
55342015-10-19 Jason Merrill <jason@redhat.com>
5535
5536 * c-cppbuiltin.c (c_cpp_builtins): Define
5537 __cpp_nontype_template_args.
5538
13b380a3
JM
55392015-10-19 Jason Merrill <jason@redhat.com>
5540
5541 * c-cppbuiltin.c (c_cpp_builtins): Define
5542 __cpp_enumerator_attributes, __cpp_fold_expressions,
5543 __cpp_unicode_characters.
5544
d9a6bd32
JJ
55452015-10-13 Jakub Jelinek <jakub@redhat.com>
5546 Aldy Hernandez <aldyh@redhat.com>
5547
5548 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
5549 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
5550 (c_define_builtins): Likewise.
5551 * c-common.h (enum c_omp_clause_split): Add
5552 C_OMP_CLAUSE_SPLIT_TASKLOOP.
5553 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
5554 (c_finish_omp_for): Add ORIG_DECLV argument.
5555 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
5556 201511 instead of 201307.
5557 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
5558 OMP_CRITICAL_CLAUSES to it.
5559 (c_finish_omp_ordered): Add CLAUSES argument, set
5560 OMP_ORDERED_CLAUSES to it.
5561 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
5562 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
5563 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
5564 constructs and new OpenMP 4.5 clauses. Clear
5565 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
5566 verification code.
5567 * c-pragma.c (omp_pragmas_simd): Add taskloop.
5568 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
5569 (enum pragma_omp_clause): Add
5570 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
5571 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
5572
624d31fe
RS
55732015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5574
5575 * c-lex.c (interpret_float): Use real_equal instead of
5576 REAL_VALUES_EQUAL.
5577
b8fd7909
JM
55782015-10-04 Jason Merrill <jason@redhat.com>
5579
5580 Implement N4514, C++ Extensions for Transactional Memory.
5581 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
5582 (c_common_attribute_table): Add transaction_safe_dynamic.
5583 transaction_safe now affects type identity.
5584 (handle_tm_attribute): Handle transaction_safe_dynamic.
5585 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
5586 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
5587 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
5588 (D_TRANSMEM): New.
5589 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
5590 * c-pretty-print.c (pp_c_attributes_display): Don't print
5591 transaction_safe in C++.
5592
12651878
MP
55932015-10-02 Marek Polacek <polacek@redhat.com>
5594
5595 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
5596
3e3b8d63
MP
55972015-10-02 Marek Polacek <polacek@redhat.com>
5598
5599 PR c/64249
5600 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
5601 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
5602 * c.opt (Wduplicated-cond): New option.
5603
0d1a8f75
JM
56042015-10-01 Joseph Myers <joseph@codesourcery.com>
5605
5606 * c.opt (std=c11): Do not describe as experimental.
5607 (std=gnu11): Likewise.
5608 (std=iso9899:2011): Likewise.
5609
3e32ee19
NS
56102015-09-28 Nathan Sidwell <nathan@codesourcery.com>
5611
5612 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
5613 (DEF_FUNCTION_TYPE_VAR_11): Delete.
5614
974348ee
MP
56152015-09-25 Marek Polacek <polacek@redhat.com>
5616
5617 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
5618 (ubsan_instrument_shift): Likewise.
5619
15dbc1a6
MP
56202015-09-25 Marek Polacek <polacek@redhat.com>
5621
5622 PR sanitizer/64906
5623 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
5624
6b95d7cc
PP
56252015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
5626
5627 * c-indentation.c (should_warn_for_misleading_indentation):
5628 Compare next_stmt_vis_column with guard_line_first_nws instead
5629 of with guard_line_vis_column.
5630
c1822f9c
MLI
56312015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
5632
5633 PR c/49654
5634 PR c/49655
5635 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
5636 options and options not valid for the current language.
5637
d5398058
PP
56382015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
5639
5640 * c-indentation.c (should_warn_for_misleading_indentation):
5641 Float out and consolidate the calls to get_visual_column that
5642 are passed guard_exploc as an argument. Compare
5643 next_stmt_vis_column with guard_line_first_nws instead of with
5644 body_line_first_nws.
5645
6b333269
NS
56462015-09-22 Nathan Sidwell <nathan@codesourcery.com>
5647
5648 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
5649 Wnamespaces): New C++ warnings.
5650
a75f1574
JM
56512015-09-22 Jason Merrill <jason@redhat.com>
5652
5653 * c-common.h (abi_compat_version_crosses): New.
5654 (warn_abi_version): Declare.
5655 * c-common.c: Define it.
5656 * c-opts.c (c_common_post_options): Handle it.
5657 flag_abi_compat_version defaults to 8.
5658
bdaaa8b7
VV
56592015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
5660
5661 Complete the implementation of N4230, Nested namespace definition.
5662 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
5663 __cpp_nested_namespace_definitions.
5664
eaa797e8
MLI
56652015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5666
5667 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
5668
c4914de6
MLI
56692015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5670
5671 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
5672 when warning.
5673 * c-pragma.h (pragma_lex): Add optional loc argument.
5674
fcb87c50
MM
56752015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
5676
5677 * c-format.c (check_format_arg): Adjust to use common block size in all
5678 object pools.
5679
31bdd08a
DM
56802015-09-15 David Malcolm <dmalcolm@redhat.com>
5681
5682 * c-format.c (location_from_offset): Update for change in
5683 signature of location_get_source_line.
5684 * c-indentation.c (get_visual_column): Likewise.
5685 (line_contains_hash_if): Likewise.
5686
aa9f4b4c
MP
56872015-09-14 Marek Polacek <polacek@redhat.com>
5688
5689 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
5690 setting various warnings.
5691
aa256c4a
MP
56922015-09-14 Marek Polacek <polacek@redhat.com>
5693
5694 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
5695 a negative value.
5696
0f876f22
MW
56972015-09-11 Mark Wielaard <mjw@redhat.com>
5698
5699 PR c/28901
5700 * c.opt (Wunused-variable): Option from common.opt.
5701 (Wunused-const-variable): New option.
5702
273aa49e
PC
57032015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
5704
5705 PR c++/53184
5706 * c.opt ([Wsubobject-linkage]): Add.
5707
1807ffc1
MS
57082015-09-03 Martin Sebor <msebor@redhat.com>
5709
5710 PR c/66516
5711 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
5712 functions.
5713 * c-common.c (reject_gcc_builtin): Define.
5714
38942840
BI
57152015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
5716
5717 PR middle-end/60586
5718 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
5719 prototype.
5720 * c-gimplify.c (c_gimplify_expr): Added a call to the function
5721 cilk_gimplify_call_params_in_spawned_fn.
5722 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
5723 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
5724 unwrapping.
5725
c316b5e4
MP
57262015-08-25 Marek Polacek <polacek@redhat.com>
5727
5728 PR middle-end/67330
5729 * c-common.c (handle_weak_attribute): Don't check whether the
5730 visibility can be changed here.
5731
584a7c46
MLI
57322015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
5733
5734 * c-lex.c (c_lex_with_flags): Use explicit locations.
5735
a79683d5
TS
57362015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5737
5738 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
5739 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
5740
61717a45
FXC
57412015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
5742
5743 PR middle-end/36757
5744 * c-common.c (check_builtin_function_arguments): Add check
5745 for BUILT_IN_SIGNBIT argument.
5746
329524f5
PC
57472015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
5748
5749 PR c++/67160
5750 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
5751 in c++1z mode.
5752
4ee55665
MP
57532015-08-17 Marek Polacek <polacek@redhat.com>
5754
5755 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
5756 with whitespaces before qualifier names.
5757
b893e375
MP
57582015-08-12 Marek Polacek <polacek@redhat.com>
5759
5760 PR c++/55095
5761 * c-common.c (maybe_warn_shift_overflow): Properly handle
5762 left-shifting 1 into the sign bit.
5763
c2d89095
MLI
57642015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5765
5766 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
5767
971e17ff
AS
57682015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
5769 Braden Obrzut <admin@maniacsvault.net>
5770 Jason Merrill <jason@redhat.com>
5771
5772 Add C++ Concepts TS support.
5773 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
5774 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
5775 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
5776 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
5777 * c-opts.c (set_std_cxx1z): Set flag_concepts.
5778 * c.opt (fconcepts): New.
5779
b3d5bc62
JJ
57802015-08-02 Martin Sebor <msebor@redhat.com>
5781
5782 * c.opt (-Wframe-address): New warning option.
5783
8ebca419
PP
57842015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5785
5786 * c-indentation.c (should_warn_for_misleading_indentation):
5787 Improve heuristics.
5788
1a1e101f
PP
57892015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5790
5791 * c-indentation.c (get_visual_column): Add parameter first_nws,
5792 use it. Update comment documenting the function.
5793 (is_first_nonwhitespace_on_line): Remove.
5794 (should_warn_for_misleading_indentation): Replace usage of
5795 of is_first_nonwhitespace_on_line with get_visual_column.
5796
992118a1
PP
57972015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5798
5799 * c-indentation.h (struct token_indent_info): Define.
5800 (get_token_indent_info): Define.
5801 (warn_for_misleading_information): Declare.
5802 * c-common.h (warn_for_misleading_information): Remove.
5803 * c-identation.c (warn_for_misleading_indentation):
5804 Change declaration to take three token_indent_infos. Adjust
5805 accordingly.
5806 * c-identation.c (should_warn_for_misleading_indentation):
5807 Likewise. Bail out early if the body is a compound statement.
5808 (guard_tinfo_to_string): Define.
5809
e8fa3817
JM
58102015-07-30 Jason Merrill <jason@redhat.com>
5811
5812 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
5813 '*' for reference decay.
5814
173864e8
MP
58152015-07-30 Marek Polacek <polacek@redhat.com>
5816
5817 * c-common.c (warn_tautological_cmp): Bail for float types.
5818
f2afe6dd
MP
58192015-07-27 Marek Polacek <polacek@redhat.com>
5820
5821 PR bootstrap/67030
5822 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
5823
05b28fd6
MP
58242015-07-27 Marek Polacek <polacek@redhat.com>
5825
5826 PR c++/66555
5827 PR c/54979
5828 * c-common.c (find_array_ref_with_const_idx_r): New function.
5829 (warn_tautological_cmp): New function.
5830 * c-common.h (warn_tautological_cmp): Declare.
5831 * c.opt (Wtautological-compare): New option.
5832
5a5062b8
MP
58332015-07-23 Marek Polacek <polacek@redhat.com>
5834
5835 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
5836 (ubsan_instrument_shift): Likewise.
5837
dc891fe7
MP
58382015-07-23 Marek Polacek <polacek@redhat.com>
5839
5840 PR sanitizer/66908
5841 * c-ubsan.c: Include gimplify.h.
5842 (ubsan_instrument_division): Unshare OP0 and OP1.
5843 (ubsan_instrument_shift): Likewise.
5844
451b5e48
MP
58452015-07-20 Marek Polacek <polacek@redhat.com>
5846 Richard Sandiford <richard.sandiford@arm.com>
5847
5848 PR c++/55095
5849 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
5850 Use EXPR_LOC_OR_LOC.
5851 (maybe_warn_shift_overflow): New function.
5852 * c-common.h (maybe_warn_shift_overflow): Declare.
5853 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
5854 * c.opt (Wshift-overflow): New option.
5855
fb0b2914
ML
58562015-07-16 Martin Liska <mliska@suse.cz>
5857
5858 * c-format.c (static void check_format_info_main): Use
5859 object_allocator instead of pool_allocator.
5860 (check_format_arg): Likewise.
5861 (check_format_info_main): Likewise.
5862
903f5c23
AM
58632015-07-15 Andrew MacLeod <amacleod@redhat.com>
5864
5865 * c-opts.c: Remove multiline #include comment.
5866
026c3cfd
AH
58672015-07-12 Aldy Hernandez <aldyh@redhat.com>
5868
5869 * c-common.c: Fix double word typos.
5870
bb49ee66
EB
58712015-07-10 Eric Botcazou <ebotcazou@adacore.com>
5872
5873 * c-ada-spec.h (cpp_operation): Revert latest change.
5874 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
5875 constructors and destructors.
5876
1916bcb5
AM
58772015-07-09 Andrew MacLeod <amacleod@redhat.com>
5878
5879 * c-common.h: Adjust includes for flags.h changes.
5880 * stub-objc.c: Likewise.
026c3cfd 5881
a9dcd529
EB
58822015-07-08 Eric Botcazou <ebotcazou@adacore.com>
5883
5884 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
5885 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
5886
b03b462f
JJ
58872015-07-08 Jakub Jelinek <jakub@redhat.com>
5888
5889 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
5890 are to be removed, return NULL rather than original clauses list.
5891
c7131fb2
AM
58922015-07-07 Andrew MacLeod <amacleod@redhat.com>
5893
5894 * array-notation-common.c: Adjust includes.
5895 * c-ada-spec.c: Likewise.
5896 * c-cilkplus.c: Likewise.
5897 * c-common.h: Likewise.
5898 * c-cppbuiltin.c: Likewise.
5899 * c-dump.c: Likewise.
5900 * c-format.c: Likewise.
5901 * c-gimplify.c: Likewise.
5902 * c-indentation.c: Likewise.
5903 * c-lex.c: Likewise.
5904 * c-omp.c: Likewise.
5905 * c-opts.c: Likewise.
5906 * c-pch.c: Likewise.
5907 * c-ppoutput.c: Likewise.
5908 * c-pragma.c: Likewise.
5909 * c-pretty-print.c: Likewise.
5910 * c-semantics.c: Likewise.
5911 * c-ubsan.c: Likewise.
5912 * cilk.c: Likewise.
5913 * stub-objc.c: Likewise.
5914
2a7fb83f
EB
59152015-07-07 Eric Botcazou <ebotcazou@adacore.com>
5916
5917 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
5918 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
5919
a03c9bf1
JM
59202015-07-01 Jason Merrill <jason@redhat.com>
5921
36a85135
JM
5922 * c-common.h (D_CXX11): Rename from D_CXX0X.
5923 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
5924 * c-common.c: Adjust.
5925
e7fa68d5
JM
5926 * c-opts.c (c_common_post_options): Default to C++14.
5927
a03c9bf1
JM
5928 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
5929
fe95b036
ESR
59302015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
5931
5932 Implement N4197 - Adding u8 character literals
b3d5bc62 5933 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 5934 CPP_CHAR.
b3d5bc62 5935 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 5936 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 5937 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
5938 and CPP_UTF8CHAR tokens.
5939 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 5940
da2e71c9
MLI
59412015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5942
5943 PR fortran/66605
5944 * c-common.c (do_warn_unused_parameter): Move here.
5945 * c-common.h (do_warn_unused_parameter): Declare.
5946
b155cfd9
MP
59472015-06-29 Marek Polacek <polacek@redhat.com>
5948
5949 PR c/66322
5950 * c-common.c (check_case_bounds): Add bool * parameter. Set
5951 OUTSIDE_RANGE_P.
5952 (c_add_case_label): Add bool * parameter. Pass it down to
5953 check_case_bounds.
5954 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
5955 warning here.
5956 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
5957 declarations.
5958
31521951
MP
59592015-06-27 Marek Polacek <polacek@redhat.com>
5960
5961 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
5962 or VECTOR_INTEGER_TYPE_P throughout.
5963 * c-gimplify.c: Likewise.
5964
22d03525
MP
59652015-06-26 Marek Polacek <polacek@redhat.com>
5966
5967 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
5968 * c-common.c (c_fully_fold_internal): Likewise.
5969 (c_alignof_expr): Likewise.
5970 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
5971 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 5972 * cilk.c (create_parm_list): Likewise.
22d03525 5973
af05e6e5
MP
59742015-06-26 Marek Polacek <polacek@redhat.com>
5975
5976 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
5977
f0889939
AM
59782015-06-25 Andrew MacLeod <amacleod@redhat.com>
5979
5980 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
5981 * c-gimplify.c: Likewise.
5982 * c-pragma.c: Likewise.
5983 * c-ubsan.c: Likewise.
5984 * cilk.c: Likewise.
5985
ca752f39
RS
59862015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5987
5988 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
5989 ggc_hasher.
5990
16a16ec7
AM
59912015-06-25 Andrew MacLeod <amacleod@redhat.com>
5992
5993 * cilk.c: Move calls.h after tm.h in the include chain.
5994
0ae9bd27
MP
59952015-06-25 Marek Polacek <polacek@redhat.com>
5996
5997 * array-notation-common.c: Use VAR_P throughout.
5998 * c-ada-spec.c: Likewise.
5999 * c-common.c: Likewise.
6000 * c-format.c: Likewise.
6001 * c-gimplify.c: Likewise.
6002 * c-omp.c: Likewise.
6003 * c-pragma.c: Likewise.
6004 * c-pretty-print.c: Likewise.
6005 * cilk.c: Likewise.
6006
62f9079a
MP
60072015-06-25 Marek Polacek <polacek@redhat.com>
6008
6009 * cilk.c (extract_free_variables): Use is_global_var.
6010
0fa16060
RS
60112015-06-23 Richard Sandiford <richard.sandiford@arm.com>
6012
6013 * c-common.c: Don't include target-def.h.
6014
a68ae2e1
MP
60152015-06-23 Marek Polacek <polacek@redhat.com>
6016
6017 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
6018 when comparing INTEGER_CSTs.
6019
c6a2f2d9
PMR
60202015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
6021
6022 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
6023 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
6024 (dump_ada_template): Skip partially specialized types.
6025
6b4db501
MM
60262015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
6027
6028 * c-common.c (scalar_to_vector): Use std::swap instead of manually
6029 swapping.
6030
abb226c9
AM
60312015-06-17 Andrew MacLeod <amacleod@redhat.com>
6032
6033 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
6034 * c-ada-spec.c: Likewise.
6035 * c-cilkplus.c: Likewise.
6036 * c-common.c: Likewise.
6037 * c-common.h: Likewise.
6038 * c-cppbuiltin.c: Likewise.
6039 * c-dump.c: Likewise.
6040 * c-format.c: Likewise.
6041 * c-gimplify.c: Likewise.
6042 * c-indentation.c: Likewise.
6043 * c-lex.c: Likewise.
6044 * c-omp.c: Likewise.
6045 * c-opts.c: Likewise.
6046 * c-pch.c: Likewise.
6047 * c-ppoutput.c: Likewise.
6048 * c-pragma.c: Likewise.
6049 * c-pretty-print.c: Likewise.
6050 * c-semantics.c: Likewise.
6051 * c-ubsan.c: Likewise.
6052 * cilk.c: Likewise.
6053 * stub-objc.c: Likewise.
6054
076fecad
PP
60552015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
6056
6057 PR c++/65168
6058 * c-common.c (c_common_truthvalue_conversion): Warn when
6059 converting an address of a reference to a truth value.
6060
13fdf2e2
AM
60612015-06-08 Andrew MacLeod <amacleod@redhat.com>
6062
6063 * array-notation-common.c : Adjust include files.
6064 * c-ada-spec.c : Likewise.
6065 * c-cilkplus.c : Likewise.
6066 * c-common.c : Likewise.
6067 * c-common.h : Likewise.
6068 * c-cppbuiltin.c : Likewise.
6069 * c-dump.c : Likewise.
6070 * c-format.c : Likewise.
6071 * c-gimplify.c : Likewise.
6072 * c-indentation.c : Likewise.
6073 * c-lex.c : Likewise.
6074 * c-omp.c : Likewise.
6075 * c-opts.c : Likewise.
6076 * c-pch.c : Likewise.
6077 * c-ppoutput.c : Likewise.
6078 * c-pragma.c : Likewise.
6079 * c-pretty-print.c : Likewise.
6080 * c-semantics.c : Likewise.
6081 * c-ubsan.c : Likewise.
6082 * cilk.c : Likewise.
6083 * stub-objc.c : Likewise.
6084
a1661b90
MP
60852015-06-08 Marek Polacek <polacek@redhat.com>
6086
6087 PR c/66415
6088 * c-format.c (location_from_offset): Return LOC if LINE is null.
6089
d7438551
AH
60902015-06-05 Aldy Hernandez <aldyh@redhat.com>
6091
6092 * c-common.h (c_parse_final_cleanups): New prototype.
6093 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
6094
b3d5bc62
JJ
60952015-06-04 Sriraman Tallam <tmsriram@google.com>
6096
6097 * c-common.c (noplt): New attribute.
6098 (handle_noplt_attribute): New handler.
6099
ecb9f223
AM
61002015-06-04 Andrew MacLeod <amacleod@redhat.com>
6101
6102 * array-notation-common.c: Adjust includes for restructured coretypes.h.
6103 * c-ada-spec.c: Likewise.
6104 * c-cilkplus.c: Likewise.
6105 * c-common.c: Likewise.
6106 * c-common.h: Likewise.
6107 * c-cppbuiltin.c: Likewise.
6108 * c-dump.c: Likewise.
6109 * c-format.c: Likewise.
6110 * c-gimplify.c: Likewise.
6111 * c-indentation.c: Likewise.
6112 * c-lex.c: Likewise.
6113 * c-omp.c: Likewise.
6114 * c-opts.c: Likewise.
6115 * c-pch.c: Likewise.
6116 * c-ppoutput.c: Likewise.
6117 * c-pragma.c: Likewise.
6118 * c-pretty-print.c: Likewise.
6119 * c-semantics.c: Likewise.
6120 * c-ubsan.c: Likewise.
6121 * cilk.c: Likewise.
6122 * stub-objc.c: Likewise.
6123
6ac48155
DM
61242015-06-02 David Malcolm <dmalcolm@redhat.com>
6125
6126 PR c/66220:
6127 * c-indentation.c (should_warn_for_misleading_indentation): Use
6128 expand_location rather than expand_location_to_spelling_point.
6129 Don't warn if the guarding statement is more indented than the
6130 next/body stmts.
6131
773ce42e
DM
61322015-06-02 David Malcolm <dmalcolm@redhat.com>
6133
6134 * c-indentation.c (warn_for_misleading_indentation): Bail out
6135 immediately if -Wmisleading-indentation isn't enabled.
6136
4fef8379
ML
61372015-06-01 Martin Liska <mliska@suse.cz>
6138
6139 * c-format.c (check_format_arg):Use new type-based pool allocator.
6140 (check_format_info_main) Likewise.
6141
1edfb384
EB
61422015-05-31 Eric Botcazou <ebotcazou@adacore.com>
6143
6144 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
6145 (has_nontrivial_methods): Likewise.
6146
9677ef52
MP
61472015-05-25 Marek Polacek <polacek@redhat.com>
6148
6149 * c-ubsan.c (ubsan_instrument_shift): Use type0.
6150
fd5c817a
MP
61512015-05-22 Marek Polacek <polacek@redhat.com>
6152
6153 PR c/47043
6154 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
6155
a2f45fe6 61562015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
6157
6158 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
6159 STACK_GROWS_DOWNWARD.
6160
a2f45fe6 61612015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
6162
6163 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
6164 STACK_GROWS_DOWNWARD rather than if it is defined.
6165
0fee2ac2 61662015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 6167
0fee2ac2
MLI
6168 PR c/52952
6169 * c-format.c (location_column_from_byte_offset): New.
6170 (location_from_offset): New.
6171 (struct format_wanted_type): Add offset_loc field.
6172 (check_format_info): Move handling of location for extra arguments
6173 closer to the point of warning.
6174 (check_format_info_main): Pass the result of location_from_offset
6175 to warning_at.
6176 (format_type_warning): Pass the result of location_from_offset
6177 to warning_at.
6178
cf4ef6f7
MP
61792015-05-20 Marek Polacek <polacek@redhat.com>
6180
6181 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
6182
3a65ee74
MP
61832015-05-20 Marek Polacek <polacek@redhat.com>
6184
6185 * c-ada-spec.c (dump_sloc): Use DECL_P.
6186
21b634ae
MP
61872015-05-20 Marek Polacek <polacek@redhat.com>
6188
6189 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
6190 * c-common.c: Likewise.
6191
0e50b624
DM
61922015-05-19 David Malcolm <dmalcolm@redhat.com>
6193
6194 * c-common.h (fe_file_change): Strengthen param from
6195 const line_map * to const line_map_ordinary *.
6196 (pp_file_change): Likewise.
6197 * c-lex.c (fe_file_change): Likewise.
6198 (cb_define): Use linemap_check_ordinary when invoking
6199 SOURCE_LINE.
6200 (cb_undef): Likewise.
6201 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
6202 invoking cb_file_change.
6203 (c_finish_options): Likewise.
6204 (push_command_line_include): Likewise.
6205 (cb_file_change): Strengthen param "new_map" from
6206 const line_map * to const line_map_ordinary *.
6207 * c-ppoutput.c (cb_define): Likewise for local "map".
6208 (pp_file_change): Likewise for param "map" and local "from".
6209
fab27f52
MM
62102015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
6211
6212 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
6213
2fe1d762
TV
62142015-05-18 Tom de Vries <tom@codesourcery.com>
6215
6216 * c-common.c (build_va_arg_1): New function.
6217 (build_va_arg): Add address operator to va_list operand if necessary.
6218
7a37fa90
MM
62192015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
6220
6221 PR c/48956
6222 * c-common.c (int_safely_convertible_to_real_p): Define.
6223 (unsafe_conversion_p): Check conversions involving complex types.
6224 (conversion_warning): Add new warning message for conversions which
6225 discard imaginary component.
6226 * c-common.h: (enum conversion_safety): Add new enumerator for such
6227 conversions.
6228
3aa3c9fc
MP
62292015-05-14 Marek Polacek <polacek@redhat.com>
6230
6231 PR c/66066
6232 PR c/66127
6233 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
6234 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
6235 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
6236 use it. If FOR_INT_CONST, require that all evaluated operands be
6237 INTEGER_CSTs.
6238
c3388e62
DM
62392015-05-12 David Malcolm <dmalcolm@redhat.com>
6240
6241 * c-common.h (warn_for_misleading_indentation): New prototype.
6242 * c-indentation.c: New file.
6243 * c.opt (Wmisleading-indentation): New option.
6244
c7b38fd5
TV
62452015-05-12 Tom de Vries <tom@codesourcery.com>
6246
6247 PR tree-optimization/66010
6248 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
6249
381bf11e
JM
62502015-05-09 Jason Merrill <jason@redhat.com>
6251
edff0c06
JM
6252 * c-opts.c (c_common_post_options): Also clear
6253 cpp_opts->cpp_warn_cxx11_compat.
6254
129211bc
JM
6255 * c-common.h (enum cxx_dialect): Add cxx_unset.
6256 * c-common.c (cxx_dialect): Initialize to cxx_unset.
6257 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
6258
381bf11e
JM
6259 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
6260 (std=gnu++0x): Mark as Undocumented.
6261 (std=gnu++1y): Add deprecated message.
6262
fe191308
JM
62632015-05-08 Jason Merrill <jason@redhat.com>
6264
765189ff
JM
6265 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
6266 * c-opts.c: Adjust.
6267
fe191308
JM
6268 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
6269
755e528f
MP
62702015-05-08 Marek Polacek <polacek@redhat.com>
6271
6272 PR c/64918
6273 * c.opt (Woverride-init-side-effects): New option.
6274
0173bd2a
MP
62752015-05-07 Marek Polacek <polacek@redhat.com>
6276
6277 PR c/65179
6278 * c-common.c (c_fully_fold_internal): Warn when left shifting a
6279 negative value.
6280 * c.opt (Wshift-negative-value): New option.
6281 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
6282 when -Wextra and C99/C++11 mode.
6283
e0f0d3b9
MP
62842015-05-07 Marek Polacek <polacek@redhat.com>
6285 Martin Uecker <uecker@eecs.berkeley.edu>
6286
6287 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
6288 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
6289
8243e2a9
JM
62902015-05-05 Jason Merrill <jason@redhat.com>
6291
6292 * c.opt (Wterminate): New.
6293
577cd070
MP
62942015-04-30 Marek Polacek <polacek@redhat.com>
6295
6296 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
6297 require that the non-constant be of a boolean type.
6298
0373796b
JT
62992015-04-29 Josh Triplett <josh@joshtriplett.org>
6300
e0f0d3b9
MP
6301 * c-common.c (handle_section_attribute): Refactor to reduce
6302 nesting and distinguish between error cases.
0373796b 6303
716c0ba6
MP
63042015-04-29 Marek Polacek <polacek@redhat.com>
6305
6306 PR c/64610
6307 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
6308 with 0/1.
6309
8848828b
JJ
63102015-04-29 Jakub Jelinek <jakub@redhat.com>
6311
6312 * c-common.h (omp_clause_mask): Unconditionally define as a class.
6313 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
6314 HOST_BITS_PER_WIDE_INT.
6315
ecd0e562
TV
63162015-04-28 Tom de Vries <tom@codesourcery.com>
6317
6318 PR tree-optimization/65887
6319 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
6320
2a877204 63212015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 6322 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
6323
6324 * c-ada-spec.c (in_function): Delete.
6325 (dump_generic_ada_node): Do not change in_function and remove the
6326 redundant code dealing with it.
6327 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
6328 (print_ada_methods): Output the static member functions in a nested
6329 package after the regular methods as well as associated renamings.
6330
4853031e
MP
63312015-04-24 Marek Polacek <polacek@redhat.com>
6332
6333 PR c/65830
6334 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
6335 and OPT_Wshift_count_overflow.
6336
8c2b7f79
MP
6337 PR c/63357
6338 * c-common.c (warn_logical_operator): Warn if the operands have the
6339 same expressions.
6340
b8787813
MP
63412015-04-24 Marek Polacek <polacek@redhat.com>
6342
6343 PR c/61534
6344 * c-common.c (warn_logical_operator): Bail if either operand comes
6345 from a macro expansion.
6346
8fba1830
BRF
63472015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
6348
6349 PR target/55143
6350 * c-common.c (c_default_pointer_mode): Add definition.
6351 * c-common.h (c_default_pointer_mode): Add declaration.
6352
17958621
JJ
63532015-03-11 Jakub Jelinek <jakub@redhat.com>
6354
6355 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
6356 on record_builtin_type argument.
6357
7ccb1a11
JJ
63582015-03-10 Jakub Jelinek <jakub@redhat.com>
6359
6360 PR c/65120
6361 * c-common.c (warn_logical_not_parentheses): Don't warn for
6362 !x == 0 or !x != 0.
6363
04fd785e
MP
63642015-03-07 Marek Polacek <polacek@redhat.com>
6365
6366 PR sanitizer/65280
6367 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
6368 before trying to figure out whether we have a flexible array member.
6369
a4e26206 63702015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 6371 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
6372
6373 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
6374
0d2489f4
EB
63752015-03-05 Eric Botcazou <ebotcazou@adacore.com>
6376
6377 PR ada/65319
6378 * c-ada-spec.c (print_destructor): Remove obsolete code.
6379
83ed54d7
EB
63802015-03-01 Eric Botcazou <ebotcazou@adacore.com>
6381
6382 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
6383 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
6384 DECL_TEMPLATE_RESULT emulations.
6385 (dump_ada_template)): Add guard for TYPE_METHODS.
6386
7631f0e2
MP
63872015-02-27 Marek Polacek <polacek@redhat.com>
6388
6389 PR c/65040
6390 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
6391
d1783ae5
KT
63922015-02-27 Kai Tietz <ktietz@redhat.com>
6393
6394 PR c/35330
6395 * c-pragma.c (handle_pragma_weak): Do not try to create
6396 weak/alias of declarations not being function, or variable
6397 declarations.
6398
56a9f6bc
TS
63992015-02-24 Thomas Schwinge <thomas@codesourcery.com>
6400
6401 PR libgomp/64625
6402 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
6403 Remove macros.
6404 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
6405
3d5cb23d
MP
64062015-02-16 Marek Polacek <polacek@redhat.com>
6407
6408 PR c/65066
6409 * c-format.c (check_format_types): Handle null param.
6410
fa008882
MP
64112015-02-13 Marek Polacek <polacek@redhat.com>
6412
6413 PR c/65040
6414 * c-format.c (check_format_types): Don't warn about different
6415 signedness if the original value is in the range of WANTED_TYPE.
6416
785f21af
JM
64172015-02-12 Jason Merrill <jason@redhat.com>
6418
6419 PR c++/64956
6420 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
6421 to the current highest version.
6422 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
6423
4886ec8e
JJ
64242015-02-04 Jakub Jelinek <jakub@redhat.com>
6425
6426 PR c/64824
6427 PR c/64868
6428 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
6429 instead of RDIV_EXPR. Use build_binary_op instead of
6430 build2_loc.
6431
40fecdd6
JM
64322015-01-30 Joseph Myers <joseph@codesourcery.com>
6433
6434 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
6435 to pass input_location as first argument.
6436
a0c88d06
TV
64372015-01-23 Tom de Vries <tom@codesourcery.com>
6438
6439 PR libgomp/64672
6440 * c.opt (fopenacc): Mark as LTO option.
6441
1506ae0e
TV
64422015-01-23 Tom de Vries <tom@codesourcery.com>
6443
6444 PR libgomp/64707
6445 * c.opt (fopenmp): Mark as LTO option.
6446
31be63ab
JJ
64472015-01-21 Jakub Jelinek <jakub@redhat.com>
6448
6449 PR c/63307
b1726d6c 6450 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
6451 (compare_decls): Fix up formatting.
6452
64532015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
6454
6455 PR c/63307
6456 * cilk.c: Include vec.h.
6457 (struct cilk_decls): New structure.
6458 (wrapper_parm_cb): Split this function to...
6459 (fill_decls_vec): ...this...
6460 (create_parm_list): ...and this.
6461 (compare_decls): New function.
6462 (for_local_cb): Remove.
6463 (wrapper_local_cb): Ditto.
6464 (build_wrapper_type): For now first traverse and fill vector of
6465 declarations then sort it and then deal with sorted vector.
6466 (cilk_outline): Ditto.
6467 (declare_one_free_variable): Ditto.
6468
6875457f
JM
64692015-01-21 Jason Merrill <jason@redhat.com>
6470
6471 PR c++/64629
6472 * c-format.c (check_format_arg): Call decl_constant_value.
6473
185c9e56
ML
64742015-01-19 Martin Liska <mliska@suse.cz>
6475
6476 * c-common.c (handle_noicf_attribute): New function.
6477
41dbbb37
TS
64782015-01-15 Thomas Schwinge <thomas@codesourcery.com>
6479 Bernd Schmidt <bernds@codesourcery.com>
6480 James Norris <jnorris@codesourcery.com>
6481 Cesar Philippidis <cesar@codesourcery.com>
6482 Ilmir Usmanov <i.usmanov@samsung.com>
6483 Jakub Jelinek <jakub@redhat.com>
6484
6485 * c.opt (fopenacc): New option.
6486 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
6487 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
6488 New macros.
6489 * c-common.h (c_finish_oacc_wait): New prototype.
6490 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
6491 (c_finish_oacc_wait): New function.
6492 * c-pragma.c (oacc_pragmas): New variable.
6493 (c_pp_lookup_pragma, init_pragma): Handle it.
6494 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
6495 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
6496 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
6497 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
6498 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
6499 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
6500 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
6501 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
6502 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
6503 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
6504 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
6505 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
6506 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
6507 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
6508 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
6509 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
6510 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
6511 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
6512 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
6513 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
6514 PRAGMA_OACC_CLAUSE_WORKER.
6515
3f8257db 65162015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
6517
6518 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
6519 for the new option fstack-protector_explicit.
6520 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
6521 (handle_stack_protect_attribute): New function.
6522
3f8257db 65232015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
6524
6525 * c.opt: New option -Warray-bounds=.
6526
adfac8df
JJ
65272015-01-09 Michael Collison <michael.collison@linaro.org>
6528
6529 * array-notation-common.c: Include hash-set.h, machmode.h,
6530 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6531 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
6532 * c-ada-spec.c: Ditto.
6533 * c-cilkplus.c: Ditto.
6534 * c-common.c: Include input.h due to flattening of tree.h.
6535 Define macro GCC_C_COMMON_C.
6536 * c-common.h: Flatten tree.h header files into c-common.h.
6537 Remove include of tree-core.h.
6538 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
6539 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6540 fold-const.h, wide-int.h, and inchash.h due to
6541 flattening of tree.h.
6542 * c-dump.c: Ditto.
6543 * c-format.c: Flatten tree.h header files into c-common.h.
6544 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
6545 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6546 fold-const.h, wide-int.h, and inchash.h due to
6547 flattening of tree.h.
6548 * c-dump.c: Include hash-set.h, machmode.h,
6549 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6550 fold-const.h, wide-int.h, and inchash.h due to
6551 flattening of tree.h.
6552 * c-format.c: Include hash-set.h, machmode.h,
6553 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6554 fold-const.h, wide-int.h, inchash.h and real.h due to
6555 flattening of tree.h.
6556 * c-gimplify.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
6559 flattening of tree.h.
6560 * cilk.c: Ditto.
6561 * c-lex.c: Ditto.
6562 * c-omp.c: Ditto.
6563 * c-opts.c: Ditto.
6564 * c-pch.c: Ditto.
6565 * c-ppoutput.c: Ditto.
6566 * c-pragma.c: Ditto.
6567 * c-pretty-print.c: Ditto.
6568 * c-semantics.c: Ditto.
6569 * c-ubsan.c: Ditto.
6570 * stub-objc.c: Ditto.
6571
f5481fc4
JM
65722015-01-08 Jason Merrill <jason@redhat.com>
6573
6574 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
6575 do_ubsan_in_current_function.
6576 (ubsan_maybe_instrument_reference_or_call): Likewise.
6577 * c-ubsan.h: Declare it.
6578
de35aa66
MS
65792015-01-08 Mike Stump <mikestump@comcast.net>
6580
6581 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
6582
4a9a42ab
MP
65832015-01-07 Marek Polacek <polacek@redhat.com>
6584
6585 PR c/64440
6586 * c-common.c (c_fully_fold_internal): Warn for division and modulo
6587 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
6588
2f42e5de
TS
65892015-01-05 Trevor Saunders <tsaunders@mozilla.com>
6590
6591 PR c++/31397
6592 * c.opt (Wsuggest-override): New option.
6593
5624e564
JJ
65942015-01-05 Jakub Jelinek <jakub@redhat.com>
6595
6596 Update copyright years.
6597
5bd012f8
MP
65982015-01-05 Marek Polacek <polacek@redhat.com>
6599
6600 PR c/64423
6601 * c-common.c (warn_array_subscript_with_type_char): Add location_t
6602 parameter. Use it.
6603 * c-common.h (warn_array_subscript_with_type_char): Update
6604 declaration.
6605
a7fa8d18
ESR
66062014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
6607
6608 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
6609 Control macro with flag_sized_deallocation.
6610
3f8257db 66112014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
6612
6613 * c.opt (Wdiscarded-array-qualifiers): New option.
6614
1f8d3e84
JJ
66152014-12-19 Jakub Jelinek <jakub@redhat.com>
6616
6617 PR preprocessor/63831
6618 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
6619 and __has_cpp_attribute here.
6620 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
6621 c_common_has_attribute.
6622 * c-common.h (c_common_has_attribute): New prototype.
6623 * c-lex.c (init_c_lex): Set cb->has_attribute to
6624 c_common_has_attribute instead of cb_has_attribute.
6625 (get_token_no_padding): New function.
6626 (cb_has_attribute): Renamed to ...
6627 (c_common_has_attribute): ... this. No longer static. Use
6628 get_token_no_padding, require ()s, don't build TREE_LIST
6629 unnecessarily, fix up formatting, adjust diagnostics, call
6630 init_attributes.
6631
20b06add
JM
66322014-12-15 Jason Merrill <jason@redhat.com>
6633
6634 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
6635 (-Wsized-deallocation): New.
6636 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
6637 to on in C++14 and up.
6638
94a073b2
JM
66392014-12-11 Jason Merrill <jason@redhat.com>
6640
acaa5911
JM
6641 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
6642
94a073b2
JM
6643 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
6644 we aren't complaining about VLAs.
6645
7fb66c15
MP
66462014-12-06 Marek Polacek <polacek@redhat.com>
6647
6648 PR tree-optimization/64183
6649 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
6650 shift-expression if it is integer_type_node. Use types_compatible_p.
6651
b731b390
JJ
66522014-11-29 Jakub Jelinek <jakub@redhat.com>
6653
6654 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
6655 last argument from create_tmp_var_raw and create_tmp_var calls.
6656 * cilk.c (gimplify_cilk_spawn): Likewise.
6657 * c-omp.c (c_finish_omp_atomic): Likewise.
6658
6a4da643
MP
66592014-11-28 Marek Polacek <polacek@redhat.com>
6660
6661 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
6662 instead of unsigned_type_node.
6663
541e35a6
MP
66642014-11-28 Marek Polacek <polacek@redhat.com>
6665
6666 PR c/63862
6667 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
6668 to op1_utype.
6669 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
6670 expression to unsigned_type_node.
6671
dcc97066
MW
66722014-11-20 Mark Wielaard <mjw@redhat.com>
6673
6674 PR debug/38757
6675 * c-opts.c (set_std_c89): Set lang_hooks.name.
6676 (set_std_c99): Likewise.
6677 (set_std_c11): Likewise.
6678 (set_std_cxx98): Likewise.
6679 (set_std_cxx11): Likewise.
6680 (set_std_cxx14): Likewise.
6681 (set_std_cxx1z): Likewise.
6682
aa7da51a
JJ
66832014-11-21 Jakub Jelinek <jakub@redhat.com>
6684
6685 PR target/63764
6686 * c-common.h (convert_vector_to_pointer_for_subscript): Change
6687 return type to bool.
009a3480 6688 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
6689 (convert_vector_to_pointer_for_subscript): Change return type to
6690 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
6691 and copy it into a TARGET_EXPR and use that instead of *vecp
6692 directly.
6693
538dd0b7
DM
66942014-11-19 David Malcolm <dmalcolm@redhat.com>
6695
6696 Merger of git branch "gimple-classes-v2-option-3".
6697 * ChangeLog.gimple-classes: New.
6698 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
6699 from being just a vec<gimple> to a vec<gbind *>.
6700
c39a5e99
JJ
67012014-11-18 Jakub Jelinek <jakub@redhat.com>
6702
6703 PR sanitizer/63813
6704 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
6705 argument to ptype, set type to TREE_TYPE (ptype). Don't call
6706 get_pointer_alignment for non-pointers. Use ptype, or if it is
6707 reference type, corresponding pointer type, as type of kind
6708 argument.
6709 (ubsan_maybe_instrument_reference,
6710 ubsan_maybe_instrument_member_call): Adjust callers.
6711
8537a4a9
MP
67122014-11-15 Marek Polacek <polacek@redhat.com>
6713
6714 PR middle-end/63884
6715 * array-notation-common.c (is_sec_implicit_index_fn): Return false
6716 for NULL fndecl.
6717 (extract_array_notation_exprs): Return for NULL node.
6718
2079956a
JM
67192014-11-12 Joseph Myers <joseph@codesourcery.com>
6720
6721 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
6722 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
6723
1304953e
JJ
67242014-11-12 Jakub Jelinek <jakub@redhat.com>
6725
6726 PR c/59708
6727 * c-common.c (check_builtin_function_arguments): Handle
6728 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
6729
e5e44252
AK
67302014-11-10 Andi Kleen <ak@linux.intel.com>
6731
6732 PR c/60804
6733 * c-common.h (check_no_cilk): Declare.
6734 * cilk.c (get_error_location): New function.
6735 (check_no_cilk): Dito.
6736
e64b984d
AK
67372014-11-10 Andi Kleen <ak@linux.intel.com>
6738
6739 * cilk.c (recognize_spawn): Use expression location
6740 for error message.
6741
13c21655
PC
67422014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
6743
6744 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
6745
42fd12b1
ESR
67462014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
6747
6748 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
6749 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
6750 (__cpp_range_based_for, __cpp_initializer_lists,
6751 __cpp_delegating_constructors, __cpp_nsdmi,
6752 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
6753 for C++11; (__cpp_attribute_deprecated): Remove in favor of
6754 __has_cpp_attribute.
6755 * c-lex.c (cb_has_attribute): New callback CPP function;
6756 (init_c_lex): Set has_attribute callback.
6757
6f450181
RB
67582014-11-04 Richard Biener <rguenther@suse.de>
6759
6760 * c-common.c (shorten_compare): Do not shorten mixed
6761 DFP and non-DFP compares.
6762
26f0e1d6
ESR
67632014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
6764
6765 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
6766 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
6767 Commentary and rearrangement of tests.
6768 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
6769 Commentary and rearrangement of tests.
ab20d992 6770 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
26f0e1d6
ESR
6771 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
6772
ef4bddc2
RS
67732014-10-29 Richard Sandiford <richard.sandiford@arm.com>
6774
6775 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
6776 enum from machine_mode.
6777
c582198b
AM
67782014-10-28 Andrew MacLeod <amacleod@redhat.com>
6779
adfac8df
JJ
6780 * c-common.c: Adjust include files.
6781 * c-gimplify.c: Ditto.
6782 * cilk.c: Ditto.
6783 * c-pragma.c: Ditto.
6784 * c-ubsan.c: Ditto.
c582198b 6785
60393bbc
AM
67862014-10-27 Andrew MacLeod <amacleod@redhat.com>
6787
6788 * c-gimplify.c: Adjust include files.
6789
d723bb7c
MLI
67902014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
6791
6792 PR c++/53061
6793 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
6794 c_common_initialize_diagnostics.
6795 * c-common.h: Likewise.
6796
90f3520e
MP
67972014-10-24 Marek Polacek <polacek@redhat.com>
6798
6799 PR c/56980
6800 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
6801 print "struct"/"union"/"enum" for typedefed names.
6802
59d7607a
MP
68032014-10-23 Marek Polacek <polacek@redhat.com>
6804
6805 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
6806 in unsigned type.
6807
d95a2703
JJ
68082014-10-22 Jakub Jelinek <jakub@redhat.com>
6809 Yury Gribov <y.gribov@samsung.com>
6810
6811 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6812 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
6813 instead of flag_sanitize_recover as bool flag.
6814
8e6ef852
KY
68152014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
6816
6817 * cilk.c: Revert previous change.
6818
948cf550
IZ
68192014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
6820
6821 PR c/63307
6822 * cilk.c: Include vec.h.
6823 (struct cilk_decls): New structure.
6824 (wrapper_parm_cb): Split this function to...
6825 (fill_decls_vec): ...this...
6826 (create_parm_list): ...and this.
6827 (compare_decls): New function.
6828 (for_local_cb): Remove.
6829 (wrapper_local_cb): Ditto.
6830 (build_wrapper_type): For now first traverse and fill vector of
6831 declarations then sort it and then deal with sorted vector.
6832 (cilk_outline): Ditto.
6833 (declare_one_free_variable): Ditto.
6834
92574c7c
MP
68352014-10-17 Marek Polacek <polacek@redhat.com>
6836
6837 * c-opts.c (c_common_post_options): Set warn_implicit_int.
6838 * c.opt (Wimplicit-int): Initialize to -1.
6839
83685514
AM
68402014-10-16 Andrew MacLeod <amacleod@redhat.com>
6841
6842 * c-pragma.c: Adjust include files.
6843 * c-semantics.c: Likewise.
6844
5b8300ea
DD
68452014-10-16 DJ Delorie <dj@redhat.com>
6846
6847 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
6848 multiples of bytes.
6849
5f83e90b
JM
68502014-10-14 Jason Merrill <jason@redhat.com>
6851
6852 PR c++/63455
6853 * c-common.h (CPP_PREPARSED_EXPR): New.
6854 (N_CP_TTYPES): Adjust.
6855
d73326ca
MP
68562014-10-15 Marek Polacek <polacek@redhat.com>
6857
6858 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
6859
78a7c317
DD
68602014-10-14 DJ Delorie <dj@redhat.com>
6861
6862 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
6863 types, not just __int128.
6864 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
6865 types, not just __int128.
6866 (cpp_atomic_builtins): Round pointer sizes up.
6867 (type_suffix): Use type precision, not specific types.
6868 * c-common.c (c_common_reswords): Remove __int128 special case.
6869 (c_common_type_for_size): Check for all __intN types, not just
6870 __int128.
6871 (c_common_type_for_mode): Likewise.
6872 (c_common_signed_or_unsigned_type): Likewise.
6873 (c_build_bitfield_integer_type): Likewise.
6874 (c_common_nodes_and_builtins): Likewise.
6875 (keyword_begins_type_specifier): Likewise.
6876 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
6877 __intN variants.
6878
2a22f99c
TS
68792014-10-12 Trevor Saunders <tsaunders@mozilla.com>
6880
6881 * c-common.c: Use hash_table instead of hashtab.
6882
2a8ef767
ESR
68832014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
6884
adfac8df 6885 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
6886 C++11 section.
6887
3c9aabbd
MG
68882014-10-03 Marc Glisse <marc.glisse@inria.fr>
6889
6890 PR c++/54427
6891 PR c++/57198
6892 PR c++/58845
6893 * c-common.c (warn_logical_operator): Punt for vectors.
6894
a15f7cb8
ESR
68952014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
6896
6897 Implement SD-6: SG10 Feature Test Recommendations
6898 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
6899 macros and the __has_header macro.
6900
8d0cf15e
JM
69012014-09-30 Jason Merrill <jason@redhat.com>
6902
dd5d5481
JM
6903 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
6904 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
6905 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
6906
b752325e
JM
6907 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
6908 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
6909
8d0cf15e
JM
6910 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
6911 * c-common.c (c_common_reswords): Remove __is_convertible_to.
6912
083e891e
MP
69132014-09-24 Marek Polacek <polacek@redhat.com>
6914
6915 PR c/61405
6916 PR c/53874
6917 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
6918
7861b648
AK
69192014-09-23 Andi Kleen <ak@linux.intel.com>
6920
6921 * c-common.c (handle_no_reorder_attribute): New function.
6922 (c_common_attribute_table): Add no_reorder attribute.
6923
9a79452d
JM
69242014-09-22 Joseph Myers <joseph@codesourcery.com>
6925
6926 * c-cppbuiltin.c (c_cpp_builtins): Define
6927 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
6928 modes.
6929
dd69f047
JM
69302014-09-18 Joseph Myers <joseph@codesourcery.com>
6931
6932 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
6933 for supported floating-point modes.
6934
737a4826
MLI
69352014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
6936
6937 * c.opt (Wpsabi): Use LangEnabledBy.
6938 * c-opts.c (c_common_handle_option): Do not handle here.
6939
8cc4b7a2
JM
69402014-09-12 Joseph Myers <joseph@codesourcery.com>
6941
6942 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
6943 macros for floating-point modes.
6944
179b5a55
MG
69452014-09-11 Marc Glisse <marc.glisse@inria.fr>
6946
6947 PR target/58757
6948 * c-cppbuiltin.c (builtin_define_float_constants): Correct
6949 __*_DENORM_MIN__ without denormals.
6950
570a11fe
JJ
69512014-09-10 Jakub Jelinek <jakub@redhat.com>
6952
6953 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6954 ubsan_instrument_vla, ubsan_instrument_return): Adjust
6955 ubsan_create_data callers.
6956 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
6957 index is constant or BIT_AND_EXPR with constant mask and is
6958 small enough for the bound.
6959 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
6960 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
6961
b559c810
MLI
69622014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6963
6964 * c.opt: Add CppReason to various flags.
6965 (Wdate-time): Re-sort.
6966 * c-common.c: Include c-common.h earlier.
6967 (struct reason_option_codes_t): Delete.
6968 (c_option_controlling_cpp_error): Prefix global type and struct
6969 with cpp_.
6970
1ef33fd4
MLI
69712014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6972
6973 * c.opt (Wnormalized): New.
6974 (Wnormalized=): Use Enum and Reject Negative.
6975 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
6976
66bb34c0
JM
69772014-09-08 Joseph Myers <joseph@codesourcery.com>
6978
6979 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
6980 digits of floating-point modes if -fbuilding-libgcc.
6981
53d68b9f
JM
69822014-09-05 Joseph Myers <joseph@codesourcery.com>
6983
6984 * c-cppbuiltin.c (c_cpp_builtins): Also define
6985 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
6986 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
6987 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
6988 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
6989 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
6990 __LIBGCC_STACK_GROWS_DOWNWARD__,
6991 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
6992 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
6993 __LIBGCC_DWARF_FRAME_REGISTERS__,
6994 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
6995 __LIBGCC_STACK_POINTER_REGNUM__ and
6996 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
6997 (builtin_define_with_value): Handle backslash-escaping in string
6998 macro values.
6999
f65586dc
RB
70002014-09-05 Richard Biener <rguenther@suse.de>
7001
7002 PR middle-end/63148
7003 * c-format.c (check_format_arg): Properly handle
7004 effectively signed POINTER_PLUS_EXPR offset.
7005
2b71f4a4
MLI
70062014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
7007
7008 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
7009 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
7010 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
7011 and Init.
7012 * c-opts.c (c_common_handle_option): Do not handle here.
7013 (sanitize_cpp_opts): Likewise.
7014 * c-common.c (struct reason_option_codes_t): Handle
7015 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
7016
d2e4feca
MP
70172014-09-03 Marek Polacek <polacek@redhat.com>
7018
7019 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
7020
9a771876
JJ
70212014-09-02 Jakub Jelinek <jakub@redhat.com>
7022 Balaji V. Iyer <balaji.v.iyer@intel.com>
7023 Igor Zamyatin <igor.zamyatin@intel.com>
7024
7025 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
7026 * c-common.c (c_common_reswords): Added _Cilk_for.
7027 * c-common.h (enum rid): Added RID_CILK_FOR.
7028 (cilk_for_number_of_iterations): Add declaration.
7029 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
7030 CILK_FOR.
7031 * c-pragma.c (init_pragma): Register "grainsize" pragma.
7032 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
7033
81b5d104
MLI
70342014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7035
7036 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
7037 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
7038 Wundef): Use CPP, Var and Init.
7039 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
7040
b753b37b
MLI
70412014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7042
7043 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
7044 * c-opts.c (c_common_handle_option): Do not handle here.
7045
028aee17
JM
70462014-08-25 Jason Merrill <jason@redhat.com>
7047
7048 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
7049 -std=c++14 and -std=gnu++14, rather than the reverse.
7050 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
7051 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
7052 * c-common.h (cxx_dialect): Remove cxx1y.
7053
e4276ba5
ESR
70542014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
7055
7056 * c-common.h (enum cxx_dialect): Add cxx14.
7057 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
7058 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
7059 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
7060
a545cacd
JM
70612014-08-22 Jason Merrill <jason@redhat.com>
7062
7063 * c.opt (std=gnu++17): Fix alias.
7064
59ea0364
MP
70652014-08-22 Marek Polacek <polacek@redhat.com>
7066
7067 PR c++/62199
7068 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
7069 check for vector types. Drop LHS argument.
7070 * c-common.h (warn_logical_not_parentheses): Adjust.
7071
596e808c
MLI
70722014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
7073
7074 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
7075 (Wmultichar): Likewise.
7076 (Wdate-time): Use C-family languages instead of Common. Use CPP
7077 and Var.
7078 * c-opts.c (c_common_handle_option): Do not handle the above
7079 options here.
7080 (sanitize_cpp_opts): Likewise.
7081
18767f65
MLI
70822014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
7083
7084 PR fortran/44054
7085 * c-opts.c: Include tree-diagnostics.h.
7086 (c_diagnostic_finalizer): New.
7087 (c_common_initialize_diagnostics): Use it.
7088
b4413594
MLI
70892014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
7090
7091 PR preprocessor/51303
7092 * c-common.c (struct reason_option_codes_t option_codes):
7093 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
7094
43f9a13c
MLI
70952014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
7096
7097 PR c/60975
7098 PR c/53063
7099 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
7100 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
7101 (c_common_post_options): Call init_global_opts_from_cpp.
7102 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
7103
04159acf
MP
71042014-08-19 Marek Polacek <polacek@redhat.com>
7105
7106 PR c++/62153
7107 * c-common.c (maybe_warn_bool_compare): New function.
7108 * c-common.h (maybe_warn_bool_compare): Declare.
7109 * c.opt (Wbool-compare): New option.
7110
35aff4fb
MP
71112014-08-19 Marek Polacek <polacek@redhat.com>
7112
7113 * c.opt (Wc99-c11-compat): New option.
7114
177cce46
MP
71152014-08-19 Marek Polacek <polacek@redhat.com>
7116
7117 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
7118 to warn_c90_c99_compat.
7119 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
7120 to -1.
7121
6ae9194f
MLI
71222014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
7123 Steven Bosscher <steven@gcc.gnu.org>
7124
7125 PR c/52952
7126 * c-format.c: Add extra_arg_loc and format_string_loc to struct
7127 format_check_results.
7128 (check_function_format): Use true and add comment for boolean
7129 argument.
7130 (finish_dollar_format_checking): Use explicit location when warning.
7131 (check_format_info): Likewise.
7132 (check_format_arg): Set extra_arg_loc and format_string_loc.
7133 (check_format_info_main): Use explicit location when warning.
7134 (check_format_types): Pass explicit location.
7135 (format_type_warning): Likewise.
7136
8e54f6d3
MLI
71372014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
7138
7139 PR fortran/44054
7140 * c-format.c: Handle Fortran flags.
7141
cd4e76fc
IZ
71422014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
7143
7144 PR other/61962
7145 * array-notation-common.c (find_rank): Added handling for other
7146 types of references.
7147
f3bede71
MP
71482014-08-10 Marek Polacek <polacek@redhat.com>
7149
7150 PR c/51849
7151 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
7152 * c.opt (Wc90-c99-compat): Add option.
7153
9f25a338
TS
71542014-08-07 Trevor Saunders <tsaunders@mozilla.com>
7155
7156 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
7157
62e4eb35
MP
71582014-08-03 Marek Polacek <polacek@redhat.com>
7159
ab20d992 7160 * c-common.c (check_case_value): Add location_t parameter. Use it.
62e4eb35
MP
7161 (c_add_case_label): Pass loc to check_case_value.
7162
b787e7a2
TS
71632014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7164
7165 * cilk.c: Use hash_map instead of pointer_map.
7166
6e2830c3
TS
71672014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7168
7169 * c-gimplify.c: Use hash_set instead of pointer_set.
7170
a7ee52fb
IZ
71712014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
7172
7173 PR middle-end/61455
7174 * array-notation-common.c (extract_array_notation_exprs): Handling
7175 of DECL_EXPR added.
7176
944fa280
JJ
71772014-08-01 Jakub Jelinek <jakub@redhat.com>
7178
7179 * c-common.h (min_align_of_type): Removed prototype.
7180 * c-common.c (min_align_of_type): Removed.
7181 * c-ubsan.h (ubsan_maybe_instrument_reference,
7182 ubsan_maybe_instrument_member_call): New prototypes.
7183 * c-ubsan.c: Include stor-layout.h and builtins.h.
7184 (ubsan_maybe_instrument_reference_or_call,
7185 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
7186 functions.
7187
b4dfdc11
MG
71882014-07-31 Marc Glisse <marc.glisse@inria.fr>
7189
7190 PR c++/60517
7191 * c.opt (-Wreturn-local-addr): Move to common.opt.
7192
a41844e5
JM
71932014-07-30 Jason Merrill <jason@redhat.com>
7194
7195 PR c++/61659
7196 PR c++/61687
7197 Revert:
7198 * c.opt (-fuse-all-virtuals): New.
7199
976d5a22
TT
72002014-07-30 Tom Tromey <tromey@redhat.com>
7201
7202 PR c/59855
7203 * c.opt (Wdesignated-init): New option.
7204 * c-common.c (c_common_attribute_table): Add "designated_init".
7205 (handle_designated_init): New function.
7206
cdc94aca
MP
72072014-07-24 Marek Polacek <polacek@redhat.com>
7208
7209 PR c/57653
7210 * c-opts.c (c_finish_options): If -imacros is in effect, return.
7211
f41373b6
DS
72122014-07-16 Dodji Seketeli <dodji@redhat.com>
7213
7214 PR preprocessor/60723 - missing system-ness marks for macro tokens
7215 * c-ppoutput.c (struct print::prev_was_system_token): New data
7216 member.
7217 (init_pp_output): Initialize it.
7218 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
7219 (do_line_change): Return a flag saying if a line marker was
7220 emitted or not.
7221 (scan_translation_unit): Detect if the system-ness of the token we
7222 are about to emit is different from the one of the previously
7223 emitted token. If so, emit a line marker. Avoid emitting useless
7224 adjacent line markers. Avoid emitting line markers for tokens
7225 originating from the expansion of built-in macros.
7226 (scan_translation_unit_directives_only): Adjust.
7227
4d661eaa
MP
72282014-07-15 Marek Polacek <polacek@redhat.com>
7229
7230 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
7231 TYPE_MAX_VALUE is NULL.
7232
b108f48f
JJ
72332014-07-14 Jakub Jelinek <jakub@redhat.com>
7234
7235 PR middle-end/61294
7236 * c.opt (Wmemset-transposed-args): New warning.
7237
c0221884
JM
72382014-07-10 Jason Merrill <jason@redhat.com>
7239
7240 PR c++/61659
7241 PR c++/61687
7242 * c.opt (-fuse-all-virtuals): New.
7243
63dfbb95
RB
72442014-07-09 Richard Biener <rguenther@suse.de>
7245
7246 PR c-family/61741
7247 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
7248 using unsigned arithmetic if overflow does not wrap instead of
7249 if overflow is undefined.
7250
773ec47f
MP
72512014-07-06 Marek Polacek <polacek@redhat.com>
7252
7253 PR c/6940
7254 * c.opt (Wsizeof-array-argument): New option.
7255
00a7ba58
JJ
72562014-07-03 Jakub Jelinek <jakub@redhat.com>
7257
b1726d6c 7258 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
7259 comments->count <= 1, as comments->entries might be NULL.
7260
52ec0ea3
MP
72612014-07-01 Marek Polacek <polacek@redhat.com>
7262
7263 * c.opt (Wint-conversion): New option.
7264
d5c3d343
MP
72652014-07-01 Marek Polacek <polacek@redhat.com>
7266
7267 PR c/58286
7268 * c.opt (Wincompatible-pointer-types): New option.
7269
6e7ceb17
PC
72702014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
7271
7272 PR c++/51400
7273 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
7274 Do not discard TYPE_QUALS of type.
7275
da73100b
JM
72762014-06-26 Jason Merrill <jason@redhat.com>
7277
7278 * c-common.h (enum cxx_dialect): Add cxx1z.
7279 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
7280 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
7281
08eedf75
TJ
72822014-06-26 Teresa Johnson <tejohnson@google.com>
7283
7284 * c-common.h (get_dump_info): Declare.
7285 * c-gimplify.c (c_genericize): Use saved dump files.
7286 * c-opts.c (c_common_parse_file): Begin and end dumps
7287 once around parsing invocation.
7288 (get_dump_info): New function.
7289
7b56b2f8
MP
72902014-06-23 Marek Polacek <polacek@redhat.com>
7291 Andrew MacLeod <amacleod@redhat.com>
7292
7293 PR c/61553
7294 * c-common.c (get_atomic_generic_size): Don't segfault if the
7295 type doesn't have a size.
7296
0e37a2f3
MP
72972014-06-20 Marek Polacek <polacek@redhat.com>
7298
7299 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
7300 (ubsan_walk_array_refs_r): New function.
7301 (c_genericize): Instrument array bounds.
7302 * c-ubsan.c: Include "internal-fn.h".
7303 (ubsan_instrument_division): Mark instrumented arrays as having
7304 side effects. Adjust ubsan_type_descriptor call.
7305 (ubsan_instrument_shift): Likewise.
7306 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
7307 (ubsan_instrument_bounds): New function.
7308 (ubsan_array_ref_instrumented_p): New function.
7309 (ubsan_maybe_instrument_array_ref): New function.
7310 * c-ubsan.h (ubsan_instrument_bounds): Declare.
7311 (ubsan_array_ref_instrumented_p): Declare.
7312 (ubsan_maybe_instrument_array_ref): Declare.
7313
73142014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
7315
7316 PR lto/61123
7317 * c.opt (fshort-enums): Add to LTO.
7318 * c.opt (fshort-wchar): Likewise.
7319
5c3d09f7
MP
73202014-06-16 Marek Polacek <polacek@redhat.com>
7321
7322 PR c/60439
7323 * c.opt (Wswitch-bool): Add Var.
7324
9cf32741
JJ
73252014-06-12 Jakub Jelinek <jakub@redhat.com>
7326
7327 PR middle-end/61486
7328 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
7329 #pragma omp target teams or
7330 #pragma omp {,target }teams distribute simd.
7331
62984918
JM
73322014-06-12 Jason Merrill <jason@redhat.com>
7333
7334 * c.opt (Wabi=, fabi-compat-version): New.
7335 * c-opts.c (c_common_handle_option): Handle -Wabi=.
7336 (c_common_post_options): Handle flag_abi_compat_version default.
7337 Disallow -fabi-compat-version=1.
7338 * c-common.h (abi_version_crosses): New.
7339
f961457f
JH
73402014-06-11 Jan Hubicka <hubicka@ucw.cz>
7341
adfac8df 7342 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
7343 section names that are no longer trees.
7344
92d28cbb
JJ
73452014-06-10 Jakub Jelinek <jakub@redhat.com>
7346
7347 PR fortran/60928
7348 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
7349 (omp_pragmas): ... back here.
7350
742938c9
MP
73512014-06-05 Marek Polacek <polacek@redhat.com>
7352
7353 PR c/49706
7354 * c-common.c (warn_logical_not_parentheses): New function.
7355 * c-common.h (warn_logical_not_parentheses): Declare.
7356 * c.opt (Wlogical-not-parentheses): New option.
7357
9d548dfb
MP
73582014-06-04 Marek Polacek <polacek@redhat.com>
7359
7360 PR c/30020
7361 * c-common.c (check_case_bounds): Add location parameter.
7362 Use it.
7363 (c_add_case_label): Pass loc to check_case_bounds.
7364
fedfecef
MP
73652014-06-03 Marek Polacek <polacek@redhat.com>
7366
7367 PR c/60439
7368 * c.opt (Wswitch-bool): New option.
7369
f6a7cffc
TS
73702014-05-22 Thomas Schwinge <thomas@codesourcery.com>
7371
040d18b6
TS
7372 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
7373 Remove prototypes.
7374 (record_types_used_by_current_var_decl): Move prototype to where
7375 it belongs.
7376
f6a7cffc
TS
7377 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
7378 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
7379 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
7380
632f2871
RS
73812014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
7382
7383 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
7384 * c-common.c (c_common_nodes_and_builtins): Don't initialize
7385 void_zero_node.
7386 * c-pretty-print.c (pp_c_void_constant): New function.
7387 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
7388 (c_pretty_printer::expression): Handle VOID_CST.
7389 * cilk.c (extract_free_variables): Likewise.
7390 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
7391 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
7392
766090c2
TS
73932014-05-17 Trevor Saunders <tsaunders@mozilla.com>
7394
7395 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
7396 * c-pragma.c (push_alignment): Adjust.
7397 (handle_pragma_push_options): Likewise.
7398
661a0813
MP
73992014-05-09 Marek Polacek <polacek@redhat.com>
7400
7401 PR c/50459
7402 * c-common.c (check_user_alignment): Return -1 if alignment is error
7403 node.
7404 (handle_aligned_attribute): Don't call default_conversion on
7405 FUNCTION_DECLs.
7406 (handle_vector_size_attribute): Likewise.
7407 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
7408 (handle_sentinel_attribute): Call default_conversion and allow even
7409 integral types as an argument.
7410
2793eeab
MP
74112014-05-08 Marek Polacek <polacek@redhat.com>
7412
7413 PR c/61053
7414 * c-common.c (min_align_of_type): New function factored out from...
7415 (c_sizeof_or_alignof_type): ...here.
7416 * c-common.h (min_align_of_type): Declare.
7417
f827930a
MP
74182014-05-08 Marek Polacek <polacek@redhat.com>
7419
7420 PR c/61077
7421 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
7422 parameter type of main.
7423
ca49b74e
DD
74242014-05-07 DJ Delorie <dj@redhat.com>
7425
7426 * c-cppbuiltin.c (print_bits_of_hex): New.
7427 (builtin_define_type_minmax): Print values using hex so as not to
7428 require a pre-computed list of string values.
7429
1d60af08
KZ
74302014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
7431 Mike Stump <mikestump@comcast.net>
7432 Richard Sandiford <rdsandiford@googlemail.com>
7433
7434 * c-ada-spec.c: Include wide-int.h.
7435 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
7436 (dump_generic_ada_node): Use wide-int interfaces.
7437 * c-common.c: Include wide-int-print.h.
7438 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
7439 (pointer_int_sum): Use wide-int interfaces.
7440 (c_common_nodes_and_builtins): Use make_int_cst.
7441 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
7442 (handle_alloc_size_attribute): Use wide-int interfaces.
7443 (get_nonnull_operand): Likewise.
7444 * c-format.c (get_constant): Use tree_fits_uhwi_p.
7445 * c-lex.c: Include wide-int.h.
7446 (narrowest_unsigned_type): Take a widest_int rather than two
7447 HOST_WIDE_INTs.
7448 (narrowest_signed_type): Likewise.
7449 (interpret_integer): Update accordingly. Use wide-int interfaces.
7450 (lex_charconst): Use wide-int interfaces.
7451 * c-pretty-print.c: Include wide-int.h.
7452 (pp_c_integer_constant): Use wide-int interfaces.
7453 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
7454 INT_CST_LT_UNSIGNED.
7455
b15458be
RB
74562014-05-06 Richard Biener <rguenther@suse.de>
7457
7458 * c-opts.c (c_common_post_options): For -freestanding,
7459 -fno-hosted and -fno-builtin disable pattern recognition
7460 if not enabled explicitely.
7461
6577374e
MP
74622014-05-02 Marek Polacek <polacek@redhat.com>
7463
7464 * c.opt (Wsizeof-pointer-memaccess): Describe option.
7465
d00887e8
MP
74662014-05-01 Marek Polacek <polacek@redhat.com>
7467
7468 PR c/43245
7469 * c.opt (Wdiscarded-qualifiers): Add.
7470
f8ed5150
MP
74712014-04-30 Marek Polacek <polacek@redhat.com>
7472
7473 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
7474 INT_MIN / -1 sanitization only for integer types.
7475
45484dcf
MP
74762014-04-25 Marek Polacek <polacek@redhat.com>
7477
7478 PR c/18079
7479 * c-common.c (handle_noinline_attribute): Warn if the attribute
7480 conflicts with always_inline attribute.
7481 (handle_always_inline_attribute): Warn if the attribute conflicts
7482 with noinline attribute.
7483
38e514c0
MP
74842014-04-25 Marek Polacek <polacek@redhat.com>
7485
7486 PR c/60156
7487 * c-common.c (check_main_parameter_types): Warn about variadic main.
7488
44875f92
MS
74892014-04-24 Mike Stump <mikestump@comcast.net>
7490
7491 * c.opt (Wshadow-ivar): Default to on.
7492
dcaaa5a0
DP
74932014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
7494
7495 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
7496
c07d7c02
MP
74972014-04-23 Marek Polacek <polacek@redhat.com>
7498
7499 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
7500
1c33c9b7
JJ
75012014-04-22 Jakub Jelinek <jakub@redhat.com>
7502
7503 PR sanitizer/60275
7504 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
7505 if flag_sanitize_undefined_trap_on_error.
7506 (ubsan_instrument_division, ubsan_instrument_shift,
7507 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
7508 if !flag_sanitize_recover.
7509
793c625f
MG
75102014-04-22 Marc Glisse <marc.glisse@inria.fr>
7511
7512 PR libstdc++/43622
7513 * c-common.c (registered_builtin_types): Make non-static.
7514 * c-common.h (registered_builtin_types): Declare.
7515
b0f1bf36 75162014-04-14 Richard Biener <rguenther@suse.de>
ab20d992 7517 Marc Glisse <marc.glisse@inria.fr>
b0f1bf36
RB
7518
7519 PR c/60819
7520 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
7521 apply may-alias the scalar pointer type when applicable.
7522
3b07fa4a
IZ
75232014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
7524
7525 PR middle-end/60467
7526 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
7527 as possible argument for Cilk_spawn.
7528
cbbd2b1c
TB
75292014-04-11 Tobias Burnus <burnus@net-b.de>
7530
7531 PR c/60194
7532 * c.opt (Wformat-signedness): Add
7533 * c-format.c(check_format_types): Use it.
7534
6415bd5d
JM
75352014-04-11 Jason Merrill <jason@redhat.com>
7536
7537 PR c++/57926
7538 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
7539 default_conversion for an array argument.
7540
6525783a
MP
75412014-04-08 Marek Polacek <polacek@redhat.com>
7542
7543 PR sanitizer/60745
7544 * c-ubsan.c: Include asan.h.
7545 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
7546
880a467b
NS
75472014-04-03 Nathan Sidwell <nathan@codesourcery.com>
7548
7549 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
7550
7b59ff2d
MP
75512014-04-02 Marek Polacek <polacek@redhat.com>
7552
7553 * c-common.h (c_expand_expr): Remove declaration.
7554
8edbfaa6
JJ
75552014-03-28 Jakub Jelinek <jakub@redhat.com>
7556
7557 PR c++/60689
7558 * c-common.c (add_atomic_size_parameter): When creating new
7559 params vector, push the size argument first.
7560
07d72e1d
JJ
75612014-03-26 Jakub Jelinek <jakub@redhat.com>
7562
7563 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
7564 ubsan_instrument_vla, ubsan_instrument_return): Adjust
7565 ubsan_create_data callers.
7566
b35e0fa0
JJ
75672014-03-22 Jakub Jelinek <jakub@redhat.com>
7568
7569 PR debug/60603
7570 * c-opts.c (c_finish_options): Restore cb_file_change call to
7571 <built-in>.
7572
39a1ebb3
JJ
75732014-03-13 Jakub Jelinek <jakub@redhat.com>
7574
7575 PR middle-end/36282
7576 * c-pragma.c (apply_pragma_weak): Only look at
7577 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
7578 DECL_ASSEMBLER_NAME_SET_P (decl).
7579 (maybe_apply_pending_pragma_weaks): Exit early if
7580 vec_safe_is_empty (pending_weaks) rather than only when
7581 !pending_weaks.
7582 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
7583 set assembler name back to NULL afterwards.
7584
a07f6ed2
JM
75852014-03-11 Jason Merrill <jason@redhat.com>
7586
7587 * c.opt: Add -std=gnu++14.
7588
75b107f5
IB
75892014-03-11 Ian Bolton <ian.bolton@arm.com>
7590
7591 * c-opts.c (c_common_post_options): Don't override
7592 -ffp-contract=fast if unsafe-math-optimizations is on.
7593
f42c637e
PM
75942014-03-08 Paulo Matos <paulo@matos-sorge.com>
7595
22b15758 7596 * c.opt: Enable LTO FE for fshort-double.
f42c637e 7597
70e24808
JM
75982014-03-07 Jason Merrill <jason@redhat.com>
7599
7600 * c.opt: Add -std=c++14.
7601
3af9c5e9
MP
76022014-03-06 Marek Polacek <polacek@redhat.com>
7603
7604 PR c/60197
7605 * cilk.c (contains_cilk_spawn_stmt): New function.
7606 (contains_cilk_spawn_stmt_walker): Likewise.
7607 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
7608 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
7609
b3bdf019
JJ
76102014-03-03 Jakub Jelinek <jakub@redhat.com>
7611
7612 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
7613 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
7614 even when flag_preprocess_only.
7615
ca7e759d
JM
76162014-02-26 Jason Merrill <jason@redhat.com>
7617
7618 PR c++/59231
7619 PR c++/11586
7620 * c-common.c (shorten_compare): Don't check
7621 c_inhibit_evaluation_warnings.
7622
28e41874
JJ
76232014-02-19 Jakub Jelinek <jakub@redhat.com>
7624
cca615af
JJ
7625 PR c/37743
7626 * c-common.c (c_common_nodes_and_builtins): When initializing
7627 c_uint{16,32,64}_type_node, also set corresponding
7628 uint{16,32,64}_type_node to the same value.
7629
28e41874
JJ
7630 PR c++/60267
7631 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
7632 for PRAGMA_IVDEP if flag_preprocess_only.
7633
c2bf53a1
JJ
76342014-02-12 Jakub Jelinek <jakub@redhat.com>
7635
7636 PR c/60101
7637 * c-common.c (merge_tlist): If copy is true, call new_tlist,
7638 if false, add ADD itself, rather than vice versa.
7639 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
7640 copy. For SAVE_EXPR, only call merge_tlist once.
7641
8fcbce72
JJ
76422014-02-08 Jakub Jelinek <jakub@redhat.com>
7643
7644 PR middle-end/60092
7645 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
7646 and tree_to_uhwi.
7647 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
7648 functions.
7649 (c_common_attribute_table): Add alloc_align and assume_aligned
7650 attributes.
7651
0a756a3f
MP
76522014-02-06 Marek Polacek <polacek@redhat.com>
7653
7654 PR c/60087
7655 * c-common.c (warn_for_sign_compare): Call warning_at with location
7656 instead of warning.
7657
7ec4847a
MP
76582014-02-05 Marek Polacek <polacek@redhat.com>
7659
7660 PR c/53123
7661 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
7662 statement.
7663
66f20604
MP
76642014-02-04 Marek Polacek <polacek@redhat.com>
7665
7666 PR c/60036
7667 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
7668 SAVE_EXPR.
7669
5d77fb19
MG
76702014-02-03 Marc Glisse <marc.glisse@inria.fr>
7671
7672 PR c++/53017
7673 PR c++/59211
7674 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
7675 handle_vector_size_attribute, handle_nonnull_attribute): Call
7676 default_conversion on the attribute argument.
7677 (handle_nonnull_attribute): Increment the argument number.
7678
81e5eca8
MP
76792014-01-31 Marek Polacek <polacek@redhat.com>
7680
7681 PR c/59963
7682 * c-common.c (add_atomic_size_parameter): Pass vNULL to
7683 build_function_call_vec.
7684 (resolve_overloaded_builtin): Likewise.
7685 * c-common.h (build_function_call_vec): Adjust declaration.
7686
68fca595
MP
76872014-01-30 Marek Polacek <polacek@redhat.com>
7688
7689 PR c/59940
7690 * c-common.h (unsafe_conversion_p): Adjust declaration.
7691 (warnings_for_convert_and_check): Likewise.
7692 (convert_and_check): Likewise.
7693 * c-common.c (unsafe_conversion_p): Add location parameter. Call
7694 expansion_point_location_if_in_system_header on it.
7695 (warnings_for_convert_and_check): Add location parameter. Call
7696 expansion_point_location_if_in_system_header on it. Use it.
7697 (convert_and_check): Add location parameter. Use it.
7698 (conversion_warning): Likewise.
7699 (c_add_case_label): Adjust convert_and_check calls.
7700 (scalar_to_vector): Adjust unsafe_conversion_p calls.
7701
b72271b9
BI
77022014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
7703
7704 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
7705 flag_cilkplus.
7706 * c-pragma.c (init_pragma): Likewise.
7707 * c.opt: Likewise.
7708
393e8e8b
MP
77092014-01-23 Marek Polacek <polacek@redhat.com>
7710
7711 PR c/59846
7712 * c-common.c (shorten_compare): Add location_t parameter.
7713 * c-common.h (shorten_binary_op): Adjust declaration.
7714
f04dda30
MP
77152014-01-23 Marek Polacek <polacek@redhat.com>
7716
7717 PR c/58346
7718 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
7719 * c-common.h: Declare it.
7720
621955cb
EB
77212014-01-20 Eric Botcazou <ebotcazou@adacore.com>
7722
7723 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
7724 * c-ada-spec.c (dump_ads): Likewise.
7725 (cpp_check): Likewise.
7726 (dump_ada_specs): Likewise.
7727
77282014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
7729
7730 PR c++/49718
7731 * c-common.c (handle_no_instrument_function_attribute): Allow
7732 no_instrument_function attribute in class member
7733 definition/declaration.
7734
241f845a
JJ
77352014-01-15 Jakub Jelinek <jakub@redhat.com>
7736
7737 PR c/58943
7738 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
7739 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
7740 being COMPOUND_EXPR.
7741 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
7742 operand a SAVE_EXPR and second MODIFY_EXPR.
7743
e83b8e2e
JJ
77442014-01-09 Jakub Jelinek <jakub@redhat.com>
7745
7746 PR target/58115
7747 * c-pch.c (c_common_write_pch): Call
7748 prepare_target_option_nodes_for_pch.
7749
23a5b65a
RS
77502014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7751
7752 Update copyright years
7753
f9030485
RS
77542014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7755
7756 * array-notation-common.c, c-cilkplus.c: Use the standard form for
7757 the copyright notice.
7758
f2aa696b
EB
77592013-12-28 Eric Botcazou <ebotcazou@adacore.com>
7760
7761 * c-ada-spec.c (print_constructor): New function.
7762 (print_destructor): Retrieve the origin of the destructor.
7763 (print_ada_declaration): Revamp handling of constructors/destructors.
7764
3f8257db 77652013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
7766 Bill Maddox <maddox@google.com>
7767 Jason Merrill <jason@redhat.com>
7768
7769 * c.opt: Add -fdeclone-ctor-dtor.
7770 * c-opts.c (c_common_post_options): Default to on iff -Os.
7771
41958c28
BI
77722013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
7773
7774 * c-common.c (c_common_attribute_table): Added "cilk simd function"
7775 attribute.
7776 * c-pragma.h (enum pragma_cilk_clause): Remove.
ab20d992 7777 (enum pragma_omp_clause): Added the following fields:
41958c28
BI
7778 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
7779 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
7780 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
7781 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
7782 PRAGMA_CILK_CLAUSE_UNIFORM.
7783
b1726d6c 7784
12893402
BI
77852013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
7786
7787 * cilk.c (cilk_outline): Made this function non-static.
7788 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
7789 (create_cilk_wrapper): Added a new parameter: a function pointer.
7790 (c_install_body_w_frame_cleanup): Remove
7791 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
7792 * c-common.h (cilk_outline): New prototype.
7793 (gimplify_cilk_spawn): Removed two parameters.
7794 (cilk_install_body_with_frame_cleanup): New prototype.
7795 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
7796 CILK_SPAWN_STMT case.
7797
085b42ed
BS
77982013-12-11 Bernd Schmidt <bernds@codesourcery.com>
7799
2ce064c3
BS
7800 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
7801
085b42ed
BS
7802 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
7803 (int_array_type_node): Remove.
7804 * c-common.c (c_common_nodes_and_builtins): Don't build it.
7805
9e36c9ed
MP
78062013-12-05 Marek Polacek <polacek@redhat.com>
7807
7808 PR c/52023
7809 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
7810 [ADJUST_FIELD_ALIGN].
7811
296674db
JM
78122013-12-04 Joseph Myers <joseph@codesourcery.com>
7813
7814 PR c/52023
7815 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
7816 and check field alignment if set.
7817 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
7818 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
7819
b1726d6c 78202013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
7821 Marek Polacek <polacek@redhat.com>
7822
7823 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
7824 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
7825
d7947e19
L
78262013-11-29 H.J. Lu <hongjiu.lu@intel.com>
7827
7828 PR c/59309
7829 * cilk.c (gimplify_cilk_spawn): Properly handle function without
7830 arguments.
7831
fad7652e
JJ
78322013-11-29 Jakub Jelinek <jakub@redhat.com>
7833
7834 PR c/59280
7835 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
7836 goto invalid. If it is error_mark_node, don't issue further
7837 diagnostics.
7838
8b5e1202
SO
78392013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
7840
7841 * c.opt (Wopenmp-simd): New.
7842
0a508bb6
JJ
78432013-11-22 Jakub Jelinek <jakub@redhat.com>
7844
7845 * c-ubsan.h (ubsan_instrument_return): New prototype.
7846 * c-ubsan.c (ubsan_instrument_return): New function.
7847
2fb9a547
AM
78482013-11-22 Andrew MacLeod <amacleod@redhat.com>
7849
7850 * c-common.c: Add required include files from gimple.h.
ab20d992
JJ
7851 * c-gimplify.c: Likewise.
7852 * cilk.c: Likewise.
2fb9a547 7853
8400e75e
DM
78542013-11-22 David Malcolm <dmalcolm@redhat.com>
7855
7856 * c-common.c (unsafe_conversion_p): Remove use of
7857 EXPR_LOC_OR_HERE macro.
7858 (conversion_warning): Likewise.
7859 (warnings_for_convert_and_check): Likewise.
7860 (warn_for_collisions_1): Likewise.
7861 (shorten_compare): Likewise, and remove use of in_system_header
7862 macro, using the location from the former.
7863 * c-lex.c (dump_one_header): Remove use of input_filename macro.
7864 (cb_def_pragma): Remove use of in_system_header macro.
7865 (lex_string): Likewise.
7866 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
7867
eb1ce453
KZ
78682013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
7869 Mike Stump <mikestump@comcast.net>
7870 Richard Sandiford <rdsandiford@googlemail.com>
7871
7872 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
7873 instead of TREE_INT_CST_LOW, in cases where there is a protecting
7874 tree_fits_shwi_p or tree_fits_uhwi_p.
7875 (dump_generic_ada_node): Likewise.
7876 * c-format.c (check_format_arg): Likewise.
7877 * c-pretty-print.c (pp_c_integer_constant): Likewise.
7878
6b3b8c27
KZ
78792013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
7880
7881 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
7882
49b0aa18
JC
78832013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
7884
7885 PR c/53001
7886 * c-common.c (unsafe_conversion_p): Make this function
7887 return an enumeration with more detail.
7888 (conversion_warning): Use the new return type of
7889 unsafe_conversion_p to separately warn either about conversions
7890 that lower floating point number precision or about the other
7891 kinds of conversions.
7892 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
7893 (unsafe_conversion_p): switching return type to
7894 conversion_safety enumeration.
49b0aa18
JC
7895 * c.opt: Adding new warning -Wfloat-conversion and
7896 enabling it with -Wconversion.
7897
b826515a
BS
78982013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
7899
8e745a17
JJ
7900 * c-opts.c: Include plugin.h.
7901 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 7902
b9a55b13
MP
79032013-11-19 Marek Polacek <polacek@redhat.com>
7904
7905 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
7906 call.
7907 (ubsan_instrument_shift): Likewise.
7908 (ubsan_instrument_vla): Likewise.
7909
7d362f6c
RS
79102013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7911
7912 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
7913 cast to unsigned type.
7914
386b1f1f
RS
79152013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7916
7917 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
7918 tree_low_cst.
7919 (complete_array_type): Update comment to refer to tree_to_[su]hwi
7920 rather than tree_low_cst.
7921
ae7e9ddd
RS
79222013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7923
7924 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
7925 tree_to_uhwi throughout.
7926
9439e9a1
RS
79272013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7928
7929 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
7930 tree_low_cst (..., 0) with tree_to_shwi throughout.
7931
cc269bb6
RS
79322013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7933
7934 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
7935 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
7936
9541ffee
RS
79372013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7938
7939 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
7940 host_integerp (..., 0) with tree_fits_shwi_p throughout.
7941
c02065fc
AH
79422013-11-15 Aldy Hernandez <aldyh@redhat.com>
7943
7944 * c-cilkplus.c: New file.
7945 * c-common.c (readonly_error): Add location argument.
7946 * c-common.h (readonly_error): Same.
7947 (c_finish_cilk_clauses): Protoize.
7948 (c_check_cilk_loop): Same.
7949 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
7950 Do not fail on error_mark_node.
7951 Abstract increment canonicalization to here...
7952 (c_omp_for_incr_canonicalize_ptr): New.
7953 c-pragma.c (init_pragma): Register "simd" pragma.
7954 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
7955 (enum pragma_cilk_clause): New.
7956
9cc65f15
RS
79572013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
7958
7959 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
7960 wchar_type and host_integerp checks.
7961
18f429e2
AM
79622013-11-14 Andrew MacLeod <amacleod@redhat.com>
7963
7964 * c-common.c: Likewise.
7965 * c-gimplify.c: Likewise.
7966 * cilk.c: Likewise.
7967
d8a2d370
DN
79682013-11-14 Diego Novillo <dnovillo@google.com>
7969
7970 * c-common.c: Include fold-const.h.
7971 Include stor-layout.h.
7972 Include calls.h.
7973 Include stringpool.h.
7974 Include attribs.h.
7975 Include varasm.h.
7976 Include trans-mem.h.
7977 * c-cppbuiltin.c: Include stor-layout.h.
7978 Include stringpool.h.
7979 * c-format.c: Include stringpool.h.
7980 * c-lex.c: Include stringpool.h.
7981 Include stor-layout.h.
7982 * c-pragma.c: Include stringpool.h.
7983 Include attribs.h.
7984 Include varasm.h.
7985 Include gcc-symtab.h.
7986 * c-pretty-print.c: Include stor-layout.h.
7987 Include attribs.h.
7988 * cilk.c: Include stringpool.h.
7989 Include calls.h.
7990
38b7bc7f
JM
79912013-11-13 Joseph Myers <joseph@codesourcery.com>
7992
7993 * c-common.h (enum rid): Add RID_AUTO_TYPE.
7994 * c-common.c (c_common_reswords): Add __auto_type.
7995 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
7996
45b0be94
AM
79972013-11-12 Andrew MacLeod <amacleod@redhat.com>
7998
18f429e2
AM
7999 * c-common.c: Include gimplify.h.
8000 * c-gimplify.c: Likewise.
8001 * cilk.c: Likewise.
8002 * c-omp.c: Include gimple-expr.h instead of gimple.h.
8003 * c-ubsan.c: Don't include gimple.h.
45b0be94 8004
582d9b50
JM
80052013-11-12 Joseph Myers <joseph@codesourcery.com>
8006
8007 * c-common.c (c_common_reswords): Add _Thread_local.
8008
6b28e197
JM
80092013-11-09 Joseph Myers <joseph@codesourcery.com>
8010
8011 * c-common.c (atomic_size_supported_p): New function.
8012 (resolve_overloaded_atomic_exchange)
8013 (resolve_overloaded_atomic_compare_exchange)
8014 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
8015 Use it instead of comparing size with a local list of sizes.
8016
267bac10
JM
80172013-11-07 Andrew MacLeod <amacleod@redhat.com>
8018 Joseph Myers <joseph@codesourcery.com>
8019
8020 * c-common.h (enum rid): Add RID_ATOMIC.
8021 * c-common.c (c_common_reswords): Add _Atomic.
8022 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
8023 (keyword_is_type_qualifier): Accept RID_ATOMIC.
8024 * c-format.c (check_format_types): Check for extra _Atomic
8025 qualifiers in format argument.
8026 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
8027 (pp_c_type_qualifier_list): Mention _Atomic in comment.
8028
5157b91e
TB
80292013-11-06 Tobias Burnus <burnus@net-b.de>
8030
8031 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
8032
6dbe0958
JM
80332013-11-06 Joseph Myers <joseph@codesourcery.com>
8034
8035 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
8036 standards modes.
8037 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
8038 to mean lack of IEEE 754 support.
8039
e8ff5196
TB
80402013-11-05 Tobias Burnus <burnus@net-b.de>
8041
8042 * c.opt (-Wdate-time): New option
8043 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
8044
254a0760
JM
80452013-11-05 Joseph Myers <joseph@codesourcery.com>
8046
8047 * c-cppbuiltin.c (cpp_iec_559_value): Test
8048 flag_excess_precision_cmdline not flag_excess_precision.
8049
6d7f7e0a
TB
80502013-11-05 Tobias Burnus <burnus@net-b.de>
8051
8052 * c.opt (fopenmp-simd): New option.
8053 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
8054 (omp_pragmas): ... this new struct.
8055 (c_pp_lookup_pragma): Also walk omp_pragmas.
8056 (init_pragma): Init pragmas for -fopenmp-simd.
8057
55a7f02f
MP
80582013-11-04 Marek Polacek <polacek@redhat.com>
8059
8060 PR c++/58979
8061 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
8062
9193fb05
JM
80632013-11-04 Joseph Myers <joseph@codesourcery.com>
8064
8065 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
8066 New functions.
8067 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
8068
94159ecf
EB
80692013-11-04 Eric Botcazou <ebotcazou@adacore.com>
8070
8071 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
8072 (dump_ada_specs): Adjust prototype of second callback.
8073 * c-ada-spec.c (cpp_check): New global variable.
8074 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
8075 (print_generic_ada_decl): Likewise.
8076 (has_static_fields): Change return type to bool and add guard.
8077 (has_nontrivial_methods): New predicate.
8078 (is_tagged_type): Change return type to bool.
8079 (separate_class_package): Call has_nontrivial_methods.
8080 (pp_ada_tree_identifier): Minor tweaks.
8081 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
8082 (dump_ada_array_domains): Likewise.
8083 (dump_ada_array_type): Likewise.
8084 (dump_template_types): Remove cpp_check parameter and do not pass it to
8085 dump_generic_ada_node.
8086 (dump_ada_template): Likewise.
8087 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
8088 recursively.
8089 (print_ada_methods): Change return type to integer. Remove cpp_check
8090 parameter and do not pass it down.
8091 (dump_nested_types): Remove cpp_check parameter and do not pass it to
8092 dump_generic_ada_node.
8093 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
8094 accessing methods.
8095 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
8096 down. Use has_nontrivial_methods to recognize C++ classes. Use return
8097 value of print_ada_methods.
8098 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
8099 Set cpp_check to it before invoking dump_ada_nodes.
8100 (dump_ada_specs): Likewise.
8101
b906f4ca
MP
81022013-11-03 Marek Polacek <polacek@redhat.com>
8103
8104 * c-ubsan.c: Don't include hash-table.h.
8105 (ubsan_instrument_vla): New function.
8106 * c-ubsan.h: Declare it.
8107
5e20cdc9
DM
81082013-10-31 David Malcolm <dmalcolm@redhat.com>
8109
8110 Automated part of renaming of symtab_node_base to symtab_node.
8111
8112 Patch autogenerated by rename_symtab.py from
8113 https://github.com/davidmalcolm/gcc-refactoring-scripts
8114 revision 58bb219cc090b2f4516a9297d868c245495ee622
8115
8116 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
8117 symtab_node_base to symtab_node.
8118
7057e645
ESR
81192013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
8120
8e745a17 8121 Implement C++14 digit separators.
7057e645
ESR
8122 * c-lex.c (interpret_float): Remove digit separators from scratch string
8123 before building real literal.
8124
193ea7bc
JJ
81252013-10-30 Jakub Jelinek <jakub@redhat.com>
8126
8127 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
8128
939b37da
BI
81292013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
8130
8131 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
8132 fields.
8133 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
8134 enabled.
8135 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
8136 (insert_cilk_frame): New prototype.
8137 (cilk_init_builtins): Likewise.
8138 (gimplify_cilk_spawn): Likewise.
8139 (c_cilk_install_body_w_frame_cleanup): Likewise.
8140 (cilk_detect_spawn_and_unwrap): Likewise.
8141 (cilk_set_spawn_marker): Likewise.
8142 (build_cilk_sync): Likewise.
8143 (build_cilk_spawn): Likewise.
8144 * cilk.c: New file.
8145
67348ccc
DM
81462013-10-29 David Malcolm <dmalcolm@redhat.com>
8147
8148 Patch autogenerated by refactor_symtab.py from
8149 https://github.com/davidmalcolm/gcc-refactoring-scripts
8150 revision 58bb219cc090b2f4516a9297d868c245495ee622
8151
8152 * c-gimplify.c (c_genericize): Update for conversion of symtab types
8153 to a true class hierarchy.
8154 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
8155
d570872d
RS
81562013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
8157
8158 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
8159
98906124
JL
81602013-10-26 Jeff Law <law@redhat.com>
8161
adfac8df
JJ
8162 * c-common.c (c_define_builtins): Remove mudflap support.
8163 * c.opt: Ignore and warn for mudflap options.
98906124 8164
d73749df 81652013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
8166
8167 PR other/33426
8168 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
8169 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
8170
3f04b1bb
JM
81712013-10-23 Jason Merrill <jason@redhat.com>
8172
8173 * c-format.c (gcc_cxxdiag_char_table): Add %X.
8174
acf0174b
JJ
81752013-10-11 Jakub Jelinek <jakub@redhat.com>
8176
acd15a28
JJ
8177 * c-common.h (omp_clause_mask::operator !=): New method.
8178 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
8179 instead of if (mask & something) tests everywhere.
8180
acf0174b
JJ
8181 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
8182 201307 instead of 201107.
8183 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
8184 (c_common_attribute_table): Add "omp declare target" and
8185 "omp declare simd" attributes.
8186 (handle_omp_declare_target_attribute,
8187 handle_omp_declare_simd_attribute): New functions.
8188 * c-omp.c: Include c-pragma.h.
8189 (c_finish_omp_taskgroup): New function.
8190 (c_finish_omp_atomic): Add swapped argument, if true,
8191 build the operation first with rhs, lhs arguments and use NOP_EXPR
8192 build_modify_expr.
8193 (c_finish_omp_for): Add code argument, pass it down to make_code.
8194 (c_omp_split_clauses): New function.
8195 (c_split_parallel_clauses): Removed.
8196 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
8197 c_omp_declare_simd_clauses_to_decls): New functions.
8198 * c-common.h (omp_clause_mask): New type.
8199 (OMP_CLAUSE_MASK_1): Define.
8200 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
8201 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
8202 omp_clause_mask::operator |, omp_clause_mask::operator &,
8203 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
8204 omp_clause_mask::operator ==): New methods.
8205 (enum c_omp_clause_split): New.
8206 (c_finish_omp_taskgroup): New prototype.
8207 (c_finish_omp_atomic): Add swapped argument.
8208 (c_finish_omp_for): Add code argument.
8209 (c_omp_split_clauses): New prototype.
8210 (c_split_parallel_clauses): Removed.
8211 (c_omp_declare_simd_clauses_to_numbers,
8212 c_omp_declare_simd_clauses_to_decls): New prototypes.
8213 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
8214 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
8215 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
8216 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
8217 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
8218 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
8219 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
8220 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
8221 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
8222 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
8223 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
8224 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
8225 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
8226 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
8227 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
8228 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
8229 PRAGMA_OMP_CLAUSE_UNIFORM.
8230
826cacfe
MG
82312013-10-09 Marc Glisse <marc.glisse@inria.fr>
8232
8233 PR tree-optimization/20318
8234 * c-common.c (handle_returns_nonnull_attribute): New function.
8235 (c_common_attribute_table): Add returns_nonnull.
8236
2284b034
MG
82372013-10-03 Marc Glisse <marc.glisse@inria.fr>
8238
8239 PR c++/19476
8240 * c.opt (fcheck-new): Move to common.opt.
8241
b56e9788
MP
82422013-09-25 Marek Polacek <polacek@redhat.com>
8243 Jakub Jelinek <jakub@redhat.com>
8244
8245 PR sanitizer/58413
8246 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
8247 an expression if we can prove it is correct.
8248 (ubsan_instrument_division): Likewise. Remove unnecessary
8249 check.
8250
ce6923c5
MP
82512013-09-18 Marek Polacek <polacek@redhat.com>
8252
8253 PR sanitizer/58411
8254 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
8255 Declare it.
8256 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
8257
fb5610fb
IS
82582013-09-14 Iain Sandoe <iain@codesourcery.com>
8259
8260 PR target/48094
8261 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
8262 fobjc-gc, freplace-objc-classes): Accept for LTO.
8263
88b0e79e
JC
82642013-09-13 Jacek Caban <jacek@codeweavers.com>
8265
8266 * c-target.def: New hook
8267
c9b0866a
PC
82682013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
8269
8270 PR c++/43452
8271 * c.opt (Wdelete-incomplete): Add.
8272
0af94e6f
JR
82732013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
8274
8275 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
8276 (vector_types_compatible_elements_p): New function.
8277 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
8278 declaration.
8279 (vector_types_compatible_elements_p): Declare.
8280
7c26172c
GDR
82812013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8282
8283 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
8284 a virtual member function.
8285 (pp_simple_type_specifier): Remove.
8286 (pp_c_type_specifier): Likewise.
8287 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
8288 Rename from pp_c_type_specifier. Adjust.
8289 (c_pretty_printer::c_pretty_printer): Do not assign to
8290 simple_type_specifier.
8291
20059c8b
GDR
82922013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8293
8294 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
8295 member function.
8296 (c_pretty_printer::storage_class_specifier): Likewise.
8297 (c_pretty_printer::initializer): Likewise.
8298 (pp_declaration): Remove.
8299 (pp_declaration_specifiers): Likewise.
8300 (pp_abstract_declarator): Likewise.
8301 (pp_declarator): Likewise.
8302 (pp_type_id): Likewise.
8303 (pp_statement): Likewise.
8304 (pp_constant): Likewise.
8305 (pp_id_expression): Likewise.
8306 (pp_primary_expression): Likewise.
8307 (pp_unary_expression): Likewise.
8308 (pp_multiplicative_expression): Likewise.
8309 (pp_conditional_expression): Likewise.
8310 (pp_assignment_expression): Likewise.
8311 (pp_expression): Likewise.
8312 (pp_c_type_id): Likewise.
8313 (pp_c_storage_class_specifier): Likewise.
8314 * c-pretty-print.c (pp_c_type_cast): Tidy.
8315 (pp_c_pointer): Likewise.
8316 (pp_c_type_specifier): Likewise.
8317 (pp_c_parameter_type_list): Likewise.
8318 (pp_c_function_definition): Likewise.
8319 (pp_c_init_declarator): Likewise.
8320 (pp_c_initializer_list): Likewise.
8321 (pp_c_constructor_elts): Likewise.
8322 (c_pretty_printer::direct_abstract_declarator): Likewise.
8323 (c_pretty_printer::declaration_specifiers): Likewise.
8324 (c_pretty_printer::primary_expression): Likewise.
8325 (c_pretty_printer::postfix_expression): Likewise.
8326 (c_pretty_printer::type_id): Rename from pp_c_type_id.
8327 (c_pretty_printer::storage_class_specifier): Rename from
8328 pp_c_storage_class_specifier.
8329 (c_pretty_printer::initializer): Rename from pp_c_initializer.
8330 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
8331 storage_class_specifier, initializer, offset_list, flags.
8332
de5a5fa1
MP
83332013-08-30 Marek Polacek <polacek@redhat.com>
8334
8335 * c-ubsan.c: New file.
8336 * c-ubsan.h: New file.
8337
8f0e4d72
GDR
83382013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
8339
8340 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
8341 member function.
8342 (c_pretty_printer::declaration_specifiers): Likewise.
8343 (c_pretty_printer::declarator): Likewise.
8344 (c_pretty_printer::abstract_declarator): Likewise.
8345 (c_pretty_printer::direct_abstract_declarator): Likewise.
8346 (c_pretty_printer::direct_declarator): Likewise.
8347 (c_pretty_printer::function_specifier): Likewise.
8348 (pp_declaration): Adjust.
8349 (pp_declaration_specifiers): Likewise.
8350 (pp_abstract_declarator): Likewise.
8351 (pp_direct_declarator): Likewise.
8352 (pp_function_specifier): Likewise.
8353 (pp_direct_abstract_declarator): Remove as unused.
8354 (pp_c_declaration): Remove.
8355 (pp_c_declaration_specifiers): Likewise.
8356 (pp_c_declarator): Likewise.
8357 (pp_c_direct_declarator): Likewise.
8358 (pp_c_function_specifier): Likewise.
8359 (pp_c_direct_abstract_declarator): Likewise.
8360 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
8361 from pp_c_abstract_declarator. Adjust.
ab20d992 8362 (c_pretty_printer::direct_abstract_declarator): Rename from
8f0e4d72
GDR
8363 pp_c_direct_abstract_declarator. Adjust.
8364 (c_pretty_printer::function_specifier): Rename from
8365 pp_c_function_specifier. Adjust.
8366 (c_pretty_printer::declaration_specifiers): Rename from
8367 pp_c_declaration_specifiers. Adjust.
8368 (c_pretty_printer::direct_declarator): Rename from
8369 pp_c_direct_declarator. Adjust.
8370 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
8371 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
8372 (c_pretty_printer::c_pretty_printer): Do not assign to
8373 declaration, declaration_specifiers, declarator,
8374 direct_declarator, direct_abstract_declarator, function_specifier.
8375
00d34d3a
GDR
83762013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
8377
8378 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
8379 virtual member function.
8380 (c_pretty_printer::multiplicative_expression): Likewise.
8381 (c_pretty_printer::conditional_expression): Likewise.
8382 (c_pretty_printer::assignment_expression): Likewise.
8383 (c_pretty_printer::expression): Likewise.
8384 (pp_unary_expression): Adjust.
8385 (pp_multiplicative_expression): Likewise.
8386 (pp_assignment_expression): Likewise.
8387 (pp_conditional_expression): Likewise.
8388 (pp_expression): Likewise.
8389 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
8390 from pp_c_unary_expression. Adjust.
8391 (c_pretty_printer::multiplicative_expression): Rename from
8392 pp_c_multiplicative_expression. Adjust.
8393 (c_pretty_printer::conditional_expression): Rename from
8394 pp_c_conditional_expression. Adjust.
8395 (c_pretty_printer::assignment_expression): Rename from
8396 pp_c_assignment_expression. Adjust.
8397 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
8398 (c_pretty_printer::c_pretty_printer): Do not assign to
8399 unary_expression, multiplicative_expression,
8400 conditional_expression, expression.
8401
fb22178f
GDR
84022013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8403
8404 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
8405 virtual member function.
8406 (pp_postfix_expression): Adjust.
8407 (pp_c_postfix_expression): Remove.
8408 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
8409 from pp_c_postfix_expression. Adjust.
8410 (c_pretty_printer::c_pretty_printer): Do not assign to
8411 postfix_expression.
8412
7ecc2600
GDR
84132013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8414
8415 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
8416 virtua member function.
8417 (pp_primary_expression): Adjust.
8418 (pp_c_primary_expression): Remove.
8419 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
8420 from pp_c_primary_expression. Adjust.
8421 (pp_c_initializer_list): Use pp_primary_expression.
8422 (c_pretty_printer::c_pretty_printer): Do not assign to
8423 primary_expression.
8424
0691175f
GDR
84252013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8426
8427 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
8428 * c-pretty-print.c (M_): Remove.
8429 (c_pretty_printer::translate_string): Define.
8430 (pp_c_type_specifier): Use it.
8431 (pp_c_primary_expression): Likewise.
8432 (pp_c_expression): Likewise.
8433
66dfe4c4
GDR
84342013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
8435
8436 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
8437 virtual function.
8438 (pp_c_id_expression): Remove.
8439 (pp_id_expression): Adjust.
8440 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
8441 pp_c_id_expression. Adjust.
8442 (pp_c_postfix_expression): Use pp_id_expression.
8443 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
8444
ca43e9d5
GDR
84452013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
8446
8447 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
8448 member function.
8449 (pp_constant): Adjust.
8450 (pp_c_constant): Remove.
8451 * c-pretty-print.c (c_pretty_printer::constant): Rename from
8452 pp_c_constant. Adjust.
8453 (pp_c_constant)
8454 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
8455 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
8456
da6ca2b5
GDR
84572013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8458
8459 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
8460 (c_pretty_printer::c_pretty_printer): Declare.
8461 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
8462 c_pretty_printer_init. Adjust.
8463 (print_c_tree): Do not call c_pretty_printer_init.
8464 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
8465
65a372f4
AC
84662013-08-09 Arnaud Charlet <charlet@adacore.com>
8467
8468 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
8469
fd9b0f32
PC
84702013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
8471
8472 PR c++/58080
8473 * c-common.c (pointer_int_sum): Add bool parameter.
8474 * c-common.h (pointer_int_sum): Adjust declaration.
8475
e0aec1e9
GDR
84762013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
8477
8478 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
8479 c_pretty_printer variable.
8480
b066401f
GDR
84812013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8482
8483 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
8484 (pp_base): Remove.
8485 (pp_c_base): Likewise. Adjust users.
8486 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
8487 (pp_c_whitespace): Do not call pp_base.
8488 (pp_c_left_paren): Likewise.
8489 (pp_c_right_paren): Likewise.
8490 (pp_c_left_brace): Likewise.
8491 (pp_c_right_brace): Likewise.
8492 (pp_c_left_bracket): Likewise.
8493 (pp_c_right_bracket): Likewise.
8494 (pp_c_dot): Likewise.
8495 (pp_c_ampersand): Likewise.
8496 (pp_c_star): Likewise.
8497 (pp_c_arrow): Likewise.
8498 (pp_c_semicolon): Likewise.
8499 (pp_c_complement): Likewise.
8500 (pp_c_exclamation): Likewise.
8501 (pp_c_direct_declarator): Likewise.
8502 (pp_c_ws_string): Likewise.
8503 (pp_c_identifier): Likewise.
8504 (pp_c_statement): Likewise.
8505 (print_c_tree): Likewise.
8506
65e5a578
ESR
85072013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
8508
8509 PR c++/58072
8510 * c-common.c (c_parse_error): Catch user-defined literal tokens and
8511 provide useful error strings.
8512
137a1a27
GDR
85132013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8514
8515 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
8516 printer functions instead of pp_string or operators and punctuators.
8517 (dump_generic_ada_node): Likewise.
8518 * c-pretty-print.c (pp_c_type_specifier): Likewise.
8519 (pp_c_relational_expression): Likewise.
8520 (pp_c_logical_or_expression): Likewise.
8521
07838b13
GDR
85222013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8523
8524 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
8525 functions instead of pp_character.
8526 (pp_ada_tree_identifier): Likewise.
8527 (dump_ada_double_name): Likewise.
8528 (dump_ada_function_declaration): Likewise.
8529 (dump_ada_array_domains): Likewise.
8530 (dump_template_types): Likewise.
8531 (dump_generic_ada_node): Likewise.
8532 (print_ada_declaration): Likewise.
8533 (print_ada_struct_decl): Likewise.
8534 * c-pretty-print.c (pp_c_integer_constant): Likewise.
8535
433cc7b0
TT
85362013-07-23 Tom Tromey <tromey@redhat.com>
8537
8538 * c-common.h (enum rid) <RID_GENERIC>: New constant.
8539 * c-common.c (c_common_reswords): Add _Generic.
8540
688010ba
OB
85412013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
8542
8543 * c-common.c: Fix typos.
8544 * c-common.h: Likewise.
8545
2a99e5e6
LL
85462013-07-13 Lubos Lunak <l.lunak@suse.cz>
8547
8548 PR c++/55203
8549 * c-common.c (c_common_attribute_table): Add warn_unused.
8550 (handle_warn_unused_attribute): New.
8551
c26302d5
JJ
85522013-07-10 Jakub Jelinek <jakub@redhat.com>
8553
8554 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
8555 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
8556
dfeadaa0
PC
85572013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
8558
8559 PR c++/57869
8560 * c.opt: Add Wconditionally-supported.
8561
6a2fa4b2
GS
85622013-07-08 Graham Stott <graham.stott@btinternet.com>
8563
adfac8df 8564 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
8565 unused variables l_length and l_node.
8566
ecdbd01a 85672013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
8568
8569 PR c/57821
8570 * c-common.c (complete_array_type): Delay folding first index
8571 like other indices. When folding, check for index overflow.
8572
bedc293e
MG
85732013-06-27 Marc Glisse <marc.glisse@inria.fr>
8574
8575 PR c++/57509
8576 * c-common.h (c_build_vec_perm_expr): New complain argument.
8577 * c-common.c (c_build_vec_perm_expr): Likewise.
8578 Use save_expr also in C++.
8579
604b2bfc
GDR
85802013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8581
8582 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
8583 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
8584 * c-opts.c (c_common_post_options): Likewise.
8585
dfeadaa0 85862013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
8587
8588 * array-notation-common.c (length_mismatch_in_expr): Changed the
8589 parameter type's from a dynamic array to a vec_tree. Also removed
8590 the size parameters.
8591 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
8592 the change above.
8593
2ce86d2e
BI
85942013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
8595
8596 * c-common.h (struct cilkplus_an_parts): New structure.
8597 (struct cilkplus_an_loop_parts): Likewise.
8598 (cilkplus_extract_an_triplets): New prototype.
8599 (fix_sec_implicit_args): Likewise.
8600 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
8601 (fix_sec_implicit_args): Likewise.
604b2bfc 8602
07a6825b
BI
86032013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
8604
8605 * array-notation-common.c (find_inv_trees): Removed an unwanted
8606 typecasting.
8607 * c-common.h (struct inv_list::additional_tcodes): Changed type from
8608 enum rid to enum tree_code.
8609
08346abd
JH
86102013-06-11 Jan Hubicka <jh@suse.cz>
8611
8612 * c-common.c (handle_alias_ifunc_attribute): Do not set
8613 DECL_EXTERNAL for weakref variables.
8614 * c-pragma.c (handle_pragma_weak): Make sure aliases
8615 are not declared as external.
8616
d60f1706
BI
86172013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8618
8619 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
8620 function from c/c-array-notation.c.
8621 (is_cilkplus_reduce_builtin): Likewise.
8622 (find_rank): Likewise.
8623 (extract_array_notation_exprs): Likewise.
8624 (replace_array_notations): Likewise.
8625 (find_inv_trees): Likewise.
8626 (replace_inv_trees): Likewise.
8627 (contains_array_notation_expr): Likewise.
8628 (find_correct_array_notation_type): Likewise.
8629 * c-common.h (struct inv_list): Moved this struct from the file
8630 c/c-array-notation.c and added a new field called additional tcodes.
8631 (length_mismatch_in_expr_p): New prototype.
8632 (is_cilkplus_reduce_builtin): Likewise.
8633 (find_rank): Likewise.
8634 (extract_array_notation_exprs): Likewise.
8635 (replace_array_notation): Likewise.
8636 (find_inv_trees): Likewise.
8637 (replace_inv_trees): Likewise.
8638 (find_correct_array_notation_type): Likewise.
dfeadaa0 8639
36536d79
BI
86402013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8641
8642 * c-common.c (c_define_builtins): When cilkplus is enabled, the
8643 function array_notation_init_builtins is called.
8644 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
8645 * c-common.def (ARRAY_NOTATION_REF): New tree.
8646 * c-common.h (build_array_notation_expr): New function declaration.
8647 (build_array_notation_ref): Likewise.
8648 (extract_sec_implicit_index_arg): New extern declaration.
8649 (is_sec_implicit_index_fn): Likewise.
8650 (ARRAY_NOTATION_CHECK): New define.
8651 (ARRAY_NOTATION_ARRAY): Likewise.
8652 (ARRAY_NOTATION_START): Likewise.
8653 (ARRAY_NOTATION_LENGTH): Likewise.
8654 (ARRAY_NOTATION_STRIDE): Likewise.
8655 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
8656 ARRAY_NOTATION_REF.
8657 (pp_c_expression): Likewise.
8658 * c.opt (flag_enable_cilkplus): New flag.
8659 * array-notation-common.c: New file.
8660
f7716d57
JJ
86612013-05-14 Jakub Jelinek <jakub@redhat.com>
8662
8663 PR c++/57274
8664 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
8665
a5e0cd1d
MG
86662013-05-10 Marc Glisse <marc.glisse@inria.fr>
8667
8668 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
8669 vectors.
8670
f6bc1c4a
HS
86712013-05-07 Han Shen <shenhan@google.com>
8672
8673 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
8674
3f12f6e9
SKS
86752013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
8676
8677 * c-common.c (check_user_alignment): Emit error for negative values.
8678
61949153
PC
86792013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8680
8681 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
8682
e93e18e9
PC
86832013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8684
8685 * c-cppbuiltin.c (c_cpp_builtins): Do not define
8686 __GXX_EXPERIMENTAL_CXX1Y__.
8687
44d90fe1 86882013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 8689 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
8690
8691 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
8692 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
8693 to simply use OPT_Wpointer_arith.
8694 (c_sizeof_or_alignof_type): Likewise.
8695
13f39b2e
PC
86962013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8697
8698 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
8699
4b84d650
JJ
87002013-04-12 Jakub Jelinek <jakub@redhat.com>
8701
8702 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
8703 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
8704 specifiers.
8705
fb037b5d
SB
87062013-04-07 Steven Bosscher <steven@gcc.gnu.org>
8707
8708 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
8709
4e856798
PC
87102013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
8711
8712 * c-common.c (pointer_int_sum): Remove dead code.
8713
4b1baac8
RS
87142013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
8715
8716 PR middle-end/56524
8717 * c-common.c (handle_optimize_attribute): Don't call
8718 save_optabs_if_changed.
8719
0b50e654
JJ
87202013-03-05 Jakub Jelinek <jakub@redhat.com>
8721
8722 PR middle-end/56461
8723 * c-pch.c (pch_init): Free target_validity at the end.
8724
48c41403
JJ
87252013-03-04 Jakub Jelinek <jakub@redhat.com>
8726
8727 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
8728
e664c61c
KS
87292013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
8730 Jakub Jelinek <jakub@redhat.com>
8731
8732 PR sanitizer/56454
8733 * c-common.c (handle_no_sanitize_address_attribute): New function.
8734 (c_common_attribute_table): Add no_sanitize_address attribute.
8735 (handle_no_address_safety_analysis_attribute): Add
8736 no_sanitize_address attribute, not no_address_safety_analysis
8737 attribute.
8738
a475fd3d 87392013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
8740
8741 PR target/52555
8742 * c-common.c (handle_optimize_attribute): Call
8743 save_optabs_if_changed.
8744
f6007d99
JJ
87452013-02-18 Jakub Jelinek <jakub@redhat.com>
8746 Steven Bosscher <steven@gcc.gnu.org>
8747
8748 PR pch/54117
8749 * c-opts.c (c_common_post_options): If debug info is enabled
8750 and non-dwarf*, refuse to load PCH files and when writing PCH
8751 file warn.
8752
cf35e2b1
JJ
87532013-02-05 Jakub Jelinek <jakub@redhat.com>
8754
8755 PR middle-end/56167
8756 * c-common.c (handle_error_attribute): Fix condition.
8757
32887460
JJ
87582013-01-30 Jakub Jelinek <jakub@redhat.com>
8759
8760 PR c++/55742
8761 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
8762
5af057d8
JM
87632013-01-18 Jason Merrill <jason@redhat.com>
8764
8765 PR target/54908
8766 * c.opt (-fextern-tls-init): New.
8767 * c-opts.c (c_common_post_options): Handle it.
8768
cc83c823
JJ
87692013-01-09 Jakub Jelinek <jakub@redhat.com>
8770
8771 PR c/48418
8772 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
8773 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
8774 and is either negative or bigger or equal to type precision
8775 of the first operand.
8776
a859517f
MP
87772012-12-03 Marek Polacek <polacek@redhat.com>
8778
8779 PR c/55570
8780 * c-common.c (check_user_alignment): Swap order of tests,
8781 check TREE_CODE first.
8782
2d7aa578
ESR
87832012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
8784
8785 PR c++/52654
8786 * c-common.h (overflow_type): New enum.
8787 (build_userdef_literal): Add overflow_type argument.
8788 (tree_userdef_literal): Add overflow_type.
8789 (USERDEF_LITERAL_OVERFLOW): New access macro.
8790 * c-common.c (build_userdef_literal): Add overflow_type
8791 argument.
8792 * c-lex.c (c_lex_with_flags): Add overflow_type to
8793 build_userdef_literal calls.
8794 (interpret_integer, interpret_float): Add overflow_type argument.
8795
cc3c4f62
RB
87962012-11-28 Richard Biener <rguenther@suse.de>
8797
8798 PR c/35634
8799 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
8800 here and use a type with proper overflow behavior for types that would
8801 need to be promoted for the arithmetic.
8802
77bc5132
JJ
88032012-11-23 Jakub Jelinek <jakub@redhat.com>
8804
8805 PR sanitizer/55435
8806 * c-common.c (handle_no_address_safety_analysis_attribute): New
8807 function.
8808 (c_common_attribute_table): Add no_address_safety_analysis.
8809
5dc99c46
SB
88102012-11-16 Simon Baldwin <simonb@google.com>
8811
8812 * c.opt: Add f[no-]canonical-system-headers.
8813 * c-opts.c (c_common_handle_option): Handle
8814 OPT_fcanonical_system_headers.
8815
a4a0016d
ESR
88162012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
8817
8818 PR c++/54413
8819 * c-opts.c (c_common_handle_option): Set new flags.
8820 * c.opt: Describe new flags.
8821
7dbb85a7
JM
88222012-11-09 Jason Merrill <jason@redhat.com>
8823
8824 * c.opt (Wabi-tag): New.
8825
ad7bac31
AK
88262012-11-09 Andi Kleen <ak@linux.intel.com>
8827
8828 PR 55139
8829 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 8830 MEMMODEL_MASK
ad7bac31 8831
7332899a
MLI
88322012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8833
8834 PR c/53063
8835 * c.opt (Wformat): Make it Alias Wformat=1.
8836 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
8837 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
8838 LangEnabledBy.
8839 (Wformat=): RejectNegative. Use LangEnabledBy.
8840 (Wnonnull): Use LangEnabledBy.
8841 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
8842 * c-format.c (set_Wformat): Delete.
8843 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
ab20d992
JJ
8844 (maybe_read_dollar_number): Likewise.
8845 (avoid_dollar_number): Likewise.
8846 (finish_dollar_format_checking): Likewise.
8847 (check_format_info): Likewise.
8848 (check_format_info_main): Likewise.
8849 (check_format_types): Likewise.
8850 (format_type_warning): Likewise.
8851 * c-common.c (int): Likewise.
8852 (check_function_sentinel): Likewise.
8e745a17 8853 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 8854
34a180a6
MLI
88552012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8856
8857 PR c/53063
8858 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
8859 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
8860 Use LangEnabledBy.
8861 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
8862 common.opt.
8863 (Wvariadic-macros): Init(1).
8864 * c-opts.c (c_common_handle_option): Do not handle them
8865 explicitly.
8866 (c_common_post_options): Likewise.
8867 (sanitize_cpp_opts): warn_unused_macros is now
8868 cpp_warn_unused_macros.
8869 (push_command_line_include): Likewise.
8870 * c-common.c (warn_unknown_pragmas): Do not define.
8871 * c-common.h (warn_unknown_pragmas): Do not declare.
8872
3f46d6a5
MLI
88732012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8874
8875 PR c/51294
8876 * c-common.c (conversion_warning): Handle conditional expressions.
8877
880661a4
JW
88782012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
8879
8880 PR c++/54930
8881 * c.opt (Wreturn_local_addr): Define new option.
8882
4514a96b
JM
88832012-10-25 Jason Merrill <jason@redhat.com>
8884
f14edc1a
JM
8885 * c.opt (Wvirtual-move-assign): New.
8886
4514a96b
JM
8887 * c.opt (Winherited-variadic-ctor): New.
8888
93100c6b
MG
88892012-10-25 Marc Glisse <marc.glisse@inria.fr>
8890
8891 PR c++/54427
8892 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
8893
1efcb8c6
JM
88942012-10-23 Joseph Myers <joseph@codesourcery.com>
8895
8896 * c-common.h (pch_cpp_save_state): Declare.
8897 * c-target.def (c_preinclude): New hook.
8898 * c-opts.c (done_preinclude): New.
8899 (push_command_line_include): Handle default preincluded header.
8900 (cb_file_change): Call pch_cpp_save_state when calling
8901 push_command_line_include.
8902 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
8903 (pch_cpp_save_state): New.
8904 (pch_init): Call pch_cpp_save_state conditionally, instead of
8905 calling cpp_save_state.
8906
4a0ae68e
MLI
89072012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
8908
8909 PR c/53063
8910 PR c/40989
8911 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
8912 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
8913 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
8914 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
8915 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
8916 * c-opts.c (c_common_handle_option): Remove explicit handling from
8917 here.
8918 (c_common_post_options): Likewise.
8919
67e4210b
EB
89202012-10-18 Eric Botcazou <ebotcazou@adacore.com>
8921
8922 * c-ada-spec.c (LOCATION_COL): Delete.
8923 (compare_location): New function.
8924 (compare_node): Use it.
8925 (compare_comment): Likewise.
8926
65d4f2cd
MLI
89272012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
8928
8929 PR c/53063
8930 PR c/40989
8931 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
8932 * c-opts.c (c_common_handle_option): Do not set them here. Add
8933 comment.
8934 (c_common_post_options): Likewise.
8935
909881cb
EB
89362012-10-16 Eric Botcazou <ebotcazou@adacore.com>
8937
8938 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
8939 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
8940 Remove POINTER_TYPE handling, add large unsigned handling and use
8941 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
8942
3a785c97
JJ
89432012-10-12 Jakub Jelinek <jakub@redhat.com>
8944
8945 PR c/54381
8946 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
8947 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
8948 locs and array of 3 trees instead of just single loc and single
8949 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
8950 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
8951 For *cmp* builtins that take two sources strings report warnings
8952 about first and second source, not about destination and source.
8953
5e54f81d
MG
89542012-10-12 Marc Glisse <marc.glisse@inria.fr>
8955
8956 PR c++/53055
8957 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
8958
f5b02f1e
EB
89592012-10-11 Eric Botcazou <ebotcazou@adacore.com>
8960
8961 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
8962 declaring something coming from another file.
8963
b46dbc6c
AC
89642012-10-10 Arnaud Charlet <charlet@adacore.com>
8965
f5b02f1e 8966 PR ada/54845
b46dbc6c
AC
8967 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
8968
5d9de0d0
PC
89692012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
8970
8971 PR c++/54194
8972 * c-common.c (warn_about_parentheses): Add location_t parameter;
8973 use EXPR_LOC_OR_LOC.
8974 * c-common.h: Update declaration.
8975
a212e43f
MG
89762012-10-09 Marc Glisse <marc.glisse@inria.fr>
8977
8978 PR c++/54427
8979 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
8980 more operations. Make error messages optional.
8981 * c-common.h (enum stv_conv): Moved from c-typeck.c.
8982 (scalar_to_vector): Declare.
8983
b1db7f91
JM
89842012-10-08 Jason Merrill <jason@redhat.com>
8985
8986 * c-common.c (c_common_reswords): Add thread_local.
8987
e28d52cf
DS
89882012-10-08 Dodji Seketeli <dodji@redhat.com>
8989
8990 PR c++/53528 C++11 attribute support
8991 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
8992 new functions.
8993 * c-common.c (check_cxx_fundamental_alignment_constraints): New
8994 static function.
8995 (handle_aligned_attribute): In choose strictest alignment
8996 among many. Use new check_cxx_fundamental_alignment_constraints.
8997 (handle_transparent_union_attribute): In c++11 attribute syntax,
8998 don't look through typedefs.
8999
3b78de56
AC
90002012-10-04 Arnaud Charlet <charlet@adacore.com>
9001
9002 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
9003 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
9004 out of dumpfile.h.
9005
6040bb5f
DC
90062012-09-25 Dehao Chen <dehao@google.com>
9007
9008 PR middle-end/54645
3b78de56 9009 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
9010 map when read in the pch.
9011
3f8257db 90122012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
9013
9014 * c-ada-spec.c: Style fixes.
9015
3f8257db 90162012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
9017
9018 * c.opt (-fada-spec-parent): Define new command line switch.
9019 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
9020 is specified, generate binding spec as a child of the specified unit.
9021
0ccb505d
PC
90222012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
9023 Manuel López-Ibáñez <manu@gcc.gnu.org>
9024
9025 PR c++/53210
9026 * c.opt ([Winit-self]): Enabled by -Wall in C++.
9027
c583af79
AC
90282012-08-23 Arnaud Charlet <charlet@adacore.com>
9029
9030 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
9031 for pointers, and add missing Convention C pragma.
9032 (print_ada_struct_decl): Add missing aliased keyword.
9033 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
9034
1a4049e7
JJ
90352012-08-17 Jakub Jelinek <jakub@redhat.com>
9036
9037 * c-common.c (sizeof_pointer_memaccess_warning): New function.
9038 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
9039 * c-opts.c (c_common_handle_option): Enable it for -Wall.
9040 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
9041 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
9042
70b5e7dc
RG
90432012-08-10 Richard Guenther <rguenther@suse.de>
9044
9045 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
9046
f8923f7e
SB
90472012-08-07 Steven Bosscher <steven@gcc.gnu.org>
9048
9049 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
9050 instead of separate pp_newline and pp_flush.
9051 (print_c_tree): Likewise.
9052
e45abe1f
RH
90532012-07-26 Richard Henderson <rth@redhat.com>
9054
9055 * c-common.c (handle_hot_attribute): Allow labels.
9056 (handle_cold_attribute): Likewise.
9057
332f1d24
JJ
90582012-07-20 Jakub Jelinek <jakub@redhat.com>
9059
9060 PR c++/28656
9061 * c-common.c (check_function_nonnull): Handle multiple nonnull
9062 attributes properly.
9063
7ee2468b
SB
90642012-07-16 Steven Bosscher <steven@gcc.gnu.org>
9065
9066 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
9067 * c-ada-spec.c: Likewise.
9068 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
9069
ee7b28eb
SB
90702012-07-14 Steven Bosscher <steven@gcc.gnu.org>
9071
9072 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
9073 Remove code conditional on it.
9074
6bdf3519
SB
90752012-07-11 Steven Bosscher <steven@gcc.gnu.org>
9076
9077 * c-gimplify.c: Do not include basic-block.h.
9078 * c-common.c: Do not include linfuncs.h.
9079
532aafad
SB
90802012-07-08 Steven Bosscher <steven@gcc.gnu.org>
9081
9082 * c-common.h: Include tree.h.
9083
8d0d1915
JM
90842012-07-02 Jason Merrill <jason@redhat.com>
9085
9086 PR c++/53524
9087 * c-common.c (get_priority): Call default_conversion.
9088
fbc873ad
UB
90892012-07-01 Uros Bizjak <ubizjak@gmail.com>
9090
9091 * c-pch.c (c_common_write_pch): Remove unused variables.
9092
d4a10d0a
SB
90932012-06-29 Steven Bosscher <steven@gcc.gnu.org>
9094
9095 * cppspec.c: Moved from gcc/ to here.
9096
6f3a2e23
KT
90972012-06-27 Kai Tietz <ktietz@redhat.com>
9098
9099 PR preprocessor/37215
9100 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
9101
8ca92d04
SB
91022012-06-21 Steven Bosscher <steven@gcc.gnu.org>
9103
9104 * c-common.h (c_common_print_pch_checksum): Remove.
9105 * c-pch.c: Do not include output.h.
9106 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
9107 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
9108 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
9109 (struct c_pch_header): Remove.
9110 (get_ident): Update gpch version.
9111 (pch_init): Do not print executable_checksum to asm_out_file.
9112 Do not fail if there is no asm_out_file to read back from. Set
9113 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
9114 (c_common_write_pch): Verify that nothing was written to asm_out_file
9115 since pch_init was called. Do not write a c_pch_header, and do not
9116 copy from asm_out_file to the PCH.
9117 (c_common_read_pch): Do not read a c_pch_header, and do not restore
9118 the content of asm_out_file from the PCH.
9119 (c_common_print_pch_checksum): Remove.
9120 * c-opts.c (c_common_init): Print out executable_checksum directly.
9121
70f42967
SB
91222012-06-19 Steven Bosscher <steven@gcc.gnu.org>
9123
9124 * c-target.def (objc_declare_unresolved_class_reference,
9125 objc_declare_class_definition): Add new hooks.
9126
a8781821
SB
91272012-06-19 Steven Bosscher <steven@gcc.gnu.org>
9128
9129 * c-lex.c: Do not include output.h.
9130 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
9131 Remove uses of ASM_OUTPUT_IDENT.
9132
9e1a8dd1
RR
91332012-06-15 Marc Glisse <marc.glisse@inria.fr>
9134
9135 PR c++/51033
9136 * c-common.h (c_build_vec_perm_expr): Move decl here.
9137 * c-common.c (c_build_vec_perm_expr): Move definition
9138 here.
9139
6f07a821
SB
91402012-06-06 Steven Bosscher <steven@gcc.gnu.org>
9141
9142 * c.opt (fconserve-space): Turn into a no-op.
9143
9faeb493 91442012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
9145
9146 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
9147 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
9148 both the start and end of the function.
9149
a4b7d13c
SB
91502012-06-04 Steven Bosscher <steven@gcc.gnu.org>
9151
9152 * c-common.c: Do not include output.h.
9153 * c-pragma.c: Likewise.
9154
c265f413
SA
91552012-06-04 Steven Bosscher <steven@gcc.gnu.org>
9156
9157 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
9158 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
9159 (lang_decl_name): Handle namespace decls.
9160
be7a421e
SB
91612012-05-31 Steven Bosscher <steven@gcc.gnu.org>
9162
9163 * c-ada-spec.c: Do not include output.h.
9164 * c-semantics.c: Likewise.
9165
65de6659
JM
91662012-05-29 Joseph Myers <joseph@codesourcery.com>
9167
9168 * c-common.c: Fix typo.
9169
ca5f4331
MM
91702012-05-29 Michael Matz <matz@suse.de>
9171
9172 * c-common.h (c_expand_decl): Remove prototype.
9173
4f7f7aca
MLI
91742012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9175
9176 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
9177 * c-opts.c (c_common_handle_option): Remove code handling
9178 warn_missing_braces.
9179
4a792f9b
PC
91802012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
9181
9182 PR c++/25137
9183 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
9184 -Wmissing_braces.
9185
650dc14a
DS
91862012-05-22 Dodji Seketeli <dodji@redhat.com>
9187
9188 PR c++/53322
9189 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
9190
9b095bf1
MLI
91912012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
9192
9193 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
9194 * c-opts.c (c_common_handle_option): Do not handle explicitly
9195 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
9196
0b2c4be5
DS
91972012-05-16 Dodji Seketeli <dodji@redhat.com>
9198
9199 PR preprocessor/7263
ab20d992 9200 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
0b2c4be5
DS
9201 to cpp_classify_number. For diagnostics, use the precise location
9202 instead of the global input_location.
9203
a1bde5af
PC
92042012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
9205
d02924ef 9206 PR c++/11856
a1bde5af
PC
9207 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
9208
d1ede5f4
BS
92092012-05-14 Bernd Schmidt <bernds@codesourcery.com>
9210
a1bde5af 9211 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 9212
f2bc201f
MLI
92132012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
9214
9215 PR 53063
9216 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
9217 Wreorder): Use LangEnabledBy.
9218 * c-opts.c (c_common_handle_option): Do not enable them
9219 explicitly. Call lang-specific generated functions.
9220 (c_common_post_options): Do not set them here.
9221
95744782
MLI
92222012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
9223
9224 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
9225 Wmissing-field-initializers,Wmissing-parameter-type,
9226 Wold-style-declaration,Woverride-init): Use EnabledBy.
9227 * c-opts.c (c_common_post_options): Do not set here explicitly.
9228
7d5a5747
MLI
92292012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
9230
9231 PR 53063
9232 * c-opts.c (c_common_handle_option): Use handle_generated_option
9233 to enable sub-options.
9234
5a3c9cf2
PC
92352012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
9236
9237 PR c++/53158
9238 * c-common.c (warnings_for_convert_and_check): Use warning_at.
9239
3ac8781c
RG
92402012-05-10 Richard Guenther <rguenther@suse.de>
9241
9242 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
9243 adjust commentary about TYPE_IS_SIZETYPE types.
9244
1e537948
MLI
92452012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9246
9247 PR c++/53261
9248 * c-common.c (warn_logical_operator): Check that argument of
9249 integer_zerop is not NULL.
9250
f2c4a785
MLI
92512012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
9252
9253 PR c/43772
9254 * c-common.c (warn_logical_operator): Do not warn if either side
9255 is already true or false.
9256
50f305ca
MLI
92572012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
9258
9259 PR c/51712
9260 * c-common.c (expr_original_type): New.
9261 (shorten_compare): Do not warn for enumeration types.
9262
0c3641b0
MLI
92632012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
9264
9265 * c.opt (fpermissive): Add Var(flag_permissive).
9266
7edaa4d2
MG
92672012-04-30 Marc Glisse <marc.glisse@inria.fr>
9268
9269 PR c++/51033
9270 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
9271 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
9272
b9c8da34
DS
92732012-04-30 Dodji Seketeli <dodji@redhat.com>
9274
9275 Add -Wvarargs option
ab20d992 9276 * c.opt (Wvarargs): Define new option.
b9c8da34 9277
e6c69da0
MLI
92782012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9279
9280 * c-common.c (check_function_arguments): Replace
9281 Wmissing-format-attribute with Wsuggest-attribute=format.
9282
90137d8f
MLI
92832012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9284
9285 * c.opt (Wsuggest-attribute=format): New. Alias of
9286 Wmissing-format-attribute.
9287 * c-format.c (decode_format_type): Replace
9288 Wmissing-format-attribute with Wsuggest-attribute=format.
9289 (check_function_format): Likewise.
9290
9faeb493 92912012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
9292
9293 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
9294 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
9295 * c.opt: Add Wliteral-suffix.
9296
c1771a20
MLI
92972012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
9298
9299 PR c/44774
9300 * c.opt (Wpedantic): New.
9301 (pedantic): Alias Wpedantic.
9302 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
9303 (c_common_post_options): Likewise.
9304 (sanitize_cpp_opts): Likewise.
9305 * c-lex.c (interpret_float): Likewise.
9306 * c-format.c (check_format_types): Likewise.
9307 * c-common.c (pointer_int_sum): Likewise.
9308 (c_sizeof_or_alignof_type): Likewise.
9309 (c_add_case_label): Likewise.
9310 (c_do_switch_warnings): Likewise.
9311 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
9312
04b391c1
JM
93132012-04-15 Jason Merrill <jason@redhat.com>
9314
9315 PR c++/52818
9316 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
9317 (C_STD_NAME): Distinguish between C++98 and C++11.
9318
ac868f29
EB
93192012-04-11 Eric Botcazou <ebotcazou@adacore.com>
9320
9321 PR target/52624
9322 * c-common.h (uint16_type_node): Rename into...
9323 (c_uint16_type_node): ...this.
9324 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
9325 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
9326
fd4116f4
MLI
93272012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
9328
9329 * c-common.c (warn_if_unused_value): Move definition to here.
9330 * c-common.h (warn_if_unused_value): Move declaration to here.
9331
573ac65e
WB
93322012-03-23 William Bader <williambader@hotmail.com>
9333
9334 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
9335
552b8185
JM
93362012-03-20 Jason Merrill <jason@redhat.com>
9337
9338 * c-common.h (enum cxx_dialect): Add cxx1y.
9339 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
9340 test.
9341 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
9342 * c-opts.c (c_common_post_options): Likewise.
9343 (set_std_cxx1y): New.
9344 (c_common_handle_option): Call it.
9345 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
9346
04398fa8
PC
93472012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
9348
9349 PR c++/14710
9350 * c.opt ([Wuseless-cast]): Add.
9351
d2a12ae7
RG
93522012-03-16 Richard Guenther <rguenther@suse.de>
9353
9354 * c-pretty-print.c (pp_c_initializer_list): Adjust.
9355
a12bf402
MLI
93562012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9357
9358 PR c++/44783
9359 * c.opt (ftemplate-backtrace-limit) Add.
9360
5c30094f
RO
93612012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9362
9363 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
9364 handling.
9365 * c-pragma.c (handle_pragma_extern_prefix): Remove.
9366 (init_pragma): Don't register extern_prefix.
9367
21fa2faf
RG
93682012-03-12 Richard Guenther <rguenther@suse.de>
9369
9370 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
9371 (builtin_type_for_size): Likewise.
9372
e3793c6f
JJ
93732012-02-13 Jakub Jelinek <jakub@redhat.com>
9374
9375 PR c++/52215
9376 * c-common.c (sync_resolve_params): Don't decide whether to convert
9377 or not based on TYPE_SIZE comparison, convert whenever arg_type
9378 is unsigned INTEGER_TYPE.
9379
93286335
PC
93802012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
9381
9382 PR c/52118
9383 * c.opt ([Wunused-local-typedefs]): Fix description.
9384
7a421706
MS
93852012-01-24 Mike Stump <mikestump@comcast.net>
9386
9387 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
9388 exactly.
9389
ba9b1f11
RG
93902012-01-18 Richard Guenther <rguenther@suse.de>
9391
9392 * c-opts.c (c_common_post_options): Reset LTO flags if
9393 we are about to generate a PCH.
9394
465406be
PC
93952012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
9396
9397 PR c++/51777
9398 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
9399 use pp_unsigned_wide_integer.
9400
aee15221
RG
94012012-01-10 Richard Guenther <rguenther@suse.de>
9402
9403 PR middle-end/51806
9404 * c-opts.c (c_common_handle_option): Move -Werror handling
9405 to language independent code.
9406
5720c0dc
RG
94072012-01-05 Richard Guenther <rguenther@suse.de>
9408
9409 PR middle-end/51764
9410 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
9411 from common.opt.
9412
73ac190a
PC
94132011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
9414
9415 PR c++/51316
9416 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
9417 of array types with an unknown bound.
9418
48b0b196
JM
94192011-12-20 Joseph Myers <joseph@codesourcery.com>
9420
9421 * c-common.c (flag_isoc99): Update comment to refer to C11.
9422 (flag_isoc1x): Change to flag_isoc11.
9423 * c-common.h (flag_isoc99): Update comment to refer to C11.
9424 (flag_isoc1x): Change to flag_isoc11.
9425 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
9426 C11.
9427 * c-opts.c (set_std_c1x): Change to set_std_c11.
9428 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
9429 Call set_std_c11.
9430 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
9431 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
9432 * c.opt (std=c1x): Change to std=c11. Document as non-draft
9433 standard.
9434 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
9435 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
9436 (std=gnu1x): Make alias of std=gnu11.
9437
d58d6eb5
JM
94382011-12-19 Jason Merrill <jason@redhat.com>
9439
9440 PR c++/51228
9441 * c-common.c (handle_transparent_union_attribute): Check the first
9442 field if the type is complete.
9443
b3908fcc
JW
94442011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
9445
9446 PR libstdc++/51365
9447 * c-common.c (RID_IS_FINAL): Add.
9448 * c-common.h (RID_IS_FINAL): Add.
9449
fea3ca91
IS
94502011-11-30 Iain Sandoe <iains@gcc.gnu.org>
9451
9452 * c.opt (fgnu-runtime): Provide full description.
9453 (fnext-runtime): Likewise.
9454 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
9455
62bad7cd
AM
94562011-11-28 Andrew MacLeod <amacleod@redhat.com>
9457
9458 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
9459 predefines in one place. Add LOCK_FREE predefines.
9460 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
9461 new func.
9462
c466c4ff
AM
94632011-11-24 Andrew MacLeod <amacleod@redhat.com>
9464
9465 PR c/51256
9faeb493 9466 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 9467 conditions
9faeb493
UB
9468 (resolve_overloaded_atomic_exchange,
9469 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
9470 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
9471 error_mark_node for error conditions.
9faeb493 9472
a5952633
RG
94732011-11-08 Richard Guenther <rguenther@suse.de>
9474
9475 PR middle-end/51010
ab20d992 9476 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
a5952633 9477
0a35513e
AH
94782011-11-07 Richard Henderson <rth@redhat.com>
9479 Aldy Hernandez <aldyh@redhat.com>
9480 Torvald Riegel <triegel@redhat.com>
9481
9482 Merged from transactional-memory.
9483
9484 * c-common.c (handle_tm_wrap_attribute,
9485 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
9486 (struct c_common_reswords): Added __transaction* keywords.
9487 (struct c_common_attribute_table): Added transaction* and tm_regparm
9488 attributes.
9489 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
9490 masks.
9491 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
9492 find_tm_attribute): Declare.
9493
6d87092d
JM
94942011-11-07 Jason Merrill <jason@redhat.com>
9495
9496 PR c++/35688
9497 * c-common.c, c-common.h: Revert yesterday's changes.
9498
8e7860a1
JM
94992011-11-06 Jason Merrill <jason@redhat.com>
9500
9501 PR c++/35688
9502 * c-common.c (decl_has_visibility_attr): Split out from...
9503 (c_determine_visibility): ...here.
9504 * c-common.h: Declare it.
9505
d19fa6b5
JM
95062011-11-06 Joseph Myers <joseph@codesourcery.com>
9507
9508 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
9509 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
9510 type.
9511 (check_user_alignment): New. Split out of
9512 handle_aligned_attribute. Disallow integer constants with
9513 noninteger types. Conditionally allow zero.
9514 (handle_aligned_attribute): Use check_user_alignment.
9515 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
9516
86951993
AM
95172011-11-06 Andrew MacLeod <amacleod@redhat.com>
9518 Richard Henderson <rth@redhat.com>
9519
9520 Merged from cxx-mem-model.
9521
9522 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 9523 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
9524 parameters that are the same type size.
9525 (get_atomic_generic_size): New. Find size of generic
9526 atomic function parameters and do typechecking.
9527 (add_atomic_size_parameter): New. Insert size into parameter list.
9528 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
9529 either __atomic_exchange_n or external library call.
9faeb493 9530 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 9531 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 9532 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
9533 __atomic_load_n or an external library call.
9534 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
9535 __atomic_store_n or an external library call.
9536 (resolve_overloaded_builtin): Handle new __atomic builtins.
9537
cf9e9959
EB
95382011-11-04 Eric Botcazou <ebotcazou@adacore.com>
9539
9540 PR c++/50608
9541 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
9542 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
9543 <INDIRECT_REF>: Return the argument.
9544 <ARRAY_REF>: Remove special code for negative offset.
9545 Call fold_build_pointer_plus instead of size_binop.
9546 (fold_offsetof): Remove STOP_REF argument and adjust.
9547 * c-common.h (fold_offsetof_1): Declare.
9548 (fold_offsetof): Remove STOP_REF argument.
9549
25339f10
JM
95502011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
9551
9552 PR c++/50810
9553 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
9554 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
9555 Wnarrowing for C++0x and C++98.
9556 * c.opt ([Wnarrowing]): Update.
9557
89401152
PC
95582011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
9559
9560 PR c++/44277
9561 * c.opt: Add Wzero-as-null-pointer-constant.
9562
97e3ad20
JM
95632011-10-31 Jason Merrill <jason@redhat.com>
9564
15694fdd
JM
9565 * c.opt (-fdeduce-init-list): Off by default.
9566
97e3ad20
JM
9567 PR c++/50920
9568 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
9569 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
9570 and -Wc++11-compat.
9571 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
9572
fb9120e3
RAV
95732011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
9574
9575 PR c++/30066
9576 * c.opt (fvisibility-inlines-hidden): Description change.
9577
3ce4f9e4
ESR
95782011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
9579
9580 Implement C++11 user-defined literals.
9581 * c-common.c (build_userdef_literal): New.
9582 * c-common.def: New tree code.
9583 * c-common.h (tree_userdef_literal): New tree struct and accessors.
9584 * c-lex.c (interpret_float): Add suffix parm.
9585 (c_lex_with_flags): Build literal tokens.
9586
5f53c243
PC
95872011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
9588
9589 PR c++/50841
9590 Revert:
9591 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
9592
9593 PR c++/50810
9594 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
9595 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
9596 Wnarrowing for C++0x and C++98.
9597 * c.opt ([Wnarrowing]): Update.
9598
263734e1
PC
95992011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
9600
9601 PR c++/50810
9602 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
9603 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
9604 Wnarrowing for C++0x and C++98.
9605 * c.opt ([Wnarrowing]): Update.
9606
d2e312d7
PC
96072011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
9608
9609 PR c++/45385
9610 * c-common.c (conversion_warning): Remove code looking for
9611 artificial operands.
9612
d17687f6
DS
96132011-10-18 Dodji Seketeli <dodji@redhat.com>
9614
9615 PR bootstrap/50760
9616 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 9617 !NO_IMPLICIT_EXTERN_C.
d17687f6 9618
fc8396e9
PC
96192011-10-17 Michael Spertus <mike_spertus@symantec.com>
9620
9621 * c-common.c (c_common_reswords): Add __bases,
9622 __direct_bases.
9623 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
9624
96252011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
9626
9627 PR c++/50757
9628 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
9629
847e697a
TT
96302011-10-15 Tom Tromey <tromey@redhat.com>
9631 Dodji Seketeli <dodji@redhat.com>
9632
9633 * c.opt (fdebug-cpp): New option.
9634 * c-opts.c (c_common_handle_option): Handle the option.
9635 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
9636 output stream in parameter. Factorized from ...
9637 (maybe_print_line): ... this. Dump location debug information when
9638 -fdebug-cpp is in effect.
9639 (print_line_1): New static function. Takes an output stream in
9640 parameter. Factorized from ...
9641 (print_line): ... here. Dump location information when -fdebug-cpp
9642 is in effect.
9643 (scan_translation_unit): Dump location information when
9644 -fdebug-cpp is in effect.
9645
92582b75
TT
96462011-10-15 Tom Tromey <tromey@redhat.com>
9647 Dodji Seketeli <dodji@redhat.com>
9648
9649 * c.opt (ftrack-macro-expansion): New option. Handle it with and
9650 without argument.
9651 * c-opts.c (c_common_handle_option)<case
9652 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
9653 cases. Handle -ftrack-macro-expansion with and without argument.
9654
46427374
TT
96552011-10-15 Tom Tromey <tromey@redhat.com>
9656 Dodji Seketeli <dodji@redhat.com>
9657
9658 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
9659 (print_line, cb_define, do_line_change): Adjust to avoid touching
9660 the internals of struct line_map. Use the public API instead.
9661 * c-pch.c (c_common_read_pch): Likewise.
9662 * c-lex.c (fe_file_change): Likewise.
9663
fc8396e9
PC
96642011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
9665
9666 PR c++/17212
9667 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
9668
96692011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
9670
9671 PR c++/33067
9672 * c-pretty-print.c (pp_c_floating_constant): Output
9673 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
9674
e79983f4
MM
96752011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
9676
9677 * c-common.c (def_builtin_1): Delete old interface with two
9678 parallel arrays to hold standard builtin declarations, and replace
9679 it with a function based interface that can support creating
9680 builtins on the fly in the future. Change all uses, and poison
9681 the old names. Make sure 0 is not a legitimate builtin index.
9682 * c-omp.c (c_finish_omp_barrier): Ditto.
9683 (c_finish_omp_taskwait): Ditto.
9684 (c_finish_omp_flush): Ditto.
9685
6637388f
TG
96862011-10-11 Tristan Gingold <gingold@adacore.com>
9687
9688 * c.opt: (fallow-parameterless-variadic-functions): New.
9689
3797cb21
DS
96902011-09-08 Dodji Seketeli <dodji@redhat.com>
9691
9692 PR c++/33255 - Support -Wunused-local-typedefs warning
9693 * c-common.h (struct c_language_function::local_typedefs): New
9694 field.
9faeb493
UB
9695 (record_locally_defined_typedef, maybe_record_typedef_use)
9696 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 9697 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
9698 (maybe_record_typedef_use)
9699 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
9700 * c.opt: Declare new -Wunused-local-typedefs flag.
9701
693ddb1b
EB
97022011-09-06 Eric Botcazou <ebotcazou@adacore.com>
9703
9704 PR middle-end/50266
9705 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
9706 computations.
9707
830c740f
RG
97082011-09-05 Richard Guenther <rguenther@suse.de>
9709
9710 * c-common.c (complete_array_type): Use ssize_int (-1) instead
9711 of integer_minus_one_node for empty array upper bounds.
9712
892a371f
DS
97132011-08-28 Dodji Seketeli <dodji@redhat.com>
9714
9715 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
9716 it's the first time it's being called on this main TU.
9717
0e3fdb48
RB
97182011-08-24 Richard Guenther <rguenther@suse.de>
9719
9720 PR c/49396
9721 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
9722
97232011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
9724
9725 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
9726 defined in cpp_init_builtins and c_cpp_builtins.
9727
d4a83c10
JM
97282011-08-19 Joseph Myers <joseph@codesourcery.com>
9729
9730 * c-common.c (c_common_reswords): Add __builtin_complex.
9731 * c-common.h (RID_BUILTIN_COMPLEX): New.
9732
bbceee64
JM
97332011-08-18 Joseph Myers <joseph@codesourcery.com>
9734
9735 * c-common.c (c_common_reswords): Add _Noreturn.
9736 (keyword_is_function_specifier): Handle RID_NORETURN.
9737 * c-common.h (RID_NORETURN): New.
9738
3f8257db 97392011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
9740
9741 * c-common.c (unsafe_conversion_p): New function. Check if it is
9742 unsafe to convert an expression to the type.
9743 (conversion_warning): Adjust, use unsafe_conversion_p.
9744 * c-common.h (unsafe_conversion_p): New function declaration.
9745
20906c66
JJ
97462011-08-02 Jakub Jelinek <jakub@redhat.com>
9747
9748 * c-common.h (c_finish_omp_atomic): Adjust prototype.
9749 (c_finish_omp_taskyield): New prototype.
9750 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
9751 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
9752 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
9753 or RHS1 have side-effects, evaluate those too in the right spot,
9754 if it is a decl and LHS is also a decl, error out if they
9755 aren't the same.
9756 (c_finish_omp_taskyield): New function.
9757 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
9758 * c-pragma.c (omp_pragmas): Add taskyield.
9759 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
9760 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
9761 PRAGMA_OMP_CLAUSE_MERGEABLE.
9762
770e5a2e
DS
97632011-07-25 Dodji Seketeli <dodji@redhat.com>
9764
9765 * c-common.h (set_underlying_type): Remove parm name from
9766 declaration.
9767
1baae426
RG
97682011-07-25 Romain Geissler <romain.geissler@gmail.com>
9769
9770 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 9771
fcb21722
JM
97722011-07-22 Jason Merrill <jason@redhat.com>
9773
76f86d00
JM
9774 PR c++/49793
9775 * c.opt (Wnarrowing): New.
9776
3a636414
JM
9777 PR c++/30112
9778 * c-common.h: Declare c_linkage_bindings.
9779 * c-pragma.c (handle_pragma_redefine_extname): Use it.
9780
fcb21722
JM
9781 PR c++/49813
9782 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
9783 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
9784 as flag_isoc99 for 'restrict'.
9785 (pp_c_specifier_qualifier_list): Likewise for _Complex.
9786
02614448
ILT
97872011-07-21 Ian Lance Taylor <iant@google.com>
9788
9789 PR middle-end/49705
9790 * c-common.c (c_disable_warnings): New static function.
9791 (c_enable_warnings): New static function.
9792 (c_fully_fold_internal): Change local unused_p to bool. Call
9793 c_disable_warnings and c_enable_warnings rather than change
9794 c_inhibit_evaluation_warnings.
9795
34429675
JM
97962011-07-20 Jason Merrill <jason@redhat.com>
9797
9798 PR c++/6709 (DR 743)
9799 PR c++/42603 (DR 950)
9800 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
9801 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
9802 (CPP_DECLTYPE): New.
9803 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
9804
5d49b6a7
RG
98052011-07-19 Richard Guenther <rguenther@suse.de>
9806
9807 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
9808 * c-omp.c (c_finish_omp_for): Likewise.
9809
e84a58ff
EB
98102011-07-12 Eric Botcazou <ebotcazou@adacore.com>
9811
9812 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
9813 body on the next line.
9814
329af3c7
JM
98152011-07-08 Jason Merrill <jason@redhat.com>
9816
4063e61b
JM
9817 PR c++/45437
9818 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
9819
329af3c7
JM
9820 PR c++/49673
9821 * c-common.c (c_apply_type_quals_to_decl): Don't check
9822 TYPE_NEEDS_CONSTRUCTING.
9823
1a072294
RG
98242011-07-06 Richard Guenther <rguenther@suse.de>
9825
9826 * c-common.c (c_common_nodes_and_builtins):
9827 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
9828
fce5dddd
RG
98292011-07-05 Richard Guenther <rguenther@suse.de>
9830
9831 * c-common.c (c_common_nodes_and_builtins): Build all common
9832 tree nodes first.
9833
45d439ac
JJ
98342011-06-27 Jakub Jelinek <jakub@redhat.com>
9835
56300785
JJ
9836 * c-common.h (c_tree_chain_next): New static inline function.
9837
45d439ac
JJ
9838 * c-common.c (check_builtin_function_arguments): Handle
9839 BUILT_IN_ASSUME_ALIGNED.
9840
e0a8ecf2
AM
98412011-06-21 Andrew MacLeod <amacleod@redhat.com>
9842
9843 * c-common.c: Add sync_ or SYNC__ to builtin names.
9844 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
9845
98462011-06-20 Pierre Vittet <piervit@pvittet.com>
9847
9848 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
9849 handler.
9850 (gen_pragma_handler): New union.
9851 (internal_pragma_handler): New type.
9852 (c_register_pragma_with_data)
9853 (c_register_pragma_with_expansion_and_data): New functions.
9854
9855 * c-pragma.c (registered_pragmas, c_register_pragma_1)
9856 (c_register_pragma, c_register_pragma_with_expansion)
9857 (c_invoke_pragma_handler): Changed to work with
9858 internal_pragma_handler.
9859 (c_register_pragma_with_data)
9860 (c_register_pragma_with_expansion_and_data): New functions.
9861
677f3fa8
JM
98622011-06-14 Joseph Myers <joseph@codesourcery.com>
9863
9864 * c-common.c: Include common/common-target.h.
9865 (handle_section_attribute): Use
9866 targetm_common.have_named_sections.
9867 * c-cppbuiltin.c: Include common/common-target.h.
9868 (c_cpp_builtins): Use targetm_common.except_unwind_info.
9869
d7fc8c14
RG
98702011-06-10 Richard Guenther <rguenther@suse.de>
9871
9872 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
9873 to print a IDENTIFIER_NODE.
9874
10e48e39
RO
98752011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9876 Joseph Myers <joseph@codesourcery.com>
9877
9878 * c.opt (fbuilding-libgcc): New option.
9879 * c-cppbuiltin.c (c_cpp_builtins): Define
9880 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
9881
6976ae51
JM
98822011-06-07 Jason Merrill <jason@redhat.com>
9883
3ff60975
JM
9884 * c-common.c (max_tinst_depth): Lower default to 900.
9885
6976ae51
JM
9886 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
9887
009db074
RG
98882011-06-07 Richard Guenther <rguenther@suse.de>
9889
9890 * c-common.c (c_common_nodes_and_builtins): Do not set
9891 size_type_node or call set_sizetype.
9892
b4592b92
DS
98932011-06-07 Dodji Seketeli <dodji@redhat.com>
9894
9895 PR debug/49130
9896 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 9897 type when using pointer comparison to compare types.
b4592b92 9898
014ab419
JW
98992011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
9900
9901 * c.opt: Add -Wdelete-non-virtual-dtor.
9902 * c-opts.c (c_common_handle_option): Include it in -Wall.
9903
4f60111f
NF
99042011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
9905
9906 PR bootstrap/49190
9907
9908 Revert:
9909 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9910
9911 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
9912 not tree_common.
9913
4cc4f2f4
JJ
99142011-05-27 Jakub Jelinek <jakub@redhat.com>
9915
9916 PR c++/49165
9917 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
9918 C++ don't call c_common_truthvalue_conversion on void type arms.
9919
38e01f9e
NF
99202011-05-27 Nathan Froyd <froydnj@codesourcery.com>
9921
9922 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
9923 (stmt_list_stack): Define.
9924 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
9925 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
9926
92e948a8
NF
99272011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9928
9929 * c-common.c (warning_candidate_p): Check for BLOCKs.
9930
a2fc3e63
NF
99312011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9932
9933 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
9934 not tree_common.
9935
0957c029
JJ
99362011-05-25 Jakub Jelinek <jakub@redhat.com>
9937
9938 * c-common.c (def_fn_type): Remove extra va_end.
9939
828fb3ba
JM
99402011-05-23 Jason Merrill <jason@redhat.com>
9941
9942 PR c++/48106
9943 * c-common.c (c_common_get_narrower): New.
9944 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
9945
dde05067
NF
99462011-05-23 Nathan Froyd <froydnj@codesourcery.com>
9947
9948 * c-common.h (check_function_arguments): Tweak prototype of
9949 check_function_arguments.
9950 * c-common.c (check_function_arguments): Likewise. Adjust
9951 calls to check_function_nonnull, check_function_format, and
9952 check_function_sentinel.
9953 (check_function_sentinel): Take a FUNCTION_TYPE rather than
9954 separate attributes and typelist arguments. Use
9955 FOREACH_FUNCTION_ARGS to iterate over argument types.
9956
3c0d13bf
PC
99572011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
9958
9959 * c-common.c (c_common_reswords): Reorder.
9960 * c-common.h (rid): Likewise.
9961
8242dd04
NF
99622011-05-10 Nathan Froyd <froydnj@codesourcery.com>
9963
9964 * c-common.c (def_fn_type): Don't call build_function_type, call
9965 build_function_type_array or build_varargs_function_type_array
9966 instead.
9967 (c_common_nodes_and_builtins): Likewise.
9968
3d528853
NF
99692011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9970
9971 * c-common.c (c_add_case_label): Omit the loc argument to
9972 build_case_label.
9973 * c-common.h (build_case_label): Remove.
9974 * c-semantics.c (build_case_label): Remove.
9975
a04a722b
JM
99762011-05-05 Joseph Myers <joseph@codesourcery.com>
9977
9978 * c-objc.h (objc_start_method_definition): Update prototype.
9979 * stub-objc.c (objc_start_method_definition): Add extra parameter.
9980
e19a18d4
NF
99812011-05-04 Nathan Froyd <froydnj@codesourcery.com>
9982
9983 * c-common.c (check_main_parameter_types): Reindent. Don't use
9984 TYPE_ARG_TYPES directly.
9985 (handle_nonnull_attribute): Likewise.
9986 (sync_resolve_params): Likewise.
9987 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
9988 to check_format_string.
9989 (handle_format_attribute): Likewise.
9990 (check_format_string): Take a function type to examine instead of
9991 a type list. Use a function_arg_iterator to step through argument
9992 types.
9993
c62c040f
RG
99942011-05-04 Richard Guenther <rguenther@suse.de>
9995
9996 * c-common.c (fix_string_type): Use size_int for index type bounds.
9997 (start_fname_decls): Do not pass NULL to build_int_cst.
9998 (c_init_attributes): Likewise.
9999 * c-lex.c (c_lex_with_flags): Likewise.
10000
c12ff9d8
JM
100012011-04-27 Jason Merrill <jason@redhat.com>
10002
10003 * c-common.c (make_tree_vector_from_list): New.
10004 * c-common.h: Declare it.
10005
304dfbe3
RG
100062011-04-26 Richard Guenther <rguenther@suse.de>
10007
10008 PR preprocessor/48248
10009 * c-ppoutput.c (maybe_print_line): Always optimize newlines
10010 for output size with -P.
10011
3c0d13bf
PC
100122011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
10013
10014 * c-common.c (struct c_common_resword): Add __underlying_type.
10015 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
10016
04695783
JM
100172011-04-20 Jim Meyering <meyering@redhat.com>
10018
10019 * c-format.c (init_dollar_format_checking): Remove useless
10020 if-before-free.
10021
0dc33c3c
NP
100222011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
10023
10024 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 10025 (objc_detect_field_duplicates): New.
0dc33c3c 10026 * stub-objc.c: Likewise.
3c0d13bf 10027
c59633d9
NP
100282011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
10029
10030 * stub-objc.c (objc_declare_protocols): Renamed to
10031 objc_declare_protocol.
10032 * c-objc.h: Likewise.
3c0d13bf 10033
32dabdaf
NP
100342011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
10035
10036 * stub-objc.c (objc_declare_class): Updated argument name.
10037
81f653d6
NF
100382011-04-12 Nathan Froyd <froydnj@codesourcery.com>
10039
10040 * c-common.h (c_common_init_ts): Declare.
10041 * c-common.c (c_common_init_ts): Define.
10042
eb345401
NP
100432011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
10044
10045 * c-objc.h (objc_build_message_expr): Updated prototype.
10046 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 10047
a358e188
MJ
100482011-04-12 Martin Jambor <mjambor@suse.cz>
10049
10050 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
10051 of cgraph_node.
10052
e6313a78
RG
100532011-04-11 Richard Guenther <rguenther@suse.de>
10054
10055 * c-common.c (complete_array_type): Build a range type of
10056 proper type.
10057
dcf0c47e
NF
100582011-04-08 Nathan Froyd <froydnj@codesourcery.com>
10059
10060 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
10061 (handle_type_generic_attribute): Likewise.
10062
1ee44b26
JM
100632011-04-07 Jason Merrill <jason@redhat.com>
10064
10065 PR c++/48450
10066 * c-common.c (c_common_truthvalue_conversion): Don't ignore
10067 conversion from C++0x scoped enum.
10068
acce4e77
JM
100692011-04-06 Joseph Myers <joseph@codesourcery.com>
10070
10071 * c-target-def.h: New file.
10072 * c-target.def: New file.
10073 * c-target.h: New file.
10074 * c-common.c (targetcm): Don't define here.
10075 * c-common.h (default_handle_c_option): Declare.
10076 * c-format.c: Include c-target.h instead of target.h.
10077 * c-opts.c: Include c-target.h instead of target.h. Explicitly
10078 include tm.h.
10079 (default_handle_c_option): Move from targhooks.c.
10080
e2eefb55
JJ
100812011-03-29 Jakub Jelinek <jakub@redhat.com>
10082
10083 PR preprocessor/48248
10084 * c-ppoutput.c (print): Add src_file field.
10085 (init_pp_output): Initialize it.
10086 (maybe_print_line): Don't optimize by adding up to 8 newlines
10087 if map->to_file and print.src_file are different file.
10088 (print_line): Update print.src_file.
10089
ba78087b
KT
100902011-03-25 Kai Tietz <ktietz@redhat.com>
10091
10092 * c-ada-spec.c (compare_comment): Use filename_cmp
10093 instead of strcmp for filename.
10094
0edf1bb2
JL
100952011-03-25 Jeff Law <law@redhat.com>
10096
adfac8df 10097 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 10098
c7dc8804
JM
100992011-03-25 Jason Merrill <jason@redhat.com>
10100
10101 * c.opt: Add -std=c++03.
10102
d1d879b1
EB
101032011-03-22 Eric Botcazou <ebotcazou@adacore.com>
10104
10105 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
10106
3f8257db 101072011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
10108
10109 PR target/12171
5050afdf
KT
10110 * c-pretty-print.c (pp_c_specifier_qualifier_list):
10111 Display allowed attributes for function pointer types.
10112 (pp_c_attributes_display): New function to display
10113 attributes having affects_type_identity flag set to true.
10114 * c-pretty-print.h (pp_c_attributes_display): New prototype.
10115
62d784f7
KT
10116 * c-common.c (c_common_attribute_table):
10117 Add new element.
10118 (c_common_format_attribute_table): Likewise.
10119
82d37118
JM
101202011-03-18 Jason Merrill <jason@redhat.com>
10121
49a000c3
JM
10122 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
10123 * c-common.h: Don't declare it here.
10124 * c-common.c: Or define it here.
10125 * c-opts.c (c_common_handle_option): Or set it here.
10126
82d37118
JM
10127 PR c++/35315
10128 * c-common.c (handle_transparent_union_attribute): Don't
10129 make a duplicate type in C++.
10130
17bc631c
JM
101312011-03-15 Jason Merrill <jason@redhat.com>
10132
10133 * c-common.c (max_constexpr_depth): New.
10134 * c-common.h: Declare it.
10135 * c-opts.c (c_common_handle_option): Set it.
10136 * c.opt (fconstexpr-depth): New option.
10137
1b9b91a6
JM
101382011-03-11 Jason Merrill <jason@redhat.com>
10139
f231b5ff
JM
10140 * c-common.c (attribute_takes_identifier_p): Add missing const.
10141
1b9b91a6
JM
10142 PR c++/46803
10143 * c-common.c (attribute_takes_identifier_p): Assume that an
10144 unknown attribute takes an identifier.
10145
a19e4d44
NF
101462011-03-07 Nathan Froyd <froydnj@codesourcery.com>
10147
10148 PR c/47786
10149 * c-common.c (c_type_hash): Call list_length instead of iterating
10150 through DECL_CHAIN. Rename 'i' to 'n_elements'.
10151
982d62f6
JJ
101522011-02-19 Jakub Jelinek <jakub@redhat.com>
10153
10154 PR c/47809
10155 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
10156
0a256240
NP
101572011-02-17 Iain Sandoe <iains@gcc.gnu.org>
10158
10159 * c.opt (fobjc-abi-version=) New.
10160 (fobjc-nilcheck): New.
10161
ba9e6dd5
NF
101622011-02-03 Nathan Froyd <froydnj@codesourcery.com>
10163
10164 PR c++/46890
10165 * c-common.h (keyword_is_decl_specifier): Declare.
10166 * c-common.c (keyword_is_decl_specifier): Define.
10167 (keyword_is_function_specifier): New function.
10168
7273813a
JJ
101692011-01-26 Jakub Jelinek <jakub@redhat.com>
10170
10171 PR c/47473
10172 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
10173 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
10174 REAL_TYPE.
10175
908ef79b
AC
101762011-01-26 Arnaud Charlet <charlet@adacore.com>
10177
10178 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
10179
237e9384
JJ
101802011-01-26 Jakub Jelinek <jakub@redhat.com>
10181
10182 PR pch/47430
10183 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
10184 after init_c_lex if pch_file is set.
10185
47ea1edf
DK
101862011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
10187
d4dba752 10188 PR c++/43601
47ea1edf
DK
10189 * c.opt (-fkeep-inline-dllexport): New switch.
10190
2aa9c6ae
RG
101912011-01-12 Richard Guenther <rguenther@suse.de>
10192
10193 PR middle-end/32511
10194 * c-common.c (handle_weak_attribute): Warn instead of error
10195 on declaring an inline function weak.
10196
7bd11157
TT
101972011-01-05 Tom Tromey <tromey@redhat.com>
10198
10199 * c-common.h (lvalue_error): Update.
10200 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
10201 not error.
10202
0e66e494 102032010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 10204
b4f588c4
NP
10205 PR objc/47075
10206 * c-objc.h (objc_finish_message_expr): Added argument to
10207 prototype.
10208
f4da8dce
NF
102092010-12-22 Nathan Froyd <froydnj@codesourcery.com>
10210
10211 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
10212 Use prototype_p.
10213
46270f14
NP
102142010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
10215
10216 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 10217 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 10218
4816c593
NF
102192010-12-10 Nathan Froyd <froydnj@codesourcery.com>
10220
10221 * c-common.h (readonly_error): Declare.
10222 * c-common.c (readonly_error): Define.
10223
7a6daeb0
NF
102242010-12-09 Nathan Froyd <froydnj@codesourcery.com>
10225
10226 * c-common.h (invalid_indirection_error): Declare.
10227 * c-common.c (invalid_indirection_error): Define.
10228
892f6119
RG
102292010-12-03 Richard Guenther <rguenther@suse.de>
10230
10231 PR c/46745
10232 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
10233 (pp_c_unary_expression): Likewise.
10234 (pp_c_expression): Likewise.
10235
6c39e757
NP
102362010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
10237
10238 * c-common.h (objc_finish_function): New.
10239 (objc_non_volatilized_type): Removed.
10240 (objc_type_quals_match): Removed.
10241 * stub-objc.c (objc_finish_function): New.
10242 (objc_non_volatilized_type): Removed.
10243 (objc_type_quals_match): Removed.
9faeb493 10244
7c475d11
JM
102452010-11-30 Joseph Myers <joseph@codesourcery.com>
10246
10247 * c-common.h (parse_optimize_options): Declare.
10248 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
10249 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
10250
71f3e391
JM
102512010-11-29 Joseph Myers <joseph@codesourcery.com>
10252
10253 * c-opts.c (check_deps_environment_vars): Use getenv instead of
10254 GET_ENVIRONMENT.
10255 * c-pch.c (O_BINARY): Don't define here.
10256 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
10257
d5fabb58
JM
102582010-11-25 Joseph Myers <joseph@codesourcery.com>
10259
10260 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
10261 targetm.except_unwind_info.
10262
299404a1
JM
102632010-11-23 Joseph Myers <joseph@codesourcery.com>
10264
10265 * c-opts.c (c_common_handle_option): Pass location to
10266 set_struct_debug_option.
10267
c98cd5bf
JM
102682010-11-23 Joseph Myers <joseph@codesourcery.com>
10269
10270 * c-common.c (visibility_options): Move from ../opts.c.
10271 * c-common.h (struct visibility_flags, visibility_options):
10272 Declare here.
10273 * c-opts.c (finish_options): Rename to c_finish_options.
10274 (c_common_init): Update call to finish_options.
10275
a9546771
NP
102762010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
10277
10278 PR objc/34033
10279 * c-lex.c (lex_string): Check that each string in an Objective-C
10280 string concat sequence starts with either one or zero '@', and
10281 that there are no spurious '@' signs at the end.
10282
24a57808
JM
102832010-11-20 Joseph Myers <joseph@codesourcery.com>
10284
10285 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
10286 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
10287 HANDLE_PRAGMA_VISIBILITY.
10288 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
10289 HANDLE_PRAGMA_VISIBILITY): Don't define.
10290 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
10291
a9aa2c3a
NF
102922010-11-20 Nathan Froyd <froydnj@codesourcery.com>
10293
10294 PR c++/16189
10295 PR c++/36888
10296 PR c++/45331
10297 * c-common.h (keyword_begins_type_specifier): Declare.
10298 (keyword_is_storage_class_specifier): Declare.
10299 (keyword_is_type_qualifier): Declare.
10300 * c-common.c (keyword_begins_type_specifier): New function.
10301 (keyword_is_storage_class_specifier): New function.
10302 (keyword_is_type_qualifier): Declare.
10303
5386338c
JM
103042010-11-19 Joseph Myers <joseph@codesourcery.com>
10305
10306 PR c/46547
10307 * c-common.c (in_late_binary_op): Define.
10308 (c_common_truthvalue_conversion): Check in_late_binary_op before
10309 calling c_save_expr.
10310 * c-common.h (in_late_binary_op): Declare.
10311
69ccdddb
JM
103122010-11-19 Joseph Myers <joseph@codesourcery.com>
10313
10314 * c-opts.c (c_common_handle_option): Update calls to
10315 set_struct_debug_option.
10316
6b192a09
NP
103172010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
10318
10319 * c-common.h (objc_declare_protocols): Added additional argument.
10320 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 10321
fb52b50a
NF
103222010-11-18 Nathan Froyd <froydnj@codesourcery.com>
10323
10324 PR c/33193
10325 * c-common.h (build_real_imag_expr): Declare.
10326 * c-semantics.c (build_real_imag_expr): Define.
10327
b37421c6
JM
103282010-11-17 Joseph Myers <joseph@codesourcery.com>
10329
10330 * c-opts.c (c_common_parse_file): Take no arguments.
10331 * c-common.h (c_common_parse_file): Update prototype.
10332
07078664
JJ
103332010-11-16 Jakub Jelinek <jakub@redhat.com>
10334
10335 PR c++/46401
10336 * c-common.c (warning_candidate_p): Don't track non-const calls
10337 or STRING_CSTs.
10338
c6a13190
ILT
103392010-11-15 Ian Lance Taylor <iant@google.com>
10340
10341 * c-lex.c (init_c_lex): Set macro debug callbacks if
10342 flag_dump_go_spec is set.
10343
925e8657
NP
103442010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
10345
10346 * c-common.h (objc_build_incr_expr_for_property_ref): New.
10347 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
10348
bb0a9581
NF
103492010-11-15 Nathan Froyd <froydnj@codesourcery.com>
10350
10351 PR preprocessor/45038
10352 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
10353 dialects.
10354
c5fa0890
JM
103552010-11-12 Joseph Myers <joseph@codesourcery.com>
10356
10357 * c-common.h (c_family_lang_mask): Declare.
10358 * c-opts.c (c_family_lang_mask): Make extern.
10359 * c-pragma.c (handle_pragma_diagnostic): Use
10360 control_warning_option.
10361
a4d8c676
JM
103622010-11-12 Joseph Myers <joseph@codesourcery.com>
10363
10364 * c-common.c (parse_optimize_options): Update call to
10365 decode_options.
10366 * c-common.h (c_common_handle_option): Update prototype.
10367 * c-opts.c (c_common_handle_option): Take location_t parameter and
10368 pass it to other functions.
10369
f954bd2c
JM
103702010-11-11 Joseph Myers <joseph@codesourcery.com>
10371
10372 * c-opts.c (warning_as_error_callback): Remove.
10373 (c_common_initialize_diagnostics): Don't call
10374 register_warning_as_error_callback.
10375 (c_common_handle_option): Handle -Werror=normalized= here.
10376
d8a07487
JM
103772010-11-10 Joseph Myers <joseph@codesourcery.com>
10378
10379 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
10380 in diagnostic.
10381 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
10382 letter.
10383 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
10384 Remove trailing '.' from diagnostics.
10385 * c.opt (Wwrite-strings_: Avoid '`' in help text.
10386
d5478783
JM
103872010-11-10 Joseph Myers <joseph@codesourcery.com>
10388
10389 * c-common.c (parse_optimize_options): Pass global_dc to
10390 decode_options.
10391 * c-opts.c (c_common_handle_option): Pass &global_options to
10392 set_Wstrict_aliasing.
10393 * c.opt (v): Don't mark Common or document here.
10394
91ebb981
IS
103952010-11-06 Iain Sandoe <iains@gcc.gnu.org>
10396
10397 PR target/44981
10398 * c-format.c (format_type): New type gcc_objc_string_format_type.
10399 (valid_stringptr_type_p): New.
10400 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 10401 (check_format_string): Pass expected type, use
91ebb981
IS
10402 valid_stringptr_type_p (), check that the format string types are
10403 consistent with the format specification.
10404 (decode_format_attr): Warn if NSString is used outside objective-c.
10405 (format_types_orig): Add NSString.
10406 (format_name): New.
10407 (format_flags): New.
10408 (check_format_arg): Handle format strings requiring an external parser.
10409 first_target_format_type: New variable.
10410 (handle_format_attribute): Set up first_target_format_type, pass the
10411 expected format arg string type to check_format_string().
ab20d992 10412 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
91ebb981
IS
10413 * stub-objc.c (objc_string_ref_type_p): New.
10414 (objc_check_format_arg): New.
10415
bede2adc
NP
104162010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
10417
9faeb493 10418 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
10419 * c-common.h (objc_build_class_component_ref): New.
10420 * stub-objc.c (objc_build_class_component_ref): New.
10421
9a179d01
NP
104222010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
10423
10424 * c.opt (Wproperty-assign-default): New option.
10425
22d8d616
NP
104262010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
10427
10428 Implemented -fobjc-std=objc1 flag.
10429 * c.opt (fobjc-std=objc1): New option.
10430
2debdb4f
NP
104312010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
10432
10433 Implemented format and noreturn attributes for Objective-C methods.
10434 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
10435 attribute for Objective-C methods.
10436
ec52b111
JM
104372010-10-31 Jason Merrill <jason@redhat.com>
10438
10439 * c-common.c (conversion_warning, warn_for_collisions_1): Use
10440 EXPR_LOC_OR_HERE.
10441
46a88c12
NP
104422010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
10443
10444 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
10445 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
10446 (objc_add_property_declaration): Removed arguments for copies and
10447 ivar.
10448 (objc_build_getter_call): Renamed to
10449 objc_maybe_build_component_ref.
10450 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
10451 (objc_is_property_ref): New.
10452 * c-common.c (c_common_reswords): Removed copies and ivar.
10453 * stub-objc.c (objc_add_property_declaration): Removed arguments
10454 for copies and ivar.
10455 (objc_build_getter_call): Renamed to
10456 objc_maybe_build_component_ref.
10457 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
10458 (objc_is_property_ref): New.
9faeb493 10459
1e4bf85b
AC
104602010-10-29 Arnaud Charlet <charlet@adacore.com>
10461 Matthew Gingell <gingell@adacore.com>
10462
10463 * c-ada-spec.c (separate_class_package): New function.
10464 (pp_ada_tree_identifier): Prefix references to C++ classes with the
10465 name of their enclosing package.
10466 (print_ada_declaration): Use separate_class_package.
10467
81f0bab2
JM
104682010-10-27 Jason Merrill <jason@redhat.com>
10469
2b08f2c5
JM
10470 * c-common.c (c_common_reswords): Add __is_literal_type.
10471 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
10472
81f0bab2
JM
10473 * c-common.c (check_case_value): Remove special C++ code.
10474
200290f2
NP
104752010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
10476
10477 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
10478 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
10479 and RID_LAST_PATTR.
10480 (objc_add_property_declaration): Added additional arguments.
10481 (objc_property_attribute_kind): Removed.
10482 (objc_set_property_attr): Removed.
10483 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
10484 copy and nonatomic.
10485 * stub-objc.c (objc_add_property_declaration): Added additional
10486 arguments.
10487 (objc_set_property_attr): Removed.
9faeb493 10488
f614132b
NP
104892010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
10490
10491 * c-common.h (objc_add_property_variable): Renamed to
10492 objc_add_property_declaration. Added location argument.
10493 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 10494
b8a18805
NP
104952010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
10496
10497 * c-common.h (objc_maybe_printable_name): New.
10498 * stub-objc.c (objc_maybe_printable_name): New.
10499
3f8257db
JJ
105002010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
10501 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
10502
10503 * c-common.h (c_common_mark_addressable_vec): Declare.
10504 * c-common.c (c_common_mark_addressable_vec): New function.
10505
249a82c4
NP
105062010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
10507
10508 * c-common.h (objc_set_method_type): Removed.
10509 (objc_add_method_declaration): Added boolean argument.
10510 (objc_start_method_definition): Same change.
10511 (objc_build_method_signature): Same change.
10512 * stub-objc.c (objc_set_method_type): Removed.
10513 (objc_add_method_declaration): Added boolean argument.
10514 (objc_start_method_definition): Same change.
10515 (objc_build_method_signature): Same change.
10516
977e30bc
NP
105172010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
10518
10519 * c-common.h (finish_file): Removed.
10520 (objc_write_global_declarations): New.
10521 * c-opts.c (c_common_parse_file): Do not call finish_file.
10522 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 10523
da57d1b9
NP
105242010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
10525
10526 Implemented parsing @synthesize and @dynamic for
10527 Objective-C/Objective-C++.
10528 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
10529 (objc_add_synthesize_declaration): New.
10530 (objc_add_dynamic_declaration): New.
10531 * c-common.c (c_common_reswords): Add synthesize and dynamic.
10532 * stub-objc.c (objc_add_synthesize_declaration): New.
10533 (objc_add_dynamic_declaration): New.
9faeb493 10534
0069111f
MM
105352010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
10536
10537 PR target/46041
10538 * c-cppbuiltin.c (mode_has_fma): Move function here from
10539 builtins.c. Don't use the fma optab, instead just use the
10540 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
10541 using -save-temps.
10542
e426b47b
NP
105432010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
10544
10545 Merge from 'apple/trunk' branch on FSF servers.
0069111f 10546
3f8257db 10547 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 10548
9faeb493 10549 Radar 4330422
e426b47b
NP
10550 * c-common.h (objc_non_volatilized_type): New declaration
10551 * stub-objc.c (objc_non_volatilized_type): New stub.
10552
90fbfdc3
NP
105532010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
10554
e426b47b 10555 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 10556
ab20d992 10557 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 10558
9faeb493 10559 Radar 4133425
90fbfdc3 10560 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 10561 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 10562
c37d8c30
IS
105632010-10-17 Iain Sandoe <iains@gcc.gnu.org>
10564
10565 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
10566 * c-common.h (enum rid): Add RID_AT_PACKAGE.
10567 (objc_ivar_visibility_kind): New enum.
10568 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 10569 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
10570 visibility enum.
10571
1b1562a5
MM
105722010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
10573
10574 * c-cppbuiltin.c (builtin_define_float_constants): Emit
10575 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
10576 has the appropriate fma builtins.
10577 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
10578
668ea4b1
IS
105792010-10-14 Iain Sandoe <iains@gcc.gnu.org>
10580
1b1562a5 10581 merge from FSF apple 'trunk' branch.
3f8257db 10582 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 10583
668ea4b1
IS
10584 Radars 4436866, 4505126, 4506903, 4517826
10585 * c-common.c (c_common_resword): Define @property and its attributes.
10586 * c-common.h: Define property attribute enum entries.
10587 (OBJC_IS_PATTR_KEYWORD): New.
10588 (objc_property_attribute_kind): New enum.
10589 Declare objc_set_property_attr (), objc_add_property_variable (),
10590 objc_build_getter_call () and objc_build_setter_call ().
10591 * stub-objc.c (objc_set_property_attr): New stub.
10592 (objc_add_property_variable): Likewise.
10593 (objc_build_getter_call): Likewise.
10594 (objc_build_setter_call) Likewise.
1b1562a5 10595
a1178b30
IS
105962010-10-13 Iain Sandoe <iains@gcc.gnu.org>
10597
1b1562a5 10598 merge from FSF apple 'trunk' branch.
ab20d992 10599 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
10600
10601 Radar 3803157 (method attributes)
10602 * c-common.c (handle_deprecated_attribute): Recognize
10603 objc methods as valid declarations.
10604 * c-common.h: Declare objc_method_decl ().
1b1562a5 10605 * stub-objc.c (objc_method_decl): New stub.
a1178b30 10606
a75bfaa6
JM
106072010-10-08 Joseph Myers <joseph@codesourcery.com>
10608
10609 * c-common.c (parse_optimize_options): Call
10610 decode_cmdline_options_to_array_default_mask before
10611 decode_options. Update arguments to decode_options.
10612 * c-common.h (c_common_init_options_struct): Declare.
10613 * c-opts.c (c_common_init_options_struct): New. Split out from
10614 c_common_init_options.
10615
f05b9d93
NP
106162010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
10617
10618 Implemented fast enumeration for Objective-C.
10619 * c-common.h (objc_finish_foreach_loop): New.
10620 * stub-objc.c (objc_finish_foreach_loop): New.
10621
1ebe4b4f
JM
106222010-10-05 Joseph Myers <joseph@codesourcery.com>
10623
10624 * c-common.h (struct diagnostic_context): Don't declare here.
10625 (c_common_initialize_diagnostics): Declare using
10626 diagnostic_context typedef.
10627 * c-opts.c (c_common_handle_option): Pass global_dc to
10628 handle_generated_option.
10629
d4d24ba4
JM
106302010-10-04 Joseph Myers <joseph@codesourcery.com>
10631
10632 * c-opts.c (c_common_handle_option): Pass &global_options_set to
10633 handle_generated_option.
10634
478a1c5b
ILT
106352010-10-03 Ian Lance Taylor <iant@google.com>
10636
10637 * c.opt (-fplan9-extensions): New option.
10638
82a1c2fe
FXC
106392010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
10640
10641 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
10642 Remove.
10643 (c_cpp_builtins): Call functions from cppbuiltin.c instead
10644 of duplicating code.
10645
92902b1b
IS
106462010-09-30 Iain Sandoe <iains@gcc.gnu.org>
10647
10648 * c-common.c: Add two new entries for @optional
10649 and @required keywords.
10650
10651 merge from FSF 'apple/trunk' branch.
3f8257db 10652 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
10653
10654 Radar 4386773
10655 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
10656 objective-c keywords.
10657 (objc_set_method_opt): New declaration.
10658 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 10659
46625112
JM
106602010-09-30 Joseph Myers <joseph@codesourcery.com>
10661
10662 * c-common.c (handle_optimize_attribute): Pass &global_options to
10663 cl_optimization_save and cl_optimization_restore.
10664 * c-opts.c (c_common_handle_option): Pass &global_options to
10665 handle_generated_option.
10666 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
10667 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
10668 &global_options to cl_optimization_restore.
10669
49b91f05
NP
106702010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
10671
10672 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
10673 Objective-C/Objective-C++ keywords.
10674
13ed556f 106752010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 10676
9faeb493
UB
10677 Merge from 'apple/trunk' branch on FSF servers.
10678
3f8257db 10679 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
10680
10681 Radar 4281748
10682 * c-common.h (objc_check_global_decl): New declaration.
10683 * stub-objc.c (objc_check_global_decl): New stub.
10684
f0036cca
JM
106852010-09-29 Joseph Myers <joseph@codesourcery.com>
10686
10687 * c.opt: Don't use VarExists.
10688
e3339d0f
JM
106892010-09-29 Joseph Myers <joseph@codesourcery.com>
10690
10691 * c-common.c (c_cpp_error): Update names of diagnostic_context
10692 members.
10693 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
10694 cl_optimization members.
10695 * c-opts.c (warning_as_error_callback, c_common_handle_option,
10696 sanitize_cpp_opts, finish_options): Update names of cpp_options
10697 members.
10698
1973201f
NP
106992010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
10700
10701 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
10702 (objc_is_reserved_word): Removed.
10703 * c-common.c: Updated comments.
10704 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
10705 objc_is_reserved_word.
10706 * stub-objc.c (objc_is_reserved_word): Removed.
10707
f7e71da5
IS
107082010-09-28 Iain Sandoe <iains@gcc.gnu.org>
10709
9faeb493 10710 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
10711 include attributes.
10712 (objc_start_method_definition): Likewise.
10713 (objc_build_keyword_decl): Likewise.
10714 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
10715 (objc_start_method_definition): Likewise.
10716 (objc_build_keyword_decl): Likewise.
10717
c165dca7
IS
107182010-09-28 Iain Sandoe <iains@gcc.gnu.org>
10719
10720 * c-common.h (objc_start_class_interface): Adjust prototype.
10721 (objc_start_category_interface): Likewise.
10722 (objc_start_protocol): Likewise.
10723 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
10724 (objc_start_class_interface): Likewise.
10725 (objc_start_category_interface): Likewise.
10726
7458026b
ILT
107272010-09-27 Ian Lance Taylor <iant@google.com>
10728
10729 * c-common.c (c_common_attribute_table): Add no_split_stack.
10730 (handle_no_split_stack_attribute): New static function.
10731
b581b85b
NP
107322010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
10733
9faeb493 10734 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 10735
3f8257db 10736 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 10737
9faeb493 10738 Radar 4229905
b581b85b
NP
10739 * c-common.h (objc_have_common_type): New declaration.
10740 * stub-objc.c (objc_have_common_type): New stub.
10741
10742 2005-06-22 Ziemowit Laski <zlaski@apple.com>
10743
10744 Radar 4154928
10745 * c-common.h (objc_common_type): New prototype.
9faeb493 10746 * stub-objc.c (objc_common_type): New stub.
b581b85b 10747
46a4da10
JH
107482010-09-24 Jan Hubicka <jh@suse.cz>
10749
10750 * c-common.c (handle_leaf_attribute): New function.
10751 (struct attribute_spec c_common_att): Add leaf.
10752
e200444e
JM
107532010-09-22 Joseph Myers <joseph@codesourcery.com>
10754
10755 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
10756 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
10757 -dump, -dump=, -imacros, -imacros=, -include, -include=,
10758 -include-barrier, -include-directory, -include-directory=,
10759 -include-directory-after, -include-directory-after=,
10760 -include-prefix, -include-prefix=, -include-with-prefix,
10761 -include-with-prefix=, -include-with-prefix-after,
10762 -include-with-prefix-after=, -include-with-prefix-before,
10763 -include-with-prefix-before=, -no-integrated-cpp,
10764 -no-line-commands, -no-standard-includes, -no-warnings, -output,
10765 -output=, -pedantic, -pedantic-errors, -preprocess,
10766 -print-missing-file-dependencies, -trace-includes, -traditional,
10767 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
10768 -user-dependencies, -verbose, -write-dependencies,
10769 -write-user-dependencies, no-integrated-cpp, traditional): New.
10770
29a80ea6
NP
107712010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
10772
10773 PR objc/23710
ac1fc2fc
NP
10774 * c-common.h (objc_start_method_definition): Return bool instead
10775 of void.
10776 * stub-objc.c (objc_start_method_definition): Return bool instead
10777 of void.
10778
107792010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
10780
10781 PR objc/25965
10782 * c-common.h (objc_get_interface_ivars): New declaration.
10783 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 10784
de621752
ILT
107852010-09-15 Ian Lance Taylor <iant@google.com>
10786
10787 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 10788 messages. Remove period at end of warning message.
de621752 10789
ba885ec5
NS
107902010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10791
10792 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
10793 (handle_alias_attribute): ... here.
10794 (handle_ifunc_attribute): New.
10795
c5ee1358
MM
107962010-09-06 Mark Mitchell <mark@codesourcery.com>
10797
10798 * c-common.h (do_warn_double_promotion): Declare.
10799 * c-common.c (do_warn_double_promotion): Define.
10800
0a0b3574
MM
108012010-09-05 Mark Mitchell <mark@codesourcery.com>
10802
10803 * c.opt (Wdouble-promotion): New.
10804
d1779886
JM
108052010-09-02 Joseph Myers <joseph@codesourcery.com>
10806
10807 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
10808 fvtable-thunks, fxref): Mark no longer supported in help text.
10809
2d2bd949
JM
108102010-09-02 Joseph Myers <joseph@codesourcery.com>
10811
10812 * c.opt (Wimport, fall-virtual, falt-external-templates,
10813 fdefault-inline, fenum-int-equiv, fexternal-templates,
10814 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
10815 fname-mangling-version-, fnew-abi, fnonnull-objects,
10816 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
10817 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
10818 applicable.
10819 (fhandle-exceptions): Mark with Alias and Warn.
10820 * c-opts.c (c_common_handle_option): Don't handle options marked
10821 as ignored.
10822
5de8299c
JM
108232010-09-02 Joseph Myers <joseph@codesourcery.com>
10824
10825 * c.opt (Wcomments, Werror-implicit-function-declaration,
10826 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
10827 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
10828 aliases.
10829 * c-common.c (option_codes): Use OPT_Wcomment instead of
10830 OPT_Wcomments.
10831 * c-opts.c (warning_as_error_callback, c_common_handle_option):
10832 Don't handle options marked as aliases.
10833
0ceb0201
RG
108342010-08-25 Richard Guenther <rguenther@suse.de>
10835
10836 * c-common.c (c_common_get_alias_set): Remove special
10837 handling for pointers.
10838
ac47786e
NF
108392010-08-20 Nathan Froyd <froydnj@codesourcery.com>
10840
10841 * c-common.c: Use FOR_EACH_VEC_ELT.
10842 * c-gimplify.c: Likewise.
10843 * c-pragma.c: Likewise.
10844
c878765b
JM
108452010-08-16 Joseph Myers <joseph@codesourcery.com>
10846
10847 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
10848 RejectDriver.
10849 (MMDX): Change back to MMD. Mark NoDriverArg instead of
10850 RejectDriver.
10851 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
10852 instead of OPT_MDX and OPT_MMDX.
10853
603349bf
JM
108542010-08-16 Joseph Myers <joseph@codesourcery.com>
10855
10856 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
10857
644fa7ac
JM
108582010-08-12 Joseph Myers <joseph@codesourcery.com>
10859
10860 * c.opt (MD, MMD): Change to MDX and MMDX.
10861 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
10862
481e1176
JM
108632010-08-11 Joseph Myers <joseph@codesourcery.com>
10864
10865 * c-opts.c (c_common_handle_option): Call handle_generated_option
10866 instead of handle_option.
10867
ac8dc9f7
NF
108682010-08-08 Nathan Froyd <froydnj@codesourcery.com>
10869
10870 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
10871 (maybe_apply_renaming_pragma): Delete unneeded declarations.
10872
4f8c876d
NF
108732010-08-08 Nathan Froyd <froydnj@codesourcery.com>
10874
10875 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
10876 (pending_redefine_extname): Change type to a VEC.
10877 (add_to_renaming_pragma_list): Update for new type of
10878 pending_redefine_extname.
ac8dc9f7 10879 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 10880
3b0c690e
AC
108812010-08-04 Arnaud Charlet <charlet@adacore.com>
10882
10883 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
10884 visited.
10885 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
10886 decide whether a type has already been declared/seen.
10887 Do not go to the original type.
10888 (dump_nested_types): New parameter forward.
10889 Generate forward declaration if needed and mark type as visited.
10890 (print_ada_declaration): Call dump_nested_types if not already done.
10891 Mark types as visited.
10892
1890bccc
JM
108932010-08-03 Joseph Myers <joseph@codesourcery.com>
10894
10895 * c.opt (-print-pch-checksum): Remove option.
10896 * c-opts.c (c_common_handle_option): Don't handle
10897 OPT_print_pch_checksum.
10898
5f20c657
JM
108992010-07-27 Joseph Myers <joseph@codesourcery.com>
10900
10901 * c-common.h (c_common_handle_option): Update prototype and return
10902 value type.
10903 * c-opts.c (c_common_handle_option): Update prototype and return
10904 value type. Update calls to handle_option and
10905 enable_warning_as_error.
10906
f551f80c
JJ
109072010-07-27 Jakub Jelinek <jakub@redhat.com>
10908
10909 PR c/45079
10910 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
10911
61ff2bdc
JM
109122010-07-27 Joseph Myers <joseph@codesourcery.com>
10913
10914 * c-common.h (c_common_missing_argument): Remove.
10915 * c-opts.c (c_common_missing_argument): Remove.
10916 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
10917 idirafter, imacros, include, isysroot, isystem, iquote): Add
10918 MissingArgError.
10919 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
10920
7a9bf9a4
JM
109212010-07-27 Joseph Myers <joseph@codesourcery.com>
10922
10923 * c-common.h (c_common_option_lang_mask,
10924 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
10925 New.
10926 (c_common_init_options): Update prototype.
10927 * c-opts.c (c_common_option_lang_mask): New.
10928 (c_common_initialize_diagnostics): Split out of
10929 c_common_init_options.
10930 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
10931 New.
10932 (c_common_init_options): Update prototype. Use decoded options in
10933 search for -lang-asm.
10934
910ad8de
NF
109352010-07-15 Nathan Froyd <froydnj@codesourcery.com>
10936
10937 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
10938 * c-format.c: Likewise.
10939
718f9c0f
MLI
109402010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
10941
10942 * c-common.h: Include diagnostic-core.h. Error if already
10943 included.
10944 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
10945
4d451982
MLI
109462010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
10947
adfac8df 10948 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
10949 Do not include expr.h
10950 (vector_mode_valid_p): Move here.
10951
119fe915
SB
109522010-06-21 DJ Delorie <dj@redhat.com>
10953
10954 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
10955 allow these pragmas anywhere.
10956
109572010-06-14 Jakub Jelinek <jakub@redhat.com>
10958
10959 PR bootstrap/44509
10960 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
10961 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
10962 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
10963 ggc_strdup instead of xstrdup.
10964
109652010-06-10 Jakub Jelinek <jakub@redhat.com>
10966
10967 * c-cppbuiltin.c: Include cpp-id-data.h.
10968 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
10969 (lazy_hex_fp_value): New function.
10970 (builtin_define_with_hex_fp_value): Provide definitions lazily.
10971
6662d794
MLI
109722010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
10973
10974 * c-gimplify.c: Do not include tree-flow.h
10975
38f8b050
JR
109762010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
10977
10978 PR other/44034
10979 * c-common.c: Rename targetm member:
10980 targetm.enum_va_list -> targetm.enum_va_list_p
10981
9589f23e
AS
109822010-06-28 Anatoly Sokolov <aesok@post.ru>
10983
10984 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
10985
3b06d379
SB
109862010-06-28 Steven Bosscher <steven@gcc.gnu.org>
10987
10988 * c-cppbuiltin.c: Do not include except.h.
10989
d166d4c3
AK
109902010-06-24 Andi Kleen <ak@linux.intel.com>
10991
9faeb493
UB
10992 * c-common.c (warn_for_omitted_condop): New.
10993 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 10994
70cb8be6
JM
109952010-06-21 Joseph Myers <joseph@codesourcery.com>
10996
10997 * c.opt (lang-objc): Remove.
10998 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
10999
a4c97feb
JR
110002010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
11001
11002 * c-opts.c: Include "tm_p.h".
11003
6e2f1956
JM
110042010-06-20 Joseph Myers <joseph@codesourcery.com>
11005
11006 * c-common.c (parse_optimize_options): Update call to
11007 decode_options.
11008
bc87224e
NF
110092010-06-18 Nathan Froyd <froydnj@codesourcery.com>
11010
11011 * c-common.c (record_types_used_by_current_var_decl): Adjust for
11012 new type of types_used_by_cur_var_decl.
11013
b49cf425
JR
110142010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
11015
11016 PR bootstrap/44512
11017 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
11018 for C++ standard compliance.
11019
59f9c2ed
JM
110202010-06-16 Jason Merrill <jason@redhat.com>
11021
11022 * c.opt: Add -Wnoexcept.
11023
33766b66
RG
110242010-06-16 Richard Guenther <rguenther@suse.de>
11025
11026 PR c/44555
11027 * c-common.c (c_common_truthvalue_conversion): Remove
11028 premature and wrong optimization concering ADDR_EXPRs.
11029
eff7e30c
AC
110302010-06-15 Arnaud Charlet <charlet@adacore.com>
11031
11032 * c-ada-spec.c (dump_sloc): Remove column info.
11033 (is_simple_enum): New function.
11034 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
11035 enum types when relevant.
11036
6312e84d
MLI
110372010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
11038
9faeb493 11039 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
11040 location.
11041
1cb42611
JM
110422010-06-10 Joseph Myers <joseph@codesourcery.com>
11043
11044 * c-opts.c (c_common_handle_option): Don't handle
11045 OPT_fshow_column.
11046
a9429e29
LB
110472010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
11048
11049 * c-pragma.c (push_alignment): Use typed GC allocation.
11050 (handle_pragma_push_options): Likewise.
11051
11052 * c-common.c (parse_optimize_options): Likewise.
11053
11054 * c-common.h (struct sorted_fields_type): Add variable_size GTY
11055 option.
11056
5498f011
JM
110572010-06-07 Joseph Myers <joseph@codesourcery.com>
11058
11059 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
11060 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
11061 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
11062 flag_signed_bitfields, warn_strict_null_sentinel,
11063 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
11064 flag_gen_declaration, flag_no_gnu_keywords,
11065 flag_implement_inlines, flag_implicit_templates,
11066 flag_implicit_inline_templates, flag_optional_diags,
11067 flag_elide_constructors, flag_default_inline, flag_rtti,
11068 flag_conserve_space, flag_access_control, flag_check_new,
11069 flag_new_for_scope, flag_weak, flag_working_directory,
11070 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
11071 flag_enforce_eh_specs, flag_threadsafe_statics,
11072 flag_pretty_templates): Remove.
11073 * c-common.h (flag_preprocess_only, flag_nil_receivers,
11074 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
11075 flag_replace_objc_classes, flag_undef, flag_no_builtin,
11076 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
11077 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
11078 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
11079 flag_no_gnu_keywords, flag_implement_inlines,
11080 flag_implicit_templates, flag_implicit_inline_templates,
11081 flag_optional_diags, flag_elide_constructors, flag_default_inline,
11082 flag_rtti, flag_conserve_space, flag_access_control,
11083 flag_check_new, flag_new_for_scope, flag_weak,
11084 flag_working_directory, flag_use_cxa_atexit,
11085 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
11086 flag_threadsafe_statics, flag_pretty_templates,
11087 warn_strict_null_sentinel): Remove.
11088 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
11089 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
11090 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
11091 fimplicit-inline-templates, fimplicit-templates,
11092 flax-vector-conversions, fms-extensions, fnil-receivers,
11093 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
11094 frtti, fshort-double, fshort-enums, fshort-wchar,
11095 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
11096 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
11097 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
11098 gen-decls, undef): Use Var.
11099 (fdefault-inline, foptional-diags): Document as doing nothing.
11100 * c-opts.c (c_common_handle_option): Remove cases for options now
11101 using Var. Mark ignored options as such.
11102
39dabefd
SB
111032010-06-05 Steven Bosscher <steven@gcc.gnu.org>
11104
9faeb493 11105 * c-common.c: Moved to here from parent directory.
39dabefd
SB
11106 * c-common.def: Likewise.
11107 * c-common.h: Likewise.
11108 * c-cppbuiltin.c: Likewise.
11109 * c-dump.c: Likewise.
11110 * c-format.c: Likewise.
11111 * c-format.h : Likewise.
11112 * c-gimplify.c: Likewise.
11113 * c-lex.c: Likewise.
11114 * c-omp.c: Likewise.
11115 * c.opt: Likewise.
11116 * c-opts.c: Likewise.
11117 * c-pch.c: Likewise.
11118 * c-ppoutput.c: Likewise.
11119 * c-pragma.c: Likewise.
11120 * c-pragma.h: Likewise.
11121 * c-pretty-print.c: Likewise.
11122 * c-pretty-print.h: Likewise.
11123 * c-semantics.c: Likewise.
11124 * stub-objc.c: Likewise.
11125
11126 * c-common.c: Include gt-c-family-c-common.h.
11127 * c-pragma.c: Include gt-c-family-c-pragma.h.
11128\f
8d9254fc 11129Copyright (C) 2010-2020 Free Software Foundation, Inc.
39dabefd
SB
11130
11131Copying and distribution of this file, with or without modification,
11132are permitted in any medium without royalty provided the copyright
11133notice and this notice are preserved.