]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
amdgcn: refactor mode iterators
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
ca6c7225
JJ
12020-03-23 Jakub Jelinek <jakub@redhat.com>
2
3 PR c++/91993
4 * c-warn.c (warnings_for_convert_and_check): For expr and/or
5 result being COMPOUND_EXPRs, skip to ultimate rhs.
6
1aa22b19
RS
72020-03-20 Richard Sandiford <richard.sandiford@arm.com>
8
9 PR middle-end/94072
10 * c-common.c (c_common_type_for_mode): Before using a registered
11 built-in type, check that the vectorness of the type matches
12 the vectorness of the mode.
13
700d4cb0
JJ
142020-03-17 Jakub Jelinek <jakub@redhat.com>
15
16 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
17 issue in a diagnostic message.
18
b408e010
LH
192020-03-15 Lewis Hyatt <lhyatt@gmail.com>
20
21 * c.opt: Avoid redundancy in the help text.
22
e78e50d5
MP
232020-03-02 Marek Polacek <polacek@redhat.com>
24
25 PR c++/93958 - add missing -std=gnu++20.
26 * c.opt: Add -std=gnu++20.
27
649e1741
MS
282020-03-01 Martin Sebor <msebor@redhat.com>
29
30 PR c++/92721
31 * c-attribs.c (append_access_attrs): Correctly handle attribute.
32 (handle_access_attribute): Same.
33
7b60f3ba
JJ
342020-02-25 Jakub Jelinek <jakub@redhat.com>
35
36 PR c/93858
37 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
38 "did you mean" hint in diagnostics.
39
fb260504
JM
402020-02-15 Jason Merrill <jason@redhat.com>
41
42 * c.opt: Add -std=c++20.
43
1d757b09
EB
442020-02-14 Eric Botcazou <ebotcazou@adacore.com>
45
46 * c-ada-spec.c: Include bitmap.h.
47 (dump_ada_double_name): Rename into...
48 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
49 (dump_ada_array_type): Adjust to above renaming. Robustify.
50 (dump_nested_types_1): New function copied from... Add dumped_types
51 parameter and pass it down to dump_nested_type.
52 (dump_nested_types): ...this. Remove parent parameter. Just call
53 dump_nested_types_1 on an automatic bitmap.
54 (dump_nested_type): Add dumped_types parameter.
55 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
56 Adjust recursive calls and adjust to above renaming.
57 (dump_ada_declaration): Adjust call to dump_nested_types.
58 Tidy up and adjust to above renaming.
59 (dump_ada_specs): Initialize and release bitmap obstack.
60
0cc575e4
MS
612020-02-10 Martin Sebor <msebor@redhat.com>
62
63 PR c/93640
64 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
65
a59aa302
JJ
662020-02-10 Jakub Jelinek <jakub@redhat.com>
67
68 PR other/93641
69 * c-format.c (check_plain): Fix up last argument of strncasecmp.
70 Remove useless extra test.
71
e464fc90
TB
722020-02-03 Julian Brown <julian@codesourcery.com>
73 Tobias Burnus <tobias@codesourcery.com>
74
75 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
76
e3b6c052
JM
772020-01-29 Jason Merrill <jason@redhat.com>
78
79 PR c++/89357
80 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
81
6d00f052
JM
822020-01-23 Jason Merrill <jason@redhat.com>
83
84 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
85
8a990ffa
MS
862020-01-23 Martin Sebor <msebor@redhat.com>
87
88 PR c/84919
89 * c-common.c (check_function_arguments): Avoid overlap checking
90 of sprintf functions.
91
55b7df8b
JM
922020-01-22 Jason Merrill <jason@redhat.com>
93
94 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
95 PR c++/40752
96 * c-warn.c (conversion_warning): Check operands only after checking
97 the whole expression. Don't check second operand of + for sign.
98
c77074d0
JM
992020-01-21 Jason Merrill <jason@redhat.com>
100 Manuel López-Ibáñez <manu@gcc.gnu.org>
101
102 PR c++/40752 - useless -Wconversion with short +=.
103 * c.opt (-Warith-conversion): New.
104 * c-warn.c (conversion_warning): Recurse for operands of
105 operators. Only warn about the whole expression with
106 -Warith-conversion.
107
731dbfc3
JM
1082020-01-21 Jason Merrill <jason@redhat.com>
109
110 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
111 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
112
ad1a3914
NS
1132020-01-20 Nathan Sidwell <nathan@acm.org>
114
115 PR preprocessor/80005
116 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
117
49789fd0
IS
1182020-01-18 Iain Sandoe <iain@sandoe.co.uk>
119
120 * c-common.c (co_await, co_yield, co_return): New.
121 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
122 RID_CO_RETURN): New enumeration values.
123 (D_CXX_COROUTINES): Bit to identify coroutines are active.
124 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
125 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
126 * c.opt (fcoroutines): New command-line switch.
127
4bc1899b
DM
1282020-01-10 David Malcolm <dmalcolm@redhat.com>
129
130 * c-format.c (local_event_ptr_node): New.
131 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
132 (init_dynamic_diag_info): Initialize local_event_ptr_node.
133 * c-format.h (T_EVENT_PTR): New define.
134
f25e33fa
MS
1352020-01-10 Martin Sebor <msebor@redhat.com>
136
137 PR c/93132
138 * c-attribs.c (append_access_attrs): Validate against the translated
139 access string rather than the human-readable representation.
140
8d9254fc
JJ
1412020-01-01 Jakub Jelinek <jakub@redhat.com>
142
143 Update copyright years.
144
39292e25
EB
1452019-12-20 Eric Botcazou <ebotcazou@adacore.com>
146
147 * c-ada-spec.h (decl_sloc): Delete.
148 * c-ada-spec.c (decl_sloc): Make static.
149
519d7496
JB
1502019-12-19 Julian Brown <julian@codesourcery.com>
151
152 * c-common.h (c_omp_map_clause_name): Add prototype.
153 * c-omp.c (c_omp_map_clause_name): New function.
154 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
155 PRAGMA_OACC_CLAUSE_DETACH.
156
a6163563
JB
1572019-12-19 Julian Brown <julian@codesourcery.com>
158 Maciej W. Rozycki <macro@codesourcery.com>
159 Tobias Burnus <tobias@codesourcery.com>
160 Thomas Schwinge <thomas@codesourcery.com>
161
162 * c-pragma.h (pragma_omp_clause): Add
163 PRAGMA_OACC_CLAUSE_NO_CREATE.
164
e8f1ade2
MS
1652019-12-17 Martin Sebor <msebor@redhat.com>
166
167 PR c++/61339
168 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
169
368877a1
DM
1702019-12-11 David Malcolm <dmalcolm@redhat.com>
171
172 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
173 implementation.
174 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
175
d68f5d45
DM
1762019-12-09 David Malcolm <dmalcolm@redhat.com>
177
178 * c-format.c (range_label_for_format_type_mismatch::get_text):
179 Replace label_text ctor called with true with label_text::take.
180
d3e28653
DM
1812019-12-09 David Malcolm <dmalcolm@redhat.com>
182
183 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
184 initial newline from expected outputs.
185 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
186 call to diagnostic_show_locus.
187
abd6d8cc
JJ
1882019-12-06 Jakub Jelinek <jakub@redhat.com>
189
190 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
191 now.
192
7906797e
MP
1932019-12-05 Marek Polacek <polacek@redhat.com>
194 Jakub Jelinek <jakub@redhat.com>
195
196 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
197 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
198
5c04da88
MP
1992019-12-05 Marek Polacek <polacek@redhat.com>
200
201 PR c++/92271 - make __is_same alias for __is_same_as.
202 * c-common.c: Add __is_same, an alias for __is_same_as.
203
43aae289
MP
2042019-12-03 Marek Polacek <polacek@redhat.com>
205
206 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
207 * c-cppbuiltin.c (c_cpp_builtins): Predefine
208 __cpp_aggregate_paren_init=201902 for -std=c++2a.
209
d7ddfbcb
JH
2102019-11-30 Jan Hubicka <hubicka@ucw.cz>
211
212 * c-attribs.c (handle_symver_attribute): New function
213 (c_common_attributes): Add symver.
214
65ef05d0
RS
2152019-11-30 Richard Sandiford <richard.sandiford@arm.com>
216
217 * c-common.c (pointer_int_sum): Use verify_type_context to check
218 whether the target allows pointer arithmetic for the types involved.
219 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
220 to check whether the target allows sizeof and alignof operations
221 for the types involved.
222
1a291106
JM
2232019-11-27 Jason Merrill <jason@redhat.com>
224
225 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
226
05d6cb1a
JJ
2272019-11-26 Jakub Jelinek <jakub@redhat.com>
228
229 PR c++/61414
230 * c-attribs.c (handle_mode_attribute): Add mode attribute to
231 ENUMERAL_TYPEs.
232
5b8d9367
JM
2332019-11-25 Joseph Myers <joseph@codesourcery.com>
234
235 PR c/91985
236 * c-common.c (c_common_type_for_mode): Handle decimal
237 floating-point types being NULL_TREE.
238 * c-format.c (get_format_for_type_1): Handle specified types being
239 NULL_TREE.
240 * c-lex.c (interpret_float): Give an error for decimal
241 floating-point constants when decimal floating-point not
242 supported.
243
1fbf51cb
JJ
2442019-11-23 Jakub Jelinek <jakub@redhat.com>
245
246 PR middle-end/83859
247 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
248 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
249 group warning with inform together.
250 (handle_access_attribute): Formatting fix.
251
761df906
JJ
2522019-11-22 Jakub Jelinek <jakub@redhat.com>
253
bdaf8be1
JJ
254 PR c/90677
255 * c-common.h (identifier_global_tag): Declare.
256 * c-format.c (get_pointer_to_named_type): Renamed to ...
257 (get_named_type): ... this. Use identifier_global_tag instead of
258 identifier_global_value, handle the return value being a TYPE_P.
259 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
260 to call get_named_type instead. Formatting fixes.
261
c2ecce6d 262 Implement P1902R1, Missing feature-test macros 2017-2019.
761df906
JJ
263 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
264 and __cpp_generic_lambdas for -std=c++2a. Define
265 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
266 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
267 __cpp_concepts for -std=c++2a.
268
54aa6b58
MS
2692019-11-22 Martin Sebor <msebor@redhat.com>
270
271 PR middle-end/83859
272 * c-attribs.c (handle_access_attribute): New function.
273 (c_common_attribute_table): Add new attribute.
274 (get_argument_type): New function.
275 (append_access_attrs): New function.
276 (get_nonnull_operand): Rename...
277 (get_attribute_operand): ...to this.
278 * c-common.c (get_nonnull_operand): Rename...
279 (get_attribute_operand): ...to this.
280
6c80b1b5
JM
2812019-11-21 Joseph Myers <joseph@codesourcery.com>
282
283 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
284 of warning.
285
192961ff
JM
2862019-11-19 Joseph Myers <joseph@codesourcery.com>
287
288 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
289 warning for standard attributes mixed with fallthrough attributes.
290
f8aea5e3
JM
2912019-11-15 Joseph Myers <joseph@codesourcery.com>
292
293 * c-attribs.c (handle_fallthrough_attribute): Remove static.
294 * c-common.h (handle_fallthrough_attribute): Declare.
295
2cc94aa8
JM
2962019-11-15 Joseph Myers <joseph@codesourcery.com>
297
298 * c-attribs.c (handle_deprecated_attribute): Remove static.
299 * c-common.h (handle_deprecated_attribute): Declare.
300
7c5890cc
JM
3012019-11-14 Joseph Myers <joseph@codesourcery.com>
302
303 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
304 char for C.
305
b2417b59
JJ
3062019-11-14 Jakub Jelinek <jakub@redhat.com>
307
d0ec7c93
JJ
308 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
309 valid vendors.
310
b2417b59
JJ
311 * c-omp.c (c_omp_check_context_selector): Handle name lists
312 containing string literals. Don't diagnose atomic_default_mem_order
313 with multiple props.
314
00be2a5f
JM
3152019-11-13 Joseph Myers <joseph@codesourcery.com>
316
317 * c-cppbuiltin.c (builtin_define_float_constants): Also define
318 NORM_MAX constants. Update call to get_max_float.
319 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
320 constants.
321
2dbad62d
EB
3222019-11-13 Eric Botcazou <ebotcazou@adacore.com>
323
324 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
325 (dump_forward_type): Do not generate a declaration for function types.
326 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
327 of the component type if it is declared in another file.
328
6ed76044
ML
3292019-11-12 Martin Liska <mliska@suse.cz>
330
331 * c-opts.c (c_common_post_options):
332 Use SET_OPTION_IF_UNSET.
333
62aee289
MR
3342019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
335 Frederik Harwath <frederik@codesourcery.com>
336
337 gcc/c-family/
338 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
339 constant.
340 * c-pragma.c (oacc_pragmas): Add "serial" entry.
341
f486280c
RS
3422019-11-08 Richard Sandiford <richard.sandiford@arm.com>
343
344 * c-common.h (gnu_vector_type_p): New function.
345 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
346 vectors to satisfy gnu_vector_type_p.
347 (c_build_vec_convert): Likewise __builtin_convertvector.
348 (convert_vector_to_array_for_subscript): Likewise when applying
349 implicit vector to array conversion.
350 (scalar_to_vector): Likewise when converting vector-scalar
351 operations to vector-vector operations.
352
017c6491
JM
3532019-11-08 Joseph Myers <joseph@codesourcery.com>
354
355 * c.opt (Wold-style-definition): Initialize to -1.
356 * c-opts.c (c_common_post_options): Set warn_old_style_definition
357 to flag_isoc2x if not set explicitly.
358
c01bd174
JM
3592019-11-07 Joseph Myers <joseph@codesourcery.com>
360
361 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
362
0df65305
JM
3632019-11-05 Jason Merrill <jason@redhat.com>
364
365 * c-opts.c (c_common_post_options): -fconcepts-ts implies
366 -fconcepts.
367
e0c866dd
KK
3682019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
369
370 * c-opts.c (c_common_post_options): Update
371 latest_abi_version.
372
f968ef9b
JJ
3732019-11-02 Jakub Jelinek <jakub@redhat.com>
374
d0c464d2
JJ
375 * c-common.h (c_omp_get_context_selector): Remove.
376 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
377 and renamed to omp_get_context_selector.
378
917dd789
JJ
379 * c-omp.c (c_omp_mark_declare_variant): Use
380 omp_context_selector_set_compare.
381
f968ef9b
JJ
382 PR c++/88335 - Implement P1073R3: Immediate functions
383 * c-common.h (enum rid): Add RID_CONSTEVAL.
384 * c-common.c (c_common_reswords): Add consteval.
385
5f6705b7
JJ
3862019-11-01 Martin Sebor <msebor@redhat.com>
387
388 PR middle-end/91679
389 PR middle-end/91647
390 PR middle-end/91463
391 PR middle-end/92312
392 * c-pretty-print.c (direct_abstract_declarator): Print
393 bound in zero-length arrays.
394 * c.opt (-Wzero-length-bounds): New option.
395
43f1814c
NS
3962019-10-30 Nathan Sidwell <nathan@acm.org>
397
398 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
399 macros.
400
ad1539d5
MS
4012019-10-28 Martin Sebor <msebor@redhat.com>
402
403 PR c/66970
404 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
405 even when only preprocessing.
406 * c-common.h (names_builtin_p): Declare new function.
407 * c-lex.c (init_c_lex): Set has_builtin.
408 (c_common_has_builtin): Define a new function.
409 * c-ppoutput.c (init_pp_output): Set has_builtin.
410
135df52c
JJ
4112019-10-24 Jakub Jelinek <jakub@redhat.com>
412
413 * c-common.h (c_omp_context_selector_matches): Remove.
414 * c-omp.c (c_omp_context_selector_matches): Remove.
415 * c-attribs.c (c_common_attribute_table): Add
416 "omp declare target {host,nohost,block}" attributes.
417
8ad0c477
JM
4182019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
419
420 * c-lex.c (c_common_has_attribute): Update nodiscard value.
421
56898e43
RS
4222019-10-14 Richard Sandiford <richard.sandiford@arm.com>
423
424 * c-common.h (user_facing_original_type_p): Declare.
425 * c-common.c: Include c-spellcheck.h.
426 (user_facing_original_type_p): New function.
427
20de9568
JJ
4282019-10-12 Jakub Jelinek <jakub@redhat.com>
429
430 * c-common.h (c_omp_mark_declare_variant,
431 c_omp_context_selector_matches): Declare.
432 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
433 and hsa-common.h.
434 (c_omp_get_context_selector): Support second argument NULL.
435 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
436 functions.
437 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
438 attribute, add "omp declare variant base" and
439 "omp declare variant variant" attributes.
440
175a85b2
JM
4412019-10-11 Joseph Myers <joseph@codesourcery.com>
442
443 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
444 CppReason(CPP_W_C11_C2X_COMPAT).
445
fe2bc27c
JM
4462019-10-11 Joseph Myers <joseph@codesourcery.com>
447
448 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
449 _Decimal64 and _Decimal128.
450
27dfdc0f
JM
4512019-10-10 Joseph Myers <joseph@codesourcery.com>
452
453 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
454 types if DFP not supported.
455
94e7f906
JJ
4562019-10-10 Jakub Jelinek <jakub@redhat.com>
457
458 * c-common.h (c_omp_check_context_selector,
459 c_omp_get_context_selector): Declare.
460 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
461 in diagnostic message.
462 (c_omp_check_context_selector, c_omp_get_context_selector): New
463 functions.
464 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
465 attribute.
466 (handle_omp_declare_variant_attribute): New function.
467
a7160771
MS
4682019-10-09 Martin Sebor <msebor@redhat.com>
469
470 PR tree-optimization/90879
471 * c.opt (-Wstring-compare): New option.
472
cb57504a
JM
4732019-10-08 Andrew Sutton <asutton@lock3software.com>
474 Jason Merrill <jason@redhat.com>
475
476 Update the concepts implementation to conform to the C++20
477 specification, improve compile times, and generally clean up
478 the implementation.
479
480 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
481 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
482 * c.opt: Add -Wconcepts-ts.
483 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
484 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
485 (set_std_cxx2a): Enable concepts by default.
486
fbb2a6dc
JM
4872019-10-08 Joseph Myers <joseph@codesourcery.com>
488
489 * c-opts.c (c_common_post_options): Set
490 -fno-fp-int-builtin-inexact for C2X.
491
8e007055
JJ
4922019-10-05 Jakub Jelinek <jakub@redhat.com>
493
494 PR c++/91369 - Implement P0784R7: constexpr new
495 * c-cppbuiltin.c (c_cpp_builtins): Predefine
496 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
497
843f104d
JM
4982019-10-04 Joseph Myers <joseph@codesourcery.com>
499
500 PR c/82752
501 * c-format.c (C_STD_VER): Handle C2x.
502 (C_STD_NAME): Likewise.
503 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
504 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
505 modifier allowed and 'p' flag.
506 * c-format.h (enum format_std_version): Add STD_C2X.
507 (struct format_char_info): Mention 'p' in comment on flags2.
508
e9c9a142
DM
5092019-10-01 David Malcolm <dmalcolm@redhat.com>
510
511 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
512 calling diagnostic_show_locus, rather than destroying it afterwards.
513
7552c36a
JJ
5142019-10-01 Jakub Jelinek <jakub@redhat.com>
515
516 PR c++/91925
517 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
518 with NULL DECL_FIELD_OFFSET.
519
8209db25
RS
5202019-10-01 Richard Sandiford <richard.sandiford@arm.com>
521
522 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
523 has a type name, use it in preference to the __vector syntax.
524
9343bf99
RS
5252019-09-30 Richard Sandiford <richard.sandiford@arm.com>
526
527 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
528 two spaces between a comma and "...".
529
59bc434a
JJ
5302019-09-27 Jakub Jelinek <jakub@redhat.com>
531
532 PR c++/88203
533 * c-common.h (c_omp_predefined_variable): Declare.
534 * c-omp.c (c_omp_predefined_variable): New function.
535 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
536 for predefined variables.
537
c6447c20
RS
5382019-09-27 Richard Sandiford <richard.sandiford@arm.com>
539
540 * c-common.h (build_function_call_vec): Take the original
541 function decl as an optional final parameter.
542 (check_builtin_function_arguments): Take the original function decl.
543 * c-common.c (check_builtin_function_arguments): Likewise.
544 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
545 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
546
c4438114
JM
5472019-09-15 Jason Merrill <jason@redhat.com>
548
549 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
550 fold_for_warn in "|| mask" warning.
551
68a57628
ML
5522019-09-10 Martin Liska <mliska@suse.cz>
553
554 * c.opt: Use newly added WarnRemoved.
555
f48ef52e
ML
5562019-09-09 Martin Liska <mliska@suse.cz>
557
558 * c.opt: Update comment of removed
559 options that are preserved only for backward
560 compatibility.
561
67f6e649
ML
5622019-09-06 Martin Liska <mliska@suse.cz>
563
564 PR c++/91125
565 * c-common.c: Remove definition of flag_use_repository.
566 * c-common.h: Likewise.
567 * c-opts.c (c_common_handle_option):
568 Do not handle OPT_frepo option.
569 * c.opt: Mark the option with Deprecated.
570
db9d2274
MP
5712019-09-04 Marek Polacek <polacek@redhat.com>
572
573 * c.opt (fdeduce-init-list): Ignored.
574
68e2c199
PK
5752019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
576
577 PR c/78736
578 * c.opt (Wenum-conversion): New option.
579
7a4418a5
JL
5802019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
581
582 * c-attribs.c (handle_section_attribute): Call the
583 handle_generic_attribute target hook after performing target
584 independent processing.
585 (handle_noinit_attribute): Likewise.
586
5f76ab15
ILT
5872019-09-03 Ian Lance Taylor <iant@golang.org>
588
589 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
590 when using -fgo-dump-spec.
591
ae0d3f6a
ML
5922019-09-02 Martin Liska <mliska@suse.cz>
593
594 PR c++/91155
595 * c-common.c (fname_as_string): Use cxx_printable_name for
596 __PRETTY_FUNCTION__ same as was used before r265711.
597
8a902edb
MP
5982019-08-28 Marek Polacek <polacek@redhat.com>
599
600 Implement P1152R4: Deprecating some uses of volatile.
601 PR c++/91361
602 * c-opts.c (c_common_post_options): Enable -Wvolatile by
603 default for C++2a, unless -Wno-deprecated.
604 * c.opt (Wvolatile): New warning.
605
4742dbe7
MP
6062019-08-28 Marek Polacek <polacek@redhat.com>
607
608 PR c++/91360 - Implement C++20 P1143R2: constinit.
609 * c-common.c (c_common_reswords): Add constinit and __constinit.
610 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
611 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
612 RID_LAST_CXX20.
613 (D_CXX20): Define.
614 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
615 * c-format.c (cxx_keywords): Add "constinit".
616 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
617
6a074892
JJ
6182019-08-27 Jakub Jelinek <jakub@redhat.com>
619
620 PR c++/91415
621 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
622 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
623 like COMPOUND_EXPR rather than normal expression.
624
22f8849d
IS
6252019-08-23 Iain Sandoe <iain@sandoe.co.uk>
626
627 PR pch/61250
628 * c-lex.c (c_lex_with_flags): Don't call
629 c_common_no_more_pch () from here.
630
df375b03
JJ
6312019-08-23 Jakub Jelinek <jakub@redhat.com>
632
633 PR middle-end/91283
634 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
635 instead of flag_excess_precision_cmdline.
636 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
637 * c-opts.c (c_common_post_options): Likewise.
638
14b7950f
MS
6392019-08-22 Martin Sebor <msebor@redhat.com>
640
641 PR middle-end/91490
642 * c-common.c (braced_list_to_string): Add argument and overload.
643 Handle flexible length arrays and unions.
644
8bb2ee59
EB
6452019-08-21 Eric Botcazou <ebotcazou@adacore.com>
646
647 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
648 function declarations where arguments are missing. Rename variables.
649
21c1e205
RB
6502019-08-15 Richard Biener <rguenther@suse.de>
651
652 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
653 enabled, define __SIZETYPE__.
654
f0033821
CL
6552019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
656
657 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
658 exclusion with "section" attribute.
659 (attr_noinit_exclusions): New table.
660 (handle_noinit_attribute): New function.
661
4d732405
RS
6622019-08-13 Richard Sandiford <richard.sandiford@arm.com>
663
664 PR middle-end/91421
665 * c-common.c (resolve_overloaded_builtin): Use
666 copy_decl_built_in_function.
667
51ad8481
MS
6682019-08-13 Martin Sebor <msebor@redhat.com>
669
670 PR c/80619
671 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
672 (asm_fprintf_length_spec): Same.
673 * c-format.h (format_lengths): Add FMT_LEN_w.
674
77eb117f
JJ
6752019-08-10 Jakub Jelinek <jakub@redhat.com>
676
677 * c-pragma.h (enum pragma_omp_clause): Add
678 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
679
398e3feb
JJ
6802019-08-07 Jakub Jelinek <jakub@redhat.com>
681
682 * c-pragma.h (enum pragma_omp_clause): Add
683 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
684 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
685 enumeration value.
686
ab574db6
MP
6872019-08-05 Marek Polacek <polacek@redhat.com>
688
689 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
690 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
691 default for C++2a, unless -Wno-deprecated.
692 * c.opt (Wcomma-subscript): New warning.
693
554a530f
JJ
6942019-07-20 Jakub Jelinek <jakub@redhat.com>
695
696 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
697 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
698 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
699 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
700 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
701 constructs with the loop construct.
702
1a888209
JJ
7032019-07-13 Jakub Jelinek <jakub@redhat.com>
704
705 PR c/91149
706 * c-omp.c (c_omp_split_clauses): Fix a pasto in
707 OMP_CLAUSE_REDUCTION_TASK handling.
708
1fdd6f04
JJ
7092019-07-12 Jakub Jelinek <jakub@redhat.com>
710
711 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
712 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
713
99b1c316
MS
7142019-07-09 Martin Sebor <msebor@redhat.com>
715
716 PR c++/61339
1fdd6f04 717 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
718 and others to class.
719 * c-pretty-print.h: Same.
720
6c1dae73
MS
7212019-07-09 Martin Sebor <msebor@redhat.com>
722
723 PR c++/61339
724 * c-format.c (check_argument_type): Change class-key from class to
725 struct and vice versa to match convention and avoid -Wclass-is-pod
726 and -Wstruct-no-pod.
727 * c-pretty-print.h: Same.
728
8ba6ea87
ML
7292019-07-03 Martin Liska <mliska@suse.cz>
730
731 * c-common.c (try_to_locate_new_include_insertion_point): Remove
732 dead assignemts.
733
83eb9522
JJ
7342019-07-03 Jakub Jelinek <jakub@redhat.com>
735
736 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
737 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
738 with OMP_PARALLEL.
739
1c6ffbab
QZ
7402019-07-02 qing zhao <qing.zhao@oracle.com>
741
742 PR preprocessor/90581
743 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
744 * c.opt: Add new option -fmax-include-depth.
745
7ffc7de5
JM
7462019-06-26 Jason Merrill <jason@redhat.com>
747
748 PR c++/55442 - memory-hog with highly recursive constexpr.
749 * c.opt (fconstexpr-loop-limit): New.
750
361af3e4
JJ
7512019-06-25 Jakub Jelinek <jakub@redhat.com>
752
753 PR sanitizer/90954
754 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
755 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
756
ab20d992
JJ
7572019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
758
759 * c-common.c (c_common_nodes_and_builtins): Define
760 alternate "__intN__" name for "__intN" types.
761
f4af4019
JH
7622019-06-24 Jan Hubicka <jh@suse.cz>
763
764 * c-common.c (braced_lists_to_strings): Check that
765 type is array or integer prior checking string flag.
766
da9e9b57
MB
7672019-06-21 Matthew Beliveau <mbelivea@redhat.com>
768
769 PR c++/90875 - added -Wswitch-outside-range option
770 * c.opt (Wswitch-outside-range): Added new option.
771 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
772
3f3d6a6f
MP
7732019-06-21 Marek Polacek <polacek@redhat.com>
774
775 PR c++/90953 - ICE with -Wmissing-format-attribute.
776 * c-common.c (check_function_arguments_recurse): Use
777 get_attribute_name.
778 (check_missing_format_attribute): Likewise.
779
1bf32c11
MP
7802019-06-19 Marek Polacek <polacek@redhat.com>
781
782 PR c++/60364 - noreturn after first decl not diagnosed.
783 * c-attribs.c (handle_noreturn_attribute): No longer static.
784 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
785 Declare.
786 * c-format.c (check_function_format): Use get_attribute_name.
787
a04c0734
MS
7882019-06-19 Martin Sebor <msebor@redhat.com>
789
790 PR translation/90156
791 * c-format.c (function_format_info::format_type): Adjust type.
792 (function_format_info::is_raw): New member.
793 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
794 (decode_format_attr): Adjust call to decode_format_type.
795 Avoid a redundant call to convert_format_name_to_system_name.
796 Avoid abbreviating the word "arguments" in a diagnostic.
797 (format_warning_substr): New function.
798 (avoid_dollar_number): Quote dollar sign in a diagnostic.
799 (finish_dollar_format_checking): Same.
800 (check_format_info): Same.
801 (struct baltoks_t): New.
802 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
803 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
804 functions.
805 (check_format_info_main): Call check_plain. Use baltoks_t. Call
806 maybe_diag_unbalanced_tokens.
807 (handle_format_attribute): Spell out the word "arguments" in
808 a diagnostic.
809
d3786ebb
MB
8102019-06-11 Matthew Beliveau <mbelivea@redhat.com>
811
812 PR c++/90449 - add -Winaccessible-base option.
813 * c.opt (Winaccessible-base): New option.
814
bf38f7e9
JJ
8152019-06-10 Jakub Jelinek <jakub@redhat.com>
816
817 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
818 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
819 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
820 combined/composite constructs where it is not allowed. Copy over
821 OMP_CLAUSE_REDUCTION_INSCAN.
822
0ecf545c
MS
8232019-06-05 Martin Sebor <msebor@redhat.com>
824
825 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
826 (handle_alias_ifunc_attribute): Same.
827 (handle_copy_attribute): Same.
828 (handle_weakref_attribute): Same.
829 (handle_nonnull_attribute): Same.
830 * c-warn.c (warn_for_sign_compare): Same.
831 (warn_for_restrict): Same.
832 * c.opt: Same.
833
36b34127
MS
8342019-06-05 Martin Sebor <msebor@redhat.com>
835
836 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
837 * c.opt (-Wformat-diag): Remove a spurious period.
838
357a352f
JJ
8392019-05-29 Jakub Jelinek <jakub@redhat.com>
840
841 PR c/90628
842 * c-common.c (check_builtin_function_arguments)
843 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
844 as last argument.
845
2b8235ea
EB
8462019-05-23 Eric Botcazou <ebotcazou@adacore.com>
847
848 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
849
6d86ddc4
ML
8502019-05-22 Martin Liska <mliska@suse.cz>
851
852 PR lto/90500
853 * c-attribs.c (handle_copy_attribute): Do not copy
854 target_clones attribute.
855
419ba5b9
EB
8562019-05-21 Eric Botcazou <ebotcazou@adacore.com>
857
858 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
859 * c-ada-spec.c (print_assignment_operator): New function.
860 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
861 assignment operators declared as methods and filter out the others.
862
e03436e7
TS
8632019-05-17 Thomas Schwinge <thomas@codesourcery.com>
864
865 PR c/89433
866 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
867 "omp declare target".
868
a9c697b8
MS
8692019-05-16 Martin Sebor <msebor@redhat.com>
870
ab20d992
JJ
871 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
872 keywords, operators, and types in diagnostics.
873 (handle_scalar_storage_order_attribute): Same.
874 (handle_mode_attribute): Same.
875 (handle_visibility_attribute): Same.
876 (handle_assume_aligned_attribute): Same.
877 (handle_no_split_stack_attribute): Same.
878 * c-common.c (shorten_compare): Same.
879 (c_common_truthvalue_conversion): Same.
880 (cb_get_source_date_epoch): Same.
881 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
882 in diagnostics.
883 (interpret_float): Same.
884 * c-omp.c (c_finish_omp_for): Same.
885 * c-opts.c (c_common_post_options): Same.
886 * c-pch.c (c_common_pch_pragma): Same.
887 * c-pragma.c (pop_alignment): Same.
888 (handle_pragma_pack): Same.
889 (apply_pragma_weak): Same.
890 (handle_pragma_weak): Same.
891 (handle_pragma_scalar_storage_order): Same.
892 (handle_pragma_redefine_extname): Same.
893 (add_to_renaming_pragma_list): Same.
894 (maybe_apply_renaming_pragma): Same.
895 (push_visibility): Same.
896 (handle_pragma_visibility): Same.
897 (handle_pragma_optimize): Same.
898 (handle_pragma_message): Same.
899 * c-warn.c (warn_for_omitted_condop): Same.
900 (lvalue_error): Same.
a9c697b8 901
6b943512
RB
9022019-05-15 Richard Biener <rguenther@suse.de>
903
904 PR c/90474
905 * c-common.c (c_common_mark_addressable_vec): Also mark
906 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
907 c_mark_addressable.
ab20d992 908
b744fc85
NS
9092019-05-06 Nathan Sidwell <nathan@acm.org>
910
911 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
912
598f50d7
NS
9132019-04-30 Nathan Sidwell <nathan@acm.org>
914
915 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
916
5bcc5a3b
ML
9172019-04-30 Martin Liska <mliska@suse.cz>
918
919 * c-pragma.c (handle_pragma_diagnostic): Provide hints
920 for unknown options.
921
e78a87f7
RS
9222019-04-26 Richard Sandiford <richard.sandiford@arm.com>
923
924 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
925 the pointer target rather than the pointer itself.
926
c280b7ee
JJ
9272019-04-19 Jakub Jelinek <jakub@redhat.com>
928
929 PR c/89888
930 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
931 arguments.
932 (c_do_switch_warnings): Remove outside_range_p argument.
933 * c-common.c (check_case_bounds): Removed.
934 (c_add_case_label): Remove orig_type and outside_range_p arguments.
935 Don't call check_case_bounds. Fold low_value as well as high_value.
936 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
937 Check for case labels outside of range of original type here and
938 adjust them.
939
8e8225e6
JJ
9402019-04-12 Jakub Jelinek <jakub@redhat.com>
941
63b8a166
JJ
942 PR translation/90041
943 * c.opt (-fhandle-exceptions): Use %< and %> around option names
944 in the Warn diagnostics.
945
8e8225e6
JJ
946 PR c/89946
947 * c-attribs.c (handle_patchable_function_entry_attribute): Add
948 function comment. Warn if arguments of the attribute are not positive
949 integer constants.
950
53a3f614
EB
9512019-04-09 Eric Botcazou <ebotcazou@adacore.com>
952
953 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
954 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
955
22be5873
EB
9562019-04-07 Eric Botcazou <ebotcazou@adacore.com>
957
958 * c-ada-spec.c (is_float128): New predicate extracted from...
959 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
960 <REAL_TYPE>: ...here. Call it.
961
34facf20
DM
9622019-04-05 David Malcolm <dmalcolm@redhat.com>
963
964 PR c/89985
965 * c-warn.c (check_address_or_pointer_of_packed_member): Add
966 auto_diagnostic_group. Guard inform calls by result of
967 warning_at call.
968
05564120
MP
9692019-04-05 Marek Polacek <polacek@redhat.com>
970
ab20d992 971 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
05564120
MP
972 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
973 of RHS.
974
7a506c3c
JM
9752019-04-03 Jason Merrill <jason@redhat.com>
976
977 PR c++/86586 - -fcompare-debug=-Wsign-compare.
978 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
979
ddeae8c8
MS
9802019-04-01 Martin Sebor <msebor@redhat.com>
981
982 PR c/89685
983 * c-attribs.c (handle_copy_attribute): Handle references and
984 non-constant expressions.
985
a15ffa22
JJ
9862019-03-22 Jakub Jelinek <jakub@redhat.com>
987
988 PR c++/87481
989 * c.opt (-fconstexpr-ops-limit=): New option.
990
36a3a7a3
JJ
9912019-03-21 Jakub Jelinek <jakub@redhat.com>
992
993 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
994 template param.
995
bec1da64
MS
9962019-03-19 Martin Sebor <msebor@redhat.com>
997
998 PR tree-optimization/89688
999 * c-common.c (braced_list_to_string): Make static.
1000 (braced_lists_to_strings): Define new function.
1001 * c-common.h (braced_list_to_string): Remove.
1002 (braced_lists_to_strings): Declare.
1003
1fe61adf
ML
10042019-03-12 Martin Liska <mliska@suse.cz>
1005
1006 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
1007
93964ebd
ML
10082019-03-11 Martin Liska <mliska@suse.cz>
1009
1010 * c-opts.c (c_common_post_options): Wrap apostrophes
1011 in gcc internal format with %'.
1012
a3f9f006
ML
10132019-03-11 Martin Liska <mliska@suse.cz>
1014
1015 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
1016 in a string format message and fix GNU coding style.
1017 * c-common.c (vector_types_convertible_p): Likewise.
1018 (c_build_vec_perm_expr): Likewise.
1019 * c-indentation.c (get_visual_column): Likewise.
1020 * c-opts.c (c_common_handle_option): Likewise.
1021 (c_common_post_options): Likewise.
1022 (sanitize_cpp_opts): Likewise.
1023 * c-pch.c (c_common_pch_pragma): Likewise.
1024 * c-pragma.c (handle_pragma_pack): Likewise.
1025
1db01ff9
JJ
10262019-03-08 Jakub Jelinek <jakub@redhat.com>
1027
1028 PR tree-optimization/89550
1029 * c-common.c (c_common_truthvalue_conversion): Only set
1030 TREE_NO_WARNING if warning_at returned true.
1031 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
1032
ba790e6f
JJ
10332019-02-25 Sandra Loosemore <sandra@codesourcery.com>
1034 Martin Sebor <msebor@gmail.com>
1035
1036 * c.opt (Wmissing-attributes): Clean up doc string.
1037
7da73ba7
JJ
10382019-02-25 Jakub Jelinek <jakub@redhat.com>
1039
1040 PR c/89495
1041 * c-format.c (maybe_read_dollar_number): Compute nargnum in
1042 HOST_WIDE_INT type to avoid overflows and change overflow_flag
1043 checking.
1044
921bb9d1
RB
10452019-02-22 Richard Biener <rguenther@suse.de>
1046
1047 * c-pch.c (no_checksum): Remove.
1048 (pch_init): Remove assertion that executable_checksum is not
1049 all zero.
1050 (c_common_valid_pch): Likewise.
1051
e2ebb05c
MS
10522019-02-18 Martin Sebor <msebor@redhat.com>
1053
1054 PR middle-end/89294
1055 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
1056
3fe53000
DM
10572019-02-16 David Malcolm <dmalcolm@redhat.com>
1058
1059 PR c++/88680
1060 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
1061 implementing -Wtype-limits.
1062
28a8cef1
MS
10632019-02-11 Martin Sebor <msebor@redhat.com>
1064
1065 PR c++/87996
1066 * c-common.c (invalid_array_size_error): New function.
1067 (valid_array_size_p): Call it. Handle size as well as type.
1068 * c-common.h (valid_constant_size_p): New function.
1069 (enum cst_size_error): New type.
1070
ec2be203
DM
10712019-01-31 David Malcolm <dmalcolm@redhat.com>
1072
1073 PR c/89122
1074 * known-headers.cc (get_stdlib_header_for_name): Add
1075 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
1076
8936f047
JJ
10772019-01-31 Jakub Jelinek <jakub@redhat.com>
1078
1079 PR libstdc++/88170
1080 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
1081 a C cast in pp_c_flag_gnu_v3 mode.
1082
6a335b96
JJ
10832019-01-29 Jakub Jelinek <jakub@redhat.com>
1084
1085 PR c/86125
1086 * c-common.c (c_common_nodes_and_builtins): Build type variants for
1087 builtin_structptr_types types even for C.
1088
2a06eba5
BE
10892019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
1090
1091 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
1092 when rhs is of array type correctly. Fix handling of nested structures.
1093 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
1094 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
1095 type casts within nested compound expressions.
1096
18a23298
JJ
10972019-01-22 Jakub Jelinek <jakub@redhat.com>
1098
1099 PR middle-end/88968
1100 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
1101 variable after using BIT_FIELD_REF.
1102
420183d9
L
11032019-01-18 H.J. Lu <hongjiu.lu@intel.com>
1104
1105 PR c/51628
1106 PR c/88664
1107 * c-common.h (warn_for_address_or_pointer_of_packed_member):
1108 Remove the boolean argument.
1109 * c-warn.c (check_address_of_packed_member): Renamed to ...
1110 (check_address_or_pointer_of_packed_member): This. Also
1111 warn pointer conversion.
1112 (check_and_warn_address_of_packed_member): Renamed to ...
1113 (check_and_warn_address_or_pointer_of_packed_member): This.
1114 Also warn pointer conversion.
1115 (warn_for_address_or_pointer_of_packed_member): Remove the
1116 boolean argument. Don't check pointer conversion here.
1117
99063eee
RS
11182019-01-15 Richard Sandiford <richard.sandiford@arm.com>
1119
1120 PR inline-asm/52813
1121 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
1122
a30d0196
JJ
11232019-01-14 Jakub Jelinek <jakub@redhat.com>
1124
1125 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
1126 and __cpp_nontype_template_parameter_auto. Add a comment that
1127 __cpp_template_auto is deprecated.
1128
2d91f79d
TH
11292019-01-14 Tom Honermann <tom@honermann.net>
1130
1131 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
1132 * c-common.c (c_common_reswords): Add char8_t.
1133 (fix_string_type): Use char8_t for the type of u8 string literals.
1134 (c_common_get_alias_set): char8_t doesn't alias.
1135 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
1136 C++.
1137 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
1138 (keyword_begins_type_specifier): Add RID_CHAR8.
1139 * c-common.h (rid): Add RID_CHAR8.
1140 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
1141 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
1142 Define char8_type_node and char8_array_type_node.
1143 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
1144 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
1145 (c_cpp_builtins): Predefine __cpp_char8_t.
1146 * c-lex.c (lex_string): Use char8_array_type_node as the type of
1147 CPP_UTF8STRING.
1148 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
1149 * c-opts.c: If not otherwise specified, enable -fchar8_t when
1150 targeting C++2a.
1151 * c.opt: Add the -fchar8_t command line option.
1152
23db6ced
MS
11532019-01-14 Martin Sebor <msebor@redhat.com>
1154
1155 PR target/88638
1156 * c-attribs.c (positional_argument): Call valid_format_string_type_p
1157 and issue errors if it fails.
1158 * c-common.h (valid_format_string_type_p): Declare.
1159 * c-format.c (valid_stringptr_type_p): Rename...
1160 (valid_format_string_type_p): ...to this and make extern.
1161 (handle_format_arg_attribute): Adjust to new name.
1162 (check_format_string): Same.
1163
234c3818
L
11642019-01-13 H.J. Lu <hongjiu.lu@intel.com>
1165
1166 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
1167 Replace "may may" with "may" in warning message.
1168
d8fcab68
JJ
11692019-01-07 Jakub Jelinek <jakub@redhat.com>
1170
1171 PR c++/85052
1172 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
1173 (c_build_vec_convert): Declare.
1174 * c-common.c (c_build_vec_convert): New function.
1175
29d24852
MS
11762019-01-04 Martin Sebor <msebor@redhat.com>
1177
1178 PR c/88546
1179 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
1180 Handle C++ empty throw specification and C11 _Noreturn.
1181 (has_attribute): Also handle C11 _Noreturn.
1182
9069a4c9
MS
11832019-01-04 Martin Sebor <msebor@redhat.com>
1184
1185 PR c/88363
1186 * c-attribs.c (positional_argument): Also accept enumerated types.
1187
a5544970
JJ
11882019-01-01 Jakub Jelinek <jakub@redhat.com>
1189
1190 Update copyright years.
1191
da77eace
L
11922018-12-20 H.J. Lu <hongjiu.lu@intel.com>
1193
1194 PR c/51628
1195 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
1196 * c-warn.c (check_alignment_of_packed_member): New function.
1197 (check_address_of_packed_member): Likewise.
1198 (check_and_warn_address_of_packed_member): Likewise.
1199 (warn_for_address_or_pointer_of_packed_member): Likewise.
1200 * c.opt: Add -Wno-address-of-packed-member.
1201
573767d4
DM
12022018-12-20 David Malcolm <dmalcolm@redhat.com>
1203
1204 PR c++/87504
1205 * c-warn.c (get_outermost_macro_expansion): New function.
1206 (spelled_the_same_p): Use it to unwind the macro expansions, and
1207 compare the outermost macro in each nested expansion, rather than
1208 the innermost.
1209
a14feb3c
DM
12102018-12-19 David Malcolm <dmalcolm@redhat.com>
1211
1212 PR c++/87504
1213 * c-common.h (warn_tautological_cmp): Convert 1st param from
1214 location_t to const op_location_t &.
1215 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
1216 when testing for INTEGER_CST.
1217 (warn_tautological_bitwise_comparison): Convert 1st param from
1218 location_t to const op_location_t &; use it to build a
1219 binary_op_rich_location, and use this.
1220 (spelled_the_same_p): New function.
1221 (warn_tautological_cmp): Convert 1st param from location_t to
1222 const op_location_t &. Warn for macro expansions if
1223 spelled_the_same_p. Use binary_op_rich_location.
1224
dfd7fdca
DM
12252018-12-19 David Malcolm <dmalcolm@redhat.com>
1226
1227 PR c++/43064
1228 PR c++/43486
1229 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
1230 (verify_tree): Handle location wrappers.
1231 (c_common_truthvalue_conversion): Strip any location wrapper.
1232 Handle CONST_DECL.
1233 (fold_offsetof): Strip any location wrapper.
1234 (complete_array_type): Likewise for initial_value.
1235 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
1236 index before checking for INTEGER_CST.
1237 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
1238 print parentheses around location wrappers.
1239 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
1240 before checking for INTEGER_CST.
1241 (warn_tautological_bitwise_comparison): Call
1242 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
1243 before checking for INTEGER_CST.
1244 (readonly_error): Strip any location wrapper.
1245 (warn_array_subscript_with_type_char): Strip location wrappers
1246 before checking for INTEGER_CST. Use the location of the index if
1247 available.
1248
5c8b3702
JM
12492018-12-06 Jason Merrill <jason@redhat.com>
1250
1251 PR c++/88136 - -Wdeprecated-copy false positives
1252 * c.opt (Wdeprecated-copy-dtor): New.
1253 (Wdeprecated-copy): Move to -Wextra.
1254
673670da
MS
12552018-11-29 Martin Sebor <msebor@redhat.com>
1256
1257 PR c/88172
1258 PR testsuite/88208
1259 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
1260 alignments to values less than the target requires.
1261 (has_attribute): For attribute aligned consider both the attribute
1262 and the alignment bits.
1263 * c-common.c (c_init_attributes): Optionally issue a warning for
1264 zero alignment.
1265
04864ec8
MS
12662018-11-28 Martin Sebor <msebor@redhat.com>
1267
1268 PR c/88065
1269 PR c/87297
1270 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
1271 or destination is an error.
1272
ace83db0
JJ
12732018-11-28 Jakub Jelinek <jakub@redhat.com>
1274
1275 PR c++/88215
1276 * c-ubsan.c: Include langhooks.h.
1277 (ubsan_instrument_division): Change gcc_assert that main variants
1278 of op0 and op1 types are equal to gcc_checking_assert that the
1279 main variants are compatible types.
1280
da193a27
EB
12812018-11-27 Eric Botcazou <ebotcazou@adacore.com>
1282
1283 * c-ada-spec.c: Include stringpool.h.
1284 (has_static_fields): Return false for incomplete types.
1285 (is_tagged_type): Likewise.
1286 (has_nontrivial_methods): Likewise.
1287 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
1288 (struct overloaded_name_hash): New structure.
1289 (struct overloaded_name_hasher): Likewise.
1290 (overloaded_names): New global variable.
1291 (init_overloaded_names): New static function.
1292 (overloaded_name_p): New predicate.
1293 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
1294 on the TYPE_STUB_DECL of the original type of a typedef, if any.
1295 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
1296 Remove always-true condition and dump forward types.
1297 (dump_ada_specs): Delete overloaded_names.
1298
98f08eb8
MS
12992018-11-20 Martin Sebor <msebor@redhat.com>
1300
1301 * c-attribs.c (type_for_vector_size): New function.
1302 (type_valid_for_vector_size): Same.
1303 (handle_vector_size_attribute): Move code to the functions above
1304 and call them.
1305 (validate_attribute, has_attribute): New functions.
1306 * c-common.h (has_attribute): Declare.
1307 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
1308 * c-common.c (c_common_resword): Same.
1309
2674fa47
JM
13102018-11-16 Jason Merrill <jason@redhat.com>
1311
1312 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
1313 * c-attribs.c (attr_cold_hot_exclusions): Make public.
1314
258b3854
JJ
13152018-11-16 Jakub Jelinek <jakub@redhat.com>
1316
1317 PR middle-end/87854
1318 * c-common.c (fix_string_type): Reject string literals larger than
1319 TYPE_MAX_VALUE (ssizetype) bytes.
1320
1d249509
MS
13212018-11-15 Martin Sebor <msebor@redhat.com>
1322
1323 PR c++/87541
1324 PR c++/87542
1325 * c-attribs.c (positional_argument): New function.
1326 (handle_alloc_size_attribute): Use it and simplify.
1327 (handle_alloc_align_attribute): Same.
1328 (handle_assume_aligned_attribute): Same.
1329 (handle_nonnull_attribute): Same.
1330 * c-common.c (check_function_arguments): Pass fntype to
1331 check_function_format.
1332 * c-common.h (check_function_format): Add an argument.
1333 (PosArgFlags, positional_argument): Declare new type and function.
1334 * c-format.c (decode_format_attr): Add arguments.
1335 (check_format_string, get_constant): Same.
1336 (convert_format_name_to_system_name): Adjust.
1337
478dd60d
DM
13382018-11-15 David Malcolm <dmalcolm@redhat.com>
1339
1340 PR other/19165
1341 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
1342
8cca0163
JJ
13432018-11-14 Jakub Jelinek <jakub@redhat.com>
1344
8ee09943
JJ
1345 P1236R1 - Signed integers are two's complement
1346 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
1347 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
1348 with in-range second operand well defined for -std=c++2a.
1349
8cca0163
JJ
1350 PR other/88007
1351 * c-common.c (parse_optimize_options): Allocate option string from
1352 opts_obstack rather than as GC memory. Move the allocation after
1353 warning for invalid option.
1354
620e594b
DM
13552018-11-13 David Malcolm <dmalcolm@redhat.com>
1356
1357 * c-common.c (c_get_substring_location): Update for renaming of
1358 get_source_location_for_substring to get_location_within_string.
1359 * c-lex.c: Replace "source_location" with "location_t".
1360 * c-opts.c: Likewise.
1361 * c-ppoutput.c: Likewise.
1362
f9731de3
MS
13632018-11-13 Martin Sebor <msebor@redhat.com>
1364
1365 PR middle-end/81824
1366 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
1367 (handle_tls_model_attribute): Improve diagnostics.
1368
e4bd6d5e
JM
13692018-11-12 Jason Merrill <jason@redhat.com>
1370
a6bb6b07
JM
1371 * c-cppbuiltin.c (c_cpp_builtins): Define
1372 __cpp_impl_destroying_delete.
1373
e4bd6d5e
JM
1374 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
1375 __cpp_conditional_explicit.
1376
79a2c428
MS
13772018-11-09 Martin Sebor <msebor@redhat.com>
1378
1379 PR middle-end/81824
1380 * c-attribs.c (handle_copy_attribute): New function.
1381
4c7bd361
MS
13822018-11-09 Martin Sebor <msebor@redhat.com>
1383
1384 PR c/87795
1385 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
1386
28567c40
JJ
13872018-11-08 Jakub Jelinek <jakub@redhat.com>
1388
1389 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
1390 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
1391 enum omp_memory_order MEMORY_ORDER.
1392 (c_finish_omp_flush): Add MO argument.
1393 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
1394 (c_finish_omp_for): Add FINAL_P argument.
1395 * c-omp.c: Include memmodel.h.
1396 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
1397 OMP_TASKGROUP_CLAUSES to it.
1398 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
1399 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
1400 instead of OMP_ATOMIC_SEQ_CST.
1401 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
1402 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
1403 __atomic_thread_fence call with the given value.
1404 (check_omp_for_incr_expr): Formatting fixes.
1405 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
1406 even in OpenMP loops, diagnose if NE_EXPR and incr expression
1407 is not constant expression 1 or -1. Transform NE_EXPR loops
1408 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
1409 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
1410 loops too.
1411 (c_omp_split_clauses): Add support for combined
1412 #pragma omp parallel master and
1413 #pragma omp {,parallel }master taskloop{, simd} constructs.
1414 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
1415 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
1416 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
1417 (c_omp_predetermined_sharing): Don't return
1418 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
1419 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
1420 PRAGMA_OMP_REQUIRES.
1421 * c-pragma.h (enum pragma_kind): Likewise.
1422 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
1423 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1424
204839e7
DM
14252018-11-08 David Malcolm <dmalcolm@redhat.com>
1426
1427 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
1428
d8010ee4
DM
14292018-11-08 David Malcolm <dmalcolm@redhat.com>
1430
1431 * c-format.c (local_cgraph_node_ptr_node): New variable.
1432 (gcc_dump_printf_char_table): Add entry for %C.
1433 (get_pointer_to_named_type): New function, taken from the handling
1434 code for "gimple *" from...
1435 (init_dynamic_diag_info): ...here. Add handling for
1436 "cgraph_node *".
1437 * c-format.h (T_CGRAPH_NODE): New.
1438
4be5c72c
JM
14392018-10-19 Jason Merrill <jason@redhat.com>
1440
1441 * c-cppbuiltin.c (c_cpp_builtins): Add
1442 __cpp_nontype_template_parameter_class.
1443
f3f6029d
NS
14442018-10-31 Nathan Sidwell <nathan@acm.org>
1445
ab5324fb
NS
1446 * c-opts.c (c_finish_options): Force command line macro
1447 location. Refactor to avoid repeating main debug hook.
1448 (push_command_line_include): Clarify comment.
1449
f3f6029d
NS
1450 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
1451
91e3ec29
MS
14522018-10-30 Martin Sebor <msebor@redhat.com>
1453
1454 PR middle-end/87041
1455 * c-format.c (check_format_types): Avoid diagnosing null pointer
1456 arguments to printf-family of functions.
1457
b5ff4f5c
MP
14582018-10-30 Marek Polacek <polacek@redhat.com>
1459
1460 Implement P0892R2, explicit(bool).
1461 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
1462
7e2de6df
DM
14632018-10-29 David Malcolm <dmalcolm@redhat.com>
1464
1465 * name-hint.h (name_hint::take_deferred): New member function.
1466
b2bf438c
DM
14672018-10-29 David Malcolm <dmalcolm@redhat.com>
1468
1469 PR c++/56856
1470 * c-common.c (check_function_sentinel): Call fold_for_warn on the
1471 argument.
1472 (check_function_restrict): Rename param "argarray" to
1473 "unfolded_argarray", and make a copy named "argarray", calling
1474 fold_for_warn on each argument.
1475 (check_function_arguments): Add note about responsibility for
1476 folding the arguments.
1477
9f936c86
JM
14782018-10-17 Joseph Myers <joseph@codesourcery.com>
1479
1480 * c-common.c (flag_isoc2x): New variable.
1481 * c-common.h (clk_c): Update comment to reference C2X.
1482 (flag_isoc99, flag_isoc11): Update comments to reference future
1483 standard versions in general.
1484 (flag_isoc2x): Declare.
1485 * c-opts.c (set_std_c2x): New function.
1486 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
1487 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
1488 flag_isoc2x to 0.
1489 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
1490
7a8a92c4
JM
14912018-10-17 Joseph Myers <joseph@codesourcery.com>
1492
1493 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
1494 (std=iso9899:2018): Document C17 as published in 2018.
1495
4dc003ff
CL
14962018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
1497
1498 PR c++/87364
1499 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
1500
79371671
WW
15012018-10-11 Will Wray <wjwray@gmail.com>
1502
1503 PR c++/87364
1504 * c-pretty-print.h (pp_c_type_cast): Prototype.
1505 (pp_c_integer_constant): Likewise.
1506 * c-pretty-print.c (pp_c_type_cast): No longer static.
1507 (pp_c_integer_constant): Likewise.
1508 (pp_c_enumeration_constant): Fix loop termination when finding
1509 name of constant. No longer returns a value. Call
1510 pp_c_integer_constant.
1511 (c_pretty_printer::constant): Update for changes to
1512 pp_c_enumeration_constant.
1513
46c62690
JJ
15142018-10-11 Jakub Jelinek <jakub@redhat.com>
1515
1516 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
1517 for no_unique_address.
1518
c24300ba
DM
15192018-10-09 David Malcolm <dmalcolm@redhat.com>
1520
1521 * c-common.c (c_option_controlling_cpp_error): Rename to...
1522 (c_option_controlling_cpp_diagnostic): ...this, and convert
1523 "reason" from int to enum.
1524 (c_cpp_error): Rename to...
1525 (c_cpp_diagnostic): ...this, converting level and reason to enums.
1526 * c-common.h (c_cpp_error): Rename to...
1527 (c_cpp_diagnostic): ...this, converting level and reason to enums.
1528 * c-opts.c (c_common_init_options): Update for renaming.
1529
8656dafa
RS
15302018-10-08 Richard Sandiford <richard.sandiford@arm.com>
1531
1532 PR c/87286
1533 * c-common.c (vector_types_compatible_elements_p): Use
1534 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
1535
8cff0652
VK
15362018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
1537
1538 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
1539 to generate constructor destructor priority warning.
1540 * c.opt (-Wprio-ctor-dtor): New option.
1541
bedf03a2
JM
15422018-10-01 Jason Merrill <jason@redhat.com>
1543
1544 * c-lex.c (c_common_has_attribute): Add no_unique_address.
1545
6cc430c1
EB
15462018-10-01 Eric Botcazou <ebotcazou@adacore.com>
1547
1548 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
1549 (dump_ada_node): Add const keyword.
1550
87677ac7
ML
15512018-09-25 Martin Liska <mliska@suse.cz>
1552
1553 * c-common.c (c_common_truthvalue_conversion):
1554 Remove Pascal from documentation.
1555
518196cb
EB
15562018-09-21 Eric Botcazou <ebotcazou@adacore.com>
1557
1558 * c-ada-spec.c: Include diagnostic.h.
1559 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
1560
a599af84
MP
15612018-09-19 Marek Polacek <polacek@redhat.com>
1562
1563 * c.opt (Wclass-conversion): New.
1564
9c4a4b3c
DM
15652018-09-17 David Malcolm <dmalcolm@redhat.com>
1566
1567 * c-format.c (range_label_for_format_type_mismatch::get_text):
1568 Update for new param.
1569
c896ecfe
DM
15702018-09-17 David Malcolm <dmalcolm@redhat.com>
1571
1572 * c-format.c (format_warning_at_char): Update for introduction of
1573 format_string_diagnostic_t.
1574 (format_type_warning): Likewise.
1575
80c6d1f4
MJ
15762018-09-17 Martin Jambor <mjambor@suse.cz>
1577
1578 PR c/63886
1579 * c.opt (Wabsolute-value): New.
1580
6d900107
BE
15812018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1582
1583 * c-common.c (complete_flexible_array_elts): New helper function.
1584 * c-common.h (complete_flexible_array_elts): Declare.
1585
b5764229
BE
15862018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1587
1588 * c-common.c (braced_list_to_string): Remove eval parameter.
1589 Add some more checks. Always create zero-terminated STRING_CST.
1590 * c-common.h (braced_list_to_string): Adjust prototype.
1591
85204e23
DM
15922018-08-27 David Malcolm <dmalcolm@redhat.com>
1593
1594 PR 87091
1595 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
1596 to a tri-state.
1597 (maybe_suggest_missing_token_insertion): Likewise.
1598 (maybe_add_include_fixit): Add param "override_location". If set,
1599 and source-printing is enabled, then override the rich_location's
1600 primary location with that of the insertion point for the fix-it
1601 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
1602 * c-common.h (extern void maybe_add_include_fixit): Add bool
1603 param.
1604 * c-format.c (selftest::test_type_mismatch_range_labels): Update
1605 for conversion of show_caret_p to a tri-state.
1606 * c-warn.c (warn_for_restrict): Likewise.
1607 * known-headers.cc
1608 (suggest_missing_header::~suggest_missing_header): Update call to
1609 maybe_add_include_fixit to suggest overriding the location, as it
1610 is for a note.
1611
3d78e008
ML
16122018-08-27 Martin Liska <mliska@suse.cz>
1613
1614 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
1615 fndecl_built_in_p and remove check for FUNCTION_DECL if
1616 possible.
3d78e008
ML
1617 (check_builtin_function_arguments): Likewise.
1618 (reject_gcc_builtin): Likewise.
1619 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
1620
b5be6d0c
MP
16212018-08-26 Marek Polacek <polacek@redhat.com>
1622
1623 PR c++/87029, Implement -Wredundant-move.
1624 * c.opt (Wredundant-move): New option.
1625
79ca9c35
MP
16262018-08-21 Marek Polacek <polacek@redhat.com>
1627
1628 PR c++/86981, Implement -Wpessimizing-move.
1629 * c.opt (Wpessimizing-move): New option.
1630
097f82ec
DM
16312018-08-20 David Malcolm <dmalcolm@redhat.com>
1632
1633 PR other/84889
1634 * c-attribs.c (common_handle_aligned_attribute): Add
1635 auto_diagnostic_group instance.
1636 * c-indentation.c (warn_for_misleading_indentation): Likewise.
1637 * c-opts.c (c_common_post_options): Likewise.
1638 * c-warn.c (warn_logical_not_parentheses): Likewise.
1639 (warn_duplicated_cond_add_or_warn): Likewise.
1640 (warn_for_multistatement_macros): Likewise.
1641
3fb558b1
NS
16422018-08-20 Nathan Sidwell <nathan@acm.org>
1643
1644 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
1645 access.
1646
800c0e98
NS
16472018-08-17 Nathan Sidwell <nathan@acm.org>
1648
1649 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
1650 field.
1651 (laxy_hex_fp_value_count): Make unsigned.
1652 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
1653 manipulate the macro.
1654 (builtin_defin_with_hex_fp_value): Adjust callback name, use
1655 cpp_define_lazily.
1656
6f795a92
DM
16572018-08-17 David Malcolm <dmalcolm@redhat.com>
1658
1659 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
1660 (gcc_dump_printf_length_specs): New.
1661 (gcc_dump_printf_flag_pairs): New.
1662 (gcc_dump_printf_flag_specs): New.
1663 (gcc_dump_printf_char_table): New.
1664 (format_types_orig): Add entry for "gcc_dump_printf".
1665 (init_dynamic_diag_info): Set up length_char_specs and
1666 conversion_specs for gcc_dump_printf_format_type.
1667 (handle_format_attribute): Handle gcc_dump_printf_format_type.
1668
c5d725c0
NS
16692018-08-17 Nathan Sidwell <nathan@acm.org>
1670
10f04917
NS
1671 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
1672
c5d725c0
NS
1673 * c-ada-spec.c: Don't #include "cpp-id-data.h"
1674 * c-cppbuiltin.c: Likewise.
1675
c0c12356
ML
16762018-08-17 Martin Liska <mliska@suse.cz>
1677
1678 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
1679 Ignore/Deprecated flag. Warning is done automatically for
1680 Deprecated flags.
c0c12356 1681
10fcc142
DM
16822018-08-16 David Malcolm <dmalcolm@redhat.com>
1683
1684 PR c++/70693
1685 * c-common.c (selftest::c_family_tests): Call
1686 selftest::c_indentation_c_tests.
1687 * c-common.h (selftest::c_indentation_c_tests): New decl.
1688 * c-indentation.c: Include "selftest.h".
1689 (next_tab_stop): Add "tab_width" param, rather than accessing
1690 cpp_opts.
1691 (get_visual_column): Likewise. Clarify comment. Bulletproof
1692 against reading past the end of the line.
1693 (get_first_nws_vis_column): Add "tab_width" param.
1694 (detect_intervening_unindent): Likewise.
1695 (should_warn_for_misleading_indentation): Read tab width from
1696 cpp_opts and pass around.
1697 (selftest::test_next_tab_stop): New test.
1698 (selftest::assert_get_visual_column_succeeds): New function.
1699 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
1700 (selftest::assert_get_visual_column_fails): New function.
1701 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
1702 (selftest::test_get_visual_column): New test.
1703 (selftest::c_indentation_c_tests): New function.
1704
3f6677f4
NS
17052018-08-16 Nathan Sidwell <nathan@acm.org>
1706
1707 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
1708 (store_ada_macro): Likewise.
1709 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
1710 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
1711
96e6ae57
DM
17122018-08-15 David Malcolm <dmalcolm@redhat.com>
1713
1714 * c-format.c: Include "selftest-diagnostic.h" and
1715 "gcc-rich-location.h".
1716 (format_warning_at_char): Pass NULL for new label params of
1717 format_warning_va.
1718 (class indirection_suffix): New class.
1719 (class range_label_for_format_type_mismatch): New class.
1720 (format_type_warning): Move logic for generating "*" suffix to
1721 class indirection_suffix. Create "fmt_label" and "param_label"
1722 to show their types, and pass them to the
1723 format_warning_at_substring calls.
1724 (selftest::test_type_mismatch_range_labels): New test.
1725 (selftest::c_format_c_tests): Call it.
1726
23aa9f7c
MS
17272018-08-13 Martin Sebor <msebor@redhat.com>
1728
1729 PR tree-optimization/71625
1730 * c-common.c (braced_list_to_string): New function.
1731 * c-common.h (braced_list_to_string): Declare it.
1732
f10a9135
NS
17332018-08-08 Nathan Sidwell <nathan@acm.org>
1734
1735 * c-common.c (try_to_locate_new_include_inertion_point): Use
1736 linemap_included_from_linemap.
1737 * c-lex.c (fe_file_change): Use linemap_included_from.
1738 * c-ppoutput.c (pp_file_change): Likewise.
1739
8a45b051
MS
17402018-08-01 Martin Sebor <msebor@redhat.com>
1741
1742 PR tree-optimization/86650
ab20d992 1743 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
8a45b051
MS
1744 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
1745 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
1746 * c-format.h (T89_G): Update to be "gimple *" rather than
1747 "gcall *".
1748 (local_gcall_ptr_node): Rename...
1749 (local_gimple_ptr_node): ...to this.
1750
e540ccc0
DM
17512018-07-31 David Malcolm <dmalcolm@redhat.com>
1752
1753 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
1754 table entries for gcc_diag_char_table, and the 'Z' entry from
1755 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
1756 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
1757 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
1758 adding missing "Z" for this table. Remove erroneous "G" and "K"
1759 entries.
1760 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
1761 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
1762 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
1763
425fc685
RE
17642018-07-31 Richard Earnshaw <rearnsha@arm.com>
1765
1766 * c-common.c (speculation_safe_resolve_call): New function.
1767 (speculation_safe_resolve_params): New function.
1768 (speculation_safe_resolve_return): New function.
1769 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
1770 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
1771 __HAVE_SPECULATION_SAFE_VALUE.
1772
181463c2
DM
17732018-07-20 David Malcolm <dmalcolm@redhat.com>
1774
1775 * c-common.c (c_cpp_error): Remove redundant "line_table"
1776 parameter from call to rich_location::set_range.
1777 (maybe_suggest_missing_token_insertion): Likewise.
1778
0d7f9065
MS
17792018-07-20 Martin Sebor <msebor@redhat.com>
1780
1781 PR middle-end/82063
ab20d992 1782 * c.opt (-Warray-bounds): Remove redundant -Wall.
0d7f9065 1783
00abf86c
MS
17842018-07-20 Martin Sebor <msebor@redhat.com>
1785
1786 PR middle-end/82063
1787 * c-common.h (c_common_handle_option): Change function argument
1788 to HOST_WIDE_INT.
1789 * c-opts.c (c_common_init_options): Same.
1790 (c_common_handle_option): Same. Remove special handling of
1791 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
1792 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
1793 options to take a HOST_WIDE_INT argument and accept a byte-size
1794 suffix. Initialize.
1795 (-Wvla-larger-than): Same.
1796 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
1797 (-Wno-vla-larger-than): Same.
1798
9b452033
JJ
17992018-07-12 Jakub Jelinek <jakub@redhat.com>
1800
1801 * c-attribs.c (c_common_attribute_table): Add
1802 "omp declare target implicit" attribute.
1803
cd0762f3
RB
18042018-07-12 Richard Biener <rguenther@suse.de>
1805
1806 PR c/86453
1807 * c-attribs.c (handle_packed_attribute): Do not build a variant
1808 type with TYPE_PACKED, instead ignore the attribute if we may
1809 not apply to the original type.
1810
0b27c3ed
JJ
18112018-07-10 Jakub Jelinek <jakub@redhat.com>
1812
1813 PR c++/86443
1814 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
1815 to contain TREE_LIST for both the original class iterator and the
1816 "last" helper var.
1817
e730a0ef
EB
18182018-07-07 Eric Botcazou <ebotcazou@adacore.com>
1819
1820 * c-ada-spec.c (to_ada_name): Remove index parameter.
1821 (pp_ada_tree_identifier): Likewise.
1822 (dump_ada_macros): Adjust call to to_ada_name.
1823 (struct overloaded_name_hash): Delete.
1824 (struct overloaded_name_hasher): Likewise.
1825 (overloaded_names): Likewise.
1826 (compute_overloading_index): Likewise.
1827 (dump_ada_decl_name): Do not call compute_overloading_index and
1828 adjust calls to pp_ada_tree_identifier.
1829 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
1830 (dump_ada_import): Add spc parameter and switch to aspect syntax.
1831 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
1832 (dump_ada_enum_type): Remove type and display_convention parameters.
1833 Adjust calls to pp_ada_tree_identifier.
1834 (dump_ada_node): Likewise and for dump_ada_structure.
1835 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
1836 and tidy up.
1837 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
1838 syntax.
1839 (print_constructor): Adjust call to pp_ada_tree_identifier.
1840 (print_destructor): Likewise.
1841 (dump_ada_declaration): Switch to aspect syntax.
1842 (dump_ada_structure): Likewise and tidy up. Replace display_convention
1843 parameter with nested parameter.
1844 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
1845 (dump_ada_specs): Do not delete overloaded_names table.
1846
8de583fc
PB
18472018-07-06 Peter Bergner <bergner@linux.ibm.com>
1848
1849 PR target/86324
e730a0ef 1850 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
1851 target hook.
1852
09cff37b
NS
18532018-07-05 Nathan Sidwell <nathan@acm.org>
1854
1855 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
1856 NO_IMPLICIT_EXTERN_C.
1857
98086b2b
ML
18582018-06-28 Martin Liska <mliska@suse.cz>
1859
1860 * cppspec.c: Include opt-suggestions.h.
1861
ab20d992
JJ
18622018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1863 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
1864 Cesar Philippidis <cesar@codesourcery.com>
1865
1866 * c-pragma.h (enum pragma_omp_clause): Add
1867 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
1868 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
1869
f41b7612
JJ
18702018-06-20 Jakub Jelinek <jakub@redhat.com>
1871
1872 PR c++/86210
1873 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
1874 comment.
1875
4252ccd7
MS
18762018-06-18 Martin Sebor <msebor@redhat.com>
1877
1878 PR middle-end/85602
1879 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
1880 nonstring.
1881
e197e64e
KV
18822018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1883
1884 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
1885
34a7a230
JM
18862018-06-13 Jason Merrill <jason@redhat.com>
1887
5cef3733
JM
1888 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
1889 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
1890 handling.
1891
34a7a230
JM
1892 PR c++/86094 - wrong code with defaulted move ctor.
1893 * c-opts.c (c_common_post_options): Bump the current ABI version to
1894 13. Set warn_abi_version and flag_abi_compat_version to the current
1895 version rather than 0. Fix defaulting flag_abi_compat_version from
1896 warn_abi_version.
1897
bb0f14ae
MS
18982018-06-12 Martin Sebor <msebor@redhat.com>
1899
1900 PR c/85931
1901 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
1902 sizeof source and destination yields the same value.
1903
3713f2e2
ML
19042018-06-12 Martin Liska <mliska@suse.cz>
1905
1906 * c.opt: Make MPX-related options as Deprecated.
1907
4af78ef8
DM
19082018-06-08 David Malcolm <dmalcolm@redhat.com>
1909
1910 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
1911 rather than 0.
1912
31db0fe0
ML
19132018-06-08 Martin Liska <mliska@suse.cz>
1914
1915 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
1916 for MPX (macros, related functions, fields in cgraph_node, ...).
1917 (handle_bnd_legacy): Likewise.
1918 (handle_bnd_instrument): Likewise.
1919 * c.opt: Likewise.
1920
fe16acf2
JJ
19212018-06-06 Jakub Jelinek <jakub@redhat.com>
1922
1923 PR c++/86068
1924 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
1925 __cpp_transactional_memory to 201500 instead of 210500.
1926
4dbdb49b
JM
19272018-06-06 Jason Merrill <jason@redhat.com>
1928
1929 PR c++/85710 - ICE with -Wmemset-elt-size.
1930 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
1931
f8ad043f
JM
19322018-06-01 Jason Merrill <jason@redhat.com>
1933
1934 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
1935 201703.
1936
abc24d93
EB
19372018-06-01 Eric Botcazou <ebotcazou@adacore.com>
1938
1939 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
1940 declaration for a typedef independently of whether the declaration of
1941 the subtype is generated.
1942
d258f4aa
MS
19432018-05-31 Martin Sebor <msebor@redhat.com>
1944
1945 PR c/82063
1946 * c.opt (-Wno-alloc-size-larger-than): New option.
1947
b67b9225
DP
19482018-04-22 David Pagan <dave.pagan@oracle.com>
1949
1950 PR c/55976
1951 * c-opts.c (c_common_post_options): Set default for warn_return_type
ab20d992 1952 for C++/C++ with ObjC extensions only. For C, makes it possible to
b67b9225
DP
1953 differentiate between default (no option), -Wreturn-type, and
1954 -Wno-return-type.
1955
04eb9c55
JM
19562018-05-29 Jason Merrill <jason@redhat.com>
1957
1958 * c.opt (Winit-list-lifetime): New flag.
1959
b0c31bc6
BE
19602018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
1961
1962 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
1963 splay_tree_delete_pointers.
1964
44284983
JJ
19652018-05-26 Jakub Jelinek <jakub@redhat.com>
1966
1967 PR bootstrap/85921
1968 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
1969 noinline variable to workaround broken kernel headers.
1970
b46b715d
JM
19712018-05-18 Jason Merrill <jason@redhat.com>
1972
1973 * c.opt (Wdeprecated-copy): New flag.
1974
40659769
ML
19752018-05-17 Martin Liska <mliska@suse.cz>
1976
1977 * c-warn.c (overflow_warning): Do not use
1978 space in between 'G_' and '('.
1979
403962ea
JM
19802018-05-09 Jason Merrill <jason@redhat.com>
1981
1982 * c-common.c (valid_array_size_p): Add complain parameter.
1983 * c-common.h: ...which defaults to true.
1984
1c9ee609
JJ
19852018-05-11 Jakub Jelinek <jakub@redhat.com>
1986
1987 PR c/85696
1988 * c-omp.c (c_omp_predetermined_sharing): Return
1989 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
1990
19916065
ML
19912018-05-11 Martin Liska <mliska@suse.cz>
1992
92a285c1 1993 PR sanitizer/85556
19916065
ML
1994 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
1995 TREE_LIST values.
1996
79e7b1fe
JJ
19972018-05-10 Jakub Jelinek <jakub@redhat.com>
1998
1999 PR c++/85662
2000 * c-common.h (fold_offsetof_1): Removed.
2001 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
2002 CTX argument defaulted to ERROR_MARK.
2003 * c-common.c (fold_offsetof_1): Renamed to ...
2004 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
2005 argument, convert the pointer constant to TYPE and use size_binop
2006 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
2007 a pointer type. Adjust recursive calls.
2008
86c12f76
EB
20092018-05-10 Eric Botcazou <ebotcazou@adacore.com>
2010
2011 PR c++/85400
2012 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
2013
ee336e84
NS
20142018-05-07 Nathan Sidwell <nathan@acm.org>
2015
2016 * c.opt (ffor-scope): Remove functionality, issue warning.
2017
6c072e21
NS
20182018-05-03 Nathan Sidwell <nathan@acm.org>
2019
2020 * c.opt (ffriend-injection): Remove functionality, issue warning.
2021
2cc7d3a7
DM
20222018-05-01 David Malcolm <dmalcolm@redhat.com>
2023
2024 PR c/84258
2025 * c-format.c (struct format_check_results): Add field
2026 "number_non_char".
2027 (check_format_info): Initialize it, and warn if encountered.
2028 (check_format_arg): Distinguish between wide char and
2029 everything else when detecting arrays of non-char.
2030
7761dfbe
DM
20312018-04-30 David Malcolm <dmalcolm@redhat.com>
2032
2033 * c-format.c (get_corrected_substring): Update for
2034 location_get_source_line returning a char_span. Use a char_span
2035 when handling the prefix of the correction.
2036 * c-indentation.c (get_visual_column): Update for
2037 location_get_source_line returning a char_span.
2038 (get_first_nws_vis_column): Likewise.
2039
62e98ef1
DM
20402018-03-29 David Malcolm <dmalcolm@redhat.com>
2041
2042 PR c++/84269
2043 * known-headers.cc (get_stdlib_header_for_name): Add various names
2044 from <assert.h>, <string.h>, and <memory.h>; add more names from
2045 <stdio.h>.
2046
a7dea617
JJ
20472018-03-27 Jakub Jelinek <jakub@redhat.com>
2048
2049 PR c++/85061
2050 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
2051 get_base_address of the second operand is a VAR_P, rather than the
2052 operand itself, and use gcc_checking_assert instead of gcc_assert.
2053
889a3a30
MP
20542018-03-23 Marek Polacek <polacek@redhat.com>
2055
2056 PR c++/85045
2057 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
2058 <case RDIV_EXPR>: Tweak condition.
2059
452154b9
EB
20602018-03-20 Eric Botcazou <ebotcazou@adacore.com>
2061
2062 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
2063
63ecb626
JJ
20642018-03-16 Jakub Jelinek <jakub@redhat.com>
2065
ce811fc4
JJ
2066 PR c/84909
2067 * c-warn.c (conversion_warning): Replace "to to" with "to" in
2068 diagnostics.
2069
63ecb626
JJ
2070 PR c/84910
2071 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
2072 diagnostics.
2073
a1295eec
RB
20742018-03-16 Richard Biener <rguenther@suse.de>
2075
2076 PR c/84873
2077 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
2078 unshare the possibly folded expression.
2079
919674fb
RB
20802018-03-15 Richard Biener <rguenther@suse.de>
2081
2082 PR c/84873
2083 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
2084
f99309b2
MS
20852018-03-13 Martin Sebor <msebor@redhat.com>
2086
2087 PR tree-optimization/84725
2088 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
2089 with all three narrow character types, including their qualified forms.
2090
e9b9fa4c
MS
20912018-03-12 Martin Sebor <msebor@redhat.com>
2092
2093 PR tree-optimization/83456
ab20d992 2094 * c-common.c (check_function_restrict): Return bool.
e9b9fa4c
MS
2095 Restore checking of bounded built-in functions.
2096 (check_function_arguments): Also return the result
2097 of warn_for_restrict.
ab20d992
JJ
2098 * c-common.c (check_function_restrict): Return bool.
2099 * c-warn.c (warn_for_restrict): Return bool.
e9b9fa4c 2100
0805d020
MP
21012018-03-02 Marek Polacek <polacek@redhat.com>
2102
2103 PR c++/84171
2104 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
2105 is erroneous.
2106
ed2a2f08
TS
21072018-03-02 Thomas Schwinge <thomas@codesourcery.com>
2108
2109 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
2110 function".
2111
90abdde0
MP
21122018-03-01 Marek Polacek <polacek@redhat.com>
2113
2114 PR c++/84639
2115 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
2116 alignment in computation.
2117
c6db43fa
EB
21182018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2119
2120 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
2121 <REAL_TYPE>: Deal specifically with _Float128/__float128.
2122
9e25c7ed
EB
21232018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2124
2125 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
2126 (is_char_array): Take a type instead of a declaration.
2127 (dump_ada_array_type): Likewise.
2128 (is_simple_enum): Minor tweak.
2129 (dump_ada_enum_type): New function extracted from...
2130 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
2131 <INTEGER_TYPE>: Remove unreachable code.
2132 <RECORD_TYPE>: Likewise. Minor tweaks.
2133 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
2134 <ENUMERAL_TYPE>: New case.
2135 <RECORD_TYPE>: Factor out common code.
2136 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
2137 Minor tweaks. Deal with enumeral types.
2138 (dump_ada_structure): Minor tweaks.
2139
09de3550
EB
21402018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2141
2142 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
2143 address for incomplete structures.
2144 (dump_forward_type): Do not bail out for incomplete structures.
2145 (dump_ada_declaration): Do not special-case incomplete structures
2146 for subtypes. Dump them as null records for types.
2147
095d8d4b
EB
21482018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2149
2150 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
2151 (is_char_array): Fix formatting.
2152 (dump_template_types): Likewise.
2153 (dump_generic_ada_node): Rename into...
2154 (dump_ada_node): ...this.
2155 <POINTER_TYPE>: Remove superfluous space. Use generic address for
2156 incomplete structures and not for empty structures. Do not use it
2157 when forward declarations are needed.
2158 (dump_forward_type): New function.
2159 (dump_nested_types): Remove FORWARD parameter. Do not consider
2160 TREE_VISITED and do not generate a forward declaration. Only dump
2161 original nested types for nested declaration.
2162 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
2163 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
2164 <RECORD_TYPE>: Do not consider TREE_VISITED.
2165 (dump_ada_declaration): Use booleans and fix formatting throughout.
2166 <TYPE_DECL>: Skip incomplete structures and not empty structures.
2167 Call dump_forward_type instead of dump_nested_types for a typedef.
2168 Remove superfluous check and adjust call to dump_nested_types.
2169 <POINTER_TYPE>: Call dump_forward_type and fall through.
2170 (dump_ada_struct_decl): Rename into...
2171 (dump_ada_structure): ...this. Do not special-case empty structures.
2172
d4cfd486
MS
21732018-02-27 Martin Sebor <msebor@redhat.com>
2174
2175 PR c++/83871
2176 * c.opt (-Wmissing-attributes): New option.
2177
b22dbd03
ML
21782018-02-21 Martin Liska <mliska@suse.cz>
2179
2180 * c.opt (Wcatch-value=): Add IntegerRange.
2181
883dfe2a
JM
21822018-02-15 Jason Merrill <jason@redhat.com>
2183
2184 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
2185
0444aa9c
NS
21862018-02-09 Nathan Sidwell <nathan@acm.org>
2187
2188 PR c/84293
2189 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
2190 arg.
2191 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
2192 arg. Adjust.
2193
cea71f0a
MS
21942018-02-09 Martin Sebor <msebor@redhat.com>
2195
2196 PR lto/84212
2197 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
2198 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
2199 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
2200 (-Wstrict-overflow, -Wsuggest-attribute): Same.
2201 (-Wuninitialized): Same.
2202
8c8b7be5
EB
22032018-02-09 Eric Botcazou <ebotcazou@adacore.com>
2204
2205 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
2206 keyword for components.
2207
7c30b12a
PC
22082018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2209
2210 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
2211
eece7fe5
JK
22122018-02-02 Julia Koval <julia.koval@intel.com>
2213
2214 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
2215
7d07a93a
MP
22162018-01-29 Marek Polacek <polacek@redhat.com>
2217
2218 PR c/83966
2219 * c-format.c (check_function_format): Check current_function_decl.
2220
53723269
JJ
22212018-01-27 Jakub Jelinek <jakub@redhat.com>
2222
2223 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
2224 argument.
2225 (LAZY_HEX_FP_VALUES_CNT): Define.
2226 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
2227 values rather than just 12.
2228 (builtin_define_with_hex_fp_value): Likewise.
2229
7365279f
BK
22302018-01-18 Boris Kolpackov <boris@codesynthesis.com>
2231
92a285c1
ML
2232 PR other/70268
2233 * c.opt (-fmacro-prefix-map): New option.
2234 * c-opts.c (c_common_handle_option): Handle it.
2235 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
2236 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 2237
bb9869d5
DM
22382018-01-17 David Malcolm <dmalcolm@redhat.com>
2239
2240 PR c++/83814
2241 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
2242
68dc87c3
EB
22432018-01-10 Eric Botcazou <ebotcazou@adacore.com>
2244
2245 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
2246 Skip 'f' and 'F' characters if it is true.
2247 (store_ada_macro): Minor tweak.
2248 (dump_ada_macros) <CPP_COMMENT>: Likewise.
2249 <CPP_WSTRING>: Likewise.
2250 <CPP_STRING>: Output '&' in the buffer if not the first string.
2251 <CPP_NUMBER>: Adjust calls to dump_number.
2252
9a004410
DM
22532018-01-10 David Malcolm <dmalcolm@redhat.com>
2254
2255 PR c++/43486
2256 * c-common.c: Include "selftest.h".
2257 (get_atomic_generic_size): Perform the test for integral type
2258 before the range test for any integer constant, fixing indentation
2259 of braces. Call fold_for_warn before testing for an INTEGER_CST.
2260 (reject_gcc_builtin): Strip any location wrapper from EXPR.
2261 (selftest::test_fold_for_warn): New function.
2262 (selftest::c_common_c_tests): New function.
2263 (selftest::c_family_tests): Call it, and
2264 selftest::c_pretty_print_c_tests.
2265 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
2266 * c-format.c (check_format_arg): Convert VAR_P check to a
2267 fold_for_warn.
2268 * c-pretty-print.c: Include "selftest.h".
2269 (pp_c_cast_expression): Don't print casts for location wrappers.
2270 (selftest::assert_c_pretty_printer_output): New function.
2271 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
2272 (selftest::test_location_wrappers): New function.
2273 (selftest::c_pretty_print_c_tests): New function.
2274 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
2275
5c0caeb3
RS
22762018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2277 Alan Hayward <alan.hayward@arm.com>
2278 David Sherwood <david.sherwood@arm.com>
2279
2280 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
2281
73a699ae
RS
22822018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2283 Alan Hayward <alan.hayward@arm.com>
2284 David Sherwood <david.sherwood@arm.com>
2285
2286 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
2287 as polynomial.
2288
928686b1
RS
22892018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2290 Alan Hayward <alan.hayward@arm.com>
2291 David Sherwood <david.sherwood@arm.com>
2292
2293 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
2294 (convert_vector_to_array_for_subscript): Handle polynomial
2295 TYPE_VECTOR_SUBPARTS.
2296 (c_common_type_for_mode): Check valid_vector_subparts_p.
2297 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
2298 VECTOR_CST_NELTS.
2299
85ec4feb
JJ
23002018-01-03 Jakub Jelinek <jakub@redhat.com>
2301
2302 Update copyright years.
2303
170a8bd6 23042017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 2305 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
2306
2307 * c-pragma.c (init_pragma): Register pragma GCC unroll.
2308 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
2309
ab20d992 23102017-12-22 Alexandre Oliva <aoliva@redhat.com>
18408e96
AO
2311
2312 PR debug/83527
2313 PR debug/83419
2314 * c-semantics.c (only_debug_stmts_after_p): New.
2315 (pop_stmt_list): Clear side effects in debug-only stmt list.
2316 Check for single nondebug stmt followed by debug stmts only.
2317
c12d20d4
AO
23182017-12-21 Alexandre Oliva <aoliva@redhat.com>
2319
2320 PR debug/83419
2321 * c-semantics.c (pop_stmt_list): Propagate side effects from
2322 single nondebug stmt to container list.
2323
01512446
JJ
23242017-12-19 Jakub Jelinek <jakub@redhat.com>
2325
2326 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
2327 conditions with typical order conditions.
2328
82cfbd01
MP
23292017-12-18 Marek Polacek <polacek@redhat.com>
2330
2331 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
2332 not in effect.
2333
99da11ec
MS
23342017-12-17 Martin Sebor <msebor@redhat.com>
2335
2336 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
2337 an error for attribute warn_if_not_aligned.
2338
cc8bea0a
MS
23392017-12-16 Martin Sebor <msebor@redhat.com>
2340
2341 PR tree-optimization/78918
2342 * c-common.c (check_function_restrict): Avoid checking built-ins.
2343 * c.opt (-Wrestrict): Include in -Wall.
2344
4849deb1
JJ
23452017-12-15 Jakub Jelinek <jakub@redhat.com>
2346
2347 * c-attribs.c (c_common_attribute_table,
2348 c_common_format_attribute_table): Swap affects_type_identity
2349 and handler fields, adjust comments.
2350
c65e18d3
BE
23512017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2352
2353 * c.opt (Wcast-function-type): New warning option.
2354 * c-lex.c (get_fileinfo): Avoid warning.
2355 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
2356
2004617a
QZ
23572017-12-14 Qing Zhao <qing.zhao@oracle.com>
2358
7365279f 2359 PR middle_end/79538
2004617a
QZ
2360 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
2361 Adjust the size of buf1 and buf2, add a new buf to avoid
2362 format-overflow warning.
2363
ab20d992 23642017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
2365
2366 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
2367 subsequent statement list.
2368
5d9ae53d
MS
23692017-12-07 Martin Sebor <msebor@redhat.com>
2370
2371 PR c/81544
2372 PR c/81566
2373 * c-attribs.c (attr_aligned_exclusions): New array.
2374 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
2375 (attr_common_exclusions, attr_const_pure_exclusions): Same.
2376 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
2377 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
2378 (attr_warn_unused_result_exclusions): Same.
2379 (handle_hot_attribute, handle_cold_attribute): Simplify.
2380 (handle_const_attribute): Warn on function returning void.
2381 (handle_pure_attribute): Same.
2382 (handle_aligned_attribute): Diagnose conflicting attribute
2383 specifications.
2384 * c-warn.c (diagnose_mismatched_attributes): Simplify.
2385
c79144f8
DM
23862017-12-06 David Malcolm <dmalcolm@redhat.com>
2387
2388 PR c/83236
2389 * c-common.c (selftest::c_family_tests): Call
2390 selftest::c_spellcheck_cc_tests.
2391 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
2392 * c-spellcheck.cc: Include "selftest.h".
2393 (name_reserved_for_implementation_p): New function.
2394 (should_suggest_as_macro_p): New function.
2395 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
2396 should_suggest_as_macro_p and call it.
2397 (selftest::test_name_reserved_for_implementation_p): New function.
2398 (selftest::c_spellcheck_cc_tests): New function.
2399 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
2400
613bc14f
DM
24012017-12-06 David Malcolm <dmalcolm@redhat.com>
2402
2403 * c-spellcheck.cc: New file, taken from macro-handling code in
2404 spellcheck-tree.c.
2405 * c-spellcheck.h: New file, taken from macro-handling code in
2406 spellcheck-tree.h.
2407
e76c7157
JJ
24082017-12-01 Jakub Jelinek <jakub@redhat.com>
2409
2410 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
2411 attribute.
2412 (handle_simd_attribute): Don't check for "cilk simd function"
2413 attribute. Reindent, formatting changes.
2414
b0da4034
JK
24152017-11-30 Julia Koval <julia.koval@intel.com>
2416
2417 * c-common.h (inv_list): Remove.
2418
058f0b9e
JJ
24192017-11-28 Jakub Jelinek <jakub@redhat.com>
2420
2421 PR sanitizer/81275
2422 * c-common.c (c_switch_covers_all_cases_p_1,
2423 c_switch_covers_all_cases_p): New functions.
2424 * c-common.h (c_switch_covers_all_cases_p): Declare.
2425
5e9d6aa4 24262017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 2427 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
2428
2429 * array-notation-common.c: Delete.
2430 * c-cilkplus.c: Ditto.
2431 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
2432 * c-common.def (ARRAY_NOTATION_REF): Remove.
2433 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
2434 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
2435 c_validate_cilk_plus_loop, cilkplus_an_parts,
2436 cilk_ignorable_spawn_rhs_op,
2437 cilk_recognize_spawn): Remove.
2438 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
2439 * c-omp.c: Remove CILK_SIMD check.
2440 * c-pragma.c: Ditto.
2441 * c-pragma.h: Remove CILK related pragmas.
2442 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
2443 ARRAY_NOTATION_REF condition.
2444 (c_pretty_printer::expression): Ditto.
2445 * c.opt (fcilkplus): Remove.
2446 * cilk.c: Delete.
2447
1af4ebf5
MG
24482017-11-21 Marc Glisse <marc.glisse@inria.fr>
2449
2450 * c-pretty-print.c (pp_c_additive_expression,
2451 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
2452
d44ed508
JJ
24532017-11-21 Jakub Jelinek <jakub@redhat.com>
2454
7d2f0f9b
JJ
2455 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
2456
d44ed508
JJ
2457 PR c++/83059
2458 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
2459 instead of tree_to_uhwi, formatting fix.
2460
26edace6
DM
24612017-11-20 David Malcolm <dmalcolm@redhat.com>
2462
2463 PR c/81404
2464 * known-headers.cc: New file, based on material from c/c-decl.c.
2465 (suggest_missing_header): Copied as-is.
2466 (get_stdlib_header_for_name): New, based on get_c_name_hint but
2467 heavily edited to add C++ support. Add some knowledge about
2468 <limits.h>, <stdint.h>, and <wchar.h>.
2469 * known-headers.h: Likewise.
2470
6c7a259b
DM
24712017-11-20 David Malcolm <dmalcolm@redhat.com>
2472
2473 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
2474 (lookup_name_fuzzy): Likewise. Convert return type from
2475 const char * to name_hint. Add location_t param.
2476 * name-hint.h: New header.
2477
f9c59f7e
JJ
24782017-11-19 Jakub Jelinek <jakub@redhat.com>
2479
2480 PR c/66618
2481 PR c/69960
2482 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
2483
1e39313a
JM
24842017-11-16 Joseph Myers <joseph@codesourcery.com>
2485
2486 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
2487 expected publication date of C17.
2488 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
2489
3ca0dc60
JM
24902017-11-15 Joseph Myers <joseph@codesourcery.com>
2491
2492 PR c/81156
2493 * c-common.c (c_common_reswords): Add __builtin_tgmath.
2494 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
2495
025d57f0
MS
24962017-11-10 Martin Sebor <msebor@redhat.com>
2497
2498 PR c/81117
2499 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
2500 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
2501 * c.opt (-Wstringop-truncation): New option.
2502
1b6fa695
ML
25032017-11-06 Martin Liska <mliska@suse.cz>
2504
2505 PR middle-end/82404
2506 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
2507 FE.
2508 * c.opt: Set default value of warn_return_type.
2509
64a5912c
DM
25102017-10-31 David Malcolm <dmalcolm@redhat.com>
2511
2512 * c-common.c (binary_op_error): Update for renaming of
2513 error_at_rich_loc.
2514 (c_parse_error): Likewise.
2515 * c-warn.c (warn_logical_not_parentheses): Likewise for
2516 renaming of inform_at_rich_loc.
2517 (warn_for_restrict): Likewise for renaming of
2518 warning_at_rich_loc_n.
2519
c76dc9c3
JM
25202017-10-30 Joseph Myers <joseph@codesourcery.com>
2521
2522 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
2523 * c-opts.c (set_std_c17): New function.
2524 (c_common_init_options): Use gnu17 as default C version.
2525 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
2526
ee5fd23a
MM
25272017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2528
2529 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
2530 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
2531 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
2532 __FP_FAST_FMA<N>X.
2533
d1047465
MP
25342017-10-23 Marek Polacek <polacek@redhat.com>
2535
2536 PR c/82681
2537 * c-warn.c (warnings_for_convert_and_check): Fix typos.
2538
9e878cf1
EB
25392017-10-19 Eric Botcazou <ebotcazou@adacore.com>
2540
2541 * c-common.c (check_builtin_function_arguments): Also check arguments
2542 of __builtin_alloca_with_align_and_max.
2543
89b6abbb
DM
25442017-10-17 David Malcolm <dmalcolm@redhat.com>
2545
2546 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
2547 rather than NULL to format_warning_va.
2548 (check_format_types): Likewise when calling format_type_warning.
2549 Remove code to extract source_ranges and source_range * in favor
2550 of just a location_t.
2551 (format_type_warning): Convert source_range * param to a
2552 location_t.
2553
39382c09
JJ
25542017-10-13 Jakub Jelinek <jakub@redhat.com>
2555
2556 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
2557 [LR]SHIFT_EXPR.
2558
62e1c678
DM
25592017-10-12 David Malcolm <dmalcolm@redhat.com>
2560
2561 * c-common.c (enum missing_token_insertion_kind): New enum.
2562 (get_missing_token_insertion_kind): New function.
2563 (maybe_suggest_missing_token_insertion): New function.
2564 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
2565
b90c9338
NS
25662017-10-11 Nathan Sidwell <nathan@acm.org>
2567
2568 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
2569 (c_common_handle_option): Update incpath_kind names.
2570
3a266bcd
ML
25712017-10-11 Martin Liska <mliska@suse.cz>
2572
2573 PR sanitizer/82490
2574 * c-attribs.c (handle_no_sanitize_attribute): Report directly
2575 Wattributes warning.
2576
8e6cdc90
RS
25772017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2578
2579 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
2580 operating on trees as wide_ints.
2581 * c-common.c (pointer_int_sum): Likewise.
2582 * c-pretty-print.c (pp_c_integer_constant): Likewise.
2583 * c-warn.c (match_case_to_enum_1): Likewise.
2584 (c_do_switch_warnings): Likewise.
2585 (maybe_warn_shift_overflow): Likewise.
2586
802b38c9
JJ
25872017-10-10 Jakub Jelinek <jakub@redhat.com>
2588
2589 PR c/82437
2590 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
2591 instead of wide_int::from.
2592
4e34b338
JJ
25932017-10-06 Jakub Jelinek <jakub@redhat.com>
2594
2595 PR c/82437
2596 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
2597 using to_widest use wide_int with the larger of the two precisions.
2598
4bc4b2b4
BE
25992017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
2600
2601 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
2602 functions.
2603
a1488398
RS
26042017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
2605
2606 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
2607 when combining the original unconverted comparison operands.
2608
01c9fb68
JJ
26092017-09-29 Jakub Jelinek <jakub@redhat.com>
2610
2611 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
2612 attribute.
2613
6e3e8419
EB
26142017-09-29 Eric Botcazou <ebotcazou@adacore.com>
2615
2616 * c-ada-spec.c (to_ada_name): Add index parameter.
2617 (pp_ada_tree_identifier): Likewise.
2618 (dump_ada_macros): Adjust call to to_ada_name.
2619 (struct overloaded_name_hash): New type.
2620 (struct overloaded_name_hasher): Likewise.
2621 (overloaded_names): New hash table.
2622 (compute_overloading_index): New function.
2623 (dump_ada_decl_name): Call it and pass the result to
2624 pp_ada_tree_identifier.
2625 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
2626 (dump_ada_function_declaration): Likewise.
2627 (dump_generic_ada_node): Likewise.
2628 (print_constructor): Likewise.
2629 (print_destructor): Likewise.
2630 (dump_ada_specs): Delete overloaded_names table.
2631
79310774
EB
26322017-09-29 Eric Botcazou <ebotcazou@adacore.com>
2633
2634 * c-ada-spec.c (max_ada_macros): Move around.
2635 (store_ada_macro_index): Likewise.
2636 (source_file): Rename into...
2637 (macro_source_file): ...this.
2638 (count_ada_macro): Move around.
2639 (store_ada_macro): Likewise.
2640 (compare_macro): Likewise.
2641 (print_ada_macros): Merge in...
2642 (dump_ada_macros): ...this.
2643 (source_file_base): Rename into...
2644 (current_source_file): ...this.
2645 (print_comment): Move around.
2646 (dump_ada_nodes): Call dump_ada_declaration directly.
2647 (struct with): Change type of limited field to bool.
2648 (append_withs): Change type of limited_access parameter to bool.
2649 (pp_ada_tree_identifie): Likewise.
2650 (dump_ada_decl_nam): Likewise.
2651 (dump_generic_ada_node): Likewise. Do not print the return type.
2652 (to_ada_name): Change type of space_found parameter to bool.
2653 (dump_ada_function_declaration): Return void and change type of
2654 parameters to bool. Also print the return type for a function.
2655 (print_ada_methods): Rename into...
2656 (dump_ada_methods): ...this.
2657 (print_ada_declaration): Rename into ...
2658 (dump_ada_declaration): ...this. Do not print the return type.
2659 (print_ada_struct_decl): Rename into...
2660 (dump_ada_struct_decl): ...this.
2661
7d386d45
JJ
26622017-09-29 Jakub Jelinek <jakub@redhat.com>
2663
2664 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
2665 rather than DECL_INITIAL.
2666 (common_handle_aligned_attribute): Likewise.
2667
ab20d992 26682017-09-20 Alexandre Oliva <aoliva@redhat.com>
9ed32e27
AO
2669
2670 * c.opt (gen-decls): Add RejectNegative.
2671
026a79f7
AS
26722017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
2673 Jakub Jelinek <jakub@redhat.com>
2674
2675 Add support for -std=c++2a.
2676 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
2677 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
2678 * c-opts.c (set_std_cxx2a): New.
2679 (c_common_handle_option): Set options when -std=c++2a is enabled.
2680 (c_common_post_options): Adjust comments.
2681 (set_std_cxx14, set_std_cxx17): Likewise.
2682
4a8ca690
EB
26832017-09-15 Eric Botcazou <ebotcazou@adacore.com>
2684
2685 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
2686 message for non-uniform endianness and issue a warning in C++.
2687
7b936140
JJ
26882017-09-15 Jakub Jelinek <jakub@redhat.com>
2689
2690 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
2691 (Wc++17-compat): Change from undocumented alias to option.
2692 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
2693 change C++1z to C++17 in description.
2694 (std=c++1z, std=gnu++1z): Change from option to undocumented
2695 deprecated alias.
2696 (std=c++17, std=gnu++17): Change from undocumented alias to option.
2697 Adjust description.
2698 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
2699 * c-opts.c (set_std_cxx1z): Rename to ...
2700 (set_std_cxx17): ... this.
2701 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
2702 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 2703 caller.
7b936140
JJ
2704 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
2705 comments.
2706
12263f13
L
27072017-09-12 H.J. Lu <hongjiu.lu@intel.com>
2708
2709 * c-attribs.c (common_handle_aligned_attribute): Don't warn
2710 function alignment if warn_if_not_aligned_p is true.
2711
6836632e
NS
27122017-09-12 Nathan Sidwell <nathan@acm.org>
2713
2714 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2715 resort_sorted_fields): Move to c/c-decl.c.
2716 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
2717 (struct sorted_fields_type): Move to c/c-lang.h.
2718
019bf9ad
JW
27192017-09-09 Jonathan Wakely <jwakely@redhat.com>
2720
2721 PR c++/81852
2722 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
2723
bc7fe952
MP
27242017-09-04 Marek Polacek <polacek@redhat.com>
2725
2726 PR c/81783
2727 * c-warn.c (warn_tautological_bitwise_comparison): New function.
2728 (warn_tautological_cmp): Call it.
2729
ab20d992 27302017-09-01 Boris Kolpackov <boris@codesynthesis.com>
de7c2c6a
BK
2731
2732 * c-opts.c (c_common_finish): Write dependency information even if
2733 there are errors.
2734
d2e05fcb
JJ
27352017-09-01 Jakub Jelinek <jakub@redhat.com>
2736
2737 PR c/81887
2738 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
2739 (omp_pragmas_simd): ... here.
2740 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
2741 create new clauses list containing just simd clause.
2742
18e2a8b8
RS
27432017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2744 Alan Hayward <alan.hayward@arm.com>
2745 David Sherwood <david.sherwood@arm.com>
2746
2747 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
2748 into scalar_mode_supported_p call.
2749 (handle_mode_attribute): Update call to scalar_mode_supported_p.
2750
16d22000
RS
27512017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2752 Alan Hayward <alan.hayward@arm.com>
2753 David Sherwood <david.sherwood@arm.com>
2754
2755 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
2756 for the mode iterator.
2757
b397965c
RS
27582017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2759 Alan Hayward <alan.hayward@arm.com>
2760 David Sherwood <david.sherwood@arm.com>
2761
2762 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
2763 * c-common.c (c_build_vec_perm_expr): Likewise.
2764
357b7604
RS
27652017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2766 Alan Hayward <alan.hayward@arm.com>
2767 David Sherwood <david.sherwood@arm.com>
2768
2769 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
2770
e05c94ba
RS
27712017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2772 Alan Hayward <alan.hayward@arm.com>
2773 David Sherwood <david.sherwood@arm.com>
2774
2775 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
2776 before calling targetm.addr_space.valid_pointer_mode.
2777
5c20c4af
RS
27782017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2779 Alan Hayward <alan.hayward@arm.com>
2780 David Sherwood <david.sherwood@arm.com>
2781
2782 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
2783
c94843d2 27842017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
2785 Alan Hayward <alan.hayward@arm.com>
2786 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
2787
2788 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
2789 iterators.
2790 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
2791
4e10a5a7
RS
27922017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2793 Alan Hayward <alan.hayward@arm.com>
2794 David Sherwood <david.sherwood@arm.com>
2795
2796 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
2797 case statements.
2798
130fcab0
ML
27992017-08-29 Martin Liska <mliska@suse.cz>
2800
2801 PR other/39851
2802 * c-common.c (parse_optimize_options): Add argument to function
2803 call.
2804 * c-pragma.c (handle_pragma_diagnostic): Likewise.
2805
14e18d71
DM
28062017-08-24 David Malcolm <dmalcolm@redhat.com>
2807
2808 * c-lex.c (interpret_float): Use token location
2809 when building an EXCESS_PRECISION_EXPR.
2810
2f687306
DM
28112017-08-21 David Malcolm <dmalcolm@redhat.com>
2812
2813 * c-common.c (check_function_arguments): Add "arglogs" param; pass
2814 it to check_function_format.
2815 * c-common.h (check_function_arguments): Add vec<location_t> *
2816 param.
2817 (check_function_format): Likewise.
2818 * c-format.c (struct format_check_context): Add field "arglocs".
2819 (check_function_format): Add param "arglocs"; pass it to
2820 check_format_info.
ab20d992 2821 (check_format_info): Add param "arglocs"; use it to initialize
2f687306
DM
2822 new field of format_ctx.
2823 (check_format_arg): Pass format_ctx->arglocs to new param of
2824 check_format_info_main.
2825 (class argument_parser): New field "arglocs".
2826 (argument_parser::argument_parser): Add "arglocs_" param and use
2827 it to initialize new field.
2828 (argument_parser::check_argument_type): Pass new arglocs field to
2829 check_format_types.
2830 (check_format_info_main): Add param "arglocs", and use it when
2831 constructing arg_parser.
2832 (check_format_types): Add param "arglocs"; use it if non-NULL when
2833 !EXPR_HAS_LOCATION (cur_param) to get at location information.
2834
00aa1fa2
L
28352017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2836
2837 PR c/53037
2838 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
2839 (c_common_attribute_table): Add warn_if_not_aligned.
2840 (handle_aligned_attribute): Renamed to ...
2841 (common_handle_aligned_attribute): Remove argument, name, and add
2842 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
2843 (handle_aligned_attribute): New.
2844 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
2845
27be025d
MS
28462017-08-14 Martin Sebor <msebor@redhat.com>
2847
2848 PR c/81117
2849 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
2850 (handle_nonstring_attribute): New function.
2851
da67acb9
MS
28522017-08-14 Martin Sebor <msebor@redhat.com>
2853
2854 PR c/81117
2855 * c-format.h (T89_G): New macro.
2856 * c-format.c (local_gcall_ptr_node): New variable.
2857 (init_dynamic_diag_info): Initialize it.
2858
a8b522b4
ML
28592017-08-11 Martin Liska <mliska@suse.cz>
2860
2861 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
2862 TARGET_SUPPORTS_ALIASES.
2863
32129a17
DM
28642017-08-10 David Malcolm <dmalcolm@redhat.com>
2865
2866 * c-common.c (c_parse_error): Add rich_location * param, using it
2867 rather implicitly using input_location.
2868 * c-common.h (c_parse_error): Add rich_location * param.
2869
30af3a2b
MP
28702017-08-09 Marek Polacek <polacek@redhat.com>
2871
2872 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
2873 (c_common_truthvalue_conversion): Likewise.
2874 * c-omp.c (c_finish_omp_atomic): Likewise.
2875 * c-common.h (build_binary_op): Update declaration.
2876
314e6352
ML
28772017-08-08 Martin Liska <mliska@suse.cz>
2878
2879 * c-ada-spec.c: Include header files.
2880 * c-ubsan.c: Likewise.
2881 * c-warn.c: Likewise.
2882
56b5041c
JJ
28832017-08-07 Jakub Jelinek <jakub@redhat.com>
2884
2885 PR c/69389
2886 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
2887
db440138
EB
28882017-08-07 Eric Botcazou <ebotcazou@adacore.com>
2889
2890 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
2891 (print_ada_methods): Likewise.
2892 (print_ada_declaration): Likewise.
2893
577eec56
ML
28942017-08-07 Martin Liska <mliska@suse.cz>
2895
2896 * array-notation-common.c: Add new includes.
2897 * c-format.c( handle_format_attribute): Canonicalize a format
2898 function name.
2899 * c-lex.c (c_common_has_attribute): Canonicalize name of an
2900 attribute.
2901 * c-pretty-print.c: Add new include.
2902
b854df3c
EB
29032017-08-05 Eric Botcazou <ebotcazou@adacore.com>
2904
2905 * c-ada-spec.c (has_static_fields): Look only into variables.
2906 (print_constructor): Add TYPE parameter and use it for the name.
2907 (print_destructor): Likewise.
2908 (print_ada_declaration): Adjust to new constructor/destructor names.
2909 Adjust calls to print_constructor and print_destructor.
2910 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
2911 Look only into variables in the final loop.
2912
9f2cb25e
EB
29132017-08-01 Eric Botcazou <ebotcazou@adacore.com>
2914
2915 * c-ada-spec.c (has_static_fields): Look only into fields.
2916 (dump_generic_ada_node): Small tweak.
2917 (dump_nested_types): Look only into fields.
2918 (print_ada_declaration): Look only into methods. Small tweak.
2919 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
2920
f4bcd9eb
EB
29212017-08-01 Eric Botcazou <ebotcazou@adacore.com>
2922
2923 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
2924 (dump_ada_function_declaration): Likewise.
2925 (dump_generic_ada_node): Likewise.
2926 (print_ada_declaration): Add support for const-qualified variables.
2927
f34ebeb2
ML
29282017-07-31 Martin Liska <mliska@suse.cz>
2929
2930 PR sanitize/81530
2931 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
2932 Guard condition with flag_sanitize_p also with current_function_decl
2933 non-null equality.
2934 (ubsan_maybe_instrument_reference_or_call): Likewise.
2935
218e5d04
UB
29362017-07-30 Uros Bizjak <ubizjak@gmail.com>
2937
2938 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
2939
942047f2
EB
29402017-07-29 Eric Botcazou <ebotcazou@adacore.com>
2941
2942 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
2943 for enumeral types.
2944 (print_ada_declaration): Add missing guard for record types.
2945
a40ff0ae
JJ
29462017-07-27 Jakub Jelinek <jakub@redhat.com>
2947
2948 PR c/45784
2949 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
2950 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
2951 new COMPOUND_EXPRs around the rhs of the comparison.
2952
06bd22f6
MP
29532017-07-27 Marek Polacek <polacek@redhat.com>
2954
2955 PR c/81417
2956 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
2957 the types.
2958
036ea399
JJ
29592017-07-27 Jakub Jelinek <jakub@redhat.com>
2960
2961 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
2962 (handle_noipa_attribute): New function.
2963
417ca011
TD
29642017-07-07 Torsten Duwe <duwe@suse.de>
2965
2966 * c-attribs.c (c_common_attribute_table): Add entry for
2967 "patchable_function_entry".
2968
5aaa8fb4
NS
29692017-07-20 Nathan Sidwell <nathan@acm.org>
2970
2971 Remove TYPE_METHODS.
2972 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
2973 dump_ada_template, print_ada_methods,
2974 print_ada_declaration): Member fns are on TYPE_FIELDS.
2975
ff22eb12
NS
29762017-07-18 Nathan Sidwell <nathan@acm.org>
2977
2978 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
2979
eea77d1f
DM
29802017-07-14 David Malcolm <dmalcolm@redhat.com>
2981
2982 * c-common.c (try_to_locate_new_include_insertion_point): New
2983 function.
2984 (per_file_includes_t): New typedef.
2985 (added_includes_t): New typedef.
2986 (added_includes): New variable.
2987 (maybe_add_include_fixit): New function.
2988 * c-common.h (maybe_add_include_fixit): New decl.
2989
281ac396
MS
29902017-07-10 Martin Sebor <msebor@redhat.com>
2991
2992 PR other/81345
2993 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
2994
b6f43128
DM
29952017-07-06 David Malcolm <dmalcolm@redhat.com>
2996
2997 * c-common.c (selftest::c_family_tests): New.
2998 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
2999 (selftest::c_family_tests): New decl.
3000
efbf55b0
MP
30012017-07-04 Marek Polacek <polacek@redhat.com>
3002
3003 PR c/81231
3004 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
3005 types.
3006
6c86bd88
MP
30072017-07-04 Marek Polacek <polacek@redhat.com>
3008
3009 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
3010
17a7218b
ML
30112017-06-28 Martin Liska <mliska@suse.cz>
3012
3013 PR ipa/81128
3014 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
3015 to a function declaration.
3016
63010089
ML
30172017-06-28 Martin Liska <mliska@suse.cz>
3018
3019 PR driver/79659
3020 * c.opt: Add IntegerRange to various options.
3021
3e2becc4
MP
30222017-06-26 Marek Polacek <polacek@redhat.com>
3023
3024 PR c/80116
3025 * c-common.h (warn_for_multistatement_macros): Declare.
3026 * c-warn.c: Include "c-family/c-indentation.h".
3027 (warn_for_multistatement_macros): New function.
3028 * c.opt (Wmultistatement-macros): New option.
3029 * c-indentation.c (guard_tinfo_to_string): No longer static.
3030 Change the parameter type to "enum rid". Handle RID_SWITCH.
3031 * c-indentation.h (guard_tinfo_to_string): Declare.
3032
2db9b7cd
MG
30332017-06-23 Marc Glisse <marc.glisse@inria.fr>
3034
3035 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
3036
c3684b7b
MS
30372017-06-15 Martin Sebor <msebor@redhat.com>
3038
3039 PR c++/80560
3040 * c.opt (-Wclass-memaccess): New option.
3041
e72c4afd
BK
30422017-06-14 Boris Kolpackov <boris@codesynthesis.com>
3043
3044 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
3045
8a516588
MP
30462017-06-13 Marek Polacek <polacek@redhat.com>
3047
3048 PR objc/80949
3049 * c-warn.c (do_warn_duplicated_branches): Return if any of the
3050 branches is null.
3051
45b2222a
ML
30522017-06-13 Martin Liska <mliska@suse.cz>
3053
3054 PR sanitize/78204
3055 * c-attribs.c (add_no_sanitize_value): New function.
3056 (handle_no_sanitize_attribute): Likewise.
3057 (handle_no_sanitize_address_attribute): Use the function.
3058 (handle_no_sanitize_thread_attribute): New function.
3059 (handle_no_address_safety_analysis_attribute): Use
3060 add_no_sanitize_value.
3061 (handle_no_sanitize_undefined_attribute): Likewise.
3062 * c-common.h: Declare new functions.
3063 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
3064 (ubsan_instrument_shift): Likewise.
3065 (ubsan_instrument_bounds): Likewise.
3066 (ubsan_maybe_instrument_array_ref): Likewise.
3067 (ubsan_maybe_instrument_reference_or_call): Likewise.
3068
a01f151f
JM
30692017-06-11 Jason Merrill <jason@redhat.com>
3070
3071 * c-ada-spec.c, c-pragma.c: Use id_equal.
3072
3de4ac6d
MP
30732017-06-04 Marek Polacek <polacek@redhat.com>
3074
3075 PR c/80919
3076 * c-format.c (matching_type_p): Return false if any of the types
3077 requires structural equality.
3078
2474f48f
MS
30792017-06-02 Martin Sebor <msebor@redhat.com>
3080
3081 PR c/80892
3082 * c-warn.c (conversion_warning): Use -Wconversion for integer
3083 conversion and -Wfloat-conversion for floating one.
3084
40ffd95f
BE
30852017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3086
3087 * c.opt (Wsizeof-pointer-div): New warning option.
3088
3fa4634c
VR
30892017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
3090
3091 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
3092 (Wcatch-value=1): Enable by -Wall.
3093
f012c8ef
DM
30942017-05-30 David Malcolm <dmalcolm@redhat.com>
3095
3096 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
3097 format_chars.
3098 * c.opt (fdiagnostics-show-template-tree): New option.
3099 (felide-type): New option.
3100
63dbcd13
VR
31012017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
3102
3103 * c.opt (Wcatch-value=): New C++ warning flag.
3104
be136b5c
NS
31052017-05-24 Nathan Sidwell <nathan@acm.org>
3106
3107 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
3108 const casts to avoid warning.
3109
3cd211af
MS
31102017-05-24 Martin Sebor <msebor@redhat.com>
3111
3112 PR c/80731
3113 * c-common.h (unsafe_conversion_p): Add a function argument.
3114 * c-common.c (unsafe_conversion_p): Same.
3115 Add type names and values to diagnostics.
3116 (scalar_to_vector): Adjust.
3117 * c-warn.c (constant_expression_error): Add a function argument.
3118 Add type names and values to diagnostics.
3119 (conversion_warning): Add a function argument.
3120 Add type names and values to diagnostics.
3121 (warnings_for_convert_and_check): Same.
3122
1ff7be5a
JM
31232017-05-19 Jason Merrill <jason@redhat.com>
3124
3125 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
3126 enumerators.
3127
ff502317
BE
31282017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3129
3130 * c-format.c (locus): Move out of function scope,
3131 add GTY attribute.
3132
2a8a8d7b
NS
31332017-05-19 Nathan Sidwell <nathan@acm.org>
3134
3135 * c-opts.c (class_dump_file, class_dump_flags): Delete.
3136 (c_common_parse_file): Remove class dump handling.
3137 (get_dump_info): Likewise.
3138
39aac208
RB
31392017-05-19 Richard Biener <rguenther@suse.de>
3140
3141 PR c++/80593
3142 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
3143 to alias-set zero memory.
3144
6ecd2339
BE
31452017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3146
3147 * c-format.c (local_tree_type_node): Add GTY attribute.
3148
6574d78e
MP
31492017-05-18 Marek Polacek <polacek@redhat.com>
3150
3151 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
3152 (c_common_fixed_point_type_for_size): Likewise.
3153 (c_common_type_for_mode): Likewise.
3154 (shorten_compare): Likewise.
3155 (c_promoting_integer_type_p): Use false/true instead of 0/1.
3156 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
3157
e3455240
MP
31582017-05-18 Marek Polacek <polacek@redhat.com>
3159
3160 * c-common.c (self_promoting_args_p): Change the return type to bool.
3161 Use false/true instead of 0/1.
3162 * c-common.h (self_promoting_args_p): Update.
3163
3fa8871b
MP
31642017-05-17 Marek Polacek <polacek@redhat.com>
3165
3166 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
3167 * c-warn.c: Likewise.
3168
b42cc3ca
VV
31692017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
3170
3171 Implement new C++ intrinsics __is_assignable and __is_constructible.
3172 * c-common.c (__is_assignable, __is_constructible): New.
3173 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
3174
1a817418
ML
31752017-05-17 Martin Liska <mliska@suse.cz>
3176
3177 * c-common.h: Introduce dump_flags_t type and
3178 use it instead of int type.
3179 * c-gimplify.c (c_genericize): Likewise.
3180 * c-opts.c: Likewise.
3181
b2fa0a8b
MP
31822017-05-17 Marek Polacek <polacek@redhat.com>
3183
3184 * c-common.c (c_save_expr): Remove.
3185 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
3186 * c-common.h (c_save_expr): Remove declaration.
3187
31c2d57d
VR
31882017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
3189
3190 PR c/35441
3191 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
3192 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
3193 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
3194 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
3195 RDIV_EXPR.
3196 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
3197
684f84de
MP
31982017-05-09 Marek Polacek <polacek@redhat.com>
3199
3200 PR c/80525
3201 * c-warn.c (unwrap_c_maybe_const): New.
3202 (warn_logical_operator): Call it.
3203
641da50a
NS
32042017-05-09 Nathan Sidwell <nathan@acm.org>
3205
3206 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
3207 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
3208
631238ac
MS
32092017-05-08 Martin Sebor <msebor@redhat.com>
3210
3211 PR translation/80280
3212 * c-format.h (struct format_flag_spec): Add new member.
3213 (T89_T): New macro.
3214 * c-format.c (local_tree_type_node): New global.
3215 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
3216 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
3217 (strfmon_flag_specs): Likewise.
3218 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
3219 with distinct quoting properties.
3220 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
3221 (flag_chars_t::validate): Add argument and handle bad quoting.
3222 (check_format_info_main): Handle quoting problems.
3223 (init_dynamic_diag_info): Simplify.
3224
49f0c04c
JM
32252017-05-08 Jason Merrill <jason@redhat.com>
3226
3227 * c-opts.c (c_common_post_options): Update defaults for
3228 flag_abi_version and flag_abi_compat_version.
3229
56d35585
DM
32302017-05-05 David Malcolm <dmalcolm@redhat.com>
3231
3232 * c-common.c (c_cpp_error): Replace report_diagnostic
3233 with diagnostic_report_diagnostic.
3234
0f2c4a8f
MS
32352017-05-04 Martin Sebor <msebor@redhat.com>
3236
3237 PR translation/80280
3238 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
3239 (handle_weakref_attribute): Same.
3240
6fe63fb4
NS
32412017-05-03 Nathan Sidwell <nathan@acm.org>
3242
3243 Canonicalize canonical type hashing
3244 * c-common.c (complete_array_type): Use type_hash_canon.
3245
815d9cc6
XR
32462017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3247
92a285c1 3248 PR c++/80038
815d9cc6
XR
3249 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
3250 prototype.
3251 (cilk_install_body_pedigree_operations): Likewise.
3252 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
3253 detatched.
3254 (cilk_gimplify_call_params_in_spawned_fn): Remove.
3255 (cilk_install_body_pedigree_operations): Likewise.
3256 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
3257 unwrapping.
3258
f8a36447
JJ
32592017-04-27 Jakub Jelinek <jakub@redhat.com>
3260
3261 PR c++/80534
3262 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
3263 flag on non-aggregate element types.
3264
7c145456
BE
32652017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
3266
3267 * c-common.c (c_type_hasher, type_hash_table): Remove.
3268 (c_common_get_alias_set): Remove unreachable code.
3269 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
3270
c3cbcd45
VR
32712017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
3272
3273 * c.opt (Wextra-semi): New C++ warning flag.
3274
8a59d466
JJ
32752017-04-20 Jakub Jelinek <jakub@redhat.com>
3276
3277 PR middle-end/80423
3278 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
3279
8487c9a5
JJ
32802017-04-18 Jakub Jelinek <jakub@redhat.com>
3281
3282 PR middle-end/79788
3283 PR middle-end/80375
3284 * c-common.c (c_common_type_for_mode): Don't handle
3285 widest_*_literal_type_node here.
3286 c_common_signed_or_unsigned_type): Likewise.
3287 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
3288 to *intTI_type_node or *intDI_type_node depending on whether
3289 TImode is supported by the target or not.
3290
3ee0fb02
ML
32912017-04-10 Martin Liska <mliska@suse.cz>
3292
3293 PR sanitizer/80350
3294 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
3295 doing an UBSAN check.
3296
5764ee3c
JW
32972017-04-03 Jonathan Wakely <jwakely@redhat.com>
3298
3299 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
3300
6f3af356
JJ
33012017-03-31 Jakub Jelinek <jakub@redhat.com>
3302
3303 PR c++/79572
3304 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
3305 tree *.
3306 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
3307 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
3308 REFERENCE_TYPE.
3309
f6a7a9d5
DM
33102017-03-31 David Malcolm <dmalcolm@redhat.com>
3311
3312 PR documentation/78732
3313 * c.opt (Wendif-labels): Fix description to refer to
3314 #else rather than #elif.
3315
af88f557
JJ
33162017-03-31 Jakub Jelinek <jakub@redhat.com>
3317
3318 PR libstdc++/80251
3319 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
3320 * c-common.c (c_common_reswords): Add __is_aggregate trait.
3321
a9e4a1a5
JJ
33222017-03-27 Jakub Jelinek <jakub@redhat.com>
3323
3324 PR middle-end/80162
3325 * c-common.c (c_common_mark_addressable_vec): Don't set
3326 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
3327
3f01b620
MS
33282017-03-21 Martin Sebor <msebor@redhat.com>
3329
3330 PR c++/79548
3331 * c-common.c (set_underlying_type): Mark type used only when
3332 original del is declared unused.
3333
2f6f187a
DM
33342017-03-10 David Malcolm <dmalcolm@redhat.com>
3335
3336 PR translation/79848
3337 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
3338 "%qs".
3339
a02fa805
DM
33402017-03-10 David Malcolm <dmalcolm@redhat.com>
3341
3342 PR c/79921
3343 * c-indentation.c (warn_for_misleading_indentation): Remove parens
3344 from inform's message, so that xgettext can locate it.
3345
822a132c
MP
33462017-03-09 Marek Polacek <polacek@redhat.com>
3347
3348 PR c++/79962
3349 PR c++/79984
3350 * c-attribs.c (handle_nonnull_attribute): Save the result of default
3351 conversion to the attribute list.
3352
bba81f1c
ML
33532017-03-09 Martin Liska <mliska@suse.cz>
3354
3355 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
3356
108154ff
JM
33572017-03-03 Jason Merrill <jason@redhat.com>
3358
3359 * c.opt (Wnoexcept-type): New.
3360
eb0e7c34
RB
33612017-03-02 Richard Biener <rguenther@suse.de>
3362
3363 PR c/79756
3364 * c-common.c (c_common_mark_addressable_vec): Look through
3365 C_MAYBE_CONST_EXPR.
3366
9453ba0a
ML
33672017-02-28 Martin Liska <mliska@suse.cz>
3368
3369 * c.opt: Replace space with tabular for options of <number>
3370 type.
3371
6a825afe
ML
33722017-02-28 Martin Liska <mliska@suse.cz>
3373
3374 * c.opt: Fix --help=option -Q for options which are of
3375 an enum type.
3376
4227c9ad
JJ
33772017-02-24 Jakub Jelinek <jakub@redhat.com>
3378
3379 PR c++/79588
3380 * c-common.c (check_function_restrict): New function.
3381 (check_function_arguments): Add FNDECL argument. Call
3382 check_function_restrict if -Wrestrict.
3383 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
3384 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
3385 * c-common.h (check_function_arguments): Add FNDECL argument.
3386 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
3387
59909673
EB
33882017-02-24 Eric Botcazou <ebotcazou@adacore.com>
3389
3390 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
3391 treatment of parameters with pointer-to-tagged type and tidy up.
3392 (print_ada_methods): Remove the special treatment of C++ static member
3393 functions.
3394
54dcd526
ML
33952017-02-22 Martin Liska <mliska@suse.cz>
3396
3397 * c.opt: Replace inequality signs with square brackets
3398 for -Wnornalized.
3399
00bc9de3
JJ
34002017-02-21 Jakub Jelinek <jakub@redhat.com>
3401
3402 PR c++/79641
3403 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
3404 preserve quals.
3405
97fcf744
JM
34062017-02-17 Joseph Myers <joseph@codesourcery.com>
3407
3408 * c-cppbuiltin.c (builtin_define_float_constants): Define
3409 __DECIMAL_DIG__ to the value for long double.
3410
c7545f1c
MP
34112017-02-15 Marek Polacek <polacek@redhat.com>
3412
3413 PR c/79515
3414 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
3415 conversion has occured.
3416
c2e84327
DM
34172017-01-24 David Malcolm <dmalcolm@redhat.com>
3418
3419 * c-common.c (c_common_reswords): Add "__RTL".
3420 * c-common.h (enum rid): Add RID_RTL.
3421
2ebd93e1
MP
34222017-01-20 Marek Polacek <polacek@redhat.com>
3423
3424 PR c/64279
3425 * c-common.h (do_warn_duplicated_branches_r): Declare.
3426 * c-gimplify.c (c_genericize): Walk the function tree calling
3427 do_warn_duplicated_branches_r.
3428 * c-warn.c (expr_from_macro_expansion_r): New.
3429 (do_warn_duplicated_branches): New.
3430 (do_warn_duplicated_branches_r): New.
3431 * c.opt (Wduplicated-branches): New option.
3432
0d80ab91
DM
34332017-01-17 David Malcolm <dmalcolm@redhat.com>
3434
3435 PR c++/71497
3436 * c-indentation.c (warn_for_misleading_indentation): Use the past
3437 subjunctive in the note.
3438
7f991c36
AH
34392017-01-17 Aldy Hernandez <aldyh@redhat.com>
3440
3441 PR c/79116
3442 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
3443 start type to integer_type.
3444
1c70261c
JJ
34452017-01-16 Jakub Jelinek <jakub@redhat.com>
3446
3447 PR driver/49726
3448 * c.opt (gen-decls): Add Driver flag.
3449
1ddca3f3
PC
34502017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3451
3452 Revert:
3453 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3454
3455 PR c++/71737
3456 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
3457
7d2f3f1d
PC
34582017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3459
3460 PR c++/71737
3461 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
3462
bce6f760
MS
34632017-01-12 Martin Sebor <msebor@redhat.com>
3464
3465 (-Wformat-overflow): ...to this.
3466
bf5fbf46
MS
34672017-01-11 Martin Sebor <msebor@redhat.com>
3468
3469 PR c/78768
3470 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
3471 Also enable for LTO.
3472
e363df3f
JM
34732017-01-10 Jason Merrill <jason@redhat.com>
3474
3475 Implement P0195R2, C++17 variadic using.
3476 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
3477
bd2c6270
JJ
34782017-01-09 Jakub Jelinek <jakub@redhat.com>
3479
3480 PR translation/79019
3481 PR translation/79020
3482 * c.opt (Wnormalized=): Fix typo in description.
3483
efcc8d38
MS
34842017-01-08 Martin Sebor <msebor@redhat.com>
3485
3486 PR middle-end/77708
3487 * c.opt (-Wformat-truncation): New option.
3488
ab20d992 34892017-01-06 Alexandre Oliva <aoliva@redhat.com>
435f3f7a
AO
3490
3491 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
3492 value to unsigned short to fit in 4 hex digits without
3493 warnings.
3494
4e89adf9
EB
34952017-01-05 Eric Botcazou <ebotcazou@adacore.com>
3496
3497 * c.opt (fsso-struct): Add 'native' value.
3498
cd445b54
ML
34992017-01-05 Martin Liska <mliska@suse.cz>
3500
3501 PR pch/78970
3502 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
3503 header.
3504
a9342885
MP
35052017-01-04 Marek Polacek <polacek@redhat.com>
3506
3507 PR c++/64767
3508 * c.opt (Wpointer-compare): New option.
3509
fc73e60c
JJ
35102017-01-04 Jakub Jelinek <jakub@redhat.com>
3511
3512 PR driver/78957
3513 * c.opt (fsso-struct=): Add RejectNegative.
3514
cbe34bb5
JJ
35152017-01-01 Jakub Jelinek <jakub@redhat.com>
3516
3517 Update copyright years.
3518
d4a6c0ea
ML
35192016-12-29 Martin Liska <mliska@suse.cz>
3520
3521 PR c/78933
3522 * c.opt (strong-eval-order): Add RejectNegative keyword.
3523
67a5ad7c
JM
35242016-12-22 Jason Merrill <jason@redhat.com>
3525
3526 Implement P0522R0, matching of template template arguments.
3527 * c-cppbuiltin.c (c_cpp_builtins): Define
3528 __cpp_template_template_args.
3529
0dba7960
JJ
35302016-12-21 Jakub Jelinek <jakub@redhat.com>
3531
3532 PR bootstrap/78817
3533 * c-common.c (struct nonnull_arg_ctx): New type.
3534 (check_function_nonnull): Return bool instead of void. Use
3535 nonnull_arg_ctx as context rather than just location_t.
3536 (check_nonnull_arg): Adjust for the new context type, set
3537 warned_p to true if a warning has been diagnosed.
3538 (check_function_arguments): Return bool instead of void.
3539 * c-common.h (check_function_arguments): Adjust prototype.
3540
31bfc9b9
JM
35412016-12-21 Jason Merrill <jason@redhat.com>
3542
3543 * c.opt (-fnew-ttp-matching): New flag.
3544 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
3545
629b3d75
MJ
35462016-12-14 Martin Jambor <mjambor@suse.cz>
3547
3548 * c-omp.c: Include omp-general.h instead of omp-low.h.
3549 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
3550 name.
3551
474da67e
MS
35522016-12-14 Martin Sebor <msebor@redhat.com>
3553
3554 PR c/17308
3555 * c-common.c (check_nonnull_arg): Disable when optimization
3556 is enabled.
3557
fe366b87
MP
35582016-12-12 Marek Polacek <polacek@redhat.com>
3559
3560 PR c++/78647
3561 * c-common.c (attribute_fallthrough_p): Return false for
3562 error_mark_node.
3563
8bd9f164
MS
35642016-12-08 Martin Sebor <msebor@redhat.com>
3565
3566 PR c/78284
3567 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
3568
060162e0
MS
35692016-12-08 Martin Sebor <msebor@redhat.com>
3570
3571 PR c/78165
92a285c1
ML
3572 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
3573 suffix.
060162e0 3574
ee92e7ba
MS
35752016-12-07 Martin Sebor <msebor@redhat.com>
3576
3577 PR c/53562
3578 PR middle-end/77784
3579 PR middle-end/78149
3580 PR middle-end/78138
3581 * c.opt (-Wstringop-overflow): New option.
3582
84b0769e
MO
35832016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
3584
3585 * c-attribs.c (asan odr indicator): New attribute.
3586 (handle_asan_odr_indicator_attribute): New function.
3587
7fa6a965
PK
35882016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3589
3590 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
3591 ptrdiff_type_node;
3592
56d8ffc1
JG
35932016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
3594
3595 * c-common.c (excess_precision_mode_join): New.
3596 (c_ts18661_flt_eval_method): New.
3597 (c_c11_flt_eval_method): Likewise.
3598 (c_flt_eval_method): Likewise.
3599 * c-common.h (excess_precision_mode_join): New.
3600 (c_flt_eval_method): Likewise.
3601 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
3602 (cpp_iec_559_value): Call it.
3603 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
3604 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
3605 __FLT_EVAL_METHOD_TS_18661_3__.
3606
04f0fcf7
JG
36072016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
3608
3609 * c-opts.c (c_common_post_options): Add logic to handle the default
3610 case for -fpermitted-flt-eval-methods.
3611
fb2675cb
PB
36122016-11-23 Paolo Bonzini <bonzini@gnu.org>
3613
3614 * c.opt (Wexpansion-to-defined): New.
3615
ec1c5694
JJ
36162016-11-23 Jakub Jelinek <jakub@redhat.com>
3617
3618 PR target/78451
3619 * c-pragma.c (handle_pragma_target): Don't replace
3620 current_target_pragma, but chainon the new args to the current one.
3621
730c9e75
NS
36222016-11-22 Nathan Sidwell <nathan@acm.org>
3623
3624 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 3625 indentation and formatting.
730c9e75 3626
89990732
MS
36272016-11-21 Martin Sebor <msebor@redhat.com>
3628
3629 * c.opt (-fprintf-return-value): Enable by default.
3630
48330c93
BE
36312016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3632
3633 PR c++/71973
3634 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
3635 * c-common.c (c_common_nodes_and_builtins): Initialize
3636 const_tm_ptr_type_node.
3637
0d939c95
MP
36382016-11-16 Marek Polacek <polacek@redhat.com>
3639
3640 PR c/78285
3641 * c-common.c (c_add_case_label): Turn error_at calls into inform.
3642
8e745a17
JJ
36432016-11-14 Jakub Jelinek <jakub@redhat.com>
3644
3645 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
3646
1ee62b92 36472016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
3648 Richard Biener <rguenther@suse.de>
3649
3650 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
3651 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
3652 * c.opt (fgimple): New option.
1ee62b92 3653
22b15758
UB
36542016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3655
3656 PR c/35503
3657 * c-common.h (warn_for_restrict): Declare.
3658 * c-warn.c: Include gcc-rich-location.h.
3659 (warn_for_restrict): New function.
3660 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
3661 (gcc_cdiag_char_table): Likewise.
3662 (gcc_cxxdiag_char_table): Likewise.
3663 * c.opt (Wrestrict): New option.
3664
4be719cd
EB
36652016-11-13 Eric Botcazou <ebotcazou@adacore.com>
3666
3667 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
3668 for nested types only if the type is a record or union and dump SLOC.
3669
4a826ca6
JM
36702016-11-09 Jason Merrill <jason@redhat.com>
3671
3672 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
3673
2e955d50
JJ
36742016-11-09 Jakub Jelinek <jakub@redhat.com>
3675
3676 * c-ubsan.c (ubsan_instrument_shift): Handle split
3677 -fsanitize=shift-base and -fsanitize=shift-exponent.
3678
51dc6603
JM
36792016-11-07 Jason Merrill <jason@redhat.com>
3680
3681 * c.opt (Wc++1z-compat): New.
3682 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
3683
6dc4a604
ML
36842016-11-07 Martin Liska <mliska@suse.cz>
3685
3686 * c-warn.c (warn_for_unused_label): Save all labels used
3687 in goto or in &label.
3688
b302001e
JM
36892016-11-03 Jason Merrill <jason@redhat.com>
3690
3691 * c-cppbuiltin.c (c_cpp_builtins): Correct
3692 __cpp_inheriting_constructors.
3693
31f7f784
JM
36942016-11-01 Jason Merrill <jason@redhat.com>
3695
2bc78e3c
JM
3696 * c-cppbuiltin.c (c_cpp_builtins): Update
3697 __cpp_inheriting_constructors.
3698
31f7f784
JM
3699 * c.opt (-fnew-inheriting-ctors): New.
3700 * c-opts.c: Default to on for ABI 11+.
3701
dcb466ec
JJ
37022016-10-31 Jakub Jelinek <jakub@redhat.com>
3703
3704 PR c++/77948
3705 * c.opt (fext-numeric-literals): Add Var and Init.
3706 * c-opts.c (c_common_handle_option): Don't clear
3707 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
3708 (c_common_post_options): Clear it here if not set
3709 explicitly.
3710
52e1b91e
AH
37112016-10-28 Aldy Hernandez <aldyh@redhat.com>
3712
3713 PR debug/77773
3714 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
3715 if NULL.
3716
e16f1cc7
JJ
37172016-10-25 Jakub Jelinek <jakub@redhat.com>
3718
3719 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
3720 * c-common.c (c_common_reswords): Add __builtin_launder.
3721
f8348061
BE
37222016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
3723
3724 * c-common.c (c_common_truthvalue_conversion): Warn for
3725 multiplications in boolean context. Fix the quoting of '<<' and '<'
3726 in the shift warning.
3727
eff89e01
BE
37282016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
3729
3730 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
3731
24bc7bf4
JM
37322016-10-20 Jason Merrill <jason@redhat.com>
3733
3734 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
3735
4c712374
BE
37362016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3737
3738 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
3739 integer shift ops in boolean context.
3740
37412016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
3742
3743 * c.opt (Walloca): New.
3744 (Walloca-larger-than=): New.
3745 (Wvla-larger-than=): New.
3746
8fa18c06
MP
37472016-10-17 Marek Polacek <polacek@redhat.com>
3748
3749 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
3750 Return immediately when finding a match.
3751 (warn_tautological_cmp): Remove a boolean variable that is no longer
3752 needed.
3753
b12b1915
MP
37542016-10-17 Marek Polacek <polacek@redhat.com>
3755
3756 * c-attribs.c: New file.
3757 * c-common.c: Move attributes handling to c-attribs.c.
3758 (get_nonnull_operand): No longer static.
3759 * c-common.h: Move the declarations from c-attribs.c to its own section.
3760
2045acd9
JM
37612016-10-14 Jason Merrill <jason@redhat.com>
3762
3763 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
3764 and __cpp_deduction_guides.
3765
14a2c9aa
JM
37662016-10-13 Jason Merrill <jason@redhat.com>
3767
3768 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
3769
4d0cdd0c
TP
37702016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3771
3772 * c-cppbuiltin.c: Include memmodel.h.
3773 * c-opts.c: Likewise.
3774 * c-pragma.c: Likewise.
3775 * c-warn.c: Likewise.
3776
70f6d5e1
JJ
37772016-10-12 Jakub Jelinek <jakub@redhat.com>
3778
3779 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
3780 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
3781 * c-opts.c (sanitize_cpp_opts): Initialize
3782 cpp_opts->cpp_warn_implicit_fallthrough.
3783
78f61294
MP
37842016-10-11 Marek Polacek <polacek@redhat.com>
3785
3786 * c-common.c (warning_candidate_p): Change the return type to bool
3787 and return true/false instead of 1/0.
3788 (vector_mode_valid_p): Likewise.
3789
038b5cc0
MP
37902016-10-11 Marek Polacek <polacek@redhat.com>
3791
3792 * c-common.c (fold_for_warn): No longer static.
3793 (bool_promoted_to_int_p): Likewise.
3794 (c_common_get_narrower): Likewise.
3795 (constant_expression_warning): Move to c-warn.c.
3796 (constant_expression_error): Likewise.
3797 (overflow_warning): Likewise.
3798 (warn_logical_operator): Likewise.
3799 (find_array_ref_with_const_idx_r): Likewise.
3800 (warn_tautological_cmp): Likewise.
3801 (expr_has_boolean_operands_p): Likewise.
3802 (warn_logical_not_parentheses): Likewise.
3803 (warn_if_unused_value): Likewise.
3804 (strict_aliasing_warning): Likewise.
3805 (sizeof_pointer_memaccess_warning): Likewise.
3806 (check_main_parameter_types): Likewise.
3807 (conversion_warning): Likewise.
3808 (warnings_for_convert_and_check): Likewise.
3809 (match_case_to_enum_1): Likewise.
3810 (match_case_to_enum): Likewise.
3811 (c_do_switch_warnings): Likewise.
3812 (warn_for_omitted_condop): Likewise.
3813 (readonly_error): Likewise.
3814 (lvalue_error): Likewise.
3815 (invalid_indirection_error): Likewise.
3816 (warn_array_subscript_with_type_char): Likewise.
3817 (warn_about_parentheses): Likewise.
3818 (warn_for_unused_label): Likewise.
3819 (warn_for_div_by_zero): Likewise.
3820 (warn_for_memset): Likewise.
3821 (warn_for_sign_compare): Likewise.
3822 (do_warn_double_promotion): Likewise.
3823 (do_warn_unused_parameter): Likewise.
3824 (record_locally_defined_typedef): Likewise.
3825 (maybe_record_typedef_use): Likewise.
3826 (maybe_warn_unused_local_typedefs): Likewise.
3827 (maybe_warn_bool_compare): Likewise.
3828 (maybe_warn_shift_overflow): Likewise.
3829 (warn_duplicated_cond_add_or_warn): Likewise.
3830 (diagnose_mismatched_attributes): Likewise.
3831 * c-common.h: Move the declarations from c-warn.c to its own section.
3832 * c-warn.c: New file.
3833
627be19f
JM
38342016-10-08 Jason Merrill <jason@redhat.com>
3835
3836 * c-common.c (c_common_truthvalue_conversion): Don't distribute
3837 into COND_EXPR in C++.
3838
7bad794a
JJ
38392016-10-08 Jakub Jelinek <jakub@redhat.com>
3840
3841 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
3842 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
3843 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
3844
be845b04
JJ
38452016-10-07 Jakub Jelinek <jakub@redhat.com>
3846
3847 Implement LWG2296 helper intrinsic
3848 * c-common.h (enum rid): Add RID_ADDRESSOF.
3849 * c-common.c (c_common_reswords): Add __builtin_addressof.
3850
c09c4992
BE
38512016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
3852
3853 PR c++/77700
3854 * c-common.c (c_common_truthvalue_conversion): Warn also for
3855 suspicious enum values in boolean context.
3856
342cfb3e
JJ
38572016-10-06 Jakub Jelinek <jakub@redhat.com>
3858
3859 Implement P0258R2 - helper for C++17
3860 std::has_unique_object_representations trait
3861 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
3862 * c-common.c (c_common_reswords): Add
3863 __has_unique_object_representations.
3864
2e69f143
JJ
38652016-10-05 Jakub Jelinek <jakub@redhat.com>
3866
3867 PR sanitizer/66343
3868 * c-ubsan.c (ubsan_instrument_return): Don't call
3869 initialize_sanitizer_builtins here.
3870
700fff34
BE
38712016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
3872
3873 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
3874 conditional expression in boolean context when only one arm is
3875 non-boolean.
3876
9563bfcd
JJ
38772016-10-05 Jakub Jelinek <jakub@redhat.com>
3878
04a32443
JJ
3879 PR sanitizer/77823
3880 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
3881 is not integral.
3882
9563bfcd
JJ
3883 * c-common.c (c_common_reswords): Update comment for C++11.
3884
f1644724
JM
38852016-10-04 Jason Merrill <jason@redhat.com>
3886
3887 * c-common.c (make_tree_vector_from_ctor): New.
3888 * c-common.h: Declare it.
3889
5a79befb
JJ
38902016-10-04 Jakub Jelinek <jakub@redhat.com>
3891
3892 * c-cppbuiltin.c (c_cpp_builtins): Don't define
3893 __LIBGCC_JCR_SECTION_NAME__.
3894
1633d3b9
BE
38952016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
3896
3897 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
3898 left shift in boolean context.
3899
a2c6e7f2
JJ
39002016-09-29 Jakub Jelinek <jakub@redhat.com>
3901
3902 Implement P0001R1 - C++17 removal of register storage class specifier
3903 * c.opt (Wregister): New warning.
3904 * c-opts.c (c_common_post_options): Enable -Wregister by
3905 default for C++17.
3906
75304c87
JG
39072016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
3908
3909 * c-opts.c (c_common_post_options): Remove special case for
3910 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
3911 in C++.
3912
bbfac6da
JJ
39132016-09-27 Jakub Jelinek <jakub@redhat.com>
3914
6e39060a
JJ
3915 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
3916 -std=c++1z.
3917
bbfac6da
JJ
3918 * c-ada-spec.c (print_ada_declaration): Remove break after return.
3919
e73cf9a2
TP
39202016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
3921
3922 * c-common.c: Include memmodel.h.
3923
c6147dc4
MP
39242016-09-26 Marek Polacek <polacek@redhat.com>
3925
3926 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
3927
81fea426
MP
39282016-09-26 Marek Polacek <polacek@redhat.com>
3929
3930 PR c/7652
3931 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
3932 (handle_fallthrough_attribute): New function.
3933 (attribute_fallthrough_p): New function.
3934 * c-common.h (attribute_fallthrough_p): Declare.
3935
9a2300e9
MP
39362016-09-24 Marek Polacek <polacek@redhat.com>
3937
3938 PR c/77490
3939 * c.opt (Wbool-operation): New.
3940
a09e9e35
BE
39412016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3942
3943 * c-common.c (c_common_truthvalue_conversion): Inhibit
3944 Wint-in-bool-context warning with from_macro_definition_at.
3945 Mention the expression will always evaluate to true.
3946
d43b4ccc
MS
39472016-09-21 Martin Sebor <msebor@redhat.com>
3948
3949 PR bootstrap/77676
3950 * c.opt (fprintf-return-value): Temporarily initialize to zero
3951 to unblock bootstrap failures.
3952
2e1c20b1
JJ
39532016-09-21 Jakub Jelinek <jakub@redhat.com>
3954
3955 PR c++/77651
3956 * c.opt (Waligned-new=): Add RejectNegative.
3957 (faligned-new=): Likewise. Spelling fix - change
3958 aligned_new_threshhold to aligned_new_threshold.
3959 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
3960 to aligned_new_threshold.
3961
88d0c3f0
MS
39622016-09-20 Martin Sebor <msebor@redhat.com>
3963
3964 PR middle-end/49905
3965 * c.opt: Add -Wformat-length and -fprintf-return-value.
3966
144a96e4
BE
39672016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3968
3969 PR c++/77434
3970 * c.opt (Wint-in-bool-context): New warning.
3971 * c-common.c (c_common_truthvalue_conversion): Warn on integer
3972 constants in boolean context.
3973
63012d9a
JM
39742016-09-19 Joseph Myers <joseph@codesourcery.com>
3975
3976 * c-common.c (max_align_t_align): Also consider alignment of
3977 float128_type_node.
3978
931388ce
JM
39792016-09-15 Jason Merrill <jason@redhat.com>
3980
3981 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
3982 DECL_EXTERNAL.
3983
38711381
JM
39842016-09-14 Jason Merrill <jason@redhat.com>
3985
3986 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
3987 limit FIELD_DECL, either.
3988
e51fbec3
MP
39892016-09-14 Marek Polacek <polacek@redhat.com>
3990
3991 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
3992 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
3993 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
3994
254830ba
DM
39952016-09-13 David Malcolm <dmalcolm@redhat.com>
3996
3997 * c-common.c (warn_logical_not_parentheses): Replace
3998 rich_location::add_fixit_insert calls with add_fixit_insert_before
3999 and add_fixit_insert_after, eliminating the "next_loc" calculation.
4000
42763690
JM
40012016-09-13 Jason Merrill <jason@redhat.com>
4002 Tom de Vries <tom@codesourcery.com>
4003
4004 PR c++/77427
4005 * c-common.c (set_underlying_type): Don't treat array as builtin type.
4006
9453eee9
JM
40072016-09-13 Jason Merrill <jason@redhat.com>
4008
4009 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
4010 limit types at all.
4011
e96809e3
JM
40122016-09-12 Jason Merrill <jason@redhat.com>
4013
4014 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
4015 bit/byte confusion, allow large alignment for types.
4016
54dcdb88
BE
40172016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
4018
4019 PR c++/77496
4020 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
4021
d1463eb9
DM
40222016-09-12 David Malcolm <dmalcolm@redhat.com>
4023
4024 PR c/72858
4025 * c-format.c (argument_parser::check_argument_type): Add params
4026 "type_start" and "conversion_char". Use the former to generate
4027 offset_to_type_start and pass it and conversion_char to
4028 check_format_types.
4029 (check_format_info_main): Capture the start of the type
4030 information as "type_start", and pass it an format_char
4031 to arg_parser.check_argument_type.
4032 (check_format_types): Provide an example in the leading comment.
4033 Add params "offset_to_type_start" and "conversion_char"; pass
4034 them to format_type_warning calls.
4035 (test_get_modifier_for_format_len): Likewise.
4036 (matching_type_p): New function.
4037 (get_format_for_type): Add param "conversion_char" and move
4038 implementation into...
4039 (get_format_for_type_1): ...new function, called twice.
4040 Use new function matching_type_p rather than checking for
4041 TYPE_CANONICAL equality.
4042 (get_corrected_substring): New function.
4043 (format_type_warning): Provide an example in the leading comment.
4044 Add params "offset_to_type_start" and "conversion_char". Replace
4045 call to get_format_for_type with call to get_corrected_substring
4046 and move rejection of hints for widths/precisions there.
4047 (assert_format_for_type_streq): Add param "conversion_char".
4048 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
4049 (test_get_format_for_type_printf): Add conversion chars to the
4050 tests, adding coverage for various combinations of integer
4051 vs double conversions, and for preserving octal and hexadecimal
4052 conversions.
4053 (test_get_format_for_type_scanf): Add conversion chars to the
4054 tests.
4055
5b28efbb
TV
40562016-09-10 Tom de Vries <tom@codesourcery.com>
4057
4058 PR C/71602
4059 * c-common.c (build_va_arg): Handle more strict
4060 targetm.canonical_va_list_type. Replace first argument type error with
4061 assert.
4062
3f0177e7
MS
40632016-09-09 Martin Sebor <msebor@redhat.com>
4064
4065 PR c/77520
4066 PR c/77521
4067 * c-format.c (argument_parser::find_format_char_info): Use %qc
4068 format directive unconditionally.
4069
af63ba4b
JM
40702016-09-09 Jason Merrill <jason@redhat.com>
4071
4072 Implement C++17 new of over-aligned types.
4073 * c.opt: Add -faligned-new and -Waligned-new.
4074 * c-common.c (max_align_t_align): Split out from...
4075 (cxx_fundamental_alignment_p): ...here.
4076 * c-common.h: Declare it.
4077 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
4078
c65248cb
JM
40792016-09-09 Joseph Myers <joseph@codesourcery.com>
4080
4081 * c-cppbuiltin.c (builtin_define_type_width): New function.
4082 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
4083 macros.
4084
e5106e27
DM
40852016-09-07 David Malcolm <dmalcolm@redhat.com>
4086
4087 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
4088 a POINTER_TYPE.
4089 (substring_loc::get_location): Move to substring-locations.c,
4090 keeping implementation as...
4091 (c_get_substring_location): New function, from the above, reworked
4092 to use accessors rather than member lookup.
4093 * c-common.h (class substring_loc): Move to substring-locations.h,
4094 replacing with a forward decl.
4095 (c_get_substring_location): New decl.
4096 * c-format.c: Include "substring-locations.h".
4097 (format_warning_va): Move to substring-locations.c.
4098 (format_warning_at_substring): Likewise.
4099
ab20d992 41002016-09-06 Martin Sebor <msebor@redhat.com>
a42e7952
MS
4101
4102 PR c/77336
4103 * c-format.c (check_function_format): Avoid issuing warnings for
4104 functions unless they call format functions with non-constant
4105 format strings.
4106
b772a565
RB
41072016-09-06 Richard Biener <rguenther@suse.de>
4108
4109 PR c/77450
4110 * c-common.c (c_common_mark_addressable_vec): Handle
4111 COMPOUND_LITERAL_EXPR.
4112
25ff5dd3
MP
41132016-09-05 Marek Polacek <polacek@redhat.com>
4114
4115 PR c/77423
4116 * c-common.c (bool_promoted_to_int_p): New function.
4117 (expr_has_boolean_operands_p): New function.
4118 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
4119 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
4120
21234eb5
TV
41212016-09-04 Tom de Vries <tom@codesourcery.com>
4122
4123 revert:
4124 2016-08-29 Tom de Vries <tom@codesourcery.com>
4125
4126 * c-common.c (build_va_arg): Replace first argument type error
4127 with assert.
4128
9dc5773f
JJ
41292016-09-02 Jakub Jelinek <jakub@redhat.com>
4130
4131 PR c/65467
4132 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
4133 (c_finish_omp_for): Reject _Atomic qualified iterators.
4134
41352016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
4136
4137 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
4138 size to guarantee it fits the output of the formatted function
4139 regardless of its arguments.
4140
295844f6
MP
41412016-09-01 Marek Polacek <polacek@redhat.com>
4142
4143 PR c/7652
4144 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
4145 FALLTHRU comments.
4146
3d06b6f2
MP
41472016-08-29 Marek Polacek <polacek@redhat.com>
4148
4149 PR c/77292
4150 * c-common.c (warn_logical_not_parentheses): Don't warn for
4151 a comparison or a logical operator.
4152
34cedad5
TV
41532016-08-29 Tom de Vries <tom@codesourcery.com>
4154
4155 * c-common.c (build_va_arg): Fix type comparison assert.
4156
f162d717
TV
41572016-08-29 Tom de Vries <tom@codesourcery.com>
4158
4159 * c-common.c (build_va_arg): Replace first argument type error
4160 with assert.
4161
ba9bbd6f
TV
41622016-08-29 Tom de Vries <tom@codesourcery.com>
4163
4164 PR c/77398
4165 * c-common.c (build_va_arg): Add first argument error. Build va_arg
4166 with error_mark_node as va_list instead of with illegal va_list.
4167
ebef225f
MP
41682016-08-25 Marek Polacek <polacek@redhat.com>
4169 David Malcolm <dmalcolm@redhat.com>
4170
4171 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
4172 * c-common.h (warn_logical_not_parentheses): Update declaration.
4173
b00e6e75
MP
41742016-08-22 Marek Polacek <polacek@redhat.com>
4175
4176 PR c++/77321
4177 * c-common.c (warn_for_memset): Check type for null.
4178
6dc198e3
JM
41792016-08-22 Joseph Myers <joseph@codesourcery.com>
4180
14ec014e 4181 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
4182 _FloatNx types for suffixes for built-in functions.
4183
c65699ef
JM
41842016-08-19 Joseph Myers <joseph@codesourcery.com>
4185
4186 PR c/32187
4187 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
4188 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
4189 (RID_FLOAT128X): New enum rid values.
4190 (CASE_RID_FLOATN_NX): New macro.
4191 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
4192 keywords.
4193 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
4194 corresponding complex types.
4195 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
4196 _FloatNx and corresponding complex types.
4197 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
4198 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
4199 and _FloatNx types for the widest type for determining
4200 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
4201 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
4202 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
4203 and _FloatNx types.
4204 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
4205 constants.
4206 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
4207 _FloatNx types.
4208
cc015f3a
DM
42092016-08-18 David Malcolm <dmalcolm@redhat.com>
4210
4211 * c-opts.c (c_diagnostic_finalizer): Update for change to
4212 diagnostic_show_locus.
4213
cb18fd07
DM
42142016-08-18 David Malcolm <dmalcolm@redhat.com>
4215
4216 * c-common.c: Include "spellcheck.h".
4217 (cb_get_suggestion): New function.
4218 * c-common.h (cb_get_suggestion): New decl.
4219 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
4220 cb_get_suggestion.
4221
a76989dc
MP
42222016-08-18 Marek Polacek <polacek@redhat.com>
4223
4224 PR c/71514
4225 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
4226 and pointer-to-VLA.
4227
65e736c0
DM
42282016-08-16 David Malcolm <dmalcolm@redhat.com>
4229
4230 PR c/72857
4231 * c-common.c (substring_loc::get_range): Rename to...
4232 (substring_loc::get_location): ...this, converting param from a
4233 source_range * to a location_t *. Call
4234 get_source_location_for_substring rather than
4235 get_source_range_for_substring, and pass in m_caret_idx.
4236 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
4237 (substring_loc::get_range): Replace with...
4238 (substring_loc::get_location): ...this.
4239 (substring_loc::set_caret_index): New method.
4240 (substring_loc): Add field m_caret_idx.
4241 * c-format.c (format_warning_va): Update for above changes.
4242 Rename local "substring_loc" to "fmt_substring_loc" to avoid
4243 clashing with type name.
4244 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
4245 (check_argument_type): Likewise.
4246 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
4247 Use a copy when emitting warnings, setting the caret index from TYPE.
4248
7e1dde14 42492016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 4250 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
4251
4252 * c-ada-spec.c (dump_number): New function.
4253 (handle_escape_character): Likewise.
4254 (print_ada_macros): Add handling of constant integers and strings.
4255
191816a3
MP
42562016-08-12 Marek Polacek <polacek@redhat.com>
4257
4258 PR c/7652
4259 * c-common.c (scalar_to_vector): Adjust fall through comment.
4260 * c-opts.c (c_common_handle_option): Likewise.
4261 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
4262 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
4263 fall through comment.
4264 * cilk.c (extract_free_variables): Add FALLTHRU.
4265
452df4a4
JM
42662016-08-10 Jason Merrill <jason@redhat.com>
4267
4268 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
4269
f3365c12
JM
42702016-08-09 Jason Merrill <jason@redhat.com>
4271
4272 * c-common.c (c_common_attribute_table): vector_size affects type
4273 identity.
4274
f0bc3323
MP
42752016-08-09 Marek Polacek <polacek@redhat.com>
4276
4277 PR c/7652
4278 * c-ada-spec.c (dump_generic_ada_node): Add return.
4279
98e5a19a
JM
42802016-08-09 Jason Merrill <jason@redhat.com>
4281
4282 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
4283 C++17 constexpr lambdas.
4284
895aa8e1
DM
42852016-08-08 David Malcolm <dmalcolm@redhat.com>
4286
4287 PR c/64955
4288 * c-common.h (selftest::c_format_c_tests): New declaration.
4289 (selftest::run_c_tests): New declaration.
4290 * c-format.c: Include "selftest.h.
4291 (format_warning_va): Add param "corrected_substring" and use
4292 it to add a replacement fix-it hint.
4293 (format_warning_at_substring): Likewise.
4294 (format_warning_at_char): Update for new param of
4295 format_warning_va.
4296 (argument_parser::check_argument_type): Pass "fki" to
4297 check_format_types.
4298 (check_format_types): Add param "fki" and pass it to
4299 format_type_warning.
4300 (deref_n_times): New function.
4301 (get_modifier_for_format_len): New function.
4302 (selftest::test_get_modifier_for_format_len): New function.
4303 (get_format_for_type): New function.
4304 (format_type_warning): Add param "fki" and use it to attempt
4305 to provide hints for argument types when calling
4306 format_warning_at_substring.
4307 (selftest::get_info): New function.
4308 (selftest::assert_format_for_type_streq): New function.
4309 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
4310 (selftest::test_get_format_for_type_printf): New function.
4311 (selftest::test_get_format_for_type_scanf): New function.
4312 (selftest::c_format_c_tests): New function.
4313
e52ed3fe
DM
43142016-08-08 David Malcolm <dmalcolm@redhat.com>
4315
4316 PR c/52952
4317 * c-format.c: Include "diagnostic.h".
4318 (location_column_from_byte_offset): Delete.
4319 (location_from_offset): Delete.
4320 (format_warning_va): New function.
4321 (format_warning_at_substring): New function.
4322 (format_warning_at_char): New function.
4323 (check_format_arg): Capture location of format_tree and pass to
4324 check_format_info_main.
4325 (argument_parser): Add fields "start_of_this_format" and
4326 "format_string_cst".
4327 (flag_chars_t::validate): Add param "format_string_cst". Convert
4328 warning_at call using location_from_offset to call to
4329 format_warning_at_char.
4330 (argument_parser::argument_parser): Add param "format_string_cst_"
4331 and use use it to initialize field "format_string_cst".
4332 Initialize new field "start_of_this_format".
4333 (argument_parser::read_format_flags): Convert warning_at call
4334 using location_from_offset to a call to format_warning_at_char.
4335 (argument_parser::read_any_format_left_precision): Likewise.
4336 (argument_parser::read_any_format_precision): Likewise.
4337 (argument_parser::read_any_other_modifier): Likewise.
4338 (argument_parser::find_format_char_info): Likewise, in three places.
4339 (argument_parser::parse_any_scan_set): Likewise, in one place.
4340 (argument_parser::handle_conversions): Likewise, in two places.
4341 (argument_parser::check_argument_type): Add param "fmt_param_loc"
4342 and use it to make a substring_loc. Pass the latter to
4343 check_format_types.
4344 (check_format_info_main): Add params "fmt_param_loc" and
4345 "format_string_cst". Convert warning_at calls using
4346 location_from_offset to calls to format_warning_at_char. Pass the
4347 new params to the arg_parser ctor. Pass "format_string_cst" to
4348 flag_chars.validate. Pass "fmt_param_loc" to
4349 arg_parser.check_argument_type.
4350 (check_format_types): Convert first param from a location_t
4351 to a const substring_loc & and rename to "fmt_loc". Attempt
4352 to extract the range of the relevant parameter and pass it
4353 to format_type_warning.
4354 (format_type_warning): Convert first param from a location_t
4355 to a const substring_loc & and rename to "fmt_loc". Add
4356 params "param_range" and "type". Replace calls to warning_at
4357 with calls to format_warning_at_substring.
4358
1c4d457e
DM
43592016-08-08 David Malcolm <dmalcolm@redhat.com>
4360
4361 * c-format.c (class flag_chars_t): New class.
4362 (struct length_modifier): New struct.
4363 (class argument_parser): New class.
4364 (flag_chars_t::flag_chars_t): New ctor.
4365 (flag_chars_t::has_char_p): New method.
4366 (flag_chars_t::add_char): New method.
4367 (flag_chars_t::validate): New method.
4368 (flag_chars_t::get_alloc_flag): New method.
4369 (flag_chars_t::assignment_suppression_p): New method.
4370 (argument_parser::argument_parser): New ctor.
4371 (argument_parser::read_any_dollar): New method.
4372 (argument_parser::read_format_flags): New method.
4373 (argument_parser::read_any_format_width): New method.
4374 (argument_parser::read_any_format_left_precision): New method.
4375 (argument_parser::read_any_format_precision): New method.
4376 (argument_parser::handle_alloc_chars): New method.
4377 (argument_parser::read_any_length_modifier): New method.
4378 (argument_parser::read_any_other_modifier): New method.
4379 (argument_parser::find_format_char_info): New method.
4380 (argument_parser::validate_flag_pairs): New method.
4381 (argument_parser::give_y2k_warnings): New method.
4382 (argument_parser::parse_any_scan_set): New method.
4383 (argument_parser::handle_conversions): New method.
4384 (argument_parser::check_argument_type): New method.
4385 (check_format_info_main): Introduce classes argument_parser
4386 and flag_chars_t, moving the code within the loop into methods
4387 of these classes. Make various locals "const".
4388
88fa5555
DM
43892016-08-05 David Malcolm <dmalcolm@redhat.com>
4390
4391 * c-common.c: Include "substring-locations.h".
4392 (get_cpp_ttype_from_string_type): New function.
4393 (g_string_concat_db): New global.
4394 (substring_loc::get_range): New method.
4395 * c-common.h (g_string_concat_db): New declaration.
4396 (class substring_loc): New class.
4397 * c-lex.c (lex_string): When concatenating strings, capture the
4398 locations of all tokens using a new obstack, and record the
4399 concatenation locations within g_string_concat_db.
4400 * c-opts.c (c_common_init_options): Construct g_string_concat_db
4401 on the ggc-heap.
4402
78169471
MP
44032016-07-29 Marek Polacek <polacek@redhat.com>
4404
638fc14f
MP
4405 PR c/71926
4406 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
4407 parentheses warning.
4408
78169471
MP
4409 PR c/71574
4410 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
4411
1225d6b1
ML
44122016-07-28 Martin Liska <mliska@suse.cz>
4413
4414 PR gcov-profile/68025
4415 * c-common.c (handle_no_profile_instrument_function_attribute):
4416
ec1e2a40
BE
44172016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
4418
4419 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
4420 BITS_PER_UNIT_LOG.
4421
5ec2cd9f
JM
44222016-07-25 Jason Merrill <jason@redhat.com>
4423
4424 PR c++/65970
4425 * c.opt (fconstexpr-loop-limit): New.
4426
9dc5773f 44272016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
4428
4429 PR c++/71675
4430 * c-common.c (resolve_overloaded_builtin): Avoid converting
4431 __atomic_compare_exchange_n return type to that of what its
4432 first argument points to.
4433
e3fe09c1
UB
44342016-07-22 Uros Bizjak <ubizjak@gmail.com>
4435
4436 * c-common.c: Use HOST_WIDE_INT_M1U instead of
4437 ~(unsigned HOST_WIDE_INT) 0.
4438
bc91c436
ML
44392016-07-22 Martin Liska <mliska@suse.cz>
4440
4441 PR gcov-profile/69028
4442 PR gcov-profile/62047
4443 * cilk.c (create_cilk_helper_decl): Set location of a new decl
4444 to the current_function_decl.
4445
451dcc66
JM
44462016-07-21 Jason Merrill <jason@redhat.com>
4447
4448 PR c++/65168
4449 * c-common.c (c_common_truthvalue_conversion): Check
4450 c_inhibit_evaluation_warnings for warning about address of
4451 reference.
4452
de6a69ee
DM
44532016-07-20 David Malcolm <dmalcolm@redhat.com>
4454
4455 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
4456 const char *.
4457
d022c55a
JM
44582016-07-15 Jason Merrill <jason@redhat.com>
4459
4460 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
4461
ddbbcb19
JJ
44622016-07-15 Jakub Jelinek <jakub@redhat.com>
4463
4464 PR c/71858
4465 * c-common.h (enum lookup_name_fuzzy_kind): Add
4466 FUZZY_LOOKUP_FUNCTION_NAME.
4467
d0cf395a
JM
44682016-07-08 Jason Merrill <jason@redhat.com>
4469
4470 P0145: Refining Expression Order for C++.
4471 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
4472 * c-opts.c: Adjust.
4473
98d44e93
MT
44742016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
4475
4476 PR c++/71214
4477 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
4478
f9d8d994
TS
44792016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4480
4481 * c-pragma.h (enum pragma_kind): Rename
4482 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
4483 users.
4484
4aa83879
RB
44852016-06-29 Richard Biener <rguenther@suse.de>
4486
4487 PR middle-end/71002
4488 * c-common.c (c_common_get_alias_set): Remove union type punning case.
4489
a25bd9e6
JM
44902016-06-24 Jason Merrill <jason@redhat.com>
4491
4492 P0145R2: Refining Expression Order for C++.
4493 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
4494 MODIFY_EXPR.
4495
a86451b9
JJ
44962016-06-24 Jakub Jelinek <jakub@redhat.com>
4497
4498 * c-common.c (check_builtin_function_arguments): Require last
4499 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
4500 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
4501 if the last argument is pointer to enumerated or boolean type.
4502
1a4f11c8
DM
45032016-06-22 David Malcolm <dmalcolm@redhat.com>
4504
4505 PR c/70339
4506 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
4507 (lookup_name_fuzzy): New prototype.
4508
fe55692c
JDA
45092016-06-21 John David Anglin <danglin@gcc.gnu.org>
4510
4511 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
4512
4eb24e01
JM
45132016-06-14 Jason Merrill <jason@redhat.com>
4514
4515 P0145R2: Refining Expression Order for C++.
4516 * c.opt (fargs-in-order): New.
4517 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
4518
ef7cf206
JJ
45192016-06-13 Jakub Jelinek <jakub@redhat.com>
4520
0dda258b
JJ
4521 PR sanitizer/71498
4522 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
4523 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
4524
ef7cf206
JJ
4525 PR preprocessor/71183
4526 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
4527 to cb_get_source_date_epoch.
4528
50b15873
JJ
45292016-06-10 Jakub Jelinek <jakub@redhat.com>
4530
4531 PR c/68657
4532 * c.opt (Wpsabi): Add Warning flag.
4533
4d926e34
MS
45342016-06-10 Martin Sebor <msebor@redhat.com>
4535
4536 PR c/71392
14ec014e 4537 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
4538 the nonnull attribute in type-generic builtins.
4539
e01b4e16
MS
45402016-06-09 Martin Sebor <msebor@redhat.com>
4541
4542 PR c/70883
4543 * c-common.c (builtin_function_validate_nargs): Make text of error
4544 message consistent with others like it.
4545
44a845ca
MS
45462016-06-08 Martin Sebor <msebor@redhat.com>
4547 Jakub Jelinek <jakub@redhat.com>
4548
4549 PR c++/70507
4550 PR c/68120
4551 * c-common.c (check_builtin_function_arguments): Handle
4552 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4553
a80a7051
RB
45542016-06-08 Richard Biener <rguenther@suse.de>
4555
4556 * c-common.c (parse_optimize_options): Improve diagnostic messages.
4557
bfd67b47
RB
45582016-06-07 Richard Biener <rguenther@suse.de>
4559
4560 PR c/61564
4561 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
4562 options and warn about others.
4563
15c98b2e
ES
45642016-06-01 Eduard Sanou <dhole@openmailbox.org>
4565
4566 * c-common.c (get_source_date_epoch): Rename to
4567 cb_get_source_date_epoch.
4568 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
4569 message when the parsing fails. Use error_at instead of fatal_error.
4570 * c-common.h (get_source_date_epoch): Rename to
4571 cb_get_source_date_epoch.
4572 * c-common.h (cb_get_source_date_epoch): Prototype.
4573 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
4574 * c-common.h (c_omp_region_type): Remove trailing comma.
4575 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
4576 * c-lex.c (c_lex_with_flags): Remove initialization of
4577 pfile->source_date_epoch.
4578
00631022
JJ
45792016-05-30 Jakub Jelinek <jakub@redhat.com>
4580
4581 PR c++/71349
4582 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
4583 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
4584 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
4585 instead of C_OMP_CLAUSE_SPLIT_FOR.
4586
f17a223d
RB
45872016-05-24 Richard Biener <rguenther@suse.de>
4588
4589 PR middle-end/70434
4590 PR c/69504
4591 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
4592 (convert_vector_to_array_for_subscript): ... this.
4593 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
4594 VIEW_CONVERT_EXPR to an array type. Rename to ...
4595 (convert_vector_to_array_for_subscript): ... this.
4596
4f2e1536
MP
45972016-05-12 Marek Polacek <polacek@redhat.com>
4598
4599 PR c/70756
4600 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
4601 size_in_bytes and pass LOC to it.
4602
d6e83a8d
MM
46032016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4604
4605 PR c/43651
4606 * c.opt (Wduplicate-decl-specifier): New option.
4607
5c3a10fb
MP
46082016-05-11 Marek Polacek <polacek@redhat.com>
4609
4610 PR c++/71024
4611 * c-common.c (diagnose_mismatched_attributes): New function.
4612 * c-common.h (diagnose_mismatched_attributes): Declare.
4613
deef7113
MP
46142016-05-04 Marek Polacek <polacek@redhat.com>
4615
4616 * c.opt (Wdangling-else): New option.
4617
79ce98bc
MP
46182016-05-03 Marek Polacek <polacek@redhat.com>
4619
4620 PR c/70859
4621 * c-common.c (builtin_function_validate_nargs): Add location
4622 parameter. Use it.
4623 (check_builtin_function_arguments): Add location and arguments
4624 parameters. Use them.
4625 * c-common.h (check_builtin_function_arguments): Update declaration.
4626
381cdae4
RB
46272016-05-03 Richard Biener <rguenther@suse.de>
4628
4629 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
4630 allow call args to gimplify to SSA names.
4631
1d793c34
MP
46322016-05-03 Marek Polacek <polacek@redhat.com>
4633
4634 * c-common.h (enum c_omp_region_type): Remove stray comma.
4635
77886428
CP
46362016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4637
4638 * c-common.h (enum c_omp_region_type): Define.
4639
697e0b28
RS
46402016-05-02 Richard Sandiford <richard.sandiford@arm.com>
4641
4642 * c-common.c (shorten_compare): Use wi::to_wide.
4643
e7ff0319
CP
46442016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4645
4646 PR middle-end/70626
4647 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
4648 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
4649 reduction clauses in acc parallel loops.
4650
2fff3db8
MP
46512016-04-29 Marek Polacek <polacek@redhat.com>
4652
4653 PR c/70852
4654 * c-common.c (warn_for_memset): Check domain before accessing it.
4655
509063eb
DV
46562016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
4657
4658 PR/69089
4659 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
4660 "aligned" attribute.
4661
b632761d
JM
46622016-04-28 Jason Merrill <jason@redhat.com>
4663
4664 * c-lex.c (c_common_has_attribute): Handle nodiscard.
4665
174f6622
ES
46662016-04-28 Eduard Sanou <dhole@openmailbox.org>
4667 Matthias Klose <doko@debian.org>
4668
4669 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 4670 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
4671 handling.
4672 * c-common.h (get_source_date_epoch): Prototype.
4673 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
4674
6bc2bb18
RB
46752015-04-27 Ryan Burn <contact@rnburn.com>
4676
4677 PR c++/69024
4678 PR c++/68997
4679 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
4680 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
4681 external linkage.
4682 (cilk_detect_and_unwrap): Corresponding changes.
4683 (extract_free_variables): Don't extract free variables from
4684 AGGR_INIT_EXPR slot.
4685 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
4686 (cilk_recognize_spawn): Likewise.
4687
c1e1f433
BS
46882016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4689
4690 * c.opt (Wmemset-elt-size): New option.
4691 * c-common.c (warn_for_memset): New function.
4692 * c-common.h (warn_for_memset): Declare.
4693
d067e05f
JM
46942016-04-25 Jason Merrill <jason@redhat.com>
4695
4696 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
4697 No longer static.
4698 * c-common.h: Declare it.
4699 * c-lex.c (c_common_has_attribute): Add maybe_unused.
4700
9aa36ae5
JM
47012016-04-22 Jason Merrill <jason@redhat.com>
4702
4703 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
4704
477d4906
IV
47052016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4706
4707 PR c++/69363
4708 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
4709 * c-common.h (c_finish_cilk_clauses): Remove declaration.
4710
fe37c7af
MM
47112016-04-18 Michael Matz <matz@suse.de>
4712
4713 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
4714 and SET_DECL_ALIGN.
4715
23f2660f
EB
47162016-04-17 Eric Botcazou <ebotcazou@adacore.com>
4717
4718 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
4719 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
4720 to incomplete types.
4721 (dump_nested_type): Remove redundant tests and tidy up.
4722 (print_ada_declaration): Also set TREE_VISITED on the declaration of
4723 a type which is the typedef of an original type.
4724
1e77281b
MP
47252016-04-15 Marek Polacek <polacek@redhat.com>
4726
4727 PR c/70651
4728 * c-common.c (build_va_arg): Change two asserts into errors and return
4729 error_mark_node.
4730
b3a77f21
MP
47312016-04-13 Marek Polacek <polacek@redhat.com>
4732
4733 PR c++/70639
4734 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
4735 for switch statements, too.
4736
322b8466
JM
47372016-03-28 Jason Merrill <jason@redhat.com>
4738
4739 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
4740
fbdb6baf
MP
47412016-03-23 Marek Polacek <polacek@redhat.com>
4742
4743 PR c++/69884
4744 * c.opt (Wignored-attributes): New option.
4745
5c240f4d
DM
47462016-03-22 David Malcolm <dmalcolm@redhat.com>
4747
4748 PR c/69993
4749 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
4750 diagnostic text, reversing the order of the warning and note so
4751 that they appear in source order.
4752
14ba7b28
MP
47532016-03-17 Marek Polacek <polacek@redhat.com>
4754
4755 PR c/69407
4756 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
4757 operations.
4758
08a1cadc
JM
47592016-03-14 Jason Merrill <jason@redhat.com>
4760
2aaeea19
JM
4761 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
4762
08a1cadc
JM
4763 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
4764
c06d25bb
RB
47652016-03-09 Richard Biener <rguenther@suse.de>
4766
4767 PR c/70143
4768 * c-common.c (strict_aliasing_warning): Add back
4769 alias_sets_conflict_p check.
4770
80aac5c8
JM
47712016-03-08 Jason Merrill <jason@redhat.com>
4772
4773 * c-opts.c (set_std_cxx1z): Don't enable concepts.
4774
64b23c13
DM
47752016-03-04 David Malcolm <dmalcolm@redhat.com>
4776
4777 PR c/68187
4778 * c-indentation.c (get_visual_column): Move code to determine next
4779 tab stop to...
4780 (next_tab_stop): ...this new function.
4781 (line_contains_hash_if): Delete function.
4782 (detect_preprocessor_logic): Delete function.
4783 (get_first_nws_vis_column): New function.
4784 (detect_intervening_unindent): New function.
4785 (should_warn_for_misleading_indentation): Replace call to
4786 detect_preprocessor_logic with a call to
4787 detect_intervening_unindent.
4788
729526f5
DM
47892016-03-04 David Malcolm <dmalcolm@redhat.com>
4790
4791 PR c/68187
4792 * c-indentation.c (should_warn_for_misleading_indentation): When
4793 suppressing warnings about cases where the guard and body are on
4794 the same column, only use the first non-whitespace column in place
4795 of the guard token column when dealing with "else" clauses.
4796 When rejecting aligned BODY and NEXT, loosen the requirement
4797 from equality with the first non-whitespace of guard to simply
4798 that they not be indented relative to it.
4799
e9a35493
RB
48002016-03-04 Richard Biener <rguenther@suse.de>
4801
4802 PR c++/70054
4803 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
4804 instead of alias_sets_conflict_p.
4805
1be56bc5
MP
48062016-03-01 Marek Polacek <polacek@redhat.com>
4807
4808 PR c++/69795
4809 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
4810 any DECL.
4811
35886f0b
MS
48122016-02-22 Martin Sebor <msebor@redhat.com>
4813
4814 PR middle-end/69780
4815 * c-common.c (check_builtin_function_arguments): Validate and
4816 reject invalid arguments to __builtin_alloca_with_align.
4817
4246c8da
MW
48182016-02-20 Mark Wielaard <mjw@redhat.com>
4819
4820 PR c/28901
4821 * c.opt (Wunused-const-variable): Turn into Alias for...
4822 (Wunused-const-variable=): New option.
4823
268be88c
BE
48242016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4825
4826 PR c++/69865
4827 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
4828 here...
4829 (c_common_init_options): ...to here.
4830 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
4831
871b3f47
JJ
48322016-02-19 Jakub Jelinek <jakub@redhat.com>
4833
4834 PR c++/69826
4835 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
4836 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
4837 flag_preprocess_only.
4838
bf14eba2
JJ
48392016-02-16 Jakub Jelinek <jakub@redhat.com>
4840
4841 PR c/69835
4842 * c.opt (Wnonnull-compare): Enable for -Wall.
4843
ba6b3795
JJ
48442016-02-15 Jakub Jelinek <jakub@redhat.com>
4845
4846 PR c++/69797
4847 * c-common.c (sync_resolve_size): Diagnose too few arguments
4848 even when params is non-NULL empty vector.
4849
a011cd92
BS
48502016-02-08 Bernd Schmidt <bschmidt@redhat.com>
4851
4852 PR target/60410
4853 * c.opt (fshort-double): Remove.
4854
46cb9332
MS
48552016-02-05 Martin Sebor <msebor@redhat.com>
4856
4857 PR c++/69662
4858 * c.opt (Warning options): Update -Wplacement-new to take
4859 an optional argument.
4860
e1b81f2b
JJ
48612016-02-01 Jakub Jelinek <jakub@redhat.com>
4862
4863 PR preprocessor/69543
4864 PR c/69558
4865 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
4866 instead of loc to control_warning_option.
4867
b6adbb9f
NS
48682016-02-01 Nathan Sidwell <nathan@codesourcery.com>
4869
4870 * c.opt (fopenacc-dim=): New option.
4871
5d70666e
RB
48722016-01-27 Ryan Burn <contact@rnburn.com>
4873
4874 PR cilkplus/69267
4875 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
4876 gimplify_arg. Removed superfluous post_p argument.
4877 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
4878 superfluous post_p argument.
4879 * c-gimplify.c (c_gimplify_expr): Likewise.
4880
01e1dea3
DM
48812016-01-26 David Malcolm <dmalcolm@redhat.com>
4882
4883 PR other/69006
4884 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
4885 pp_newline_and_flush with pp_flush.
4886
9f04a53e
MS
48872016-01-20 Martin Sebor <msebor@redhat.com>
4888
4889 PR c/69405
4890 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
4891 an incompatible argument when the argument isn't a valid tree node.
4892
7f26f7df
JM
48932016-01-18 Jason Merrill <jason@redhat.com>
4894
4895 PR c++/68767
4896 * c-common.c (check_function_arguments_recurse): Fold the whole
4897 COND_EXPR, not just the condition.
4898
f62bf092
TV
48992016-01-18 Tom de Vries <tom@codesourcery.com>
4900
4901 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
4902 classify as loop clause.
4903
e0a575ff
JJ
49042016-01-15 Jakub Jelinek <jakub@redhat.com>
4905
4906 PR bootstrap/68271
4907 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
4908 C++ FE no longer has limit on number of pragmas.
4909
49102015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
4911
4912 PR c++/69048
4913 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 4914 to add missing cleanup point.
b6e3db06 4915
c7df95d8
DM
49162016-01-14 David Malcolm <dmalcolm@redhat.com>
4917
4918 PR c++/68819
4919 * c-indentation.c (get_visual_column): Add location_t param.
4920 Handle the column number being zero by effectively disabling the
4921 warning, with an "inform".
4922 (should_warn_for_misleading_indentation): Add location_t argument
4923 for all uses of get_visual_column.
4924
21efdd80
PP
49252016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
4926
4927 PR c++/69029
4928 * c-indentation.c (should_warn_for_misleading_indentation):
4929 Don't warn about do-while statements.
4930
7a127fa7
MS
49312016-01-07 Martin Sebor <msebor@redhat.com>
4932
4933 PR c/68966
4934 * c-common.c (sync_resolve_size): Reject first argument when it's
4935 a pointer to _Bool.
4936
c589e975
DM
49372016-01-05 David Malcolm <dmalcolm@redhat.com>
4938
4939 PR c/69122
4940 * c-indentation.c (get_visual_column): Remove default argument.
4941 (should_warn_for_misleading_indentation): For the multiline case,
4942 update call to get_visual_column for next_stmt_exploc so that it
4943 captures the location of the first non-whitespace character in the
4944 relevant line. Don't issue warnings if there is non-whitespace
4945 before the next statement.
4946
818ab71a
JJ
49472016-01-04 Jakub Jelinek <jakub@redhat.com>
4948
4949 Update copyright years.
4950
745e411d
DM
49512015-12-21 David Malcolm <dmalcolm@redhat.com>
4952
4953 * c-common.c (binary_op_error): Convert first param from
4954 location_t to rich_location * and use it when emitting an error.
4955 * c-common.h (binary_op_error): Convert first param from
4956 location_t to rich_location *.
4957
de67c4c3
DM
49582015-12-16 David Malcolm <dmalcolm@redhat.com>
4959
4960 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
4961 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
4962
4a38b02b
IV
49632015-12-15 Ilya Verbin <ilya.verbin@intel.com>
4964
4965 * c-common.c (c_common_attribute_table): Handle "omp declare target
4966 link" attribute.
4967
54d62f51
JJ
49682015-12-14 Jakub Jelinek <jakub@redhat.com>
4969
4970 PR c/68833
4971 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
4972
8d4227c8
TB
49732014-12-12 Tobias Burnus <burnus@net-b.de>
4974
4975 PR fortran/68815
4976 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
4977 specifiers (%d, %i,%u and %c).
4978
f6069ccc
DM
49792015-12-10 David Malcolm <dmalcolm@redhat.com>
4980
4981 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
4982
63bbf46d
JJ
49832015-12-08 Jakub Jelinek <jakub@redhat.com>
4984
4985 PR c/48088
4986 PR c/68657
4987 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
4988 * c-pragma.c (handle_pragma_diagnostic): Adjust
4989 control_warning_option caller.
4990
f79520bb
DM
49912015-12-07 David Malcolm <dmalcolm@redhat.com>
4992
4993 * c-common.c (c_cpp_error): Update for change to
4994 rich_location::set_range.
4995
b3d5bc62
JJ
49962015-12-04 Paolo Bonzini <bonzini@gnu.org>
4997
4998 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
4999 shifting 1 out of the sign bit.
5000
50012015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
5002
5003 * c-common.c (c_common_attribute_table[]): Update max arguments
5004 count for "simd" attribute.
5005 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
5006
6eb4a537
JJ
50072015-12-03 Jakub Jelinek <jakub@redhat.com>
5008
5009 PR preprocessor/57580
5010 * c-ppoutput.c (print): Change printed field to bool.
5011 Move src_file last for smaller padding.
5012 (init_pp_output): Set print.printed to false instead of 0.
5013 (scan_translation_unit): Fix up formatting. Set print.printed
5014 to true after printing something other than newline.
5015 (scan_translation_unit_trad): Set print.printed to true instead of 1.
5016 (maybe_print_line_1): Set print.printed to false instead of 0.
5017 (print_line_1): Likewise.
5018 (do_line_change): Set print.printed to true instead of 1.
5019 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
5020 dump_macro): Set print.printed to false after printing newline.
5021
4250754e
JM
50222015-12-02 Jason Merrill <jason@redhat.com>
5023
f479b43d
JM
5024 * c-common.c (fold_for_warn): New.
5025 (warn_logical_operator, warn_tautological_cmp)
5026 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
5027
4250754e
JM
5028 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
5029 (c_fully_fold_internal, decl_constant_value_for_optimization):
5030 Move to c/c-fold.c.
5031 * c-common.h: Don't declare decl_constant_value_for_optimization.
5032
e9e32ee6
JM
50332015-12-02 Joseph Myers <joseph@codesourcery.com>
5034
5035 PR c/68162
5036 * c-common.h (c_build_qualified_type): Add extra default
5037 arguments.
5038
37d5ad46
JB
50392015-12-01 Julian Brown <julian@codesourcery.com>
5040 Cesar Philippidis <cesar@codesourcery.com>
5041 James Norris <James_Norris@mentor.com>
5042
5043 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
5044 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
5045 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
5046
f07862c7
EB
50472015-11-30 Eric Botcazou <ebotcazou@adacore.com>
5048
5049 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
5050 (decl_sloc_common): Delete and move bulk of processing to...
5051 (decl_sloc): ...here.
5052 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
5053 (dump_ada_double_name): Remove S parameter and compute the suffix.
5054 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
5055 element type and deal with an anonymous one.
5056 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
5057 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
5058 and remove reference to QUAL_UNION_TYPE.
5059 (dump_nested_types): Make 2 passes on the fields and move bulk to...
5060 (dump_nested_type): ...here. New function extracted from above.
5061 Generate a full declaration for anonymous element type of arrays.
5062 (print_ada_declaration): Really skip anonymous declarations. Remove
5063 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
5064 Clean up processing of declarations of array types and objects.
5065 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
5066 Remove obsolete code and tidy up.
5067
75c8aac3
JH
50682015-11-29 Jan Hubicka <hubicka@ucw.cz>
5069
5070 PR c/67581
5071 * c-common.c (handle_transparent_union_attribute): Update
5072 also type variants.
5073
b58d3df2
ML
50742015-11-27 Martin Liska <mliska@suse.cz>
5075
5076 PR c++/68312
5077 * array-notation-common.c (cilkplus_extract_an_triplets):
5078 Release vector of vectors.
5079 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
5080
89a01fcf
EB
50812015-11-26 Eric Botcazou <ebotcazou@adacore.com>
5082
5083 PR c++/68527
5084 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
5085 (print_ada_struct_decl): Likewise.
5086
cc5c5226
IZ
50872015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
5088
5089 PR c++/68001
5090 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
5091 * cilk.c (recognize_spawn): Determine location in a more precise
5092 way.
5093
269adb9d
JM
50942015-11-19 Jason Merrill <jason@redhat.com>
5095
5096 * c-common.c (shorten_compare): But look through macros from
5097 system headers.
5098
d0eccfcd
JM
50992015-11-18 Jason Merrill <jason@redhat.com>
5100
5101 * c-common.c (shorten_compare): Don't -Wtype-limits if the
5102 non-constant operand comes from a macro.
5103
3e44547c
JM
51042015-11-17 Jason Merrill <jason@redhat.com>
5105
5106 PR bootstrap/68346
5107 * c-common.c (warn_tautological_cmp): Fold before checking for
5108 constants.
5109
0f62c7a0
MP
51102015-11-16 Marek Polacek <polacek@redhat.com>
5111
5112 PR c++/68362
5113 * c-common.c (check_case_bounds): Fold low and high cases.
5114
a868811e
MP
51152015-11-16 Marek Polacek <polacek@redhat.com>
5116
5117 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
5118 * c-common.c (c_common_get_alias_set): Likewise.
5119 (handle_visibility_attribute): Likewise.
5120
fff77217
KY
51212015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
5122
5123 * c-common.c (handle_simd_attribute): New.
5124 (struct attribute_spec): Add entry for "simd".
5125 (handle_simd_attribute): New.
5126
269e63b7
KT
51272015-11-13 Kai Tietz <ktietz70@googlemail.com>
5128
5129 * c-lex.c (interpret_float): Use fold_convert.
5130
ebedc9a3
DM
51312015-11-13 David Malcolm <dmalcolm@redhat.com>
5132
5133 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
5134 and store it on the result.
5135 * c-opts.c (c_common_init_options): Set
5136 global_dc->colorize_source_p.
5137
6e232ba4
JN
51382015-11-12 James Norris <jnorris@codesourcery.com>
5139 Joseph Myers <joseph@codesourcery.com>
5140
7365279f 5141 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
5142 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
5143 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
5144 PRAGMA_OACC_CLAUSE_LINK.
5145
e78bede6
MP
51462015-11-11 Marek Polacek <polacek@redhat.com>
5147
5148 PR c/68107
5149 PR c++/68266
5150 * c-common.c (valid_array_size_p): New function.
5151 * c-common.h (valid_array_size_p): Declare.
5152
3f8257db 51532015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
5154
5155 PR bootstrap/68271
5156 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
5157
69f293c9
AM
51582015-11-11 Andrew MacLeod <amacleod@redhat.com>
5159
5160 * array-notation-common.c: Remove unused header files.
5161 * c-ada-spec.c: Likewise.
5162 * c-cilkplus.c: Likewise.
5163 * c-common.c: Likewise.
5164 * c-cppbuiltin.c: Likewise.
5165 * c-dump.c: Likewise.
5166 * c-format.c: Likewise.
5167 * c-gimplify.c: Likewise.
5168 * c-indentation.c: Likewise.
5169 * c-lex.c: Likewise.
5170 * c-omp.c: Likewise.
5171 * c-opts.c: Likewise.
5172 * c-pch.c: Likewise.
5173 * c-ppoutput.c: Likewise.
5174 * c-pragma.c: Likewise.
5175 * c-pretty-print.c: Likewise.
5176 * c-semantics.c: Likewise.
5177 * c-ubsan.c: Likewise.
5178 * cilk.c: Likewise.
5179 * stub-objc.c: Likewise.
5180
3a40d81d
NS
51812015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5182 Cesar Philippidis <cesar@codesourcery.com>
5183 James Norris <jnorris@codesourcery.com>
5184 Julian Brown <julian@codesourcery.com>
5185 Nathan Sidwell <nathan@codesourcery.com>
5186
5187 * c-pragma.c (oacc_pragmas): Add "routine".
5188 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
5189
ee45a32d
EB
51902015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5191
5192 * c-common.c (c_common_attributes): Add scalar_storage_order.
5193 (handle_scalar_storage_order_attribute): New function.
5194 * c-pragma.c (global_sso): New variable.
5195 (maybe_apply_pragma_scalar_storage_order): New function.
5196 (handle_pragma_scalar_storage_order): Likewise.
5197 (init_pragma): Register scalar_storage_order.
5198 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
5199 * c.opt (Wscalar-storage-order): New warning.
5200 (fsso-struct=): New option.
5201
eb11eb15
MS
52022015-11-08 Martin Sebor <msebor@redhat.com>
5203
5204 * c.opt (Wplacement-new): Add a period to the end of a sentence.
5205
0aad0198
RS
52062015-11-07 Richard Sandiford <richard.sandiford@arm.com>
5207
5208 * c-common.c: Don't undef DEF_BUILTIN.
5209
8a645150
DM
52102015-11-06 David Malcolm <dmalcolm@redhat.com>
5211
5212 * c-common.c (c_cpp_error): Convert parameter from location_t to
5213 rich_location *. Eliminate the "column_override" parameter and
5214 the call to diagnostic_override_column.
5215 Update the "done_lexing" clause to set range 0
5216 on the rich_location, rather than overwriting a location_t.
5217 * c-common.h (c_cpp_error): Convert parameter from location_t to
5218 rich_location *. Eliminate the "column_override" parameter.
5219
7a5e4956
CP
52202015-11-05 Cesar Philippidis <cesar@codesourcery.com>
5221 Thomas Schwinge <thomas@codesourcery.com>
5222 James Norris <jnorris@codesourcery.com>
5223
5224 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
5225 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
5226 clauses with parallel and kernels and loops.
5227 * c-pragma.h (enum pragma_omp_clause): Add entries for
5228 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
5229 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
5230 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
5231 INDEPENDENT,SEQ}.
5232 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
5233
e2f5cc96
MS
52342015-11-05 Martin Sebor <msebor@redhat.com>
5235
5236 PR c++/67942
5237 * c.opt (-Wplacement-new): New option.
5238
e01d41e5
JJ
52392015-11-05 Jakub Jelinek <jakub@redhat.com>
5240
5241 * c-common.h (c_finish_omp_atomic): Add TEST argument.
5242 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
5243 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
5244 save_expr or create_tmp_var* if TEST is true.
5245 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
5246 Don't call add_stmt here.
5247 (struct c_omp_check_loop_iv_data): New type.
5248 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
5249 c_omp_check_loop_iv_exprs): New functions.
5250 (c_omp_split_clauses): Adjust for lastprivate being allowed on
5251 distribute.
5252 (c_omp_declare_simd_clauses_to_numbers): Change
5253 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
5254 (c_omp_declare_simd_clauses_to_decls): Similarly change those
5255 from numbers to PARM_DECLs.
5256
595278be
MM
52572015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
5258
5259 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
5260 flag_checking.
5261
3f8257db 52622015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
5263
5264 PR c++-common/67882
b3d5bc62
JJ
5265 * c-common.h (fold_offsetof_1): Add argument.
5266 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
5267 offsetof expressions that reference elements past the end of
5268 an array.
5269
4bf9e5a8
TS
52702015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5271 Chung-Lin Tang <cltang@codesourcery.com>
5272
5273 * c-pragma.c (oacc_pragmas): Add "atomic".
5274 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
5275
3b1661a9
ES
52762015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
5277
5278 * c-common.c (handle_target_clones_attribute): New.
5279 (c_common_attribute_table): Add handle_target_clones_attribute.
5280 (handle_always_inline_attribute): Add check on target_clones attribute.
5281 (handle_target_attribute): Ditto.
5282
2adfab87
AM
52832015-10-29 Andrew MacLeod <amacleod@redhat.com>
5284
5285 * array-notation-common.c: Reorder #include's and remove duplicates.
5286 * c-ada-spec.c: Likewise.
5287 * c-cilkplus.c: Likewise.
5288 * c-common.c: Likewise.
5289 * c-cppbuiltin.c: Likewise.
5290 * c-dump.c: Likewise.
5291 * c-format.c: Likewise.
5292 * c-gimplify.c: Likewise.
5293 * c-indentation.c: Likewise.
5294 * c-lex.c: Likewise.
5295 * c-omp.c: Likewise.
5296 * c-opts.c: Likewise.
5297 * c-pch.c: Likewise.
5298 * c-ppoutput.c: Likewise.
5299 * c-pragma.c: Likewise.
5300 * c-pretty-print.c: Likewise.
5301 * c-semantics.c: Likewise.
5302 * c-ubsan.c: Likewise.
5303 * cilk.c: Likewise.
5304 * stub-objc.c: Likewise.
5305
d90ec4f2
JM
53062015-10-28 Jason Merrill <jason@redhat.com>
5307
5308 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
5309
88bae6f4
TS
53102015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5311 James Norris <jnorris@codesourcery.com>
5312 Cesar Philippidis <cesar@codesourcery.com>
5313
5314 PR c/64765
5315 PR c/64880
5316 * c-common.h (c_oacc_split_loop_clauses): Declare function.
5317 * c-omp.c (c_oacc_split_loop_clauses): New function.
5318
b1726d6c
MS
53192015-10-21 Martin Sebor <msebor@redhat.com>
5320
5321 PR driver/68043
5322 * c.opt: End each sentence that describes an option with a period.
5323
fa60eeb9
MP
53242015-10-20 Marek Polacek <polacek@redhat.com>
5325
5326 * array-notation-common.c (is_cilkplus_vector_p): Define.
5327 * c-common.h (is_cilkplus_vector_p): Declare.
5328
95979049
MP
53292015-10-20 Marek Polacek <polacek@redhat.com>
5330
5331 * c.opt (std=gnu++11): Do not describe as experimental.
5332 (std=gnu++14): Likewise.
5333
2a9fb712
JM
53342015-10-19 Jason Merrill <jason@redhat.com>
5335
5336 * c-cppbuiltin.c (c_cpp_builtins): Define
5337 __cpp_nontype_template_args.
5338
13b380a3
JM
53392015-10-19 Jason Merrill <jason@redhat.com>
5340
5341 * c-cppbuiltin.c (c_cpp_builtins): Define
5342 __cpp_enumerator_attributes, __cpp_fold_expressions,
5343 __cpp_unicode_characters.
5344
d9a6bd32
JJ
53452015-10-13 Jakub Jelinek <jakub@redhat.com>
5346 Aldy Hernandez <aldyh@redhat.com>
5347
5348 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
5349 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
5350 (c_define_builtins): Likewise.
5351 * c-common.h (enum c_omp_clause_split): Add
5352 C_OMP_CLAUSE_SPLIT_TASKLOOP.
5353 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
5354 (c_finish_omp_for): Add ORIG_DECLV argument.
5355 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
5356 201511 instead of 201307.
5357 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
5358 OMP_CRITICAL_CLAUSES to it.
5359 (c_finish_omp_ordered): Add CLAUSES argument, set
5360 OMP_ORDERED_CLAUSES to it.
5361 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
5362 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
5363 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
5364 constructs and new OpenMP 4.5 clauses. Clear
5365 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
5366 verification code.
5367 * c-pragma.c (omp_pragmas_simd): Add taskloop.
5368 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
5369 (enum pragma_omp_clause): Add
5370 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
5371 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
5372
624d31fe
RS
53732015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5374
5375 * c-lex.c (interpret_float): Use real_equal instead of
5376 REAL_VALUES_EQUAL.
5377
b8fd7909
JM
53782015-10-04 Jason Merrill <jason@redhat.com>
5379
5380 Implement N4514, C++ Extensions for Transactional Memory.
5381 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
5382 (c_common_attribute_table): Add transaction_safe_dynamic.
5383 transaction_safe now affects type identity.
5384 (handle_tm_attribute): Handle transaction_safe_dynamic.
5385 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
5386 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
5387 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
5388 (D_TRANSMEM): New.
5389 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
5390 * c-pretty-print.c (pp_c_attributes_display): Don't print
5391 transaction_safe in C++.
5392
12651878
MP
53932015-10-02 Marek Polacek <polacek@redhat.com>
5394
5395 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
5396
3e3b8d63
MP
53972015-10-02 Marek Polacek <polacek@redhat.com>
5398
5399 PR c/64249
5400 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
5401 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
5402 * c.opt (Wduplicated-cond): New option.
5403
0d1a8f75
JM
54042015-10-01 Joseph Myers <joseph@codesourcery.com>
5405
5406 * c.opt (std=c11): Do not describe as experimental.
5407 (std=gnu11): Likewise.
5408 (std=iso9899:2011): Likewise.
5409
3e32ee19
NS
54102015-09-28 Nathan Sidwell <nathan@codesourcery.com>
5411
5412 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
5413 (DEF_FUNCTION_TYPE_VAR_11): Delete.
5414
974348ee
MP
54152015-09-25 Marek Polacek <polacek@redhat.com>
5416
5417 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
5418 (ubsan_instrument_shift): Likewise.
5419
15dbc1a6
MP
54202015-09-25 Marek Polacek <polacek@redhat.com>
5421
5422 PR sanitizer/64906
5423 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
5424
6b95d7cc
PP
54252015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
5426
5427 * c-indentation.c (should_warn_for_misleading_indentation):
5428 Compare next_stmt_vis_column with guard_line_first_nws instead
5429 of with guard_line_vis_column.
5430
c1822f9c
MLI
54312015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
5432
5433 PR c/49654
5434 PR c/49655
5435 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
5436 options and options not valid for the current language.
5437
d5398058
PP
54382015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
5439
5440 * c-indentation.c (should_warn_for_misleading_indentation):
5441 Float out and consolidate the calls to get_visual_column that
5442 are passed guard_exploc as an argument. Compare
5443 next_stmt_vis_column with guard_line_first_nws instead of with
5444 body_line_first_nws.
5445
6b333269
NS
54462015-09-22 Nathan Sidwell <nathan@codesourcery.com>
5447
5448 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
5449 Wnamespaces): New C++ warnings.
5450
a75f1574
JM
54512015-09-22 Jason Merrill <jason@redhat.com>
5452
5453 * c-common.h (abi_compat_version_crosses): New.
5454 (warn_abi_version): Declare.
5455 * c-common.c: Define it.
5456 * c-opts.c (c_common_post_options): Handle it.
5457 flag_abi_compat_version defaults to 8.
5458
bdaaa8b7
VV
54592015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
5460
5461 Complete the implementation of N4230, Nested namespace definition.
5462 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
5463 __cpp_nested_namespace_definitions.
5464
eaa797e8
MLI
54652015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5466
5467 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
5468
c4914de6
MLI
54692015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5470
5471 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
5472 when warning.
5473 * c-pragma.h (pragma_lex): Add optional loc argument.
5474
fcb87c50
MM
54752015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
5476
5477 * c-format.c (check_format_arg): Adjust to use common block size in all
5478 object pools.
5479
31bdd08a
DM
54802015-09-15 David Malcolm <dmalcolm@redhat.com>
5481
5482 * c-format.c (location_from_offset): Update for change in
5483 signature of location_get_source_line.
5484 * c-indentation.c (get_visual_column): Likewise.
5485 (line_contains_hash_if): Likewise.
5486
aa9f4b4c
MP
54872015-09-14 Marek Polacek <polacek@redhat.com>
5488
5489 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
5490 setting various warnings.
5491
aa256c4a
MP
54922015-09-14 Marek Polacek <polacek@redhat.com>
5493
5494 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
5495 a negative value.
5496
0f876f22
MW
54972015-09-11 Mark Wielaard <mjw@redhat.com>
5498
5499 PR c/28901
5500 * c.opt (Wunused-variable): Option from common.opt.
5501 (Wunused-const-variable): New option.
5502
273aa49e
PC
55032015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
5504
5505 PR c++/53184
5506 * c.opt ([Wsubobject-linkage]): Add.
5507
1807ffc1
MS
55082015-09-03 Martin Sebor <msebor@redhat.com>
5509
5510 PR c/66516
5511 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
5512 functions.
5513 * c-common.c (reject_gcc_builtin): Define.
5514
38942840
BI
55152015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
5516
5517 PR middle-end/60586
5518 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
5519 prototype.
5520 * c-gimplify.c (c_gimplify_expr): Added a call to the function
5521 cilk_gimplify_call_params_in_spawned_fn.
5522 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
5523 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
5524 unwrapping.
5525
c316b5e4
MP
55262015-08-25 Marek Polacek <polacek@redhat.com>
5527
5528 PR middle-end/67330
5529 * c-common.c (handle_weak_attribute): Don't check whether the
5530 visibility can be changed here.
5531
584a7c46
MLI
55322015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
5533
5534 * c-lex.c (c_lex_with_flags): Use explicit locations.
5535
a79683d5
TS
55362015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5537
5538 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
5539 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
5540
61717a45
FXC
55412015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
5542
5543 PR middle-end/36757
5544 * c-common.c (check_builtin_function_arguments): Add check
5545 for BUILT_IN_SIGNBIT argument.
5546
329524f5
PC
55472015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
5548
5549 PR c++/67160
5550 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
5551 in c++1z mode.
5552
4ee55665
MP
55532015-08-17 Marek Polacek <polacek@redhat.com>
5554
5555 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
5556 with whitespaces before qualifier names.
5557
b893e375
MP
55582015-08-12 Marek Polacek <polacek@redhat.com>
5559
5560 PR c++/55095
5561 * c-common.c (maybe_warn_shift_overflow): Properly handle
5562 left-shifting 1 into the sign bit.
5563
c2d89095
MLI
55642015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5565
5566 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
5567
971e17ff
AS
55682015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
5569 Braden Obrzut <admin@maniacsvault.net>
5570 Jason Merrill <jason@redhat.com>
5571
5572 Add C++ Concepts TS support.
5573 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
5574 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
5575 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
5576 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
5577 * c-opts.c (set_std_cxx1z): Set flag_concepts.
5578 * c.opt (fconcepts): New.
5579
b3d5bc62
JJ
55802015-08-02 Martin Sebor <msebor@redhat.com>
5581
5582 * c.opt (-Wframe-address): New warning option.
5583
8ebca419
PP
55842015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5585
5586 * c-indentation.c (should_warn_for_misleading_indentation):
5587 Improve heuristics.
5588
1a1e101f
PP
55892015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5590
5591 * c-indentation.c (get_visual_column): Add parameter first_nws,
5592 use it. Update comment documenting the function.
5593 (is_first_nonwhitespace_on_line): Remove.
5594 (should_warn_for_misleading_indentation): Replace usage of
5595 of is_first_nonwhitespace_on_line with get_visual_column.
5596
992118a1
PP
55972015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5598
5599 * c-indentation.h (struct token_indent_info): Define.
5600 (get_token_indent_info): Define.
5601 (warn_for_misleading_information): Declare.
5602 * c-common.h (warn_for_misleading_information): Remove.
5603 * c-identation.c (warn_for_misleading_indentation):
5604 Change declaration to take three token_indent_infos. Adjust
5605 accordingly.
5606 * c-identation.c (should_warn_for_misleading_indentation):
5607 Likewise. Bail out early if the body is a compound statement.
5608 (guard_tinfo_to_string): Define.
5609
e8fa3817
JM
56102015-07-30 Jason Merrill <jason@redhat.com>
5611
5612 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
5613 '*' for reference decay.
5614
173864e8
MP
56152015-07-30 Marek Polacek <polacek@redhat.com>
5616
5617 * c-common.c (warn_tautological_cmp): Bail for float types.
5618
f2afe6dd
MP
56192015-07-27 Marek Polacek <polacek@redhat.com>
5620
5621 PR bootstrap/67030
5622 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
5623
05b28fd6
MP
56242015-07-27 Marek Polacek <polacek@redhat.com>
5625
5626 PR c++/66555
5627 PR c/54979
5628 * c-common.c (find_array_ref_with_const_idx_r): New function.
5629 (warn_tautological_cmp): New function.
5630 * c-common.h (warn_tautological_cmp): Declare.
5631 * c.opt (Wtautological-compare): New option.
5632
5a5062b8
MP
56332015-07-23 Marek Polacek <polacek@redhat.com>
5634
5635 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
5636 (ubsan_instrument_shift): Likewise.
5637
dc891fe7
MP
56382015-07-23 Marek Polacek <polacek@redhat.com>
5639
5640 PR sanitizer/66908
5641 * c-ubsan.c: Include gimplify.h.
5642 (ubsan_instrument_division): Unshare OP0 and OP1.
5643 (ubsan_instrument_shift): Likewise.
5644
451b5e48
MP
56452015-07-20 Marek Polacek <polacek@redhat.com>
5646 Richard Sandiford <richard.sandiford@arm.com>
5647
5648 PR c++/55095
5649 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
5650 Use EXPR_LOC_OR_LOC.
5651 (maybe_warn_shift_overflow): New function.
5652 * c-common.h (maybe_warn_shift_overflow): Declare.
5653 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
5654 * c.opt (Wshift-overflow): New option.
5655
fb0b2914
ML
56562015-07-16 Martin Liska <mliska@suse.cz>
5657
5658 * c-format.c (static void check_format_info_main): Use
5659 object_allocator instead of pool_allocator.
5660 (check_format_arg): Likewise.
5661 (check_format_info_main): Likewise.
5662
903f5c23
AM
56632015-07-15 Andrew MacLeod <amacleod@redhat.com>
5664
5665 * c-opts.c: Remove multiline #include comment.
5666
026c3cfd
AH
56672015-07-12 Aldy Hernandez <aldyh@redhat.com>
5668
5669 * c-common.c: Fix double word typos.
5670
bb49ee66
EB
56712015-07-10 Eric Botcazou <ebotcazou@adacore.com>
5672
5673 * c-ada-spec.h (cpp_operation): Revert latest change.
5674 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
5675 constructors and destructors.
5676
1916bcb5
AM
56772015-07-09 Andrew MacLeod <amacleod@redhat.com>
5678
5679 * c-common.h: Adjust includes for flags.h changes.
5680 * stub-objc.c: Likewise.
026c3cfd 5681
a9dcd529
EB
56822015-07-08 Eric Botcazou <ebotcazou@adacore.com>
5683
5684 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
5685 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
5686
b03b462f
JJ
56872015-07-08 Jakub Jelinek <jakub@redhat.com>
5688
5689 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
5690 are to be removed, return NULL rather than original clauses list.
5691
c7131fb2
AM
56922015-07-07 Andrew MacLeod <amacleod@redhat.com>
5693
5694 * array-notation-common.c: Adjust includes.
5695 * c-ada-spec.c: Likewise.
5696 * c-cilkplus.c: Likewise.
5697 * c-common.h: Likewise.
5698 * c-cppbuiltin.c: Likewise.
5699 * c-dump.c: Likewise.
5700 * c-format.c: Likewise.
5701 * c-gimplify.c: Likewise.
5702 * c-indentation.c: Likewise.
5703 * c-lex.c: Likewise.
5704 * c-omp.c: Likewise.
5705 * c-opts.c: Likewise.
5706 * c-pch.c: Likewise.
5707 * c-ppoutput.c: Likewise.
5708 * c-pragma.c: Likewise.
5709 * c-pretty-print.c: Likewise.
5710 * c-semantics.c: Likewise.
5711 * c-ubsan.c: Likewise.
5712 * cilk.c: Likewise.
5713 * stub-objc.c: Likewise.
5714
2a7fb83f
EB
57152015-07-07 Eric Botcazou <ebotcazou@adacore.com>
5716
5717 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
5718 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
5719
a03c9bf1
JM
57202015-07-01 Jason Merrill <jason@redhat.com>
5721
36a85135
JM
5722 * c-common.h (D_CXX11): Rename from D_CXX0X.
5723 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
5724 * c-common.c: Adjust.
5725
e7fa68d5
JM
5726 * c-opts.c (c_common_post_options): Default to C++14.
5727
a03c9bf1
JM
5728 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
5729
fe95b036
ESR
57302015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
5731
5732 Implement N4197 - Adding u8 character literals
b3d5bc62 5733 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 5734 CPP_CHAR.
b3d5bc62 5735 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 5736 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 5737 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
5738 and CPP_UTF8CHAR tokens.
5739 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 5740
da2e71c9
MLI
57412015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5742
5743 PR fortran/66605
5744 * c-common.c (do_warn_unused_parameter): Move here.
5745 * c-common.h (do_warn_unused_parameter): Declare.
5746
b155cfd9
MP
57472015-06-29 Marek Polacek <polacek@redhat.com>
5748
5749 PR c/66322
5750 * c-common.c (check_case_bounds): Add bool * parameter. Set
5751 OUTSIDE_RANGE_P.
5752 (c_add_case_label): Add bool * parameter. Pass it down to
5753 check_case_bounds.
5754 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
5755 warning here.
5756 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
5757 declarations.
5758
31521951
MP
57592015-06-27 Marek Polacek <polacek@redhat.com>
5760
5761 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
5762 or VECTOR_INTEGER_TYPE_P throughout.
5763 * c-gimplify.c: Likewise.
5764
22d03525
MP
57652015-06-26 Marek Polacek <polacek@redhat.com>
5766
5767 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
5768 * c-common.c (c_fully_fold_internal): Likewise.
5769 (c_alignof_expr): Likewise.
5770 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
5771 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 5772 * cilk.c (create_parm_list): Likewise.
22d03525 5773
af05e6e5
MP
57742015-06-26 Marek Polacek <polacek@redhat.com>
5775
5776 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
5777
f0889939
AM
57782015-06-25 Andrew MacLeod <amacleod@redhat.com>
5779
5780 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
5781 * c-gimplify.c: Likewise.
5782 * c-pragma.c: Likewise.
5783 * c-ubsan.c: Likewise.
5784 * cilk.c: Likewise.
5785
ca752f39
RS
57862015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5787
5788 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
5789 ggc_hasher.
5790
16a16ec7
AM
57912015-06-25 Andrew MacLeod <amacleod@redhat.com>
5792
5793 * cilk.c: Move calls.h after tm.h in the include chain.
5794
0ae9bd27
MP
57952015-06-25 Marek Polacek <polacek@redhat.com>
5796
5797 * array-notation-common.c: Use VAR_P throughout.
5798 * c-ada-spec.c: Likewise.
5799 * c-common.c: Likewise.
5800 * c-format.c: Likewise.
5801 * c-gimplify.c: Likewise.
5802 * c-omp.c: Likewise.
5803 * c-pragma.c: Likewise.
5804 * c-pretty-print.c: Likewise.
5805 * cilk.c: Likewise.
5806
62f9079a
MP
58072015-06-25 Marek Polacek <polacek@redhat.com>
5808
5809 * cilk.c (extract_free_variables): Use is_global_var.
5810
0fa16060
RS
58112015-06-23 Richard Sandiford <richard.sandiford@arm.com>
5812
5813 * c-common.c: Don't include target-def.h.
5814
a68ae2e1
MP
58152015-06-23 Marek Polacek <polacek@redhat.com>
5816
5817 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
5818 when comparing INTEGER_CSTs.
5819
c6a2f2d9
PMR
58202015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
5821
5822 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
5823 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
5824 (dump_ada_template): Skip partially specialized types.
5825
6b4db501
MM
58262015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
5827
5828 * c-common.c (scalar_to_vector): Use std::swap instead of manually
5829 swapping.
5830
abb226c9
AM
58312015-06-17 Andrew MacLeod <amacleod@redhat.com>
5832
5833 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
5834 * c-ada-spec.c: Likewise.
5835 * c-cilkplus.c: Likewise.
5836 * c-common.c: Likewise.
5837 * c-common.h: Likewise.
5838 * c-cppbuiltin.c: Likewise.
5839 * c-dump.c: Likewise.
5840 * c-format.c: Likewise.
5841 * c-gimplify.c: Likewise.
5842 * c-indentation.c: Likewise.
5843 * c-lex.c: Likewise.
5844 * c-omp.c: Likewise.
5845 * c-opts.c: Likewise.
5846 * c-pch.c: Likewise.
5847 * c-ppoutput.c: Likewise.
5848 * c-pragma.c: Likewise.
5849 * c-pretty-print.c: Likewise.
5850 * c-semantics.c: Likewise.
5851 * c-ubsan.c: Likewise.
5852 * cilk.c: Likewise.
5853 * stub-objc.c: Likewise.
5854
076fecad
PP
58552015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
5856
5857 PR c++/65168
5858 * c-common.c (c_common_truthvalue_conversion): Warn when
5859 converting an address of a reference to a truth value.
5860
13fdf2e2
AM
58612015-06-08 Andrew MacLeod <amacleod@redhat.com>
5862
5863 * array-notation-common.c : Adjust include files.
5864 * c-ada-spec.c : Likewise.
5865 * c-cilkplus.c : Likewise.
5866 * c-common.c : Likewise.
5867 * c-common.h : Likewise.
5868 * c-cppbuiltin.c : Likewise.
5869 * c-dump.c : Likewise.
5870 * c-format.c : Likewise.
5871 * c-gimplify.c : Likewise.
5872 * c-indentation.c : Likewise.
5873 * c-lex.c : Likewise.
5874 * c-omp.c : Likewise.
5875 * c-opts.c : Likewise.
5876 * c-pch.c : Likewise.
5877 * c-ppoutput.c : Likewise.
5878 * c-pragma.c : Likewise.
5879 * c-pretty-print.c : Likewise.
5880 * c-semantics.c : Likewise.
5881 * c-ubsan.c : Likewise.
5882 * cilk.c : Likewise.
5883 * stub-objc.c : Likewise.
5884
a1661b90
MP
58852015-06-08 Marek Polacek <polacek@redhat.com>
5886
5887 PR c/66415
5888 * c-format.c (location_from_offset): Return LOC if LINE is null.
5889
d7438551
AH
58902015-06-05 Aldy Hernandez <aldyh@redhat.com>
5891
5892 * c-common.h (c_parse_final_cleanups): New prototype.
5893 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
5894
b3d5bc62
JJ
58952015-06-04 Sriraman Tallam <tmsriram@google.com>
5896
5897 * c-common.c (noplt): New attribute.
5898 (handle_noplt_attribute): New handler.
5899
ecb9f223
AM
59002015-06-04 Andrew MacLeod <amacleod@redhat.com>
5901
5902 * array-notation-common.c: Adjust includes for restructured coretypes.h.
5903 * c-ada-spec.c: Likewise.
5904 * c-cilkplus.c: Likewise.
5905 * c-common.c: Likewise.
5906 * c-common.h: Likewise.
5907 * c-cppbuiltin.c: Likewise.
5908 * c-dump.c: Likewise.
5909 * c-format.c: Likewise.
5910 * c-gimplify.c: Likewise.
5911 * c-indentation.c: Likewise.
5912 * c-lex.c: Likewise.
5913 * c-omp.c: Likewise.
5914 * c-opts.c: Likewise.
5915 * c-pch.c: Likewise.
5916 * c-ppoutput.c: Likewise.
5917 * c-pragma.c: Likewise.
5918 * c-pretty-print.c: Likewise.
5919 * c-semantics.c: Likewise.
5920 * c-ubsan.c: Likewise.
5921 * cilk.c: Likewise.
5922 * stub-objc.c: Likewise.
5923
6ac48155
DM
59242015-06-02 David Malcolm <dmalcolm@redhat.com>
5925
5926 PR c/66220:
5927 * c-indentation.c (should_warn_for_misleading_indentation): Use
5928 expand_location rather than expand_location_to_spelling_point.
5929 Don't warn if the guarding statement is more indented than the
5930 next/body stmts.
5931
773ce42e
DM
59322015-06-02 David Malcolm <dmalcolm@redhat.com>
5933
5934 * c-indentation.c (warn_for_misleading_indentation): Bail out
5935 immediately if -Wmisleading-indentation isn't enabled.
5936
4fef8379
ML
59372015-06-01 Martin Liska <mliska@suse.cz>
5938
5939 * c-format.c (check_format_arg):Use new type-based pool allocator.
5940 (check_format_info_main) Likewise.
5941
1edfb384
EB
59422015-05-31 Eric Botcazou <ebotcazou@adacore.com>
5943
5944 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
5945 (has_nontrivial_methods): Likewise.
5946
9677ef52
MP
59472015-05-25 Marek Polacek <polacek@redhat.com>
5948
5949 * c-ubsan.c (ubsan_instrument_shift): Use type0.
5950
fd5c817a
MP
59512015-05-22 Marek Polacek <polacek@redhat.com>
5952
5953 PR c/47043
5954 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
5955
a2f45fe6 59562015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
5957
5958 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
5959 STACK_GROWS_DOWNWARD.
5960
a2f45fe6 59612015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
5962
5963 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
5964 STACK_GROWS_DOWNWARD rather than if it is defined.
5965
0fee2ac2 59662015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 5967
0fee2ac2
MLI
5968 PR c/52952
5969 * c-format.c (location_column_from_byte_offset): New.
5970 (location_from_offset): New.
5971 (struct format_wanted_type): Add offset_loc field.
5972 (check_format_info): Move handling of location for extra arguments
5973 closer to the point of warning.
5974 (check_format_info_main): Pass the result of location_from_offset
5975 to warning_at.
5976 (format_type_warning): Pass the result of location_from_offset
5977 to warning_at.
5978
cf4ef6f7
MP
59792015-05-20 Marek Polacek <polacek@redhat.com>
5980
5981 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
5982
3a65ee74
MP
59832015-05-20 Marek Polacek <polacek@redhat.com>
5984
5985 * c-ada-spec.c (dump_sloc): Use DECL_P.
5986
21b634ae
MP
59872015-05-20 Marek Polacek <polacek@redhat.com>
5988
5989 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5990 * c-common.c: Likewise.
5991
0e50b624
DM
59922015-05-19 David Malcolm <dmalcolm@redhat.com>
5993
5994 * c-common.h (fe_file_change): Strengthen param from
5995 const line_map * to const line_map_ordinary *.
5996 (pp_file_change): Likewise.
5997 * c-lex.c (fe_file_change): Likewise.
5998 (cb_define): Use linemap_check_ordinary when invoking
5999 SOURCE_LINE.
6000 (cb_undef): Likewise.
6001 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
6002 invoking cb_file_change.
6003 (c_finish_options): Likewise.
6004 (push_command_line_include): Likewise.
6005 (cb_file_change): Strengthen param "new_map" from
6006 const line_map * to const line_map_ordinary *.
6007 * c-ppoutput.c (cb_define): Likewise for local "map".
6008 (pp_file_change): Likewise for param "map" and local "from".
6009
fab27f52
MM
60102015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
6011
6012 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
6013
2fe1d762
TV
60142015-05-18 Tom de Vries <tom@codesourcery.com>
6015
6016 * c-common.c (build_va_arg_1): New function.
6017 (build_va_arg): Add address operator to va_list operand if necessary.
6018
7a37fa90
MM
60192015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
6020
6021 PR c/48956
6022 * c-common.c (int_safely_convertible_to_real_p): Define.
6023 (unsafe_conversion_p): Check conversions involving complex types.
6024 (conversion_warning): Add new warning message for conversions which
6025 discard imaginary component.
6026 * c-common.h: (enum conversion_safety): Add new enumerator for such
6027 conversions.
6028
3aa3c9fc
MP
60292015-05-14 Marek Polacek <polacek@redhat.com>
6030
6031 PR c/66066
6032 PR c/66127
6033 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
6034 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
6035 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
6036 use it. If FOR_INT_CONST, require that all evaluated operands be
6037 INTEGER_CSTs.
6038
c3388e62
DM
60392015-05-12 David Malcolm <dmalcolm@redhat.com>
6040
6041 * c-common.h (warn_for_misleading_indentation): New prototype.
6042 * c-indentation.c: New file.
6043 * c.opt (Wmisleading-indentation): New option.
6044
c7b38fd5
TV
60452015-05-12 Tom de Vries <tom@codesourcery.com>
6046
6047 PR tree-optimization/66010
6048 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
6049
381bf11e
JM
60502015-05-09 Jason Merrill <jason@redhat.com>
6051
edff0c06
JM
6052 * c-opts.c (c_common_post_options): Also clear
6053 cpp_opts->cpp_warn_cxx11_compat.
6054
129211bc
JM
6055 * c-common.h (enum cxx_dialect): Add cxx_unset.
6056 * c-common.c (cxx_dialect): Initialize to cxx_unset.
6057 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
6058
381bf11e
JM
6059 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
6060 (std=gnu++0x): Mark as Undocumented.
6061 (std=gnu++1y): Add deprecated message.
6062
fe191308
JM
60632015-05-08 Jason Merrill <jason@redhat.com>
6064
765189ff
JM
6065 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
6066 * c-opts.c: Adjust.
6067
fe191308
JM
6068 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
6069
755e528f
MP
60702015-05-08 Marek Polacek <polacek@redhat.com>
6071
6072 PR c/64918
6073 * c.opt (Woverride-init-side-effects): New option.
6074
0173bd2a
MP
60752015-05-07 Marek Polacek <polacek@redhat.com>
6076
6077 PR c/65179
6078 * c-common.c (c_fully_fold_internal): Warn when left shifting a
6079 negative value.
6080 * c.opt (Wshift-negative-value): New option.
6081 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
6082 when -Wextra and C99/C++11 mode.
6083
e0f0d3b9
MP
60842015-05-07 Marek Polacek <polacek@redhat.com>
6085 Martin Uecker <uecker@eecs.berkeley.edu>
6086
6087 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
6088 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
6089
8243e2a9
JM
60902015-05-05 Jason Merrill <jason@redhat.com>
6091
6092 * c.opt (Wterminate): New.
6093
577cd070
MP
60942015-04-30 Marek Polacek <polacek@redhat.com>
6095
6096 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
6097 require that the non-constant be of a boolean type.
6098
0373796b
JT
60992015-04-29 Josh Triplett <josh@joshtriplett.org>
6100
e0f0d3b9
MP
6101 * c-common.c (handle_section_attribute): Refactor to reduce
6102 nesting and distinguish between error cases.
0373796b 6103
716c0ba6
MP
61042015-04-29 Marek Polacek <polacek@redhat.com>
6105
6106 PR c/64610
6107 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
6108 with 0/1.
6109
8848828b
JJ
61102015-04-29 Jakub Jelinek <jakub@redhat.com>
6111
6112 * c-common.h (omp_clause_mask): Unconditionally define as a class.
6113 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
6114 HOST_BITS_PER_WIDE_INT.
6115
ecd0e562
TV
61162015-04-28 Tom de Vries <tom@codesourcery.com>
6117
6118 PR tree-optimization/65887
6119 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
6120
2a877204 61212015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 6122 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
6123
6124 * c-ada-spec.c (in_function): Delete.
6125 (dump_generic_ada_node): Do not change in_function and remove the
6126 redundant code dealing with it.
6127 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
6128 (print_ada_methods): Output the static member functions in a nested
6129 package after the regular methods as well as associated renamings.
6130
4853031e
MP
61312015-04-24 Marek Polacek <polacek@redhat.com>
6132
6133 PR c/65830
6134 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
6135 and OPT_Wshift_count_overflow.
6136
8c2b7f79
MP
6137 PR c/63357
6138 * c-common.c (warn_logical_operator): Warn if the operands have the
6139 same expressions.
6140
b8787813
MP
61412015-04-24 Marek Polacek <polacek@redhat.com>
6142
6143 PR c/61534
6144 * c-common.c (warn_logical_operator): Bail if either operand comes
6145 from a macro expansion.
6146
8fba1830
BRF
61472015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
6148
6149 PR target/55143
6150 * c-common.c (c_default_pointer_mode): Add definition.
6151 * c-common.h (c_default_pointer_mode): Add declaration.
6152
17958621
JJ
61532015-03-11 Jakub Jelinek <jakub@redhat.com>
6154
6155 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
6156 on record_builtin_type argument.
6157
7ccb1a11
JJ
61582015-03-10 Jakub Jelinek <jakub@redhat.com>
6159
6160 PR c/65120
6161 * c-common.c (warn_logical_not_parentheses): Don't warn for
6162 !x == 0 or !x != 0.
6163
04fd785e
MP
61642015-03-07 Marek Polacek <polacek@redhat.com>
6165
6166 PR sanitizer/65280
6167 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
6168 before trying to figure out whether we have a flexible array member.
6169
a4e26206 61702015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 6171 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
6172
6173 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
6174
0d2489f4
EB
61752015-03-05 Eric Botcazou <ebotcazou@adacore.com>
6176
6177 PR ada/65319
6178 * c-ada-spec.c (print_destructor): Remove obsolete code.
6179
83ed54d7
EB
61802015-03-01 Eric Botcazou <ebotcazou@adacore.com>
6181
6182 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
6183 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
6184 DECL_TEMPLATE_RESULT emulations.
6185 (dump_ada_template)): Add guard for TYPE_METHODS.
6186
7631f0e2
MP
61872015-02-27 Marek Polacek <polacek@redhat.com>
6188
6189 PR c/65040
6190 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
6191
d1783ae5
KT
61922015-02-27 Kai Tietz <ktietz@redhat.com>
6193
6194 PR c/35330
6195 * c-pragma.c (handle_pragma_weak): Do not try to create
6196 weak/alias of declarations not being function, or variable
6197 declarations.
6198
56a9f6bc
TS
61992015-02-24 Thomas Schwinge <thomas@codesourcery.com>
6200
6201 PR libgomp/64625
6202 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
6203 Remove macros.
6204 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
6205
3d5cb23d
MP
62062015-02-16 Marek Polacek <polacek@redhat.com>
6207
6208 PR c/65066
6209 * c-format.c (check_format_types): Handle null param.
6210
fa008882
MP
62112015-02-13 Marek Polacek <polacek@redhat.com>
6212
6213 PR c/65040
6214 * c-format.c (check_format_types): Don't warn about different
6215 signedness if the original value is in the range of WANTED_TYPE.
6216
785f21af
JM
62172015-02-12 Jason Merrill <jason@redhat.com>
6218
6219 PR c++/64956
6220 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
6221 to the current highest version.
6222 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
6223
4886ec8e
JJ
62242015-02-04 Jakub Jelinek <jakub@redhat.com>
6225
6226 PR c/64824
6227 PR c/64868
6228 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
6229 instead of RDIV_EXPR. Use build_binary_op instead of
6230 build2_loc.
6231
40fecdd6
JM
62322015-01-30 Joseph Myers <joseph@codesourcery.com>
6233
6234 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
6235 to pass input_location as first argument.
6236
a0c88d06
TV
62372015-01-23 Tom de Vries <tom@codesourcery.com>
6238
6239 PR libgomp/64672
6240 * c.opt (fopenacc): Mark as LTO option.
6241
1506ae0e
TV
62422015-01-23 Tom de Vries <tom@codesourcery.com>
6243
6244 PR libgomp/64707
6245 * c.opt (fopenmp): Mark as LTO option.
6246
31be63ab
JJ
62472015-01-21 Jakub Jelinek <jakub@redhat.com>
6248
6249 PR c/63307
b1726d6c 6250 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
6251 (compare_decls): Fix up formatting.
6252
62532015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
6254
6255 PR c/63307
6256 * cilk.c: Include vec.h.
6257 (struct cilk_decls): New structure.
6258 (wrapper_parm_cb): Split this function to...
6259 (fill_decls_vec): ...this...
6260 (create_parm_list): ...and this.
6261 (compare_decls): New function.
6262 (for_local_cb): Remove.
6263 (wrapper_local_cb): Ditto.
6264 (build_wrapper_type): For now first traverse and fill vector of
6265 declarations then sort it and then deal with sorted vector.
6266 (cilk_outline): Ditto.
6267 (declare_one_free_variable): Ditto.
6268
6875457f
JM
62692015-01-21 Jason Merrill <jason@redhat.com>
6270
6271 PR c++/64629
6272 * c-format.c (check_format_arg): Call decl_constant_value.
6273
185c9e56
ML
62742015-01-19 Martin Liska <mliska@suse.cz>
6275
6276 * c-common.c (handle_noicf_attribute): New function.
6277
41dbbb37
TS
62782015-01-15 Thomas Schwinge <thomas@codesourcery.com>
6279 Bernd Schmidt <bernds@codesourcery.com>
6280 James Norris <jnorris@codesourcery.com>
6281 Cesar Philippidis <cesar@codesourcery.com>
6282 Ilmir Usmanov <i.usmanov@samsung.com>
6283 Jakub Jelinek <jakub@redhat.com>
6284
6285 * c.opt (fopenacc): New option.
6286 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
6287 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
6288 New macros.
6289 * c-common.h (c_finish_oacc_wait): New prototype.
6290 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
6291 (c_finish_oacc_wait): New function.
6292 * c-pragma.c (oacc_pragmas): New variable.
6293 (c_pp_lookup_pragma, init_pragma): Handle it.
6294 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
6295 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
6296 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
6297 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
6298 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
6299 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
6300 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
6301 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
6302 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
6303 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
6304 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
6305 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
6306 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
6307 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
6308 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
6309 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
6310 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
6311 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
6312 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
6313 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
6314 PRAGMA_OACC_CLAUSE_WORKER.
6315
3f8257db 63162015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
6317
6318 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
6319 for the new option fstack-protector_explicit.
6320 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
6321 (handle_stack_protect_attribute): New function.
6322
3f8257db 63232015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
6324
6325 * c.opt: New option -Warray-bounds=.
6326
adfac8df
JJ
63272015-01-09 Michael Collison <michael.collison@linaro.org>
6328
6329 * array-notation-common.c: Include hash-set.h, machmode.h,
6330 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6331 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
6332 * c-ada-spec.c: Ditto.
6333 * c-cilkplus.c: Ditto.
6334 * c-common.c: Include input.h due to flattening of tree.h.
6335 Define macro GCC_C_COMMON_C.
6336 * c-common.h: Flatten tree.h header files into c-common.h.
6337 Remove include of tree-core.h.
6338 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
6339 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6340 fold-const.h, wide-int.h, and inchash.h due to
6341 flattening of tree.h.
6342 * c-dump.c: Ditto.
6343 * c-format.c: Flatten tree.h header files into c-common.h.
6344 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
6345 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6346 fold-const.h, wide-int.h, and inchash.h due to
6347 flattening of tree.h.
6348 * c-dump.c: Include hash-set.h, machmode.h,
6349 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6350 fold-const.h, wide-int.h, and inchash.h due to
6351 flattening of tree.h.
6352 * c-format.c: Include hash-set.h, machmode.h,
6353 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6354 fold-const.h, wide-int.h, inchash.h and real.h due to
6355 flattening of tree.h.
6356 * c-gimplify.c: Include hash-set.h, machmode.h,
6357 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6358 fold-const.h, wide-int.h, and inchash.h due to
6359 flattening of tree.h.
6360 * cilk.c: Ditto.
6361 * c-lex.c: Ditto.
6362 * c-omp.c: Ditto.
6363 * c-opts.c: Ditto.
6364 * c-pch.c: Ditto.
6365 * c-ppoutput.c: Ditto.
6366 * c-pragma.c: Ditto.
6367 * c-pretty-print.c: Ditto.
6368 * c-semantics.c: Ditto.
6369 * c-ubsan.c: Ditto.
6370 * stub-objc.c: Ditto.
6371
f5481fc4
JM
63722015-01-08 Jason Merrill <jason@redhat.com>
6373
6374 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
6375 do_ubsan_in_current_function.
6376 (ubsan_maybe_instrument_reference_or_call): Likewise.
6377 * c-ubsan.h: Declare it.
6378
de35aa66
MS
63792015-01-08 Mike Stump <mikestump@comcast.net>
6380
6381 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
6382
4a9a42ab
MP
63832015-01-07 Marek Polacek <polacek@redhat.com>
6384
6385 PR c/64440
6386 * c-common.c (c_fully_fold_internal): Warn for division and modulo
6387 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
6388
2f42e5de
TS
63892015-01-05 Trevor Saunders <tsaunders@mozilla.com>
6390
6391 PR c++/31397
6392 * c.opt (Wsuggest-override): New option.
6393
5624e564
JJ
63942015-01-05 Jakub Jelinek <jakub@redhat.com>
6395
6396 Update copyright years.
6397
5bd012f8
MP
63982015-01-05 Marek Polacek <polacek@redhat.com>
6399
6400 PR c/64423
6401 * c-common.c (warn_array_subscript_with_type_char): Add location_t
6402 parameter. Use it.
6403 * c-common.h (warn_array_subscript_with_type_char): Update
6404 declaration.
6405
a7fa8d18
ESR
64062014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
6407
6408 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
6409 Control macro with flag_sized_deallocation.
6410
3f8257db 64112014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
6412
6413 * c.opt (Wdiscarded-array-qualifiers): New option.
6414
1f8d3e84
JJ
64152014-12-19 Jakub Jelinek <jakub@redhat.com>
6416
6417 PR preprocessor/63831
6418 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
6419 and __has_cpp_attribute here.
6420 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
6421 c_common_has_attribute.
6422 * c-common.h (c_common_has_attribute): New prototype.
6423 * c-lex.c (init_c_lex): Set cb->has_attribute to
6424 c_common_has_attribute instead of cb_has_attribute.
6425 (get_token_no_padding): New function.
6426 (cb_has_attribute): Renamed to ...
6427 (c_common_has_attribute): ... this. No longer static. Use
6428 get_token_no_padding, require ()s, don't build TREE_LIST
6429 unnecessarily, fix up formatting, adjust diagnostics, call
6430 init_attributes.
6431
20b06add
JM
64322014-12-15 Jason Merrill <jason@redhat.com>
6433
6434 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
6435 (-Wsized-deallocation): New.
6436 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
6437 to on in C++14 and up.
6438
94a073b2
JM
64392014-12-11 Jason Merrill <jason@redhat.com>
6440
acaa5911
JM
6441 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
6442
94a073b2
JM
6443 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
6444 we aren't complaining about VLAs.
6445
7fb66c15
MP
64462014-12-06 Marek Polacek <polacek@redhat.com>
6447
6448 PR tree-optimization/64183
6449 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
6450 shift-expression if it is integer_type_node. Use types_compatible_p.
6451
b731b390
JJ
64522014-11-29 Jakub Jelinek <jakub@redhat.com>
6453
6454 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
6455 last argument from create_tmp_var_raw and create_tmp_var calls.
6456 * cilk.c (gimplify_cilk_spawn): Likewise.
6457 * c-omp.c (c_finish_omp_atomic): Likewise.
6458
6a4da643
MP
64592014-11-28 Marek Polacek <polacek@redhat.com>
6460
6461 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
6462 instead of unsigned_type_node.
6463
541e35a6
MP
64642014-11-28 Marek Polacek <polacek@redhat.com>
6465
6466 PR c/63862
6467 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
6468 to op1_utype.
6469 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
6470 expression to unsigned_type_node.
6471
dcc97066
MW
64722014-11-20 Mark Wielaard <mjw@redhat.com>
6473
6474 PR debug/38757
6475 * c-opts.c (set_std_c89): Set lang_hooks.name.
6476 (set_std_c99): Likewise.
6477 (set_std_c11): Likewise.
6478 (set_std_cxx98): Likewise.
6479 (set_std_cxx11): Likewise.
6480 (set_std_cxx14): Likewise.
6481 (set_std_cxx1z): Likewise.
6482
aa7da51a
JJ
64832014-11-21 Jakub Jelinek <jakub@redhat.com>
6484
6485 PR target/63764
6486 * c-common.h (convert_vector_to_pointer_for_subscript): Change
6487 return type to bool.
009a3480 6488 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
6489 (convert_vector_to_pointer_for_subscript): Change return type to
6490 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
6491 and copy it into a TARGET_EXPR and use that instead of *vecp
6492 directly.
6493
538dd0b7
DM
64942014-11-19 David Malcolm <dmalcolm@redhat.com>
6495
6496 Merger of git branch "gimple-classes-v2-option-3".
6497 * ChangeLog.gimple-classes: New.
6498 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
6499 from being just a vec<gimple> to a vec<gbind *>.
6500
c39a5e99
JJ
65012014-11-18 Jakub Jelinek <jakub@redhat.com>
6502
6503 PR sanitizer/63813
6504 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
6505 argument to ptype, set type to TREE_TYPE (ptype). Don't call
6506 get_pointer_alignment for non-pointers. Use ptype, or if it is
6507 reference type, corresponding pointer type, as type of kind
6508 argument.
6509 (ubsan_maybe_instrument_reference,
6510 ubsan_maybe_instrument_member_call): Adjust callers.
6511
8537a4a9
MP
65122014-11-15 Marek Polacek <polacek@redhat.com>
6513
6514 PR middle-end/63884
6515 * array-notation-common.c (is_sec_implicit_index_fn): Return false
6516 for NULL fndecl.
6517 (extract_array_notation_exprs): Return for NULL node.
6518
2079956a
JM
65192014-11-12 Joseph Myers <joseph@codesourcery.com>
6520
6521 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
6522 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
6523
1304953e
JJ
65242014-11-12 Jakub Jelinek <jakub@redhat.com>
6525
6526 PR c/59708
6527 * c-common.c (check_builtin_function_arguments): Handle
6528 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
6529
e5e44252
AK
65302014-11-10 Andi Kleen <ak@linux.intel.com>
6531
6532 PR c/60804
6533 * c-common.h (check_no_cilk): Declare.
6534 * cilk.c (get_error_location): New function.
6535 (check_no_cilk): Dito.
6536
e64b984d
AK
65372014-11-10 Andi Kleen <ak@linux.intel.com>
6538
6539 * cilk.c (recognize_spawn): Use expression location
6540 for error message.
6541
13c21655
PC
65422014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
6543
6544 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
6545
42fd12b1
ESR
65462014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
6547
6548 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
6549 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
6550 (__cpp_range_based_for, __cpp_initializer_lists,
6551 __cpp_delegating_constructors, __cpp_nsdmi,
6552 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
6553 for C++11; (__cpp_attribute_deprecated): Remove in favor of
6554 __has_cpp_attribute.
6555 * c-lex.c (cb_has_attribute): New callback CPP function;
6556 (init_c_lex): Set has_attribute callback.
6557
6f450181
RB
65582014-11-04 Richard Biener <rguenther@suse.de>
6559
6560 * c-common.c (shorten_compare): Do not shorten mixed
6561 DFP and non-DFP compares.
6562
26f0e1d6
ESR
65632014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
6564
6565 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
6566 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
6567 Commentary and rearrangement of tests.
6568 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
6569 Commentary and rearrangement of tests.
ab20d992 6570 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
26f0e1d6
ESR
6571 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
6572
ef4bddc2
RS
65732014-10-29 Richard Sandiford <richard.sandiford@arm.com>
6574
6575 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
6576 enum from machine_mode.
6577
c582198b
AM
65782014-10-28 Andrew MacLeod <amacleod@redhat.com>
6579
adfac8df
JJ
6580 * c-common.c: Adjust include files.
6581 * c-gimplify.c: Ditto.
6582 * cilk.c: Ditto.
6583 * c-pragma.c: Ditto.
6584 * c-ubsan.c: Ditto.
c582198b 6585
60393bbc
AM
65862014-10-27 Andrew MacLeod <amacleod@redhat.com>
6587
6588 * c-gimplify.c: Adjust include files.
6589
d723bb7c
MLI
65902014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
6591
6592 PR c++/53061
6593 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
6594 c_common_initialize_diagnostics.
6595 * c-common.h: Likewise.
6596
90f3520e
MP
65972014-10-24 Marek Polacek <polacek@redhat.com>
6598
6599 PR c/56980
6600 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
6601 print "struct"/"union"/"enum" for typedefed names.
6602
59d7607a
MP
66032014-10-23 Marek Polacek <polacek@redhat.com>
6604
6605 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
6606 in unsigned type.
6607
d95a2703
JJ
66082014-10-22 Jakub Jelinek <jakub@redhat.com>
6609 Yury Gribov <y.gribov@samsung.com>
6610
6611 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6612 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
6613 instead of flag_sanitize_recover as bool flag.
6614
8e6ef852
KY
66152014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
6616
6617 * cilk.c: Revert previous change.
6618
948cf550
IZ
66192014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
6620
6621 PR c/63307
6622 * cilk.c: Include vec.h.
6623 (struct cilk_decls): New structure.
6624 (wrapper_parm_cb): Split this function to...
6625 (fill_decls_vec): ...this...
6626 (create_parm_list): ...and this.
6627 (compare_decls): New function.
6628 (for_local_cb): Remove.
6629 (wrapper_local_cb): Ditto.
6630 (build_wrapper_type): For now first traverse and fill vector of
6631 declarations then sort it and then deal with sorted vector.
6632 (cilk_outline): Ditto.
6633 (declare_one_free_variable): Ditto.
6634
92574c7c
MP
66352014-10-17 Marek Polacek <polacek@redhat.com>
6636
6637 * c-opts.c (c_common_post_options): Set warn_implicit_int.
6638 * c.opt (Wimplicit-int): Initialize to -1.
6639
83685514
AM
66402014-10-16 Andrew MacLeod <amacleod@redhat.com>
6641
6642 * c-pragma.c: Adjust include files.
6643 * c-semantics.c: Likewise.
6644
5b8300ea
DD
66452014-10-16 DJ Delorie <dj@redhat.com>
6646
6647 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
6648 multiples of bytes.
6649
5f83e90b
JM
66502014-10-14 Jason Merrill <jason@redhat.com>
6651
6652 PR c++/63455
6653 * c-common.h (CPP_PREPARSED_EXPR): New.
6654 (N_CP_TTYPES): Adjust.
6655
d73326ca
MP
66562014-10-15 Marek Polacek <polacek@redhat.com>
6657
6658 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
6659
78a7c317
DD
66602014-10-14 DJ Delorie <dj@redhat.com>
6661
6662 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
6663 types, not just __int128.
6664 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
6665 types, not just __int128.
6666 (cpp_atomic_builtins): Round pointer sizes up.
6667 (type_suffix): Use type precision, not specific types.
6668 * c-common.c (c_common_reswords): Remove __int128 special case.
6669 (c_common_type_for_size): Check for all __intN types, not just
6670 __int128.
6671 (c_common_type_for_mode): Likewise.
6672 (c_common_signed_or_unsigned_type): Likewise.
6673 (c_build_bitfield_integer_type): Likewise.
6674 (c_common_nodes_and_builtins): Likewise.
6675 (keyword_begins_type_specifier): Likewise.
6676 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
6677 __intN variants.
6678
2a22f99c
TS
66792014-10-12 Trevor Saunders <tsaunders@mozilla.com>
6680
6681 * c-common.c: Use hash_table instead of hashtab.
6682
2a8ef767
ESR
66832014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
6684
adfac8df 6685 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
6686 C++11 section.
6687
3c9aabbd
MG
66882014-10-03 Marc Glisse <marc.glisse@inria.fr>
6689
6690 PR c++/54427
6691 PR c++/57198
6692 PR c++/58845
6693 * c-common.c (warn_logical_operator): Punt for vectors.
6694
a15f7cb8
ESR
66952014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
6696
6697 Implement SD-6: SG10 Feature Test Recommendations
6698 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
6699 macros and the __has_header macro.
6700
8d0cf15e
JM
67012014-09-30 Jason Merrill <jason@redhat.com>
6702
dd5d5481
JM
6703 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
6704 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
6705 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
6706
b752325e
JM
6707 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
6708 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
6709
8d0cf15e
JM
6710 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
6711 * c-common.c (c_common_reswords): Remove __is_convertible_to.
6712
083e891e
MP
67132014-09-24 Marek Polacek <polacek@redhat.com>
6714
6715 PR c/61405
6716 PR c/53874
6717 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
6718
7861b648
AK
67192014-09-23 Andi Kleen <ak@linux.intel.com>
6720
6721 * c-common.c (handle_no_reorder_attribute): New function.
6722 (c_common_attribute_table): Add no_reorder attribute.
6723
9a79452d
JM
67242014-09-22 Joseph Myers <joseph@codesourcery.com>
6725
6726 * c-cppbuiltin.c (c_cpp_builtins): Define
6727 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
6728 modes.
6729
dd69f047
JM
67302014-09-18 Joseph Myers <joseph@codesourcery.com>
6731
6732 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
6733 for supported floating-point modes.
6734
737a4826
MLI
67352014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
6736
6737 * c.opt (Wpsabi): Use LangEnabledBy.
6738 * c-opts.c (c_common_handle_option): Do not handle here.
6739
8cc4b7a2
JM
67402014-09-12 Joseph Myers <joseph@codesourcery.com>
6741
6742 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
6743 macros for floating-point modes.
6744
179b5a55
MG
67452014-09-11 Marc Glisse <marc.glisse@inria.fr>
6746
6747 PR target/58757
6748 * c-cppbuiltin.c (builtin_define_float_constants): Correct
6749 __*_DENORM_MIN__ without denormals.
6750
570a11fe
JJ
67512014-09-10 Jakub Jelinek <jakub@redhat.com>
6752
6753 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6754 ubsan_instrument_vla, ubsan_instrument_return): Adjust
6755 ubsan_create_data callers.
6756 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
6757 index is constant or BIT_AND_EXPR with constant mask and is
6758 small enough for the bound.
6759 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
6760 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
6761
b559c810
MLI
67622014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6763
6764 * c.opt: Add CppReason to various flags.
6765 (Wdate-time): Re-sort.
6766 * c-common.c: Include c-common.h earlier.
6767 (struct reason_option_codes_t): Delete.
6768 (c_option_controlling_cpp_error): Prefix global type and struct
6769 with cpp_.
6770
1ef33fd4
MLI
67712014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6772
6773 * c.opt (Wnormalized): New.
6774 (Wnormalized=): Use Enum and Reject Negative.
6775 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
6776
66bb34c0
JM
67772014-09-08 Joseph Myers <joseph@codesourcery.com>
6778
6779 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
6780 digits of floating-point modes if -fbuilding-libgcc.
6781
53d68b9f
JM
67822014-09-05 Joseph Myers <joseph@codesourcery.com>
6783
6784 * c-cppbuiltin.c (c_cpp_builtins): Also define
6785 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
6786 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
6787 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
6788 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
6789 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
6790 __LIBGCC_STACK_GROWS_DOWNWARD__,
6791 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
6792 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
6793 __LIBGCC_DWARF_FRAME_REGISTERS__,
6794 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
6795 __LIBGCC_STACK_POINTER_REGNUM__ and
6796 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
6797 (builtin_define_with_value): Handle backslash-escaping in string
6798 macro values.
6799
f65586dc
RB
68002014-09-05 Richard Biener <rguenther@suse.de>
6801
6802 PR middle-end/63148
6803 * c-format.c (check_format_arg): Properly handle
6804 effectively signed POINTER_PLUS_EXPR offset.
6805
2b71f4a4
MLI
68062014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
6807
6808 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
6809 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
6810 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
6811 and Init.
6812 * c-opts.c (c_common_handle_option): Do not handle here.
6813 (sanitize_cpp_opts): Likewise.
6814 * c-common.c (struct reason_option_codes_t): Handle
6815 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
6816
d2e4feca
MP
68172014-09-03 Marek Polacek <polacek@redhat.com>
6818
6819 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
6820
9a771876
JJ
68212014-09-02 Jakub Jelinek <jakub@redhat.com>
6822 Balaji V. Iyer <balaji.v.iyer@intel.com>
6823 Igor Zamyatin <igor.zamyatin@intel.com>
6824
6825 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
6826 * c-common.c (c_common_reswords): Added _Cilk_for.
6827 * c-common.h (enum rid): Added RID_CILK_FOR.
6828 (cilk_for_number_of_iterations): Add declaration.
6829 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
6830 CILK_FOR.
6831 * c-pragma.c (init_pragma): Register "grainsize" pragma.
6832 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
6833
81b5d104
MLI
68342014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6835
6836 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
6837 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
6838 Wundef): Use CPP, Var and Init.
6839 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
6840
b753b37b
MLI
68412014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6842
6843 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
6844 * c-opts.c (c_common_handle_option): Do not handle here.
6845
028aee17
JM
68462014-08-25 Jason Merrill <jason@redhat.com>
6847
6848 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
6849 -std=c++14 and -std=gnu++14, rather than the reverse.
6850 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
6851 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
6852 * c-common.h (cxx_dialect): Remove cxx1y.
6853
e4276ba5
ESR
68542014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
6855
6856 * c-common.h (enum cxx_dialect): Add cxx14.
6857 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
6858 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
6859 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
6860
a545cacd
JM
68612014-08-22 Jason Merrill <jason@redhat.com>
6862
6863 * c.opt (std=gnu++17): Fix alias.
6864
59ea0364
MP
68652014-08-22 Marek Polacek <polacek@redhat.com>
6866
6867 PR c++/62199
6868 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
6869 check for vector types. Drop LHS argument.
6870 * c-common.h (warn_logical_not_parentheses): Adjust.
6871
596e808c
MLI
68722014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
6873
6874 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
6875 (Wmultichar): Likewise.
6876 (Wdate-time): Use C-family languages instead of Common. Use CPP
6877 and Var.
6878 * c-opts.c (c_common_handle_option): Do not handle the above
6879 options here.
6880 (sanitize_cpp_opts): Likewise.
6881
18767f65
MLI
68822014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
6883
6884 PR fortran/44054
6885 * c-opts.c: Include tree-diagnostics.h.
6886 (c_diagnostic_finalizer): New.
6887 (c_common_initialize_diagnostics): Use it.
6888
b4413594
MLI
68892014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
6890
6891 PR preprocessor/51303
6892 * c-common.c (struct reason_option_codes_t option_codes):
6893 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
6894
43f9a13c
MLI
68952014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
6896
6897 PR c/60975
6898 PR c/53063
6899 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
6900 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
6901 (c_common_post_options): Call init_global_opts_from_cpp.
6902 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
6903
04159acf
MP
69042014-08-19 Marek Polacek <polacek@redhat.com>
6905
6906 PR c++/62153
6907 * c-common.c (maybe_warn_bool_compare): New function.
6908 * c-common.h (maybe_warn_bool_compare): Declare.
6909 * c.opt (Wbool-compare): New option.
6910
35aff4fb
MP
69112014-08-19 Marek Polacek <polacek@redhat.com>
6912
6913 * c.opt (Wc99-c11-compat): New option.
6914
177cce46
MP
69152014-08-19 Marek Polacek <polacek@redhat.com>
6916
6917 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
6918 to warn_c90_c99_compat.
6919 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
6920 to -1.
6921
6ae9194f
MLI
69222014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
6923 Steven Bosscher <steven@gcc.gnu.org>
6924
6925 PR c/52952
6926 * c-format.c: Add extra_arg_loc and format_string_loc to struct
6927 format_check_results.
6928 (check_function_format): Use true and add comment for boolean
6929 argument.
6930 (finish_dollar_format_checking): Use explicit location when warning.
6931 (check_format_info): Likewise.
6932 (check_format_arg): Set extra_arg_loc and format_string_loc.
6933 (check_format_info_main): Use explicit location when warning.
6934 (check_format_types): Pass explicit location.
6935 (format_type_warning): Likewise.
6936
8e54f6d3
MLI
69372014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
6938
6939 PR fortran/44054
6940 * c-format.c: Handle Fortran flags.
6941
cd4e76fc
IZ
69422014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
6943
6944 PR other/61962
6945 * array-notation-common.c (find_rank): Added handling for other
6946 types of references.
6947
f3bede71
MP
69482014-08-10 Marek Polacek <polacek@redhat.com>
6949
6950 PR c/51849
6951 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
6952 * c.opt (Wc90-c99-compat): Add option.
6953
9f25a338
TS
69542014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6955
6956 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
6957
62e4eb35
MP
69582014-08-03 Marek Polacek <polacek@redhat.com>
6959
ab20d992 6960 * c-common.c (check_case_value): Add location_t parameter. Use it.
62e4eb35
MP
6961 (c_add_case_label): Pass loc to check_case_value.
6962
b787e7a2
TS
69632014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6964
6965 * cilk.c: Use hash_map instead of pointer_map.
6966
6e2830c3
TS
69672014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6968
6969 * c-gimplify.c: Use hash_set instead of pointer_set.
6970
a7ee52fb
IZ
69712014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6972
6973 PR middle-end/61455
6974 * array-notation-common.c (extract_array_notation_exprs): Handling
6975 of DECL_EXPR added.
6976
944fa280
JJ
69772014-08-01 Jakub Jelinek <jakub@redhat.com>
6978
6979 * c-common.h (min_align_of_type): Removed prototype.
6980 * c-common.c (min_align_of_type): Removed.
6981 * c-ubsan.h (ubsan_maybe_instrument_reference,
6982 ubsan_maybe_instrument_member_call): New prototypes.
6983 * c-ubsan.c: Include stor-layout.h and builtins.h.
6984 (ubsan_maybe_instrument_reference_or_call,
6985 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
6986 functions.
6987
b4dfdc11
MG
69882014-07-31 Marc Glisse <marc.glisse@inria.fr>
6989
6990 PR c++/60517
6991 * c.opt (-Wreturn-local-addr): Move to common.opt.
6992
a41844e5
JM
69932014-07-30 Jason Merrill <jason@redhat.com>
6994
6995 PR c++/61659
6996 PR c++/61687
6997 Revert:
6998 * c.opt (-fuse-all-virtuals): New.
6999
976d5a22
TT
70002014-07-30 Tom Tromey <tromey@redhat.com>
7001
7002 PR c/59855
7003 * c.opt (Wdesignated-init): New option.
7004 * c-common.c (c_common_attribute_table): Add "designated_init".
7005 (handle_designated_init): New function.
7006
cdc94aca
MP
70072014-07-24 Marek Polacek <polacek@redhat.com>
7008
7009 PR c/57653
7010 * c-opts.c (c_finish_options): If -imacros is in effect, return.
7011
f41373b6
DS
70122014-07-16 Dodji Seketeli <dodji@redhat.com>
7013
7014 PR preprocessor/60723 - missing system-ness marks for macro tokens
7015 * c-ppoutput.c (struct print::prev_was_system_token): New data
7016 member.
7017 (init_pp_output): Initialize it.
7018 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
7019 (do_line_change): Return a flag saying if a line marker was
7020 emitted or not.
7021 (scan_translation_unit): Detect if the system-ness of the token we
7022 are about to emit is different from the one of the previously
7023 emitted token. If so, emit a line marker. Avoid emitting useless
7024 adjacent line markers. Avoid emitting line markers for tokens
7025 originating from the expansion of built-in macros.
7026 (scan_translation_unit_directives_only): Adjust.
7027
4d661eaa
MP
70282014-07-15 Marek Polacek <polacek@redhat.com>
7029
7030 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
7031 TYPE_MAX_VALUE is NULL.
7032
b108f48f
JJ
70332014-07-14 Jakub Jelinek <jakub@redhat.com>
7034
7035 PR middle-end/61294
7036 * c.opt (Wmemset-transposed-args): New warning.
7037
c0221884
JM
70382014-07-10 Jason Merrill <jason@redhat.com>
7039
7040 PR c++/61659
7041 PR c++/61687
7042 * c.opt (-fuse-all-virtuals): New.
7043
63dfbb95
RB
70442014-07-09 Richard Biener <rguenther@suse.de>
7045
7046 PR c-family/61741
7047 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
7048 using unsigned arithmetic if overflow does not wrap instead of
7049 if overflow is undefined.
7050
773ec47f
MP
70512014-07-06 Marek Polacek <polacek@redhat.com>
7052
7053 PR c/6940
7054 * c.opt (Wsizeof-array-argument): New option.
7055
00a7ba58
JJ
70562014-07-03 Jakub Jelinek <jakub@redhat.com>
7057
b1726d6c 7058 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
7059 comments->count <= 1, as comments->entries might be NULL.
7060
52ec0ea3
MP
70612014-07-01 Marek Polacek <polacek@redhat.com>
7062
7063 * c.opt (Wint-conversion): New option.
7064
d5c3d343
MP
70652014-07-01 Marek Polacek <polacek@redhat.com>
7066
7067 PR c/58286
7068 * c.opt (Wincompatible-pointer-types): New option.
7069
6e7ceb17
PC
70702014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
7071
7072 PR c++/51400
7073 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
7074 Do not discard TYPE_QUALS of type.
7075
da73100b
JM
70762014-06-26 Jason Merrill <jason@redhat.com>
7077
7078 * c-common.h (enum cxx_dialect): Add cxx1z.
7079 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
7080 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
7081
08eedf75
TJ
70822014-06-26 Teresa Johnson <tejohnson@google.com>
7083
7084 * c-common.h (get_dump_info): Declare.
7085 * c-gimplify.c (c_genericize): Use saved dump files.
7086 * c-opts.c (c_common_parse_file): Begin and end dumps
7087 once around parsing invocation.
7088 (get_dump_info): New function.
7089
7b56b2f8
MP
70902014-06-23 Marek Polacek <polacek@redhat.com>
7091 Andrew MacLeod <amacleod@redhat.com>
7092
7093 PR c/61553
7094 * c-common.c (get_atomic_generic_size): Don't segfault if the
7095 type doesn't have a size.
7096
0e37a2f3
MP
70972014-06-20 Marek Polacek <polacek@redhat.com>
7098
7099 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
7100 (ubsan_walk_array_refs_r): New function.
7101 (c_genericize): Instrument array bounds.
7102 * c-ubsan.c: Include "internal-fn.h".
7103 (ubsan_instrument_division): Mark instrumented arrays as having
7104 side effects. Adjust ubsan_type_descriptor call.
7105 (ubsan_instrument_shift): Likewise.
7106 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
7107 (ubsan_instrument_bounds): New function.
7108 (ubsan_array_ref_instrumented_p): New function.
7109 (ubsan_maybe_instrument_array_ref): New function.
7110 * c-ubsan.h (ubsan_instrument_bounds): Declare.
7111 (ubsan_array_ref_instrumented_p): Declare.
7112 (ubsan_maybe_instrument_array_ref): Declare.
7113
71142014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
7115
7116 PR lto/61123
7117 * c.opt (fshort-enums): Add to LTO.
7118 * c.opt (fshort-wchar): Likewise.
7119
5c3d09f7
MP
71202014-06-16 Marek Polacek <polacek@redhat.com>
7121
7122 PR c/60439
7123 * c.opt (Wswitch-bool): Add Var.
7124
9cf32741
JJ
71252014-06-12 Jakub Jelinek <jakub@redhat.com>
7126
7127 PR middle-end/61486
7128 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
7129 #pragma omp target teams or
7130 #pragma omp {,target }teams distribute simd.
7131
62984918
JM
71322014-06-12 Jason Merrill <jason@redhat.com>
7133
7134 * c.opt (Wabi=, fabi-compat-version): New.
7135 * c-opts.c (c_common_handle_option): Handle -Wabi=.
7136 (c_common_post_options): Handle flag_abi_compat_version default.
7137 Disallow -fabi-compat-version=1.
7138 * c-common.h (abi_version_crosses): New.
7139
f961457f
JH
71402014-06-11 Jan Hubicka <hubicka@ucw.cz>
7141
adfac8df 7142 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
7143 section names that are no longer trees.
7144
92d28cbb
JJ
71452014-06-10 Jakub Jelinek <jakub@redhat.com>
7146
7147 PR fortran/60928
7148 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
7149 (omp_pragmas): ... back here.
7150
742938c9
MP
71512014-06-05 Marek Polacek <polacek@redhat.com>
7152
7153 PR c/49706
7154 * c-common.c (warn_logical_not_parentheses): New function.
7155 * c-common.h (warn_logical_not_parentheses): Declare.
7156 * c.opt (Wlogical-not-parentheses): New option.
7157
9d548dfb
MP
71582014-06-04 Marek Polacek <polacek@redhat.com>
7159
7160 PR c/30020
7161 * c-common.c (check_case_bounds): Add location parameter.
7162 Use it.
7163 (c_add_case_label): Pass loc to check_case_bounds.
7164
fedfecef
MP
71652014-06-03 Marek Polacek <polacek@redhat.com>
7166
7167 PR c/60439
7168 * c.opt (Wswitch-bool): New option.
7169
f6a7cffc
TS
71702014-05-22 Thomas Schwinge <thomas@codesourcery.com>
7171
040d18b6
TS
7172 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
7173 Remove prototypes.
7174 (record_types_used_by_current_var_decl): Move prototype to where
7175 it belongs.
7176
f6a7cffc
TS
7177 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
7178 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
7179 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
7180
632f2871
RS
71812014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
7182
7183 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
7184 * c-common.c (c_common_nodes_and_builtins): Don't initialize
7185 void_zero_node.
7186 * c-pretty-print.c (pp_c_void_constant): New function.
7187 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
7188 (c_pretty_printer::expression): Handle VOID_CST.
7189 * cilk.c (extract_free_variables): Likewise.
7190 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
7191 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
7192
766090c2
TS
71932014-05-17 Trevor Saunders <tsaunders@mozilla.com>
7194
7195 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
7196 * c-pragma.c (push_alignment): Adjust.
7197 (handle_pragma_push_options): Likewise.
7198
661a0813
MP
71992014-05-09 Marek Polacek <polacek@redhat.com>
7200
7201 PR c/50459
7202 * c-common.c (check_user_alignment): Return -1 if alignment is error
7203 node.
7204 (handle_aligned_attribute): Don't call default_conversion on
7205 FUNCTION_DECLs.
7206 (handle_vector_size_attribute): Likewise.
7207 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
7208 (handle_sentinel_attribute): Call default_conversion and allow even
7209 integral types as an argument.
7210
2793eeab
MP
72112014-05-08 Marek Polacek <polacek@redhat.com>
7212
7213 PR c/61053
7214 * c-common.c (min_align_of_type): New function factored out from...
7215 (c_sizeof_or_alignof_type): ...here.
7216 * c-common.h (min_align_of_type): Declare.
7217
f827930a
MP
72182014-05-08 Marek Polacek <polacek@redhat.com>
7219
7220 PR c/61077
7221 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
7222 parameter type of main.
7223
ca49b74e
DD
72242014-05-07 DJ Delorie <dj@redhat.com>
7225
7226 * c-cppbuiltin.c (print_bits_of_hex): New.
7227 (builtin_define_type_minmax): Print values using hex so as not to
7228 require a pre-computed list of string values.
7229
1d60af08
KZ
72302014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
7231 Mike Stump <mikestump@comcast.net>
7232 Richard Sandiford <rdsandiford@googlemail.com>
7233
7234 * c-ada-spec.c: Include wide-int.h.
7235 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
7236 (dump_generic_ada_node): Use wide-int interfaces.
7237 * c-common.c: Include wide-int-print.h.
7238 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
7239 (pointer_int_sum): Use wide-int interfaces.
7240 (c_common_nodes_and_builtins): Use make_int_cst.
7241 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
7242 (handle_alloc_size_attribute): Use wide-int interfaces.
7243 (get_nonnull_operand): Likewise.
7244 * c-format.c (get_constant): Use tree_fits_uhwi_p.
7245 * c-lex.c: Include wide-int.h.
7246 (narrowest_unsigned_type): Take a widest_int rather than two
7247 HOST_WIDE_INTs.
7248 (narrowest_signed_type): Likewise.
7249 (interpret_integer): Update accordingly. Use wide-int interfaces.
7250 (lex_charconst): Use wide-int interfaces.
7251 * c-pretty-print.c: Include wide-int.h.
7252 (pp_c_integer_constant): Use wide-int interfaces.
7253 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
7254 INT_CST_LT_UNSIGNED.
7255
b15458be
RB
72562014-05-06 Richard Biener <rguenther@suse.de>
7257
7258 * c-opts.c (c_common_post_options): For -freestanding,
7259 -fno-hosted and -fno-builtin disable pattern recognition
7260 if not enabled explicitely.
7261
6577374e
MP
72622014-05-02 Marek Polacek <polacek@redhat.com>
7263
7264 * c.opt (Wsizeof-pointer-memaccess): Describe option.
7265
d00887e8
MP
72662014-05-01 Marek Polacek <polacek@redhat.com>
7267
7268 PR c/43245
7269 * c.opt (Wdiscarded-qualifiers): Add.
7270
f8ed5150
MP
72712014-04-30 Marek Polacek <polacek@redhat.com>
7272
7273 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
7274 INT_MIN / -1 sanitization only for integer types.
7275
45484dcf
MP
72762014-04-25 Marek Polacek <polacek@redhat.com>
7277
7278 PR c/18079
7279 * c-common.c (handle_noinline_attribute): Warn if the attribute
7280 conflicts with always_inline attribute.
7281 (handle_always_inline_attribute): Warn if the attribute conflicts
7282 with noinline attribute.
7283
38e514c0
MP
72842014-04-25 Marek Polacek <polacek@redhat.com>
7285
7286 PR c/60156
7287 * c-common.c (check_main_parameter_types): Warn about variadic main.
7288
44875f92
MS
72892014-04-24 Mike Stump <mikestump@comcast.net>
7290
7291 * c.opt (Wshadow-ivar): Default to on.
7292
dcaaa5a0
DP
72932014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
7294
7295 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
7296
c07d7c02
MP
72972014-04-23 Marek Polacek <polacek@redhat.com>
7298
7299 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
7300
1c33c9b7
JJ
73012014-04-22 Jakub Jelinek <jakub@redhat.com>
7302
7303 PR sanitizer/60275
7304 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
7305 if flag_sanitize_undefined_trap_on_error.
7306 (ubsan_instrument_division, ubsan_instrument_shift,
7307 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
7308 if !flag_sanitize_recover.
7309
793c625f
MG
73102014-04-22 Marc Glisse <marc.glisse@inria.fr>
7311
7312 PR libstdc++/43622
7313 * c-common.c (registered_builtin_types): Make non-static.
7314 * c-common.h (registered_builtin_types): Declare.
7315
b0f1bf36 73162014-04-14 Richard Biener <rguenther@suse.de>
ab20d992 7317 Marc Glisse <marc.glisse@inria.fr>
b0f1bf36
RB
7318
7319 PR c/60819
7320 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
7321 apply may-alias the scalar pointer type when applicable.
7322
3b07fa4a
IZ
73232014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
7324
7325 PR middle-end/60467
7326 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
7327 as possible argument for Cilk_spawn.
7328
cbbd2b1c
TB
73292014-04-11 Tobias Burnus <burnus@net-b.de>
7330
7331 PR c/60194
7332 * c.opt (Wformat-signedness): Add
7333 * c-format.c(check_format_types): Use it.
7334
6415bd5d
JM
73352014-04-11 Jason Merrill <jason@redhat.com>
7336
7337 PR c++/57926
7338 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
7339 default_conversion for an array argument.
7340
6525783a
MP
73412014-04-08 Marek Polacek <polacek@redhat.com>
7342
7343 PR sanitizer/60745
7344 * c-ubsan.c: Include asan.h.
7345 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
7346
880a467b
NS
73472014-04-03 Nathan Sidwell <nathan@codesourcery.com>
7348
7349 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
7350
7b59ff2d
MP
73512014-04-02 Marek Polacek <polacek@redhat.com>
7352
7353 * c-common.h (c_expand_expr): Remove declaration.
7354
8edbfaa6
JJ
73552014-03-28 Jakub Jelinek <jakub@redhat.com>
7356
7357 PR c++/60689
7358 * c-common.c (add_atomic_size_parameter): When creating new
7359 params vector, push the size argument first.
7360
07d72e1d
JJ
73612014-03-26 Jakub Jelinek <jakub@redhat.com>
7362
7363 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
7364 ubsan_instrument_vla, ubsan_instrument_return): Adjust
7365 ubsan_create_data callers.
7366
b35e0fa0
JJ
73672014-03-22 Jakub Jelinek <jakub@redhat.com>
7368
7369 PR debug/60603
7370 * c-opts.c (c_finish_options): Restore cb_file_change call to
7371 <built-in>.
7372
39a1ebb3
JJ
73732014-03-13 Jakub Jelinek <jakub@redhat.com>
7374
7375 PR middle-end/36282
7376 * c-pragma.c (apply_pragma_weak): Only look at
7377 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
7378 DECL_ASSEMBLER_NAME_SET_P (decl).
7379 (maybe_apply_pending_pragma_weaks): Exit early if
7380 vec_safe_is_empty (pending_weaks) rather than only when
7381 !pending_weaks.
7382 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
7383 set assembler name back to NULL afterwards.
7384
a07f6ed2
JM
73852014-03-11 Jason Merrill <jason@redhat.com>
7386
7387 * c.opt: Add -std=gnu++14.
7388
75b107f5
IB
73892014-03-11 Ian Bolton <ian.bolton@arm.com>
7390
7391 * c-opts.c (c_common_post_options): Don't override
7392 -ffp-contract=fast if unsafe-math-optimizations is on.
7393
f42c637e
PM
73942014-03-08 Paulo Matos <paulo@matos-sorge.com>
7395
22b15758 7396 * c.opt: Enable LTO FE for fshort-double.
f42c637e 7397
70e24808
JM
73982014-03-07 Jason Merrill <jason@redhat.com>
7399
7400 * c.opt: Add -std=c++14.
7401
3af9c5e9
MP
74022014-03-06 Marek Polacek <polacek@redhat.com>
7403
7404 PR c/60197
7405 * cilk.c (contains_cilk_spawn_stmt): New function.
7406 (contains_cilk_spawn_stmt_walker): Likewise.
7407 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
7408 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
7409
b3bdf019
JJ
74102014-03-03 Jakub Jelinek <jakub@redhat.com>
7411
7412 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
7413 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
7414 even when flag_preprocess_only.
7415
ca7e759d
JM
74162014-02-26 Jason Merrill <jason@redhat.com>
7417
7418 PR c++/59231
7419 PR c++/11586
7420 * c-common.c (shorten_compare): Don't check
7421 c_inhibit_evaluation_warnings.
7422
28e41874
JJ
74232014-02-19 Jakub Jelinek <jakub@redhat.com>
7424
cca615af
JJ
7425 PR c/37743
7426 * c-common.c (c_common_nodes_and_builtins): When initializing
7427 c_uint{16,32,64}_type_node, also set corresponding
7428 uint{16,32,64}_type_node to the same value.
7429
28e41874
JJ
7430 PR c++/60267
7431 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
7432 for PRAGMA_IVDEP if flag_preprocess_only.
7433
c2bf53a1
JJ
74342014-02-12 Jakub Jelinek <jakub@redhat.com>
7435
7436 PR c/60101
7437 * c-common.c (merge_tlist): If copy is true, call new_tlist,
7438 if false, add ADD itself, rather than vice versa.
7439 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
7440 copy. For SAVE_EXPR, only call merge_tlist once.
7441
8fcbce72
JJ
74422014-02-08 Jakub Jelinek <jakub@redhat.com>
7443
7444 PR middle-end/60092
7445 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
7446 and tree_to_uhwi.
7447 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
7448 functions.
7449 (c_common_attribute_table): Add alloc_align and assume_aligned
7450 attributes.
7451
0a756a3f
MP
74522014-02-06 Marek Polacek <polacek@redhat.com>
7453
7454 PR c/60087
7455 * c-common.c (warn_for_sign_compare): Call warning_at with location
7456 instead of warning.
7457
7ec4847a
MP
74582014-02-05 Marek Polacek <polacek@redhat.com>
7459
7460 PR c/53123
7461 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
7462 statement.
7463
66f20604
MP
74642014-02-04 Marek Polacek <polacek@redhat.com>
7465
7466 PR c/60036
7467 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
7468 SAVE_EXPR.
7469
5d77fb19
MG
74702014-02-03 Marc Glisse <marc.glisse@inria.fr>
7471
7472 PR c++/53017
7473 PR c++/59211
7474 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
7475 handle_vector_size_attribute, handle_nonnull_attribute): Call
7476 default_conversion on the attribute argument.
7477 (handle_nonnull_attribute): Increment the argument number.
7478
81e5eca8
MP
74792014-01-31 Marek Polacek <polacek@redhat.com>
7480
7481 PR c/59963
7482 * c-common.c (add_atomic_size_parameter): Pass vNULL to
7483 build_function_call_vec.
7484 (resolve_overloaded_builtin): Likewise.
7485 * c-common.h (build_function_call_vec): Adjust declaration.
7486
68fca595
MP
74872014-01-30 Marek Polacek <polacek@redhat.com>
7488
7489 PR c/59940
7490 * c-common.h (unsafe_conversion_p): Adjust declaration.
7491 (warnings_for_convert_and_check): Likewise.
7492 (convert_and_check): Likewise.
7493 * c-common.c (unsafe_conversion_p): Add location parameter. Call
7494 expansion_point_location_if_in_system_header on it.
7495 (warnings_for_convert_and_check): Add location parameter. Call
7496 expansion_point_location_if_in_system_header on it. Use it.
7497 (convert_and_check): Add location parameter. Use it.
7498 (conversion_warning): Likewise.
7499 (c_add_case_label): Adjust convert_and_check calls.
7500 (scalar_to_vector): Adjust unsafe_conversion_p calls.
7501
b72271b9
BI
75022014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
7503
7504 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
7505 flag_cilkplus.
7506 * c-pragma.c (init_pragma): Likewise.
7507 * c.opt: Likewise.
7508
393e8e8b
MP
75092014-01-23 Marek Polacek <polacek@redhat.com>
7510
7511 PR c/59846
7512 * c-common.c (shorten_compare): Add location_t parameter.
7513 * c-common.h (shorten_binary_op): Adjust declaration.
7514
f04dda30
MP
75152014-01-23 Marek Polacek <polacek@redhat.com>
7516
7517 PR c/58346
7518 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
7519 * c-common.h: Declare it.
7520
621955cb
EB
75212014-01-20 Eric Botcazou <ebotcazou@adacore.com>
7522
7523 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
7524 * c-ada-spec.c (dump_ads): Likewise.
7525 (cpp_check): Likewise.
7526 (dump_ada_specs): Likewise.
7527
75282014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
7529
7530 PR c++/49718
7531 * c-common.c (handle_no_instrument_function_attribute): Allow
7532 no_instrument_function attribute in class member
7533 definition/declaration.
7534
241f845a
JJ
75352014-01-15 Jakub Jelinek <jakub@redhat.com>
7536
7537 PR c/58943
7538 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
7539 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
7540 being COMPOUND_EXPR.
7541 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
7542 operand a SAVE_EXPR and second MODIFY_EXPR.
7543
e83b8e2e
JJ
75442014-01-09 Jakub Jelinek <jakub@redhat.com>
7545
7546 PR target/58115
7547 * c-pch.c (c_common_write_pch): Call
7548 prepare_target_option_nodes_for_pch.
7549
23a5b65a
RS
75502014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7551
7552 Update copyright years
7553
f9030485
RS
75542014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7555
7556 * array-notation-common.c, c-cilkplus.c: Use the standard form for
7557 the copyright notice.
7558
f2aa696b
EB
75592013-12-28 Eric Botcazou <ebotcazou@adacore.com>
7560
7561 * c-ada-spec.c (print_constructor): New function.
7562 (print_destructor): Retrieve the origin of the destructor.
7563 (print_ada_declaration): Revamp handling of constructors/destructors.
7564
3f8257db 75652013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
7566 Bill Maddox <maddox@google.com>
7567 Jason Merrill <jason@redhat.com>
7568
7569 * c.opt: Add -fdeclone-ctor-dtor.
7570 * c-opts.c (c_common_post_options): Default to on iff -Os.
7571
41958c28
BI
75722013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
7573
7574 * c-common.c (c_common_attribute_table): Added "cilk simd function"
7575 attribute.
7576 * c-pragma.h (enum pragma_cilk_clause): Remove.
ab20d992 7577 (enum pragma_omp_clause): Added the following fields:
41958c28
BI
7578 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
7579 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
7580 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
7581 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
7582 PRAGMA_CILK_CLAUSE_UNIFORM.
7583
b1726d6c 7584
12893402
BI
75852013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
7586
7587 * cilk.c (cilk_outline): Made this function non-static.
7588 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
7589 (create_cilk_wrapper): Added a new parameter: a function pointer.
7590 (c_install_body_w_frame_cleanup): Remove
7591 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
7592 * c-common.h (cilk_outline): New prototype.
7593 (gimplify_cilk_spawn): Removed two parameters.
7594 (cilk_install_body_with_frame_cleanup): New prototype.
7595 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
7596 CILK_SPAWN_STMT case.
7597
085b42ed
BS
75982013-12-11 Bernd Schmidt <bernds@codesourcery.com>
7599
2ce064c3
BS
7600 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
7601
085b42ed
BS
7602 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
7603 (int_array_type_node): Remove.
7604 * c-common.c (c_common_nodes_and_builtins): Don't build it.
7605
9e36c9ed
MP
76062013-12-05 Marek Polacek <polacek@redhat.com>
7607
7608 PR c/52023
7609 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
7610 [ADJUST_FIELD_ALIGN].
7611
296674db
JM
76122013-12-04 Joseph Myers <joseph@codesourcery.com>
7613
7614 PR c/52023
7615 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
7616 and check field alignment if set.
7617 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
7618 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
7619
b1726d6c 76202013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
7621 Marek Polacek <polacek@redhat.com>
7622
7623 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
7624 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
7625
d7947e19
L
76262013-11-29 H.J. Lu <hongjiu.lu@intel.com>
7627
7628 PR c/59309
7629 * cilk.c (gimplify_cilk_spawn): Properly handle function without
7630 arguments.
7631
fad7652e
JJ
76322013-11-29 Jakub Jelinek <jakub@redhat.com>
7633
7634 PR c/59280
7635 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
7636 goto invalid. If it is error_mark_node, don't issue further
7637 diagnostics.
7638
8b5e1202
SO
76392013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
7640
7641 * c.opt (Wopenmp-simd): New.
7642
0a508bb6
JJ
76432013-11-22 Jakub Jelinek <jakub@redhat.com>
7644
7645 * c-ubsan.h (ubsan_instrument_return): New prototype.
7646 * c-ubsan.c (ubsan_instrument_return): New function.
7647
2fb9a547
AM
76482013-11-22 Andrew MacLeod <amacleod@redhat.com>
7649
7650 * c-common.c: Add required include files from gimple.h.
ab20d992
JJ
7651 * c-gimplify.c: Likewise.
7652 * cilk.c: Likewise.
2fb9a547 7653
8400e75e
DM
76542013-11-22 David Malcolm <dmalcolm@redhat.com>
7655
7656 * c-common.c (unsafe_conversion_p): Remove use of
7657 EXPR_LOC_OR_HERE macro.
7658 (conversion_warning): Likewise.
7659 (warnings_for_convert_and_check): Likewise.
7660 (warn_for_collisions_1): Likewise.
7661 (shorten_compare): Likewise, and remove use of in_system_header
7662 macro, using the location from the former.
7663 * c-lex.c (dump_one_header): Remove use of input_filename macro.
7664 (cb_def_pragma): Remove use of in_system_header macro.
7665 (lex_string): Likewise.
7666 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
7667
eb1ce453
KZ
76682013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
7669 Mike Stump <mikestump@comcast.net>
7670 Richard Sandiford <rdsandiford@googlemail.com>
7671
7672 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
7673 instead of TREE_INT_CST_LOW, in cases where there is a protecting
7674 tree_fits_shwi_p or tree_fits_uhwi_p.
7675 (dump_generic_ada_node): Likewise.
7676 * c-format.c (check_format_arg): Likewise.
7677 * c-pretty-print.c (pp_c_integer_constant): Likewise.
7678
6b3b8c27
KZ
76792013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
7680
7681 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
7682
49b0aa18
JC
76832013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
7684
7685 PR c/53001
7686 * c-common.c (unsafe_conversion_p): Make this function
7687 return an enumeration with more detail.
7688 (conversion_warning): Use the new return type of
7689 unsafe_conversion_p to separately warn either about conversions
7690 that lower floating point number precision or about the other
7691 kinds of conversions.
7692 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
7693 (unsafe_conversion_p): switching return type to
7694 conversion_safety enumeration.
49b0aa18
JC
7695 * c.opt: Adding new warning -Wfloat-conversion and
7696 enabling it with -Wconversion.
7697
b826515a
BS
76982013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
7699
8e745a17
JJ
7700 * c-opts.c: Include plugin.h.
7701 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 7702
b9a55b13
MP
77032013-11-19 Marek Polacek <polacek@redhat.com>
7704
7705 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
7706 call.
7707 (ubsan_instrument_shift): Likewise.
7708 (ubsan_instrument_vla): Likewise.
7709
7d362f6c
RS
77102013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7711
7712 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
7713 cast to unsigned type.
7714
386b1f1f
RS
77152013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7716
7717 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
7718 tree_low_cst.
7719 (complete_array_type): Update comment to refer to tree_to_[su]hwi
7720 rather than tree_low_cst.
7721
ae7e9ddd
RS
77222013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7723
7724 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
7725 tree_to_uhwi throughout.
7726
9439e9a1
RS
77272013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7728
7729 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
7730 tree_low_cst (..., 0) with tree_to_shwi throughout.
7731
cc269bb6
RS
77322013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7733
7734 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
7735 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
7736
9541ffee
RS
77372013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7738
7739 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
7740 host_integerp (..., 0) with tree_fits_shwi_p throughout.
7741
c02065fc
AH
77422013-11-15 Aldy Hernandez <aldyh@redhat.com>
7743
7744 * c-cilkplus.c: New file.
7745 * c-common.c (readonly_error): Add location argument.
7746 * c-common.h (readonly_error): Same.
7747 (c_finish_cilk_clauses): Protoize.
7748 (c_check_cilk_loop): Same.
7749 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
7750 Do not fail on error_mark_node.
7751 Abstract increment canonicalization to here...
7752 (c_omp_for_incr_canonicalize_ptr): New.
7753 c-pragma.c (init_pragma): Register "simd" pragma.
7754 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
7755 (enum pragma_cilk_clause): New.
7756
9cc65f15
RS
77572013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
7758
7759 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
7760 wchar_type and host_integerp checks.
7761
18f429e2
AM
77622013-11-14 Andrew MacLeod <amacleod@redhat.com>
7763
7764 * c-common.c: Likewise.
7765 * c-gimplify.c: Likewise.
7766 * cilk.c: Likewise.
7767
d8a2d370
DN
77682013-11-14 Diego Novillo <dnovillo@google.com>
7769
7770 * c-common.c: Include fold-const.h.
7771 Include stor-layout.h.
7772 Include calls.h.
7773 Include stringpool.h.
7774 Include attribs.h.
7775 Include varasm.h.
7776 Include trans-mem.h.
7777 * c-cppbuiltin.c: Include stor-layout.h.
7778 Include stringpool.h.
7779 * c-format.c: Include stringpool.h.
7780 * c-lex.c: Include stringpool.h.
7781 Include stor-layout.h.
7782 * c-pragma.c: Include stringpool.h.
7783 Include attribs.h.
7784 Include varasm.h.
7785 Include gcc-symtab.h.
7786 * c-pretty-print.c: Include stor-layout.h.
7787 Include attribs.h.
7788 * cilk.c: Include stringpool.h.
7789 Include calls.h.
7790
38b7bc7f
JM
77912013-11-13 Joseph Myers <joseph@codesourcery.com>
7792
7793 * c-common.h (enum rid): Add RID_AUTO_TYPE.
7794 * c-common.c (c_common_reswords): Add __auto_type.
7795 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
7796
45b0be94
AM
77972013-11-12 Andrew MacLeod <amacleod@redhat.com>
7798
18f429e2
AM
7799 * c-common.c: Include gimplify.h.
7800 * c-gimplify.c: Likewise.
7801 * cilk.c: Likewise.
7802 * c-omp.c: Include gimple-expr.h instead of gimple.h.
7803 * c-ubsan.c: Don't include gimple.h.
45b0be94 7804
582d9b50
JM
78052013-11-12 Joseph Myers <joseph@codesourcery.com>
7806
7807 * c-common.c (c_common_reswords): Add _Thread_local.
7808
6b28e197
JM
78092013-11-09 Joseph Myers <joseph@codesourcery.com>
7810
7811 * c-common.c (atomic_size_supported_p): New function.
7812 (resolve_overloaded_atomic_exchange)
7813 (resolve_overloaded_atomic_compare_exchange)
7814 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
7815 Use it instead of comparing size with a local list of sizes.
7816
267bac10
JM
78172013-11-07 Andrew MacLeod <amacleod@redhat.com>
7818 Joseph Myers <joseph@codesourcery.com>
7819
7820 * c-common.h (enum rid): Add RID_ATOMIC.
7821 * c-common.c (c_common_reswords): Add _Atomic.
7822 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
7823 (keyword_is_type_qualifier): Accept RID_ATOMIC.
7824 * c-format.c (check_format_types): Check for extra _Atomic
7825 qualifiers in format argument.
7826 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
7827 (pp_c_type_qualifier_list): Mention _Atomic in comment.
7828
5157b91e
TB
78292013-11-06 Tobias Burnus <burnus@net-b.de>
7830
7831 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
7832
6dbe0958
JM
78332013-11-06 Joseph Myers <joseph@codesourcery.com>
7834
7835 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
7836 standards modes.
7837 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
7838 to mean lack of IEEE 754 support.
7839
e8ff5196
TB
78402013-11-05 Tobias Burnus <burnus@net-b.de>
7841
7842 * c.opt (-Wdate-time): New option
7843 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
7844
254a0760
JM
78452013-11-05 Joseph Myers <joseph@codesourcery.com>
7846
7847 * c-cppbuiltin.c (cpp_iec_559_value): Test
7848 flag_excess_precision_cmdline not flag_excess_precision.
7849
6d7f7e0a
TB
78502013-11-05 Tobias Burnus <burnus@net-b.de>
7851
7852 * c.opt (fopenmp-simd): New option.
7853 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
7854 (omp_pragmas): ... this new struct.
7855 (c_pp_lookup_pragma): Also walk omp_pragmas.
7856 (init_pragma): Init pragmas for -fopenmp-simd.
7857
55a7f02f
MP
78582013-11-04 Marek Polacek <polacek@redhat.com>
7859
7860 PR c++/58979
7861 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
7862
9193fb05
JM
78632013-11-04 Joseph Myers <joseph@codesourcery.com>
7864
7865 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
7866 New functions.
7867 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
7868
94159ecf
EB
78692013-11-04 Eric Botcazou <ebotcazou@adacore.com>
7870
7871 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
7872 (dump_ada_specs): Adjust prototype of second callback.
7873 * c-ada-spec.c (cpp_check): New global variable.
7874 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
7875 (print_generic_ada_decl): Likewise.
7876 (has_static_fields): Change return type to bool and add guard.
7877 (has_nontrivial_methods): New predicate.
7878 (is_tagged_type): Change return type to bool.
7879 (separate_class_package): Call has_nontrivial_methods.
7880 (pp_ada_tree_identifier): Minor tweaks.
7881 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
7882 (dump_ada_array_domains): Likewise.
7883 (dump_ada_array_type): Likewise.
7884 (dump_template_types): Remove cpp_check parameter and do not pass it to
7885 dump_generic_ada_node.
7886 (dump_ada_template): Likewise.
7887 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
7888 recursively.
7889 (print_ada_methods): Change return type to integer. Remove cpp_check
7890 parameter and do not pass it down.
7891 (dump_nested_types): Remove cpp_check parameter and do not pass it to
7892 dump_generic_ada_node.
7893 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
7894 accessing methods.
7895 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
7896 down. Use has_nontrivial_methods to recognize C++ classes. Use return
7897 value of print_ada_methods.
7898 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
7899 Set cpp_check to it before invoking dump_ada_nodes.
7900 (dump_ada_specs): Likewise.
7901
b906f4ca
MP
79022013-11-03 Marek Polacek <polacek@redhat.com>
7903
7904 * c-ubsan.c: Don't include hash-table.h.
7905 (ubsan_instrument_vla): New function.
7906 * c-ubsan.h: Declare it.
7907
5e20cdc9
DM
79082013-10-31 David Malcolm <dmalcolm@redhat.com>
7909
7910 Automated part of renaming of symtab_node_base to symtab_node.
7911
7912 Patch autogenerated by rename_symtab.py from
7913 https://github.com/davidmalcolm/gcc-refactoring-scripts
7914 revision 58bb219cc090b2f4516a9297d868c245495ee622
7915
7916 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
7917 symtab_node_base to symtab_node.
7918
7057e645
ESR
79192013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
7920
8e745a17 7921 Implement C++14 digit separators.
7057e645
ESR
7922 * c-lex.c (interpret_float): Remove digit separators from scratch string
7923 before building real literal.
7924
193ea7bc
JJ
79252013-10-30 Jakub Jelinek <jakub@redhat.com>
7926
7927 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
7928
939b37da
BI
79292013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7930
7931 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
7932 fields.
7933 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
7934 enabled.
7935 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
7936 (insert_cilk_frame): New prototype.
7937 (cilk_init_builtins): Likewise.
7938 (gimplify_cilk_spawn): Likewise.
7939 (c_cilk_install_body_w_frame_cleanup): Likewise.
7940 (cilk_detect_spawn_and_unwrap): Likewise.
7941 (cilk_set_spawn_marker): Likewise.
7942 (build_cilk_sync): Likewise.
7943 (build_cilk_spawn): Likewise.
7944 * cilk.c: New file.
7945
67348ccc
DM
79462013-10-29 David Malcolm <dmalcolm@redhat.com>
7947
7948 Patch autogenerated by refactor_symtab.py from
7949 https://github.com/davidmalcolm/gcc-refactoring-scripts
7950 revision 58bb219cc090b2f4516a9297d868c245495ee622
7951
7952 * c-gimplify.c (c_genericize): Update for conversion of symtab types
7953 to a true class hierarchy.
7954 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
7955
d570872d
RS
79562013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
7957
7958 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
7959
98906124
JL
79602013-10-26 Jeff Law <law@redhat.com>
7961
adfac8df
JJ
7962 * c-common.c (c_define_builtins): Remove mudflap support.
7963 * c.opt: Ignore and warn for mudflap options.
98906124 7964
d73749df 79652013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
7966
7967 PR other/33426
7968 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
7969 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
7970
3f04b1bb
JM
79712013-10-23 Jason Merrill <jason@redhat.com>
7972
7973 * c-format.c (gcc_cxxdiag_char_table): Add %X.
7974
acf0174b
JJ
79752013-10-11 Jakub Jelinek <jakub@redhat.com>
7976
acd15a28
JJ
7977 * c-common.h (omp_clause_mask::operator !=): New method.
7978 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
7979 instead of if (mask & something) tests everywhere.
7980
acf0174b
JJ
7981 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
7982 201307 instead of 201107.
7983 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
7984 (c_common_attribute_table): Add "omp declare target" and
7985 "omp declare simd" attributes.
7986 (handle_omp_declare_target_attribute,
7987 handle_omp_declare_simd_attribute): New functions.
7988 * c-omp.c: Include c-pragma.h.
7989 (c_finish_omp_taskgroup): New function.
7990 (c_finish_omp_atomic): Add swapped argument, if true,
7991 build the operation first with rhs, lhs arguments and use NOP_EXPR
7992 build_modify_expr.
7993 (c_finish_omp_for): Add code argument, pass it down to make_code.
7994 (c_omp_split_clauses): New function.
7995 (c_split_parallel_clauses): Removed.
7996 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
7997 c_omp_declare_simd_clauses_to_decls): New functions.
7998 * c-common.h (omp_clause_mask): New type.
7999 (OMP_CLAUSE_MASK_1): Define.
8000 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
8001 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
8002 omp_clause_mask::operator |, omp_clause_mask::operator &,
8003 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
8004 omp_clause_mask::operator ==): New methods.
8005 (enum c_omp_clause_split): New.
8006 (c_finish_omp_taskgroup): New prototype.
8007 (c_finish_omp_atomic): Add swapped argument.
8008 (c_finish_omp_for): Add code argument.
8009 (c_omp_split_clauses): New prototype.
8010 (c_split_parallel_clauses): Removed.
8011 (c_omp_declare_simd_clauses_to_numbers,
8012 c_omp_declare_simd_clauses_to_decls): New prototypes.
8013 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
8014 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
8015 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
8016 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
8017 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
8018 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
8019 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
8020 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
8021 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
8022 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
8023 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
8024 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
8025 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
8026 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
8027 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
8028 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
8029 PRAGMA_OMP_CLAUSE_UNIFORM.
8030
826cacfe
MG
80312013-10-09 Marc Glisse <marc.glisse@inria.fr>
8032
8033 PR tree-optimization/20318
8034 * c-common.c (handle_returns_nonnull_attribute): New function.
8035 (c_common_attribute_table): Add returns_nonnull.
8036
2284b034
MG
80372013-10-03 Marc Glisse <marc.glisse@inria.fr>
8038
8039 PR c++/19476
8040 * c.opt (fcheck-new): Move to common.opt.
8041
b56e9788
MP
80422013-09-25 Marek Polacek <polacek@redhat.com>
8043 Jakub Jelinek <jakub@redhat.com>
8044
8045 PR sanitizer/58413
8046 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
8047 an expression if we can prove it is correct.
8048 (ubsan_instrument_division): Likewise. Remove unnecessary
8049 check.
8050
ce6923c5
MP
80512013-09-18 Marek Polacek <polacek@redhat.com>
8052
8053 PR sanitizer/58411
8054 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
8055 Declare it.
8056 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
8057
fb5610fb
IS
80582013-09-14 Iain Sandoe <iain@codesourcery.com>
8059
8060 PR target/48094
8061 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
8062 fobjc-gc, freplace-objc-classes): Accept for LTO.
8063
88b0e79e
JC
80642013-09-13 Jacek Caban <jacek@codeweavers.com>
8065
8066 * c-target.def: New hook
8067
c9b0866a
PC
80682013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
8069
8070 PR c++/43452
8071 * c.opt (Wdelete-incomplete): Add.
8072
0af94e6f
JR
80732013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
8074
8075 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
8076 (vector_types_compatible_elements_p): New function.
8077 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
8078 declaration.
8079 (vector_types_compatible_elements_p): Declare.
8080
7c26172c
GDR
80812013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8082
8083 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
8084 a virtual member function.
8085 (pp_simple_type_specifier): Remove.
8086 (pp_c_type_specifier): Likewise.
8087 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
8088 Rename from pp_c_type_specifier. Adjust.
8089 (c_pretty_printer::c_pretty_printer): Do not assign to
8090 simple_type_specifier.
8091
20059c8b
GDR
80922013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8093
8094 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
8095 member function.
8096 (c_pretty_printer::storage_class_specifier): Likewise.
8097 (c_pretty_printer::initializer): Likewise.
8098 (pp_declaration): Remove.
8099 (pp_declaration_specifiers): Likewise.
8100 (pp_abstract_declarator): Likewise.
8101 (pp_declarator): Likewise.
8102 (pp_type_id): Likewise.
8103 (pp_statement): Likewise.
8104 (pp_constant): Likewise.
8105 (pp_id_expression): Likewise.
8106 (pp_primary_expression): Likewise.
8107 (pp_unary_expression): Likewise.
8108 (pp_multiplicative_expression): Likewise.
8109 (pp_conditional_expression): Likewise.
8110 (pp_assignment_expression): Likewise.
8111 (pp_expression): Likewise.
8112 (pp_c_type_id): Likewise.
8113 (pp_c_storage_class_specifier): Likewise.
8114 * c-pretty-print.c (pp_c_type_cast): Tidy.
8115 (pp_c_pointer): Likewise.
8116 (pp_c_type_specifier): Likewise.
8117 (pp_c_parameter_type_list): Likewise.
8118 (pp_c_function_definition): Likewise.
8119 (pp_c_init_declarator): Likewise.
8120 (pp_c_initializer_list): Likewise.
8121 (pp_c_constructor_elts): Likewise.
8122 (c_pretty_printer::direct_abstract_declarator): Likewise.
8123 (c_pretty_printer::declaration_specifiers): Likewise.
8124 (c_pretty_printer::primary_expression): Likewise.
8125 (c_pretty_printer::postfix_expression): Likewise.
8126 (c_pretty_printer::type_id): Rename from pp_c_type_id.
8127 (c_pretty_printer::storage_class_specifier): Rename from
8128 pp_c_storage_class_specifier.
8129 (c_pretty_printer::initializer): Rename from pp_c_initializer.
8130 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
8131 storage_class_specifier, initializer, offset_list, flags.
8132
de5a5fa1
MP
81332013-08-30 Marek Polacek <polacek@redhat.com>
8134
8135 * c-ubsan.c: New file.
8136 * c-ubsan.h: New file.
8137
8f0e4d72
GDR
81382013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
8139
8140 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
8141 member function.
8142 (c_pretty_printer::declaration_specifiers): Likewise.
8143 (c_pretty_printer::declarator): Likewise.
8144 (c_pretty_printer::abstract_declarator): Likewise.
8145 (c_pretty_printer::direct_abstract_declarator): Likewise.
8146 (c_pretty_printer::direct_declarator): Likewise.
8147 (c_pretty_printer::function_specifier): Likewise.
8148 (pp_declaration): Adjust.
8149 (pp_declaration_specifiers): Likewise.
8150 (pp_abstract_declarator): Likewise.
8151 (pp_direct_declarator): Likewise.
8152 (pp_function_specifier): Likewise.
8153 (pp_direct_abstract_declarator): Remove as unused.
8154 (pp_c_declaration): Remove.
8155 (pp_c_declaration_specifiers): Likewise.
8156 (pp_c_declarator): Likewise.
8157 (pp_c_direct_declarator): Likewise.
8158 (pp_c_function_specifier): Likewise.
8159 (pp_c_direct_abstract_declarator): Likewise.
8160 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
8161 from pp_c_abstract_declarator. Adjust.
ab20d992 8162 (c_pretty_printer::direct_abstract_declarator): Rename from
8f0e4d72
GDR
8163 pp_c_direct_abstract_declarator. Adjust.
8164 (c_pretty_printer::function_specifier): Rename from
8165 pp_c_function_specifier. Adjust.
8166 (c_pretty_printer::declaration_specifiers): Rename from
8167 pp_c_declaration_specifiers. Adjust.
8168 (c_pretty_printer::direct_declarator): Rename from
8169 pp_c_direct_declarator. Adjust.
8170 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
8171 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
8172 (c_pretty_printer::c_pretty_printer): Do not assign to
8173 declaration, declaration_specifiers, declarator,
8174 direct_declarator, direct_abstract_declarator, function_specifier.
8175
00d34d3a
GDR
81762013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
8177
8178 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
8179 virtual member function.
8180 (c_pretty_printer::multiplicative_expression): Likewise.
8181 (c_pretty_printer::conditional_expression): Likewise.
8182 (c_pretty_printer::assignment_expression): Likewise.
8183 (c_pretty_printer::expression): Likewise.
8184 (pp_unary_expression): Adjust.
8185 (pp_multiplicative_expression): Likewise.
8186 (pp_assignment_expression): Likewise.
8187 (pp_conditional_expression): Likewise.
8188 (pp_expression): Likewise.
8189 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
8190 from pp_c_unary_expression. Adjust.
8191 (c_pretty_printer::multiplicative_expression): Rename from
8192 pp_c_multiplicative_expression. Adjust.
8193 (c_pretty_printer::conditional_expression): Rename from
8194 pp_c_conditional_expression. Adjust.
8195 (c_pretty_printer::assignment_expression): Rename from
8196 pp_c_assignment_expression. Adjust.
8197 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
8198 (c_pretty_printer::c_pretty_printer): Do not assign to
8199 unary_expression, multiplicative_expression,
8200 conditional_expression, expression.
8201
fb22178f
GDR
82022013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8203
8204 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
8205 virtual member function.
8206 (pp_postfix_expression): Adjust.
8207 (pp_c_postfix_expression): Remove.
8208 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
8209 from pp_c_postfix_expression. Adjust.
8210 (c_pretty_printer::c_pretty_printer): Do not assign to
8211 postfix_expression.
8212
7ecc2600
GDR
82132013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8214
8215 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
8216 virtua member function.
8217 (pp_primary_expression): Adjust.
8218 (pp_c_primary_expression): Remove.
8219 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
8220 from pp_c_primary_expression. Adjust.
8221 (pp_c_initializer_list): Use pp_primary_expression.
8222 (c_pretty_printer::c_pretty_printer): Do not assign to
8223 primary_expression.
8224
0691175f
GDR
82252013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8226
8227 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
8228 * c-pretty-print.c (M_): Remove.
8229 (c_pretty_printer::translate_string): Define.
8230 (pp_c_type_specifier): Use it.
8231 (pp_c_primary_expression): Likewise.
8232 (pp_c_expression): Likewise.
8233
66dfe4c4
GDR
82342013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
8235
8236 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
8237 virtual function.
8238 (pp_c_id_expression): Remove.
8239 (pp_id_expression): Adjust.
8240 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
8241 pp_c_id_expression. Adjust.
8242 (pp_c_postfix_expression): Use pp_id_expression.
8243 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
8244
ca43e9d5
GDR
82452013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
8246
8247 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
8248 member function.
8249 (pp_constant): Adjust.
8250 (pp_c_constant): Remove.
8251 * c-pretty-print.c (c_pretty_printer::constant): Rename from
8252 pp_c_constant. Adjust.
8253 (pp_c_constant)
8254 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
8255 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
8256
da6ca2b5
GDR
82572013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8258
8259 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
8260 (c_pretty_printer::c_pretty_printer): Declare.
8261 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
8262 c_pretty_printer_init. Adjust.
8263 (print_c_tree): Do not call c_pretty_printer_init.
8264 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
8265
65a372f4
AC
82662013-08-09 Arnaud Charlet <charlet@adacore.com>
8267
8268 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
8269
fd9b0f32
PC
82702013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
8271
8272 PR c++/58080
8273 * c-common.c (pointer_int_sum): Add bool parameter.
8274 * c-common.h (pointer_int_sum): Adjust declaration.
8275
e0aec1e9
GDR
82762013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
8277
8278 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
8279 c_pretty_printer variable.
8280
b066401f
GDR
82812013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8282
8283 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
8284 (pp_base): Remove.
8285 (pp_c_base): Likewise. Adjust users.
8286 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
8287 (pp_c_whitespace): Do not call pp_base.
8288 (pp_c_left_paren): Likewise.
8289 (pp_c_right_paren): Likewise.
8290 (pp_c_left_brace): Likewise.
8291 (pp_c_right_brace): Likewise.
8292 (pp_c_left_bracket): Likewise.
8293 (pp_c_right_bracket): Likewise.
8294 (pp_c_dot): Likewise.
8295 (pp_c_ampersand): Likewise.
8296 (pp_c_star): Likewise.
8297 (pp_c_arrow): Likewise.
8298 (pp_c_semicolon): Likewise.
8299 (pp_c_complement): Likewise.
8300 (pp_c_exclamation): Likewise.
8301 (pp_c_direct_declarator): Likewise.
8302 (pp_c_ws_string): Likewise.
8303 (pp_c_identifier): Likewise.
8304 (pp_c_statement): Likewise.
8305 (print_c_tree): Likewise.
8306
65e5a578
ESR
83072013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
8308
8309 PR c++/58072
8310 * c-common.c (c_parse_error): Catch user-defined literal tokens and
8311 provide useful error strings.
8312
137a1a27
GDR
83132013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8314
8315 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
8316 printer functions instead of pp_string or operators and punctuators.
8317 (dump_generic_ada_node): Likewise.
8318 * c-pretty-print.c (pp_c_type_specifier): Likewise.
8319 (pp_c_relational_expression): Likewise.
8320 (pp_c_logical_or_expression): Likewise.
8321
07838b13
GDR
83222013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8323
8324 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
8325 functions instead of pp_character.
8326 (pp_ada_tree_identifier): Likewise.
8327 (dump_ada_double_name): Likewise.
8328 (dump_ada_function_declaration): Likewise.
8329 (dump_ada_array_domains): Likewise.
8330 (dump_template_types): Likewise.
8331 (dump_generic_ada_node): Likewise.
8332 (print_ada_declaration): Likewise.
8333 (print_ada_struct_decl): Likewise.
8334 * c-pretty-print.c (pp_c_integer_constant): Likewise.
8335
433cc7b0
TT
83362013-07-23 Tom Tromey <tromey@redhat.com>
8337
8338 * c-common.h (enum rid) <RID_GENERIC>: New constant.
8339 * c-common.c (c_common_reswords): Add _Generic.
8340
688010ba
OB
83412013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
8342
8343 * c-common.c: Fix typos.
8344 * c-common.h: Likewise.
8345
2a99e5e6
LL
83462013-07-13 Lubos Lunak <l.lunak@suse.cz>
8347
8348 PR c++/55203
8349 * c-common.c (c_common_attribute_table): Add warn_unused.
8350 (handle_warn_unused_attribute): New.
8351
c26302d5
JJ
83522013-07-10 Jakub Jelinek <jakub@redhat.com>
8353
8354 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
8355 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
8356
dfeadaa0
PC
83572013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
8358
8359 PR c++/57869
8360 * c.opt: Add Wconditionally-supported.
8361
6a2fa4b2
GS
83622013-07-08 Graham Stott <graham.stott@btinternet.com>
8363
adfac8df 8364 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
8365 unused variables l_length and l_node.
8366
ecdbd01a 83672013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
8368
8369 PR c/57821
8370 * c-common.c (complete_array_type): Delay folding first index
8371 like other indices. When folding, check for index overflow.
8372
bedc293e
MG
83732013-06-27 Marc Glisse <marc.glisse@inria.fr>
8374
8375 PR c++/57509
8376 * c-common.h (c_build_vec_perm_expr): New complain argument.
8377 * c-common.c (c_build_vec_perm_expr): Likewise.
8378 Use save_expr also in C++.
8379
604b2bfc
GDR
83802013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8381
8382 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
8383 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
8384 * c-opts.c (c_common_post_options): Likewise.
8385
dfeadaa0 83862013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
8387
8388 * array-notation-common.c (length_mismatch_in_expr): Changed the
8389 parameter type's from a dynamic array to a vec_tree. Also removed
8390 the size parameters.
8391 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
8392 the change above.
8393
2ce86d2e
BI
83942013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
8395
8396 * c-common.h (struct cilkplus_an_parts): New structure.
8397 (struct cilkplus_an_loop_parts): Likewise.
8398 (cilkplus_extract_an_triplets): New prototype.
8399 (fix_sec_implicit_args): Likewise.
8400 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
8401 (fix_sec_implicit_args): Likewise.
604b2bfc 8402
07a6825b
BI
84032013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
8404
8405 * array-notation-common.c (find_inv_trees): Removed an unwanted
8406 typecasting.
8407 * c-common.h (struct inv_list::additional_tcodes): Changed type from
8408 enum rid to enum tree_code.
8409
08346abd
JH
84102013-06-11 Jan Hubicka <jh@suse.cz>
8411
8412 * c-common.c (handle_alias_ifunc_attribute): Do not set
8413 DECL_EXTERNAL for weakref variables.
8414 * c-pragma.c (handle_pragma_weak): Make sure aliases
8415 are not declared as external.
8416
d60f1706
BI
84172013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8418
8419 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
8420 function from c/c-array-notation.c.
8421 (is_cilkplus_reduce_builtin): Likewise.
8422 (find_rank): Likewise.
8423 (extract_array_notation_exprs): Likewise.
8424 (replace_array_notations): Likewise.
8425 (find_inv_trees): Likewise.
8426 (replace_inv_trees): Likewise.
8427 (contains_array_notation_expr): Likewise.
8428 (find_correct_array_notation_type): Likewise.
8429 * c-common.h (struct inv_list): Moved this struct from the file
8430 c/c-array-notation.c and added a new field called additional tcodes.
8431 (length_mismatch_in_expr_p): New prototype.
8432 (is_cilkplus_reduce_builtin): Likewise.
8433 (find_rank): Likewise.
8434 (extract_array_notation_exprs): Likewise.
8435 (replace_array_notation): Likewise.
8436 (find_inv_trees): Likewise.
8437 (replace_inv_trees): Likewise.
8438 (find_correct_array_notation_type): Likewise.
dfeadaa0 8439
36536d79
BI
84402013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8441
8442 * c-common.c (c_define_builtins): When cilkplus is enabled, the
8443 function array_notation_init_builtins is called.
8444 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
8445 * c-common.def (ARRAY_NOTATION_REF): New tree.
8446 * c-common.h (build_array_notation_expr): New function declaration.
8447 (build_array_notation_ref): Likewise.
8448 (extract_sec_implicit_index_arg): New extern declaration.
8449 (is_sec_implicit_index_fn): Likewise.
8450 (ARRAY_NOTATION_CHECK): New define.
8451 (ARRAY_NOTATION_ARRAY): Likewise.
8452 (ARRAY_NOTATION_START): Likewise.
8453 (ARRAY_NOTATION_LENGTH): Likewise.
8454 (ARRAY_NOTATION_STRIDE): Likewise.
8455 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
8456 ARRAY_NOTATION_REF.
8457 (pp_c_expression): Likewise.
8458 * c.opt (flag_enable_cilkplus): New flag.
8459 * array-notation-common.c: New file.
8460
f7716d57
JJ
84612013-05-14 Jakub Jelinek <jakub@redhat.com>
8462
8463 PR c++/57274
8464 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
8465
a5e0cd1d
MG
84662013-05-10 Marc Glisse <marc.glisse@inria.fr>
8467
8468 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
8469 vectors.
8470
f6bc1c4a
HS
84712013-05-07 Han Shen <shenhan@google.com>
8472
8473 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
8474
3f12f6e9
SKS
84752013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
8476
8477 * c-common.c (check_user_alignment): Emit error for negative values.
8478
61949153
PC
84792013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8480
8481 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
8482
e93e18e9
PC
84832013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8484
8485 * c-cppbuiltin.c (c_cpp_builtins): Do not define
8486 __GXX_EXPERIMENTAL_CXX1Y__.
8487
44d90fe1 84882013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 8489 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
8490
8491 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
8492 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
8493 to simply use OPT_Wpointer_arith.
8494 (c_sizeof_or_alignof_type): Likewise.
8495
13f39b2e
PC
84962013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8497
8498 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
8499
4b84d650
JJ
85002013-04-12 Jakub Jelinek <jakub@redhat.com>
8501
8502 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
8503 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
8504 specifiers.
8505
fb037b5d
SB
85062013-04-07 Steven Bosscher <steven@gcc.gnu.org>
8507
8508 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
8509
4e856798
PC
85102013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
8511
8512 * c-common.c (pointer_int_sum): Remove dead code.
8513
4b1baac8
RS
85142013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
8515
8516 PR middle-end/56524
8517 * c-common.c (handle_optimize_attribute): Don't call
8518 save_optabs_if_changed.
8519
0b50e654
JJ
85202013-03-05 Jakub Jelinek <jakub@redhat.com>
8521
8522 PR middle-end/56461
8523 * c-pch.c (pch_init): Free target_validity at the end.
8524
48c41403
JJ
85252013-03-04 Jakub Jelinek <jakub@redhat.com>
8526
8527 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
8528
e664c61c
KS
85292013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
8530 Jakub Jelinek <jakub@redhat.com>
8531
8532 PR sanitizer/56454
8533 * c-common.c (handle_no_sanitize_address_attribute): New function.
8534 (c_common_attribute_table): Add no_sanitize_address attribute.
8535 (handle_no_address_safety_analysis_attribute): Add
8536 no_sanitize_address attribute, not no_address_safety_analysis
8537 attribute.
8538
a475fd3d 85392013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
8540
8541 PR target/52555
8542 * c-common.c (handle_optimize_attribute): Call
8543 save_optabs_if_changed.
8544
f6007d99
JJ
85452013-02-18 Jakub Jelinek <jakub@redhat.com>
8546 Steven Bosscher <steven@gcc.gnu.org>
8547
8548 PR pch/54117
8549 * c-opts.c (c_common_post_options): If debug info is enabled
8550 and non-dwarf*, refuse to load PCH files and when writing PCH
8551 file warn.
8552
cf35e2b1
JJ
85532013-02-05 Jakub Jelinek <jakub@redhat.com>
8554
8555 PR middle-end/56167
8556 * c-common.c (handle_error_attribute): Fix condition.
8557
32887460
JJ
85582013-01-30 Jakub Jelinek <jakub@redhat.com>
8559
8560 PR c++/55742
8561 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
8562
5af057d8
JM
85632013-01-18 Jason Merrill <jason@redhat.com>
8564
8565 PR target/54908
8566 * c.opt (-fextern-tls-init): New.
8567 * c-opts.c (c_common_post_options): Handle it.
8568
cc83c823
JJ
85692013-01-09 Jakub Jelinek <jakub@redhat.com>
8570
8571 PR c/48418
8572 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
8573 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
8574 and is either negative or bigger or equal to type precision
8575 of the first operand.
8576
a859517f
MP
85772012-12-03 Marek Polacek <polacek@redhat.com>
8578
8579 PR c/55570
8580 * c-common.c (check_user_alignment): Swap order of tests,
8581 check TREE_CODE first.
8582
2d7aa578
ESR
85832012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
8584
8585 PR c++/52654
8586 * c-common.h (overflow_type): New enum.
8587 (build_userdef_literal): Add overflow_type argument.
8588 (tree_userdef_literal): Add overflow_type.
8589 (USERDEF_LITERAL_OVERFLOW): New access macro.
8590 * c-common.c (build_userdef_literal): Add overflow_type
8591 argument.
8592 * c-lex.c (c_lex_with_flags): Add overflow_type to
8593 build_userdef_literal calls.
8594 (interpret_integer, interpret_float): Add overflow_type argument.
8595
cc3c4f62
RB
85962012-11-28 Richard Biener <rguenther@suse.de>
8597
8598 PR c/35634
8599 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
8600 here and use a type with proper overflow behavior for types that would
8601 need to be promoted for the arithmetic.
8602
77bc5132
JJ
86032012-11-23 Jakub Jelinek <jakub@redhat.com>
8604
8605 PR sanitizer/55435
8606 * c-common.c (handle_no_address_safety_analysis_attribute): New
8607 function.
8608 (c_common_attribute_table): Add no_address_safety_analysis.
8609
5dc99c46
SB
86102012-11-16 Simon Baldwin <simonb@google.com>
8611
8612 * c.opt: Add f[no-]canonical-system-headers.
8613 * c-opts.c (c_common_handle_option): Handle
8614 OPT_fcanonical_system_headers.
8615
a4a0016d
ESR
86162012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
8617
8618 PR c++/54413
8619 * c-opts.c (c_common_handle_option): Set new flags.
8620 * c.opt: Describe new flags.
8621
7dbb85a7
JM
86222012-11-09 Jason Merrill <jason@redhat.com>
8623
8624 * c.opt (Wabi-tag): New.
8625
ad7bac31
AK
86262012-11-09 Andi Kleen <ak@linux.intel.com>
8627
8628 PR 55139
8629 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 8630 MEMMODEL_MASK
ad7bac31 8631
7332899a
MLI
86322012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8633
8634 PR c/53063
8635 * c.opt (Wformat): Make it Alias Wformat=1.
8636 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
8637 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
8638 LangEnabledBy.
8639 (Wformat=): RejectNegative. Use LangEnabledBy.
8640 (Wnonnull): Use LangEnabledBy.
8641 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
8642 * c-format.c (set_Wformat): Delete.
8643 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
ab20d992
JJ
8644 (maybe_read_dollar_number): Likewise.
8645 (avoid_dollar_number): Likewise.
8646 (finish_dollar_format_checking): Likewise.
8647 (check_format_info): Likewise.
8648 (check_format_info_main): Likewise.
8649 (check_format_types): Likewise.
8650 (format_type_warning): Likewise.
8651 * c-common.c (int): Likewise.
8652 (check_function_sentinel): Likewise.
8e745a17 8653 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 8654
34a180a6
MLI
86552012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8656
8657 PR c/53063
8658 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
8659 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
8660 Use LangEnabledBy.
8661 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
8662 common.opt.
8663 (Wvariadic-macros): Init(1).
8664 * c-opts.c (c_common_handle_option): Do not handle them
8665 explicitly.
8666 (c_common_post_options): Likewise.
8667 (sanitize_cpp_opts): warn_unused_macros is now
8668 cpp_warn_unused_macros.
8669 (push_command_line_include): Likewise.
8670 * c-common.c (warn_unknown_pragmas): Do not define.
8671 * c-common.h (warn_unknown_pragmas): Do not declare.
8672
3f46d6a5
MLI
86732012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8674
8675 PR c/51294
8676 * c-common.c (conversion_warning): Handle conditional expressions.
8677
880661a4
JW
86782012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
8679
8680 PR c++/54930
8681 * c.opt (Wreturn_local_addr): Define new option.
8682
4514a96b
JM
86832012-10-25 Jason Merrill <jason@redhat.com>
8684
f14edc1a
JM
8685 * c.opt (Wvirtual-move-assign): New.
8686
4514a96b
JM
8687 * c.opt (Winherited-variadic-ctor): New.
8688
93100c6b
MG
86892012-10-25 Marc Glisse <marc.glisse@inria.fr>
8690
8691 PR c++/54427
8692 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
8693
1efcb8c6
JM
86942012-10-23 Joseph Myers <joseph@codesourcery.com>
8695
8696 * c-common.h (pch_cpp_save_state): Declare.
8697 * c-target.def (c_preinclude): New hook.
8698 * c-opts.c (done_preinclude): New.
8699 (push_command_line_include): Handle default preincluded header.
8700 (cb_file_change): Call pch_cpp_save_state when calling
8701 push_command_line_include.
8702 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
8703 (pch_cpp_save_state): New.
8704 (pch_init): Call pch_cpp_save_state conditionally, instead of
8705 calling cpp_save_state.
8706
4a0ae68e
MLI
87072012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
8708
8709 PR c/53063
8710 PR c/40989
8711 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
8712 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
8713 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
8714 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
8715 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
8716 * c-opts.c (c_common_handle_option): Remove explicit handling from
8717 here.
8718 (c_common_post_options): Likewise.
8719
67e4210b
EB
87202012-10-18 Eric Botcazou <ebotcazou@adacore.com>
8721
8722 * c-ada-spec.c (LOCATION_COL): Delete.
8723 (compare_location): New function.
8724 (compare_node): Use it.
8725 (compare_comment): Likewise.
8726
65d4f2cd
MLI
87272012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
8728
8729 PR c/53063
8730 PR c/40989
8731 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
8732 * c-opts.c (c_common_handle_option): Do not set them here. Add
8733 comment.
8734 (c_common_post_options): Likewise.
8735
909881cb
EB
87362012-10-16 Eric Botcazou <ebotcazou@adacore.com>
8737
8738 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
8739 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
8740 Remove POINTER_TYPE handling, add large unsigned handling and use
8741 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
8742
3a785c97
JJ
87432012-10-12 Jakub Jelinek <jakub@redhat.com>
8744
8745 PR c/54381
8746 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
8747 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
8748 locs and array of 3 trees instead of just single loc and single
8749 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
8750 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
8751 For *cmp* builtins that take two sources strings report warnings
8752 about first and second source, not about destination and source.
8753
5e54f81d
MG
87542012-10-12 Marc Glisse <marc.glisse@inria.fr>
8755
8756 PR c++/53055
8757 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
8758
f5b02f1e
EB
87592012-10-11 Eric Botcazou <ebotcazou@adacore.com>
8760
8761 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
8762 declaring something coming from another file.
8763
b46dbc6c
AC
87642012-10-10 Arnaud Charlet <charlet@adacore.com>
8765
f5b02f1e 8766 PR ada/54845
b46dbc6c
AC
8767 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
8768
5d9de0d0
PC
87692012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
8770
8771 PR c++/54194
8772 * c-common.c (warn_about_parentheses): Add location_t parameter;
8773 use EXPR_LOC_OR_LOC.
8774 * c-common.h: Update declaration.
8775
a212e43f
MG
87762012-10-09 Marc Glisse <marc.glisse@inria.fr>
8777
8778 PR c++/54427
8779 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
8780 more operations. Make error messages optional.
8781 * c-common.h (enum stv_conv): Moved from c-typeck.c.
8782 (scalar_to_vector): Declare.
8783
b1db7f91
JM
87842012-10-08 Jason Merrill <jason@redhat.com>
8785
8786 * c-common.c (c_common_reswords): Add thread_local.
8787
e28d52cf
DS
87882012-10-08 Dodji Seketeli <dodji@redhat.com>
8789
8790 PR c++/53528 C++11 attribute support
8791 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
8792 new functions.
8793 * c-common.c (check_cxx_fundamental_alignment_constraints): New
8794 static function.
8795 (handle_aligned_attribute): In choose strictest alignment
8796 among many. Use new check_cxx_fundamental_alignment_constraints.
8797 (handle_transparent_union_attribute): In c++11 attribute syntax,
8798 don't look through typedefs.
8799
3b78de56
AC
88002012-10-04 Arnaud Charlet <charlet@adacore.com>
8801
8802 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
8803 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
8804 out of dumpfile.h.
8805
6040bb5f
DC
88062012-09-25 Dehao Chen <dehao@google.com>
8807
8808 PR middle-end/54645
3b78de56 8809 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
8810 map when read in the pch.
8811
3f8257db 88122012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
8813
8814 * c-ada-spec.c: Style fixes.
8815
3f8257db 88162012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
8817
8818 * c.opt (-fada-spec-parent): Define new command line switch.
8819 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
8820 is specified, generate binding spec as a child of the specified unit.
8821
0ccb505d
PC
88222012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
8823 Manuel López-Ibáñez <manu@gcc.gnu.org>
8824
8825 PR c++/53210
8826 * c.opt ([Winit-self]): Enabled by -Wall in C++.
8827
c583af79
AC
88282012-08-23 Arnaud Charlet <charlet@adacore.com>
8829
8830 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
8831 for pointers, and add missing Convention C pragma.
8832 (print_ada_struct_decl): Add missing aliased keyword.
8833 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
8834
1a4049e7
JJ
88352012-08-17 Jakub Jelinek <jakub@redhat.com>
8836
8837 * c-common.c (sizeof_pointer_memaccess_warning): New function.
8838 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
8839 * c-opts.c (c_common_handle_option): Enable it for -Wall.
8840 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
8841 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
8842
70b5e7dc
RG
88432012-08-10 Richard Guenther <rguenther@suse.de>
8844
8845 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
8846
f8923f7e
SB
88472012-08-07 Steven Bosscher <steven@gcc.gnu.org>
8848
8849 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
8850 instead of separate pp_newline and pp_flush.
8851 (print_c_tree): Likewise.
8852
e45abe1f
RH
88532012-07-26 Richard Henderson <rth@redhat.com>
8854
8855 * c-common.c (handle_hot_attribute): Allow labels.
8856 (handle_cold_attribute): Likewise.
8857
332f1d24
JJ
88582012-07-20 Jakub Jelinek <jakub@redhat.com>
8859
8860 PR c++/28656
8861 * c-common.c (check_function_nonnull): Handle multiple nonnull
8862 attributes properly.
8863
7ee2468b
SB
88642012-07-16 Steven Bosscher <steven@gcc.gnu.org>
8865
8866 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
8867 * c-ada-spec.c: Likewise.
8868 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
8869
ee7b28eb
SB
88702012-07-14 Steven Bosscher <steven@gcc.gnu.org>
8871
8872 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
8873 Remove code conditional on it.
8874
6bdf3519
SB
88752012-07-11 Steven Bosscher <steven@gcc.gnu.org>
8876
8877 * c-gimplify.c: Do not include basic-block.h.
8878 * c-common.c: Do not include linfuncs.h.
8879
532aafad
SB
88802012-07-08 Steven Bosscher <steven@gcc.gnu.org>
8881
8882 * c-common.h: Include tree.h.
8883
8d0d1915
JM
88842012-07-02 Jason Merrill <jason@redhat.com>
8885
8886 PR c++/53524
8887 * c-common.c (get_priority): Call default_conversion.
8888
fbc873ad
UB
88892012-07-01 Uros Bizjak <ubizjak@gmail.com>
8890
8891 * c-pch.c (c_common_write_pch): Remove unused variables.
8892
d4a10d0a
SB
88932012-06-29 Steven Bosscher <steven@gcc.gnu.org>
8894
8895 * cppspec.c: Moved from gcc/ to here.
8896
6f3a2e23
KT
88972012-06-27 Kai Tietz <ktietz@redhat.com>
8898
8899 PR preprocessor/37215
8900 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
8901
8ca92d04
SB
89022012-06-21 Steven Bosscher <steven@gcc.gnu.org>
8903
8904 * c-common.h (c_common_print_pch_checksum): Remove.
8905 * c-pch.c: Do not include output.h.
8906 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
8907 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
8908 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
8909 (struct c_pch_header): Remove.
8910 (get_ident): Update gpch version.
8911 (pch_init): Do not print executable_checksum to asm_out_file.
8912 Do not fail if there is no asm_out_file to read back from. Set
8913 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
8914 (c_common_write_pch): Verify that nothing was written to asm_out_file
8915 since pch_init was called. Do not write a c_pch_header, and do not
8916 copy from asm_out_file to the PCH.
8917 (c_common_read_pch): Do not read a c_pch_header, and do not restore
8918 the content of asm_out_file from the PCH.
8919 (c_common_print_pch_checksum): Remove.
8920 * c-opts.c (c_common_init): Print out executable_checksum directly.
8921
70f42967
SB
89222012-06-19 Steven Bosscher <steven@gcc.gnu.org>
8923
8924 * c-target.def (objc_declare_unresolved_class_reference,
8925 objc_declare_class_definition): Add new hooks.
8926
a8781821
SB
89272012-06-19 Steven Bosscher <steven@gcc.gnu.org>
8928
8929 * c-lex.c: Do not include output.h.
8930 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
8931 Remove uses of ASM_OUTPUT_IDENT.
8932
9e1a8dd1
RR
89332012-06-15 Marc Glisse <marc.glisse@inria.fr>
8934
8935 PR c++/51033
8936 * c-common.h (c_build_vec_perm_expr): Move decl here.
8937 * c-common.c (c_build_vec_perm_expr): Move definition
8938 here.
8939
6f07a821
SB
89402012-06-06 Steven Bosscher <steven@gcc.gnu.org>
8941
8942 * c.opt (fconserve-space): Turn into a no-op.
8943
9faeb493 89442012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
8945
8946 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
8947 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
8948 both the start and end of the function.
8949
a4b7d13c
SB
89502012-06-04 Steven Bosscher <steven@gcc.gnu.org>
8951
8952 * c-common.c: Do not include output.h.
8953 * c-pragma.c: Likewise.
8954
c265f413
SA
89552012-06-04 Steven Bosscher <steven@gcc.gnu.org>
8956
8957 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
8958 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
8959 (lang_decl_name): Handle namespace decls.
8960
be7a421e
SB
89612012-05-31 Steven Bosscher <steven@gcc.gnu.org>
8962
8963 * c-ada-spec.c: Do not include output.h.
8964 * c-semantics.c: Likewise.
8965
65de6659
JM
89662012-05-29 Joseph Myers <joseph@codesourcery.com>
8967
8968 * c-common.c: Fix typo.
8969
ca5f4331
MM
89702012-05-29 Michael Matz <matz@suse.de>
8971
8972 * c-common.h (c_expand_decl): Remove prototype.
8973
4f7f7aca
MLI
89742012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8975
8976 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
8977 * c-opts.c (c_common_handle_option): Remove code handling
8978 warn_missing_braces.
8979
4a792f9b
PC
89802012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
8981
8982 PR c++/25137
8983 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
8984 -Wmissing_braces.
8985
650dc14a
DS
89862012-05-22 Dodji Seketeli <dodji@redhat.com>
8987
8988 PR c++/53322
8989 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
8990
9b095bf1
MLI
89912012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
8992
8993 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
8994 * c-opts.c (c_common_handle_option): Do not handle explicitly
8995 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
8996
0b2c4be5
DS
89972012-05-16 Dodji Seketeli <dodji@redhat.com>
8998
8999 PR preprocessor/7263
ab20d992 9000 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
0b2c4be5
DS
9001 to cpp_classify_number. For diagnostics, use the precise location
9002 instead of the global input_location.
9003
a1bde5af
PC
90042012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
9005
d02924ef 9006 PR c++/11856
a1bde5af
PC
9007 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
9008
d1ede5f4
BS
90092012-05-14 Bernd Schmidt <bernds@codesourcery.com>
9010
a1bde5af 9011 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 9012
f2bc201f
MLI
90132012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
9014
9015 PR 53063
9016 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
9017 Wreorder): Use LangEnabledBy.
9018 * c-opts.c (c_common_handle_option): Do not enable them
9019 explicitly. Call lang-specific generated functions.
9020 (c_common_post_options): Do not set them here.
9021
95744782
MLI
90222012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
9023
9024 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
9025 Wmissing-field-initializers,Wmissing-parameter-type,
9026 Wold-style-declaration,Woverride-init): Use EnabledBy.
9027 * c-opts.c (c_common_post_options): Do not set here explicitly.
9028
7d5a5747
MLI
90292012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
9030
9031 PR 53063
9032 * c-opts.c (c_common_handle_option): Use handle_generated_option
9033 to enable sub-options.
9034
5a3c9cf2
PC
90352012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
9036
9037 PR c++/53158
9038 * c-common.c (warnings_for_convert_and_check): Use warning_at.
9039
3ac8781c
RG
90402012-05-10 Richard Guenther <rguenther@suse.de>
9041
9042 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
9043 adjust commentary about TYPE_IS_SIZETYPE types.
9044
1e537948
MLI
90452012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9046
9047 PR c++/53261
9048 * c-common.c (warn_logical_operator): Check that argument of
9049 integer_zerop is not NULL.
9050
f2c4a785
MLI
90512012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
9052
9053 PR c/43772
9054 * c-common.c (warn_logical_operator): Do not warn if either side
9055 is already true or false.
9056
50f305ca
MLI
90572012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
9058
9059 PR c/51712
9060 * c-common.c (expr_original_type): New.
9061 (shorten_compare): Do not warn for enumeration types.
9062
0c3641b0
MLI
90632012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
9064
9065 * c.opt (fpermissive): Add Var(flag_permissive).
9066
7edaa4d2
MG
90672012-04-30 Marc Glisse <marc.glisse@inria.fr>
9068
9069 PR c++/51033
9070 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
9071 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
9072
b9c8da34
DS
90732012-04-30 Dodji Seketeli <dodji@redhat.com>
9074
9075 Add -Wvarargs option
ab20d992 9076 * c.opt (Wvarargs): Define new option.
b9c8da34 9077
e6c69da0
MLI
90782012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9079
9080 * c-common.c (check_function_arguments): Replace
9081 Wmissing-format-attribute with Wsuggest-attribute=format.
9082
90137d8f
MLI
90832012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9084
9085 * c.opt (Wsuggest-attribute=format): New. Alias of
9086 Wmissing-format-attribute.
9087 * c-format.c (decode_format_type): Replace
9088 Wmissing-format-attribute with Wsuggest-attribute=format.
9089 (check_function_format): Likewise.
9090
9faeb493 90912012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
9092
9093 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
9094 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
9095 * c.opt: Add Wliteral-suffix.
9096
c1771a20
MLI
90972012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
9098
9099 PR c/44774
9100 * c.opt (Wpedantic): New.
9101 (pedantic): Alias Wpedantic.
9102 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
9103 (c_common_post_options): Likewise.
9104 (sanitize_cpp_opts): Likewise.
9105 * c-lex.c (interpret_float): Likewise.
9106 * c-format.c (check_format_types): Likewise.
9107 * c-common.c (pointer_int_sum): Likewise.
9108 (c_sizeof_or_alignof_type): Likewise.
9109 (c_add_case_label): Likewise.
9110 (c_do_switch_warnings): Likewise.
9111 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
9112
04b391c1
JM
91132012-04-15 Jason Merrill <jason@redhat.com>
9114
9115 PR c++/52818
9116 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
9117 (C_STD_NAME): Distinguish between C++98 and C++11.
9118
ac868f29
EB
91192012-04-11 Eric Botcazou <ebotcazou@adacore.com>
9120
9121 PR target/52624
9122 * c-common.h (uint16_type_node): Rename into...
9123 (c_uint16_type_node): ...this.
9124 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
9125 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
9126
fd4116f4
MLI
91272012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
9128
9129 * c-common.c (warn_if_unused_value): Move definition to here.
9130 * c-common.h (warn_if_unused_value): Move declaration to here.
9131
573ac65e
WB
91322012-03-23 William Bader <williambader@hotmail.com>
9133
9134 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
9135
552b8185
JM
91362012-03-20 Jason Merrill <jason@redhat.com>
9137
9138 * c-common.h (enum cxx_dialect): Add cxx1y.
9139 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
9140 test.
9141 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
9142 * c-opts.c (c_common_post_options): Likewise.
9143 (set_std_cxx1y): New.
9144 (c_common_handle_option): Call it.
9145 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
9146
04398fa8
PC
91472012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
9148
9149 PR c++/14710
9150 * c.opt ([Wuseless-cast]): Add.
9151
d2a12ae7
RG
91522012-03-16 Richard Guenther <rguenther@suse.de>
9153
9154 * c-pretty-print.c (pp_c_initializer_list): Adjust.
9155
a12bf402
MLI
91562012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9157
9158 PR c++/44783
9159 * c.opt (ftemplate-backtrace-limit) Add.
9160
5c30094f
RO
91612012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9162
9163 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
9164 handling.
9165 * c-pragma.c (handle_pragma_extern_prefix): Remove.
9166 (init_pragma): Don't register extern_prefix.
9167
21fa2faf
RG
91682012-03-12 Richard Guenther <rguenther@suse.de>
9169
9170 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
9171 (builtin_type_for_size): Likewise.
9172
e3793c6f
JJ
91732012-02-13 Jakub Jelinek <jakub@redhat.com>
9174
9175 PR c++/52215
9176 * c-common.c (sync_resolve_params): Don't decide whether to convert
9177 or not based on TYPE_SIZE comparison, convert whenever arg_type
9178 is unsigned INTEGER_TYPE.
9179
93286335
PC
91802012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
9181
9182 PR c/52118
9183 * c.opt ([Wunused-local-typedefs]): Fix description.
9184
7a421706
MS
91852012-01-24 Mike Stump <mikestump@comcast.net>
9186
9187 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
9188 exactly.
9189
ba9b1f11
RG
91902012-01-18 Richard Guenther <rguenther@suse.de>
9191
9192 * c-opts.c (c_common_post_options): Reset LTO flags if
9193 we are about to generate a PCH.
9194
465406be
PC
91952012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
9196
9197 PR c++/51777
9198 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
9199 use pp_unsigned_wide_integer.
9200
aee15221
RG
92012012-01-10 Richard Guenther <rguenther@suse.de>
9202
9203 PR middle-end/51806
9204 * c-opts.c (c_common_handle_option): Move -Werror handling
9205 to language independent code.
9206
5720c0dc
RG
92072012-01-05 Richard Guenther <rguenther@suse.de>
9208
9209 PR middle-end/51764
9210 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
9211 from common.opt.
9212
73ac190a
PC
92132011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
9214
9215 PR c++/51316
9216 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
9217 of array types with an unknown bound.
9218
48b0b196
JM
92192011-12-20 Joseph Myers <joseph@codesourcery.com>
9220
9221 * c-common.c (flag_isoc99): Update comment to refer to C11.
9222 (flag_isoc1x): Change to flag_isoc11.
9223 * c-common.h (flag_isoc99): Update comment to refer to C11.
9224 (flag_isoc1x): Change to flag_isoc11.
9225 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
9226 C11.
9227 * c-opts.c (set_std_c1x): Change to set_std_c11.
9228 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
9229 Call set_std_c11.
9230 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
9231 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
9232 * c.opt (std=c1x): Change to std=c11. Document as non-draft
9233 standard.
9234 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
9235 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
9236 (std=gnu1x): Make alias of std=gnu11.
9237
d58d6eb5
JM
92382011-12-19 Jason Merrill <jason@redhat.com>
9239
9240 PR c++/51228
9241 * c-common.c (handle_transparent_union_attribute): Check the first
9242 field if the type is complete.
9243
b3908fcc
JW
92442011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
9245
9246 PR libstdc++/51365
9247 * c-common.c (RID_IS_FINAL): Add.
9248 * c-common.h (RID_IS_FINAL): Add.
9249
fea3ca91
IS
92502011-11-30 Iain Sandoe <iains@gcc.gnu.org>
9251
9252 * c.opt (fgnu-runtime): Provide full description.
9253 (fnext-runtime): Likewise.
9254 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
9255
62bad7cd
AM
92562011-11-28 Andrew MacLeod <amacleod@redhat.com>
9257
9258 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
9259 predefines in one place. Add LOCK_FREE predefines.
9260 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
9261 new func.
9262
c466c4ff
AM
92632011-11-24 Andrew MacLeod <amacleod@redhat.com>
9264
9265 PR c/51256
9faeb493 9266 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 9267 conditions
9faeb493
UB
9268 (resolve_overloaded_atomic_exchange,
9269 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
9270 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
9271 error_mark_node for error conditions.
9faeb493 9272
a5952633
RG
92732011-11-08 Richard Guenther <rguenther@suse.de>
9274
9275 PR middle-end/51010
ab20d992 9276 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
a5952633 9277
0a35513e
AH
92782011-11-07 Richard Henderson <rth@redhat.com>
9279 Aldy Hernandez <aldyh@redhat.com>
9280 Torvald Riegel <triegel@redhat.com>
9281
9282 Merged from transactional-memory.
9283
9284 * c-common.c (handle_tm_wrap_attribute,
9285 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
9286 (struct c_common_reswords): Added __transaction* keywords.
9287 (struct c_common_attribute_table): Added transaction* and tm_regparm
9288 attributes.
9289 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
9290 masks.
9291 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
9292 find_tm_attribute): Declare.
9293
6d87092d
JM
92942011-11-07 Jason Merrill <jason@redhat.com>
9295
9296 PR c++/35688
9297 * c-common.c, c-common.h: Revert yesterday's changes.
9298
8e7860a1
JM
92992011-11-06 Jason Merrill <jason@redhat.com>
9300
9301 PR c++/35688
9302 * c-common.c (decl_has_visibility_attr): Split out from...
9303 (c_determine_visibility): ...here.
9304 * c-common.h: Declare it.
9305
d19fa6b5
JM
93062011-11-06 Joseph Myers <joseph@codesourcery.com>
9307
9308 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
9309 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
9310 type.
9311 (check_user_alignment): New. Split out of
9312 handle_aligned_attribute. Disallow integer constants with
9313 noninteger types. Conditionally allow zero.
9314 (handle_aligned_attribute): Use check_user_alignment.
9315 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
9316
86951993
AM
93172011-11-06 Andrew MacLeod <amacleod@redhat.com>
9318 Richard Henderson <rth@redhat.com>
9319
9320 Merged from cxx-mem-model.
9321
9322 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 9323 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
9324 parameters that are the same type size.
9325 (get_atomic_generic_size): New. Find size of generic
9326 atomic function parameters and do typechecking.
9327 (add_atomic_size_parameter): New. Insert size into parameter list.
9328 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
9329 either __atomic_exchange_n or external library call.
9faeb493 9330 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 9331 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 9332 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
9333 __atomic_load_n or an external library call.
9334 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
9335 __atomic_store_n or an external library call.
9336 (resolve_overloaded_builtin): Handle new __atomic builtins.
9337
cf9e9959
EB
93382011-11-04 Eric Botcazou <ebotcazou@adacore.com>
9339
9340 PR c++/50608
9341 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
9342 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
9343 <INDIRECT_REF>: Return the argument.
9344 <ARRAY_REF>: Remove special code for negative offset.
9345 Call fold_build_pointer_plus instead of size_binop.
9346 (fold_offsetof): Remove STOP_REF argument and adjust.
9347 * c-common.h (fold_offsetof_1): Declare.
9348 (fold_offsetof): Remove STOP_REF argument.
9349
25339f10
JM
93502011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
9351
9352 PR c++/50810
9353 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
9354 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
9355 Wnarrowing for C++0x and C++98.
9356 * c.opt ([Wnarrowing]): Update.
9357
89401152
PC
93582011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
9359
9360 PR c++/44277
9361 * c.opt: Add Wzero-as-null-pointer-constant.
9362
97e3ad20
JM
93632011-10-31 Jason Merrill <jason@redhat.com>
9364
15694fdd
JM
9365 * c.opt (-fdeduce-init-list): Off by default.
9366
97e3ad20
JM
9367 PR c++/50920
9368 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
9369 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
9370 and -Wc++11-compat.
9371 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
9372
fb9120e3
RAV
93732011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
9374
9375 PR c++/30066
9376 * c.opt (fvisibility-inlines-hidden): Description change.
9377
3ce4f9e4
ESR
93782011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
9379
9380 Implement C++11 user-defined literals.
9381 * c-common.c (build_userdef_literal): New.
9382 * c-common.def: New tree code.
9383 * c-common.h (tree_userdef_literal): New tree struct and accessors.
9384 * c-lex.c (interpret_float): Add suffix parm.
9385 (c_lex_with_flags): Build literal tokens.
9386
5f53c243
PC
93872011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
9388
9389 PR c++/50841
9390 Revert:
9391 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
9392
9393 PR c++/50810
9394 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
9395 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
9396 Wnarrowing for C++0x and C++98.
9397 * c.opt ([Wnarrowing]): Update.
9398
263734e1
PC
93992011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
9400
9401 PR c++/50810
9402 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
9403 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
9404 Wnarrowing for C++0x and C++98.
9405 * c.opt ([Wnarrowing]): Update.
9406
d2e312d7
PC
94072011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
9408
9409 PR c++/45385
9410 * c-common.c (conversion_warning): Remove code looking for
9411 artificial operands.
9412
d17687f6
DS
94132011-10-18 Dodji Seketeli <dodji@redhat.com>
9414
9415 PR bootstrap/50760
9416 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 9417 !NO_IMPLICIT_EXTERN_C.
d17687f6 9418
fc8396e9
PC
94192011-10-17 Michael Spertus <mike_spertus@symantec.com>
9420
9421 * c-common.c (c_common_reswords): Add __bases,
9422 __direct_bases.
9423 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
9424
94252011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
9426
9427 PR c++/50757
9428 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
9429
847e697a
TT
94302011-10-15 Tom Tromey <tromey@redhat.com>
9431 Dodji Seketeli <dodji@redhat.com>
9432
9433 * c.opt (fdebug-cpp): New option.
9434 * c-opts.c (c_common_handle_option): Handle the option.
9435 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
9436 output stream in parameter. Factorized from ...
9437 (maybe_print_line): ... this. Dump location debug information when
9438 -fdebug-cpp is in effect.
9439 (print_line_1): New static function. Takes an output stream in
9440 parameter. Factorized from ...
9441 (print_line): ... here. Dump location information when -fdebug-cpp
9442 is in effect.
9443 (scan_translation_unit): Dump location information when
9444 -fdebug-cpp is in effect.
9445
92582b75
TT
94462011-10-15 Tom Tromey <tromey@redhat.com>
9447 Dodji Seketeli <dodji@redhat.com>
9448
9449 * c.opt (ftrack-macro-expansion): New option. Handle it with and
9450 without argument.
9451 * c-opts.c (c_common_handle_option)<case
9452 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
9453 cases. Handle -ftrack-macro-expansion with and without argument.
9454
46427374
TT
94552011-10-15 Tom Tromey <tromey@redhat.com>
9456 Dodji Seketeli <dodji@redhat.com>
9457
9458 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
9459 (print_line, cb_define, do_line_change): Adjust to avoid touching
9460 the internals of struct line_map. Use the public API instead.
9461 * c-pch.c (c_common_read_pch): Likewise.
9462 * c-lex.c (fe_file_change): Likewise.
9463
fc8396e9
PC
94642011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
9465
9466 PR c++/17212
9467 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
9468
94692011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
9470
9471 PR c++/33067
9472 * c-pretty-print.c (pp_c_floating_constant): Output
9473 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
9474
e79983f4
MM
94752011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
9476
9477 * c-common.c (def_builtin_1): Delete old interface with two
9478 parallel arrays to hold standard builtin declarations, and replace
9479 it with a function based interface that can support creating
9480 builtins on the fly in the future. Change all uses, and poison
9481 the old names. Make sure 0 is not a legitimate builtin index.
9482 * c-omp.c (c_finish_omp_barrier): Ditto.
9483 (c_finish_omp_taskwait): Ditto.
9484 (c_finish_omp_flush): Ditto.
9485
6637388f
TG
94862011-10-11 Tristan Gingold <gingold@adacore.com>
9487
9488 * c.opt: (fallow-parameterless-variadic-functions): New.
9489
3797cb21
DS
94902011-09-08 Dodji Seketeli <dodji@redhat.com>
9491
9492 PR c++/33255 - Support -Wunused-local-typedefs warning
9493 * c-common.h (struct c_language_function::local_typedefs): New
9494 field.
9faeb493
UB
9495 (record_locally_defined_typedef, maybe_record_typedef_use)
9496 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 9497 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
9498 (maybe_record_typedef_use)
9499 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
9500 * c.opt: Declare new -Wunused-local-typedefs flag.
9501
693ddb1b
EB
95022011-09-06 Eric Botcazou <ebotcazou@adacore.com>
9503
9504 PR middle-end/50266
9505 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
9506 computations.
9507
830c740f
RG
95082011-09-05 Richard Guenther <rguenther@suse.de>
9509
9510 * c-common.c (complete_array_type): Use ssize_int (-1) instead
9511 of integer_minus_one_node for empty array upper bounds.
9512
892a371f
DS
95132011-08-28 Dodji Seketeli <dodji@redhat.com>
9514
9515 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
9516 it's the first time it's being called on this main TU.
9517
0e3fdb48
RB
95182011-08-24 Richard Guenther <rguenther@suse.de>
9519
9520 PR c/49396
9521 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
9522
95232011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
9524
9525 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
9526 defined in cpp_init_builtins and c_cpp_builtins.
9527
d4a83c10
JM
95282011-08-19 Joseph Myers <joseph@codesourcery.com>
9529
9530 * c-common.c (c_common_reswords): Add __builtin_complex.
9531 * c-common.h (RID_BUILTIN_COMPLEX): New.
9532
bbceee64
JM
95332011-08-18 Joseph Myers <joseph@codesourcery.com>
9534
9535 * c-common.c (c_common_reswords): Add _Noreturn.
9536 (keyword_is_function_specifier): Handle RID_NORETURN.
9537 * c-common.h (RID_NORETURN): New.
9538
3f8257db 95392011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
9540
9541 * c-common.c (unsafe_conversion_p): New function. Check if it is
9542 unsafe to convert an expression to the type.
9543 (conversion_warning): Adjust, use unsafe_conversion_p.
9544 * c-common.h (unsafe_conversion_p): New function declaration.
9545
20906c66
JJ
95462011-08-02 Jakub Jelinek <jakub@redhat.com>
9547
9548 * c-common.h (c_finish_omp_atomic): Adjust prototype.
9549 (c_finish_omp_taskyield): New prototype.
9550 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
9551 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
9552 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
9553 or RHS1 have side-effects, evaluate those too in the right spot,
9554 if it is a decl and LHS is also a decl, error out if they
9555 aren't the same.
9556 (c_finish_omp_taskyield): New function.
9557 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
9558 * c-pragma.c (omp_pragmas): Add taskyield.
9559 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
9560 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
9561 PRAGMA_OMP_CLAUSE_MERGEABLE.
9562
770e5a2e
DS
95632011-07-25 Dodji Seketeli <dodji@redhat.com>
9564
9565 * c-common.h (set_underlying_type): Remove parm name from
9566 declaration.
9567
1baae426
RG
95682011-07-25 Romain Geissler <romain.geissler@gmail.com>
9569
9570 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 9571
fcb21722
JM
95722011-07-22 Jason Merrill <jason@redhat.com>
9573
76f86d00
JM
9574 PR c++/49793
9575 * c.opt (Wnarrowing): New.
9576
3a636414
JM
9577 PR c++/30112
9578 * c-common.h: Declare c_linkage_bindings.
9579 * c-pragma.c (handle_pragma_redefine_extname): Use it.
9580
fcb21722
JM
9581 PR c++/49813
9582 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
9583 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
9584 as flag_isoc99 for 'restrict'.
9585 (pp_c_specifier_qualifier_list): Likewise for _Complex.
9586
02614448
ILT
95872011-07-21 Ian Lance Taylor <iant@google.com>
9588
9589 PR middle-end/49705
9590 * c-common.c (c_disable_warnings): New static function.
9591 (c_enable_warnings): New static function.
9592 (c_fully_fold_internal): Change local unused_p to bool. Call
9593 c_disable_warnings and c_enable_warnings rather than change
9594 c_inhibit_evaluation_warnings.
9595
34429675
JM
95962011-07-20 Jason Merrill <jason@redhat.com>
9597
9598 PR c++/6709 (DR 743)
9599 PR c++/42603 (DR 950)
9600 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
9601 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
9602 (CPP_DECLTYPE): New.
9603 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
9604
5d49b6a7
RG
96052011-07-19 Richard Guenther <rguenther@suse.de>
9606
9607 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
9608 * c-omp.c (c_finish_omp_for): Likewise.
9609
e84a58ff
EB
96102011-07-12 Eric Botcazou <ebotcazou@adacore.com>
9611
9612 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
9613 body on the next line.
9614
329af3c7
JM
96152011-07-08 Jason Merrill <jason@redhat.com>
9616
4063e61b
JM
9617 PR c++/45437
9618 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
9619
329af3c7
JM
9620 PR c++/49673
9621 * c-common.c (c_apply_type_quals_to_decl): Don't check
9622 TYPE_NEEDS_CONSTRUCTING.
9623
1a072294
RG
96242011-07-06 Richard Guenther <rguenther@suse.de>
9625
9626 * c-common.c (c_common_nodes_and_builtins):
9627 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
9628
fce5dddd
RG
96292011-07-05 Richard Guenther <rguenther@suse.de>
9630
9631 * c-common.c (c_common_nodes_and_builtins): Build all common
9632 tree nodes first.
9633
45d439ac
JJ
96342011-06-27 Jakub Jelinek <jakub@redhat.com>
9635
56300785
JJ
9636 * c-common.h (c_tree_chain_next): New static inline function.
9637
45d439ac
JJ
9638 * c-common.c (check_builtin_function_arguments): Handle
9639 BUILT_IN_ASSUME_ALIGNED.
9640
e0a8ecf2
AM
96412011-06-21 Andrew MacLeod <amacleod@redhat.com>
9642
9643 * c-common.c: Add sync_ or SYNC__ to builtin names.
9644 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
9645
96462011-06-20 Pierre Vittet <piervit@pvittet.com>
9647
9648 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
9649 handler.
9650 (gen_pragma_handler): New union.
9651 (internal_pragma_handler): New type.
9652 (c_register_pragma_with_data)
9653 (c_register_pragma_with_expansion_and_data): New functions.
9654
9655 * c-pragma.c (registered_pragmas, c_register_pragma_1)
9656 (c_register_pragma, c_register_pragma_with_expansion)
9657 (c_invoke_pragma_handler): Changed to work with
9658 internal_pragma_handler.
9659 (c_register_pragma_with_data)
9660 (c_register_pragma_with_expansion_and_data): New functions.
9661
677f3fa8
JM
96622011-06-14 Joseph Myers <joseph@codesourcery.com>
9663
9664 * c-common.c: Include common/common-target.h.
9665 (handle_section_attribute): Use
9666 targetm_common.have_named_sections.
9667 * c-cppbuiltin.c: Include common/common-target.h.
9668 (c_cpp_builtins): Use targetm_common.except_unwind_info.
9669
d7fc8c14
RG
96702011-06-10 Richard Guenther <rguenther@suse.de>
9671
9672 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
9673 to print a IDENTIFIER_NODE.
9674
10e48e39
RO
96752011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9676 Joseph Myers <joseph@codesourcery.com>
9677
9678 * c.opt (fbuilding-libgcc): New option.
9679 * c-cppbuiltin.c (c_cpp_builtins): Define
9680 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
9681
6976ae51
JM
96822011-06-07 Jason Merrill <jason@redhat.com>
9683
3ff60975
JM
9684 * c-common.c (max_tinst_depth): Lower default to 900.
9685
6976ae51
JM
9686 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
9687
009db074
RG
96882011-06-07 Richard Guenther <rguenther@suse.de>
9689
9690 * c-common.c (c_common_nodes_and_builtins): Do not set
9691 size_type_node or call set_sizetype.
9692
b4592b92
DS
96932011-06-07 Dodji Seketeli <dodji@redhat.com>
9694
9695 PR debug/49130
9696 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 9697 type when using pointer comparison to compare types.
b4592b92 9698
014ab419
JW
96992011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
9700
9701 * c.opt: Add -Wdelete-non-virtual-dtor.
9702 * c-opts.c (c_common_handle_option): Include it in -Wall.
9703
4f60111f
NF
97042011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
9705
9706 PR bootstrap/49190
9707
9708 Revert:
9709 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9710
9711 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
9712 not tree_common.
9713
4cc4f2f4
JJ
97142011-05-27 Jakub Jelinek <jakub@redhat.com>
9715
9716 PR c++/49165
9717 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
9718 C++ don't call c_common_truthvalue_conversion on void type arms.
9719
38e01f9e
NF
97202011-05-27 Nathan Froyd <froydnj@codesourcery.com>
9721
9722 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
9723 (stmt_list_stack): Define.
9724 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
9725 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
9726
92e948a8
NF
97272011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9728
9729 * c-common.c (warning_candidate_p): Check for BLOCKs.
9730
a2fc3e63
NF
97312011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9732
9733 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
9734 not tree_common.
9735
0957c029
JJ
97362011-05-25 Jakub Jelinek <jakub@redhat.com>
9737
9738 * c-common.c (def_fn_type): Remove extra va_end.
9739
828fb3ba
JM
97402011-05-23 Jason Merrill <jason@redhat.com>
9741
9742 PR c++/48106
9743 * c-common.c (c_common_get_narrower): New.
9744 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
9745
dde05067
NF
97462011-05-23 Nathan Froyd <froydnj@codesourcery.com>
9747
9748 * c-common.h (check_function_arguments): Tweak prototype of
9749 check_function_arguments.
9750 * c-common.c (check_function_arguments): Likewise. Adjust
9751 calls to check_function_nonnull, check_function_format, and
9752 check_function_sentinel.
9753 (check_function_sentinel): Take a FUNCTION_TYPE rather than
9754 separate attributes and typelist arguments. Use
9755 FOREACH_FUNCTION_ARGS to iterate over argument types.
9756
3c0d13bf
PC
97572011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
9758
9759 * c-common.c (c_common_reswords): Reorder.
9760 * c-common.h (rid): Likewise.
9761
8242dd04
NF
97622011-05-10 Nathan Froyd <froydnj@codesourcery.com>
9763
9764 * c-common.c (def_fn_type): Don't call build_function_type, call
9765 build_function_type_array or build_varargs_function_type_array
9766 instead.
9767 (c_common_nodes_and_builtins): Likewise.
9768
3d528853
NF
97692011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9770
9771 * c-common.c (c_add_case_label): Omit the loc argument to
9772 build_case_label.
9773 * c-common.h (build_case_label): Remove.
9774 * c-semantics.c (build_case_label): Remove.
9775
a04a722b
JM
97762011-05-05 Joseph Myers <joseph@codesourcery.com>
9777
9778 * c-objc.h (objc_start_method_definition): Update prototype.
9779 * stub-objc.c (objc_start_method_definition): Add extra parameter.
9780
e19a18d4
NF
97812011-05-04 Nathan Froyd <froydnj@codesourcery.com>
9782
9783 * c-common.c (check_main_parameter_types): Reindent. Don't use
9784 TYPE_ARG_TYPES directly.
9785 (handle_nonnull_attribute): Likewise.
9786 (sync_resolve_params): Likewise.
9787 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
9788 to check_format_string.
9789 (handle_format_attribute): Likewise.
9790 (check_format_string): Take a function type to examine instead of
9791 a type list. Use a function_arg_iterator to step through argument
9792 types.
9793
c62c040f
RG
97942011-05-04 Richard Guenther <rguenther@suse.de>
9795
9796 * c-common.c (fix_string_type): Use size_int for index type bounds.
9797 (start_fname_decls): Do not pass NULL to build_int_cst.
9798 (c_init_attributes): Likewise.
9799 * c-lex.c (c_lex_with_flags): Likewise.
9800
c12ff9d8
JM
98012011-04-27 Jason Merrill <jason@redhat.com>
9802
9803 * c-common.c (make_tree_vector_from_list): New.
9804 * c-common.h: Declare it.
9805
304dfbe3
RG
98062011-04-26 Richard Guenther <rguenther@suse.de>
9807
9808 PR preprocessor/48248
9809 * c-ppoutput.c (maybe_print_line): Always optimize newlines
9810 for output size with -P.
9811
3c0d13bf
PC
98122011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
9813
9814 * c-common.c (struct c_common_resword): Add __underlying_type.
9815 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
9816
04695783
JM
98172011-04-20 Jim Meyering <meyering@redhat.com>
9818
9819 * c-format.c (init_dollar_format_checking): Remove useless
9820 if-before-free.
9821
0dc33c3c
NP
98222011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
9823
9824 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 9825 (objc_detect_field_duplicates): New.
0dc33c3c 9826 * stub-objc.c: Likewise.
3c0d13bf 9827
c59633d9
NP
98282011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
9829
9830 * stub-objc.c (objc_declare_protocols): Renamed to
9831 objc_declare_protocol.
9832 * c-objc.h: Likewise.
3c0d13bf 9833
32dabdaf
NP
98342011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
9835
9836 * stub-objc.c (objc_declare_class): Updated argument name.
9837
81f653d6
NF
98382011-04-12 Nathan Froyd <froydnj@codesourcery.com>
9839
9840 * c-common.h (c_common_init_ts): Declare.
9841 * c-common.c (c_common_init_ts): Define.
9842
eb345401
NP
98432011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
9844
9845 * c-objc.h (objc_build_message_expr): Updated prototype.
9846 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 9847
a358e188
MJ
98482011-04-12 Martin Jambor <mjambor@suse.cz>
9849
9850 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
9851 of cgraph_node.
9852
e6313a78
RG
98532011-04-11 Richard Guenther <rguenther@suse.de>
9854
9855 * c-common.c (complete_array_type): Build a range type of
9856 proper type.
9857
dcf0c47e
NF
98582011-04-08 Nathan Froyd <froydnj@codesourcery.com>
9859
9860 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
9861 (handle_type_generic_attribute): Likewise.
9862
1ee44b26
JM
98632011-04-07 Jason Merrill <jason@redhat.com>
9864
9865 PR c++/48450
9866 * c-common.c (c_common_truthvalue_conversion): Don't ignore
9867 conversion from C++0x scoped enum.
9868
acce4e77
JM
98692011-04-06 Joseph Myers <joseph@codesourcery.com>
9870
9871 * c-target-def.h: New file.
9872 * c-target.def: New file.
9873 * c-target.h: New file.
9874 * c-common.c (targetcm): Don't define here.
9875 * c-common.h (default_handle_c_option): Declare.
9876 * c-format.c: Include c-target.h instead of target.h.
9877 * c-opts.c: Include c-target.h instead of target.h. Explicitly
9878 include tm.h.
9879 (default_handle_c_option): Move from targhooks.c.
9880
e2eefb55
JJ
98812011-03-29 Jakub Jelinek <jakub@redhat.com>
9882
9883 PR preprocessor/48248
9884 * c-ppoutput.c (print): Add src_file field.
9885 (init_pp_output): Initialize it.
9886 (maybe_print_line): Don't optimize by adding up to 8 newlines
9887 if map->to_file and print.src_file are different file.
9888 (print_line): Update print.src_file.
9889
ba78087b
KT
98902011-03-25 Kai Tietz <ktietz@redhat.com>
9891
9892 * c-ada-spec.c (compare_comment): Use filename_cmp
9893 instead of strcmp for filename.
9894
0edf1bb2
JL
98952011-03-25 Jeff Law <law@redhat.com>
9896
adfac8df 9897 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 9898
c7dc8804
JM
98992011-03-25 Jason Merrill <jason@redhat.com>
9900
9901 * c.opt: Add -std=c++03.
9902
d1d879b1
EB
99032011-03-22 Eric Botcazou <ebotcazou@adacore.com>
9904
9905 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
9906
3f8257db 99072011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
9908
9909 PR target/12171
5050afdf
KT
9910 * c-pretty-print.c (pp_c_specifier_qualifier_list):
9911 Display allowed attributes for function pointer types.
9912 (pp_c_attributes_display): New function to display
9913 attributes having affects_type_identity flag set to true.
9914 * c-pretty-print.h (pp_c_attributes_display): New prototype.
9915
62d784f7
KT
9916 * c-common.c (c_common_attribute_table):
9917 Add new element.
9918 (c_common_format_attribute_table): Likewise.
9919
82d37118
JM
99202011-03-18 Jason Merrill <jason@redhat.com>
9921
49a000c3
JM
9922 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
9923 * c-common.h: Don't declare it here.
9924 * c-common.c: Or define it here.
9925 * c-opts.c (c_common_handle_option): Or set it here.
9926
82d37118
JM
9927 PR c++/35315
9928 * c-common.c (handle_transparent_union_attribute): Don't
9929 make a duplicate type in C++.
9930
17bc631c
JM
99312011-03-15 Jason Merrill <jason@redhat.com>
9932
9933 * c-common.c (max_constexpr_depth): New.
9934 * c-common.h: Declare it.
9935 * c-opts.c (c_common_handle_option): Set it.
9936 * c.opt (fconstexpr-depth): New option.
9937
1b9b91a6
JM
99382011-03-11 Jason Merrill <jason@redhat.com>
9939
f231b5ff
JM
9940 * c-common.c (attribute_takes_identifier_p): Add missing const.
9941
1b9b91a6
JM
9942 PR c++/46803
9943 * c-common.c (attribute_takes_identifier_p): Assume that an
9944 unknown attribute takes an identifier.
9945
a19e4d44
NF
99462011-03-07 Nathan Froyd <froydnj@codesourcery.com>
9947
9948 PR c/47786
9949 * c-common.c (c_type_hash): Call list_length instead of iterating
9950 through DECL_CHAIN. Rename 'i' to 'n_elements'.
9951
982d62f6
JJ
99522011-02-19 Jakub Jelinek <jakub@redhat.com>
9953
9954 PR c/47809
9955 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
9956
0a256240
NP
99572011-02-17 Iain Sandoe <iains@gcc.gnu.org>
9958
9959 * c.opt (fobjc-abi-version=) New.
9960 (fobjc-nilcheck): New.
9961
ba9e6dd5
NF
99622011-02-03 Nathan Froyd <froydnj@codesourcery.com>
9963
9964 PR c++/46890
9965 * c-common.h (keyword_is_decl_specifier): Declare.
9966 * c-common.c (keyword_is_decl_specifier): Define.
9967 (keyword_is_function_specifier): New function.
9968
7273813a
JJ
99692011-01-26 Jakub Jelinek <jakub@redhat.com>
9970
9971 PR c/47473
9972 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
9973 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
9974 REAL_TYPE.
9975
908ef79b
AC
99762011-01-26 Arnaud Charlet <charlet@adacore.com>
9977
9978 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
9979
237e9384
JJ
99802011-01-26 Jakub Jelinek <jakub@redhat.com>
9981
9982 PR pch/47430
9983 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
9984 after init_c_lex if pch_file is set.
9985
47ea1edf
DK
99862011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
9987
d4dba752 9988 PR c++/43601
47ea1edf
DK
9989 * c.opt (-fkeep-inline-dllexport): New switch.
9990
2aa9c6ae
RG
99912011-01-12 Richard Guenther <rguenther@suse.de>
9992
9993 PR middle-end/32511
9994 * c-common.c (handle_weak_attribute): Warn instead of error
9995 on declaring an inline function weak.
9996
7bd11157
TT
99972011-01-05 Tom Tromey <tromey@redhat.com>
9998
9999 * c-common.h (lvalue_error): Update.
10000 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
10001 not error.
10002
0e66e494 100032010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 10004
b4f588c4
NP
10005 PR objc/47075
10006 * c-objc.h (objc_finish_message_expr): Added argument to
10007 prototype.
10008
f4da8dce
NF
100092010-12-22 Nathan Froyd <froydnj@codesourcery.com>
10010
10011 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
10012 Use prototype_p.
10013
46270f14
NP
100142010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
10015
10016 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 10017 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 10018
4816c593
NF
100192010-12-10 Nathan Froyd <froydnj@codesourcery.com>
10020
10021 * c-common.h (readonly_error): Declare.
10022 * c-common.c (readonly_error): Define.
10023
7a6daeb0
NF
100242010-12-09 Nathan Froyd <froydnj@codesourcery.com>
10025
10026 * c-common.h (invalid_indirection_error): Declare.
10027 * c-common.c (invalid_indirection_error): Define.
10028
892f6119
RG
100292010-12-03 Richard Guenther <rguenther@suse.de>
10030
10031 PR c/46745
10032 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
10033 (pp_c_unary_expression): Likewise.
10034 (pp_c_expression): Likewise.
10035
6c39e757
NP
100362010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
10037
10038 * c-common.h (objc_finish_function): New.
10039 (objc_non_volatilized_type): Removed.
10040 (objc_type_quals_match): Removed.
10041 * stub-objc.c (objc_finish_function): New.
10042 (objc_non_volatilized_type): Removed.
10043 (objc_type_quals_match): Removed.
9faeb493 10044
7c475d11
JM
100452010-11-30 Joseph Myers <joseph@codesourcery.com>
10046
10047 * c-common.h (parse_optimize_options): Declare.
10048 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
10049 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
10050
71f3e391
JM
100512010-11-29 Joseph Myers <joseph@codesourcery.com>
10052
10053 * c-opts.c (check_deps_environment_vars): Use getenv instead of
10054 GET_ENVIRONMENT.
10055 * c-pch.c (O_BINARY): Don't define here.
10056 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
10057
d5fabb58
JM
100582010-11-25 Joseph Myers <joseph@codesourcery.com>
10059
10060 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
10061 targetm.except_unwind_info.
10062
299404a1
JM
100632010-11-23 Joseph Myers <joseph@codesourcery.com>
10064
10065 * c-opts.c (c_common_handle_option): Pass location to
10066 set_struct_debug_option.
10067
c98cd5bf
JM
100682010-11-23 Joseph Myers <joseph@codesourcery.com>
10069
10070 * c-common.c (visibility_options): Move from ../opts.c.
10071 * c-common.h (struct visibility_flags, visibility_options):
10072 Declare here.
10073 * c-opts.c (finish_options): Rename to c_finish_options.
10074 (c_common_init): Update call to finish_options.
10075
a9546771
NP
100762010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
10077
10078 PR objc/34033
10079 * c-lex.c (lex_string): Check that each string in an Objective-C
10080 string concat sequence starts with either one or zero '@', and
10081 that there are no spurious '@' signs at the end.
10082
24a57808
JM
100832010-11-20 Joseph Myers <joseph@codesourcery.com>
10084
10085 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
10086 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
10087 HANDLE_PRAGMA_VISIBILITY.
10088 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
10089 HANDLE_PRAGMA_VISIBILITY): Don't define.
10090 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
10091
a9aa2c3a
NF
100922010-11-20 Nathan Froyd <froydnj@codesourcery.com>
10093
10094 PR c++/16189
10095 PR c++/36888
10096 PR c++/45331
10097 * c-common.h (keyword_begins_type_specifier): Declare.
10098 (keyword_is_storage_class_specifier): Declare.
10099 (keyword_is_type_qualifier): Declare.
10100 * c-common.c (keyword_begins_type_specifier): New function.
10101 (keyword_is_storage_class_specifier): New function.
10102 (keyword_is_type_qualifier): Declare.
10103
5386338c
JM
101042010-11-19 Joseph Myers <joseph@codesourcery.com>
10105
10106 PR c/46547
10107 * c-common.c (in_late_binary_op): Define.
10108 (c_common_truthvalue_conversion): Check in_late_binary_op before
10109 calling c_save_expr.
10110 * c-common.h (in_late_binary_op): Declare.
10111
69ccdddb
JM
101122010-11-19 Joseph Myers <joseph@codesourcery.com>
10113
10114 * c-opts.c (c_common_handle_option): Update calls to
10115 set_struct_debug_option.
10116
6b192a09
NP
101172010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
10118
10119 * c-common.h (objc_declare_protocols): Added additional argument.
10120 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 10121
fb52b50a
NF
101222010-11-18 Nathan Froyd <froydnj@codesourcery.com>
10123
10124 PR c/33193
10125 * c-common.h (build_real_imag_expr): Declare.
10126 * c-semantics.c (build_real_imag_expr): Define.
10127
b37421c6
JM
101282010-11-17 Joseph Myers <joseph@codesourcery.com>
10129
10130 * c-opts.c (c_common_parse_file): Take no arguments.
10131 * c-common.h (c_common_parse_file): Update prototype.
10132
07078664
JJ
101332010-11-16 Jakub Jelinek <jakub@redhat.com>
10134
10135 PR c++/46401
10136 * c-common.c (warning_candidate_p): Don't track non-const calls
10137 or STRING_CSTs.
10138
c6a13190
ILT
101392010-11-15 Ian Lance Taylor <iant@google.com>
10140
10141 * c-lex.c (init_c_lex): Set macro debug callbacks if
10142 flag_dump_go_spec is set.
10143
925e8657
NP
101442010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
10145
10146 * c-common.h (objc_build_incr_expr_for_property_ref): New.
10147 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
10148
bb0a9581
NF
101492010-11-15 Nathan Froyd <froydnj@codesourcery.com>
10150
10151 PR preprocessor/45038
10152 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
10153 dialects.
10154
c5fa0890
JM
101552010-11-12 Joseph Myers <joseph@codesourcery.com>
10156
10157 * c-common.h (c_family_lang_mask): Declare.
10158 * c-opts.c (c_family_lang_mask): Make extern.
10159 * c-pragma.c (handle_pragma_diagnostic): Use
10160 control_warning_option.
10161
a4d8c676
JM
101622010-11-12 Joseph Myers <joseph@codesourcery.com>
10163
10164 * c-common.c (parse_optimize_options): Update call to
10165 decode_options.
10166 * c-common.h (c_common_handle_option): Update prototype.
10167 * c-opts.c (c_common_handle_option): Take location_t parameter and
10168 pass it to other functions.
10169
f954bd2c
JM
101702010-11-11 Joseph Myers <joseph@codesourcery.com>
10171
10172 * c-opts.c (warning_as_error_callback): Remove.
10173 (c_common_initialize_diagnostics): Don't call
10174 register_warning_as_error_callback.
10175 (c_common_handle_option): Handle -Werror=normalized= here.
10176
d8a07487
JM
101772010-11-10 Joseph Myers <joseph@codesourcery.com>
10178
10179 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
10180 in diagnostic.
10181 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
10182 letter.
10183 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
10184 Remove trailing '.' from diagnostics.
10185 * c.opt (Wwrite-strings_: Avoid '`' in help text.
10186
d5478783
JM
101872010-11-10 Joseph Myers <joseph@codesourcery.com>
10188
10189 * c-common.c (parse_optimize_options): Pass global_dc to
10190 decode_options.
10191 * c-opts.c (c_common_handle_option): Pass &global_options to
10192 set_Wstrict_aliasing.
10193 * c.opt (v): Don't mark Common or document here.
10194
91ebb981
IS
101952010-11-06 Iain Sandoe <iains@gcc.gnu.org>
10196
10197 PR target/44981
10198 * c-format.c (format_type): New type gcc_objc_string_format_type.
10199 (valid_stringptr_type_p): New.
10200 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 10201 (check_format_string): Pass expected type, use
91ebb981
IS
10202 valid_stringptr_type_p (), check that the format string types are
10203 consistent with the format specification.
10204 (decode_format_attr): Warn if NSString is used outside objective-c.
10205 (format_types_orig): Add NSString.
10206 (format_name): New.
10207 (format_flags): New.
10208 (check_format_arg): Handle format strings requiring an external parser.
10209 first_target_format_type: New variable.
10210 (handle_format_attribute): Set up first_target_format_type, pass the
10211 expected format arg string type to check_format_string().
ab20d992 10212 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
91ebb981
IS
10213 * stub-objc.c (objc_string_ref_type_p): New.
10214 (objc_check_format_arg): New.
10215
bede2adc
NP
102162010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
10217
9faeb493 10218 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
10219 * c-common.h (objc_build_class_component_ref): New.
10220 * stub-objc.c (objc_build_class_component_ref): New.
10221
9a179d01
NP
102222010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
10223
10224 * c.opt (Wproperty-assign-default): New option.
10225
22d8d616
NP
102262010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
10227
10228 Implemented -fobjc-std=objc1 flag.
10229 * c.opt (fobjc-std=objc1): New option.
10230
2debdb4f
NP
102312010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
10232
10233 Implemented format and noreturn attributes for Objective-C methods.
10234 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
10235 attribute for Objective-C methods.
10236
ec52b111
JM
102372010-10-31 Jason Merrill <jason@redhat.com>
10238
10239 * c-common.c (conversion_warning, warn_for_collisions_1): Use
10240 EXPR_LOC_OR_HERE.
10241
46a88c12
NP
102422010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
10243
10244 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
10245 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
10246 (objc_add_property_declaration): Removed arguments for copies and
10247 ivar.
10248 (objc_build_getter_call): Renamed to
10249 objc_maybe_build_component_ref.
10250 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
10251 (objc_is_property_ref): New.
10252 * c-common.c (c_common_reswords): Removed copies and ivar.
10253 * stub-objc.c (objc_add_property_declaration): Removed arguments
10254 for copies and ivar.
10255 (objc_build_getter_call): Renamed to
10256 objc_maybe_build_component_ref.
10257 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
10258 (objc_is_property_ref): New.
9faeb493 10259
1e4bf85b
AC
102602010-10-29 Arnaud Charlet <charlet@adacore.com>
10261 Matthew Gingell <gingell@adacore.com>
10262
10263 * c-ada-spec.c (separate_class_package): New function.
10264 (pp_ada_tree_identifier): Prefix references to C++ classes with the
10265 name of their enclosing package.
10266 (print_ada_declaration): Use separate_class_package.
10267
81f0bab2
JM
102682010-10-27 Jason Merrill <jason@redhat.com>
10269
2b08f2c5
JM
10270 * c-common.c (c_common_reswords): Add __is_literal_type.
10271 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
10272
81f0bab2
JM
10273 * c-common.c (check_case_value): Remove special C++ code.
10274
200290f2
NP
102752010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
10276
10277 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
10278 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
10279 and RID_LAST_PATTR.
10280 (objc_add_property_declaration): Added additional arguments.
10281 (objc_property_attribute_kind): Removed.
10282 (objc_set_property_attr): Removed.
10283 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
10284 copy and nonatomic.
10285 * stub-objc.c (objc_add_property_declaration): Added additional
10286 arguments.
10287 (objc_set_property_attr): Removed.
9faeb493 10288
f614132b
NP
102892010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
10290
10291 * c-common.h (objc_add_property_variable): Renamed to
10292 objc_add_property_declaration. Added location argument.
10293 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 10294
b8a18805
NP
102952010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
10296
10297 * c-common.h (objc_maybe_printable_name): New.
10298 * stub-objc.c (objc_maybe_printable_name): New.
10299
3f8257db
JJ
103002010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
10301 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
10302
10303 * c-common.h (c_common_mark_addressable_vec): Declare.
10304 * c-common.c (c_common_mark_addressable_vec): New function.
10305
249a82c4
NP
103062010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
10307
10308 * c-common.h (objc_set_method_type): Removed.
10309 (objc_add_method_declaration): Added boolean argument.
10310 (objc_start_method_definition): Same change.
10311 (objc_build_method_signature): Same change.
10312 * stub-objc.c (objc_set_method_type): Removed.
10313 (objc_add_method_declaration): Added boolean argument.
10314 (objc_start_method_definition): Same change.
10315 (objc_build_method_signature): Same change.
10316
977e30bc
NP
103172010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
10318
10319 * c-common.h (finish_file): Removed.
10320 (objc_write_global_declarations): New.
10321 * c-opts.c (c_common_parse_file): Do not call finish_file.
10322 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 10323
da57d1b9
NP
103242010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
10325
10326 Implemented parsing @synthesize and @dynamic for
10327 Objective-C/Objective-C++.
10328 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
10329 (objc_add_synthesize_declaration): New.
10330 (objc_add_dynamic_declaration): New.
10331 * c-common.c (c_common_reswords): Add synthesize and dynamic.
10332 * stub-objc.c (objc_add_synthesize_declaration): New.
10333 (objc_add_dynamic_declaration): New.
9faeb493 10334
0069111f
MM
103352010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
10336
10337 PR target/46041
10338 * c-cppbuiltin.c (mode_has_fma): Move function here from
10339 builtins.c. Don't use the fma optab, instead just use the
10340 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
10341 using -save-temps.
10342
e426b47b
NP
103432010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
10344
10345 Merge from 'apple/trunk' branch on FSF servers.
0069111f 10346
3f8257db 10347 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 10348
9faeb493 10349 Radar 4330422
e426b47b
NP
10350 * c-common.h (objc_non_volatilized_type): New declaration
10351 * stub-objc.c (objc_non_volatilized_type): New stub.
10352
90fbfdc3
NP
103532010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
10354
e426b47b 10355 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 10356
ab20d992 10357 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 10358
9faeb493 10359 Radar 4133425
90fbfdc3 10360 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 10361 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 10362
c37d8c30
IS
103632010-10-17 Iain Sandoe <iains@gcc.gnu.org>
10364
10365 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
10366 * c-common.h (enum rid): Add RID_AT_PACKAGE.
10367 (objc_ivar_visibility_kind): New enum.
10368 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 10369 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
10370 visibility enum.
10371
1b1562a5
MM
103722010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
10373
10374 * c-cppbuiltin.c (builtin_define_float_constants): Emit
10375 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
10376 has the appropriate fma builtins.
10377 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
10378
668ea4b1
IS
103792010-10-14 Iain Sandoe <iains@gcc.gnu.org>
10380
1b1562a5 10381 merge from FSF apple 'trunk' branch.
3f8257db 10382 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 10383
668ea4b1
IS
10384 Radars 4436866, 4505126, 4506903, 4517826
10385 * c-common.c (c_common_resword): Define @property and its attributes.
10386 * c-common.h: Define property attribute enum entries.
10387 (OBJC_IS_PATTR_KEYWORD): New.
10388 (objc_property_attribute_kind): New enum.
10389 Declare objc_set_property_attr (), objc_add_property_variable (),
10390 objc_build_getter_call () and objc_build_setter_call ().
10391 * stub-objc.c (objc_set_property_attr): New stub.
10392 (objc_add_property_variable): Likewise.
10393 (objc_build_getter_call): Likewise.
10394 (objc_build_setter_call) Likewise.
1b1562a5 10395
a1178b30
IS
103962010-10-13 Iain Sandoe <iains@gcc.gnu.org>
10397
1b1562a5 10398 merge from FSF apple 'trunk' branch.
ab20d992 10399 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
10400
10401 Radar 3803157 (method attributes)
10402 * c-common.c (handle_deprecated_attribute): Recognize
10403 objc methods as valid declarations.
10404 * c-common.h: Declare objc_method_decl ().
1b1562a5 10405 * stub-objc.c (objc_method_decl): New stub.
a1178b30 10406
a75bfaa6
JM
104072010-10-08 Joseph Myers <joseph@codesourcery.com>
10408
10409 * c-common.c (parse_optimize_options): Call
10410 decode_cmdline_options_to_array_default_mask before
10411 decode_options. Update arguments to decode_options.
10412 * c-common.h (c_common_init_options_struct): Declare.
10413 * c-opts.c (c_common_init_options_struct): New. Split out from
10414 c_common_init_options.
10415
f05b9d93
NP
104162010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
10417
10418 Implemented fast enumeration for Objective-C.
10419 * c-common.h (objc_finish_foreach_loop): New.
10420 * stub-objc.c (objc_finish_foreach_loop): New.
10421
1ebe4b4f
JM
104222010-10-05 Joseph Myers <joseph@codesourcery.com>
10423
10424 * c-common.h (struct diagnostic_context): Don't declare here.
10425 (c_common_initialize_diagnostics): Declare using
10426 diagnostic_context typedef.
10427 * c-opts.c (c_common_handle_option): Pass global_dc to
10428 handle_generated_option.
10429
d4d24ba4
JM
104302010-10-04 Joseph Myers <joseph@codesourcery.com>
10431
10432 * c-opts.c (c_common_handle_option): Pass &global_options_set to
10433 handle_generated_option.
10434
478a1c5b
ILT
104352010-10-03 Ian Lance Taylor <iant@google.com>
10436
10437 * c.opt (-fplan9-extensions): New option.
10438
82a1c2fe
FXC
104392010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
10440
10441 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
10442 Remove.
10443 (c_cpp_builtins): Call functions from cppbuiltin.c instead
10444 of duplicating code.
10445
92902b1b
IS
104462010-09-30 Iain Sandoe <iains@gcc.gnu.org>
10447
10448 * c-common.c: Add two new entries for @optional
10449 and @required keywords.
10450
10451 merge from FSF 'apple/trunk' branch.
3f8257db 10452 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
10453
10454 Radar 4386773
10455 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
10456 objective-c keywords.
10457 (objc_set_method_opt): New declaration.
10458 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 10459
46625112
JM
104602010-09-30 Joseph Myers <joseph@codesourcery.com>
10461
10462 * c-common.c (handle_optimize_attribute): Pass &global_options to
10463 cl_optimization_save and cl_optimization_restore.
10464 * c-opts.c (c_common_handle_option): Pass &global_options to
10465 handle_generated_option.
10466 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
10467 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
10468 &global_options to cl_optimization_restore.
10469
49b91f05
NP
104702010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
10471
10472 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
10473 Objective-C/Objective-C++ keywords.
10474
13ed556f 104752010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 10476
9faeb493
UB
10477 Merge from 'apple/trunk' branch on FSF servers.
10478
3f8257db 10479 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
10480
10481 Radar 4281748
10482 * c-common.h (objc_check_global_decl): New declaration.
10483 * stub-objc.c (objc_check_global_decl): New stub.
10484
f0036cca
JM
104852010-09-29 Joseph Myers <joseph@codesourcery.com>
10486
10487 * c.opt: Don't use VarExists.
10488
e3339d0f
JM
104892010-09-29 Joseph Myers <joseph@codesourcery.com>
10490
10491 * c-common.c (c_cpp_error): Update names of diagnostic_context
10492 members.
10493 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
10494 cl_optimization members.
10495 * c-opts.c (warning_as_error_callback, c_common_handle_option,
10496 sanitize_cpp_opts, finish_options): Update names of cpp_options
10497 members.
10498
1973201f
NP
104992010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
10500
10501 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
10502 (objc_is_reserved_word): Removed.
10503 * c-common.c: Updated comments.
10504 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
10505 objc_is_reserved_word.
10506 * stub-objc.c (objc_is_reserved_word): Removed.
10507
f7e71da5
IS
105082010-09-28 Iain Sandoe <iains@gcc.gnu.org>
10509
9faeb493 10510 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
10511 include attributes.
10512 (objc_start_method_definition): Likewise.
10513 (objc_build_keyword_decl): Likewise.
10514 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
10515 (objc_start_method_definition): Likewise.
10516 (objc_build_keyword_decl): Likewise.
10517
c165dca7
IS
105182010-09-28 Iain Sandoe <iains@gcc.gnu.org>
10519
10520 * c-common.h (objc_start_class_interface): Adjust prototype.
10521 (objc_start_category_interface): Likewise.
10522 (objc_start_protocol): Likewise.
10523 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
10524 (objc_start_class_interface): Likewise.
10525 (objc_start_category_interface): Likewise.
10526
7458026b
ILT
105272010-09-27 Ian Lance Taylor <iant@google.com>
10528
10529 * c-common.c (c_common_attribute_table): Add no_split_stack.
10530 (handle_no_split_stack_attribute): New static function.
10531
b581b85b
NP
105322010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
10533
9faeb493 10534 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 10535
3f8257db 10536 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 10537
9faeb493 10538 Radar 4229905
b581b85b
NP
10539 * c-common.h (objc_have_common_type): New declaration.
10540 * stub-objc.c (objc_have_common_type): New stub.
10541
10542 2005-06-22 Ziemowit Laski <zlaski@apple.com>
10543
10544 Radar 4154928
10545 * c-common.h (objc_common_type): New prototype.
9faeb493 10546 * stub-objc.c (objc_common_type): New stub.
b581b85b 10547
46a4da10
JH
105482010-09-24 Jan Hubicka <jh@suse.cz>
10549
10550 * c-common.c (handle_leaf_attribute): New function.
10551 (struct attribute_spec c_common_att): Add leaf.
10552
e200444e
JM
105532010-09-22 Joseph Myers <joseph@codesourcery.com>
10554
10555 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
10556 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
10557 -dump, -dump=, -imacros, -imacros=, -include, -include=,
10558 -include-barrier, -include-directory, -include-directory=,
10559 -include-directory-after, -include-directory-after=,
10560 -include-prefix, -include-prefix=, -include-with-prefix,
10561 -include-with-prefix=, -include-with-prefix-after,
10562 -include-with-prefix-after=, -include-with-prefix-before,
10563 -include-with-prefix-before=, -no-integrated-cpp,
10564 -no-line-commands, -no-standard-includes, -no-warnings, -output,
10565 -output=, -pedantic, -pedantic-errors, -preprocess,
10566 -print-missing-file-dependencies, -trace-includes, -traditional,
10567 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
10568 -user-dependencies, -verbose, -write-dependencies,
10569 -write-user-dependencies, no-integrated-cpp, traditional): New.
10570
29a80ea6
NP
105712010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
10572
10573 PR objc/23710
ac1fc2fc
NP
10574 * c-common.h (objc_start_method_definition): Return bool instead
10575 of void.
10576 * stub-objc.c (objc_start_method_definition): Return bool instead
10577 of void.
10578
105792010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
10580
10581 PR objc/25965
10582 * c-common.h (objc_get_interface_ivars): New declaration.
10583 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 10584
de621752
ILT
105852010-09-15 Ian Lance Taylor <iant@google.com>
10586
10587 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 10588 messages. Remove period at end of warning message.
de621752 10589
ba885ec5
NS
105902010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10591
10592 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
10593 (handle_alias_attribute): ... here.
10594 (handle_ifunc_attribute): New.
10595
c5ee1358
MM
105962010-09-06 Mark Mitchell <mark@codesourcery.com>
10597
10598 * c-common.h (do_warn_double_promotion): Declare.
10599 * c-common.c (do_warn_double_promotion): Define.
10600
0a0b3574
MM
106012010-09-05 Mark Mitchell <mark@codesourcery.com>
10602
10603 * c.opt (Wdouble-promotion): New.
10604
d1779886
JM
106052010-09-02 Joseph Myers <joseph@codesourcery.com>
10606
10607 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
10608 fvtable-thunks, fxref): Mark no longer supported in help text.
10609
2d2bd949
JM
106102010-09-02 Joseph Myers <joseph@codesourcery.com>
10611
10612 * c.opt (Wimport, fall-virtual, falt-external-templates,
10613 fdefault-inline, fenum-int-equiv, fexternal-templates,
10614 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
10615 fname-mangling-version-, fnew-abi, fnonnull-objects,
10616 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
10617 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
10618 applicable.
10619 (fhandle-exceptions): Mark with Alias and Warn.
10620 * c-opts.c (c_common_handle_option): Don't handle options marked
10621 as ignored.
10622
5de8299c
JM
106232010-09-02 Joseph Myers <joseph@codesourcery.com>
10624
10625 * c.opt (Wcomments, Werror-implicit-function-declaration,
10626 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
10627 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
10628 aliases.
10629 * c-common.c (option_codes): Use OPT_Wcomment instead of
10630 OPT_Wcomments.
10631 * c-opts.c (warning_as_error_callback, c_common_handle_option):
10632 Don't handle options marked as aliases.
10633
0ceb0201
RG
106342010-08-25 Richard Guenther <rguenther@suse.de>
10635
10636 * c-common.c (c_common_get_alias_set): Remove special
10637 handling for pointers.
10638
ac47786e
NF
106392010-08-20 Nathan Froyd <froydnj@codesourcery.com>
10640
10641 * c-common.c: Use FOR_EACH_VEC_ELT.
10642 * c-gimplify.c: Likewise.
10643 * c-pragma.c: Likewise.
10644
c878765b
JM
106452010-08-16 Joseph Myers <joseph@codesourcery.com>
10646
10647 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
10648 RejectDriver.
10649 (MMDX): Change back to MMD. Mark NoDriverArg instead of
10650 RejectDriver.
10651 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
10652 instead of OPT_MDX and OPT_MMDX.
10653
603349bf
JM
106542010-08-16 Joseph Myers <joseph@codesourcery.com>
10655
10656 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
10657
644fa7ac
JM
106582010-08-12 Joseph Myers <joseph@codesourcery.com>
10659
10660 * c.opt (MD, MMD): Change to MDX and MMDX.
10661 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
10662
481e1176
JM
106632010-08-11 Joseph Myers <joseph@codesourcery.com>
10664
10665 * c-opts.c (c_common_handle_option): Call handle_generated_option
10666 instead of handle_option.
10667
ac8dc9f7
NF
106682010-08-08 Nathan Froyd <froydnj@codesourcery.com>
10669
10670 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
10671 (maybe_apply_renaming_pragma): Delete unneeded declarations.
10672
4f8c876d
NF
106732010-08-08 Nathan Froyd <froydnj@codesourcery.com>
10674
10675 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
10676 (pending_redefine_extname): Change type to a VEC.
10677 (add_to_renaming_pragma_list): Update for new type of
10678 pending_redefine_extname.
ac8dc9f7 10679 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 10680
3b0c690e
AC
106812010-08-04 Arnaud Charlet <charlet@adacore.com>
10682
10683 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
10684 visited.
10685 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
10686 decide whether a type has already been declared/seen.
10687 Do not go to the original type.
10688 (dump_nested_types): New parameter forward.
10689 Generate forward declaration if needed and mark type as visited.
10690 (print_ada_declaration): Call dump_nested_types if not already done.
10691 Mark types as visited.
10692
1890bccc
JM
106932010-08-03 Joseph Myers <joseph@codesourcery.com>
10694
10695 * c.opt (-print-pch-checksum): Remove option.
10696 * c-opts.c (c_common_handle_option): Don't handle
10697 OPT_print_pch_checksum.
10698
5f20c657
JM
106992010-07-27 Joseph Myers <joseph@codesourcery.com>
10700
10701 * c-common.h (c_common_handle_option): Update prototype and return
10702 value type.
10703 * c-opts.c (c_common_handle_option): Update prototype and return
10704 value type. Update calls to handle_option and
10705 enable_warning_as_error.
10706
f551f80c
JJ
107072010-07-27 Jakub Jelinek <jakub@redhat.com>
10708
10709 PR c/45079
10710 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
10711
61ff2bdc
JM
107122010-07-27 Joseph Myers <joseph@codesourcery.com>
10713
10714 * c-common.h (c_common_missing_argument): Remove.
10715 * c-opts.c (c_common_missing_argument): Remove.
10716 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
10717 idirafter, imacros, include, isysroot, isystem, iquote): Add
10718 MissingArgError.
10719 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
10720
7a9bf9a4
JM
107212010-07-27 Joseph Myers <joseph@codesourcery.com>
10722
10723 * c-common.h (c_common_option_lang_mask,
10724 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
10725 New.
10726 (c_common_init_options): Update prototype.
10727 * c-opts.c (c_common_option_lang_mask): New.
10728 (c_common_initialize_diagnostics): Split out of
10729 c_common_init_options.
10730 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
10731 New.
10732 (c_common_init_options): Update prototype. Use decoded options in
10733 search for -lang-asm.
10734
910ad8de
NF
107352010-07-15 Nathan Froyd <froydnj@codesourcery.com>
10736
10737 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
10738 * c-format.c: Likewise.
10739
718f9c0f
MLI
107402010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
10741
10742 * c-common.h: Include diagnostic-core.h. Error if already
10743 included.
10744 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
10745
4d451982
MLI
107462010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
10747
adfac8df 10748 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
10749 Do not include expr.h
10750 (vector_mode_valid_p): Move here.
10751
119fe915
SB
107522010-06-21 DJ Delorie <dj@redhat.com>
10753
10754 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
10755 allow these pragmas anywhere.
10756
107572010-06-14 Jakub Jelinek <jakub@redhat.com>
10758
10759 PR bootstrap/44509
10760 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
10761 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
10762 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
10763 ggc_strdup instead of xstrdup.
10764
107652010-06-10 Jakub Jelinek <jakub@redhat.com>
10766
10767 * c-cppbuiltin.c: Include cpp-id-data.h.
10768 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
10769 (lazy_hex_fp_value): New function.
10770 (builtin_define_with_hex_fp_value): Provide definitions lazily.
10771
6662d794
MLI
107722010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
10773
10774 * c-gimplify.c: Do not include tree-flow.h
10775
38f8b050
JR
107762010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
10777
10778 PR other/44034
10779 * c-common.c: Rename targetm member:
10780 targetm.enum_va_list -> targetm.enum_va_list_p
10781
9589f23e
AS
107822010-06-28 Anatoly Sokolov <aesok@post.ru>
10783
10784 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
10785
3b06d379
SB
107862010-06-28 Steven Bosscher <steven@gcc.gnu.org>
10787
10788 * c-cppbuiltin.c: Do not include except.h.
10789
d166d4c3
AK
107902010-06-24 Andi Kleen <ak@linux.intel.com>
10791
9faeb493
UB
10792 * c-common.c (warn_for_omitted_condop): New.
10793 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 10794
70cb8be6
JM
107952010-06-21 Joseph Myers <joseph@codesourcery.com>
10796
10797 * c.opt (lang-objc): Remove.
10798 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
10799
a4c97feb
JR
108002010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
10801
10802 * c-opts.c: Include "tm_p.h".
10803
6e2f1956
JM
108042010-06-20 Joseph Myers <joseph@codesourcery.com>
10805
10806 * c-common.c (parse_optimize_options): Update call to
10807 decode_options.
10808
bc87224e
NF
108092010-06-18 Nathan Froyd <froydnj@codesourcery.com>
10810
10811 * c-common.c (record_types_used_by_current_var_decl): Adjust for
10812 new type of types_used_by_cur_var_decl.
10813
b49cf425
JR
108142010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
10815
10816 PR bootstrap/44512
10817 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
10818 for C++ standard compliance.
10819
59f9c2ed
JM
108202010-06-16 Jason Merrill <jason@redhat.com>
10821
10822 * c.opt: Add -Wnoexcept.
10823
33766b66
RG
108242010-06-16 Richard Guenther <rguenther@suse.de>
10825
10826 PR c/44555
10827 * c-common.c (c_common_truthvalue_conversion): Remove
10828 premature and wrong optimization concering ADDR_EXPRs.
10829
eff7e30c
AC
108302010-06-15 Arnaud Charlet <charlet@adacore.com>
10831
10832 * c-ada-spec.c (dump_sloc): Remove column info.
10833 (is_simple_enum): New function.
10834 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
10835 enum types when relevant.
10836
6312e84d
MLI
108372010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
10838
9faeb493 10839 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
10840 location.
10841
1cb42611
JM
108422010-06-10 Joseph Myers <joseph@codesourcery.com>
10843
10844 * c-opts.c (c_common_handle_option): Don't handle
10845 OPT_fshow_column.
10846
a9429e29
LB
108472010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
10848
10849 * c-pragma.c (push_alignment): Use typed GC allocation.
10850 (handle_pragma_push_options): Likewise.
10851
10852 * c-common.c (parse_optimize_options): Likewise.
10853
10854 * c-common.h (struct sorted_fields_type): Add variable_size GTY
10855 option.
10856
5498f011
JM
108572010-06-07 Joseph Myers <joseph@codesourcery.com>
10858
10859 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
10860 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
10861 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
10862 flag_signed_bitfields, warn_strict_null_sentinel,
10863 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
10864 flag_gen_declaration, flag_no_gnu_keywords,
10865 flag_implement_inlines, flag_implicit_templates,
10866 flag_implicit_inline_templates, flag_optional_diags,
10867 flag_elide_constructors, flag_default_inline, flag_rtti,
10868 flag_conserve_space, flag_access_control, flag_check_new,
10869 flag_new_for_scope, flag_weak, flag_working_directory,
10870 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
10871 flag_enforce_eh_specs, flag_threadsafe_statics,
10872 flag_pretty_templates): Remove.
10873 * c-common.h (flag_preprocess_only, flag_nil_receivers,
10874 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
10875 flag_replace_objc_classes, flag_undef, flag_no_builtin,
10876 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
10877 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
10878 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
10879 flag_no_gnu_keywords, flag_implement_inlines,
10880 flag_implicit_templates, flag_implicit_inline_templates,
10881 flag_optional_diags, flag_elide_constructors, flag_default_inline,
10882 flag_rtti, flag_conserve_space, flag_access_control,
10883 flag_check_new, flag_new_for_scope, flag_weak,
10884 flag_working_directory, flag_use_cxa_atexit,
10885 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
10886 flag_threadsafe_statics, flag_pretty_templates,
10887 warn_strict_null_sentinel): Remove.
10888 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
10889 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
10890 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
10891 fimplicit-inline-templates, fimplicit-templates,
10892 flax-vector-conversions, fms-extensions, fnil-receivers,
10893 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
10894 frtti, fshort-double, fshort-enums, fshort-wchar,
10895 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
10896 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
10897 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
10898 gen-decls, undef): Use Var.
10899 (fdefault-inline, foptional-diags): Document as doing nothing.
10900 * c-opts.c (c_common_handle_option): Remove cases for options now
10901 using Var. Mark ignored options as such.
10902
39dabefd
SB
109032010-06-05 Steven Bosscher <steven@gcc.gnu.org>
10904
9faeb493 10905 * c-common.c: Moved to here from parent directory.
39dabefd
SB
10906 * c-common.def: Likewise.
10907 * c-common.h: Likewise.
10908 * c-cppbuiltin.c: Likewise.
10909 * c-dump.c: Likewise.
10910 * c-format.c: Likewise.
10911 * c-format.h : Likewise.
10912 * c-gimplify.c: Likewise.
10913 * c-lex.c: Likewise.
10914 * c-omp.c: Likewise.
10915 * c.opt: Likewise.
10916 * c-opts.c: Likewise.
10917 * c-pch.c: Likewise.
10918 * c-ppoutput.c: Likewise.
10919 * c-pragma.c: Likewise.
10920 * c-pragma.h: Likewise.
10921 * c-pretty-print.c: Likewise.
10922 * c-pretty-print.h: Likewise.
10923 * c-semantics.c: Likewise.
10924 * stub-objc.c: Likewise.
10925
10926 * c-common.c: Include gt-c-family-c-common.h.
10927 * c-pragma.c: Include gt-c-family-c-pragma.h.
10928\f
8d9254fc 10929Copyright (C) 2010-2020 Free Software Foundation, Inc.
39dabefd
SB
10930
10931Copying and distribution of this file, with or without modification,
10932are permitted in any medium without royalty provided the copyright
10933notice and this notice are preserved.