]> gcc.gnu.org Git - gcc.git/blame - gcc/c-family/ChangeLog
Add feature test macro for atomic<T>::wait
[gcc.git] / gcc / c-family / ChangeLog
CommitLineData
5fbf0ecb
GA
12020-11-28 Eric Botcazou <ebotcazou@adacore.com>
2
3 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
4 (dump_ada_structure): Also deal with convention, unchecked union and
5 bit-field for nested types. In the latter case, print an Alignment
6 aspect along with the Pack aspect.
7
360258da
GA
82020-11-25 Martin Sebor <msebor@redhat.com>
9
10 PR bootstrap/94982
11 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
12 -Wformat-diag.
13
1e2c9a27
GA
142020-11-24 Martin Sebor <msebor@redhat.com>
15
16 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
17
8e6198d0
GA
182020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
19
20 * c-attribs.c (handle_special_var_sec_attribute): New.
21 (handle_noinit_attribute): Remove.
22 (attr_noinit_exclusions): Rename to...
23 (attr_section_exclusions): ...this, and add "persistent" attribute
24 exclusion.
25 (c_common_attribute_table): Add "persistent" attribute.
26
7a97e2fc
GA
272020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
28
29 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
30 Treat opaque types like other types.
31 (c_pretty_printer::direct_abstract_declarator): Opaque types are
32 supported types.
33
82e5048e
GA
342020-11-20 Martin Sebor <msebor@redhat.com>
35
36 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
37 with fewer arguments.
38
392020-11-20 Martin Sebor <msebor@redhat.com>
40
41 PR middle-end/97879
42 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
43 Error out on invalid modes.
44
452020-11-20 Jakub Jelinek <jakub@redhat.com>
46
47 PR libstdc++/88101
48 * c-common.c (check_builtin_function_arguments): Handle
49 BUILT_IN_CLEAR_PADDING.
50
25bb75f8
GA
512020-11-18 Nathan Sidwell <nathan@acm.org>
52
53 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
54
4dabb037
GA
552020-11-17 Nathan Sidwell <nathan@acm.org>
56
57 * c-common.h (enum c_tree_index): Reorder to place lazy fields
58 after newly-added CTI_MODULE_HWM.
59
602020-11-17 Joseph Myers <joseph@codesourcery.com>
61
62 * c-cppbuiltin.c (builtin_define_float_constants): Define
63 "*_IS_IEC_60559__" macros.
64
652020-11-17 Nathan Sidwell <nathan@acm.org>
66
67 * c-lex.c: #include "langhooks.h".
68 (cb_undef): Maybe call preprocess_undef lang hook.
69 * c-opts.c (c_common_post_options): Maybe call preprocess_options
70 lang hook.
71 (push_command_line_include): Maybe call preprocess_main_file lang
72 hook.
73 (cb_file_change): Likewise.
74 * c-ppoutput.c: #include "langhooks.h.
75 (scan_translation_unit): Maybe call preprocess_token lang hook.
76 (class do_streamer): New, derive from token_streamer.
77 (directives_only_cb): Data pointer is do_streamer, call
78 preprocess_token lang hook.
79 (scan_translation_unit_directives_only): Use do_streamer.
80 (print_line_1): Move src_line recording to after string output.
81 (cb_undef): Maybe call preprocess_undef lang hook.
82
832020-11-17 Nathan Sidwell <nathan@acm.org>
84
85 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
86 code duplicating that functionality.
87
882020-11-17 Jakub Jelinek <jakub@redhat.com>
89
90 PR c/90628
91 * c-common.c (check_builtin_function_arguments)
92 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
93 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
94 for more builtins and argument positions.
95
29c5d9ce
GA
962020-11-16 Iain Sandoe <iain@sandoe.co.uk>
97
98 PR objc/97854
99 * stub-objc.c: Include c-common.h to declare enum rid.
100
77f67db2
GA
1012020-11-13 Jakub Jelinek <jakub@redhat.com>
102
103 PR c++/63287
104 * c-cppbuiltin.c: Include configargs.h.
105 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
106 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
107 "single".
108
1092020-11-13 Gergö Barany <gergo@codesourcery.com>
110 Thomas Schwinge <thomas@codesourcery.com>
111
112 * c.opt (fopenacc-kernels): Add.
113
1142020-11-13 Jason Merrill <jason@redhat.com>
115
116 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
117
1182020-11-13 Piotr H. Dabrowski <phd@phd.re>
119
120 PR c++/91318
121 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
122
1232020-11-13 Martin Liska <mliska@suse.cz>
124
125 * c-attribs.c (build_attr_access_from_parms): Format properly.
126
1272020-11-13 Iain Sandoe <iain@sandoe.co.uk>
128
129 PR objc/90707
130 * c-common.c (c_common_reswords): null_unspecified, nullable,
131 nonnull, null_resettable: New keywords.
132 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
133 RID_NONNULL, RID_NULL_RESETTABLE: New.
134 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
135 ranges accepted for property attributes.
136 * c-attribs.c (handle_objc_nullability_attribute): New.
137 * c-objc.h (enum objc_property_attribute_group): Add
138 OBJC_PROPATTR_GROUP_NULLABLE.
139 (enum objc_property_attribute_kind):Add
140 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
141 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
142
1432020-11-13 Iain Sandoe <iain@sandoe.co.uk>
144
145 PR objc/77404
146 * c-attribs.c (handle_objc_root_class_attribute): New
147 * c-objc.h (objc_start_class_interface): Add a location
148 value for the position of the class name.
149 * c.opt: Add Wobjc-root-class.
150 * stub-objc.c (objc_start_class_interface): Add a location
151 value for the position of the class name.
152
a5a11525
GA
1532020-11-12 Joseph Myers <joseph@codesourcery.com>
154
155 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
156 Allow scope for C. Handle standard attributes for C. Do not
157 accept unscoped attributes if std_syntax and not handled as
158 standard attributes.
159 * c-common.h (c_common_has_attribute): Update prototype.
160
1612020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
162
163 PR pch/86674
164 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
165 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
166
0f5f9ed5
GA
1672020-11-11 Patrick Palka <ppalka@redhat.com>
168
169 PR c++/88115
170 * c-opts.c (c_common_post_options): Update latest_abi_version.
171
bb622641
GA
1722020-11-10 Jakub Jelinek <jakub@redhat.com>
173
174 PR c/97748
175 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
176 to false.
177 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
178 recursively and just return true instead of warning if it is true.
179 Handle COMPLEX_EXPR.
180
1812020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
182
183 * c-common.h (c_omp_adjust_map_clauses): New declaration.
184 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
185 (c_omp_adjust_map_clauses): New function.
186
2bee28dd
GA
1872020-11-09 Marek Polacek <polacek@redhat.com>
188
189 DR 1914
190 * c-common.c (attribute_fallthrough_p): Tweak the warning
191 message.
192
1932020-11-09 Patrick Palka <ppalka@redhat.com>
194
195 * c-pragma.c (handle_pragma_diagnostic): Split the
196 unknown-option -Wpragmas diagnostic into a warning and a
197 subsequent note containing a spelling suggestion. Avoid
198 computing the suggestion if -Wpragmas warnings are being
199 suppressed.
200
2012020-11-09 Patrick Palka <ppalka@redhat.com>
202
203 PR testsuite/97117
204 * c-indentation.c (get_visual_column): Remove location_t
205 parameter. Move the column-tracking diagnostic code from here
206 to ...
207 (should_warn_for_misleading_indentation): ... here, before the
208 early exit for when the loci are not all distinct. Don't pass a
209 location_t argument to get_visual_column.
210 (assert_get_visual_column_succeeds): Don't pass a location_t
211 argument to get_visual_column.
212 (assert_get_visual_column_fails): Likewise.
213
fb95de7a
GA
2142020-11-08 Iain Sandoe <iain@sandoe.co.uk>
215
216 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
217 of keywords accepted in @property attribute contexts.
218 * c-objc.h (enum objc_property_attribute_group): Add
219 OBJC_PROPATTR_GROUP_CLASS.
220 (enum objc_property_attribute_kind): Add
221 OBJC_PROPERTY_ATTR_CLASS.
222
2da7ee05
GA
2232020-11-07 Iain Sandoe <iain@sandoe.co.uk>
224
225 * c-common.c (c_common_reswords): Add 'atomic' property
226 attribute.
227 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
228 property attributes.
229
2302020-11-07 Iain Sandoe <iain@sandoe.co.uk>
231
232 * c-attribs.c (handle_nsobject_attribute): New.
233 * c.opt: Add WNSObject-attribute.
234
44cab2d8
GA
2352020-11-06 Iain Sandoe <iain@sandoe.co.uk>
236
237 * c-objc.h (enum objc_property_attribute_group): New
238 (enum objc_property_attribute_kind): New.
239 (OBJC_PROPATTR_GROUP_MASK): New.
240 (struct property_attribute_info): Small class encapsulating
241 parser output from property attributes.
242 (objc_prop_attr_kind_for_rid): New
243 (objc_add_property_declaration): Simplify interface.
244 * stub-objc.c (enum rid): Dummy type.
245 (objc_add_property_declaration): Simplify interface.
246 (objc_prop_attr_kind_for_rid): New.
247
2482020-11-06 Nathan Sidwell <nathan@acm.org>
249
250 * c-ada-spec.c (collect_ada_nodes): Rename
251 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
252 (collect_ada_node): Likewise.
253 (dump_forward_type): Likewise.
254 * c-common.c (set_underlying_type): Rename
255 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
256 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
257
2582020-11-06 Jakub Jelinek <jakub@redhat.com>
259
260 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
261
0cfd9109
GA
2622020-11-05 Marek Polacek <polacek@redhat.com>
263
264 PR c++/97675
265 * c.opt (Wexceptions): New option.
266
2672020-11-05 Marek Polacek <polacek@redhat.com>
268
269 PR c++/25814
270 * c.opt (Wvexing-parse): New option.
271
35c125cb
GA
2722020-11-04 Jakub Jelinek <jakub@redhat.com>
273
274 PR c++/97670
275 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
276 underlying decl to clear in the allocate_head bitmap.
277
2782020-11-04 Iain Sandoe <iain@sandoe.co.uk>
279
280 * c-objc.h (objc_non_constant_expr_p): New.
281 * stub-objc.c (objc_non_constant_expr_p): New.
282
fd2325ea
GA
2832020-11-03 Nathan Sidwell <nathan@acm.org>
284
285 * c.opt (MQ,MT): Reword description to be make-agnostic.
286
88ce3d5f
GA
2872020-11-02 Nathan Sidwell <nathan@acm.org>
288
289 * c-opts.c (c_common_post_options): Move var decl to its
290 initialization point.
291
2922020-11-01 Iain Sandoe <iain@sandoe.co.uk>
293
294 * c-lex.c (c_lex_with_flags): When combining '@' with a
295 keyword for Objective-C, combine the location ranges too.
296
2972020-10-30 Qing Zhao <qing.zhao@oracle.com>
298 H.J.Lu <hjl.tools@gmail.com>
299
300 * c-attribs.c (c_common_attribute_table): Add new attribute
301 zero_call_used_regs.
302 (handle_zero_call_used_regs_attribute): New function.
303
e93aae4a
GA
3042020-10-28 Marek Polacek <polacek@redhat.com>
305
306 PR c++/97573
307 * c-opts.c (c_common_post_options): In C++20, turn on
308 -Wdeprecated-enum-enum-conversion and
309 -Wdeprecated-enum-float-conversion.
310 * c.opt (Wdeprecated-enum-enum-conversion,
311 Wdeprecated-enum-float-conversion): New options.
312 (Wenum-conversion): Allow for C++ too.
313
3142020-10-28 Jakub Jelinek <jakub@redhat.com>
315
316 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
317 * c-omp.c: Include bitmap.h.
318 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
319
f19e7c8d
GA
3202020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
321
322 * c-common.c (__is_nothrow_assignable): New.
323 (__is_nothrow_constructible): Likewise.
324 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
325 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
326
efe71fcc
GA
3272020-10-23 Jan Hubicka <hubicka@ucw.cz>
328
329 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
330
3312020-10-23 Marek Polacek <polacek@redhat.com>
332
333 PR c++/91741
334 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
335 (c_common_init_ts): Likewise.
336 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
337 * c-common.h (maybe_warn_sizeof_array_div): Declare.
338 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
339 (maybe_warn_sizeof_array_div): New function.
340 * c.opt (Wsizeof-array-div): New option.
341
3422020-10-23 Martin Sebor <msebor@redhat.com>
343
344 PR c/97463
345 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
346
56ddd5e2
GA
3472020-10-22 Martin Liska <mliska@suse.cz>
348
349 PR c/94722
350 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
351 (handle_stack_protect_attribute): Add error message for a
352 no_stack_protector function.
353
3542020-10-22 Martin Liska <mliska@suse.cz>
355
356 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
357
3582020-10-22 Jan Hubicka <hubicka@ucw.cz>
359
360 * c-gimplify.c: Include tree-nested.h
361 (c_genericize): Update for new nested function info.
362
b2698c21
GA
3632020-10-14 Martin Sebor <msebor@redhat.com>
364
365 PR c/97413
366 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
367 bounds in an extra list.
368
7e9282ae
GA
3692020-10-05 Richard Biener <rguenther@suse.de>
370 Jakub Jelinek <jakub@redhat.com>
371
372 PR c++/97197
373 * c-pretty-print.c: Include langhooks.h.
374 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
375 expression.
376 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
377 unary_expression.
378 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
379
660bfe61
GA
3802020-09-30 Martin Sebor <msebor@redhat.com>
381
382 PR middle-end/97189
383 * c-attribs.c (append_access_attr): Use the function declaration
384 location for a warning about an attribute access argument.
385
93bca37c
GA
3862020-09-29 Marek Polacek <polacek@redhat.com>
387
388 PR c++/94695
389 * c.opt (Wrange-loop-construct): New option.
390
82b77dee
GA
3912020-09-23 Martin Sebor <msebor@redhat.com>
392
393 PR c/97131
394 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
395
3962020-09-23 Marek Polacek <polacek@redhat.com>
397
398 PR c/97125
399 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
400 after loops and other structured control constructs have been lowered.
401
521d2711
GA
4022020-09-22 Jakub Jelinek <jakub@redhat.com>
403
404 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
405 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
406
44135373
GA
4072020-09-21 Marek Polacek <polacek@redhat.com>
408
409 * c.opt (Wctad-maybe-unsupported): New option.
410
2fe5b7d1
GA
4112020-09-19 Martin Sebor <msebor@redhat.com>
412
413 PR c/50584
414 * c-common.h (warn_parm_array_mismatch): Declare new function.
415 (has_attribute): Move declaration of an existing function.
416 (build_attr_access_from_parms): Declare new function.
417 * c-warn.c (parm_array_as_string): Define new function.
418 (plus_one): Define new function.
419 (warn_parm_ptrarray_mismatch): Define new function.
420 (warn_parm_array_mismatch): Define new function.
421 (vla_bound_parm_decl): New function.
422 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
423 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
424 qualifiers here...
425 (c_pretty_printer::direct_abstract_declarator): ...but instead print
426 them in brackets here. Also print [static]. Strip extraneous
427 expressions from VLA bounds.
428
4292020-09-19 Martin Sebor <msebor@redhat.com>
430
431 PR c/50584
432 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
433 (handle_argspec_attribute): New function.
434 (get_argument, get_argument_type): New functions.
435 (append_access_attrs): Add overload. Handle internal attribute
436 representation in addition to external.
437 (handle_access_attribute): Handle internal attribute representation
438 in addition to external.
439 (build_attr_access_from_parms): New function.
440
4412020-09-19 Sandra Loosemore <sandra@codesourcery.com>
442
443 * c-gimplify.c (genericize_c_loop): Rewrite to match
444 c_finish_loop in c-typeck.c.
445
4462020-09-19 Sandra Loosemore <sandra@codesourcery.com>
447
448 * c-common.c (c_block_may_fallthrough): New, split from
449 cxx_block_may_fallthrough in the cp front end.
450 (c_common_init_ts): Move handling of loop and switch-related
451 statements here from the cp front end.
452 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
453 cp front end.
454 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
455 * c-common.h (c_block_may_fallthru): Declare.
456 (bc_state_t): Move here from cp front end.
457 (save_bc_state, restore_bc_state): Declare.
458 (c_genericize_control_stmt): Declare.
459 (WHILE_COND, WHILE_BODY): Likewise.
460 (DO_COND, DO_BODY): Likewise.
461 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
462 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
463 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
464 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
465 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
466 * c-dump.c (dump_stmt): Copy from cp front end.
467 (c_dump_tree): Move code to handle structured loop and switch
468 tree nodes here from cp front end.
469 * c-gimplify.c: Adjust includes.
470 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
471 cp front end.
472 (save_bc_state, restore_bc_state): New functions using old code
473 from cp front end.
474 (get_bc_label, expr_loc_or_loc): Move from cp front end.
475 (genericize_c_loop): Move from cp front end.
476 (genericize_for_stmt, genericize_while_stmt): Likewise.
477 (genericize_do_stmt, genericize_switch_stmt): Likewise.
478 (genericize_continue_stmt, genericize_break_stmt): Likewise.
479 (genericize_omp_for_stmt): Likewise.
480 (c_genericize_control_stmt): New function using code split from
481 cp front end.
482 (c_genericize_control_r): New.
483 (c_genericize): Call walk_tree with c_genericize_control_r.
484 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
485 structured loop and switch tree nodes here from cp front end.
486
2aad20c0
GA
4872020-09-17 Patrick Palka <ppalka@redhat.com>
488
489 PR c/80076
490 * c-indentation.c (should_warn_for_misleading_indentation): Move
491 declarations of local variables closer to their first use.
492 Handle virtual token locations by resolving them to their
493 respective macro expansion points. If all three tokens are
494 produced from the same macro expansion, then instead use their
495 loci within the macro definition.
496
ecde1b0a
GA
4972020-09-16 Martin Sebor <msebor@redhat.com>
498
499 PR c/78666
500 PR c/96126
501 * c-attribs.c (validate_attr_args): New function.
502 (validate_attr_arg): Same.
503 (handle_section_attribute): Call it. Introduce a local variable.
504 (handle_alloc_size_attribute): Same.
505 (handle_alloc_align_attribute): Same.
506
50a71cd0
GA
5072020-09-14 Jakub Jelinek <jakub@redhat.com>
508
509 * c-attribs.c (handle_optimize_attribute): Adjust
510 cl_optimization_save, cl_optimization_restore and
511 build_optimization_node callers.
512 * c-pragma.c (handle_pragma_optimize): Adjust
513 build_optimization_node caller.
514 (handle_pragma_push_options): Adjust
515 build_optimization_node and build_target_option_node callers.
516 (handle_pragma_pop_options, handle_pragma_reset_options):
517 Adjust cl_optimization_restore callers.
518
8f7ea26a
GA
5192020-08-28 Martin Sebor <msebor@redhat.com>
520
521 * c.opt (Wstringop-overread): New option.
522
a6493809
GA
5232020-08-11 Jakub Jelinek <jakub@redhat.com>
524
525 PR c/96545
526 * c-common.c (get_atomic_generic_size): Require that first argument's
527 type points to a complete type and use tree_fits_uhwi_p instead of
528 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
529
48cc2e46
GA
5302020-07-31 Martin Sebor <msebor@redhat.com>
531
532 PR c++/96003
533 * c-common.c (check_function_arguments_recurse): Return early when
534 no-warning bit is set.
535
5362020-07-31 Richard Biener <rguenther@suse.de>
537
538 PR debug/96383
539 * c-common.h (c_common_finalize_early_debug): Declare.
540 * c-common.c: Include debug.h.
541 (c_common_finalize_early_debug): finalize_early_debug langhook
542 implementation generating debug for extern declarations.
543
e71dab87
GA
5442020-07-27 Nathan Sidwell <nathan@acm.org>
545
546 * c-common.c (try_to_locate_new_include_insertion_point): Use
547 strcmp, not pointer equality.
548
ae2e0bc1
GA
5492020-07-25 Martin Sebor <msebor@redhat.com>
550
551 PR c++/96310
552 * c-common.c (check_nonnull_arg): Print note only when warning was
553 issued.
554
3ea9abca
GA
5552020-07-22 Tobias Burnus <tobias@codesourcery.com>
556
557 * c-omp.c (c_finish_omp_critical): Check for no name but
558 nonzero hint provided.
559
0933f508
GA
5602020-07-20 Jason Merrill <jason@redhat.com>
561
562 * c-cppbuiltin.c (c_cpp_builtins): Update
563 __cpp_nontype_template_args for C++20.
564
5652020-07-20 Martin Sebor <msebor@redhat.com>
566
567 PR c/96249
568 * c.opt: Remove stray text.
569
8ca07a30
GA
5702020-07-14 Lewis Hyatt <lhyatt@gmail.com>
571
572 PR other/86904
573 * c-indentation.c (should_warn_for_misleading_indentation): Get
574 global tabstop from the new source.
575 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
576 is now a common option.
577 * c.opt: Likewise.
578
a82c4c4c 5792020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
580
581 * c.opt (Wscalar-storage-order): Add explicit variable.
582
f60ee68d
GA
5832020-07-07 Nathan Sidwell <nathan@acm.org>
584
585 * c-opts.c (c_common_post_options): Add 'injecting' arg to
586 cpp_read_main_file.
587 (c_finish_options): Add linemap_line_start calls for builtin and cmd
588 maps. Force token position to line_table's highest line.
589 * c-ppoutput.c (print_line_1): Refactor, print line zero.
590 (cb_define): Always increment source line.
591
4077d74c
GA
5922020-07-06 Martin Sebor <msebor@redhat.com>
593
594 PR c++/95984
595 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
596 to stub lambda objects with null this pointer.
597 (check_nonnull_arg): Handle C++ nullptr.
598
b5f24739
GA
5992020-07-02 Jason Merrill <jason@redhat.com>
600 Jakub Jelinek <jakub@redhat.com>
601
602 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
603
46fbb6c6
GA
6042020-06-30 Jakub Jelinek <jakub@redhat.com>
605
606 PR c++/95963
607 * c-common.c (check_function_arguments_recurse): Don't crash on
608 calls to internal functions.
609
69273534
GA
6102020-06-28 Martin Sebor <msebor@redhat.com>
611
612 PR c++/86568
613 * c-common.c (struct nonnull_arg_ctx): Add members.
614 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
615 C++ member functions specially. Consider the this pointer implicitly
616 nonnull.
617 (check_nonnull_arg): Use location of argument when available.
618 (check_function_arguments): Use nonnull_arg_ctx as argument.
619
9a33c41f
GA
6202020-06-27 Jakub Jelinek <jakub@redhat.com>
621
622 PR middle-end/95903
623 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
624 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
625 smaller precision intop operands separately.
626
c9c05f73
GA
6272020-06-26 Marek Polacek <polacek@redhat.com>
628
629 * c-opts.c (c_common_init_options): Default to gnu++17.
630
aff95ee7
GA
6312020-06-17 Jonathan Wakely <jwakely@redhat.com>
632
bd0a89dc 633 PR c/95378
aff95ee7
GA
634 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
635 pointer arguments.
636
56638b9b
GA
6372020-06-16 Jakub Jelinek <jakub@redhat.com>
638
639 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
640 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
641 idx members.
642 (c_omp_is_loop_iterator): New function.
643 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
644 if outer loop iterator is present. Perform duplicate checking through
645 hash_set in the function rather than expecting caller to do that.
646 Pass NULL instead of d->ppset to walk_tree_1.
647 (c_omp_check_nonrect_loop_iv): New function.
648 (c_omp_check_loop_iv): Use it. Fill in new members, allow
649 non-rectangular loop forms, diagnose multiple associated loops with
650 the same iterator. Pass NULL instead of &pset to walk_tree_1.
651 (c_omp_check_loop_iv_exprs): Likewise.
652
ec6ffbb9
GA
6532020-06-10 Martin Liska <mliska@suse.cz>
654
655 PR tree-optimization/92860
656 * c-attribs.c (handle_optimize_attribute):
657 Save global options and compare it after parsing of function
658 attribute.
659 * c-pragma.c (opt_stack::saved_global_options): New field.
660 (handle_pragma_push_options): Save global_options.
661 (handle_pragma_pop_options): Compare them after pop.
662
b952c2cf
GA
6632020-06-09 Jakub Jelinek <jakub@redhat.com>
664
665 PR c/95580
666 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
667 case when MEM_REF's first argument has type pointer to incomplete type.
668
1a59f3db
GA
6692020-06-05 Jason Merrill <jason@redhat.com>
670
671 * c-pretty-print.c (pp_c_additive_expression): Handle negative
672 operand to POINTER_PLUS_EXPR.
673
3add3425
GA
6742020-06-04 Martin Sebor <msebor@redhat.com>
675
676 PR middle-end/10138
677 PR middle-end/95136
678 * c-attribs.c (append_access_attrs): Handle attr_access::none.
679 (handle_access_attribute): Same.
680
9a5b7438
GA
6812020-06-03 Mark Wielaard <mark@klomp.org>
682
683 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
684 New function.
685 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
686 New function declaration.
687
6882020-06-03 Mark Wielaard <mark@klomp.org>
689
690 * known-headers.cc (get_string_macro_hint): New function.
691 (get_stdlib_header_for_name): Use get_string_macro_hint.
692 (get_c_stdlib_header_for_string_macro_name): New function.
693 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
694 New function declaration.
695
6962020-06-03 Tobias Burnus <tobias@codesourcery.com>
697
698 * c-common.h (c_omp_predetermined_mapping): Declare.
699 * c-omp.c (c_omp_predetermined_mapping): New.
700
af114c38
MW
7012020-05-22 Mark Wielaard <mark@klomp.org>
702
703 * known-headers.cc (get_stdlib_header_for_name): Add a new
704 stdlib_hint array for stdbool and stdint.
705
45c50b6a
MW
7062020-05-22 Mark Wielaard <mark@klomp.org>
707
708 * known-headers.cc (get_stdlib_header_for_name): Return
709 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
710 flag_isoc99.
711
c22027a0
NS
7122020-05-20 Nathan Sidwell <nathan@acm.org>
713
38a4db21
NS
714 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
715
c22027a0
NS
716 * c-common.c (try_to_locate_new_include_insertion_point): Use
717 strcmp to compare filenames.
718 * c-lex.c (init_c_lex): Move declaration to initialization.
719 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
720 deferred count loop.
721
29f0e90d
JM
7222020-05-15 Jason Merrill <jason@redhat.com>
723
724 * c-opts.c (set_std_cxx20): Set flag_coroutines.
725
b04445d4
JM
7262020-05-13 Jason Merrill <jason@redhat.com>
727
728 * c.opt (std=c++20): Make c++2a the alias.
729 (std=gnu++20): Likewise.
730 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
731 * c-opts.c: Adjust.
732 * c-cppbuiltin.c: Adjust.
733 * c-ubsan.c: Adjust.
734 * c-warn.c: Adjust.
735
11dd3be5
EB
7362020-05-12 Eric Botcazou <ebotcazou@adacore.com>
737
738 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
739
b224c376
NS
7402020-05-08 Nathan Sidwell <nathan@acm.org>
741
742 Reimplement directives only processing.
743 * c-ppoutput.c (token_streamer): Ne.
744 (directives_only_cb): New. Swallow ...
745 (print_lines_directives_only): ... this.
746 (scan_translation_unit_directives_only): Reimplment using the
747 published interface.
748
f1d94677
MP
7492020-05-07 Marek Polacek <polacek@redhat.com>
750
751 * c-format.c (badwords): Add "nonstatic".
752
9b95bb52
JJ
753202-05-07 Jakub Jelinek <jakub@redhat.com>
754
755 PR c/94968
756 * c-common.c (speculation_safe_value_resolve_params): Return false if
757 error_operand_p (val2).
758 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
759 Remove extraneous semicolon.
760
530b4409 7612020-05-06 qing zhao <qing.zhao@oracle.com>
762
763 PR c/94230
764 * c-indentation.c (get_visual_column): Add a hint to use the new
765 -flarge-source-files option.
766
b776bdca
SSF
7672020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
768
769 * c-attribs.c (handle_vector_size_attribute): Add attribute
770 nonnull for argument args in order to silence warning of
771 uninitialized variable usage. Since this is local to the
772 compilation unit and thus cannot be checked at call sides by the
773 compiler, added an assert statement in order to verify this.
774
6607bdd9
L
7752020-05-01 H.J. Lu <hongjiu.lu@intel.com>
776
777 PR target/93492
778 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
779 value to USHRT_MAX (65535).
780
691eeb65
JJ
7812020-04-29 Jakub Jelinek <jakub@redhat.com>
782
783 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
784
26d76be7
JJ
7852020-04-27 Jakub Jelinek <jakub@redhat.com>
786
787 PR c/94755
788 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
789 fncode == BUILT_IN_NONE before initialization of first_param.
790
7291b2ed
MP
7912020-04-23 Marek Polacek <polacek@redhat.com>
792
793 PR c++/94733
794 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
795 TREE_PURPOSE.
796
58a29af8
PP
7972020-04-14 Patrick Palka <ppalka@redhat.com>
798
799 PR c++/85278
800 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
801 ampersand if it's an rvalue reference type.
802
09f04139
MS
8032020-04-13 Martin Sebor <msebor@redhat.com>
804
805 PR c/92326
806 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
807 printing array bound for flexible array members.
808
ee26baf4
IS
8092020-04-13 Iain Sandoe <iain@sandoe.co.uk>
810
811 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
812 define, per n4861.
813
75efe9cb
RB
8142020-04-02 Richard Biener <rguenther@suse.de>
815
816 PR c/94392
817 * c-opts.c (c_common_post_options): Enable -ffinite-loops
818 for -O2 and C++11 or newer.
819
75defde9
PP
8202020-03-28 Patrick Palka <ppalka@redhat.com>
821
822 * c.opt: Add -fconcepts-diagnostics-depth.
823
52f24a9e
MS
8242020-03-27 Martin Sebor <msebor@redhat.com>
825
826 PR c++/94346
827 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
828 to decl_attributes. Make handling of different kinds of entities
829 more robust.
830
ccacf77b
MS
8312020-03-27 Martin Sebor <msebor@redhat.com>
832
833 PR c++/94098
834 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
835 here.
836
ca6c7225
JJ
8372020-03-23 Jakub Jelinek <jakub@redhat.com>
838
839 PR c++/91993
840 * c-warn.c (warnings_for_convert_and_check): For expr and/or
841 result being COMPOUND_EXPRs, skip to ultimate rhs.
842
1aa22b19
RS
8432020-03-20 Richard Sandiford <richard.sandiford@arm.com>
844
845 PR middle-end/94072
846 * c-common.c (c_common_type_for_mode): Before using a registered
847 built-in type, check that the vectorness of the type matches
848 the vectorness of the mode.
849
700d4cb0
JJ
8502020-03-17 Jakub Jelinek <jakub@redhat.com>
851
852 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
853 issue in a diagnostic message.
854
b408e010
LH
8552020-03-15 Lewis Hyatt <lhyatt@gmail.com>
856
857 * c.opt: Avoid redundancy in the help text.
858
e78e50d5
MP
8592020-03-02 Marek Polacek <polacek@redhat.com>
860
861 PR c++/93958 - add missing -std=gnu++20.
862 * c.opt: Add -std=gnu++20.
863
649e1741
MS
8642020-03-01 Martin Sebor <msebor@redhat.com>
865
866 PR c++/92721
867 * c-attribs.c (append_access_attrs): Correctly handle attribute.
868 (handle_access_attribute): Same.
869
7b60f3ba
JJ
8702020-02-25 Jakub Jelinek <jakub@redhat.com>
871
872 PR c/93858
873 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
874 "did you mean" hint in diagnostics.
875
fb260504
JM
8762020-02-15 Jason Merrill <jason@redhat.com>
877
878 * c.opt: Add -std=c++20.
879
1d757b09
EB
8802020-02-14 Eric Botcazou <ebotcazou@adacore.com>
881
882 * c-ada-spec.c: Include bitmap.h.
883 (dump_ada_double_name): Rename into...
884 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
885 (dump_ada_array_type): Adjust to above renaming. Robustify.
886 (dump_nested_types_1): New function copied from... Add dumped_types
887 parameter and pass it down to dump_nested_type.
888 (dump_nested_types): ...this. Remove parent parameter. Just call
889 dump_nested_types_1 on an automatic bitmap.
890 (dump_nested_type): Add dumped_types parameter.
891 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
892 Adjust recursive calls and adjust to above renaming.
893 (dump_ada_declaration): Adjust call to dump_nested_types.
894 Tidy up and adjust to above renaming.
895 (dump_ada_specs): Initialize and release bitmap obstack.
896
0cc575e4
MS
8972020-02-10 Martin Sebor <msebor@redhat.com>
898
899 PR c/93640
900 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
901
a59aa302
JJ
9022020-02-10 Jakub Jelinek <jakub@redhat.com>
903
904 PR other/93641
905 * c-format.c (check_plain): Fix up last argument of strncasecmp.
906 Remove useless extra test.
907
e464fc90
TB
9082020-02-03 Julian Brown <julian@codesourcery.com>
909 Tobias Burnus <tobias@codesourcery.com>
910
911 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
912
e3b6c052
JM
9132020-01-29 Jason Merrill <jason@redhat.com>
914
915 PR c++/89357
916 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
917
6d00f052
JM
9182020-01-23 Jason Merrill <jason@redhat.com>
919
920 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
921
8a990ffa
MS
9222020-01-23 Martin Sebor <msebor@redhat.com>
923
924 PR c/84919
925 * c-common.c (check_function_arguments): Avoid overlap checking
926 of sprintf functions.
927
55b7df8b
JM
9282020-01-22 Jason Merrill <jason@redhat.com>
929
930 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
931 PR c++/40752
932 * c-warn.c (conversion_warning): Check operands only after checking
933 the whole expression. Don't check second operand of + for sign.
934
c77074d0
JM
9352020-01-21 Jason Merrill <jason@redhat.com>
936 Manuel López-Ibáñez <manu@gcc.gnu.org>
937
938 PR c++/40752 - useless -Wconversion with short +=.
939 * c.opt (-Warith-conversion): New.
940 * c-warn.c (conversion_warning): Recurse for operands of
941 operators. Only warn about the whole expression with
942 -Warith-conversion.
943
731dbfc3
JM
9442020-01-21 Jason Merrill <jason@redhat.com>
945
946 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
947 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
948
ad1a3914
NS
9492020-01-20 Nathan Sidwell <nathan@acm.org>
950
951 PR preprocessor/80005
952 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
953
49789fd0
IS
9542020-01-18 Iain Sandoe <iain@sandoe.co.uk>
955
956 * c-common.c (co_await, co_yield, co_return): New.
957 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
958 RID_CO_RETURN): New enumeration values.
959 (D_CXX_COROUTINES): Bit to identify coroutines are active.
960 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
961 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
962 * c.opt (fcoroutines): New command-line switch.
963
4bc1899b
DM
9642020-01-10 David Malcolm <dmalcolm@redhat.com>
965
966 * c-format.c (local_event_ptr_node): New.
967 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
968 (init_dynamic_diag_info): Initialize local_event_ptr_node.
969 * c-format.h (T_EVENT_PTR): New define.
970
f25e33fa
MS
9712020-01-10 Martin Sebor <msebor@redhat.com>
972
973 PR c/93132
974 * c-attribs.c (append_access_attrs): Validate against the translated
975 access string rather than the human-readable representation.
976
8d9254fc
JJ
9772020-01-01 Jakub Jelinek <jakub@redhat.com>
978
979 Update copyright years.
980
39292e25
EB
9812019-12-20 Eric Botcazou <ebotcazou@adacore.com>
982
983 * c-ada-spec.h (decl_sloc): Delete.
984 * c-ada-spec.c (decl_sloc): Make static.
985
519d7496
JB
9862019-12-19 Julian Brown <julian@codesourcery.com>
987
988 * c-common.h (c_omp_map_clause_name): Add prototype.
989 * c-omp.c (c_omp_map_clause_name): New function.
990 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
991 PRAGMA_OACC_CLAUSE_DETACH.
992
a6163563
JB
9932019-12-19 Julian Brown <julian@codesourcery.com>
994 Maciej W. Rozycki <macro@codesourcery.com>
995 Tobias Burnus <tobias@codesourcery.com>
996 Thomas Schwinge <thomas@codesourcery.com>
997
998 * c-pragma.h (pragma_omp_clause): Add
999 PRAGMA_OACC_CLAUSE_NO_CREATE.
1000
e8f1ade2
MS
10012019-12-17 Martin Sebor <msebor@redhat.com>
1002
1003 PR c++/61339
1004 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
1005
368877a1
DM
10062019-12-11 David Malcolm <dmalcolm@redhat.com>
1007
1008 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
1009 implementation.
1010 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
1011
d68f5d45
DM
10122019-12-09 David Malcolm <dmalcolm@redhat.com>
1013
1014 * c-format.c (range_label_for_format_type_mismatch::get_text):
1015 Replace label_text ctor called with true with label_text::take.
1016
d3e28653
DM
10172019-12-09 David Malcolm <dmalcolm@redhat.com>
1018
1019 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
1020 initial newline from expected outputs.
1021 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
1022 call to diagnostic_show_locus.
1023
abd6d8cc
JJ
10242019-12-06 Jakub Jelinek <jakub@redhat.com>
1025
1026 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
1027 now.
1028
7906797e
MP
10292019-12-05 Marek Polacek <polacek@redhat.com>
1030 Jakub Jelinek <jakub@redhat.com>
1031
1032 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
1033 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
1034
5c04da88
MP
10352019-12-05 Marek Polacek <polacek@redhat.com>
1036
1037 PR c++/92271 - make __is_same alias for __is_same_as.
1038 * c-common.c: Add __is_same, an alias for __is_same_as.
1039
43aae289
MP
10402019-12-03 Marek Polacek <polacek@redhat.com>
1041
1042 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
1043 * c-cppbuiltin.c (c_cpp_builtins): Predefine
1044 __cpp_aggregate_paren_init=201902 for -std=c++2a.
1045
d7ddfbcb
JH
10462019-11-30 Jan Hubicka <hubicka@ucw.cz>
1047
1048 * c-attribs.c (handle_symver_attribute): New function
1049 (c_common_attributes): Add symver.
1050
65ef05d0
RS
10512019-11-30 Richard Sandiford <richard.sandiford@arm.com>
1052
1053 * c-common.c (pointer_int_sum): Use verify_type_context to check
1054 whether the target allows pointer arithmetic for the types involved.
1055 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
1056 to check whether the target allows sizeof and alignof operations
1057 for the types involved.
1058
1a291106
JM
10592019-11-27 Jason Merrill <jason@redhat.com>
1060
1061 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
1062
05d6cb1a
JJ
10632019-11-26 Jakub Jelinek <jakub@redhat.com>
1064
1065 PR c++/61414
1066 * c-attribs.c (handle_mode_attribute): Add mode attribute to
1067 ENUMERAL_TYPEs.
1068
5b8d9367
JM
10692019-11-25 Joseph Myers <joseph@codesourcery.com>
1070
1071 PR c/91985
1072 * c-common.c (c_common_type_for_mode): Handle decimal
1073 floating-point types being NULL_TREE.
1074 * c-format.c (get_format_for_type_1): Handle specified types being
1075 NULL_TREE.
1076 * c-lex.c (interpret_float): Give an error for decimal
1077 floating-point constants when decimal floating-point not
1078 supported.
1079
1fbf51cb
JJ
10802019-11-23 Jakub Jelinek <jakub@redhat.com>
1081
1082 PR middle-end/83859
1083 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
1084 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
1085 group warning with inform together.
1086 (handle_access_attribute): Formatting fix.
1087
761df906
JJ
10882019-11-22 Jakub Jelinek <jakub@redhat.com>
1089
bdaf8be1
JJ
1090 PR c/90677
1091 * c-common.h (identifier_global_tag): Declare.
1092 * c-format.c (get_pointer_to_named_type): Renamed to ...
1093 (get_named_type): ... this. Use identifier_global_tag instead of
1094 identifier_global_value, handle the return value being a TYPE_P.
1095 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
1096 to call get_named_type instead. Formatting fixes.
1097
c2ecce6d 1098 Implement P1902R1, Missing feature-test macros 2017-2019.
761df906
JJ
1099 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
1100 and __cpp_generic_lambdas for -std=c++2a. Define
1101 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
1102 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
1103 __cpp_concepts for -std=c++2a.
1104
54aa6b58
MS
11052019-11-22 Martin Sebor <msebor@redhat.com>
1106
1107 PR middle-end/83859
1108 * c-attribs.c (handle_access_attribute): New function.
1109 (c_common_attribute_table): Add new attribute.
1110 (get_argument_type): New function.
1111 (append_access_attrs): New function.
1112 (get_nonnull_operand): Rename...
1113 (get_attribute_operand): ...to this.
1114 * c-common.c (get_nonnull_operand): Rename...
1115 (get_attribute_operand): ...to this.
1116
6c80b1b5
JM
11172019-11-21 Joseph Myers <joseph@codesourcery.com>
1118
1119 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
1120 of warning.
1121
192961ff
JM
11222019-11-19 Joseph Myers <joseph@codesourcery.com>
1123
1124 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
1125 warning for standard attributes mixed with fallthrough attributes.
1126
f8aea5e3
JM
11272019-11-15 Joseph Myers <joseph@codesourcery.com>
1128
1129 * c-attribs.c (handle_fallthrough_attribute): Remove static.
1130 * c-common.h (handle_fallthrough_attribute): Declare.
1131
2cc94aa8
JM
11322019-11-15 Joseph Myers <joseph@codesourcery.com>
1133
1134 * c-attribs.c (handle_deprecated_attribute): Remove static.
1135 * c-common.h (handle_deprecated_attribute): Declare.
1136
7c5890cc
JM
11372019-11-14 Joseph Myers <joseph@codesourcery.com>
1138
1139 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
1140 char for C.
1141
b2417b59
JJ
11422019-11-14 Jakub Jelinek <jakub@redhat.com>
1143
d0ec7c93
JJ
1144 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
1145 valid vendors.
1146
b2417b59
JJ
1147 * c-omp.c (c_omp_check_context_selector): Handle name lists
1148 containing string literals. Don't diagnose atomic_default_mem_order
1149 with multiple props.
1150
00be2a5f
JM
11512019-11-13 Joseph Myers <joseph@codesourcery.com>
1152
1153 * c-cppbuiltin.c (builtin_define_float_constants): Also define
1154 NORM_MAX constants. Update call to get_max_float.
1155 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
1156 constants.
1157
2dbad62d
EB
11582019-11-13 Eric Botcazou <ebotcazou@adacore.com>
1159
1160 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
1161 (dump_forward_type): Do not generate a declaration for function types.
1162 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
1163 of the component type if it is declared in another file.
1164
6ed76044
ML
11652019-11-12 Martin Liska <mliska@suse.cz>
1166
1167 * c-opts.c (c_common_post_options):
1168 Use SET_OPTION_IF_UNSET.
1169
62aee289
MR
11702019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
1171 Frederik Harwath <frederik@codesourcery.com>
1172
1173 gcc/c-family/
1174 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
1175 constant.
1176 * c-pragma.c (oacc_pragmas): Add "serial" entry.
1177
f486280c
RS
11782019-11-08 Richard Sandiford <richard.sandiford@arm.com>
1179
1180 * c-common.h (gnu_vector_type_p): New function.
1181 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
1182 vectors to satisfy gnu_vector_type_p.
1183 (c_build_vec_convert): Likewise __builtin_convertvector.
1184 (convert_vector_to_array_for_subscript): Likewise when applying
1185 implicit vector to array conversion.
1186 (scalar_to_vector): Likewise when converting vector-scalar
1187 operations to vector-vector operations.
1188
017c6491
JM
11892019-11-08 Joseph Myers <joseph@codesourcery.com>
1190
1191 * c.opt (Wold-style-definition): Initialize to -1.
1192 * c-opts.c (c_common_post_options): Set warn_old_style_definition
1193 to flag_isoc2x if not set explicitly.
1194
c01bd174
JM
11952019-11-07 Joseph Myers <joseph@codesourcery.com>
1196
1197 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
1198
0df65305
JM
11992019-11-05 Jason Merrill <jason@redhat.com>
1200
1201 * c-opts.c (c_common_post_options): -fconcepts-ts implies
1202 -fconcepts.
1203
e0c866dd
KK
12042019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
1205
1206 * c-opts.c (c_common_post_options): Update
1207 latest_abi_version.
1208
f968ef9b
JJ
12092019-11-02 Jakub Jelinek <jakub@redhat.com>
1210
d0c464d2
JJ
1211 * c-common.h (c_omp_get_context_selector): Remove.
1212 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
1213 and renamed to omp_get_context_selector.
1214
917dd789
JJ
1215 * c-omp.c (c_omp_mark_declare_variant): Use
1216 omp_context_selector_set_compare.
1217
f968ef9b
JJ
1218 PR c++/88335 - Implement P1073R3: Immediate functions
1219 * c-common.h (enum rid): Add RID_CONSTEVAL.
1220 * c-common.c (c_common_reswords): Add consteval.
1221
5f6705b7
JJ
12222019-11-01 Martin Sebor <msebor@redhat.com>
1223
1224 PR middle-end/91679
1225 PR middle-end/91647
1226 PR middle-end/91463
1227 PR middle-end/92312
1228 * c-pretty-print.c (direct_abstract_declarator): Print
1229 bound in zero-length arrays.
1230 * c.opt (-Wzero-length-bounds): New option.
1231
43f1814c
NS
12322019-10-30 Nathan Sidwell <nathan@acm.org>
1233
1234 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
1235 macros.
1236
ad1539d5
MS
12372019-10-28 Martin Sebor <msebor@redhat.com>
1238
1239 PR c/66970
1240 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
1241 even when only preprocessing.
1242 * c-common.h (names_builtin_p): Declare new function.
1243 * c-lex.c (init_c_lex): Set has_builtin.
1244 (c_common_has_builtin): Define a new function.
1245 * c-ppoutput.c (init_pp_output): Set has_builtin.
1246
135df52c
JJ
12472019-10-24 Jakub Jelinek <jakub@redhat.com>
1248
1249 * c-common.h (c_omp_context_selector_matches): Remove.
1250 * c-omp.c (c_omp_context_selector_matches): Remove.
1251 * c-attribs.c (c_common_attribute_table): Add
1252 "omp declare target {host,nohost,block}" attributes.
1253
8ad0c477
JM
12542019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
1255
1256 * c-lex.c (c_common_has_attribute): Update nodiscard value.
1257
56898e43
RS
12582019-10-14 Richard Sandiford <richard.sandiford@arm.com>
1259
1260 * c-common.h (user_facing_original_type_p): Declare.
1261 * c-common.c: Include c-spellcheck.h.
1262 (user_facing_original_type_p): New function.
1263
20de9568
JJ
12642019-10-12 Jakub Jelinek <jakub@redhat.com>
1265
1266 * c-common.h (c_omp_mark_declare_variant,
1267 c_omp_context_selector_matches): Declare.
1268 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
1269 and hsa-common.h.
1270 (c_omp_get_context_selector): Support second argument NULL.
1271 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
1272 functions.
1273 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
1274 attribute, add "omp declare variant base" and
1275 "omp declare variant variant" attributes.
1276
175a85b2
JM
12772019-10-11 Joseph Myers <joseph@codesourcery.com>
1278
1279 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
1280 CppReason(CPP_W_C11_C2X_COMPAT).
1281
fe2bc27c
JM
12822019-10-11 Joseph Myers <joseph@codesourcery.com>
1283
1284 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
1285 _Decimal64 and _Decimal128.
1286
27dfdc0f
JM
12872019-10-10 Joseph Myers <joseph@codesourcery.com>
1288
1289 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
1290 types if DFP not supported.
1291
94e7f906
JJ
12922019-10-10 Jakub Jelinek <jakub@redhat.com>
1293
1294 * c-common.h (c_omp_check_context_selector,
1295 c_omp_get_context_selector): Declare.
1296 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
1297 in diagnostic message.
1298 (c_omp_check_context_selector, c_omp_get_context_selector): New
1299 functions.
1300 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
1301 attribute.
1302 (handle_omp_declare_variant_attribute): New function.
1303
a7160771
MS
13042019-10-09 Martin Sebor <msebor@redhat.com>
1305
1306 PR tree-optimization/90879
1307 * c.opt (-Wstring-compare): New option.
1308
cb57504a
JM
13092019-10-08 Andrew Sutton <asutton@lock3software.com>
1310 Jason Merrill <jason@redhat.com>
1311
1312 Update the concepts implementation to conform to the C++20
1313 specification, improve compile times, and generally clean up
1314 the implementation.
1315
1316 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
1317 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
1318 * c.opt: Add -Wconcepts-ts.
1319 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
1320 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
1321 (set_std_cxx2a): Enable concepts by default.
1322
fbb2a6dc
JM
13232019-10-08 Joseph Myers <joseph@codesourcery.com>
1324
1325 * c-opts.c (c_common_post_options): Set
1326 -fno-fp-int-builtin-inexact for C2X.
1327
8e007055
JJ
13282019-10-05 Jakub Jelinek <jakub@redhat.com>
1329
1330 PR c++/91369 - Implement P0784R7: constexpr new
1331 * c-cppbuiltin.c (c_cpp_builtins): Predefine
1332 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
1333
843f104d
JM
13342019-10-04 Joseph Myers <joseph@codesourcery.com>
1335
1336 PR c/82752
1337 * c-format.c (C_STD_VER): Handle C2x.
1338 (C_STD_NAME): Likewise.
1339 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
1340 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
1341 modifier allowed and 'p' flag.
1342 * c-format.h (enum format_std_version): Add STD_C2X.
1343 (struct format_char_info): Mention 'p' in comment on flags2.
1344
e9c9a142
DM
13452019-10-01 David Malcolm <dmalcolm@redhat.com>
1346
1347 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
1348 calling diagnostic_show_locus, rather than destroying it afterwards.
1349
7552c36a
JJ
13502019-10-01 Jakub Jelinek <jakub@redhat.com>
1351
1352 PR c++/91925
1353 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
1354 with NULL DECL_FIELD_OFFSET.
1355
8209db25
RS
13562019-10-01 Richard Sandiford <richard.sandiford@arm.com>
1357
1358 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
1359 has a type name, use it in preference to the __vector syntax.
1360
9343bf99
RS
13612019-09-30 Richard Sandiford <richard.sandiford@arm.com>
1362
1363 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
1364 two spaces between a comma and "...".
1365
59bc434a
JJ
13662019-09-27 Jakub Jelinek <jakub@redhat.com>
1367
1368 PR c++/88203
1369 * c-common.h (c_omp_predefined_variable): Declare.
1370 * c-omp.c (c_omp_predefined_variable): New function.
1371 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
1372 for predefined variables.
1373
c6447c20
RS
13742019-09-27 Richard Sandiford <richard.sandiford@arm.com>
1375
1376 * c-common.h (build_function_call_vec): Take the original
1377 function decl as an optional final parameter.
1378 (check_builtin_function_arguments): Take the original function decl.
1379 * c-common.c (check_builtin_function_arguments): Likewise.
1380 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
1381 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
1382
c4438114
JM
13832019-09-15 Jason Merrill <jason@redhat.com>
1384
1385 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
1386 fold_for_warn in "|| mask" warning.
1387
68a57628
ML
13882019-09-10 Martin Liska <mliska@suse.cz>
1389
1390 * c.opt: Use newly added WarnRemoved.
1391
f48ef52e
ML
13922019-09-09 Martin Liska <mliska@suse.cz>
1393
1394 * c.opt: Update comment of removed
1395 options that are preserved only for backward
1396 compatibility.
1397
67f6e649
ML
13982019-09-06 Martin Liska <mliska@suse.cz>
1399
1400 PR c++/91125
1401 * c-common.c: Remove definition of flag_use_repository.
1402 * c-common.h: Likewise.
1403 * c-opts.c (c_common_handle_option):
1404 Do not handle OPT_frepo option.
1405 * c.opt: Mark the option with Deprecated.
1406
db9d2274
MP
14072019-09-04 Marek Polacek <polacek@redhat.com>
1408
1409 * c.opt (fdeduce-init-list): Ignored.
1410
68e2c199
PK
14112019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1412
1413 PR c/78736
1414 * c.opt (Wenum-conversion): New option.
1415
7a4418a5
JL
14162019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1417
1418 * c-attribs.c (handle_section_attribute): Call the
1419 handle_generic_attribute target hook after performing target
1420 independent processing.
1421 (handle_noinit_attribute): Likewise.
1422
5f76ab15
ILT
14232019-09-03 Ian Lance Taylor <iant@golang.org>
1424
1425 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
1426 when using -fgo-dump-spec.
1427
ae0d3f6a
ML
14282019-09-02 Martin Liska <mliska@suse.cz>
1429
1430 PR c++/91155
1431 * c-common.c (fname_as_string): Use cxx_printable_name for
1432 __PRETTY_FUNCTION__ same as was used before r265711.
1433
8a902edb
MP
14342019-08-28 Marek Polacek <polacek@redhat.com>
1435
1436 Implement P1152R4: Deprecating some uses of volatile.
1437 PR c++/91361
1438 * c-opts.c (c_common_post_options): Enable -Wvolatile by
1439 default for C++2a, unless -Wno-deprecated.
1440 * c.opt (Wvolatile): New warning.
1441
4742dbe7
MP
14422019-08-28 Marek Polacek <polacek@redhat.com>
1443
1444 PR c++/91360 - Implement C++20 P1143R2: constinit.
1445 * c-common.c (c_common_reswords): Add constinit and __constinit.
1446 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
1447 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
1448 RID_LAST_CXX20.
1449 (D_CXX20): Define.
1450 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
1451 * c-format.c (cxx_keywords): Add "constinit".
1452 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
1453
6a074892
JJ
14542019-08-27 Jakub Jelinek <jakub@redhat.com>
1455
1456 PR c++/91415
1457 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
1458 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
1459 like COMPOUND_EXPR rather than normal expression.
1460
22f8849d
IS
14612019-08-23 Iain Sandoe <iain@sandoe.co.uk>
1462
1463 PR pch/61250
1464 * c-lex.c (c_lex_with_flags): Don't call
1465 c_common_no_more_pch () from here.
1466
df375b03
JJ
14672019-08-23 Jakub Jelinek <jakub@redhat.com>
1468
1469 PR middle-end/91283
1470 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
1471 instead of flag_excess_precision_cmdline.
1472 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
1473 * c-opts.c (c_common_post_options): Likewise.
1474
14b7950f
MS
14752019-08-22 Martin Sebor <msebor@redhat.com>
1476
1477 PR middle-end/91490
1478 * c-common.c (braced_list_to_string): Add argument and overload.
1479 Handle flexible length arrays and unions.
1480
8bb2ee59
EB
14812019-08-21 Eric Botcazou <ebotcazou@adacore.com>
1482
1483 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
1484 function declarations where arguments are missing. Rename variables.
1485
21c1e205
RB
14862019-08-15 Richard Biener <rguenther@suse.de>
1487
1488 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
1489 enabled, define __SIZETYPE__.
1490
f0033821
CL
14912019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
1492
1493 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
1494 exclusion with "section" attribute.
1495 (attr_noinit_exclusions): New table.
1496 (handle_noinit_attribute): New function.
1497
4d732405
RS
14982019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1499
1500 PR middle-end/91421
1501 * c-common.c (resolve_overloaded_builtin): Use
1502 copy_decl_built_in_function.
1503
51ad8481
MS
15042019-08-13 Martin Sebor <msebor@redhat.com>
1505
1506 PR c/80619
1507 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
1508 (asm_fprintf_length_spec): Same.
1509 * c-format.h (format_lengths): Add FMT_LEN_w.
1510
77eb117f
JJ
15112019-08-10 Jakub Jelinek <jakub@redhat.com>
1512
1513 * c-pragma.h (enum pragma_omp_clause): Add
1514 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1515
398e3feb
JJ
15162019-08-07 Jakub Jelinek <jakub@redhat.com>
1517
1518 * c-pragma.h (enum pragma_omp_clause): Add
1519 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
1520 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
1521 enumeration value.
1522
ab574db6
MP
15232019-08-05 Marek Polacek <polacek@redhat.com>
1524
1525 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
1526 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
1527 default for C++2a, unless -Wno-deprecated.
1528 * c.opt (Wcomma-subscript): New warning.
1529
554a530f
JJ
15302019-07-20 Jakub Jelinek <jakub@redhat.com>
1531
1532 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
1533 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
1534 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
1535 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
1536 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
1537 constructs with the loop construct.
1538
1a888209
JJ
15392019-07-13 Jakub Jelinek <jakub@redhat.com>
1540
1541 PR c/91149
1542 * c-omp.c (c_omp_split_clauses): Fix a pasto in
1543 OMP_CLAUSE_REDUCTION_TASK handling.
1544
1fdd6f04
JJ
15452019-07-12 Jakub Jelinek <jakub@redhat.com>
1546
1547 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
1548 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
1549
99b1c316
MS
15502019-07-09 Martin Sebor <msebor@redhat.com>
1551
1552 PR c++/61339
1fdd6f04 1553 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
1554 and others to class.
1555 * c-pretty-print.h: Same.
1556
6c1dae73
MS
15572019-07-09 Martin Sebor <msebor@redhat.com>
1558
1559 PR c++/61339
1560 * c-format.c (check_argument_type): Change class-key from class to
1561 struct and vice versa to match convention and avoid -Wclass-is-pod
1562 and -Wstruct-no-pod.
1563 * c-pretty-print.h: Same.
1564
8ba6ea87
ML
15652019-07-03 Martin Liska <mliska@suse.cz>
1566
1567 * c-common.c (try_to_locate_new_include_insertion_point): Remove
1568 dead assignemts.
1569
83eb9522
JJ
15702019-07-03 Jakub Jelinek <jakub@redhat.com>
1571
1572 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
1573 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
1574 with OMP_PARALLEL.
1575
1c6ffbab
QZ
15762019-07-02 qing zhao <qing.zhao@oracle.com>
1577
1578 PR preprocessor/90581
1579 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
1580 * c.opt: Add new option -fmax-include-depth.
1581
7ffc7de5
JM
15822019-06-26 Jason Merrill <jason@redhat.com>
1583
1584 PR c++/55442 - memory-hog with highly recursive constexpr.
1585 * c.opt (fconstexpr-loop-limit): New.
1586
361af3e4
JJ
15872019-06-25 Jakub Jelinek <jakub@redhat.com>
1588
1589 PR sanitizer/90954
1590 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
1591 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
1592
ab20d992
JJ
15932019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1594
1595 * c-common.c (c_common_nodes_and_builtins): Define
1596 alternate "__intN__" name for "__intN" types.
1597
f4af4019
JH
15982019-06-24 Jan Hubicka <jh@suse.cz>
1599
1600 * c-common.c (braced_lists_to_strings): Check that
1601 type is array or integer prior checking string flag.
1602
da9e9b57
MB
16032019-06-21 Matthew Beliveau <mbelivea@redhat.com>
1604
1605 PR c++/90875 - added -Wswitch-outside-range option
1606 * c.opt (Wswitch-outside-range): Added new option.
1607 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
1608
3f3d6a6f
MP
16092019-06-21 Marek Polacek <polacek@redhat.com>
1610
1611 PR c++/90953 - ICE with -Wmissing-format-attribute.
1612 * c-common.c (check_function_arguments_recurse): Use
1613 get_attribute_name.
1614 (check_missing_format_attribute): Likewise.
1615
1bf32c11
MP
16162019-06-19 Marek Polacek <polacek@redhat.com>
1617
1618 PR c++/60364 - noreturn after first decl not diagnosed.
1619 * c-attribs.c (handle_noreturn_attribute): No longer static.
1620 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
1621 Declare.
1622 * c-format.c (check_function_format): Use get_attribute_name.
1623
a04c0734
MS
16242019-06-19 Martin Sebor <msebor@redhat.com>
1625
1626 PR translation/90156
1627 * c-format.c (function_format_info::format_type): Adjust type.
1628 (function_format_info::is_raw): New member.
1629 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
1630 (decode_format_attr): Adjust call to decode_format_type.
1631 Avoid a redundant call to convert_format_name_to_system_name.
1632 Avoid abbreviating the word "arguments" in a diagnostic.
1633 (format_warning_substr): New function.
1634 (avoid_dollar_number): Quote dollar sign in a diagnostic.
1635 (finish_dollar_format_checking): Same.
1636 (check_format_info): Same.
1637 (struct baltoks_t): New.
1638 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
1639 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
1640 functions.
1641 (check_format_info_main): Call check_plain. Use baltoks_t. Call
1642 maybe_diag_unbalanced_tokens.
1643 (handle_format_attribute): Spell out the word "arguments" in
1644 a diagnostic.
1645
d3786ebb
MB
16462019-06-11 Matthew Beliveau <mbelivea@redhat.com>
1647
1648 PR c++/90449 - add -Winaccessible-base option.
1649 * c.opt (Winaccessible-base): New option.
1650
bf38f7e9
JJ
16512019-06-10 Jakub Jelinek <jakub@redhat.com>
1652
1653 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
1654 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
1655 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
1656 combined/composite constructs where it is not allowed. Copy over
1657 OMP_CLAUSE_REDUCTION_INSCAN.
1658
0ecf545c
MS
16592019-06-05 Martin Sebor <msebor@redhat.com>
1660
1661 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
1662 (handle_alias_ifunc_attribute): Same.
1663 (handle_copy_attribute): Same.
1664 (handle_weakref_attribute): Same.
1665 (handle_nonnull_attribute): Same.
1666 * c-warn.c (warn_for_sign_compare): Same.
1667 (warn_for_restrict): Same.
1668 * c.opt: Same.
1669
36b34127
MS
16702019-06-05 Martin Sebor <msebor@redhat.com>
1671
1672 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
1673 * c.opt (-Wformat-diag): Remove a spurious period.
1674
357a352f
JJ
16752019-05-29 Jakub Jelinek <jakub@redhat.com>
1676
1677 PR c/90628
1678 * c-common.c (check_builtin_function_arguments)
1679 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
1680 as last argument.
1681
2b8235ea
EB
16822019-05-23 Eric Botcazou <ebotcazou@adacore.com>
1683
1684 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
1685
6d86ddc4
ML
16862019-05-22 Martin Liska <mliska@suse.cz>
1687
1688 PR lto/90500
1689 * c-attribs.c (handle_copy_attribute): Do not copy
1690 target_clones attribute.
1691
419ba5b9
EB
16922019-05-21 Eric Botcazou <ebotcazou@adacore.com>
1693
1694 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
1695 * c-ada-spec.c (print_assignment_operator): New function.
1696 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
1697 assignment operators declared as methods and filter out the others.
1698
e03436e7
TS
16992019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1700
1701 PR c/89433
1702 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
1703 "omp declare target".
1704
a9c697b8
MS
17052019-05-16 Martin Sebor <msebor@redhat.com>
1706
ab20d992
JJ
1707 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
1708 keywords, operators, and types in diagnostics.
1709 (handle_scalar_storage_order_attribute): Same.
1710 (handle_mode_attribute): Same.
1711 (handle_visibility_attribute): Same.
1712 (handle_assume_aligned_attribute): Same.
1713 (handle_no_split_stack_attribute): Same.
1714 * c-common.c (shorten_compare): Same.
1715 (c_common_truthvalue_conversion): Same.
1716 (cb_get_source_date_epoch): Same.
1717 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
1718 in diagnostics.
1719 (interpret_float): Same.
1720 * c-omp.c (c_finish_omp_for): Same.
1721 * c-opts.c (c_common_post_options): Same.
1722 * c-pch.c (c_common_pch_pragma): Same.
1723 * c-pragma.c (pop_alignment): Same.
1724 (handle_pragma_pack): Same.
1725 (apply_pragma_weak): Same.
1726 (handle_pragma_weak): Same.
1727 (handle_pragma_scalar_storage_order): Same.
1728 (handle_pragma_redefine_extname): Same.
1729 (add_to_renaming_pragma_list): Same.
1730 (maybe_apply_renaming_pragma): Same.
1731 (push_visibility): Same.
1732 (handle_pragma_visibility): Same.
1733 (handle_pragma_optimize): Same.
1734 (handle_pragma_message): Same.
1735 * c-warn.c (warn_for_omitted_condop): Same.
1736 (lvalue_error): Same.
a9c697b8 1737
6b943512
RB
17382019-05-15 Richard Biener <rguenther@suse.de>
1739
1740 PR c/90474
1741 * c-common.c (c_common_mark_addressable_vec): Also mark
1742 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
1743 c_mark_addressable.
ab20d992 1744
b744fc85
NS
17452019-05-06 Nathan Sidwell <nathan@acm.org>
1746
1747 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
1748
598f50d7
NS
17492019-04-30 Nathan Sidwell <nathan@acm.org>
1750
1751 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
1752
5bcc5a3b
ML
17532019-04-30 Martin Liska <mliska@suse.cz>
1754
1755 * c-pragma.c (handle_pragma_diagnostic): Provide hints
1756 for unknown options.
1757
e78a87f7
RS
17582019-04-26 Richard Sandiford <richard.sandiford@arm.com>
1759
1760 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
1761 the pointer target rather than the pointer itself.
1762
c280b7ee
JJ
17632019-04-19 Jakub Jelinek <jakub@redhat.com>
1764
1765 PR c/89888
1766 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
1767 arguments.
1768 (c_do_switch_warnings): Remove outside_range_p argument.
1769 * c-common.c (check_case_bounds): Removed.
1770 (c_add_case_label): Remove orig_type and outside_range_p arguments.
1771 Don't call check_case_bounds. Fold low_value as well as high_value.
1772 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
1773 Check for case labels outside of range of original type here and
1774 adjust them.
1775
8e8225e6
JJ
17762019-04-12 Jakub Jelinek <jakub@redhat.com>
1777
63b8a166
JJ
1778 PR translation/90041
1779 * c.opt (-fhandle-exceptions): Use %< and %> around option names
1780 in the Warn diagnostics.
1781
8e8225e6
JJ
1782 PR c/89946
1783 * c-attribs.c (handle_patchable_function_entry_attribute): Add
1784 function comment. Warn if arguments of the attribute are not positive
1785 integer constants.
1786
53a3f614
EB
17872019-04-09 Eric Botcazou <ebotcazou@adacore.com>
1788
1789 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
1790 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
1791
22be5873
EB
17922019-04-07 Eric Botcazou <ebotcazou@adacore.com>
1793
1794 * c-ada-spec.c (is_float128): New predicate extracted from...
1795 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
1796 <REAL_TYPE>: ...here. Call it.
1797
34facf20
DM
17982019-04-05 David Malcolm <dmalcolm@redhat.com>
1799
1800 PR c/89985
1801 * c-warn.c (check_address_or_pointer_of_packed_member): Add
1802 auto_diagnostic_group. Guard inform calls by result of
1803 warning_at call.
1804
05564120
MP
18052019-04-05 Marek Polacek <polacek@redhat.com>
1806
ab20d992 1807 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
05564120
MP
1808 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
1809 of RHS.
1810
7a506c3c
JM
18112019-04-03 Jason Merrill <jason@redhat.com>
1812
1813 PR c++/86586 - -fcompare-debug=-Wsign-compare.
1814 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
1815
ddeae8c8
MS
18162019-04-01 Martin Sebor <msebor@redhat.com>
1817
1818 PR c/89685
1819 * c-attribs.c (handle_copy_attribute): Handle references and
1820 non-constant expressions.
1821
a15ffa22
JJ
18222019-03-22 Jakub Jelinek <jakub@redhat.com>
1823
1824 PR c++/87481
1825 * c.opt (-fconstexpr-ops-limit=): New option.
1826
36a3a7a3
JJ
18272019-03-21 Jakub Jelinek <jakub@redhat.com>
1828
1829 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
1830 template param.
1831
bec1da64
MS
18322019-03-19 Martin Sebor <msebor@redhat.com>
1833
1834 PR tree-optimization/89688
1835 * c-common.c (braced_list_to_string): Make static.
1836 (braced_lists_to_strings): Define new function.
1837 * c-common.h (braced_list_to_string): Remove.
1838 (braced_lists_to_strings): Declare.
1839
1fe61adf
ML
18402019-03-12 Martin Liska <mliska@suse.cz>
1841
1842 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
1843
93964ebd
ML
18442019-03-11 Martin Liska <mliska@suse.cz>
1845
1846 * c-opts.c (c_common_post_options): Wrap apostrophes
1847 in gcc internal format with %'.
1848
a3f9f006
ML
18492019-03-11 Martin Liska <mliska@suse.cz>
1850
1851 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
1852 in a string format message and fix GNU coding style.
1853 * c-common.c (vector_types_convertible_p): Likewise.
1854 (c_build_vec_perm_expr): Likewise.
1855 * c-indentation.c (get_visual_column): Likewise.
1856 * c-opts.c (c_common_handle_option): Likewise.
1857 (c_common_post_options): Likewise.
1858 (sanitize_cpp_opts): Likewise.
1859 * c-pch.c (c_common_pch_pragma): Likewise.
1860 * c-pragma.c (handle_pragma_pack): Likewise.
1861
1db01ff9
JJ
18622019-03-08 Jakub Jelinek <jakub@redhat.com>
1863
1864 PR tree-optimization/89550
1865 * c-common.c (c_common_truthvalue_conversion): Only set
1866 TREE_NO_WARNING if warning_at returned true.
1867 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
1868
ba790e6f
JJ
18692019-02-25 Sandra Loosemore <sandra@codesourcery.com>
1870 Martin Sebor <msebor@gmail.com>
1871
1872 * c.opt (Wmissing-attributes): Clean up doc string.
1873
7da73ba7
JJ
18742019-02-25 Jakub Jelinek <jakub@redhat.com>
1875
1876 PR c/89495
1877 * c-format.c (maybe_read_dollar_number): Compute nargnum in
1878 HOST_WIDE_INT type to avoid overflows and change overflow_flag
1879 checking.
1880
921bb9d1
RB
18812019-02-22 Richard Biener <rguenther@suse.de>
1882
1883 * c-pch.c (no_checksum): Remove.
1884 (pch_init): Remove assertion that executable_checksum is not
1885 all zero.
1886 (c_common_valid_pch): Likewise.
1887
e2ebb05c
MS
18882019-02-18 Martin Sebor <msebor@redhat.com>
1889
1890 PR middle-end/89294
1891 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
1892
3fe53000
DM
18932019-02-16 David Malcolm <dmalcolm@redhat.com>
1894
1895 PR c++/88680
1896 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
1897 implementing -Wtype-limits.
1898
28a8cef1
MS
18992019-02-11 Martin Sebor <msebor@redhat.com>
1900
1901 PR c++/87996
1902 * c-common.c (invalid_array_size_error): New function.
1903 (valid_array_size_p): Call it. Handle size as well as type.
1904 * c-common.h (valid_constant_size_p): New function.
1905 (enum cst_size_error): New type.
1906
ec2be203
DM
19072019-01-31 David Malcolm <dmalcolm@redhat.com>
1908
1909 PR c/89122
1910 * known-headers.cc (get_stdlib_header_for_name): Add
1911 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
1912
8936f047
JJ
19132019-01-31 Jakub Jelinek <jakub@redhat.com>
1914
1915 PR libstdc++/88170
1916 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
1917 a C cast in pp_c_flag_gnu_v3 mode.
1918
6a335b96
JJ
19192019-01-29 Jakub Jelinek <jakub@redhat.com>
1920
1921 PR c/86125
1922 * c-common.c (c_common_nodes_and_builtins): Build type variants for
1923 builtin_structptr_types types even for C.
1924
2a06eba5
BE
19252019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
1926
1927 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
1928 when rhs is of array type correctly. Fix handling of nested structures.
1929 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
1930 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
1931 type casts within nested compound expressions.
1932
18a23298
JJ
19332019-01-22 Jakub Jelinek <jakub@redhat.com>
1934
1935 PR middle-end/88968
1936 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
1937 variable after using BIT_FIELD_REF.
1938
420183d9
L
19392019-01-18 H.J. Lu <hongjiu.lu@intel.com>
1940
1941 PR c/51628
1942 PR c/88664
1943 * c-common.h (warn_for_address_or_pointer_of_packed_member):
1944 Remove the boolean argument.
1945 * c-warn.c (check_address_of_packed_member): Renamed to ...
1946 (check_address_or_pointer_of_packed_member): This. Also
1947 warn pointer conversion.
1948 (check_and_warn_address_of_packed_member): Renamed to ...
1949 (check_and_warn_address_or_pointer_of_packed_member): This.
1950 Also warn pointer conversion.
1951 (warn_for_address_or_pointer_of_packed_member): Remove the
1952 boolean argument. Don't check pointer conversion here.
1953
99063eee
RS
19542019-01-15 Richard Sandiford <richard.sandiford@arm.com>
1955
1956 PR inline-asm/52813
1957 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
1958
a30d0196
JJ
19592019-01-14 Jakub Jelinek <jakub@redhat.com>
1960
1961 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
1962 and __cpp_nontype_template_parameter_auto. Add a comment that
1963 __cpp_template_auto is deprecated.
1964
2d91f79d
TH
19652019-01-14 Tom Honermann <tom@honermann.net>
1966
1967 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
1968 * c-common.c (c_common_reswords): Add char8_t.
1969 (fix_string_type): Use char8_t for the type of u8 string literals.
1970 (c_common_get_alias_set): char8_t doesn't alias.
1971 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
1972 C++.
1973 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
1974 (keyword_begins_type_specifier): Add RID_CHAR8.
1975 * c-common.h (rid): Add RID_CHAR8.
1976 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
1977 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
1978 Define char8_type_node and char8_array_type_node.
1979 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
1980 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
1981 (c_cpp_builtins): Predefine __cpp_char8_t.
1982 * c-lex.c (lex_string): Use char8_array_type_node as the type of
1983 CPP_UTF8STRING.
1984 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
1985 * c-opts.c: If not otherwise specified, enable -fchar8_t when
1986 targeting C++2a.
1987 * c.opt: Add the -fchar8_t command line option.
1988
23db6ced
MS
19892019-01-14 Martin Sebor <msebor@redhat.com>
1990
1991 PR target/88638
1992 * c-attribs.c (positional_argument): Call valid_format_string_type_p
1993 and issue errors if it fails.
1994 * c-common.h (valid_format_string_type_p): Declare.
1995 * c-format.c (valid_stringptr_type_p): Rename...
1996 (valid_format_string_type_p): ...to this and make extern.
1997 (handle_format_arg_attribute): Adjust to new name.
1998 (check_format_string): Same.
1999
234c3818
L
20002019-01-13 H.J. Lu <hongjiu.lu@intel.com>
2001
2002 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
2003 Replace "may may" with "may" in warning message.
2004
d8fcab68
JJ
20052019-01-07 Jakub Jelinek <jakub@redhat.com>
2006
2007 PR c++/85052
2008 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
2009 (c_build_vec_convert): Declare.
2010 * c-common.c (c_build_vec_convert): New function.
2011
29d24852
MS
20122019-01-04 Martin Sebor <msebor@redhat.com>
2013
2014 PR c/88546
2015 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
2016 Handle C++ empty throw specification and C11 _Noreturn.
2017 (has_attribute): Also handle C11 _Noreturn.
2018
9069a4c9
MS
20192019-01-04 Martin Sebor <msebor@redhat.com>
2020
2021 PR c/88363
2022 * c-attribs.c (positional_argument): Also accept enumerated types.
2023
a5544970
JJ
20242019-01-01 Jakub Jelinek <jakub@redhat.com>
2025
2026 Update copyright years.
2027
da77eace
L
20282018-12-20 H.J. Lu <hongjiu.lu@intel.com>
2029
2030 PR c/51628
2031 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
2032 * c-warn.c (check_alignment_of_packed_member): New function.
2033 (check_address_of_packed_member): Likewise.
2034 (check_and_warn_address_of_packed_member): Likewise.
2035 (warn_for_address_or_pointer_of_packed_member): Likewise.
2036 * c.opt: Add -Wno-address-of-packed-member.
2037
573767d4
DM
20382018-12-20 David Malcolm <dmalcolm@redhat.com>
2039
2040 PR c++/87504
2041 * c-warn.c (get_outermost_macro_expansion): New function.
2042 (spelled_the_same_p): Use it to unwind the macro expansions, and
2043 compare the outermost macro in each nested expansion, rather than
2044 the innermost.
2045
a14feb3c
DM
20462018-12-19 David Malcolm <dmalcolm@redhat.com>
2047
2048 PR c++/87504
2049 * c-common.h (warn_tautological_cmp): Convert 1st param from
2050 location_t to const op_location_t &.
2051 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
2052 when testing for INTEGER_CST.
2053 (warn_tautological_bitwise_comparison): Convert 1st param from
2054 location_t to const op_location_t &; use it to build a
2055 binary_op_rich_location, and use this.
2056 (spelled_the_same_p): New function.
2057 (warn_tautological_cmp): Convert 1st param from location_t to
2058 const op_location_t &. Warn for macro expansions if
2059 spelled_the_same_p. Use binary_op_rich_location.
2060
dfd7fdca
DM
20612018-12-19 David Malcolm <dmalcolm@redhat.com>
2062
2063 PR c++/43064
2064 PR c++/43486
2065 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
2066 (verify_tree): Handle location wrappers.
2067 (c_common_truthvalue_conversion): Strip any location wrapper.
2068 Handle CONST_DECL.
2069 (fold_offsetof): Strip any location wrapper.
2070 (complete_array_type): Likewise for initial_value.
2071 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
2072 index before checking for INTEGER_CST.
2073 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
2074 print parentheses around location wrappers.
2075 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
2076 before checking for INTEGER_CST.
2077 (warn_tautological_bitwise_comparison): Call
2078 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
2079 before checking for INTEGER_CST.
2080 (readonly_error): Strip any location wrapper.
2081 (warn_array_subscript_with_type_char): Strip location wrappers
2082 before checking for INTEGER_CST. Use the location of the index if
2083 available.
2084
5c8b3702
JM
20852018-12-06 Jason Merrill <jason@redhat.com>
2086
2087 PR c++/88136 - -Wdeprecated-copy false positives
2088 * c.opt (Wdeprecated-copy-dtor): New.
2089 (Wdeprecated-copy): Move to -Wextra.
2090
673670da
MS
20912018-11-29 Martin Sebor <msebor@redhat.com>
2092
2093 PR c/88172
2094 PR testsuite/88208
2095 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
2096 alignments to values less than the target requires.
2097 (has_attribute): For attribute aligned consider both the attribute
2098 and the alignment bits.
2099 * c-common.c (c_init_attributes): Optionally issue a warning for
2100 zero alignment.
2101
04864ec8
MS
21022018-11-28 Martin Sebor <msebor@redhat.com>
2103
2104 PR c/88065
2105 PR c/87297
2106 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
2107 or destination is an error.
2108
ace83db0
JJ
21092018-11-28 Jakub Jelinek <jakub@redhat.com>
2110
2111 PR c++/88215
2112 * c-ubsan.c: Include langhooks.h.
2113 (ubsan_instrument_division): Change gcc_assert that main variants
2114 of op0 and op1 types are equal to gcc_checking_assert that the
2115 main variants are compatible types.
2116
da193a27
EB
21172018-11-27 Eric Botcazou <ebotcazou@adacore.com>
2118
2119 * c-ada-spec.c: Include stringpool.h.
2120 (has_static_fields): Return false for incomplete types.
2121 (is_tagged_type): Likewise.
2122 (has_nontrivial_methods): Likewise.
2123 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
2124 (struct overloaded_name_hash): New structure.
2125 (struct overloaded_name_hasher): Likewise.
2126 (overloaded_names): New global variable.
2127 (init_overloaded_names): New static function.
2128 (overloaded_name_p): New predicate.
2129 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
2130 on the TYPE_STUB_DECL of the original type of a typedef, if any.
2131 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
2132 Remove always-true condition and dump forward types.
2133 (dump_ada_specs): Delete overloaded_names.
2134
98f08eb8
MS
21352018-11-20 Martin Sebor <msebor@redhat.com>
2136
2137 * c-attribs.c (type_for_vector_size): New function.
2138 (type_valid_for_vector_size): Same.
2139 (handle_vector_size_attribute): Move code to the functions above
2140 and call them.
2141 (validate_attribute, has_attribute): New functions.
2142 * c-common.h (has_attribute): Declare.
2143 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
2144 * c-common.c (c_common_resword): Same.
2145
2674fa47
JM
21462018-11-16 Jason Merrill <jason@redhat.com>
2147
2148 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
2149 * c-attribs.c (attr_cold_hot_exclusions): Make public.
2150
258b3854
JJ
21512018-11-16 Jakub Jelinek <jakub@redhat.com>
2152
2153 PR middle-end/87854
2154 * c-common.c (fix_string_type): Reject string literals larger than
2155 TYPE_MAX_VALUE (ssizetype) bytes.
2156
1d249509
MS
21572018-11-15 Martin Sebor <msebor@redhat.com>
2158
2159 PR c++/87541
2160 PR c++/87542
2161 * c-attribs.c (positional_argument): New function.
2162 (handle_alloc_size_attribute): Use it and simplify.
2163 (handle_alloc_align_attribute): Same.
2164 (handle_assume_aligned_attribute): Same.
2165 (handle_nonnull_attribute): Same.
2166 * c-common.c (check_function_arguments): Pass fntype to
2167 check_function_format.
2168 * c-common.h (check_function_format): Add an argument.
2169 (PosArgFlags, positional_argument): Declare new type and function.
2170 * c-format.c (decode_format_attr): Add arguments.
2171 (check_format_string, get_constant): Same.
2172 (convert_format_name_to_system_name): Adjust.
2173
478dd60d
DM
21742018-11-15 David Malcolm <dmalcolm@redhat.com>
2175
2176 PR other/19165
2177 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
2178
8cca0163
JJ
21792018-11-14 Jakub Jelinek <jakub@redhat.com>
2180
8ee09943
JJ
2181 P1236R1 - Signed integers are two's complement
2182 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
2183 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
2184 with in-range second operand well defined for -std=c++2a.
2185
8cca0163
JJ
2186 PR other/88007
2187 * c-common.c (parse_optimize_options): Allocate option string from
2188 opts_obstack rather than as GC memory. Move the allocation after
2189 warning for invalid option.
2190
620e594b
DM
21912018-11-13 David Malcolm <dmalcolm@redhat.com>
2192
2193 * c-common.c (c_get_substring_location): Update for renaming of
2194 get_source_location_for_substring to get_location_within_string.
2195 * c-lex.c: Replace "source_location" with "location_t".
2196 * c-opts.c: Likewise.
2197 * c-ppoutput.c: Likewise.
2198
f9731de3
MS
21992018-11-13 Martin Sebor <msebor@redhat.com>
2200
2201 PR middle-end/81824
2202 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
2203 (handle_tls_model_attribute): Improve diagnostics.
2204
e4bd6d5e
JM
22052018-11-12 Jason Merrill <jason@redhat.com>
2206
a6bb6b07
JM
2207 * c-cppbuiltin.c (c_cpp_builtins): Define
2208 __cpp_impl_destroying_delete.
2209
e4bd6d5e
JM
2210 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
2211 __cpp_conditional_explicit.
2212
79a2c428
MS
22132018-11-09 Martin Sebor <msebor@redhat.com>
2214
2215 PR middle-end/81824
2216 * c-attribs.c (handle_copy_attribute): New function.
2217
4c7bd361
MS
22182018-11-09 Martin Sebor <msebor@redhat.com>
2219
2220 PR c/87795
2221 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
2222
28567c40
JJ
22232018-11-08 Jakub Jelinek <jakub@redhat.com>
2224
2225 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
2226 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
2227 enum omp_memory_order MEMORY_ORDER.
2228 (c_finish_omp_flush): Add MO argument.
2229 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
2230 (c_finish_omp_for): Add FINAL_P argument.
2231 * c-omp.c: Include memmodel.h.
2232 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
2233 OMP_TASKGROUP_CLAUSES to it.
2234 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
2235 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
2236 instead of OMP_ATOMIC_SEQ_CST.
2237 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
2238 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
2239 __atomic_thread_fence call with the given value.
2240 (check_omp_for_incr_expr): Formatting fixes.
2241 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
2242 even in OpenMP loops, diagnose if NE_EXPR and incr expression
2243 is not constant expression 1 or -1. Transform NE_EXPR loops
2244 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
2245 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
2246 loops too.
2247 (c_omp_split_clauses): Add support for combined
2248 #pragma omp parallel master and
2249 #pragma omp {,parallel }master taskloop{, simd} constructs.
2250 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
2251 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
2252 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
2253 (c_omp_predetermined_sharing): Don't return
2254 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
2255 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
2256 PRAGMA_OMP_REQUIRES.
2257 * c-pragma.h (enum pragma_kind): Likewise.
2258 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
2259 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
2260
204839e7
DM
22612018-11-08 David Malcolm <dmalcolm@redhat.com>
2262
2263 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
2264
d8010ee4
DM
22652018-11-08 David Malcolm <dmalcolm@redhat.com>
2266
2267 * c-format.c (local_cgraph_node_ptr_node): New variable.
2268 (gcc_dump_printf_char_table): Add entry for %C.
2269 (get_pointer_to_named_type): New function, taken from the handling
2270 code for "gimple *" from...
2271 (init_dynamic_diag_info): ...here. Add handling for
2272 "cgraph_node *".
2273 * c-format.h (T_CGRAPH_NODE): New.
2274
4be5c72c
JM
22752018-10-19 Jason Merrill <jason@redhat.com>
2276
2277 * c-cppbuiltin.c (c_cpp_builtins): Add
2278 __cpp_nontype_template_parameter_class.
2279
f3f6029d
NS
22802018-10-31 Nathan Sidwell <nathan@acm.org>
2281
ab5324fb
NS
2282 * c-opts.c (c_finish_options): Force command line macro
2283 location. Refactor to avoid repeating main debug hook.
2284 (push_command_line_include): Clarify comment.
2285
f3f6029d
NS
2286 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
2287
91e3ec29
MS
22882018-10-30 Martin Sebor <msebor@redhat.com>
2289
2290 PR middle-end/87041
2291 * c-format.c (check_format_types): Avoid diagnosing null pointer
2292 arguments to printf-family of functions.
2293
b5ff4f5c
MP
22942018-10-30 Marek Polacek <polacek@redhat.com>
2295
2296 Implement P0892R2, explicit(bool).
2297 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
2298
7e2de6df
DM
22992018-10-29 David Malcolm <dmalcolm@redhat.com>
2300
2301 * name-hint.h (name_hint::take_deferred): New member function.
2302
b2bf438c
DM
23032018-10-29 David Malcolm <dmalcolm@redhat.com>
2304
2305 PR c++/56856
2306 * c-common.c (check_function_sentinel): Call fold_for_warn on the
2307 argument.
2308 (check_function_restrict): Rename param "argarray" to
2309 "unfolded_argarray", and make a copy named "argarray", calling
2310 fold_for_warn on each argument.
2311 (check_function_arguments): Add note about responsibility for
2312 folding the arguments.
2313
9f936c86
JM
23142018-10-17 Joseph Myers <joseph@codesourcery.com>
2315
2316 * c-common.c (flag_isoc2x): New variable.
2317 * c-common.h (clk_c): Update comment to reference C2X.
2318 (flag_isoc99, flag_isoc11): Update comments to reference future
2319 standard versions in general.
2320 (flag_isoc2x): Declare.
2321 * c-opts.c (set_std_c2x): New function.
2322 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
2323 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
2324 flag_isoc2x to 0.
2325 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
2326
7a8a92c4
JM
23272018-10-17 Joseph Myers <joseph@codesourcery.com>
2328
2329 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
2330 (std=iso9899:2018): Document C17 as published in 2018.
2331
4dc003ff
CL
23322018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
2333
2334 PR c++/87364
2335 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
2336
79371671
WW
23372018-10-11 Will Wray <wjwray@gmail.com>
2338
2339 PR c++/87364
2340 * c-pretty-print.h (pp_c_type_cast): Prototype.
2341 (pp_c_integer_constant): Likewise.
2342 * c-pretty-print.c (pp_c_type_cast): No longer static.
2343 (pp_c_integer_constant): Likewise.
2344 (pp_c_enumeration_constant): Fix loop termination when finding
2345 name of constant. No longer returns a value. Call
2346 pp_c_integer_constant.
2347 (c_pretty_printer::constant): Update for changes to
2348 pp_c_enumeration_constant.
2349
46c62690
JJ
23502018-10-11 Jakub Jelinek <jakub@redhat.com>
2351
2352 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
2353 for no_unique_address.
2354
c24300ba
DM
23552018-10-09 David Malcolm <dmalcolm@redhat.com>
2356
2357 * c-common.c (c_option_controlling_cpp_error): Rename to...
2358 (c_option_controlling_cpp_diagnostic): ...this, and convert
2359 "reason" from int to enum.
2360 (c_cpp_error): Rename to...
2361 (c_cpp_diagnostic): ...this, converting level and reason to enums.
2362 * c-common.h (c_cpp_error): Rename to...
2363 (c_cpp_diagnostic): ...this, converting level and reason to enums.
2364 * c-opts.c (c_common_init_options): Update for renaming.
2365
8656dafa
RS
23662018-10-08 Richard Sandiford <richard.sandiford@arm.com>
2367
2368 PR c/87286
2369 * c-common.c (vector_types_compatible_elements_p): Use
2370 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
2371
8cff0652
VK
23722018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
2373
2374 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
2375 to generate constructor destructor priority warning.
2376 * c.opt (-Wprio-ctor-dtor): New option.
2377
bedf03a2
JM
23782018-10-01 Jason Merrill <jason@redhat.com>
2379
2380 * c-lex.c (c_common_has_attribute): Add no_unique_address.
2381
6cc430c1
EB
23822018-10-01 Eric Botcazou <ebotcazou@adacore.com>
2383
2384 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
2385 (dump_ada_node): Add const keyword.
2386
87677ac7
ML
23872018-09-25 Martin Liska <mliska@suse.cz>
2388
2389 * c-common.c (c_common_truthvalue_conversion):
2390 Remove Pascal from documentation.
2391
518196cb
EB
23922018-09-21 Eric Botcazou <ebotcazou@adacore.com>
2393
2394 * c-ada-spec.c: Include diagnostic.h.
2395 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
2396
a599af84
MP
23972018-09-19 Marek Polacek <polacek@redhat.com>
2398
2399 * c.opt (Wclass-conversion): New.
2400
9c4a4b3c
DM
24012018-09-17 David Malcolm <dmalcolm@redhat.com>
2402
2403 * c-format.c (range_label_for_format_type_mismatch::get_text):
2404 Update for new param.
2405
c896ecfe
DM
24062018-09-17 David Malcolm <dmalcolm@redhat.com>
2407
2408 * c-format.c (format_warning_at_char): Update for introduction of
2409 format_string_diagnostic_t.
2410 (format_type_warning): Likewise.
2411
80c6d1f4
MJ
24122018-09-17 Martin Jambor <mjambor@suse.cz>
2413
2414 PR c/63886
2415 * c.opt (Wabsolute-value): New.
2416
6d900107
BE
24172018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2418
2419 * c-common.c (complete_flexible_array_elts): New helper function.
2420 * c-common.h (complete_flexible_array_elts): Declare.
2421
b5764229
BE
24222018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2423
2424 * c-common.c (braced_list_to_string): Remove eval parameter.
2425 Add some more checks. Always create zero-terminated STRING_CST.
2426 * c-common.h (braced_list_to_string): Adjust prototype.
2427
85204e23
DM
24282018-08-27 David Malcolm <dmalcolm@redhat.com>
2429
2430 PR 87091
2431 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
2432 to a tri-state.
2433 (maybe_suggest_missing_token_insertion): Likewise.
2434 (maybe_add_include_fixit): Add param "override_location". If set,
2435 and source-printing is enabled, then override the rich_location's
2436 primary location with that of the insertion point for the fix-it
2437 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
2438 * c-common.h (extern void maybe_add_include_fixit): Add bool
2439 param.
2440 * c-format.c (selftest::test_type_mismatch_range_labels): Update
2441 for conversion of show_caret_p to a tri-state.
2442 * c-warn.c (warn_for_restrict): Likewise.
2443 * known-headers.cc
2444 (suggest_missing_header::~suggest_missing_header): Update call to
2445 maybe_add_include_fixit to suggest overriding the location, as it
2446 is for a note.
2447
3d78e008
ML
24482018-08-27 Martin Liska <mliska@suse.cz>
2449
2450 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
2451 fndecl_built_in_p and remove check for FUNCTION_DECL if
2452 possible.
3d78e008
ML
2453 (check_builtin_function_arguments): Likewise.
2454 (reject_gcc_builtin): Likewise.
2455 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
2456
b5be6d0c
MP
24572018-08-26 Marek Polacek <polacek@redhat.com>
2458
2459 PR c++/87029, Implement -Wredundant-move.
2460 * c.opt (Wredundant-move): New option.
2461
79ca9c35
MP
24622018-08-21 Marek Polacek <polacek@redhat.com>
2463
2464 PR c++/86981, Implement -Wpessimizing-move.
2465 * c.opt (Wpessimizing-move): New option.
2466
097f82ec
DM
24672018-08-20 David Malcolm <dmalcolm@redhat.com>
2468
2469 PR other/84889
2470 * c-attribs.c (common_handle_aligned_attribute): Add
2471 auto_diagnostic_group instance.
2472 * c-indentation.c (warn_for_misleading_indentation): Likewise.
2473 * c-opts.c (c_common_post_options): Likewise.
2474 * c-warn.c (warn_logical_not_parentheses): Likewise.
2475 (warn_duplicated_cond_add_or_warn): Likewise.
2476 (warn_for_multistatement_macros): Likewise.
2477
3fb558b1
NS
24782018-08-20 Nathan Sidwell <nathan@acm.org>
2479
2480 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
2481 access.
2482
800c0e98
NS
24832018-08-17 Nathan Sidwell <nathan@acm.org>
2484
2485 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
2486 field.
2487 (laxy_hex_fp_value_count): Make unsigned.
2488 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
2489 manipulate the macro.
2490 (builtin_defin_with_hex_fp_value): Adjust callback name, use
2491 cpp_define_lazily.
2492
6f795a92
DM
24932018-08-17 David Malcolm <dmalcolm@redhat.com>
2494
2495 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
2496 (gcc_dump_printf_length_specs): New.
2497 (gcc_dump_printf_flag_pairs): New.
2498 (gcc_dump_printf_flag_specs): New.
2499 (gcc_dump_printf_char_table): New.
2500 (format_types_orig): Add entry for "gcc_dump_printf".
2501 (init_dynamic_diag_info): Set up length_char_specs and
2502 conversion_specs for gcc_dump_printf_format_type.
2503 (handle_format_attribute): Handle gcc_dump_printf_format_type.
2504
c5d725c0
NS
25052018-08-17 Nathan Sidwell <nathan@acm.org>
2506
10f04917
NS
2507 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
2508
c5d725c0
NS
2509 * c-ada-spec.c: Don't #include "cpp-id-data.h"
2510 * c-cppbuiltin.c: Likewise.
2511
c0c12356
ML
25122018-08-17 Martin Liska <mliska@suse.cz>
2513
2514 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
2515 Ignore/Deprecated flag. Warning is done automatically for
2516 Deprecated flags.
c0c12356 2517
10fcc142
DM
25182018-08-16 David Malcolm <dmalcolm@redhat.com>
2519
2520 PR c++/70693
2521 * c-common.c (selftest::c_family_tests): Call
2522 selftest::c_indentation_c_tests.
2523 * c-common.h (selftest::c_indentation_c_tests): New decl.
2524 * c-indentation.c: Include "selftest.h".
2525 (next_tab_stop): Add "tab_width" param, rather than accessing
2526 cpp_opts.
2527 (get_visual_column): Likewise. Clarify comment. Bulletproof
2528 against reading past the end of the line.
2529 (get_first_nws_vis_column): Add "tab_width" param.
2530 (detect_intervening_unindent): Likewise.
2531 (should_warn_for_misleading_indentation): Read tab width from
2532 cpp_opts and pass around.
2533 (selftest::test_next_tab_stop): New test.
2534 (selftest::assert_get_visual_column_succeeds): New function.
2535 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
2536 (selftest::assert_get_visual_column_fails): New function.
2537 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
2538 (selftest::test_get_visual_column): New test.
2539 (selftest::c_indentation_c_tests): New function.
2540
3f6677f4
NS
25412018-08-16 Nathan Sidwell <nathan@acm.org>
2542
2543 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
2544 (store_ada_macro): Likewise.
2545 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
2546 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
2547
96e6ae57
DM
25482018-08-15 David Malcolm <dmalcolm@redhat.com>
2549
2550 * c-format.c: Include "selftest-diagnostic.h" and
2551 "gcc-rich-location.h".
2552 (format_warning_at_char): Pass NULL for new label params of
2553 format_warning_va.
2554 (class indirection_suffix): New class.
2555 (class range_label_for_format_type_mismatch): New class.
2556 (format_type_warning): Move logic for generating "*" suffix to
2557 class indirection_suffix. Create "fmt_label" and "param_label"
2558 to show their types, and pass them to the
2559 format_warning_at_substring calls.
2560 (selftest::test_type_mismatch_range_labels): New test.
2561 (selftest::c_format_c_tests): Call it.
2562
23aa9f7c
MS
25632018-08-13 Martin Sebor <msebor@redhat.com>
2564
2565 PR tree-optimization/71625
2566 * c-common.c (braced_list_to_string): New function.
2567 * c-common.h (braced_list_to_string): Declare it.
2568
f10a9135
NS
25692018-08-08 Nathan Sidwell <nathan@acm.org>
2570
2571 * c-common.c (try_to_locate_new_include_inertion_point): Use
2572 linemap_included_from_linemap.
2573 * c-lex.c (fe_file_change): Use linemap_included_from.
2574 * c-ppoutput.c (pp_file_change): Likewise.
2575
8a45b051
MS
25762018-08-01 Martin Sebor <msebor@redhat.com>
2577
2578 PR tree-optimization/86650
ab20d992 2579 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
8a45b051
MS
2580 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
2581 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
2582 * c-format.h (T89_G): Update to be "gimple *" rather than
2583 "gcall *".
2584 (local_gcall_ptr_node): Rename...
2585 (local_gimple_ptr_node): ...to this.
2586
e540ccc0
DM
25872018-07-31 David Malcolm <dmalcolm@redhat.com>
2588
2589 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
2590 table entries for gcc_diag_char_table, and the 'Z' entry from
2591 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
2592 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
2593 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
2594 adding missing "Z" for this table. Remove erroneous "G" and "K"
2595 entries.
2596 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
2597 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
2598 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
2599
425fc685
RE
26002018-07-31 Richard Earnshaw <rearnsha@arm.com>
2601
2602 * c-common.c (speculation_safe_resolve_call): New function.
2603 (speculation_safe_resolve_params): New function.
2604 (speculation_safe_resolve_return): New function.
2605 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
2606 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
2607 __HAVE_SPECULATION_SAFE_VALUE.
2608
181463c2
DM
26092018-07-20 David Malcolm <dmalcolm@redhat.com>
2610
2611 * c-common.c (c_cpp_error): Remove redundant "line_table"
2612 parameter from call to rich_location::set_range.
2613 (maybe_suggest_missing_token_insertion): Likewise.
2614
0d7f9065
MS
26152018-07-20 Martin Sebor <msebor@redhat.com>
2616
2617 PR middle-end/82063
ab20d992 2618 * c.opt (-Warray-bounds): Remove redundant -Wall.
0d7f9065 2619
00abf86c
MS
26202018-07-20 Martin Sebor <msebor@redhat.com>
2621
2622 PR middle-end/82063
2623 * c-common.h (c_common_handle_option): Change function argument
2624 to HOST_WIDE_INT.
2625 * c-opts.c (c_common_init_options): Same.
2626 (c_common_handle_option): Same. Remove special handling of
2627 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
2628 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
2629 options to take a HOST_WIDE_INT argument and accept a byte-size
2630 suffix. Initialize.
2631 (-Wvla-larger-than): Same.
2632 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
2633 (-Wno-vla-larger-than): Same.
2634
9b452033
JJ
26352018-07-12 Jakub Jelinek <jakub@redhat.com>
2636
2637 * c-attribs.c (c_common_attribute_table): Add
2638 "omp declare target implicit" attribute.
2639
cd0762f3
RB
26402018-07-12 Richard Biener <rguenther@suse.de>
2641
2642 PR c/86453
2643 * c-attribs.c (handle_packed_attribute): Do not build a variant
2644 type with TYPE_PACKED, instead ignore the attribute if we may
2645 not apply to the original type.
2646
0b27c3ed
JJ
26472018-07-10 Jakub Jelinek <jakub@redhat.com>
2648
2649 PR c++/86443
2650 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
2651 to contain TREE_LIST for both the original class iterator and the
2652 "last" helper var.
2653
e730a0ef
EB
26542018-07-07 Eric Botcazou <ebotcazou@adacore.com>
2655
2656 * c-ada-spec.c (to_ada_name): Remove index parameter.
2657 (pp_ada_tree_identifier): Likewise.
2658 (dump_ada_macros): Adjust call to to_ada_name.
2659 (struct overloaded_name_hash): Delete.
2660 (struct overloaded_name_hasher): Likewise.
2661 (overloaded_names): Likewise.
2662 (compute_overloading_index): Likewise.
2663 (dump_ada_decl_name): Do not call compute_overloading_index and
2664 adjust calls to pp_ada_tree_identifier.
2665 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
2666 (dump_ada_import): Add spc parameter and switch to aspect syntax.
2667 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
2668 (dump_ada_enum_type): Remove type and display_convention parameters.
2669 Adjust calls to pp_ada_tree_identifier.
2670 (dump_ada_node): Likewise and for dump_ada_structure.
2671 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
2672 and tidy up.
2673 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
2674 syntax.
2675 (print_constructor): Adjust call to pp_ada_tree_identifier.
2676 (print_destructor): Likewise.
2677 (dump_ada_declaration): Switch to aspect syntax.
2678 (dump_ada_structure): Likewise and tidy up. Replace display_convention
2679 parameter with nested parameter.
2680 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
2681 (dump_ada_specs): Do not delete overloaded_names table.
2682
8de583fc
PB
26832018-07-06 Peter Bergner <bergner@linux.ibm.com>
2684
2685 PR target/86324
e730a0ef 2686 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
2687 target hook.
2688
09cff37b
NS
26892018-07-05 Nathan Sidwell <nathan@acm.org>
2690
2691 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
2692 NO_IMPLICIT_EXTERN_C.
2693
98086b2b
ML
26942018-06-28 Martin Liska <mliska@suse.cz>
2695
2696 * cppspec.c: Include opt-suggestions.h.
2697
ab20d992
JJ
26982018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2699 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
2700 Cesar Philippidis <cesar@codesourcery.com>
2701
2702 * c-pragma.h (enum pragma_omp_clause): Add
2703 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
2704 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
2705
f41b7612
JJ
27062018-06-20 Jakub Jelinek <jakub@redhat.com>
2707
2708 PR c++/86210
2709 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
2710 comment.
2711
4252ccd7
MS
27122018-06-18 Martin Sebor <msebor@redhat.com>
2713
2714 PR middle-end/85602
2715 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
2716 nonstring.
2717
e197e64e
KV
27182018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2719
2720 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
2721
34a7a230
JM
27222018-06-13 Jason Merrill <jason@redhat.com>
2723
5cef3733
JM
2724 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
2725 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
2726 handling.
2727
34a7a230
JM
2728 PR c++/86094 - wrong code with defaulted move ctor.
2729 * c-opts.c (c_common_post_options): Bump the current ABI version to
2730 13. Set warn_abi_version and flag_abi_compat_version to the current
2731 version rather than 0. Fix defaulting flag_abi_compat_version from
2732 warn_abi_version.
2733
bb0f14ae
MS
27342018-06-12 Martin Sebor <msebor@redhat.com>
2735
2736 PR c/85931
2737 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
2738 sizeof source and destination yields the same value.
2739
3713f2e2
ML
27402018-06-12 Martin Liska <mliska@suse.cz>
2741
2742 * c.opt: Make MPX-related options as Deprecated.
2743
4af78ef8
DM
27442018-06-08 David Malcolm <dmalcolm@redhat.com>
2745
2746 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
2747 rather than 0.
2748
31db0fe0
ML
27492018-06-08 Martin Liska <mliska@suse.cz>
2750
2751 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
2752 for MPX (macros, related functions, fields in cgraph_node, ...).
2753 (handle_bnd_legacy): Likewise.
2754 (handle_bnd_instrument): Likewise.
2755 * c.opt: Likewise.
2756
fe16acf2
JJ
27572018-06-06 Jakub Jelinek <jakub@redhat.com>
2758
2759 PR c++/86068
2760 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
2761 __cpp_transactional_memory to 201500 instead of 210500.
2762
4dbdb49b
JM
27632018-06-06 Jason Merrill <jason@redhat.com>
2764
2765 PR c++/85710 - ICE with -Wmemset-elt-size.
2766 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
2767
f8ad043f
JM
27682018-06-01 Jason Merrill <jason@redhat.com>
2769
2770 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
2771 201703.
2772
abc24d93
EB
27732018-06-01 Eric Botcazou <ebotcazou@adacore.com>
2774
2775 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
2776 declaration for a typedef independently of whether the declaration of
2777 the subtype is generated.
2778
d258f4aa
MS
27792018-05-31 Martin Sebor <msebor@redhat.com>
2780
2781 PR c/82063
2782 * c.opt (-Wno-alloc-size-larger-than): New option.
2783
b67b9225
DP
27842018-04-22 David Pagan <dave.pagan@oracle.com>
2785
2786 PR c/55976
2787 * c-opts.c (c_common_post_options): Set default for warn_return_type
ab20d992 2788 for C++/C++ with ObjC extensions only. For C, makes it possible to
b67b9225
DP
2789 differentiate between default (no option), -Wreturn-type, and
2790 -Wno-return-type.
2791
04eb9c55
JM
27922018-05-29 Jason Merrill <jason@redhat.com>
2793
2794 * c.opt (Winit-list-lifetime): New flag.
2795
b0c31bc6
BE
27962018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
2797
2798 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
2799 splay_tree_delete_pointers.
2800
44284983
JJ
28012018-05-26 Jakub Jelinek <jakub@redhat.com>
2802
2803 PR bootstrap/85921
2804 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
2805 noinline variable to workaround broken kernel headers.
2806
b46b715d
JM
28072018-05-18 Jason Merrill <jason@redhat.com>
2808
2809 * c.opt (Wdeprecated-copy): New flag.
2810
40659769
ML
28112018-05-17 Martin Liska <mliska@suse.cz>
2812
2813 * c-warn.c (overflow_warning): Do not use
2814 space in between 'G_' and '('.
2815
403962ea
JM
28162018-05-09 Jason Merrill <jason@redhat.com>
2817
2818 * c-common.c (valid_array_size_p): Add complain parameter.
2819 * c-common.h: ...which defaults to true.
2820
1c9ee609
JJ
28212018-05-11 Jakub Jelinek <jakub@redhat.com>
2822
2823 PR c/85696
2824 * c-omp.c (c_omp_predetermined_sharing): Return
2825 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
2826
19916065
ML
28272018-05-11 Martin Liska <mliska@suse.cz>
2828
92a285c1 2829 PR sanitizer/85556
19916065
ML
2830 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
2831 TREE_LIST values.
2832
79e7b1fe
JJ
28332018-05-10 Jakub Jelinek <jakub@redhat.com>
2834
2835 PR c++/85662
2836 * c-common.h (fold_offsetof_1): Removed.
2837 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
2838 CTX argument defaulted to ERROR_MARK.
2839 * c-common.c (fold_offsetof_1): Renamed to ...
2840 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
2841 argument, convert the pointer constant to TYPE and use size_binop
2842 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
2843 a pointer type. Adjust recursive calls.
2844
86c12f76
EB
28452018-05-10 Eric Botcazou <ebotcazou@adacore.com>
2846
2847 PR c++/85400
2848 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
2849
ee336e84
NS
28502018-05-07 Nathan Sidwell <nathan@acm.org>
2851
2852 * c.opt (ffor-scope): Remove functionality, issue warning.
2853
6c072e21
NS
28542018-05-03 Nathan Sidwell <nathan@acm.org>
2855
2856 * c.opt (ffriend-injection): Remove functionality, issue warning.
2857
2cc7d3a7
DM
28582018-05-01 David Malcolm <dmalcolm@redhat.com>
2859
2860 PR c/84258
2861 * c-format.c (struct format_check_results): Add field
2862 "number_non_char".
2863 (check_format_info): Initialize it, and warn if encountered.
2864 (check_format_arg): Distinguish between wide char and
2865 everything else when detecting arrays of non-char.
2866
7761dfbe
DM
28672018-04-30 David Malcolm <dmalcolm@redhat.com>
2868
2869 * c-format.c (get_corrected_substring): Update for
2870 location_get_source_line returning a char_span. Use a char_span
2871 when handling the prefix of the correction.
2872 * c-indentation.c (get_visual_column): Update for
2873 location_get_source_line returning a char_span.
2874 (get_first_nws_vis_column): Likewise.
2875
62e98ef1
DM
28762018-03-29 David Malcolm <dmalcolm@redhat.com>
2877
2878 PR c++/84269
2879 * known-headers.cc (get_stdlib_header_for_name): Add various names
2880 from <assert.h>, <string.h>, and <memory.h>; add more names from
2881 <stdio.h>.
2882
a7dea617
JJ
28832018-03-27 Jakub Jelinek <jakub@redhat.com>
2884
2885 PR c++/85061
2886 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
2887 get_base_address of the second operand is a VAR_P, rather than the
2888 operand itself, and use gcc_checking_assert instead of gcc_assert.
2889
889a3a30
MP
28902018-03-23 Marek Polacek <polacek@redhat.com>
2891
2892 PR c++/85045
2893 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
2894 <case RDIV_EXPR>: Tweak condition.
2895
452154b9
EB
28962018-03-20 Eric Botcazou <ebotcazou@adacore.com>
2897
2898 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
2899
63ecb626
JJ
29002018-03-16 Jakub Jelinek <jakub@redhat.com>
2901
ce811fc4
JJ
2902 PR c/84909
2903 * c-warn.c (conversion_warning): Replace "to to" with "to" in
2904 diagnostics.
2905
63ecb626
JJ
2906 PR c/84910
2907 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
2908 diagnostics.
2909
a1295eec
RB
29102018-03-16 Richard Biener <rguenther@suse.de>
2911
2912 PR c/84873
2913 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
2914 unshare the possibly folded expression.
2915
919674fb
RB
29162018-03-15 Richard Biener <rguenther@suse.de>
2917
2918 PR c/84873
2919 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
2920
f99309b2
MS
29212018-03-13 Martin Sebor <msebor@redhat.com>
2922
2923 PR tree-optimization/84725
2924 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
2925 with all three narrow character types, including their qualified forms.
2926
e9b9fa4c
MS
29272018-03-12 Martin Sebor <msebor@redhat.com>
2928
2929 PR tree-optimization/83456
ab20d992 2930 * c-common.c (check_function_restrict): Return bool.
e9b9fa4c
MS
2931 Restore checking of bounded built-in functions.
2932 (check_function_arguments): Also return the result
2933 of warn_for_restrict.
ab20d992
JJ
2934 * c-common.c (check_function_restrict): Return bool.
2935 * c-warn.c (warn_for_restrict): Return bool.
e9b9fa4c 2936
0805d020
MP
29372018-03-02 Marek Polacek <polacek@redhat.com>
2938
2939 PR c++/84171
2940 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
2941 is erroneous.
2942
ed2a2f08
TS
29432018-03-02 Thomas Schwinge <thomas@codesourcery.com>
2944
2945 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
2946 function".
2947
90abdde0
MP
29482018-03-01 Marek Polacek <polacek@redhat.com>
2949
2950 PR c++/84639
2951 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
2952 alignment in computation.
2953
c6db43fa
EB
29542018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2955
2956 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
2957 <REAL_TYPE>: Deal specifically with _Float128/__float128.
2958
9e25c7ed
EB
29592018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2960
2961 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
2962 (is_char_array): Take a type instead of a declaration.
2963 (dump_ada_array_type): Likewise.
2964 (is_simple_enum): Minor tweak.
2965 (dump_ada_enum_type): New function extracted from...
2966 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
2967 <INTEGER_TYPE>: Remove unreachable code.
2968 <RECORD_TYPE>: Likewise. Minor tweaks.
2969 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
2970 <ENUMERAL_TYPE>: New case.
2971 <RECORD_TYPE>: Factor out common code.
2972 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
2973 Minor tweaks. Deal with enumeral types.
2974 (dump_ada_structure): Minor tweaks.
2975
09de3550
EB
29762018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2977
2978 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
2979 address for incomplete structures.
2980 (dump_forward_type): Do not bail out for incomplete structures.
2981 (dump_ada_declaration): Do not special-case incomplete structures
2982 for subtypes. Dump them as null records for types.
2983
095d8d4b
EB
29842018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2985
2986 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
2987 (is_char_array): Fix formatting.
2988 (dump_template_types): Likewise.
2989 (dump_generic_ada_node): Rename into...
2990 (dump_ada_node): ...this.
2991 <POINTER_TYPE>: Remove superfluous space. Use generic address for
2992 incomplete structures and not for empty structures. Do not use it
2993 when forward declarations are needed.
2994 (dump_forward_type): New function.
2995 (dump_nested_types): Remove FORWARD parameter. Do not consider
2996 TREE_VISITED and do not generate a forward declaration. Only dump
2997 original nested types for nested declaration.
2998 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
2999 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
3000 <RECORD_TYPE>: Do not consider TREE_VISITED.
3001 (dump_ada_declaration): Use booleans and fix formatting throughout.
3002 <TYPE_DECL>: Skip incomplete structures and not empty structures.
3003 Call dump_forward_type instead of dump_nested_types for a typedef.
3004 Remove superfluous check and adjust call to dump_nested_types.
3005 <POINTER_TYPE>: Call dump_forward_type and fall through.
3006 (dump_ada_struct_decl): Rename into...
3007 (dump_ada_structure): ...this. Do not special-case empty structures.
3008
d4cfd486
MS
30092018-02-27 Martin Sebor <msebor@redhat.com>
3010
3011 PR c++/83871
3012 * c.opt (-Wmissing-attributes): New option.
3013
b22dbd03
ML
30142018-02-21 Martin Liska <mliska@suse.cz>
3015
3016 * c.opt (Wcatch-value=): Add IntegerRange.
3017
883dfe2a
JM
30182018-02-15 Jason Merrill <jason@redhat.com>
3019
3020 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
3021
0444aa9c
NS
30222018-02-09 Nathan Sidwell <nathan@acm.org>
3023
3024 PR c/84293
3025 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
3026 arg.
3027 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
3028 arg. Adjust.
3029
cea71f0a
MS
30302018-02-09 Martin Sebor <msebor@redhat.com>
3031
3032 PR lto/84212
3033 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
3034 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
3035 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
3036 (-Wstrict-overflow, -Wsuggest-attribute): Same.
3037 (-Wuninitialized): Same.
3038
8c8b7be5
EB
30392018-02-09 Eric Botcazou <ebotcazou@adacore.com>
3040
3041 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
3042 keyword for components.
3043
7c30b12a
PC
30442018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
3045
3046 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
3047
eece7fe5
JK
30482018-02-02 Julia Koval <julia.koval@intel.com>
3049
3050 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
3051
7d07a93a
MP
30522018-01-29 Marek Polacek <polacek@redhat.com>
3053
3054 PR c/83966
3055 * c-format.c (check_function_format): Check current_function_decl.
3056
53723269
JJ
30572018-01-27 Jakub Jelinek <jakub@redhat.com>
3058
3059 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
3060 argument.
3061 (LAZY_HEX_FP_VALUES_CNT): Define.
3062 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
3063 values rather than just 12.
3064 (builtin_define_with_hex_fp_value): Likewise.
3065
7365279f
BK
30662018-01-18 Boris Kolpackov <boris@codesynthesis.com>
3067
92a285c1
ML
3068 PR other/70268
3069 * c.opt (-fmacro-prefix-map): New option.
3070 * c-opts.c (c_common_handle_option): Handle it.
3071 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
3072 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 3073
bb9869d5
DM
30742018-01-17 David Malcolm <dmalcolm@redhat.com>
3075
3076 PR c++/83814
3077 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
3078
68dc87c3
EB
30792018-01-10 Eric Botcazou <ebotcazou@adacore.com>
3080
3081 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
3082 Skip 'f' and 'F' characters if it is true.
3083 (store_ada_macro): Minor tweak.
3084 (dump_ada_macros) <CPP_COMMENT>: Likewise.
3085 <CPP_WSTRING>: Likewise.
3086 <CPP_STRING>: Output '&' in the buffer if not the first string.
3087 <CPP_NUMBER>: Adjust calls to dump_number.
3088
9a004410
DM
30892018-01-10 David Malcolm <dmalcolm@redhat.com>
3090
3091 PR c++/43486
3092 * c-common.c: Include "selftest.h".
3093 (get_atomic_generic_size): Perform the test for integral type
3094 before the range test for any integer constant, fixing indentation
3095 of braces. Call fold_for_warn before testing for an INTEGER_CST.
3096 (reject_gcc_builtin): Strip any location wrapper from EXPR.
3097 (selftest::test_fold_for_warn): New function.
3098 (selftest::c_common_c_tests): New function.
3099 (selftest::c_family_tests): Call it, and
3100 selftest::c_pretty_print_c_tests.
3101 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
3102 * c-format.c (check_format_arg): Convert VAR_P check to a
3103 fold_for_warn.
3104 * c-pretty-print.c: Include "selftest.h".
3105 (pp_c_cast_expression): Don't print casts for location wrappers.
3106 (selftest::assert_c_pretty_printer_output): New function.
3107 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
3108 (selftest::test_location_wrappers): New function.
3109 (selftest::c_pretty_print_c_tests): New function.
3110 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
3111
5c0caeb3
RS
31122018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3113 Alan Hayward <alan.hayward@arm.com>
3114 David Sherwood <david.sherwood@arm.com>
3115
3116 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
3117
73a699ae
RS
31182018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3119 Alan Hayward <alan.hayward@arm.com>
3120 David Sherwood <david.sherwood@arm.com>
3121
3122 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
3123 as polynomial.
3124
928686b1
RS
31252018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3126 Alan Hayward <alan.hayward@arm.com>
3127 David Sherwood <david.sherwood@arm.com>
3128
3129 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
3130 (convert_vector_to_array_for_subscript): Handle polynomial
3131 TYPE_VECTOR_SUBPARTS.
3132 (c_common_type_for_mode): Check valid_vector_subparts_p.
3133 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
3134 VECTOR_CST_NELTS.
3135
85ec4feb
JJ
31362018-01-03 Jakub Jelinek <jakub@redhat.com>
3137
3138 Update copyright years.
3139
170a8bd6 31402017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 3141 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
3142
3143 * c-pragma.c (init_pragma): Register pragma GCC unroll.
3144 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
3145
ab20d992 31462017-12-22 Alexandre Oliva <aoliva@redhat.com>
18408e96
AO
3147
3148 PR debug/83527
3149 PR debug/83419
3150 * c-semantics.c (only_debug_stmts_after_p): New.
3151 (pop_stmt_list): Clear side effects in debug-only stmt list.
3152 Check for single nondebug stmt followed by debug stmts only.
3153
c12d20d4
AO
31542017-12-21 Alexandre Oliva <aoliva@redhat.com>
3155
3156 PR debug/83419
3157 * c-semantics.c (pop_stmt_list): Propagate side effects from
3158 single nondebug stmt to container list.
3159
01512446
JJ
31602017-12-19 Jakub Jelinek <jakub@redhat.com>
3161
3162 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
3163 conditions with typical order conditions.
3164
82cfbd01
MP
31652017-12-18 Marek Polacek <polacek@redhat.com>
3166
3167 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
3168 not in effect.
3169
99da11ec
MS
31702017-12-17 Martin Sebor <msebor@redhat.com>
3171
3172 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
3173 an error for attribute warn_if_not_aligned.
3174
cc8bea0a
MS
31752017-12-16 Martin Sebor <msebor@redhat.com>
3176
3177 PR tree-optimization/78918
3178 * c-common.c (check_function_restrict): Avoid checking built-ins.
3179 * c.opt (-Wrestrict): Include in -Wall.
3180
4849deb1
JJ
31812017-12-15 Jakub Jelinek <jakub@redhat.com>
3182
3183 * c-attribs.c (c_common_attribute_table,
3184 c_common_format_attribute_table): Swap affects_type_identity
3185 and handler fields, adjust comments.
3186
c65e18d3
BE
31872017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3188
3189 * c.opt (Wcast-function-type): New warning option.
3190 * c-lex.c (get_fileinfo): Avoid warning.
3191 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
3192
2004617a
QZ
31932017-12-14 Qing Zhao <qing.zhao@oracle.com>
3194
7365279f 3195 PR middle_end/79538
2004617a
QZ
3196 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
3197 Adjust the size of buf1 and buf2, add a new buf to avoid
3198 format-overflow warning.
3199
ab20d992 32002017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
3201
3202 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
3203 subsequent statement list.
3204
5d9ae53d
MS
32052017-12-07 Martin Sebor <msebor@redhat.com>
3206
3207 PR c/81544
3208 PR c/81566
3209 * c-attribs.c (attr_aligned_exclusions): New array.
3210 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
3211 (attr_common_exclusions, attr_const_pure_exclusions): Same.
3212 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
3213 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
3214 (attr_warn_unused_result_exclusions): Same.
3215 (handle_hot_attribute, handle_cold_attribute): Simplify.
3216 (handle_const_attribute): Warn on function returning void.
3217 (handle_pure_attribute): Same.
3218 (handle_aligned_attribute): Diagnose conflicting attribute
3219 specifications.
3220 * c-warn.c (diagnose_mismatched_attributes): Simplify.
3221
c79144f8
DM
32222017-12-06 David Malcolm <dmalcolm@redhat.com>
3223
3224 PR c/83236
3225 * c-common.c (selftest::c_family_tests): Call
3226 selftest::c_spellcheck_cc_tests.
3227 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
3228 * c-spellcheck.cc: Include "selftest.h".
3229 (name_reserved_for_implementation_p): New function.
3230 (should_suggest_as_macro_p): New function.
3231 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
3232 should_suggest_as_macro_p and call it.
3233 (selftest::test_name_reserved_for_implementation_p): New function.
3234 (selftest::c_spellcheck_cc_tests): New function.
3235 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
3236
613bc14f
DM
32372017-12-06 David Malcolm <dmalcolm@redhat.com>
3238
3239 * c-spellcheck.cc: New file, taken from macro-handling code in
3240 spellcheck-tree.c.
3241 * c-spellcheck.h: New file, taken from macro-handling code in
3242 spellcheck-tree.h.
3243
e76c7157
JJ
32442017-12-01 Jakub Jelinek <jakub@redhat.com>
3245
3246 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
3247 attribute.
3248 (handle_simd_attribute): Don't check for "cilk simd function"
3249 attribute. Reindent, formatting changes.
3250
b0da4034
JK
32512017-11-30 Julia Koval <julia.koval@intel.com>
3252
3253 * c-common.h (inv_list): Remove.
3254
058f0b9e
JJ
32552017-11-28 Jakub Jelinek <jakub@redhat.com>
3256
3257 PR sanitizer/81275
3258 * c-common.c (c_switch_covers_all_cases_p_1,
3259 c_switch_covers_all_cases_p): New functions.
3260 * c-common.h (c_switch_covers_all_cases_p): Declare.
3261
5e9d6aa4 32622017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 3263 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
3264
3265 * array-notation-common.c: Delete.
3266 * c-cilkplus.c: Ditto.
3267 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
3268 * c-common.def (ARRAY_NOTATION_REF): Remove.
3269 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
3270 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
3271 c_validate_cilk_plus_loop, cilkplus_an_parts,
3272 cilk_ignorable_spawn_rhs_op,
3273 cilk_recognize_spawn): Remove.
3274 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
3275 * c-omp.c: Remove CILK_SIMD check.
3276 * c-pragma.c: Ditto.
3277 * c-pragma.h: Remove CILK related pragmas.
3278 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
3279 ARRAY_NOTATION_REF condition.
3280 (c_pretty_printer::expression): Ditto.
3281 * c.opt (fcilkplus): Remove.
3282 * cilk.c: Delete.
3283
1af4ebf5
MG
32842017-11-21 Marc Glisse <marc.glisse@inria.fr>
3285
3286 * c-pretty-print.c (pp_c_additive_expression,
3287 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
3288
d44ed508
JJ
32892017-11-21 Jakub Jelinek <jakub@redhat.com>
3290
7d2f0f9b
JJ
3291 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
3292
d44ed508
JJ
3293 PR c++/83059
3294 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
3295 instead of tree_to_uhwi, formatting fix.
3296
26edace6
DM
32972017-11-20 David Malcolm <dmalcolm@redhat.com>
3298
3299 PR c/81404
3300 * known-headers.cc: New file, based on material from c/c-decl.c.
3301 (suggest_missing_header): Copied as-is.
3302 (get_stdlib_header_for_name): New, based on get_c_name_hint but
3303 heavily edited to add C++ support. Add some knowledge about
3304 <limits.h>, <stdint.h>, and <wchar.h>.
3305 * known-headers.h: Likewise.
3306
6c7a259b
DM
33072017-11-20 David Malcolm <dmalcolm@redhat.com>
3308
3309 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
3310 (lookup_name_fuzzy): Likewise. Convert return type from
3311 const char * to name_hint. Add location_t param.
3312 * name-hint.h: New header.
3313
f9c59f7e
JJ
33142017-11-19 Jakub Jelinek <jakub@redhat.com>
3315
3316 PR c/66618
3317 PR c/69960
3318 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
3319
1e39313a
JM
33202017-11-16 Joseph Myers <joseph@codesourcery.com>
3321
3322 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
3323 expected publication date of C17.
3324 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
3325
3ca0dc60
JM
33262017-11-15 Joseph Myers <joseph@codesourcery.com>
3327
3328 PR c/81156
3329 * c-common.c (c_common_reswords): Add __builtin_tgmath.
3330 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
3331
025d57f0
MS
33322017-11-10 Martin Sebor <msebor@redhat.com>
3333
3334 PR c/81117
3335 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
3336 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
3337 * c.opt (-Wstringop-truncation): New option.
3338
1b6fa695
ML
33392017-11-06 Martin Liska <mliska@suse.cz>
3340
3341 PR middle-end/82404
3342 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
3343 FE.
3344 * c.opt: Set default value of warn_return_type.
3345
64a5912c
DM
33462017-10-31 David Malcolm <dmalcolm@redhat.com>
3347
3348 * c-common.c (binary_op_error): Update for renaming of
3349 error_at_rich_loc.
3350 (c_parse_error): Likewise.
3351 * c-warn.c (warn_logical_not_parentheses): Likewise for
3352 renaming of inform_at_rich_loc.
3353 (warn_for_restrict): Likewise for renaming of
3354 warning_at_rich_loc_n.
3355
c76dc9c3
JM
33562017-10-30 Joseph Myers <joseph@codesourcery.com>
3357
3358 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
3359 * c-opts.c (set_std_c17): New function.
3360 (c_common_init_options): Use gnu17 as default C version.
3361 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
3362
ee5fd23a
MM
33632017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
3364
3365 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
3366 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
3367 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
3368 __FP_FAST_FMA<N>X.
3369
d1047465
MP
33702017-10-23 Marek Polacek <polacek@redhat.com>
3371
3372 PR c/82681
3373 * c-warn.c (warnings_for_convert_and_check): Fix typos.
3374
9e878cf1
EB
33752017-10-19 Eric Botcazou <ebotcazou@adacore.com>
3376
3377 * c-common.c (check_builtin_function_arguments): Also check arguments
3378 of __builtin_alloca_with_align_and_max.
3379
89b6abbb
DM
33802017-10-17 David Malcolm <dmalcolm@redhat.com>
3381
3382 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
3383 rather than NULL to format_warning_va.
3384 (check_format_types): Likewise when calling format_type_warning.
3385 Remove code to extract source_ranges and source_range * in favor
3386 of just a location_t.
3387 (format_type_warning): Convert source_range * param to a
3388 location_t.
3389
39382c09
JJ
33902017-10-13 Jakub Jelinek <jakub@redhat.com>
3391
3392 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
3393 [LR]SHIFT_EXPR.
3394
62e1c678
DM
33952017-10-12 David Malcolm <dmalcolm@redhat.com>
3396
3397 * c-common.c (enum missing_token_insertion_kind): New enum.
3398 (get_missing_token_insertion_kind): New function.
3399 (maybe_suggest_missing_token_insertion): New function.
3400 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
3401
b90c9338
NS
34022017-10-11 Nathan Sidwell <nathan@acm.org>
3403
3404 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
3405 (c_common_handle_option): Update incpath_kind names.
3406
3a266bcd
ML
34072017-10-11 Martin Liska <mliska@suse.cz>
3408
3409 PR sanitizer/82490
3410 * c-attribs.c (handle_no_sanitize_attribute): Report directly
3411 Wattributes warning.
3412
8e6cdc90
RS
34132017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
3414
3415 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
3416 operating on trees as wide_ints.
3417 * c-common.c (pointer_int_sum): Likewise.
3418 * c-pretty-print.c (pp_c_integer_constant): Likewise.
3419 * c-warn.c (match_case_to_enum_1): Likewise.
3420 (c_do_switch_warnings): Likewise.
3421 (maybe_warn_shift_overflow): Likewise.
3422
802b38c9
JJ
34232017-10-10 Jakub Jelinek <jakub@redhat.com>
3424
3425 PR c/82437
3426 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
3427 instead of wide_int::from.
3428
4e34b338
JJ
34292017-10-06 Jakub Jelinek <jakub@redhat.com>
3430
3431 PR c/82437
3432 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
3433 using to_widest use wide_int with the larger of the two precisions.
3434
4bc4b2b4
BE
34352017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
3436
3437 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
3438 functions.
3439
a1488398
RS
34402017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
3441
3442 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
3443 when combining the original unconverted comparison operands.
3444
01c9fb68
JJ
34452017-09-29 Jakub Jelinek <jakub@redhat.com>
3446
3447 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
3448 attribute.
3449
6e3e8419
EB
34502017-09-29 Eric Botcazou <ebotcazou@adacore.com>
3451
3452 * c-ada-spec.c (to_ada_name): Add index parameter.
3453 (pp_ada_tree_identifier): Likewise.
3454 (dump_ada_macros): Adjust call to to_ada_name.
3455 (struct overloaded_name_hash): New type.
3456 (struct overloaded_name_hasher): Likewise.
3457 (overloaded_names): New hash table.
3458 (compute_overloading_index): New function.
3459 (dump_ada_decl_name): Call it and pass the result to
3460 pp_ada_tree_identifier.
3461 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
3462 (dump_ada_function_declaration): Likewise.
3463 (dump_generic_ada_node): Likewise.
3464 (print_constructor): Likewise.
3465 (print_destructor): Likewise.
3466 (dump_ada_specs): Delete overloaded_names table.
3467
79310774
EB
34682017-09-29 Eric Botcazou <ebotcazou@adacore.com>
3469
3470 * c-ada-spec.c (max_ada_macros): Move around.
3471 (store_ada_macro_index): Likewise.
3472 (source_file): Rename into...
3473 (macro_source_file): ...this.
3474 (count_ada_macro): Move around.
3475 (store_ada_macro): Likewise.
3476 (compare_macro): Likewise.
3477 (print_ada_macros): Merge in...
3478 (dump_ada_macros): ...this.
3479 (source_file_base): Rename into...
3480 (current_source_file): ...this.
3481 (print_comment): Move around.
3482 (dump_ada_nodes): Call dump_ada_declaration directly.
3483 (struct with): Change type of limited field to bool.
3484 (append_withs): Change type of limited_access parameter to bool.
3485 (pp_ada_tree_identifie): Likewise.
3486 (dump_ada_decl_nam): Likewise.
3487 (dump_generic_ada_node): Likewise. Do not print the return type.
3488 (to_ada_name): Change type of space_found parameter to bool.
3489 (dump_ada_function_declaration): Return void and change type of
3490 parameters to bool. Also print the return type for a function.
3491 (print_ada_methods): Rename into...
3492 (dump_ada_methods): ...this.
3493 (print_ada_declaration): Rename into ...
3494 (dump_ada_declaration): ...this. Do not print the return type.
3495 (print_ada_struct_decl): Rename into...
3496 (dump_ada_struct_decl): ...this.
3497
7d386d45
JJ
34982017-09-29 Jakub Jelinek <jakub@redhat.com>
3499
3500 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
3501 rather than DECL_INITIAL.
3502 (common_handle_aligned_attribute): Likewise.
3503
ab20d992 35042017-09-20 Alexandre Oliva <aoliva@redhat.com>
9ed32e27
AO
3505
3506 * c.opt (gen-decls): Add RejectNegative.
3507
026a79f7
AS
35082017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
3509 Jakub Jelinek <jakub@redhat.com>
3510
3511 Add support for -std=c++2a.
3512 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
3513 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
3514 * c-opts.c (set_std_cxx2a): New.
3515 (c_common_handle_option): Set options when -std=c++2a is enabled.
3516 (c_common_post_options): Adjust comments.
3517 (set_std_cxx14, set_std_cxx17): Likewise.
3518
4a8ca690
EB
35192017-09-15 Eric Botcazou <ebotcazou@adacore.com>
3520
3521 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
3522 message for non-uniform endianness and issue a warning in C++.
3523
7b936140
JJ
35242017-09-15 Jakub Jelinek <jakub@redhat.com>
3525
3526 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
3527 (Wc++17-compat): Change from undocumented alias to option.
3528 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
3529 change C++1z to C++17 in description.
3530 (std=c++1z, std=gnu++1z): Change from option to undocumented
3531 deprecated alias.
3532 (std=c++17, std=gnu++17): Change from undocumented alias to option.
3533 Adjust description.
3534 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
3535 * c-opts.c (set_std_cxx1z): Rename to ...
3536 (set_std_cxx17): ... this.
3537 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
3538 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 3539 caller.
7b936140
JJ
3540 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
3541 comments.
3542
12263f13
L
35432017-09-12 H.J. Lu <hongjiu.lu@intel.com>
3544
3545 * c-attribs.c (common_handle_aligned_attribute): Don't warn
3546 function alignment if warn_if_not_aligned_p is true.
3547
6836632e
NS
35482017-09-12 Nathan Sidwell <nathan@acm.org>
3549
3550 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
3551 resort_sorted_fields): Move to c/c-decl.c.
3552 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
3553 (struct sorted_fields_type): Move to c/c-lang.h.
3554
019bf9ad
JW
35552017-09-09 Jonathan Wakely <jwakely@redhat.com>
3556
3557 PR c++/81852
3558 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
3559
bc7fe952
MP
35602017-09-04 Marek Polacek <polacek@redhat.com>
3561
3562 PR c/81783
3563 * c-warn.c (warn_tautological_bitwise_comparison): New function.
3564 (warn_tautological_cmp): Call it.
3565
ab20d992 35662017-09-01 Boris Kolpackov <boris@codesynthesis.com>
de7c2c6a
BK
3567
3568 * c-opts.c (c_common_finish): Write dependency information even if
3569 there are errors.
3570
d2e05fcb
JJ
35712017-09-01 Jakub Jelinek <jakub@redhat.com>
3572
3573 PR c/81887
3574 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
3575 (omp_pragmas_simd): ... here.
3576 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
3577 create new clauses list containing just simd clause.
3578
18e2a8b8
RS
35792017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3580 Alan Hayward <alan.hayward@arm.com>
3581 David Sherwood <david.sherwood@arm.com>
3582
3583 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
3584 into scalar_mode_supported_p call.
3585 (handle_mode_attribute): Update call to scalar_mode_supported_p.
3586
16d22000
RS
35872017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3588 Alan Hayward <alan.hayward@arm.com>
3589 David Sherwood <david.sherwood@arm.com>
3590
3591 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
3592 for the mode iterator.
3593
b397965c
RS
35942017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3595 Alan Hayward <alan.hayward@arm.com>
3596 David Sherwood <david.sherwood@arm.com>
3597
3598 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
3599 * c-common.c (c_build_vec_perm_expr): Likewise.
3600
357b7604
RS
36012017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3602 Alan Hayward <alan.hayward@arm.com>
3603 David Sherwood <david.sherwood@arm.com>
3604
3605 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
3606
e05c94ba
RS
36072017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3608 Alan Hayward <alan.hayward@arm.com>
3609 David Sherwood <david.sherwood@arm.com>
3610
3611 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
3612 before calling targetm.addr_space.valid_pointer_mode.
3613
5c20c4af
RS
36142017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3615 Alan Hayward <alan.hayward@arm.com>
3616 David Sherwood <david.sherwood@arm.com>
3617
3618 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
3619
c94843d2 36202017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
3621 Alan Hayward <alan.hayward@arm.com>
3622 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
3623
3624 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
3625 iterators.
3626 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
3627
4e10a5a7
RS
36282017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3629 Alan Hayward <alan.hayward@arm.com>
3630 David Sherwood <david.sherwood@arm.com>
3631
3632 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
3633 case statements.
3634
130fcab0
ML
36352017-08-29 Martin Liska <mliska@suse.cz>
3636
3637 PR other/39851
3638 * c-common.c (parse_optimize_options): Add argument to function
3639 call.
3640 * c-pragma.c (handle_pragma_diagnostic): Likewise.
3641
14e18d71
DM
36422017-08-24 David Malcolm <dmalcolm@redhat.com>
3643
3644 * c-lex.c (interpret_float): Use token location
3645 when building an EXCESS_PRECISION_EXPR.
3646
2f687306
DM
36472017-08-21 David Malcolm <dmalcolm@redhat.com>
3648
3649 * c-common.c (check_function_arguments): Add "arglogs" param; pass
3650 it to check_function_format.
3651 * c-common.h (check_function_arguments): Add vec<location_t> *
3652 param.
3653 (check_function_format): Likewise.
3654 * c-format.c (struct format_check_context): Add field "arglocs".
3655 (check_function_format): Add param "arglocs"; pass it to
3656 check_format_info.
ab20d992 3657 (check_format_info): Add param "arglocs"; use it to initialize
2f687306
DM
3658 new field of format_ctx.
3659 (check_format_arg): Pass format_ctx->arglocs to new param of
3660 check_format_info_main.
3661 (class argument_parser): New field "arglocs".
3662 (argument_parser::argument_parser): Add "arglocs_" param and use
3663 it to initialize new field.
3664 (argument_parser::check_argument_type): Pass new arglocs field to
3665 check_format_types.
3666 (check_format_info_main): Add param "arglocs", and use it when
3667 constructing arg_parser.
3668 (check_format_types): Add param "arglocs"; use it if non-NULL when
3669 !EXPR_HAS_LOCATION (cur_param) to get at location information.
3670
00aa1fa2
L
36712017-08-18 H.J. Lu <hongjiu.lu@intel.com>
3672
3673 PR c/53037
3674 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
3675 (c_common_attribute_table): Add warn_if_not_aligned.
3676 (handle_aligned_attribute): Renamed to ...
3677 (common_handle_aligned_attribute): Remove argument, name, and add
3678 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
3679 (handle_aligned_attribute): New.
3680 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
3681
27be025d
MS
36822017-08-14 Martin Sebor <msebor@redhat.com>
3683
3684 PR c/81117
3685 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
3686 (handle_nonstring_attribute): New function.
3687
da67acb9
MS
36882017-08-14 Martin Sebor <msebor@redhat.com>
3689
3690 PR c/81117
3691 * c-format.h (T89_G): New macro.
3692 * c-format.c (local_gcall_ptr_node): New variable.
3693 (init_dynamic_diag_info): Initialize it.
3694
a8b522b4
ML
36952017-08-11 Martin Liska <mliska@suse.cz>
3696
3697 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
3698 TARGET_SUPPORTS_ALIASES.
3699
32129a17
DM
37002017-08-10 David Malcolm <dmalcolm@redhat.com>
3701
3702 * c-common.c (c_parse_error): Add rich_location * param, using it
3703 rather implicitly using input_location.
3704 * c-common.h (c_parse_error): Add rich_location * param.
3705
30af3a2b
MP
37062017-08-09 Marek Polacek <polacek@redhat.com>
3707
3708 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
3709 (c_common_truthvalue_conversion): Likewise.
3710 * c-omp.c (c_finish_omp_atomic): Likewise.
3711 * c-common.h (build_binary_op): Update declaration.
3712
314e6352
ML
37132017-08-08 Martin Liska <mliska@suse.cz>
3714
3715 * c-ada-spec.c: Include header files.
3716 * c-ubsan.c: Likewise.
3717 * c-warn.c: Likewise.
3718
56b5041c
JJ
37192017-08-07 Jakub Jelinek <jakub@redhat.com>
3720
3721 PR c/69389
3722 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
3723
db440138
EB
37242017-08-07 Eric Botcazou <ebotcazou@adacore.com>
3725
3726 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
3727 (print_ada_methods): Likewise.
3728 (print_ada_declaration): Likewise.
3729
577eec56
ML
37302017-08-07 Martin Liska <mliska@suse.cz>
3731
3732 * array-notation-common.c: Add new includes.
3733 * c-format.c( handle_format_attribute): Canonicalize a format
3734 function name.
3735 * c-lex.c (c_common_has_attribute): Canonicalize name of an
3736 attribute.
3737 * c-pretty-print.c: Add new include.
3738
b854df3c
EB
37392017-08-05 Eric Botcazou <ebotcazou@adacore.com>
3740
3741 * c-ada-spec.c (has_static_fields): Look only into variables.
3742 (print_constructor): Add TYPE parameter and use it for the name.
3743 (print_destructor): Likewise.
3744 (print_ada_declaration): Adjust to new constructor/destructor names.
3745 Adjust calls to print_constructor and print_destructor.
3746 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
3747 Look only into variables in the final loop.
3748
9f2cb25e
EB
37492017-08-01 Eric Botcazou <ebotcazou@adacore.com>
3750
3751 * c-ada-spec.c (has_static_fields): Look only into fields.
3752 (dump_generic_ada_node): Small tweak.
3753 (dump_nested_types): Look only into fields.
3754 (print_ada_declaration): Look only into methods. Small tweak.
3755 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
3756
f4bcd9eb
EB
37572017-08-01 Eric Botcazou <ebotcazou@adacore.com>
3758
3759 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
3760 (dump_ada_function_declaration): Likewise.
3761 (dump_generic_ada_node): Likewise.
3762 (print_ada_declaration): Add support for const-qualified variables.
3763
f34ebeb2
ML
37642017-07-31 Martin Liska <mliska@suse.cz>
3765
3766 PR sanitize/81530
3767 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
3768 Guard condition with flag_sanitize_p also with current_function_decl
3769 non-null equality.
3770 (ubsan_maybe_instrument_reference_or_call): Likewise.
3771
218e5d04
UB
37722017-07-30 Uros Bizjak <ubizjak@gmail.com>
3773
3774 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
3775
942047f2
EB
37762017-07-29 Eric Botcazou <ebotcazou@adacore.com>
3777
3778 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
3779 for enumeral types.
3780 (print_ada_declaration): Add missing guard for record types.
3781
a40ff0ae
JJ
37822017-07-27 Jakub Jelinek <jakub@redhat.com>
3783
3784 PR c/45784
3785 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
3786 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
3787 new COMPOUND_EXPRs around the rhs of the comparison.
3788
06bd22f6
MP
37892017-07-27 Marek Polacek <polacek@redhat.com>
3790
3791 PR c/81417
3792 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
3793 the types.
3794
036ea399
JJ
37952017-07-27 Jakub Jelinek <jakub@redhat.com>
3796
3797 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
3798 (handle_noipa_attribute): New function.
3799
417ca011
TD
38002017-07-07 Torsten Duwe <duwe@suse.de>
3801
3802 * c-attribs.c (c_common_attribute_table): Add entry for
3803 "patchable_function_entry".
3804
5aaa8fb4
NS
38052017-07-20 Nathan Sidwell <nathan@acm.org>
3806
3807 Remove TYPE_METHODS.
3808 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
3809 dump_ada_template, print_ada_methods,
3810 print_ada_declaration): Member fns are on TYPE_FIELDS.
3811
ff22eb12
NS
38122017-07-18 Nathan Sidwell <nathan@acm.org>
3813
3814 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
3815
eea77d1f
DM
38162017-07-14 David Malcolm <dmalcolm@redhat.com>
3817
3818 * c-common.c (try_to_locate_new_include_insertion_point): New
3819 function.
3820 (per_file_includes_t): New typedef.
3821 (added_includes_t): New typedef.
3822 (added_includes): New variable.
3823 (maybe_add_include_fixit): New function.
3824 * c-common.h (maybe_add_include_fixit): New decl.
3825
281ac396
MS
38262017-07-10 Martin Sebor <msebor@redhat.com>
3827
3828 PR other/81345
3829 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
3830
b6f43128
DM
38312017-07-06 David Malcolm <dmalcolm@redhat.com>
3832
3833 * c-common.c (selftest::c_family_tests): New.
3834 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
3835 (selftest::c_family_tests): New decl.
3836
efbf55b0
MP
38372017-07-04 Marek Polacek <polacek@redhat.com>
3838
3839 PR c/81231
3840 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
3841 types.
3842
6c86bd88
MP
38432017-07-04 Marek Polacek <polacek@redhat.com>
3844
3845 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
3846
17a7218b
ML
38472017-06-28 Martin Liska <mliska@suse.cz>
3848
3849 PR ipa/81128
3850 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
3851 to a function declaration.
3852
63010089
ML
38532017-06-28 Martin Liska <mliska@suse.cz>
3854
3855 PR driver/79659
3856 * c.opt: Add IntegerRange to various options.
3857
3e2becc4
MP
38582017-06-26 Marek Polacek <polacek@redhat.com>
3859
3860 PR c/80116
3861 * c-common.h (warn_for_multistatement_macros): Declare.
3862 * c-warn.c: Include "c-family/c-indentation.h".
3863 (warn_for_multistatement_macros): New function.
3864 * c.opt (Wmultistatement-macros): New option.
3865 * c-indentation.c (guard_tinfo_to_string): No longer static.
3866 Change the parameter type to "enum rid". Handle RID_SWITCH.
3867 * c-indentation.h (guard_tinfo_to_string): Declare.
3868
2db9b7cd
MG
38692017-06-23 Marc Glisse <marc.glisse@inria.fr>
3870
3871 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
3872
c3684b7b
MS
38732017-06-15 Martin Sebor <msebor@redhat.com>
3874
3875 PR c++/80560
3876 * c.opt (-Wclass-memaccess): New option.
3877
e72c4afd
BK
38782017-06-14 Boris Kolpackov <boris@codesynthesis.com>
3879
3880 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
3881
8a516588
MP
38822017-06-13 Marek Polacek <polacek@redhat.com>
3883
3884 PR objc/80949
3885 * c-warn.c (do_warn_duplicated_branches): Return if any of the
3886 branches is null.
3887
45b2222a
ML
38882017-06-13 Martin Liska <mliska@suse.cz>
3889
3890 PR sanitize/78204
3891 * c-attribs.c (add_no_sanitize_value): New function.
3892 (handle_no_sanitize_attribute): Likewise.
3893 (handle_no_sanitize_address_attribute): Use the function.
3894 (handle_no_sanitize_thread_attribute): New function.
3895 (handle_no_address_safety_analysis_attribute): Use
3896 add_no_sanitize_value.
3897 (handle_no_sanitize_undefined_attribute): Likewise.
3898 * c-common.h: Declare new functions.
3899 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
3900 (ubsan_instrument_shift): Likewise.
3901 (ubsan_instrument_bounds): Likewise.
3902 (ubsan_maybe_instrument_array_ref): Likewise.
3903 (ubsan_maybe_instrument_reference_or_call): Likewise.
3904
a01f151f
JM
39052017-06-11 Jason Merrill <jason@redhat.com>
3906
3907 * c-ada-spec.c, c-pragma.c: Use id_equal.
3908
3de4ac6d
MP
39092017-06-04 Marek Polacek <polacek@redhat.com>
3910
3911 PR c/80919
3912 * c-format.c (matching_type_p): Return false if any of the types
3913 requires structural equality.
3914
2474f48f
MS
39152017-06-02 Martin Sebor <msebor@redhat.com>
3916
3917 PR c/80892
3918 * c-warn.c (conversion_warning): Use -Wconversion for integer
3919 conversion and -Wfloat-conversion for floating one.
3920
40ffd95f
BE
39212017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3922
3923 * c.opt (Wsizeof-pointer-div): New warning option.
3924
3fa4634c
VR
39252017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
3926
3927 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
3928 (Wcatch-value=1): Enable by -Wall.
3929
f012c8ef
DM
39302017-05-30 David Malcolm <dmalcolm@redhat.com>
3931
3932 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
3933 format_chars.
3934 * c.opt (fdiagnostics-show-template-tree): New option.
3935 (felide-type): New option.
3936
63dbcd13
VR
39372017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
3938
3939 * c.opt (Wcatch-value=): New C++ warning flag.
3940
be136b5c
NS
39412017-05-24 Nathan Sidwell <nathan@acm.org>
3942
3943 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
3944 const casts to avoid warning.
3945
3cd211af
MS
39462017-05-24 Martin Sebor <msebor@redhat.com>
3947
3948 PR c/80731
3949 * c-common.h (unsafe_conversion_p): Add a function argument.
3950 * c-common.c (unsafe_conversion_p): Same.
3951 Add type names and values to diagnostics.
3952 (scalar_to_vector): Adjust.
3953 * c-warn.c (constant_expression_error): Add a function argument.
3954 Add type names and values to diagnostics.
3955 (conversion_warning): Add a function argument.
3956 Add type names and values to diagnostics.
3957 (warnings_for_convert_and_check): Same.
3958
1ff7be5a
JM
39592017-05-19 Jason Merrill <jason@redhat.com>
3960
3961 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
3962 enumerators.
3963
ff502317
BE
39642017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3965
3966 * c-format.c (locus): Move out of function scope,
3967 add GTY attribute.
3968
2a8a8d7b
NS
39692017-05-19 Nathan Sidwell <nathan@acm.org>
3970
3971 * c-opts.c (class_dump_file, class_dump_flags): Delete.
3972 (c_common_parse_file): Remove class dump handling.
3973 (get_dump_info): Likewise.
3974
39aac208
RB
39752017-05-19 Richard Biener <rguenther@suse.de>
3976
3977 PR c++/80593
3978 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
3979 to alias-set zero memory.
3980
6ecd2339
BE
39812017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3982
3983 * c-format.c (local_tree_type_node): Add GTY attribute.
3984
6574d78e
MP
39852017-05-18 Marek Polacek <polacek@redhat.com>
3986
3987 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
3988 (c_common_fixed_point_type_for_size): Likewise.
3989 (c_common_type_for_mode): Likewise.
3990 (shorten_compare): Likewise.
3991 (c_promoting_integer_type_p): Use false/true instead of 0/1.
3992 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
3993
e3455240
MP
39942017-05-18 Marek Polacek <polacek@redhat.com>
3995
3996 * c-common.c (self_promoting_args_p): Change the return type to bool.
3997 Use false/true instead of 0/1.
3998 * c-common.h (self_promoting_args_p): Update.
3999
3fa8871b
MP
40002017-05-17 Marek Polacek <polacek@redhat.com>
4001
4002 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
4003 * c-warn.c: Likewise.
4004
b42cc3ca
VV
40052017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
4006
4007 Implement new C++ intrinsics __is_assignable and __is_constructible.
4008 * c-common.c (__is_assignable, __is_constructible): New.
4009 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
4010
1a817418
ML
40112017-05-17 Martin Liska <mliska@suse.cz>
4012
4013 * c-common.h: Introduce dump_flags_t type and
4014 use it instead of int type.
4015 * c-gimplify.c (c_genericize): Likewise.
4016 * c-opts.c: Likewise.
4017
b2fa0a8b
MP
40182017-05-17 Marek Polacek <polacek@redhat.com>
4019
4020 * c-common.c (c_save_expr): Remove.
4021 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
4022 * c-common.h (c_save_expr): Remove declaration.
4023
31c2d57d
VR
40242017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
4025
4026 PR c/35441
4027 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
4028 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
4029 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
4030 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
4031 RDIV_EXPR.
4032 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
4033
684f84de
MP
40342017-05-09 Marek Polacek <polacek@redhat.com>
4035
4036 PR c/80525
4037 * c-warn.c (unwrap_c_maybe_const): New.
4038 (warn_logical_operator): Call it.
4039
641da50a
NS
40402017-05-09 Nathan Sidwell <nathan@acm.org>
4041
4042 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
4043 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
4044
631238ac
MS
40452017-05-08 Martin Sebor <msebor@redhat.com>
4046
4047 PR translation/80280
4048 * c-format.h (struct format_flag_spec): Add new member.
4049 (T89_T): New macro.
4050 * c-format.c (local_tree_type_node): New global.
4051 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
4052 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
4053 (strfmon_flag_specs): Likewise.
4054 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
4055 with distinct quoting properties.
4056 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
4057 (flag_chars_t::validate): Add argument and handle bad quoting.
4058 (check_format_info_main): Handle quoting problems.
4059 (init_dynamic_diag_info): Simplify.
4060
49f0c04c
JM
40612017-05-08 Jason Merrill <jason@redhat.com>
4062
4063 * c-opts.c (c_common_post_options): Update defaults for
4064 flag_abi_version and flag_abi_compat_version.
4065
56d35585
DM
40662017-05-05 David Malcolm <dmalcolm@redhat.com>
4067
4068 * c-common.c (c_cpp_error): Replace report_diagnostic
4069 with diagnostic_report_diagnostic.
4070
0f2c4a8f
MS
40712017-05-04 Martin Sebor <msebor@redhat.com>
4072
4073 PR translation/80280
4074 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
4075 (handle_weakref_attribute): Same.
4076
6fe63fb4
NS
40772017-05-03 Nathan Sidwell <nathan@acm.org>
4078
4079 Canonicalize canonical type hashing
4080 * c-common.c (complete_array_type): Use type_hash_canon.
4081
815d9cc6
XR
40822017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
4083
92a285c1 4084 PR c++/80038
815d9cc6
XR
4085 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
4086 prototype.
4087 (cilk_install_body_pedigree_operations): Likewise.
4088 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
4089 detatched.
4090 (cilk_gimplify_call_params_in_spawned_fn): Remove.
4091 (cilk_install_body_pedigree_operations): Likewise.
4092 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
4093 unwrapping.
4094
f8a36447
JJ
40952017-04-27 Jakub Jelinek <jakub@redhat.com>
4096
4097 PR c++/80534
4098 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
4099 flag on non-aggregate element types.
4100
7c145456
BE
41012017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
4102
4103 * c-common.c (c_type_hasher, type_hash_table): Remove.
4104 (c_common_get_alias_set): Remove unreachable code.
4105 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
4106
c3cbcd45
VR
41072017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
4108
4109 * c.opt (Wextra-semi): New C++ warning flag.
4110
8a59d466
JJ
41112017-04-20 Jakub Jelinek <jakub@redhat.com>
4112
4113 PR middle-end/80423
4114 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
4115
8487c9a5
JJ
41162017-04-18 Jakub Jelinek <jakub@redhat.com>
4117
4118 PR middle-end/79788
4119 PR middle-end/80375
4120 * c-common.c (c_common_type_for_mode): Don't handle
4121 widest_*_literal_type_node here.
4122 c_common_signed_or_unsigned_type): Likewise.
4123 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
4124 to *intTI_type_node or *intDI_type_node depending on whether
4125 TImode is supported by the target or not.
4126
3ee0fb02
ML
41272017-04-10 Martin Liska <mliska@suse.cz>
4128
4129 PR sanitizer/80350
4130 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
4131 doing an UBSAN check.
4132
5764ee3c
JW
41332017-04-03 Jonathan Wakely <jwakely@redhat.com>
4134
4135 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
4136
6f3af356
JJ
41372017-03-31 Jakub Jelinek <jakub@redhat.com>
4138
4139 PR c++/79572
4140 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
4141 tree *.
4142 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
4143 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
4144 REFERENCE_TYPE.
4145
f6a7a9d5
DM
41462017-03-31 David Malcolm <dmalcolm@redhat.com>
4147
4148 PR documentation/78732
4149 * c.opt (Wendif-labels): Fix description to refer to
4150 #else rather than #elif.
4151
af88f557
JJ
41522017-03-31 Jakub Jelinek <jakub@redhat.com>
4153
4154 PR libstdc++/80251
4155 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
4156 * c-common.c (c_common_reswords): Add __is_aggregate trait.
4157
a9e4a1a5
JJ
41582017-03-27 Jakub Jelinek <jakub@redhat.com>
4159
4160 PR middle-end/80162
4161 * c-common.c (c_common_mark_addressable_vec): Don't set
4162 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
4163
3f01b620
MS
41642017-03-21 Martin Sebor <msebor@redhat.com>
4165
4166 PR c++/79548
4167 * c-common.c (set_underlying_type): Mark type used only when
4168 original del is declared unused.
4169
2f6f187a
DM
41702017-03-10 David Malcolm <dmalcolm@redhat.com>
4171
4172 PR translation/79848
4173 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
4174 "%qs".
4175
a02fa805
DM
41762017-03-10 David Malcolm <dmalcolm@redhat.com>
4177
4178 PR c/79921
4179 * c-indentation.c (warn_for_misleading_indentation): Remove parens
4180 from inform's message, so that xgettext can locate it.
4181
822a132c
MP
41822017-03-09 Marek Polacek <polacek@redhat.com>
4183
4184 PR c++/79962
4185 PR c++/79984
4186 * c-attribs.c (handle_nonnull_attribute): Save the result of default
4187 conversion to the attribute list.
4188
bba81f1c
ML
41892017-03-09 Martin Liska <mliska@suse.cz>
4190
4191 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
4192
108154ff
JM
41932017-03-03 Jason Merrill <jason@redhat.com>
4194
4195 * c.opt (Wnoexcept-type): New.
4196
eb0e7c34
RB
41972017-03-02 Richard Biener <rguenther@suse.de>
4198
4199 PR c/79756
4200 * c-common.c (c_common_mark_addressable_vec): Look through
4201 C_MAYBE_CONST_EXPR.
4202
9453ba0a
ML
42032017-02-28 Martin Liska <mliska@suse.cz>
4204
4205 * c.opt: Replace space with tabular for options of <number>
4206 type.
4207
6a825afe
ML
42082017-02-28 Martin Liska <mliska@suse.cz>
4209
4210 * c.opt: Fix --help=option -Q for options which are of
4211 an enum type.
4212
4227c9ad
JJ
42132017-02-24 Jakub Jelinek <jakub@redhat.com>
4214
4215 PR c++/79588
4216 * c-common.c (check_function_restrict): New function.
4217 (check_function_arguments): Add FNDECL argument. Call
4218 check_function_restrict if -Wrestrict.
4219 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
4220 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
4221 * c-common.h (check_function_arguments): Add FNDECL argument.
4222 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
4223
59909673
EB
42242017-02-24 Eric Botcazou <ebotcazou@adacore.com>
4225
4226 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
4227 treatment of parameters with pointer-to-tagged type and tidy up.
4228 (print_ada_methods): Remove the special treatment of C++ static member
4229 functions.
4230
54dcd526
ML
42312017-02-22 Martin Liska <mliska@suse.cz>
4232
4233 * c.opt: Replace inequality signs with square brackets
4234 for -Wnornalized.
4235
00bc9de3
JJ
42362017-02-21 Jakub Jelinek <jakub@redhat.com>
4237
4238 PR c++/79641
4239 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
4240 preserve quals.
4241
97fcf744
JM
42422017-02-17 Joseph Myers <joseph@codesourcery.com>
4243
4244 * c-cppbuiltin.c (builtin_define_float_constants): Define
4245 __DECIMAL_DIG__ to the value for long double.
4246
c7545f1c
MP
42472017-02-15 Marek Polacek <polacek@redhat.com>
4248
4249 PR c/79515
4250 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
4251 conversion has occured.
4252
c2e84327
DM
42532017-01-24 David Malcolm <dmalcolm@redhat.com>
4254
4255 * c-common.c (c_common_reswords): Add "__RTL".
4256 * c-common.h (enum rid): Add RID_RTL.
4257
2ebd93e1
MP
42582017-01-20 Marek Polacek <polacek@redhat.com>
4259
4260 PR c/64279
4261 * c-common.h (do_warn_duplicated_branches_r): Declare.
4262 * c-gimplify.c (c_genericize): Walk the function tree calling
4263 do_warn_duplicated_branches_r.
4264 * c-warn.c (expr_from_macro_expansion_r): New.
4265 (do_warn_duplicated_branches): New.
4266 (do_warn_duplicated_branches_r): New.
4267 * c.opt (Wduplicated-branches): New option.
4268
0d80ab91
DM
42692017-01-17 David Malcolm <dmalcolm@redhat.com>
4270
4271 PR c++/71497
4272 * c-indentation.c (warn_for_misleading_indentation): Use the past
4273 subjunctive in the note.
4274
7f991c36
AH
42752017-01-17 Aldy Hernandez <aldyh@redhat.com>
4276
4277 PR c/79116
4278 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
4279 start type to integer_type.
4280
1c70261c
JJ
42812017-01-16 Jakub Jelinek <jakub@redhat.com>
4282
4283 PR driver/49726
4284 * c.opt (gen-decls): Add Driver flag.
4285
1ddca3f3
PC
42862017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
4287
4288 Revert:
4289 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
4290
4291 PR c++/71737
4292 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
4293
7d2f3f1d
PC
42942017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
4295
4296 PR c++/71737
4297 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
4298
bce6f760
MS
42992017-01-12 Martin Sebor <msebor@redhat.com>
4300
4301 (-Wformat-overflow): ...to this.
4302
bf5fbf46
MS
43032017-01-11 Martin Sebor <msebor@redhat.com>
4304
4305 PR c/78768
4306 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
4307 Also enable for LTO.
4308
e363df3f
JM
43092017-01-10 Jason Merrill <jason@redhat.com>
4310
4311 Implement P0195R2, C++17 variadic using.
4312 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
4313
bd2c6270
JJ
43142017-01-09 Jakub Jelinek <jakub@redhat.com>
4315
4316 PR translation/79019
4317 PR translation/79020
4318 * c.opt (Wnormalized=): Fix typo in description.
4319
efcc8d38
MS
43202017-01-08 Martin Sebor <msebor@redhat.com>
4321
4322 PR middle-end/77708
4323 * c.opt (-Wformat-truncation): New option.
4324
ab20d992 43252017-01-06 Alexandre Oliva <aoliva@redhat.com>
435f3f7a
AO
4326
4327 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
4328 value to unsigned short to fit in 4 hex digits without
4329 warnings.
4330
4e89adf9
EB
43312017-01-05 Eric Botcazou <ebotcazou@adacore.com>
4332
4333 * c.opt (fsso-struct): Add 'native' value.
4334
cd445b54
ML
43352017-01-05 Martin Liska <mliska@suse.cz>
4336
4337 PR pch/78970
4338 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
4339 header.
4340
a9342885
MP
43412017-01-04 Marek Polacek <polacek@redhat.com>
4342
4343 PR c++/64767
4344 * c.opt (Wpointer-compare): New option.
4345
fc73e60c
JJ
43462017-01-04 Jakub Jelinek <jakub@redhat.com>
4347
4348 PR driver/78957
4349 * c.opt (fsso-struct=): Add RejectNegative.
4350
cbe34bb5
JJ
43512017-01-01 Jakub Jelinek <jakub@redhat.com>
4352
4353 Update copyright years.
4354
d4a6c0ea
ML
43552016-12-29 Martin Liska <mliska@suse.cz>
4356
4357 PR c/78933
4358 * c.opt (strong-eval-order): Add RejectNegative keyword.
4359
67a5ad7c
JM
43602016-12-22 Jason Merrill <jason@redhat.com>
4361
4362 Implement P0522R0, matching of template template arguments.
4363 * c-cppbuiltin.c (c_cpp_builtins): Define
4364 __cpp_template_template_args.
4365
0dba7960
JJ
43662016-12-21 Jakub Jelinek <jakub@redhat.com>
4367
4368 PR bootstrap/78817
4369 * c-common.c (struct nonnull_arg_ctx): New type.
4370 (check_function_nonnull): Return bool instead of void. Use
4371 nonnull_arg_ctx as context rather than just location_t.
4372 (check_nonnull_arg): Adjust for the new context type, set
4373 warned_p to true if a warning has been diagnosed.
4374 (check_function_arguments): Return bool instead of void.
4375 * c-common.h (check_function_arguments): Adjust prototype.
4376
31bfc9b9
JM
43772016-12-21 Jason Merrill <jason@redhat.com>
4378
4379 * c.opt (-fnew-ttp-matching): New flag.
4380 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
4381
629b3d75
MJ
43822016-12-14 Martin Jambor <mjambor@suse.cz>
4383
4384 * c-omp.c: Include omp-general.h instead of omp-low.h.
4385 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
4386 name.
4387
474da67e
MS
43882016-12-14 Martin Sebor <msebor@redhat.com>
4389
4390 PR c/17308
4391 * c-common.c (check_nonnull_arg): Disable when optimization
4392 is enabled.
4393
fe366b87
MP
43942016-12-12 Marek Polacek <polacek@redhat.com>
4395
4396 PR c++/78647
4397 * c-common.c (attribute_fallthrough_p): Return false for
4398 error_mark_node.
4399
8bd9f164
MS
44002016-12-08 Martin Sebor <msebor@redhat.com>
4401
4402 PR c/78284
4403 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
4404
060162e0
MS
44052016-12-08 Martin Sebor <msebor@redhat.com>
4406
4407 PR c/78165
92a285c1
ML
4408 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
4409 suffix.
060162e0 4410
ee92e7ba
MS
44112016-12-07 Martin Sebor <msebor@redhat.com>
4412
4413 PR c/53562
4414 PR middle-end/77784
4415 PR middle-end/78149
4416 PR middle-end/78138
4417 * c.opt (-Wstringop-overflow): New option.
4418
84b0769e
MO
44192016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
4420
4421 * c-attribs.c (asan odr indicator): New attribute.
4422 (handle_asan_odr_indicator_attribute): New function.
4423
7fa6a965
PK
44242016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4425
4426 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
4427 ptrdiff_type_node;
4428
56d8ffc1
JG
44292016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
4430
4431 * c-common.c (excess_precision_mode_join): New.
4432 (c_ts18661_flt_eval_method): New.
4433 (c_c11_flt_eval_method): Likewise.
4434 (c_flt_eval_method): Likewise.
4435 * c-common.h (excess_precision_mode_join): New.
4436 (c_flt_eval_method): Likewise.
4437 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
4438 (cpp_iec_559_value): Call it.
4439 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
4440 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
4441 __FLT_EVAL_METHOD_TS_18661_3__.
4442
04f0fcf7
JG
44432016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
4444
4445 * c-opts.c (c_common_post_options): Add logic to handle the default
4446 case for -fpermitted-flt-eval-methods.
4447
fb2675cb
PB
44482016-11-23 Paolo Bonzini <bonzini@gnu.org>
4449
4450 * c.opt (Wexpansion-to-defined): New.
4451
ec1c5694
JJ
44522016-11-23 Jakub Jelinek <jakub@redhat.com>
4453
4454 PR target/78451
4455 * c-pragma.c (handle_pragma_target): Don't replace
4456 current_target_pragma, but chainon the new args to the current one.
4457
730c9e75
NS
44582016-11-22 Nathan Sidwell <nathan@acm.org>
4459
4460 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 4461 indentation and formatting.
730c9e75 4462
89990732
MS
44632016-11-21 Martin Sebor <msebor@redhat.com>
4464
4465 * c.opt (-fprintf-return-value): Enable by default.
4466
48330c93
BE
44672016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4468
4469 PR c++/71973
4470 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
4471 * c-common.c (c_common_nodes_and_builtins): Initialize
4472 const_tm_ptr_type_node.
4473
0d939c95
MP
44742016-11-16 Marek Polacek <polacek@redhat.com>
4475
4476 PR c/78285
4477 * c-common.c (c_add_case_label): Turn error_at calls into inform.
4478
8e745a17
JJ
44792016-11-14 Jakub Jelinek <jakub@redhat.com>
4480
4481 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
4482
1ee62b92 44832016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
4484 Richard Biener <rguenther@suse.de>
4485
4486 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
4487 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
4488 * c.opt (fgimple): New option.
1ee62b92 4489
22b15758
UB
44902016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4491
4492 PR c/35503
4493 * c-common.h (warn_for_restrict): Declare.
4494 * c-warn.c: Include gcc-rich-location.h.
4495 (warn_for_restrict): New function.
4496 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
4497 (gcc_cdiag_char_table): Likewise.
4498 (gcc_cxxdiag_char_table): Likewise.
4499 * c.opt (Wrestrict): New option.
4500
4be719cd
EB
45012016-11-13 Eric Botcazou <ebotcazou@adacore.com>
4502
4503 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
4504 for nested types only if the type is a record or union and dump SLOC.
4505
4a826ca6
JM
45062016-11-09 Jason Merrill <jason@redhat.com>
4507
4508 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
4509
2e955d50
JJ
45102016-11-09 Jakub Jelinek <jakub@redhat.com>
4511
4512 * c-ubsan.c (ubsan_instrument_shift): Handle split
4513 -fsanitize=shift-base and -fsanitize=shift-exponent.
4514
51dc6603
JM
45152016-11-07 Jason Merrill <jason@redhat.com>
4516
4517 * c.opt (Wc++1z-compat): New.
4518 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
4519
6dc4a604
ML
45202016-11-07 Martin Liska <mliska@suse.cz>
4521
4522 * c-warn.c (warn_for_unused_label): Save all labels used
4523 in goto or in &label.
4524
b302001e
JM
45252016-11-03 Jason Merrill <jason@redhat.com>
4526
4527 * c-cppbuiltin.c (c_cpp_builtins): Correct
4528 __cpp_inheriting_constructors.
4529
31f7f784
JM
45302016-11-01 Jason Merrill <jason@redhat.com>
4531
2bc78e3c
JM
4532 * c-cppbuiltin.c (c_cpp_builtins): Update
4533 __cpp_inheriting_constructors.
4534
31f7f784
JM
4535 * c.opt (-fnew-inheriting-ctors): New.
4536 * c-opts.c: Default to on for ABI 11+.
4537
dcb466ec
JJ
45382016-10-31 Jakub Jelinek <jakub@redhat.com>
4539
4540 PR c++/77948
4541 * c.opt (fext-numeric-literals): Add Var and Init.
4542 * c-opts.c (c_common_handle_option): Don't clear
4543 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
4544 (c_common_post_options): Clear it here if not set
4545 explicitly.
4546
52e1b91e
AH
45472016-10-28 Aldy Hernandez <aldyh@redhat.com>
4548
4549 PR debug/77773
4550 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
4551 if NULL.
4552
e16f1cc7
JJ
45532016-10-25 Jakub Jelinek <jakub@redhat.com>
4554
4555 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
4556 * c-common.c (c_common_reswords): Add __builtin_launder.
4557
f8348061
BE
45582016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
4559
4560 * c-common.c (c_common_truthvalue_conversion): Warn for
4561 multiplications in boolean context. Fix the quoting of '<<' and '<'
4562 in the shift warning.
4563
eff89e01
BE
45642016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
4565
4566 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
4567
24bc7bf4
JM
45682016-10-20 Jason Merrill <jason@redhat.com>
4569
4570 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
4571
4c712374
BE
45722016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4573
4574 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
4575 integer shift ops in boolean context.
4576
45772016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
4578
4579 * c.opt (Walloca): New.
4580 (Walloca-larger-than=): New.
4581 (Wvla-larger-than=): New.
4582
8fa18c06
MP
45832016-10-17 Marek Polacek <polacek@redhat.com>
4584
4585 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
4586 Return immediately when finding a match.
4587 (warn_tautological_cmp): Remove a boolean variable that is no longer
4588 needed.
4589
b12b1915
MP
45902016-10-17 Marek Polacek <polacek@redhat.com>
4591
4592 * c-attribs.c: New file.
4593 * c-common.c: Move attributes handling to c-attribs.c.
4594 (get_nonnull_operand): No longer static.
4595 * c-common.h: Move the declarations from c-attribs.c to its own section.
4596
2045acd9
JM
45972016-10-14 Jason Merrill <jason@redhat.com>
4598
4599 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
4600 and __cpp_deduction_guides.
4601
14a2c9aa
JM
46022016-10-13 Jason Merrill <jason@redhat.com>
4603
4604 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
4605
4d0cdd0c
TP
46062016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
4607
4608 * c-cppbuiltin.c: Include memmodel.h.
4609 * c-opts.c: Likewise.
4610 * c-pragma.c: Likewise.
4611 * c-warn.c: Likewise.
4612
70f6d5e1
JJ
46132016-10-12 Jakub Jelinek <jakub@redhat.com>
4614
4615 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
4616 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
4617 * c-opts.c (sanitize_cpp_opts): Initialize
4618 cpp_opts->cpp_warn_implicit_fallthrough.
4619
78f61294
MP
46202016-10-11 Marek Polacek <polacek@redhat.com>
4621
4622 * c-common.c (warning_candidate_p): Change the return type to bool
4623 and return true/false instead of 1/0.
4624 (vector_mode_valid_p): Likewise.
4625
038b5cc0
MP
46262016-10-11 Marek Polacek <polacek@redhat.com>
4627
4628 * c-common.c (fold_for_warn): No longer static.
4629 (bool_promoted_to_int_p): Likewise.
4630 (c_common_get_narrower): Likewise.
4631 (constant_expression_warning): Move to c-warn.c.
4632 (constant_expression_error): Likewise.
4633 (overflow_warning): Likewise.
4634 (warn_logical_operator): Likewise.
4635 (find_array_ref_with_const_idx_r): Likewise.
4636 (warn_tautological_cmp): Likewise.
4637 (expr_has_boolean_operands_p): Likewise.
4638 (warn_logical_not_parentheses): Likewise.
4639 (warn_if_unused_value): Likewise.
4640 (strict_aliasing_warning): Likewise.
4641 (sizeof_pointer_memaccess_warning): Likewise.
4642 (check_main_parameter_types): Likewise.
4643 (conversion_warning): Likewise.
4644 (warnings_for_convert_and_check): Likewise.
4645 (match_case_to_enum_1): Likewise.
4646 (match_case_to_enum): Likewise.
4647 (c_do_switch_warnings): Likewise.
4648 (warn_for_omitted_condop): Likewise.
4649 (readonly_error): Likewise.
4650 (lvalue_error): Likewise.
4651 (invalid_indirection_error): Likewise.
4652 (warn_array_subscript_with_type_char): Likewise.
4653 (warn_about_parentheses): Likewise.
4654 (warn_for_unused_label): Likewise.
4655 (warn_for_div_by_zero): Likewise.
4656 (warn_for_memset): Likewise.
4657 (warn_for_sign_compare): Likewise.
4658 (do_warn_double_promotion): Likewise.
4659 (do_warn_unused_parameter): Likewise.
4660 (record_locally_defined_typedef): Likewise.
4661 (maybe_record_typedef_use): Likewise.
4662 (maybe_warn_unused_local_typedefs): Likewise.
4663 (maybe_warn_bool_compare): Likewise.
4664 (maybe_warn_shift_overflow): Likewise.
4665 (warn_duplicated_cond_add_or_warn): Likewise.
4666 (diagnose_mismatched_attributes): Likewise.
4667 * c-common.h: Move the declarations from c-warn.c to its own section.
4668 * c-warn.c: New file.
4669
627be19f
JM
46702016-10-08 Jason Merrill <jason@redhat.com>
4671
4672 * c-common.c (c_common_truthvalue_conversion): Don't distribute
4673 into COND_EXPR in C++.
4674
7bad794a
JJ
46752016-10-08 Jakub Jelinek <jakub@redhat.com>
4676
4677 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
4678 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
4679 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
4680
be845b04
JJ
46812016-10-07 Jakub Jelinek <jakub@redhat.com>
4682
4683 Implement LWG2296 helper intrinsic
4684 * c-common.h (enum rid): Add RID_ADDRESSOF.
4685 * c-common.c (c_common_reswords): Add __builtin_addressof.
4686
c09c4992
BE
46872016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
4688
4689 PR c++/77700
4690 * c-common.c (c_common_truthvalue_conversion): Warn also for
4691 suspicious enum values in boolean context.
4692
342cfb3e
JJ
46932016-10-06 Jakub Jelinek <jakub@redhat.com>
4694
4695 Implement P0258R2 - helper for C++17
4696 std::has_unique_object_representations trait
4697 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
4698 * c-common.c (c_common_reswords): Add
4699 __has_unique_object_representations.
4700
2e69f143
JJ
47012016-10-05 Jakub Jelinek <jakub@redhat.com>
4702
4703 PR sanitizer/66343
4704 * c-ubsan.c (ubsan_instrument_return): Don't call
4705 initialize_sanitizer_builtins here.
4706
700fff34
BE
47072016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
4708
4709 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
4710 conditional expression in boolean context when only one arm is
4711 non-boolean.
4712
9563bfcd
JJ
47132016-10-05 Jakub Jelinek <jakub@redhat.com>
4714
04a32443
JJ
4715 PR sanitizer/77823
4716 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
4717 is not integral.
4718
9563bfcd
JJ
4719 * c-common.c (c_common_reswords): Update comment for C++11.
4720
f1644724
JM
47212016-10-04 Jason Merrill <jason@redhat.com>
4722
4723 * c-common.c (make_tree_vector_from_ctor): New.
4724 * c-common.h: Declare it.
4725
5a79befb
JJ
47262016-10-04 Jakub Jelinek <jakub@redhat.com>
4727
4728 * c-cppbuiltin.c (c_cpp_builtins): Don't define
4729 __LIBGCC_JCR_SECTION_NAME__.
4730
1633d3b9
BE
47312016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
4732
4733 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
4734 left shift in boolean context.
4735
a2c6e7f2
JJ
47362016-09-29 Jakub Jelinek <jakub@redhat.com>
4737
4738 Implement P0001R1 - C++17 removal of register storage class specifier
4739 * c.opt (Wregister): New warning.
4740 * c-opts.c (c_common_post_options): Enable -Wregister by
4741 default for C++17.
4742
75304c87
JG
47432016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
4744
4745 * c-opts.c (c_common_post_options): Remove special case for
4746 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
4747 in C++.
4748
bbfac6da
JJ
47492016-09-27 Jakub Jelinek <jakub@redhat.com>
4750
6e39060a
JJ
4751 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
4752 -std=c++1z.
4753
bbfac6da
JJ
4754 * c-ada-spec.c (print_ada_declaration): Remove break after return.
4755
e73cf9a2
TP
47562016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
4757
4758 * c-common.c: Include memmodel.h.
4759
c6147dc4
MP
47602016-09-26 Marek Polacek <polacek@redhat.com>
4761
4762 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
4763
81fea426
MP
47642016-09-26 Marek Polacek <polacek@redhat.com>
4765
4766 PR c/7652
4767 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
4768 (handle_fallthrough_attribute): New function.
4769 (attribute_fallthrough_p): New function.
4770 * c-common.h (attribute_fallthrough_p): Declare.
4771
9a2300e9
MP
47722016-09-24 Marek Polacek <polacek@redhat.com>
4773
4774 PR c/77490
4775 * c.opt (Wbool-operation): New.
4776
a09e9e35
BE
47772016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4778
4779 * c-common.c (c_common_truthvalue_conversion): Inhibit
4780 Wint-in-bool-context warning with from_macro_definition_at.
4781 Mention the expression will always evaluate to true.
4782
d43b4ccc
MS
47832016-09-21 Martin Sebor <msebor@redhat.com>
4784
4785 PR bootstrap/77676
4786 * c.opt (fprintf-return-value): Temporarily initialize to zero
4787 to unblock bootstrap failures.
4788
2e1c20b1
JJ
47892016-09-21 Jakub Jelinek <jakub@redhat.com>
4790
4791 PR c++/77651
4792 * c.opt (Waligned-new=): Add RejectNegative.
4793 (faligned-new=): Likewise. Spelling fix - change
4794 aligned_new_threshhold to aligned_new_threshold.
4795 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
4796 to aligned_new_threshold.
4797
88d0c3f0
MS
47982016-09-20 Martin Sebor <msebor@redhat.com>
4799
4800 PR middle-end/49905
4801 * c.opt: Add -Wformat-length and -fprintf-return-value.
4802
144a96e4
BE
48032016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4804
4805 PR c++/77434
4806 * c.opt (Wint-in-bool-context): New warning.
4807 * c-common.c (c_common_truthvalue_conversion): Warn on integer
4808 constants in boolean context.
4809
63012d9a
JM
48102016-09-19 Joseph Myers <joseph@codesourcery.com>
4811
4812 * c-common.c (max_align_t_align): Also consider alignment of
4813 float128_type_node.
4814
931388ce
JM
48152016-09-15 Jason Merrill <jason@redhat.com>
4816
4817 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
4818 DECL_EXTERNAL.
4819
38711381
JM
48202016-09-14 Jason Merrill <jason@redhat.com>
4821
4822 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
4823 limit FIELD_DECL, either.
4824
e51fbec3
MP
48252016-09-14 Marek Polacek <polacek@redhat.com>
4826
4827 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
4828 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
4829 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
4830
254830ba
DM
48312016-09-13 David Malcolm <dmalcolm@redhat.com>
4832
4833 * c-common.c (warn_logical_not_parentheses): Replace
4834 rich_location::add_fixit_insert calls with add_fixit_insert_before
4835 and add_fixit_insert_after, eliminating the "next_loc" calculation.
4836
42763690
JM
48372016-09-13 Jason Merrill <jason@redhat.com>
4838 Tom de Vries <tom@codesourcery.com>
4839
4840 PR c++/77427
4841 * c-common.c (set_underlying_type): Don't treat array as builtin type.
4842
9453eee9
JM
48432016-09-13 Jason Merrill <jason@redhat.com>
4844
4845 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
4846 limit types at all.
4847
e96809e3
JM
48482016-09-12 Jason Merrill <jason@redhat.com>
4849
4850 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
4851 bit/byte confusion, allow large alignment for types.
4852
54dcdb88
BE
48532016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
4854
4855 PR c++/77496
4856 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
4857
d1463eb9
DM
48582016-09-12 David Malcolm <dmalcolm@redhat.com>
4859
4860 PR c/72858
4861 * c-format.c (argument_parser::check_argument_type): Add params
4862 "type_start" and "conversion_char". Use the former to generate
4863 offset_to_type_start and pass it and conversion_char to
4864 check_format_types.
4865 (check_format_info_main): Capture the start of the type
4866 information as "type_start", and pass it an format_char
4867 to arg_parser.check_argument_type.
4868 (check_format_types): Provide an example in the leading comment.
4869 Add params "offset_to_type_start" and "conversion_char"; pass
4870 them to format_type_warning calls.
4871 (test_get_modifier_for_format_len): Likewise.
4872 (matching_type_p): New function.
4873 (get_format_for_type): Add param "conversion_char" and move
4874 implementation into...
4875 (get_format_for_type_1): ...new function, called twice.
4876 Use new function matching_type_p rather than checking for
4877 TYPE_CANONICAL equality.
4878 (get_corrected_substring): New function.
4879 (format_type_warning): Provide an example in the leading comment.
4880 Add params "offset_to_type_start" and "conversion_char". Replace
4881 call to get_format_for_type with call to get_corrected_substring
4882 and move rejection of hints for widths/precisions there.
4883 (assert_format_for_type_streq): Add param "conversion_char".
4884 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
4885 (test_get_format_for_type_printf): Add conversion chars to the
4886 tests, adding coverage for various combinations of integer
4887 vs double conversions, and for preserving octal and hexadecimal
4888 conversions.
4889 (test_get_format_for_type_scanf): Add conversion chars to the
4890 tests.
4891
5b28efbb
TV
48922016-09-10 Tom de Vries <tom@codesourcery.com>
4893
4894 PR C/71602
4895 * c-common.c (build_va_arg): Handle more strict
4896 targetm.canonical_va_list_type. Replace first argument type error with
4897 assert.
4898
3f0177e7
MS
48992016-09-09 Martin Sebor <msebor@redhat.com>
4900
4901 PR c/77520
4902 PR c/77521
4903 * c-format.c (argument_parser::find_format_char_info): Use %qc
4904 format directive unconditionally.
4905
af63ba4b
JM
49062016-09-09 Jason Merrill <jason@redhat.com>
4907
4908 Implement C++17 new of over-aligned types.
4909 * c.opt: Add -faligned-new and -Waligned-new.
4910 * c-common.c (max_align_t_align): Split out from...
4911 (cxx_fundamental_alignment_p): ...here.
4912 * c-common.h: Declare it.
4913 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
4914
c65248cb
JM
49152016-09-09 Joseph Myers <joseph@codesourcery.com>
4916
4917 * c-cppbuiltin.c (builtin_define_type_width): New function.
4918 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
4919 macros.
4920
e5106e27
DM
49212016-09-07 David Malcolm <dmalcolm@redhat.com>
4922
4923 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
4924 a POINTER_TYPE.
4925 (substring_loc::get_location): Move to substring-locations.c,
4926 keeping implementation as...
4927 (c_get_substring_location): New function, from the above, reworked
4928 to use accessors rather than member lookup.
4929 * c-common.h (class substring_loc): Move to substring-locations.h,
4930 replacing with a forward decl.
4931 (c_get_substring_location): New decl.
4932 * c-format.c: Include "substring-locations.h".
4933 (format_warning_va): Move to substring-locations.c.
4934 (format_warning_at_substring): Likewise.
4935
ab20d992 49362016-09-06 Martin Sebor <msebor@redhat.com>
a42e7952
MS
4937
4938 PR c/77336
4939 * c-format.c (check_function_format): Avoid issuing warnings for
4940 functions unless they call format functions with non-constant
4941 format strings.
4942
b772a565
RB
49432016-09-06 Richard Biener <rguenther@suse.de>
4944
4945 PR c/77450
4946 * c-common.c (c_common_mark_addressable_vec): Handle
4947 COMPOUND_LITERAL_EXPR.
4948
25ff5dd3
MP
49492016-09-05 Marek Polacek <polacek@redhat.com>
4950
4951 PR c/77423
4952 * c-common.c (bool_promoted_to_int_p): New function.
4953 (expr_has_boolean_operands_p): New function.
4954 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
4955 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
4956
21234eb5
TV
49572016-09-04 Tom de Vries <tom@codesourcery.com>
4958
4959 revert:
4960 2016-08-29 Tom de Vries <tom@codesourcery.com>
4961
4962 * c-common.c (build_va_arg): Replace first argument type error
4963 with assert.
4964
9dc5773f
JJ
49652016-09-02 Jakub Jelinek <jakub@redhat.com>
4966
4967 PR c/65467
4968 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
4969 (c_finish_omp_for): Reject _Atomic qualified iterators.
4970
49712016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
4972
4973 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
4974 size to guarantee it fits the output of the formatted function
4975 regardless of its arguments.
4976
295844f6
MP
49772016-09-01 Marek Polacek <polacek@redhat.com>
4978
4979 PR c/7652
4980 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
4981 FALLTHRU comments.
4982
3d06b6f2
MP
49832016-08-29 Marek Polacek <polacek@redhat.com>
4984
4985 PR c/77292
4986 * c-common.c (warn_logical_not_parentheses): Don't warn for
4987 a comparison or a logical operator.
4988
34cedad5
TV
49892016-08-29 Tom de Vries <tom@codesourcery.com>
4990
4991 * c-common.c (build_va_arg): Fix type comparison assert.
4992
f162d717
TV
49932016-08-29 Tom de Vries <tom@codesourcery.com>
4994
4995 * c-common.c (build_va_arg): Replace first argument type error
4996 with assert.
4997
ba9bbd6f
TV
49982016-08-29 Tom de Vries <tom@codesourcery.com>
4999
5000 PR c/77398
5001 * c-common.c (build_va_arg): Add first argument error. Build va_arg
5002 with error_mark_node as va_list instead of with illegal va_list.
5003
ebef225f
MP
50042016-08-25 Marek Polacek <polacek@redhat.com>
5005 David Malcolm <dmalcolm@redhat.com>
5006
5007 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
5008 * c-common.h (warn_logical_not_parentheses): Update declaration.
5009
b00e6e75
MP
50102016-08-22 Marek Polacek <polacek@redhat.com>
5011
5012 PR c++/77321
5013 * c-common.c (warn_for_memset): Check type for null.
5014
6dc198e3
JM
50152016-08-22 Joseph Myers <joseph@codesourcery.com>
5016
14ec014e 5017 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
5018 _FloatNx types for suffixes for built-in functions.
5019
c65699ef
JM
50202016-08-19 Joseph Myers <joseph@codesourcery.com>
5021
5022 PR c/32187
5023 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
5024 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
5025 (RID_FLOAT128X): New enum rid values.
5026 (CASE_RID_FLOATN_NX): New macro.
5027 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
5028 keywords.
5029 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
5030 corresponding complex types.
5031 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
5032 _FloatNx and corresponding complex types.
5033 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
5034 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
5035 and _FloatNx types for the widest type for determining
5036 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
5037 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
5038 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
5039 and _FloatNx types.
5040 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
5041 constants.
5042 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
5043 _FloatNx types.
5044
cc015f3a
DM
50452016-08-18 David Malcolm <dmalcolm@redhat.com>
5046
5047 * c-opts.c (c_diagnostic_finalizer): Update for change to
5048 diagnostic_show_locus.
5049
cb18fd07
DM
50502016-08-18 David Malcolm <dmalcolm@redhat.com>
5051
5052 * c-common.c: Include "spellcheck.h".
5053 (cb_get_suggestion): New function.
5054 * c-common.h (cb_get_suggestion): New decl.
5055 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
5056 cb_get_suggestion.
5057
a76989dc
MP
50582016-08-18 Marek Polacek <polacek@redhat.com>
5059
5060 PR c/71514
5061 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
5062 and pointer-to-VLA.
5063
65e736c0
DM
50642016-08-16 David Malcolm <dmalcolm@redhat.com>
5065
5066 PR c/72857
5067 * c-common.c (substring_loc::get_range): Rename to...
5068 (substring_loc::get_location): ...this, converting param from a
5069 source_range * to a location_t *. Call
5070 get_source_location_for_substring rather than
5071 get_source_range_for_substring, and pass in m_caret_idx.
5072 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
5073 (substring_loc::get_range): Replace with...
5074 (substring_loc::get_location): ...this.
5075 (substring_loc::set_caret_index): New method.
5076 (substring_loc): Add field m_caret_idx.
5077 * c-format.c (format_warning_va): Update for above changes.
5078 Rename local "substring_loc" to "fmt_substring_loc" to avoid
5079 clashing with type name.
5080 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
5081 (check_argument_type): Likewise.
5082 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
5083 Use a copy when emitting warnings, setting the caret index from TYPE.
5084
7e1dde14 50852016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 5086 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
5087
5088 * c-ada-spec.c (dump_number): New function.
5089 (handle_escape_character): Likewise.
5090 (print_ada_macros): Add handling of constant integers and strings.
5091
191816a3
MP
50922016-08-12 Marek Polacek <polacek@redhat.com>
5093
5094 PR c/7652
5095 * c-common.c (scalar_to_vector): Adjust fall through comment.
5096 * c-opts.c (c_common_handle_option): Likewise.
5097 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
5098 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
5099 fall through comment.
5100 * cilk.c (extract_free_variables): Add FALLTHRU.
5101
452df4a4
JM
51022016-08-10 Jason Merrill <jason@redhat.com>
5103
5104 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
5105
f3365c12
JM
51062016-08-09 Jason Merrill <jason@redhat.com>
5107
5108 * c-common.c (c_common_attribute_table): vector_size affects type
5109 identity.
5110
f0bc3323
MP
51112016-08-09 Marek Polacek <polacek@redhat.com>
5112
5113 PR c/7652
5114 * c-ada-spec.c (dump_generic_ada_node): Add return.
5115
98e5a19a
JM
51162016-08-09 Jason Merrill <jason@redhat.com>
5117
5118 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
5119 C++17 constexpr lambdas.
5120
895aa8e1
DM
51212016-08-08 David Malcolm <dmalcolm@redhat.com>
5122
5123 PR c/64955
5124 * c-common.h (selftest::c_format_c_tests): New declaration.
5125 (selftest::run_c_tests): New declaration.
5126 * c-format.c: Include "selftest.h.
5127 (format_warning_va): Add param "corrected_substring" and use
5128 it to add a replacement fix-it hint.
5129 (format_warning_at_substring): Likewise.
5130 (format_warning_at_char): Update for new param of
5131 format_warning_va.
5132 (argument_parser::check_argument_type): Pass "fki" to
5133 check_format_types.
5134 (check_format_types): Add param "fki" and pass it to
5135 format_type_warning.
5136 (deref_n_times): New function.
5137 (get_modifier_for_format_len): New function.
5138 (selftest::test_get_modifier_for_format_len): New function.
5139 (get_format_for_type): New function.
5140 (format_type_warning): Add param "fki" and use it to attempt
5141 to provide hints for argument types when calling
5142 format_warning_at_substring.
5143 (selftest::get_info): New function.
5144 (selftest::assert_format_for_type_streq): New function.
5145 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
5146 (selftest::test_get_format_for_type_printf): New function.
5147 (selftest::test_get_format_for_type_scanf): New function.
5148 (selftest::c_format_c_tests): New function.
5149
e52ed3fe
DM
51502016-08-08 David Malcolm <dmalcolm@redhat.com>
5151
5152 PR c/52952
5153 * c-format.c: Include "diagnostic.h".
5154 (location_column_from_byte_offset): Delete.
5155 (location_from_offset): Delete.
5156 (format_warning_va): New function.
5157 (format_warning_at_substring): New function.
5158 (format_warning_at_char): New function.
5159 (check_format_arg): Capture location of format_tree and pass to
5160 check_format_info_main.
5161 (argument_parser): Add fields "start_of_this_format" and
5162 "format_string_cst".
5163 (flag_chars_t::validate): Add param "format_string_cst". Convert
5164 warning_at call using location_from_offset to call to
5165 format_warning_at_char.
5166 (argument_parser::argument_parser): Add param "format_string_cst_"
5167 and use use it to initialize field "format_string_cst".
5168 Initialize new field "start_of_this_format".
5169 (argument_parser::read_format_flags): Convert warning_at call
5170 using location_from_offset to a call to format_warning_at_char.
5171 (argument_parser::read_any_format_left_precision): Likewise.
5172 (argument_parser::read_any_format_precision): Likewise.
5173 (argument_parser::read_any_other_modifier): Likewise.
5174 (argument_parser::find_format_char_info): Likewise, in three places.
5175 (argument_parser::parse_any_scan_set): Likewise, in one place.
5176 (argument_parser::handle_conversions): Likewise, in two places.
5177 (argument_parser::check_argument_type): Add param "fmt_param_loc"
5178 and use it to make a substring_loc. Pass the latter to
5179 check_format_types.
5180 (check_format_info_main): Add params "fmt_param_loc" and
5181 "format_string_cst". Convert warning_at calls using
5182 location_from_offset to calls to format_warning_at_char. Pass the
5183 new params to the arg_parser ctor. Pass "format_string_cst" to
5184 flag_chars.validate. Pass "fmt_param_loc" to
5185 arg_parser.check_argument_type.
5186 (check_format_types): Convert first param from a location_t
5187 to a const substring_loc & and rename to "fmt_loc". Attempt
5188 to extract the range of the relevant parameter and pass it
5189 to format_type_warning.
5190 (format_type_warning): Convert first param from a location_t
5191 to a const substring_loc & and rename to "fmt_loc". Add
5192 params "param_range" and "type". Replace calls to warning_at
5193 with calls to format_warning_at_substring.
5194
1c4d457e
DM
51952016-08-08 David Malcolm <dmalcolm@redhat.com>
5196
5197 * c-format.c (class flag_chars_t): New class.
5198 (struct length_modifier): New struct.
5199 (class argument_parser): New class.
5200 (flag_chars_t::flag_chars_t): New ctor.
5201 (flag_chars_t::has_char_p): New method.
5202 (flag_chars_t::add_char): New method.
5203 (flag_chars_t::validate): New method.
5204 (flag_chars_t::get_alloc_flag): New method.
5205 (flag_chars_t::assignment_suppression_p): New method.
5206 (argument_parser::argument_parser): New ctor.
5207 (argument_parser::read_any_dollar): New method.
5208 (argument_parser::read_format_flags): New method.
5209 (argument_parser::read_any_format_width): New method.
5210 (argument_parser::read_any_format_left_precision): New method.
5211 (argument_parser::read_any_format_precision): New method.
5212 (argument_parser::handle_alloc_chars): New method.
5213 (argument_parser::read_any_length_modifier): New method.
5214 (argument_parser::read_any_other_modifier): New method.
5215 (argument_parser::find_format_char_info): New method.
5216 (argument_parser::validate_flag_pairs): New method.
5217 (argument_parser::give_y2k_warnings): New method.
5218 (argument_parser::parse_any_scan_set): New method.
5219 (argument_parser::handle_conversions): New method.
5220 (argument_parser::check_argument_type): New method.
5221 (check_format_info_main): Introduce classes argument_parser
5222 and flag_chars_t, moving the code within the loop into methods
5223 of these classes. Make various locals "const".
5224
88fa5555
DM
52252016-08-05 David Malcolm <dmalcolm@redhat.com>
5226
5227 * c-common.c: Include "substring-locations.h".
5228 (get_cpp_ttype_from_string_type): New function.
5229 (g_string_concat_db): New global.
5230 (substring_loc::get_range): New method.
5231 * c-common.h (g_string_concat_db): New declaration.
5232 (class substring_loc): New class.
5233 * c-lex.c (lex_string): When concatenating strings, capture the
5234 locations of all tokens using a new obstack, and record the
5235 concatenation locations within g_string_concat_db.
5236 * c-opts.c (c_common_init_options): Construct g_string_concat_db
5237 on the ggc-heap.
5238
78169471
MP
52392016-07-29 Marek Polacek <polacek@redhat.com>
5240
638fc14f
MP
5241 PR c/71926
5242 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
5243 parentheses warning.
5244
78169471
MP
5245 PR c/71574
5246 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
5247
1225d6b1
ML
52482016-07-28 Martin Liska <mliska@suse.cz>
5249
5250 PR gcov-profile/68025
5251 * c-common.c (handle_no_profile_instrument_function_attribute):
5252
ec1e2a40
BE
52532016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
5254
5255 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
5256 BITS_PER_UNIT_LOG.
5257
5ec2cd9f
JM
52582016-07-25 Jason Merrill <jason@redhat.com>
5259
5260 PR c++/65970
5261 * c.opt (fconstexpr-loop-limit): New.
5262
9dc5773f 52632016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
5264
5265 PR c++/71675
5266 * c-common.c (resolve_overloaded_builtin): Avoid converting
5267 __atomic_compare_exchange_n return type to that of what its
5268 first argument points to.
5269
e3fe09c1
UB
52702016-07-22 Uros Bizjak <ubizjak@gmail.com>
5271
5272 * c-common.c: Use HOST_WIDE_INT_M1U instead of
5273 ~(unsigned HOST_WIDE_INT) 0.
5274
bc91c436
ML
52752016-07-22 Martin Liska <mliska@suse.cz>
5276
5277 PR gcov-profile/69028
5278 PR gcov-profile/62047
5279 * cilk.c (create_cilk_helper_decl): Set location of a new decl
5280 to the current_function_decl.
5281
451dcc66
JM
52822016-07-21 Jason Merrill <jason@redhat.com>
5283
5284 PR c++/65168
5285 * c-common.c (c_common_truthvalue_conversion): Check
5286 c_inhibit_evaluation_warnings for warning about address of
5287 reference.
5288
de6a69ee
DM
52892016-07-20 David Malcolm <dmalcolm@redhat.com>
5290
5291 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
5292 const char *.
5293
d022c55a
JM
52942016-07-15 Jason Merrill <jason@redhat.com>
5295
5296 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
5297
ddbbcb19
JJ
52982016-07-15 Jakub Jelinek <jakub@redhat.com>
5299
5300 PR c/71858
5301 * c-common.h (enum lookup_name_fuzzy_kind): Add
5302 FUZZY_LOOKUP_FUNCTION_NAME.
5303
d0cf395a
JM
53042016-07-08 Jason Merrill <jason@redhat.com>
5305
5306 P0145: Refining Expression Order for C++.
5307 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
5308 * c-opts.c: Adjust.
5309
98d44e93
MT
53102016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
5311
5312 PR c++/71214
5313 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
5314
f9d8d994
TS
53152016-06-29 Thomas Schwinge <thomas@codesourcery.com>
5316
5317 * c-pragma.h (enum pragma_kind): Rename
5318 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
5319 users.
5320
4aa83879
RB
53212016-06-29 Richard Biener <rguenther@suse.de>
5322
5323 PR middle-end/71002
5324 * c-common.c (c_common_get_alias_set): Remove union type punning case.
5325
a25bd9e6
JM
53262016-06-24 Jason Merrill <jason@redhat.com>
5327
5328 P0145R2: Refining Expression Order for C++.
5329 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
5330 MODIFY_EXPR.
5331
a86451b9
JJ
53322016-06-24 Jakub Jelinek <jakub@redhat.com>
5333
5334 * c-common.c (check_builtin_function_arguments): Require last
5335 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
5336 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
5337 if the last argument is pointer to enumerated or boolean type.
5338
1a4f11c8
DM
53392016-06-22 David Malcolm <dmalcolm@redhat.com>
5340
5341 PR c/70339
5342 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
5343 (lookup_name_fuzzy): New prototype.
5344
fe55692c
JDA
53452016-06-21 John David Anglin <danglin@gcc.gnu.org>
5346
5347 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
5348
4eb24e01
JM
53492016-06-14 Jason Merrill <jason@redhat.com>
5350
5351 P0145R2: Refining Expression Order for C++.
5352 * c.opt (fargs-in-order): New.
5353 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
5354
ef7cf206
JJ
53552016-06-13 Jakub Jelinek <jakub@redhat.com>
5356
0dda258b
JJ
5357 PR sanitizer/71498
5358 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
5359 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
5360
ef7cf206
JJ
5361 PR preprocessor/71183
5362 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
5363 to cb_get_source_date_epoch.
5364
50b15873
JJ
53652016-06-10 Jakub Jelinek <jakub@redhat.com>
5366
5367 PR c/68657
5368 * c.opt (Wpsabi): Add Warning flag.
5369
4d926e34
MS
53702016-06-10 Martin Sebor <msebor@redhat.com>
5371
5372 PR c/71392
14ec014e 5373 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
5374 the nonnull attribute in type-generic builtins.
5375
e01b4e16
MS
53762016-06-09 Martin Sebor <msebor@redhat.com>
5377
5378 PR c/70883
5379 * c-common.c (builtin_function_validate_nargs): Make text of error
5380 message consistent with others like it.
5381
44a845ca
MS
53822016-06-08 Martin Sebor <msebor@redhat.com>
5383 Jakub Jelinek <jakub@redhat.com>
5384
5385 PR c++/70507
5386 PR c/68120
5387 * c-common.c (check_builtin_function_arguments): Handle
5388 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
5389
a80a7051
RB
53902016-06-08 Richard Biener <rguenther@suse.de>
5391
5392 * c-common.c (parse_optimize_options): Improve diagnostic messages.
5393
bfd67b47
RB
53942016-06-07 Richard Biener <rguenther@suse.de>
5395
5396 PR c/61564
5397 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
5398 options and warn about others.
5399
15c98b2e
ES
54002016-06-01 Eduard Sanou <dhole@openmailbox.org>
5401
5402 * c-common.c (get_source_date_epoch): Rename to
5403 cb_get_source_date_epoch.
5404 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
5405 message when the parsing fails. Use error_at instead of fatal_error.
5406 * c-common.h (get_source_date_epoch): Rename to
5407 cb_get_source_date_epoch.
5408 * c-common.h (cb_get_source_date_epoch): Prototype.
5409 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
5410 * c-common.h (c_omp_region_type): Remove trailing comma.
5411 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
5412 * c-lex.c (c_lex_with_flags): Remove initialization of
5413 pfile->source_date_epoch.
5414
00631022
JJ
54152016-05-30 Jakub Jelinek <jakub@redhat.com>
5416
5417 PR c++/71349
5418 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
5419 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
5420 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
5421 instead of C_OMP_CLAUSE_SPLIT_FOR.
5422
f17a223d
RB
54232016-05-24 Richard Biener <rguenther@suse.de>
5424
5425 PR middle-end/70434
5426 PR c/69504
5427 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
5428 (convert_vector_to_array_for_subscript): ... this.
5429 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
5430 VIEW_CONVERT_EXPR to an array type. Rename to ...
5431 (convert_vector_to_array_for_subscript): ... this.
5432
4f2e1536
MP
54332016-05-12 Marek Polacek <polacek@redhat.com>
5434
5435 PR c/70756
5436 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
5437 size_in_bytes and pass LOC to it.
5438
d6e83a8d
MM
54392016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5440
5441 PR c/43651
5442 * c.opt (Wduplicate-decl-specifier): New option.
5443
5c3a10fb
MP
54442016-05-11 Marek Polacek <polacek@redhat.com>
5445
5446 PR c++/71024
5447 * c-common.c (diagnose_mismatched_attributes): New function.
5448 * c-common.h (diagnose_mismatched_attributes): Declare.
5449
deef7113
MP
54502016-05-04 Marek Polacek <polacek@redhat.com>
5451
5452 * c.opt (Wdangling-else): New option.
5453
79ce98bc
MP
54542016-05-03 Marek Polacek <polacek@redhat.com>
5455
5456 PR c/70859
5457 * c-common.c (builtin_function_validate_nargs): Add location
5458 parameter. Use it.
5459 (check_builtin_function_arguments): Add location and arguments
5460 parameters. Use them.
5461 * c-common.h (check_builtin_function_arguments): Update declaration.
5462
381cdae4
RB
54632016-05-03 Richard Biener <rguenther@suse.de>
5464
5465 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
5466 allow call args to gimplify to SSA names.
5467
1d793c34
MP
54682016-05-03 Marek Polacek <polacek@redhat.com>
5469
5470 * c-common.h (enum c_omp_region_type): Remove stray comma.
5471
77886428
CP
54722016-05-02 Cesar Philippidis <cesar@codesourcery.com>
5473
5474 * c-common.h (enum c_omp_region_type): Define.
5475
697e0b28
RS
54762016-05-02 Richard Sandiford <richard.sandiford@arm.com>
5477
5478 * c-common.c (shorten_compare): Use wi::to_wide.
5479
e7ff0319
CP
54802016-04-29 Cesar Philippidis <cesar@codesourcery.com>
5481
5482 PR middle-end/70626
5483 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
5484 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
5485 reduction clauses in acc parallel loops.
5486
2fff3db8
MP
54872016-04-29 Marek Polacek <polacek@redhat.com>
5488
5489 PR c/70852
5490 * c-common.c (warn_for_memset): Check domain before accessing it.
5491
509063eb
DV
54922016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
5493
5494 PR/69089
5495 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
5496 "aligned" attribute.
5497
b632761d
JM
54982016-04-28 Jason Merrill <jason@redhat.com>
5499
5500 * c-lex.c (c_common_has_attribute): Handle nodiscard.
5501
174f6622
ES
55022016-04-28 Eduard Sanou <dhole@openmailbox.org>
5503 Matthias Klose <doko@debian.org>
5504
5505 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 5506 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
5507 handling.
5508 * c-common.h (get_source_date_epoch): Prototype.
5509 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
5510
6bc2bb18
RB
55112015-04-27 Ryan Burn <contact@rnburn.com>
5512
5513 PR c++/69024
5514 PR c++/68997
5515 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
5516 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
5517 external linkage.
5518 (cilk_detect_and_unwrap): Corresponding changes.
5519 (extract_free_variables): Don't extract free variables from
5520 AGGR_INIT_EXPR slot.
5521 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
5522 (cilk_recognize_spawn): Likewise.
5523
c1e1f433
BS
55242016-04-27 Bernd Schmidt <bschmidt@redhat.com>
5525
5526 * c.opt (Wmemset-elt-size): New option.
5527 * c-common.c (warn_for_memset): New function.
5528 * c-common.h (warn_for_memset): Declare.
5529
d067e05f
JM
55302016-04-25 Jason Merrill <jason@redhat.com>
5531
5532 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
5533 No longer static.
5534 * c-common.h: Declare it.
5535 * c-lex.c (c_common_has_attribute): Add maybe_unused.
5536
9aa36ae5
JM
55372016-04-22 Jason Merrill <jason@redhat.com>
5538
5539 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
5540
477d4906
IV
55412016-04-20 Ilya Verbin <ilya.verbin@intel.com>
5542
5543 PR c++/69363
5544 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
5545 * c-common.h (c_finish_cilk_clauses): Remove declaration.
5546
fe37c7af
MM
55472016-04-18 Michael Matz <matz@suse.de>
5548
5549 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
5550 and SET_DECL_ALIGN.
5551
23f2660f
EB
55522016-04-17 Eric Botcazou <ebotcazou@adacore.com>
5553
5554 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
5555 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
5556 to incomplete types.
5557 (dump_nested_type): Remove redundant tests and tidy up.
5558 (print_ada_declaration): Also set TREE_VISITED on the declaration of
5559 a type which is the typedef of an original type.
5560
1e77281b
MP
55612016-04-15 Marek Polacek <polacek@redhat.com>
5562
5563 PR c/70651
5564 * c-common.c (build_va_arg): Change two asserts into errors and return
5565 error_mark_node.
5566
b3a77f21
MP
55672016-04-13 Marek Polacek <polacek@redhat.com>
5568
5569 PR c++/70639
5570 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
5571 for switch statements, too.
5572
322b8466
JM
55732016-03-28 Jason Merrill <jason@redhat.com>
5574
5575 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
5576
fbdb6baf
MP
55772016-03-23 Marek Polacek <polacek@redhat.com>
5578
5579 PR c++/69884
5580 * c.opt (Wignored-attributes): New option.
5581
5c240f4d
DM
55822016-03-22 David Malcolm <dmalcolm@redhat.com>
5583
5584 PR c/69993
5585 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
5586 diagnostic text, reversing the order of the warning and note so
5587 that they appear in source order.
5588
14ba7b28
MP
55892016-03-17 Marek Polacek <polacek@redhat.com>
5590
5591 PR c/69407
5592 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
5593 operations.
5594
08a1cadc
JM
55952016-03-14 Jason Merrill <jason@redhat.com>
5596
2aaeea19
JM
5597 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
5598
08a1cadc
JM
5599 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
5600
c06d25bb
RB
56012016-03-09 Richard Biener <rguenther@suse.de>
5602
5603 PR c/70143
5604 * c-common.c (strict_aliasing_warning): Add back
5605 alias_sets_conflict_p check.
5606
80aac5c8
JM
56072016-03-08 Jason Merrill <jason@redhat.com>
5608
5609 * c-opts.c (set_std_cxx1z): Don't enable concepts.
5610
64b23c13
DM
56112016-03-04 David Malcolm <dmalcolm@redhat.com>
5612
5613 PR c/68187
5614 * c-indentation.c (get_visual_column): Move code to determine next
5615 tab stop to...
5616 (next_tab_stop): ...this new function.
5617 (line_contains_hash_if): Delete function.
5618 (detect_preprocessor_logic): Delete function.
5619 (get_first_nws_vis_column): New function.
5620 (detect_intervening_unindent): New function.
5621 (should_warn_for_misleading_indentation): Replace call to
5622 detect_preprocessor_logic with a call to
5623 detect_intervening_unindent.
5624
729526f5
DM
56252016-03-04 David Malcolm <dmalcolm@redhat.com>
5626
5627 PR c/68187
5628 * c-indentation.c (should_warn_for_misleading_indentation): When
5629 suppressing warnings about cases where the guard and body are on
5630 the same column, only use the first non-whitespace column in place
5631 of the guard token column when dealing with "else" clauses.
5632 When rejecting aligned BODY and NEXT, loosen the requirement
5633 from equality with the first non-whitespace of guard to simply
5634 that they not be indented relative to it.
5635
e9a35493
RB
56362016-03-04 Richard Biener <rguenther@suse.de>
5637
5638 PR c++/70054
5639 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
5640 instead of alias_sets_conflict_p.
5641
1be56bc5
MP
56422016-03-01 Marek Polacek <polacek@redhat.com>
5643
5644 PR c++/69795
5645 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
5646 any DECL.
5647
35886f0b
MS
56482016-02-22 Martin Sebor <msebor@redhat.com>
5649
5650 PR middle-end/69780
5651 * c-common.c (check_builtin_function_arguments): Validate and
5652 reject invalid arguments to __builtin_alloca_with_align.
5653
4246c8da
MW
56542016-02-20 Mark Wielaard <mjw@redhat.com>
5655
5656 PR c/28901
5657 * c.opt (Wunused-const-variable): Turn into Alias for...
5658 (Wunused-const-variable=): New option.
5659
268be88c
BE
56602016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5661
5662 PR c++/69865
5663 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
5664 here...
5665 (c_common_init_options): ...to here.
5666 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
5667
871b3f47
JJ
56682016-02-19 Jakub Jelinek <jakub@redhat.com>
5669
5670 PR c++/69826
5671 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
5672 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
5673 flag_preprocess_only.
5674
bf14eba2
JJ
56752016-02-16 Jakub Jelinek <jakub@redhat.com>
5676
5677 PR c/69835
5678 * c.opt (Wnonnull-compare): Enable for -Wall.
5679
ba6b3795
JJ
56802016-02-15 Jakub Jelinek <jakub@redhat.com>
5681
5682 PR c++/69797
5683 * c-common.c (sync_resolve_size): Diagnose too few arguments
5684 even when params is non-NULL empty vector.
5685
a011cd92
BS
56862016-02-08 Bernd Schmidt <bschmidt@redhat.com>
5687
5688 PR target/60410
5689 * c.opt (fshort-double): Remove.
5690
46cb9332
MS
56912016-02-05 Martin Sebor <msebor@redhat.com>
5692
5693 PR c++/69662
5694 * c.opt (Warning options): Update -Wplacement-new to take
5695 an optional argument.
5696
e1b81f2b
JJ
56972016-02-01 Jakub Jelinek <jakub@redhat.com>
5698
5699 PR preprocessor/69543
5700 PR c/69558
5701 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
5702 instead of loc to control_warning_option.
5703
b6adbb9f
NS
57042016-02-01 Nathan Sidwell <nathan@codesourcery.com>
5705
5706 * c.opt (fopenacc-dim=): New option.
5707
5d70666e
RB
57082016-01-27 Ryan Burn <contact@rnburn.com>
5709
5710 PR cilkplus/69267
5711 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
5712 gimplify_arg. Removed superfluous post_p argument.
5713 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
5714 superfluous post_p argument.
5715 * c-gimplify.c (c_gimplify_expr): Likewise.
5716
01e1dea3
DM
57172016-01-26 David Malcolm <dmalcolm@redhat.com>
5718
5719 PR other/69006
5720 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
5721 pp_newline_and_flush with pp_flush.
5722
9f04a53e
MS
57232016-01-20 Martin Sebor <msebor@redhat.com>
5724
5725 PR c/69405
5726 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
5727 an incompatible argument when the argument isn't a valid tree node.
5728
7f26f7df
JM
57292016-01-18 Jason Merrill <jason@redhat.com>
5730
5731 PR c++/68767
5732 * c-common.c (check_function_arguments_recurse): Fold the whole
5733 COND_EXPR, not just the condition.
5734
f62bf092
TV
57352016-01-18 Tom de Vries <tom@codesourcery.com>
5736
5737 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
5738 classify as loop clause.
5739
e0a575ff
JJ
57402016-01-15 Jakub Jelinek <jakub@redhat.com>
5741
5742 PR bootstrap/68271
5743 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
5744 C++ FE no longer has limit on number of pragmas.
5745
57462015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
5747
5748 PR c++/69048
5749 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 5750 to add missing cleanup point.
b6e3db06 5751
c7df95d8
DM
57522016-01-14 David Malcolm <dmalcolm@redhat.com>
5753
5754 PR c++/68819
5755 * c-indentation.c (get_visual_column): Add location_t param.
5756 Handle the column number being zero by effectively disabling the
5757 warning, with an "inform".
5758 (should_warn_for_misleading_indentation): Add location_t argument
5759 for all uses of get_visual_column.
5760
21efdd80
PP
57612016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
5762
5763 PR c++/69029
5764 * c-indentation.c (should_warn_for_misleading_indentation):
5765 Don't warn about do-while statements.
5766
7a127fa7
MS
57672016-01-07 Martin Sebor <msebor@redhat.com>
5768
5769 PR c/68966
5770 * c-common.c (sync_resolve_size): Reject first argument when it's
5771 a pointer to _Bool.
5772
c589e975
DM
57732016-01-05 David Malcolm <dmalcolm@redhat.com>
5774
5775 PR c/69122
5776 * c-indentation.c (get_visual_column): Remove default argument.
5777 (should_warn_for_misleading_indentation): For the multiline case,
5778 update call to get_visual_column for next_stmt_exploc so that it
5779 captures the location of the first non-whitespace character in the
5780 relevant line. Don't issue warnings if there is non-whitespace
5781 before the next statement.
5782
818ab71a
JJ
57832016-01-04 Jakub Jelinek <jakub@redhat.com>
5784
5785 Update copyright years.
5786
745e411d
DM
57872015-12-21 David Malcolm <dmalcolm@redhat.com>
5788
5789 * c-common.c (binary_op_error): Convert first param from
5790 location_t to rich_location * and use it when emitting an error.
5791 * c-common.h (binary_op_error): Convert first param from
5792 location_t to rich_location *.
5793
de67c4c3
DM
57942015-12-16 David Malcolm <dmalcolm@redhat.com>
5795
5796 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
5797 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
5798
4a38b02b
IV
57992015-12-15 Ilya Verbin <ilya.verbin@intel.com>
5800
5801 * c-common.c (c_common_attribute_table): Handle "omp declare target
5802 link" attribute.
5803
54d62f51
JJ
58042015-12-14 Jakub Jelinek <jakub@redhat.com>
5805
5806 PR c/68833
5807 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
5808
8d4227c8
TB
58092014-12-12 Tobias Burnus <burnus@net-b.de>
5810
5811 PR fortran/68815
5812 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
5813 specifiers (%d, %i,%u and %c).
5814
f6069ccc
DM
58152015-12-10 David Malcolm <dmalcolm@redhat.com>
5816
5817 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
5818
63bbf46d
JJ
58192015-12-08 Jakub Jelinek <jakub@redhat.com>
5820
5821 PR c/48088
5822 PR c/68657
5823 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
5824 * c-pragma.c (handle_pragma_diagnostic): Adjust
5825 control_warning_option caller.
5826
f79520bb
DM
58272015-12-07 David Malcolm <dmalcolm@redhat.com>
5828
5829 * c-common.c (c_cpp_error): Update for change to
5830 rich_location::set_range.
5831
b3d5bc62
JJ
58322015-12-04 Paolo Bonzini <bonzini@gnu.org>
5833
5834 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
5835 shifting 1 out of the sign bit.
5836
58372015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
5838
5839 * c-common.c (c_common_attribute_table[]): Update max arguments
5840 count for "simd" attribute.
5841 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
5842
6eb4a537
JJ
58432015-12-03 Jakub Jelinek <jakub@redhat.com>
5844
5845 PR preprocessor/57580
5846 * c-ppoutput.c (print): Change printed field to bool.
5847 Move src_file last for smaller padding.
5848 (init_pp_output): Set print.printed to false instead of 0.
5849 (scan_translation_unit): Fix up formatting. Set print.printed
5850 to true after printing something other than newline.
5851 (scan_translation_unit_trad): Set print.printed to true instead of 1.
5852 (maybe_print_line_1): Set print.printed to false instead of 0.
5853 (print_line_1): Likewise.
5854 (do_line_change): Set print.printed to true instead of 1.
5855 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
5856 dump_macro): Set print.printed to false after printing newline.
5857
4250754e
JM
58582015-12-02 Jason Merrill <jason@redhat.com>
5859
f479b43d
JM
5860 * c-common.c (fold_for_warn): New.
5861 (warn_logical_operator, warn_tautological_cmp)
5862 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
5863
4250754e
JM
5864 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
5865 (c_fully_fold_internal, decl_constant_value_for_optimization):
5866 Move to c/c-fold.c.
5867 * c-common.h: Don't declare decl_constant_value_for_optimization.
5868
e9e32ee6
JM
58692015-12-02 Joseph Myers <joseph@codesourcery.com>
5870
5871 PR c/68162
5872 * c-common.h (c_build_qualified_type): Add extra default
5873 arguments.
5874
37d5ad46
JB
58752015-12-01 Julian Brown <julian@codesourcery.com>
5876 Cesar Philippidis <cesar@codesourcery.com>
5877 James Norris <James_Norris@mentor.com>
5878
5879 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
5880 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
5881 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
5882
f07862c7
EB
58832015-11-30 Eric Botcazou <ebotcazou@adacore.com>
5884
5885 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
5886 (decl_sloc_common): Delete and move bulk of processing to...
5887 (decl_sloc): ...here.
5888 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
5889 (dump_ada_double_name): Remove S parameter and compute the suffix.
5890 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
5891 element type and deal with an anonymous one.
5892 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
5893 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
5894 and remove reference to QUAL_UNION_TYPE.
5895 (dump_nested_types): Make 2 passes on the fields and move bulk to...
5896 (dump_nested_type): ...here. New function extracted from above.
5897 Generate a full declaration for anonymous element type of arrays.
5898 (print_ada_declaration): Really skip anonymous declarations. Remove
5899 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
5900 Clean up processing of declarations of array types and objects.
5901 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
5902 Remove obsolete code and tidy up.
5903
75c8aac3
JH
59042015-11-29 Jan Hubicka <hubicka@ucw.cz>
5905
5906 PR c/67581
5907 * c-common.c (handle_transparent_union_attribute): Update
5908 also type variants.
5909
b58d3df2
ML
59102015-11-27 Martin Liska <mliska@suse.cz>
5911
5912 PR c++/68312
5913 * array-notation-common.c (cilkplus_extract_an_triplets):
5914 Release vector of vectors.
5915 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
5916
89a01fcf
EB
59172015-11-26 Eric Botcazou <ebotcazou@adacore.com>
5918
5919 PR c++/68527
5920 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
5921 (print_ada_struct_decl): Likewise.
5922
cc5c5226
IZ
59232015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
5924
5925 PR c++/68001
5926 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
5927 * cilk.c (recognize_spawn): Determine location in a more precise
5928 way.
5929
269adb9d
JM
59302015-11-19 Jason Merrill <jason@redhat.com>
5931
5932 * c-common.c (shorten_compare): But look through macros from
5933 system headers.
5934
d0eccfcd
JM
59352015-11-18 Jason Merrill <jason@redhat.com>
5936
5937 * c-common.c (shorten_compare): Don't -Wtype-limits if the
5938 non-constant operand comes from a macro.
5939
3e44547c
JM
59402015-11-17 Jason Merrill <jason@redhat.com>
5941
5942 PR bootstrap/68346
5943 * c-common.c (warn_tautological_cmp): Fold before checking for
5944 constants.
5945
0f62c7a0
MP
59462015-11-16 Marek Polacek <polacek@redhat.com>
5947
5948 PR c++/68362
5949 * c-common.c (check_case_bounds): Fold low and high cases.
5950
a868811e
MP
59512015-11-16 Marek Polacek <polacek@redhat.com>
5952
5953 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
5954 * c-common.c (c_common_get_alias_set): Likewise.
5955 (handle_visibility_attribute): Likewise.
5956
fff77217
KY
59572015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
5958
5959 * c-common.c (handle_simd_attribute): New.
5960 (struct attribute_spec): Add entry for "simd".
5961 (handle_simd_attribute): New.
5962
269e63b7
KT
59632015-11-13 Kai Tietz <ktietz70@googlemail.com>
5964
5965 * c-lex.c (interpret_float): Use fold_convert.
5966
ebedc9a3
DM
59672015-11-13 David Malcolm <dmalcolm@redhat.com>
5968
5969 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
5970 and store it on the result.
5971 * c-opts.c (c_common_init_options): Set
5972 global_dc->colorize_source_p.
5973
6e232ba4
JN
59742015-11-12 James Norris <jnorris@codesourcery.com>
5975 Joseph Myers <joseph@codesourcery.com>
5976
7365279f 5977 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
5978 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
5979 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
5980 PRAGMA_OACC_CLAUSE_LINK.
5981
e78bede6
MP
59822015-11-11 Marek Polacek <polacek@redhat.com>
5983
5984 PR c/68107
5985 PR c++/68266
5986 * c-common.c (valid_array_size_p): New function.
5987 * c-common.h (valid_array_size_p): Declare.
5988
3f8257db 59892015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
5990
5991 PR bootstrap/68271
5992 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
5993
69f293c9
AM
59942015-11-11 Andrew MacLeod <amacleod@redhat.com>
5995
5996 * array-notation-common.c: Remove unused header files.
5997 * c-ada-spec.c: Likewise.
5998 * c-cilkplus.c: Likewise.
5999 * c-common.c: Likewise.
6000 * c-cppbuiltin.c: Likewise.
6001 * c-dump.c: Likewise.
6002 * c-format.c: Likewise.
6003 * c-gimplify.c: Likewise.
6004 * c-indentation.c: Likewise.
6005 * c-lex.c: Likewise.
6006 * c-omp.c: Likewise.
6007 * c-opts.c: Likewise.
6008 * c-pch.c: Likewise.
6009 * c-ppoutput.c: Likewise.
6010 * c-pragma.c: Likewise.
6011 * c-pretty-print.c: Likewise.
6012 * c-semantics.c: Likewise.
6013 * c-ubsan.c: Likewise.
6014 * cilk.c: Likewise.
6015 * stub-objc.c: Likewise.
6016
3a40d81d
NS
60172015-11-09 Thomas Schwinge <thomas@codesourcery.com>
6018 Cesar Philippidis <cesar@codesourcery.com>
6019 James Norris <jnorris@codesourcery.com>
6020 Julian Brown <julian@codesourcery.com>
6021 Nathan Sidwell <nathan@codesourcery.com>
6022
6023 * c-pragma.c (oacc_pragmas): Add "routine".
6024 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
6025
ee45a32d
EB
60262015-11-08 Eric Botcazou <ebotcazou@adacore.com>
6027
6028 * c-common.c (c_common_attributes): Add scalar_storage_order.
6029 (handle_scalar_storage_order_attribute): New function.
6030 * c-pragma.c (global_sso): New variable.
6031 (maybe_apply_pragma_scalar_storage_order): New function.
6032 (handle_pragma_scalar_storage_order): Likewise.
6033 (init_pragma): Register scalar_storage_order.
6034 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
6035 * c.opt (Wscalar-storage-order): New warning.
6036 (fsso-struct=): New option.
6037
eb11eb15
MS
60382015-11-08 Martin Sebor <msebor@redhat.com>
6039
6040 * c.opt (Wplacement-new): Add a period to the end of a sentence.
6041
0aad0198
RS
60422015-11-07 Richard Sandiford <richard.sandiford@arm.com>
6043
6044 * c-common.c: Don't undef DEF_BUILTIN.
6045
8a645150
DM
60462015-11-06 David Malcolm <dmalcolm@redhat.com>
6047
6048 * c-common.c (c_cpp_error): Convert parameter from location_t to
6049 rich_location *. Eliminate the "column_override" parameter and
6050 the call to diagnostic_override_column.
6051 Update the "done_lexing" clause to set range 0
6052 on the rich_location, rather than overwriting a location_t.
6053 * c-common.h (c_cpp_error): Convert parameter from location_t to
6054 rich_location *. Eliminate the "column_override" parameter.
6055
7a5e4956
CP
60562015-11-05 Cesar Philippidis <cesar@codesourcery.com>
6057 Thomas Schwinge <thomas@codesourcery.com>
6058 James Norris <jnorris@codesourcery.com>
6059
6060 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
6061 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
6062 clauses with parallel and kernels and loops.
6063 * c-pragma.h (enum pragma_omp_clause): Add entries for
6064 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
6065 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
6066 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
6067 INDEPENDENT,SEQ}.
6068 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
6069
e2f5cc96
MS
60702015-11-05 Martin Sebor <msebor@redhat.com>
6071
6072 PR c++/67942
6073 * c.opt (-Wplacement-new): New option.
6074
e01d41e5
JJ
60752015-11-05 Jakub Jelinek <jakub@redhat.com>
6076
6077 * c-common.h (c_finish_omp_atomic): Add TEST argument.
6078 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
6079 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
6080 save_expr or create_tmp_var* if TEST is true.
6081 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
6082 Don't call add_stmt here.
6083 (struct c_omp_check_loop_iv_data): New type.
6084 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
6085 c_omp_check_loop_iv_exprs): New functions.
6086 (c_omp_split_clauses): Adjust for lastprivate being allowed on
6087 distribute.
6088 (c_omp_declare_simd_clauses_to_numbers): Change
6089 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
6090 (c_omp_declare_simd_clauses_to_decls): Similarly change those
6091 from numbers to PARM_DECLs.
6092
595278be
MM
60932015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
6094
6095 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
6096 flag_checking.
6097
3f8257db 60982015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
6099
6100 PR c++-common/67882
b3d5bc62
JJ
6101 * c-common.h (fold_offsetof_1): Add argument.
6102 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
6103 offsetof expressions that reference elements past the end of
6104 an array.
6105
4bf9e5a8
TS
61062015-11-03 Thomas Schwinge <thomas@codesourcery.com>
6107 Chung-Lin Tang <cltang@codesourcery.com>
6108
6109 * c-pragma.c (oacc_pragmas): Add "atomic".
6110 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
6111
3b1661a9
ES
61122015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
6113
6114 * c-common.c (handle_target_clones_attribute): New.
6115 (c_common_attribute_table): Add handle_target_clones_attribute.
6116 (handle_always_inline_attribute): Add check on target_clones attribute.
6117 (handle_target_attribute): Ditto.
6118
2adfab87
AM
61192015-10-29 Andrew MacLeod <amacleod@redhat.com>
6120
6121 * array-notation-common.c: Reorder #include's and remove duplicates.
6122 * c-ada-spec.c: Likewise.
6123 * c-cilkplus.c: Likewise.
6124 * c-common.c: Likewise.
6125 * c-cppbuiltin.c: Likewise.
6126 * c-dump.c: Likewise.
6127 * c-format.c: Likewise.
6128 * c-gimplify.c: Likewise.
6129 * c-indentation.c: Likewise.
6130 * c-lex.c: Likewise.
6131 * c-omp.c: Likewise.
6132 * c-opts.c: Likewise.
6133 * c-pch.c: Likewise.
6134 * c-ppoutput.c: Likewise.
6135 * c-pragma.c: Likewise.
6136 * c-pretty-print.c: Likewise.
6137 * c-semantics.c: Likewise.
6138 * c-ubsan.c: Likewise.
6139 * cilk.c: Likewise.
6140 * stub-objc.c: Likewise.
6141
d90ec4f2
JM
61422015-10-28 Jason Merrill <jason@redhat.com>
6143
6144 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
6145
88bae6f4
TS
61462015-10-27 Thomas Schwinge <thomas@codesourcery.com>
6147 James Norris <jnorris@codesourcery.com>
6148 Cesar Philippidis <cesar@codesourcery.com>
6149
6150 PR c/64765
6151 PR c/64880
6152 * c-common.h (c_oacc_split_loop_clauses): Declare function.
6153 * c-omp.c (c_oacc_split_loop_clauses): New function.
6154
b1726d6c
MS
61552015-10-21 Martin Sebor <msebor@redhat.com>
6156
6157 PR driver/68043
6158 * c.opt: End each sentence that describes an option with a period.
6159
fa60eeb9
MP
61602015-10-20 Marek Polacek <polacek@redhat.com>
6161
6162 * array-notation-common.c (is_cilkplus_vector_p): Define.
6163 * c-common.h (is_cilkplus_vector_p): Declare.
6164
95979049
MP
61652015-10-20 Marek Polacek <polacek@redhat.com>
6166
6167 * c.opt (std=gnu++11): Do not describe as experimental.
6168 (std=gnu++14): Likewise.
6169
2a9fb712
JM
61702015-10-19 Jason Merrill <jason@redhat.com>
6171
6172 * c-cppbuiltin.c (c_cpp_builtins): Define
6173 __cpp_nontype_template_args.
6174
13b380a3
JM
61752015-10-19 Jason Merrill <jason@redhat.com>
6176
6177 * c-cppbuiltin.c (c_cpp_builtins): Define
6178 __cpp_enumerator_attributes, __cpp_fold_expressions,
6179 __cpp_unicode_characters.
6180
d9a6bd32
JJ
61812015-10-13 Jakub Jelinek <jakub@redhat.com>
6182 Aldy Hernandez <aldyh@redhat.com>
6183
6184 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
6185 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
6186 (c_define_builtins): Likewise.
6187 * c-common.h (enum c_omp_clause_split): Add
6188 C_OMP_CLAUSE_SPLIT_TASKLOOP.
6189 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
6190 (c_finish_omp_for): Add ORIG_DECLV argument.
6191 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
6192 201511 instead of 201307.
6193 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
6194 OMP_CRITICAL_CLAUSES to it.
6195 (c_finish_omp_ordered): Add CLAUSES argument, set
6196 OMP_ORDERED_CLAUSES to it.
6197 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
6198 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
6199 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
6200 constructs and new OpenMP 4.5 clauses. Clear
6201 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
6202 verification code.
6203 * c-pragma.c (omp_pragmas_simd): Add taskloop.
6204 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
6205 (enum pragma_omp_clause): Add
6206 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
6207 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
6208
624d31fe
RS
62092015-10-05 Richard Sandiford <richard.sandiford@arm.com>
6210
6211 * c-lex.c (interpret_float): Use real_equal instead of
6212 REAL_VALUES_EQUAL.
6213
b8fd7909
JM
62142015-10-04 Jason Merrill <jason@redhat.com>
6215
6216 Implement N4514, C++ Extensions for Transactional Memory.
6217 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
6218 (c_common_attribute_table): Add transaction_safe_dynamic.
6219 transaction_safe now affects type identity.
6220 (handle_tm_attribute): Handle transaction_safe_dynamic.
6221 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
6222 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
6223 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
6224 (D_TRANSMEM): New.
6225 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
6226 * c-pretty-print.c (pp_c_attributes_display): Don't print
6227 transaction_safe in C++.
6228
12651878
MP
62292015-10-02 Marek Polacek <polacek@redhat.com>
6230
6231 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
6232
3e3b8d63
MP
62332015-10-02 Marek Polacek <polacek@redhat.com>
6234
6235 PR c/64249
6236 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
6237 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
6238 * c.opt (Wduplicated-cond): New option.
6239
0d1a8f75
JM
62402015-10-01 Joseph Myers <joseph@codesourcery.com>
6241
6242 * c.opt (std=c11): Do not describe as experimental.
6243 (std=gnu11): Likewise.
6244 (std=iso9899:2011): Likewise.
6245
3e32ee19
NS
62462015-09-28 Nathan Sidwell <nathan@codesourcery.com>
6247
6248 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
6249 (DEF_FUNCTION_TYPE_VAR_11): Delete.
6250
974348ee
MP
62512015-09-25 Marek Polacek <polacek@redhat.com>
6252
6253 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
6254 (ubsan_instrument_shift): Likewise.
6255
15dbc1a6
MP
62562015-09-25 Marek Polacek <polacek@redhat.com>
6257
6258 PR sanitizer/64906
6259 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
6260
6b95d7cc
PP
62612015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
6262
6263 * c-indentation.c (should_warn_for_misleading_indentation):
6264 Compare next_stmt_vis_column with guard_line_first_nws instead
6265 of with guard_line_vis_column.
6266
c1822f9c
MLI
62672015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
6268
6269 PR c/49654
6270 PR c/49655
6271 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
6272 options and options not valid for the current language.
6273
d5398058
PP
62742015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
6275
6276 * c-indentation.c (should_warn_for_misleading_indentation):
6277 Float out and consolidate the calls to get_visual_column that
6278 are passed guard_exploc as an argument. Compare
6279 next_stmt_vis_column with guard_line_first_nws instead of with
6280 body_line_first_nws.
6281
6b333269
NS
62822015-09-22 Nathan Sidwell <nathan@codesourcery.com>
6283
6284 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
6285 Wnamespaces): New C++ warnings.
6286
a75f1574
JM
62872015-09-22 Jason Merrill <jason@redhat.com>
6288
6289 * c-common.h (abi_compat_version_crosses): New.
6290 (warn_abi_version): Declare.
6291 * c-common.c: Define it.
6292 * c-opts.c (c_common_post_options): Handle it.
6293 flag_abi_compat_version defaults to 8.
6294
bdaaa8b7
VV
62952015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
6296
6297 Complete the implementation of N4230, Nested namespace definition.
6298 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
6299 __cpp_nested_namespace_definitions.
6300
eaa797e8
MLI
63012015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6302
6303 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
6304
c4914de6
MLI
63052015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6306
6307 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
6308 when warning.
6309 * c-pragma.h (pragma_lex): Add optional loc argument.
6310
fcb87c50
MM
63112015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
6312
6313 * c-format.c (check_format_arg): Adjust to use common block size in all
6314 object pools.
6315
31bdd08a
DM
63162015-09-15 David Malcolm <dmalcolm@redhat.com>
6317
6318 * c-format.c (location_from_offset): Update for change in
6319 signature of location_get_source_line.
6320 * c-indentation.c (get_visual_column): Likewise.
6321 (line_contains_hash_if): Likewise.
6322
aa9f4b4c
MP
63232015-09-14 Marek Polacek <polacek@redhat.com>
6324
6325 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
6326 setting various warnings.
6327
aa256c4a
MP
63282015-09-14 Marek Polacek <polacek@redhat.com>
6329
6330 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
6331 a negative value.
6332
0f876f22
MW
63332015-09-11 Mark Wielaard <mjw@redhat.com>
6334
6335 PR c/28901
6336 * c.opt (Wunused-variable): Option from common.opt.
6337 (Wunused-const-variable): New option.
6338
273aa49e
PC
63392015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
6340
6341 PR c++/53184
6342 * c.opt ([Wsubobject-linkage]): Add.
6343
1807ffc1
MS
63442015-09-03 Martin Sebor <msebor@redhat.com>
6345
6346 PR c/66516
6347 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
6348 functions.
6349 * c-common.c (reject_gcc_builtin): Define.
6350
38942840
BI
63512015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
6352
6353 PR middle-end/60586
6354 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
6355 prototype.
6356 * c-gimplify.c (c_gimplify_expr): Added a call to the function
6357 cilk_gimplify_call_params_in_spawned_fn.
6358 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
6359 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
6360 unwrapping.
6361
c316b5e4
MP
63622015-08-25 Marek Polacek <polacek@redhat.com>
6363
6364 PR middle-end/67330
6365 * c-common.c (handle_weak_attribute): Don't check whether the
6366 visibility can be changed here.
6367
584a7c46
MLI
63682015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
6369
6370 * c-lex.c (c_lex_with_flags): Use explicit locations.
6371
a79683d5
TS
63722015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
6373
6374 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
6375 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
6376
61717a45
FXC
63772015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
6378
6379 PR middle-end/36757
6380 * c-common.c (check_builtin_function_arguments): Add check
6381 for BUILT_IN_SIGNBIT argument.
6382
329524f5
PC
63832015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
6384
6385 PR c++/67160
6386 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
6387 in c++1z mode.
6388
4ee55665
MP
63892015-08-17 Marek Polacek <polacek@redhat.com>
6390
6391 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
6392 with whitespaces before qualifier names.
6393
b893e375
MP
63942015-08-12 Marek Polacek <polacek@redhat.com>
6395
6396 PR c++/55095
6397 * c-common.c (maybe_warn_shift_overflow): Properly handle
6398 left-shifting 1 into the sign bit.
6399
c2d89095
MLI
64002015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6401
6402 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
6403
971e17ff
AS
64042015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
6405 Braden Obrzut <admin@maniacsvault.net>
6406 Jason Merrill <jason@redhat.com>
6407
6408 Add C++ Concepts TS support.
6409 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
6410 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
6411 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
6412 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
6413 * c-opts.c (set_std_cxx1z): Set flag_concepts.
6414 * c.opt (fconcepts): New.
6415
b3d5bc62
JJ
64162015-08-02 Martin Sebor <msebor@redhat.com>
6417
6418 * c.opt (-Wframe-address): New warning option.
6419
8ebca419
PP
64202015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6421
6422 * c-indentation.c (should_warn_for_misleading_indentation):
6423 Improve heuristics.
6424
1a1e101f
PP
64252015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6426
6427 * c-indentation.c (get_visual_column): Add parameter first_nws,
6428 use it. Update comment documenting the function.
6429 (is_first_nonwhitespace_on_line): Remove.
6430 (should_warn_for_misleading_indentation): Replace usage of
6431 of is_first_nonwhitespace_on_line with get_visual_column.
6432
992118a1
PP
64332015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6434
6435 * c-indentation.h (struct token_indent_info): Define.
6436 (get_token_indent_info): Define.
6437 (warn_for_misleading_information): Declare.
6438 * c-common.h (warn_for_misleading_information): Remove.
6439 * c-identation.c (warn_for_misleading_indentation):
6440 Change declaration to take three token_indent_infos. Adjust
6441 accordingly.
6442 * c-identation.c (should_warn_for_misleading_indentation):
6443 Likewise. Bail out early if the body is a compound statement.
6444 (guard_tinfo_to_string): Define.
6445
e8fa3817
JM
64462015-07-30 Jason Merrill <jason@redhat.com>
6447
6448 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
6449 '*' for reference decay.
6450
173864e8
MP
64512015-07-30 Marek Polacek <polacek@redhat.com>
6452
6453 * c-common.c (warn_tautological_cmp): Bail for float types.
6454
f2afe6dd
MP
64552015-07-27 Marek Polacek <polacek@redhat.com>
6456
6457 PR bootstrap/67030
6458 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
6459
05b28fd6
MP
64602015-07-27 Marek Polacek <polacek@redhat.com>
6461
6462 PR c++/66555
6463 PR c/54979
6464 * c-common.c (find_array_ref_with_const_idx_r): New function.
6465 (warn_tautological_cmp): New function.
6466 * c-common.h (warn_tautological_cmp): Declare.
6467 * c.opt (Wtautological-compare): New option.
6468
5a5062b8
MP
64692015-07-23 Marek Polacek <polacek@redhat.com>
6470
6471 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
6472 (ubsan_instrument_shift): Likewise.
6473
dc891fe7
MP
64742015-07-23 Marek Polacek <polacek@redhat.com>
6475
6476 PR sanitizer/66908
6477 * c-ubsan.c: Include gimplify.h.
6478 (ubsan_instrument_division): Unshare OP0 and OP1.
6479 (ubsan_instrument_shift): Likewise.
6480
451b5e48
MP
64812015-07-20 Marek Polacek <polacek@redhat.com>
6482 Richard Sandiford <richard.sandiford@arm.com>
6483
6484 PR c++/55095
6485 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
6486 Use EXPR_LOC_OR_LOC.
6487 (maybe_warn_shift_overflow): New function.
6488 * c-common.h (maybe_warn_shift_overflow): Declare.
6489 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
6490 * c.opt (Wshift-overflow): New option.
6491
fb0b2914
ML
64922015-07-16 Martin Liska <mliska@suse.cz>
6493
6494 * c-format.c (static void check_format_info_main): Use
6495 object_allocator instead of pool_allocator.
6496 (check_format_arg): Likewise.
6497 (check_format_info_main): Likewise.
6498
903f5c23
AM
64992015-07-15 Andrew MacLeod <amacleod@redhat.com>
6500
6501 * c-opts.c: Remove multiline #include comment.
6502
026c3cfd
AH
65032015-07-12 Aldy Hernandez <aldyh@redhat.com>
6504
6505 * c-common.c: Fix double word typos.
6506
bb49ee66
EB
65072015-07-10 Eric Botcazou <ebotcazou@adacore.com>
6508
6509 * c-ada-spec.h (cpp_operation): Revert latest change.
6510 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
6511 constructors and destructors.
6512
1916bcb5
AM
65132015-07-09 Andrew MacLeod <amacleod@redhat.com>
6514
6515 * c-common.h: Adjust includes for flags.h changes.
6516 * stub-objc.c: Likewise.
026c3cfd 6517
a9dcd529
EB
65182015-07-08 Eric Botcazou <ebotcazou@adacore.com>
6519
6520 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
6521 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
6522
b03b462f
JJ
65232015-07-08 Jakub Jelinek <jakub@redhat.com>
6524
6525 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
6526 are to be removed, return NULL rather than original clauses list.
6527
c7131fb2
AM
65282015-07-07 Andrew MacLeod <amacleod@redhat.com>
6529
6530 * array-notation-common.c: Adjust includes.
6531 * c-ada-spec.c: Likewise.
6532 * c-cilkplus.c: Likewise.
6533 * c-common.h: Likewise.
6534 * c-cppbuiltin.c: Likewise.
6535 * c-dump.c: Likewise.
6536 * c-format.c: Likewise.
6537 * c-gimplify.c: Likewise.
6538 * c-indentation.c: Likewise.
6539 * c-lex.c: Likewise.
6540 * c-omp.c: Likewise.
6541 * c-opts.c: Likewise.
6542 * c-pch.c: Likewise.
6543 * c-ppoutput.c: Likewise.
6544 * c-pragma.c: Likewise.
6545 * c-pretty-print.c: Likewise.
6546 * c-semantics.c: Likewise.
6547 * c-ubsan.c: Likewise.
6548 * cilk.c: Likewise.
6549 * stub-objc.c: Likewise.
6550
2a7fb83f
EB
65512015-07-07 Eric Botcazou <ebotcazou@adacore.com>
6552
6553 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
6554 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
6555
a03c9bf1
JM
65562015-07-01 Jason Merrill <jason@redhat.com>
6557
36a85135
JM
6558 * c-common.h (D_CXX11): Rename from D_CXX0X.
6559 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
6560 * c-common.c: Adjust.
6561
e7fa68d5
JM
6562 * c-opts.c (c_common_post_options): Default to C++14.
6563
a03c9bf1
JM
6564 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
6565
fe95b036
ESR
65662015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
6567
6568 Implement N4197 - Adding u8 character literals
b3d5bc62 6569 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 6570 CPP_CHAR.
b3d5bc62 6571 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 6572 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 6573 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
6574 and CPP_UTF8CHAR tokens.
6575 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 6576
da2e71c9
MLI
65772015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6578
6579 PR fortran/66605
6580 * c-common.c (do_warn_unused_parameter): Move here.
6581 * c-common.h (do_warn_unused_parameter): Declare.
6582
b155cfd9
MP
65832015-06-29 Marek Polacek <polacek@redhat.com>
6584
6585 PR c/66322
6586 * c-common.c (check_case_bounds): Add bool * parameter. Set
6587 OUTSIDE_RANGE_P.
6588 (c_add_case_label): Add bool * parameter. Pass it down to
6589 check_case_bounds.
6590 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
6591 warning here.
6592 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
6593 declarations.
6594
31521951
MP
65952015-06-27 Marek Polacek <polacek@redhat.com>
6596
6597 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
6598 or VECTOR_INTEGER_TYPE_P throughout.
6599 * c-gimplify.c: Likewise.
6600
22d03525
MP
66012015-06-26 Marek Polacek <polacek@redhat.com>
6602
6603 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
6604 * c-common.c (c_fully_fold_internal): Likewise.
6605 (c_alignof_expr): Likewise.
6606 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
6607 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 6608 * cilk.c (create_parm_list): Likewise.
22d03525 6609
af05e6e5
MP
66102015-06-26 Marek Polacek <polacek@redhat.com>
6611
6612 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
6613
f0889939
AM
66142015-06-25 Andrew MacLeod <amacleod@redhat.com>
6615
6616 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
6617 * c-gimplify.c: Likewise.
6618 * c-pragma.c: Likewise.
6619 * c-ubsan.c: Likewise.
6620 * cilk.c: Likewise.
6621
ca752f39
RS
66222015-06-25 Richard Sandiford <richard.sandiford@arm.com>
6623
6624 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
6625 ggc_hasher.
6626
16a16ec7
AM
66272015-06-25 Andrew MacLeod <amacleod@redhat.com>
6628
6629 * cilk.c: Move calls.h after tm.h in the include chain.
6630
0ae9bd27
MP
66312015-06-25 Marek Polacek <polacek@redhat.com>
6632
6633 * array-notation-common.c: Use VAR_P throughout.
6634 * c-ada-spec.c: Likewise.
6635 * c-common.c: Likewise.
6636 * c-format.c: Likewise.
6637 * c-gimplify.c: Likewise.
6638 * c-omp.c: Likewise.
6639 * c-pragma.c: Likewise.
6640 * c-pretty-print.c: Likewise.
6641 * cilk.c: Likewise.
6642
62f9079a
MP
66432015-06-25 Marek Polacek <polacek@redhat.com>
6644
6645 * cilk.c (extract_free_variables): Use is_global_var.
6646
0fa16060
RS
66472015-06-23 Richard Sandiford <richard.sandiford@arm.com>
6648
6649 * c-common.c: Don't include target-def.h.
6650
a68ae2e1
MP
66512015-06-23 Marek Polacek <polacek@redhat.com>
6652
6653 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
6654 when comparing INTEGER_CSTs.
6655
c6a2f2d9
PMR
66562015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
6657
6658 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
6659 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
6660 (dump_ada_template): Skip partially specialized types.
6661
6b4db501
MM
66622015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
6663
6664 * c-common.c (scalar_to_vector): Use std::swap instead of manually
6665 swapping.
6666
abb226c9
AM
66672015-06-17 Andrew MacLeod <amacleod@redhat.com>
6668
6669 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
6670 * c-ada-spec.c: Likewise.
6671 * c-cilkplus.c: Likewise.
6672 * c-common.c: Likewise.
6673 * c-common.h: Likewise.
6674 * c-cppbuiltin.c: Likewise.
6675 * c-dump.c: Likewise.
6676 * c-format.c: Likewise.
6677 * c-gimplify.c: Likewise.
6678 * c-indentation.c: Likewise.
6679 * c-lex.c: Likewise.
6680 * c-omp.c: Likewise.
6681 * c-opts.c: Likewise.
6682 * c-pch.c: Likewise.
6683 * c-ppoutput.c: Likewise.
6684 * c-pragma.c: Likewise.
6685 * c-pretty-print.c: Likewise.
6686 * c-semantics.c: Likewise.
6687 * c-ubsan.c: Likewise.
6688 * cilk.c: Likewise.
6689 * stub-objc.c: Likewise.
6690
076fecad
PP
66912015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
6692
6693 PR c++/65168
6694 * c-common.c (c_common_truthvalue_conversion): Warn when
6695 converting an address of a reference to a truth value.
6696
13fdf2e2
AM
66972015-06-08 Andrew MacLeod <amacleod@redhat.com>
6698
6699 * array-notation-common.c : Adjust include files.
6700 * c-ada-spec.c : Likewise.
6701 * c-cilkplus.c : Likewise.
6702 * c-common.c : Likewise.
6703 * c-common.h : Likewise.
6704 * c-cppbuiltin.c : Likewise.
6705 * c-dump.c : Likewise.
6706 * c-format.c : Likewise.
6707 * c-gimplify.c : Likewise.
6708 * c-indentation.c : Likewise.
6709 * c-lex.c : Likewise.
6710 * c-omp.c : Likewise.
6711 * c-opts.c : Likewise.
6712 * c-pch.c : Likewise.
6713 * c-ppoutput.c : Likewise.
6714 * c-pragma.c : Likewise.
6715 * c-pretty-print.c : Likewise.
6716 * c-semantics.c : Likewise.
6717 * c-ubsan.c : Likewise.
6718 * cilk.c : Likewise.
6719 * stub-objc.c : Likewise.
6720
a1661b90
MP
67212015-06-08 Marek Polacek <polacek@redhat.com>
6722
6723 PR c/66415
6724 * c-format.c (location_from_offset): Return LOC if LINE is null.
6725
d7438551
AH
67262015-06-05 Aldy Hernandez <aldyh@redhat.com>
6727
6728 * c-common.h (c_parse_final_cleanups): New prototype.
6729 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
6730
b3d5bc62
JJ
67312015-06-04 Sriraman Tallam <tmsriram@google.com>
6732
6733 * c-common.c (noplt): New attribute.
6734 (handle_noplt_attribute): New handler.
6735
ecb9f223
AM
67362015-06-04 Andrew MacLeod <amacleod@redhat.com>
6737
6738 * array-notation-common.c: Adjust includes for restructured coretypes.h.
6739 * c-ada-spec.c: Likewise.
6740 * c-cilkplus.c: Likewise.
6741 * c-common.c: Likewise.
6742 * c-common.h: Likewise.
6743 * c-cppbuiltin.c: Likewise.
6744 * c-dump.c: Likewise.
6745 * c-format.c: Likewise.
6746 * c-gimplify.c: Likewise.
6747 * c-indentation.c: Likewise.
6748 * c-lex.c: Likewise.
6749 * c-omp.c: Likewise.
6750 * c-opts.c: Likewise.
6751 * c-pch.c: Likewise.
6752 * c-ppoutput.c: Likewise.
6753 * c-pragma.c: Likewise.
6754 * c-pretty-print.c: Likewise.
6755 * c-semantics.c: Likewise.
6756 * c-ubsan.c: Likewise.
6757 * cilk.c: Likewise.
6758 * stub-objc.c: Likewise.
6759
6ac48155
DM
67602015-06-02 David Malcolm <dmalcolm@redhat.com>
6761
6762 PR c/66220:
6763 * c-indentation.c (should_warn_for_misleading_indentation): Use
6764 expand_location rather than expand_location_to_spelling_point.
6765 Don't warn if the guarding statement is more indented than the
6766 next/body stmts.
6767
773ce42e
DM
67682015-06-02 David Malcolm <dmalcolm@redhat.com>
6769
6770 * c-indentation.c (warn_for_misleading_indentation): Bail out
6771 immediately if -Wmisleading-indentation isn't enabled.
6772
4fef8379
ML
67732015-06-01 Martin Liska <mliska@suse.cz>
6774
6775 * c-format.c (check_format_arg):Use new type-based pool allocator.
6776 (check_format_info_main) Likewise.
6777
1edfb384
EB
67782015-05-31 Eric Botcazou <ebotcazou@adacore.com>
6779
6780 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
6781 (has_nontrivial_methods): Likewise.
6782
9677ef52
MP
67832015-05-25 Marek Polacek <polacek@redhat.com>
6784
6785 * c-ubsan.c (ubsan_instrument_shift): Use type0.
6786
fd5c817a
MP
67872015-05-22 Marek Polacek <polacek@redhat.com>
6788
6789 PR c/47043
6790 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
6791
a2f45fe6 67922015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
6793
6794 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
6795 STACK_GROWS_DOWNWARD.
6796
a2f45fe6 67972015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
6798
6799 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
6800 STACK_GROWS_DOWNWARD rather than if it is defined.
6801
0fee2ac2 68022015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 6803
0fee2ac2
MLI
6804 PR c/52952
6805 * c-format.c (location_column_from_byte_offset): New.
6806 (location_from_offset): New.
6807 (struct format_wanted_type): Add offset_loc field.
6808 (check_format_info): Move handling of location for extra arguments
6809 closer to the point of warning.
6810 (check_format_info_main): Pass the result of location_from_offset
6811 to warning_at.
6812 (format_type_warning): Pass the result of location_from_offset
6813 to warning_at.
6814
cf4ef6f7
MP
68152015-05-20 Marek Polacek <polacek@redhat.com>
6816
6817 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
6818
3a65ee74
MP
68192015-05-20 Marek Polacek <polacek@redhat.com>
6820
6821 * c-ada-spec.c (dump_sloc): Use DECL_P.
6822
21b634ae
MP
68232015-05-20 Marek Polacek <polacek@redhat.com>
6824
6825 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
6826 * c-common.c: Likewise.
6827
0e50b624
DM
68282015-05-19 David Malcolm <dmalcolm@redhat.com>
6829
6830 * c-common.h (fe_file_change): Strengthen param from
6831 const line_map * to const line_map_ordinary *.
6832 (pp_file_change): Likewise.
6833 * c-lex.c (fe_file_change): Likewise.
6834 (cb_define): Use linemap_check_ordinary when invoking
6835 SOURCE_LINE.
6836 (cb_undef): Likewise.
6837 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
6838 invoking cb_file_change.
6839 (c_finish_options): Likewise.
6840 (push_command_line_include): Likewise.
6841 (cb_file_change): Strengthen param "new_map" from
6842 const line_map * to const line_map_ordinary *.
6843 * c-ppoutput.c (cb_define): Likewise for local "map".
6844 (pp_file_change): Likewise for param "map" and local "from".
6845
fab27f52
MM
68462015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
6847
6848 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
6849
2fe1d762
TV
68502015-05-18 Tom de Vries <tom@codesourcery.com>
6851
6852 * c-common.c (build_va_arg_1): New function.
6853 (build_va_arg): Add address operator to va_list operand if necessary.
6854
7a37fa90
MM
68552015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
6856
6857 PR c/48956
6858 * c-common.c (int_safely_convertible_to_real_p): Define.
6859 (unsafe_conversion_p): Check conversions involving complex types.
6860 (conversion_warning): Add new warning message for conversions which
6861 discard imaginary component.
6862 * c-common.h: (enum conversion_safety): Add new enumerator for such
6863 conversions.
6864
3aa3c9fc
MP
68652015-05-14 Marek Polacek <polacek@redhat.com>
6866
6867 PR c/66066
6868 PR c/66127
6869 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
6870 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
6871 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
6872 use it. If FOR_INT_CONST, require that all evaluated operands be
6873 INTEGER_CSTs.
6874
c3388e62
DM
68752015-05-12 David Malcolm <dmalcolm@redhat.com>
6876
6877 * c-common.h (warn_for_misleading_indentation): New prototype.
6878 * c-indentation.c: New file.
6879 * c.opt (Wmisleading-indentation): New option.
6880
c7b38fd5
TV
68812015-05-12 Tom de Vries <tom@codesourcery.com>
6882
6883 PR tree-optimization/66010
6884 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
6885
381bf11e
JM
68862015-05-09 Jason Merrill <jason@redhat.com>
6887
edff0c06
JM
6888 * c-opts.c (c_common_post_options): Also clear
6889 cpp_opts->cpp_warn_cxx11_compat.
6890
129211bc
JM
6891 * c-common.h (enum cxx_dialect): Add cxx_unset.
6892 * c-common.c (cxx_dialect): Initialize to cxx_unset.
6893 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
6894
381bf11e
JM
6895 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
6896 (std=gnu++0x): Mark as Undocumented.
6897 (std=gnu++1y): Add deprecated message.
6898
fe191308
JM
68992015-05-08 Jason Merrill <jason@redhat.com>
6900
765189ff
JM
6901 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
6902 * c-opts.c: Adjust.
6903
fe191308
JM
6904 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
6905
755e528f
MP
69062015-05-08 Marek Polacek <polacek@redhat.com>
6907
6908 PR c/64918
6909 * c.opt (Woverride-init-side-effects): New option.
6910
0173bd2a
MP
69112015-05-07 Marek Polacek <polacek@redhat.com>
6912
6913 PR c/65179
6914 * c-common.c (c_fully_fold_internal): Warn when left shifting a
6915 negative value.
6916 * c.opt (Wshift-negative-value): New option.
6917 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
6918 when -Wextra and C99/C++11 mode.
6919
e0f0d3b9
MP
69202015-05-07 Marek Polacek <polacek@redhat.com>
6921 Martin Uecker <uecker@eecs.berkeley.edu>
6922
6923 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
6924 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
6925
8243e2a9
JM
69262015-05-05 Jason Merrill <jason@redhat.com>
6927
6928 * c.opt (Wterminate): New.
6929
577cd070
MP
69302015-04-30 Marek Polacek <polacek@redhat.com>
6931
6932 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
6933 require that the non-constant be of a boolean type.
6934
0373796b
JT
69352015-04-29 Josh Triplett <josh@joshtriplett.org>
6936
e0f0d3b9
MP
6937 * c-common.c (handle_section_attribute): Refactor to reduce
6938 nesting and distinguish between error cases.
0373796b 6939
716c0ba6
MP
69402015-04-29 Marek Polacek <polacek@redhat.com>
6941
6942 PR c/64610
6943 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
6944 with 0/1.
6945
8848828b
JJ
69462015-04-29 Jakub Jelinek <jakub@redhat.com>
6947
6948 * c-common.h (omp_clause_mask): Unconditionally define as a class.
6949 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
6950 HOST_BITS_PER_WIDE_INT.
6951
ecd0e562
TV
69522015-04-28 Tom de Vries <tom@codesourcery.com>
6953
6954 PR tree-optimization/65887
6955 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
6956
2a877204 69572015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 6958 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
6959
6960 * c-ada-spec.c (in_function): Delete.
6961 (dump_generic_ada_node): Do not change in_function and remove the
6962 redundant code dealing with it.
6963 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
6964 (print_ada_methods): Output the static member functions in a nested
6965 package after the regular methods as well as associated renamings.
6966
4853031e
MP
69672015-04-24 Marek Polacek <polacek@redhat.com>
6968
6969 PR c/65830
6970 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
6971 and OPT_Wshift_count_overflow.
6972
8c2b7f79
MP
6973 PR c/63357
6974 * c-common.c (warn_logical_operator): Warn if the operands have the
6975 same expressions.
6976
b8787813
MP
69772015-04-24 Marek Polacek <polacek@redhat.com>
6978
6979 PR c/61534
6980 * c-common.c (warn_logical_operator): Bail if either operand comes
6981 from a macro expansion.
6982
8fba1830
BRF
69832015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
6984
6985 PR target/55143
6986 * c-common.c (c_default_pointer_mode): Add definition.
6987 * c-common.h (c_default_pointer_mode): Add declaration.
6988
17958621
JJ
69892015-03-11 Jakub Jelinek <jakub@redhat.com>
6990
6991 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
6992 on record_builtin_type argument.
6993
7ccb1a11
JJ
69942015-03-10 Jakub Jelinek <jakub@redhat.com>
6995
6996 PR c/65120
6997 * c-common.c (warn_logical_not_parentheses): Don't warn for
6998 !x == 0 or !x != 0.
6999
04fd785e
MP
70002015-03-07 Marek Polacek <polacek@redhat.com>
7001
7002 PR sanitizer/65280
7003 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
7004 before trying to figure out whether we have a flexible array member.
7005
a4e26206 70062015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 7007 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
7008
7009 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
7010
0d2489f4
EB
70112015-03-05 Eric Botcazou <ebotcazou@adacore.com>
7012
7013 PR ada/65319
7014 * c-ada-spec.c (print_destructor): Remove obsolete code.
7015
83ed54d7
EB
70162015-03-01 Eric Botcazou <ebotcazou@adacore.com>
7017
7018 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
7019 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
7020 DECL_TEMPLATE_RESULT emulations.
7021 (dump_ada_template)): Add guard for TYPE_METHODS.
7022
7631f0e2
MP
70232015-02-27 Marek Polacek <polacek@redhat.com>
7024
7025 PR c/65040
7026 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
7027
d1783ae5
KT
70282015-02-27 Kai Tietz <ktietz@redhat.com>
7029
7030 PR c/35330
7031 * c-pragma.c (handle_pragma_weak): Do not try to create
7032 weak/alias of declarations not being function, or variable
7033 declarations.
7034
56a9f6bc
TS
70352015-02-24 Thomas Schwinge <thomas@codesourcery.com>
7036
7037 PR libgomp/64625
7038 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
7039 Remove macros.
7040 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
7041
3d5cb23d
MP
70422015-02-16 Marek Polacek <polacek@redhat.com>
7043
7044 PR c/65066
7045 * c-format.c (check_format_types): Handle null param.
7046
fa008882
MP
70472015-02-13 Marek Polacek <polacek@redhat.com>
7048
7049 PR c/65040
7050 * c-format.c (check_format_types): Don't warn about different
7051 signedness if the original value is in the range of WANTED_TYPE.
7052
785f21af
JM
70532015-02-12 Jason Merrill <jason@redhat.com>
7054
7055 PR c++/64956
7056 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
7057 to the current highest version.
7058 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
7059
4886ec8e
JJ
70602015-02-04 Jakub Jelinek <jakub@redhat.com>
7061
7062 PR c/64824
7063 PR c/64868
7064 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
7065 instead of RDIV_EXPR. Use build_binary_op instead of
7066 build2_loc.
7067
40fecdd6
JM
70682015-01-30 Joseph Myers <joseph@codesourcery.com>
7069
7070 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
7071 to pass input_location as first argument.
7072
a0c88d06
TV
70732015-01-23 Tom de Vries <tom@codesourcery.com>
7074
7075 PR libgomp/64672
7076 * c.opt (fopenacc): Mark as LTO option.
7077
1506ae0e
TV
70782015-01-23 Tom de Vries <tom@codesourcery.com>
7079
7080 PR libgomp/64707
7081 * c.opt (fopenmp): Mark as LTO option.
7082
31be63ab
JJ
70832015-01-21 Jakub Jelinek <jakub@redhat.com>
7084
7085 PR c/63307
b1726d6c 7086 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
7087 (compare_decls): Fix up formatting.
7088
70892015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
7090
7091 PR c/63307
7092 * cilk.c: Include vec.h.
7093 (struct cilk_decls): New structure.
7094 (wrapper_parm_cb): Split this function to...
7095 (fill_decls_vec): ...this...
7096 (create_parm_list): ...and this.
7097 (compare_decls): New function.
7098 (for_local_cb): Remove.
7099 (wrapper_local_cb): Ditto.
7100 (build_wrapper_type): For now first traverse and fill vector of
7101 declarations then sort it and then deal with sorted vector.
7102 (cilk_outline): Ditto.
7103 (declare_one_free_variable): Ditto.
7104
6875457f
JM
71052015-01-21 Jason Merrill <jason@redhat.com>
7106
7107 PR c++/64629
7108 * c-format.c (check_format_arg): Call decl_constant_value.
7109
185c9e56
ML
71102015-01-19 Martin Liska <mliska@suse.cz>
7111
7112 * c-common.c (handle_noicf_attribute): New function.
7113
41dbbb37
TS
71142015-01-15 Thomas Schwinge <thomas@codesourcery.com>
7115 Bernd Schmidt <bernds@codesourcery.com>
7116 James Norris <jnorris@codesourcery.com>
7117 Cesar Philippidis <cesar@codesourcery.com>
7118 Ilmir Usmanov <i.usmanov@samsung.com>
7119 Jakub Jelinek <jakub@redhat.com>
7120
7121 * c.opt (fopenacc): New option.
7122 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
7123 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
7124 New macros.
7125 * c-common.h (c_finish_oacc_wait): New prototype.
7126 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
7127 (c_finish_oacc_wait): New function.
7128 * c-pragma.c (oacc_pragmas): New variable.
7129 (c_pp_lookup_pragma, init_pragma): Handle it.
7130 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
7131 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
7132 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
7133 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
7134 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
7135 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
7136 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
7137 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
7138 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
7139 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
7140 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
7141 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
7142 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
7143 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
7144 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
7145 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
7146 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
7147 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
7148 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
7149 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
7150 PRAGMA_OACC_CLAUSE_WORKER.
7151
3f8257db 71522015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
7153
7154 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
7155 for the new option fstack-protector_explicit.
7156 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
7157 (handle_stack_protect_attribute): New function.
7158
3f8257db 71592015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
7160
7161 * c.opt: New option -Warray-bounds=.
7162
adfac8df
JJ
71632015-01-09 Michael Collison <michael.collison@linaro.org>
7164
7165 * array-notation-common.c: Include hash-set.h, machmode.h,
7166 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7167 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
7168 * c-ada-spec.c: Ditto.
7169 * c-cilkplus.c: Ditto.
7170 * c-common.c: Include input.h due to flattening of tree.h.
7171 Define macro GCC_C_COMMON_C.
7172 * c-common.h: Flatten tree.h header files into c-common.h.
7173 Remove include of tree-core.h.
7174 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
7175 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7176 fold-const.h, wide-int.h, and inchash.h due to
7177 flattening of tree.h.
7178 * c-dump.c: Ditto.
7179 * c-format.c: Flatten tree.h header files into c-common.h.
7180 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
7181 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7182 fold-const.h, wide-int.h, and inchash.h due to
7183 flattening of tree.h.
7184 * c-dump.c: Include hash-set.h, machmode.h,
7185 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7186 fold-const.h, wide-int.h, and inchash.h due to
7187 flattening of tree.h.
7188 * c-format.c: Include hash-set.h, machmode.h,
7189 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7190 fold-const.h, wide-int.h, inchash.h and real.h due to
7191 flattening of tree.h.
7192 * c-gimplify.c: Include hash-set.h, machmode.h,
7193 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7194 fold-const.h, wide-int.h, and inchash.h due to
7195 flattening of tree.h.
7196 * cilk.c: Ditto.
7197 * c-lex.c: Ditto.
7198 * c-omp.c: Ditto.
7199 * c-opts.c: Ditto.
7200 * c-pch.c: Ditto.
7201 * c-ppoutput.c: Ditto.
7202 * c-pragma.c: Ditto.
7203 * c-pretty-print.c: Ditto.
7204 * c-semantics.c: Ditto.
7205 * c-ubsan.c: Ditto.
7206 * stub-objc.c: Ditto.
7207
f5481fc4
JM
72082015-01-08 Jason Merrill <jason@redhat.com>
7209
7210 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
7211 do_ubsan_in_current_function.
7212 (ubsan_maybe_instrument_reference_or_call): Likewise.
7213 * c-ubsan.h: Declare it.
7214
de35aa66
MS
72152015-01-08 Mike Stump <mikestump@comcast.net>
7216
7217 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
7218
4a9a42ab
MP
72192015-01-07 Marek Polacek <polacek@redhat.com>
7220
7221 PR c/64440
7222 * c-common.c (c_fully_fold_internal): Warn for division and modulo
7223 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
7224
2f42e5de
TS
72252015-01-05 Trevor Saunders <tsaunders@mozilla.com>
7226
7227 PR c++/31397
7228 * c.opt (Wsuggest-override): New option.
7229
5624e564
JJ
72302015-01-05 Jakub Jelinek <jakub@redhat.com>
7231
7232 Update copyright years.
7233
5bd012f8
MP
72342015-01-05 Marek Polacek <polacek@redhat.com>
7235
7236 PR c/64423
7237 * c-common.c (warn_array_subscript_with_type_char): Add location_t
7238 parameter. Use it.
7239 * c-common.h (warn_array_subscript_with_type_char): Update
7240 declaration.
7241
a7fa8d18
ESR
72422014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
7243
7244 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
7245 Control macro with flag_sized_deallocation.
7246
3f8257db 72472014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
7248
7249 * c.opt (Wdiscarded-array-qualifiers): New option.
7250
1f8d3e84
JJ
72512014-12-19 Jakub Jelinek <jakub@redhat.com>
7252
7253 PR preprocessor/63831
7254 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
7255 and __has_cpp_attribute here.
7256 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
7257 c_common_has_attribute.
7258 * c-common.h (c_common_has_attribute): New prototype.
7259 * c-lex.c (init_c_lex): Set cb->has_attribute to
7260 c_common_has_attribute instead of cb_has_attribute.
7261 (get_token_no_padding): New function.
7262 (cb_has_attribute): Renamed to ...
7263 (c_common_has_attribute): ... this. No longer static. Use
7264 get_token_no_padding, require ()s, don't build TREE_LIST
7265 unnecessarily, fix up formatting, adjust diagnostics, call
7266 init_attributes.
7267
20b06add
JM
72682014-12-15 Jason Merrill <jason@redhat.com>
7269
7270 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
7271 (-Wsized-deallocation): New.
7272 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
7273 to on in C++14 and up.
7274
94a073b2
JM
72752014-12-11 Jason Merrill <jason@redhat.com>
7276
acaa5911
JM
7277 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
7278
94a073b2
JM
7279 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
7280 we aren't complaining about VLAs.
7281
7fb66c15
MP
72822014-12-06 Marek Polacek <polacek@redhat.com>
7283
7284 PR tree-optimization/64183
7285 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
7286 shift-expression if it is integer_type_node. Use types_compatible_p.
7287
b731b390
JJ
72882014-11-29 Jakub Jelinek <jakub@redhat.com>
7289
7290 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
7291 last argument from create_tmp_var_raw and create_tmp_var calls.
7292 * cilk.c (gimplify_cilk_spawn): Likewise.
7293 * c-omp.c (c_finish_omp_atomic): Likewise.
7294
6a4da643
MP
72952014-11-28 Marek Polacek <polacek@redhat.com>
7296
7297 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
7298 instead of unsigned_type_node.
7299
541e35a6
MP
73002014-11-28 Marek Polacek <polacek@redhat.com>
7301
7302 PR c/63862
7303 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
7304 to op1_utype.
7305 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
7306 expression to unsigned_type_node.
7307
dcc97066
MW
73082014-11-20 Mark Wielaard <mjw@redhat.com>
7309
7310 PR debug/38757
7311 * c-opts.c (set_std_c89): Set lang_hooks.name.
7312 (set_std_c99): Likewise.
7313 (set_std_c11): Likewise.
7314 (set_std_cxx98): Likewise.
7315 (set_std_cxx11): Likewise.
7316 (set_std_cxx14): Likewise.
7317 (set_std_cxx1z): Likewise.
7318
aa7da51a
JJ
73192014-11-21 Jakub Jelinek <jakub@redhat.com>
7320
7321 PR target/63764
7322 * c-common.h (convert_vector_to_pointer_for_subscript): Change
7323 return type to bool.
009a3480 7324 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
7325 (convert_vector_to_pointer_for_subscript): Change return type to
7326 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
7327 and copy it into a TARGET_EXPR and use that instead of *vecp
7328 directly.
7329
538dd0b7
DM
73302014-11-19 David Malcolm <dmalcolm@redhat.com>
7331
7332 Merger of git branch "gimple-classes-v2-option-3".
7333 * ChangeLog.gimple-classes: New.
7334 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
7335 from being just a vec<gimple> to a vec<gbind *>.
7336
c39a5e99
JJ
73372014-11-18 Jakub Jelinek <jakub@redhat.com>
7338
7339 PR sanitizer/63813
7340 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
7341 argument to ptype, set type to TREE_TYPE (ptype). Don't call
7342 get_pointer_alignment for non-pointers. Use ptype, or if it is
7343 reference type, corresponding pointer type, as type of kind
7344 argument.
7345 (ubsan_maybe_instrument_reference,
7346 ubsan_maybe_instrument_member_call): Adjust callers.
7347
8537a4a9
MP
73482014-11-15 Marek Polacek <polacek@redhat.com>
7349
7350 PR middle-end/63884
7351 * array-notation-common.c (is_sec_implicit_index_fn): Return false
7352 for NULL fndecl.
7353 (extract_array_notation_exprs): Return for NULL node.
7354
2079956a
JM
73552014-11-12 Joseph Myers <joseph@codesourcery.com>
7356
7357 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
7358 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
7359
1304953e
JJ
73602014-11-12 Jakub Jelinek <jakub@redhat.com>
7361
7362 PR c/59708
7363 * c-common.c (check_builtin_function_arguments): Handle
7364 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
7365
e5e44252
AK
73662014-11-10 Andi Kleen <ak@linux.intel.com>
7367
7368 PR c/60804
7369 * c-common.h (check_no_cilk): Declare.
7370 * cilk.c (get_error_location): New function.
7371 (check_no_cilk): Dito.
7372
e64b984d
AK
73732014-11-10 Andi Kleen <ak@linux.intel.com>
7374
7375 * cilk.c (recognize_spawn): Use expression location
7376 for error message.
7377
13c21655
PC
73782014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
7379
7380 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
7381
42fd12b1
ESR
73822014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
7383
7384 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
7385 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
7386 (__cpp_range_based_for, __cpp_initializer_lists,
7387 __cpp_delegating_constructors, __cpp_nsdmi,
7388 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
7389 for C++11; (__cpp_attribute_deprecated): Remove in favor of
7390 __has_cpp_attribute.
7391 * c-lex.c (cb_has_attribute): New callback CPP function;
7392 (init_c_lex): Set has_attribute callback.
7393
6f450181
RB
73942014-11-04 Richard Biener <rguenther@suse.de>
7395
7396 * c-common.c (shorten_compare): Do not shorten mixed
7397 DFP and non-DFP compares.
7398
26f0e1d6
ESR
73992014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
7400
7401 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
7402 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
7403 Commentary and rearrangement of tests.
7404 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
7405 Commentary and rearrangement of tests.
ab20d992 7406 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
26f0e1d6
ESR
7407 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
7408
ef4bddc2
RS
74092014-10-29 Richard Sandiford <richard.sandiford@arm.com>
7410
7411 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
7412 enum from machine_mode.
7413
c582198b
AM
74142014-10-28 Andrew MacLeod <amacleod@redhat.com>
7415
adfac8df
JJ
7416 * c-common.c: Adjust include files.
7417 * c-gimplify.c: Ditto.
7418 * cilk.c: Ditto.
7419 * c-pragma.c: Ditto.
7420 * c-ubsan.c: Ditto.
c582198b 7421
60393bbc
AM
74222014-10-27 Andrew MacLeod <amacleod@redhat.com>
7423
7424 * c-gimplify.c: Adjust include files.
7425
d723bb7c
MLI
74262014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
7427
7428 PR c++/53061
7429 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
7430 c_common_initialize_diagnostics.
7431 * c-common.h: Likewise.
7432
90f3520e
MP
74332014-10-24 Marek Polacek <polacek@redhat.com>
7434
7435 PR c/56980
7436 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
7437 print "struct"/"union"/"enum" for typedefed names.
7438
59d7607a
MP
74392014-10-23 Marek Polacek <polacek@redhat.com>
7440
7441 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
7442 in unsigned type.
7443
d95a2703
JJ
74442014-10-22 Jakub Jelinek <jakub@redhat.com>
7445 Yury Gribov <y.gribov@samsung.com>
7446
7447 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
7448 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
7449 instead of flag_sanitize_recover as bool flag.
7450
8e6ef852
KY
74512014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
7452
7453 * cilk.c: Revert previous change.
7454
948cf550
IZ
74552014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
7456
7457 PR c/63307
7458 * cilk.c: Include vec.h.
7459 (struct cilk_decls): New structure.
7460 (wrapper_parm_cb): Split this function to...
7461 (fill_decls_vec): ...this...
7462 (create_parm_list): ...and this.
7463 (compare_decls): New function.
7464 (for_local_cb): Remove.
7465 (wrapper_local_cb): Ditto.
7466 (build_wrapper_type): For now first traverse and fill vector of
7467 declarations then sort it and then deal with sorted vector.
7468 (cilk_outline): Ditto.
7469 (declare_one_free_variable): Ditto.
7470
92574c7c
MP
74712014-10-17 Marek Polacek <polacek@redhat.com>
7472
7473 * c-opts.c (c_common_post_options): Set warn_implicit_int.
7474 * c.opt (Wimplicit-int): Initialize to -1.
7475
83685514
AM
74762014-10-16 Andrew MacLeod <amacleod@redhat.com>
7477
7478 * c-pragma.c: Adjust include files.
7479 * c-semantics.c: Likewise.
7480
5b8300ea
DD
74812014-10-16 DJ Delorie <dj@redhat.com>
7482
7483 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
7484 multiples of bytes.
7485
5f83e90b
JM
74862014-10-14 Jason Merrill <jason@redhat.com>
7487
7488 PR c++/63455
7489 * c-common.h (CPP_PREPARSED_EXPR): New.
7490 (N_CP_TTYPES): Adjust.
7491
d73326ca
MP
74922014-10-15 Marek Polacek <polacek@redhat.com>
7493
7494 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
7495
78a7c317
DD
74962014-10-14 DJ Delorie <dj@redhat.com>
7497
7498 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
7499 types, not just __int128.
7500 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
7501 types, not just __int128.
7502 (cpp_atomic_builtins): Round pointer sizes up.
7503 (type_suffix): Use type precision, not specific types.
7504 * c-common.c (c_common_reswords): Remove __int128 special case.
7505 (c_common_type_for_size): Check for all __intN types, not just
7506 __int128.
7507 (c_common_type_for_mode): Likewise.
7508 (c_common_signed_or_unsigned_type): Likewise.
7509 (c_build_bitfield_integer_type): Likewise.
7510 (c_common_nodes_and_builtins): Likewise.
7511 (keyword_begins_type_specifier): Likewise.
7512 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
7513 __intN variants.
7514
2a22f99c
TS
75152014-10-12 Trevor Saunders <tsaunders@mozilla.com>
7516
7517 * c-common.c: Use hash_table instead of hashtab.
7518
2a8ef767
ESR
75192014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
7520
adfac8df 7521 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
7522 C++11 section.
7523
3c9aabbd
MG
75242014-10-03 Marc Glisse <marc.glisse@inria.fr>
7525
7526 PR c++/54427
7527 PR c++/57198
7528 PR c++/58845
7529 * c-common.c (warn_logical_operator): Punt for vectors.
7530
a15f7cb8
ESR
75312014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
7532
7533 Implement SD-6: SG10 Feature Test Recommendations
7534 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
7535 macros and the __has_header macro.
7536
8d0cf15e
JM
75372014-09-30 Jason Merrill <jason@redhat.com>
7538
dd5d5481
JM
7539 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
7540 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
7541 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
7542
b752325e
JM
7543 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
7544 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
7545
8d0cf15e
JM
7546 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
7547 * c-common.c (c_common_reswords): Remove __is_convertible_to.
7548
083e891e
MP
75492014-09-24 Marek Polacek <polacek@redhat.com>
7550
7551 PR c/61405
7552 PR c/53874
7553 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
7554
7861b648
AK
75552014-09-23 Andi Kleen <ak@linux.intel.com>
7556
7557 * c-common.c (handle_no_reorder_attribute): New function.
7558 (c_common_attribute_table): Add no_reorder attribute.
7559
9a79452d
JM
75602014-09-22 Joseph Myers <joseph@codesourcery.com>
7561
7562 * c-cppbuiltin.c (c_cpp_builtins): Define
7563 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
7564 modes.
7565
dd69f047
JM
75662014-09-18 Joseph Myers <joseph@codesourcery.com>
7567
7568 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
7569 for supported floating-point modes.
7570
737a4826
MLI
75712014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
7572
7573 * c.opt (Wpsabi): Use LangEnabledBy.
7574 * c-opts.c (c_common_handle_option): Do not handle here.
7575
8cc4b7a2
JM
75762014-09-12 Joseph Myers <joseph@codesourcery.com>
7577
7578 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
7579 macros for floating-point modes.
7580
179b5a55
MG
75812014-09-11 Marc Glisse <marc.glisse@inria.fr>
7582
7583 PR target/58757
7584 * c-cppbuiltin.c (builtin_define_float_constants): Correct
7585 __*_DENORM_MIN__ without denormals.
7586
570a11fe
JJ
75872014-09-10 Jakub Jelinek <jakub@redhat.com>
7588
7589 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
7590 ubsan_instrument_vla, ubsan_instrument_return): Adjust
7591 ubsan_create_data callers.
7592 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
7593 index is constant or BIT_AND_EXPR with constant mask and is
7594 small enough for the bound.
7595 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
7596 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
7597
b559c810
MLI
75982014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7599
7600 * c.opt: Add CppReason to various flags.
7601 (Wdate-time): Re-sort.
7602 * c-common.c: Include c-common.h earlier.
7603 (struct reason_option_codes_t): Delete.
7604 (c_option_controlling_cpp_error): Prefix global type and struct
7605 with cpp_.
7606
1ef33fd4
MLI
76072014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7608
7609 * c.opt (Wnormalized): New.
7610 (Wnormalized=): Use Enum and Reject Negative.
7611 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
7612
66bb34c0
JM
76132014-09-08 Joseph Myers <joseph@codesourcery.com>
7614
7615 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
7616 digits of floating-point modes if -fbuilding-libgcc.
7617
53d68b9f
JM
76182014-09-05 Joseph Myers <joseph@codesourcery.com>
7619
7620 * c-cppbuiltin.c (c_cpp_builtins): Also define
7621 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
7622 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
7623 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
7624 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
7625 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
7626 __LIBGCC_STACK_GROWS_DOWNWARD__,
7627 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
7628 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
7629 __LIBGCC_DWARF_FRAME_REGISTERS__,
7630 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
7631 __LIBGCC_STACK_POINTER_REGNUM__ and
7632 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
7633 (builtin_define_with_value): Handle backslash-escaping in string
7634 macro values.
7635
f65586dc
RB
76362014-09-05 Richard Biener <rguenther@suse.de>
7637
7638 PR middle-end/63148
7639 * c-format.c (check_format_arg): Properly handle
7640 effectively signed POINTER_PLUS_EXPR offset.
7641
2b71f4a4
MLI
76422014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
7643
7644 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
7645 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
7646 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
7647 and Init.
7648 * c-opts.c (c_common_handle_option): Do not handle here.
7649 (sanitize_cpp_opts): Likewise.
7650 * c-common.c (struct reason_option_codes_t): Handle
7651 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
7652
d2e4feca
MP
76532014-09-03 Marek Polacek <polacek@redhat.com>
7654
7655 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
7656
9a771876
JJ
76572014-09-02 Jakub Jelinek <jakub@redhat.com>
7658 Balaji V. Iyer <balaji.v.iyer@intel.com>
7659 Igor Zamyatin <igor.zamyatin@intel.com>
7660
7661 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
7662 * c-common.c (c_common_reswords): Added _Cilk_for.
7663 * c-common.h (enum rid): Added RID_CILK_FOR.
7664 (cilk_for_number_of_iterations): Add declaration.
7665 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
7666 CILK_FOR.
7667 * c-pragma.c (init_pragma): Register "grainsize" pragma.
7668 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
7669
81b5d104
MLI
76702014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7671
7672 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
7673 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
7674 Wundef): Use CPP, Var and Init.
7675 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
7676
b753b37b
MLI
76772014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7678
7679 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
7680 * c-opts.c (c_common_handle_option): Do not handle here.
7681
028aee17
JM
76822014-08-25 Jason Merrill <jason@redhat.com>
7683
7684 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
7685 -std=c++14 and -std=gnu++14, rather than the reverse.
7686 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
7687 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
7688 * c-common.h (cxx_dialect): Remove cxx1y.
7689
e4276ba5
ESR
76902014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
7691
7692 * c-common.h (enum cxx_dialect): Add cxx14.
7693 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
7694 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
7695 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
7696
a545cacd
JM
76972014-08-22 Jason Merrill <jason@redhat.com>
7698
7699 * c.opt (std=gnu++17): Fix alias.
7700
59ea0364
MP
77012014-08-22 Marek Polacek <polacek@redhat.com>
7702
7703 PR c++/62199
7704 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
7705 check for vector types. Drop LHS argument.
7706 * c-common.h (warn_logical_not_parentheses): Adjust.
7707
596e808c
MLI
77082014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
7709
7710 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
7711 (Wmultichar): Likewise.
7712 (Wdate-time): Use C-family languages instead of Common. Use CPP
7713 and Var.
7714 * c-opts.c (c_common_handle_option): Do not handle the above
7715 options here.
7716 (sanitize_cpp_opts): Likewise.
7717
18767f65
MLI
77182014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
7719
7720 PR fortran/44054
7721 * c-opts.c: Include tree-diagnostics.h.
7722 (c_diagnostic_finalizer): New.
7723 (c_common_initialize_diagnostics): Use it.
7724
b4413594
MLI
77252014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
7726
7727 PR preprocessor/51303
7728 * c-common.c (struct reason_option_codes_t option_codes):
7729 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
7730
43f9a13c
MLI
77312014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
7732
7733 PR c/60975
7734 PR c/53063
7735 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
7736 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
7737 (c_common_post_options): Call init_global_opts_from_cpp.
7738 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
7739
04159acf
MP
77402014-08-19 Marek Polacek <polacek@redhat.com>
7741
7742 PR c++/62153
7743 * c-common.c (maybe_warn_bool_compare): New function.
7744 * c-common.h (maybe_warn_bool_compare): Declare.
7745 * c.opt (Wbool-compare): New option.
7746
35aff4fb
MP
77472014-08-19 Marek Polacek <polacek@redhat.com>
7748
7749 * c.opt (Wc99-c11-compat): New option.
7750
177cce46
MP
77512014-08-19 Marek Polacek <polacek@redhat.com>
7752
7753 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
7754 to warn_c90_c99_compat.
7755 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
7756 to -1.
7757
6ae9194f
MLI
77582014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
7759 Steven Bosscher <steven@gcc.gnu.org>
7760
7761 PR c/52952
7762 * c-format.c: Add extra_arg_loc and format_string_loc to struct
7763 format_check_results.
7764 (check_function_format): Use true and add comment for boolean
7765 argument.
7766 (finish_dollar_format_checking): Use explicit location when warning.
7767 (check_format_info): Likewise.
7768 (check_format_arg): Set extra_arg_loc and format_string_loc.
7769 (check_format_info_main): Use explicit location when warning.
7770 (check_format_types): Pass explicit location.
7771 (format_type_warning): Likewise.
7772
8e54f6d3
MLI
77732014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
7774
7775 PR fortran/44054
7776 * c-format.c: Handle Fortran flags.
7777
cd4e76fc
IZ
77782014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
7779
7780 PR other/61962
7781 * array-notation-common.c (find_rank): Added handling for other
7782 types of references.
7783
f3bede71
MP
77842014-08-10 Marek Polacek <polacek@redhat.com>
7785
7786 PR c/51849
7787 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
7788 * c.opt (Wc90-c99-compat): Add option.
7789
9f25a338
TS
77902014-08-07 Trevor Saunders <tsaunders@mozilla.com>
7791
7792 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
7793
62e4eb35
MP
77942014-08-03 Marek Polacek <polacek@redhat.com>
7795
ab20d992 7796 * c-common.c (check_case_value): Add location_t parameter. Use it.
62e4eb35
MP
7797 (c_add_case_label): Pass loc to check_case_value.
7798
b787e7a2
TS
77992014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7800
7801 * cilk.c: Use hash_map instead of pointer_map.
7802
6e2830c3
TS
78032014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7804
7805 * c-gimplify.c: Use hash_set instead of pointer_set.
7806
a7ee52fb
IZ
78072014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
7808
7809 PR middle-end/61455
7810 * array-notation-common.c (extract_array_notation_exprs): Handling
7811 of DECL_EXPR added.
7812
944fa280
JJ
78132014-08-01 Jakub Jelinek <jakub@redhat.com>
7814
7815 * c-common.h (min_align_of_type): Removed prototype.
7816 * c-common.c (min_align_of_type): Removed.
7817 * c-ubsan.h (ubsan_maybe_instrument_reference,
7818 ubsan_maybe_instrument_member_call): New prototypes.
7819 * c-ubsan.c: Include stor-layout.h and builtins.h.
7820 (ubsan_maybe_instrument_reference_or_call,
7821 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
7822 functions.
7823
b4dfdc11
MG
78242014-07-31 Marc Glisse <marc.glisse@inria.fr>
7825
7826 PR c++/60517
7827 * c.opt (-Wreturn-local-addr): Move to common.opt.
7828
a41844e5
JM
78292014-07-30 Jason Merrill <jason@redhat.com>
7830
7831 PR c++/61659
7832 PR c++/61687
7833 Revert:
7834 * c.opt (-fuse-all-virtuals): New.
7835
976d5a22
TT
78362014-07-30 Tom Tromey <tromey@redhat.com>
7837
7838 PR c/59855
7839 * c.opt (Wdesignated-init): New option.
7840 * c-common.c (c_common_attribute_table): Add "designated_init".
7841 (handle_designated_init): New function.
7842
cdc94aca
MP
78432014-07-24 Marek Polacek <polacek@redhat.com>
7844
7845 PR c/57653
7846 * c-opts.c (c_finish_options): If -imacros is in effect, return.
7847
f41373b6
DS
78482014-07-16 Dodji Seketeli <dodji@redhat.com>
7849
7850 PR preprocessor/60723 - missing system-ness marks for macro tokens
7851 * c-ppoutput.c (struct print::prev_was_system_token): New data
7852 member.
7853 (init_pp_output): Initialize it.
7854 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
7855 (do_line_change): Return a flag saying if a line marker was
7856 emitted or not.
7857 (scan_translation_unit): Detect if the system-ness of the token we
7858 are about to emit is different from the one of the previously
7859 emitted token. If so, emit a line marker. Avoid emitting useless
7860 adjacent line markers. Avoid emitting line markers for tokens
7861 originating from the expansion of built-in macros.
7862 (scan_translation_unit_directives_only): Adjust.
7863
4d661eaa
MP
78642014-07-15 Marek Polacek <polacek@redhat.com>
7865
7866 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
7867 TYPE_MAX_VALUE is NULL.
7868
b108f48f
JJ
78692014-07-14 Jakub Jelinek <jakub@redhat.com>
7870
7871 PR middle-end/61294
7872 * c.opt (Wmemset-transposed-args): New warning.
7873
c0221884
JM
78742014-07-10 Jason Merrill <jason@redhat.com>
7875
7876 PR c++/61659
7877 PR c++/61687
7878 * c.opt (-fuse-all-virtuals): New.
7879
63dfbb95
RB
78802014-07-09 Richard Biener <rguenther@suse.de>
7881
7882 PR c-family/61741
7883 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
7884 using unsigned arithmetic if overflow does not wrap instead of
7885 if overflow is undefined.
7886
773ec47f
MP
78872014-07-06 Marek Polacek <polacek@redhat.com>
7888
7889 PR c/6940
7890 * c.opt (Wsizeof-array-argument): New option.
7891
00a7ba58
JJ
78922014-07-03 Jakub Jelinek <jakub@redhat.com>
7893
b1726d6c 7894 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
7895 comments->count <= 1, as comments->entries might be NULL.
7896
52ec0ea3
MP
78972014-07-01 Marek Polacek <polacek@redhat.com>
7898
7899 * c.opt (Wint-conversion): New option.
7900
d5c3d343
MP
79012014-07-01 Marek Polacek <polacek@redhat.com>
7902
7903 PR c/58286
7904 * c.opt (Wincompatible-pointer-types): New option.
7905
6e7ceb17
PC
79062014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
7907
7908 PR c++/51400
7909 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
7910 Do not discard TYPE_QUALS of type.
7911
da73100b
JM
79122014-06-26 Jason Merrill <jason@redhat.com>
7913
7914 * c-common.h (enum cxx_dialect): Add cxx1z.
7915 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
7916 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
7917
08eedf75
TJ
79182014-06-26 Teresa Johnson <tejohnson@google.com>
7919
7920 * c-common.h (get_dump_info): Declare.
7921 * c-gimplify.c (c_genericize): Use saved dump files.
7922 * c-opts.c (c_common_parse_file): Begin and end dumps
7923 once around parsing invocation.
7924 (get_dump_info): New function.
7925
7b56b2f8
MP
79262014-06-23 Marek Polacek <polacek@redhat.com>
7927 Andrew MacLeod <amacleod@redhat.com>
7928
7929 PR c/61553
7930 * c-common.c (get_atomic_generic_size): Don't segfault if the
7931 type doesn't have a size.
7932
0e37a2f3
MP
79332014-06-20 Marek Polacek <polacek@redhat.com>
7934
7935 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
7936 (ubsan_walk_array_refs_r): New function.
7937 (c_genericize): Instrument array bounds.
7938 * c-ubsan.c: Include "internal-fn.h".
7939 (ubsan_instrument_division): Mark instrumented arrays as having
7940 side effects. Adjust ubsan_type_descriptor call.
7941 (ubsan_instrument_shift): Likewise.
7942 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
7943 (ubsan_instrument_bounds): New function.
7944 (ubsan_array_ref_instrumented_p): New function.
7945 (ubsan_maybe_instrument_array_ref): New function.
7946 * c-ubsan.h (ubsan_instrument_bounds): Declare.
7947 (ubsan_array_ref_instrumented_p): Declare.
7948 (ubsan_maybe_instrument_array_ref): Declare.
7949
79502014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
7951
7952 PR lto/61123
7953 * c.opt (fshort-enums): Add to LTO.
7954 * c.opt (fshort-wchar): Likewise.
7955
5c3d09f7
MP
79562014-06-16 Marek Polacek <polacek@redhat.com>
7957
7958 PR c/60439
7959 * c.opt (Wswitch-bool): Add Var.
7960
9cf32741
JJ
79612014-06-12 Jakub Jelinek <jakub@redhat.com>
7962
7963 PR middle-end/61486
7964 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
7965 #pragma omp target teams or
7966 #pragma omp {,target }teams distribute simd.
7967
62984918
JM
79682014-06-12 Jason Merrill <jason@redhat.com>
7969
7970 * c.opt (Wabi=, fabi-compat-version): New.
7971 * c-opts.c (c_common_handle_option): Handle -Wabi=.
7972 (c_common_post_options): Handle flag_abi_compat_version default.
7973 Disallow -fabi-compat-version=1.
7974 * c-common.h (abi_version_crosses): New.
7975
f961457f
JH
79762014-06-11 Jan Hubicka <hubicka@ucw.cz>
7977
adfac8df 7978 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
7979 section names that are no longer trees.
7980
92d28cbb
JJ
79812014-06-10 Jakub Jelinek <jakub@redhat.com>
7982
7983 PR fortran/60928
7984 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
7985 (omp_pragmas): ... back here.
7986
742938c9
MP
79872014-06-05 Marek Polacek <polacek@redhat.com>
7988
7989 PR c/49706
7990 * c-common.c (warn_logical_not_parentheses): New function.
7991 * c-common.h (warn_logical_not_parentheses): Declare.
7992 * c.opt (Wlogical-not-parentheses): New option.
7993
9d548dfb
MP
79942014-06-04 Marek Polacek <polacek@redhat.com>
7995
7996 PR c/30020
7997 * c-common.c (check_case_bounds): Add location parameter.
7998 Use it.
7999 (c_add_case_label): Pass loc to check_case_bounds.
8000
fedfecef
MP
80012014-06-03 Marek Polacek <polacek@redhat.com>
8002
8003 PR c/60439
8004 * c.opt (Wswitch-bool): New option.
8005
f6a7cffc
TS
80062014-05-22 Thomas Schwinge <thomas@codesourcery.com>
8007
040d18b6
TS
8008 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
8009 Remove prototypes.
8010 (record_types_used_by_current_var_decl): Move prototype to where
8011 it belongs.
8012
f6a7cffc
TS
8013 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
8014 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
8015 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
8016
632f2871
RS
80172014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
8018
8019 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
8020 * c-common.c (c_common_nodes_and_builtins): Don't initialize
8021 void_zero_node.
8022 * c-pretty-print.c (pp_c_void_constant): New function.
8023 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
8024 (c_pretty_printer::expression): Handle VOID_CST.
8025 * cilk.c (extract_free_variables): Likewise.
8026 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
8027 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
8028
766090c2
TS
80292014-05-17 Trevor Saunders <tsaunders@mozilla.com>
8030
8031 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
8032 * c-pragma.c (push_alignment): Adjust.
8033 (handle_pragma_push_options): Likewise.
8034
661a0813
MP
80352014-05-09 Marek Polacek <polacek@redhat.com>
8036
8037 PR c/50459
8038 * c-common.c (check_user_alignment): Return -1 if alignment is error
8039 node.
8040 (handle_aligned_attribute): Don't call default_conversion on
8041 FUNCTION_DECLs.
8042 (handle_vector_size_attribute): Likewise.
8043 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
8044 (handle_sentinel_attribute): Call default_conversion and allow even
8045 integral types as an argument.
8046
2793eeab
MP
80472014-05-08 Marek Polacek <polacek@redhat.com>
8048
8049 PR c/61053
8050 * c-common.c (min_align_of_type): New function factored out from...
8051 (c_sizeof_or_alignof_type): ...here.
8052 * c-common.h (min_align_of_type): Declare.
8053
f827930a
MP
80542014-05-08 Marek Polacek <polacek@redhat.com>
8055
8056 PR c/61077
8057 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
8058 parameter type of main.
8059
ca49b74e
DD
80602014-05-07 DJ Delorie <dj@redhat.com>
8061
8062 * c-cppbuiltin.c (print_bits_of_hex): New.
8063 (builtin_define_type_minmax): Print values using hex so as not to
8064 require a pre-computed list of string values.
8065
1d60af08
KZ
80662014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
8067 Mike Stump <mikestump@comcast.net>
8068 Richard Sandiford <rdsandiford@googlemail.com>
8069
8070 * c-ada-spec.c: Include wide-int.h.
8071 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
8072 (dump_generic_ada_node): Use wide-int interfaces.
8073 * c-common.c: Include wide-int-print.h.
8074 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
8075 (pointer_int_sum): Use wide-int interfaces.
8076 (c_common_nodes_and_builtins): Use make_int_cst.
8077 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
8078 (handle_alloc_size_attribute): Use wide-int interfaces.
8079 (get_nonnull_operand): Likewise.
8080 * c-format.c (get_constant): Use tree_fits_uhwi_p.
8081 * c-lex.c: Include wide-int.h.
8082 (narrowest_unsigned_type): Take a widest_int rather than two
8083 HOST_WIDE_INTs.
8084 (narrowest_signed_type): Likewise.
8085 (interpret_integer): Update accordingly. Use wide-int interfaces.
8086 (lex_charconst): Use wide-int interfaces.
8087 * c-pretty-print.c: Include wide-int.h.
8088 (pp_c_integer_constant): Use wide-int interfaces.
8089 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
8090 INT_CST_LT_UNSIGNED.
8091
b15458be
RB
80922014-05-06 Richard Biener <rguenther@suse.de>
8093
8094 * c-opts.c (c_common_post_options): For -freestanding,
8095 -fno-hosted and -fno-builtin disable pattern recognition
8096 if not enabled explicitely.
8097
6577374e
MP
80982014-05-02 Marek Polacek <polacek@redhat.com>
8099
8100 * c.opt (Wsizeof-pointer-memaccess): Describe option.
8101
d00887e8
MP
81022014-05-01 Marek Polacek <polacek@redhat.com>
8103
8104 PR c/43245
8105 * c.opt (Wdiscarded-qualifiers): Add.
8106
f8ed5150
MP
81072014-04-30 Marek Polacek <polacek@redhat.com>
8108
8109 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
8110 INT_MIN / -1 sanitization only for integer types.
8111
45484dcf
MP
81122014-04-25 Marek Polacek <polacek@redhat.com>
8113
8114 PR c/18079
8115 * c-common.c (handle_noinline_attribute): Warn if the attribute
8116 conflicts with always_inline attribute.
8117 (handle_always_inline_attribute): Warn if the attribute conflicts
8118 with noinline attribute.
8119
38e514c0
MP
81202014-04-25 Marek Polacek <polacek@redhat.com>
8121
8122 PR c/60156
8123 * c-common.c (check_main_parameter_types): Warn about variadic main.
8124
44875f92
MS
81252014-04-24 Mike Stump <mikestump@comcast.net>
8126
8127 * c.opt (Wshadow-ivar): Default to on.
8128
dcaaa5a0
DP
81292014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
8130
8131 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
8132
c07d7c02
MP
81332014-04-23 Marek Polacek <polacek@redhat.com>
8134
8135 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
8136
1c33c9b7
JJ
81372014-04-22 Jakub Jelinek <jakub@redhat.com>
8138
8139 PR sanitizer/60275
8140 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
8141 if flag_sanitize_undefined_trap_on_error.
8142 (ubsan_instrument_division, ubsan_instrument_shift,
8143 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
8144 if !flag_sanitize_recover.
8145
793c625f
MG
81462014-04-22 Marc Glisse <marc.glisse@inria.fr>
8147
8148 PR libstdc++/43622
8149 * c-common.c (registered_builtin_types): Make non-static.
8150 * c-common.h (registered_builtin_types): Declare.
8151
b0f1bf36 81522014-04-14 Richard Biener <rguenther@suse.de>
ab20d992 8153 Marc Glisse <marc.glisse@inria.fr>
b0f1bf36
RB
8154
8155 PR c/60819
8156 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
8157 apply may-alias the scalar pointer type when applicable.
8158
3b07fa4a
IZ
81592014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
8160
8161 PR middle-end/60467
8162 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
8163 as possible argument for Cilk_spawn.
8164
cbbd2b1c
TB
81652014-04-11 Tobias Burnus <burnus@net-b.de>
8166
8167 PR c/60194
8168 * c.opt (Wformat-signedness): Add
8169 * c-format.c(check_format_types): Use it.
8170
6415bd5d
JM
81712014-04-11 Jason Merrill <jason@redhat.com>
8172
8173 PR c++/57926
8174 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
8175 default_conversion for an array argument.
8176
6525783a
MP
81772014-04-08 Marek Polacek <polacek@redhat.com>
8178
8179 PR sanitizer/60745
8180 * c-ubsan.c: Include asan.h.
8181 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
8182
880a467b
NS
81832014-04-03 Nathan Sidwell <nathan@codesourcery.com>
8184
8185 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
8186
7b59ff2d
MP
81872014-04-02 Marek Polacek <polacek@redhat.com>
8188
8189 * c-common.h (c_expand_expr): Remove declaration.
8190
8edbfaa6
JJ
81912014-03-28 Jakub Jelinek <jakub@redhat.com>
8192
8193 PR c++/60689
8194 * c-common.c (add_atomic_size_parameter): When creating new
8195 params vector, push the size argument first.
8196
07d72e1d
JJ
81972014-03-26 Jakub Jelinek <jakub@redhat.com>
8198
8199 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8200 ubsan_instrument_vla, ubsan_instrument_return): Adjust
8201 ubsan_create_data callers.
8202
b35e0fa0
JJ
82032014-03-22 Jakub Jelinek <jakub@redhat.com>
8204
8205 PR debug/60603
8206 * c-opts.c (c_finish_options): Restore cb_file_change call to
8207 <built-in>.
8208
39a1ebb3
JJ
82092014-03-13 Jakub Jelinek <jakub@redhat.com>
8210
8211 PR middle-end/36282
8212 * c-pragma.c (apply_pragma_weak): Only look at
8213 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
8214 DECL_ASSEMBLER_NAME_SET_P (decl).
8215 (maybe_apply_pending_pragma_weaks): Exit early if
8216 vec_safe_is_empty (pending_weaks) rather than only when
8217 !pending_weaks.
8218 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
8219 set assembler name back to NULL afterwards.
8220
a07f6ed2
JM
82212014-03-11 Jason Merrill <jason@redhat.com>
8222
8223 * c.opt: Add -std=gnu++14.
8224
75b107f5
IB
82252014-03-11 Ian Bolton <ian.bolton@arm.com>
8226
8227 * c-opts.c (c_common_post_options): Don't override
8228 -ffp-contract=fast if unsafe-math-optimizations is on.
8229
f42c637e
PM
82302014-03-08 Paulo Matos <paulo@matos-sorge.com>
8231
22b15758 8232 * c.opt: Enable LTO FE for fshort-double.
f42c637e 8233
70e24808
JM
82342014-03-07 Jason Merrill <jason@redhat.com>
8235
8236 * c.opt: Add -std=c++14.
8237
3af9c5e9
MP
82382014-03-06 Marek Polacek <polacek@redhat.com>
8239
8240 PR c/60197
8241 * cilk.c (contains_cilk_spawn_stmt): New function.
8242 (contains_cilk_spawn_stmt_walker): Likewise.
8243 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
8244 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
8245
b3bdf019
JJ
82462014-03-03 Jakub Jelinek <jakub@redhat.com>
8247
8248 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
8249 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
8250 even when flag_preprocess_only.
8251
ca7e759d
JM
82522014-02-26 Jason Merrill <jason@redhat.com>
8253
8254 PR c++/59231
8255 PR c++/11586
8256 * c-common.c (shorten_compare): Don't check
8257 c_inhibit_evaluation_warnings.
8258
28e41874
JJ
82592014-02-19 Jakub Jelinek <jakub@redhat.com>
8260
cca615af
JJ
8261 PR c/37743
8262 * c-common.c (c_common_nodes_and_builtins): When initializing
8263 c_uint{16,32,64}_type_node, also set corresponding
8264 uint{16,32,64}_type_node to the same value.
8265
28e41874
JJ
8266 PR c++/60267
8267 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
8268 for PRAGMA_IVDEP if flag_preprocess_only.
8269
c2bf53a1
JJ
82702014-02-12 Jakub Jelinek <jakub@redhat.com>
8271
8272 PR c/60101
8273 * c-common.c (merge_tlist): If copy is true, call new_tlist,
8274 if false, add ADD itself, rather than vice versa.
8275 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
8276 copy. For SAVE_EXPR, only call merge_tlist once.
8277
8fcbce72
JJ
82782014-02-08 Jakub Jelinek <jakub@redhat.com>
8279
8280 PR middle-end/60092
8281 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
8282 and tree_to_uhwi.
8283 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
8284 functions.
8285 (c_common_attribute_table): Add alloc_align and assume_aligned
8286 attributes.
8287
0a756a3f
MP
82882014-02-06 Marek Polacek <polacek@redhat.com>
8289
8290 PR c/60087
8291 * c-common.c (warn_for_sign_compare): Call warning_at with location
8292 instead of warning.
8293
7ec4847a
MP
82942014-02-05 Marek Polacek <polacek@redhat.com>
8295
8296 PR c/53123
8297 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
8298 statement.
8299
66f20604
MP
83002014-02-04 Marek Polacek <polacek@redhat.com>
8301
8302 PR c/60036
8303 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
8304 SAVE_EXPR.
8305
5d77fb19
MG
83062014-02-03 Marc Glisse <marc.glisse@inria.fr>
8307
8308 PR c++/53017
8309 PR c++/59211
8310 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
8311 handle_vector_size_attribute, handle_nonnull_attribute): Call
8312 default_conversion on the attribute argument.
8313 (handle_nonnull_attribute): Increment the argument number.
8314
81e5eca8
MP
83152014-01-31 Marek Polacek <polacek@redhat.com>
8316
8317 PR c/59963
8318 * c-common.c (add_atomic_size_parameter): Pass vNULL to
8319 build_function_call_vec.
8320 (resolve_overloaded_builtin): Likewise.
8321 * c-common.h (build_function_call_vec): Adjust declaration.
8322
68fca595
MP
83232014-01-30 Marek Polacek <polacek@redhat.com>
8324
8325 PR c/59940
8326 * c-common.h (unsafe_conversion_p): Adjust declaration.
8327 (warnings_for_convert_and_check): Likewise.
8328 (convert_and_check): Likewise.
8329 * c-common.c (unsafe_conversion_p): Add location parameter. Call
8330 expansion_point_location_if_in_system_header on it.
8331 (warnings_for_convert_and_check): Add location parameter. Call
8332 expansion_point_location_if_in_system_header on it. Use it.
8333 (convert_and_check): Add location parameter. Use it.
8334 (conversion_warning): Likewise.
8335 (c_add_case_label): Adjust convert_and_check calls.
8336 (scalar_to_vector): Adjust unsafe_conversion_p calls.
8337
b72271b9
BI
83382014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
8339
8340 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
8341 flag_cilkplus.
8342 * c-pragma.c (init_pragma): Likewise.
8343 * c.opt: Likewise.
8344
393e8e8b
MP
83452014-01-23 Marek Polacek <polacek@redhat.com>
8346
8347 PR c/59846
8348 * c-common.c (shorten_compare): Add location_t parameter.
8349 * c-common.h (shorten_binary_op): Adjust declaration.
8350
f04dda30
MP
83512014-01-23 Marek Polacek <polacek@redhat.com>
8352
8353 PR c/58346
8354 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
8355 * c-common.h: Declare it.
8356
621955cb
EB
83572014-01-20 Eric Botcazou <ebotcazou@adacore.com>
8358
8359 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
8360 * c-ada-spec.c (dump_ads): Likewise.
8361 (cpp_check): Likewise.
8362 (dump_ada_specs): Likewise.
8363
83642014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
8365
8366 PR c++/49718
8367 * c-common.c (handle_no_instrument_function_attribute): Allow
8368 no_instrument_function attribute in class member
8369 definition/declaration.
8370
241f845a
JJ
83712014-01-15 Jakub Jelinek <jakub@redhat.com>
8372
8373 PR c/58943
8374 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
8375 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
8376 being COMPOUND_EXPR.
8377 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
8378 operand a SAVE_EXPR and second MODIFY_EXPR.
8379
e83b8e2e
JJ
83802014-01-09 Jakub Jelinek <jakub@redhat.com>
8381
8382 PR target/58115
8383 * c-pch.c (c_common_write_pch): Call
8384 prepare_target_option_nodes_for_pch.
8385
23a5b65a
RS
83862014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8387
8388 Update copyright years
8389
f9030485
RS
83902014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8391
8392 * array-notation-common.c, c-cilkplus.c: Use the standard form for
8393 the copyright notice.
8394
f2aa696b
EB
83952013-12-28 Eric Botcazou <ebotcazou@adacore.com>
8396
8397 * c-ada-spec.c (print_constructor): New function.
8398 (print_destructor): Retrieve the origin of the destructor.
8399 (print_ada_declaration): Revamp handling of constructors/destructors.
8400
3f8257db 84012013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
8402 Bill Maddox <maddox@google.com>
8403 Jason Merrill <jason@redhat.com>
8404
8405 * c.opt: Add -fdeclone-ctor-dtor.
8406 * c-opts.c (c_common_post_options): Default to on iff -Os.
8407
41958c28
BI
84082013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
8409
8410 * c-common.c (c_common_attribute_table): Added "cilk simd function"
8411 attribute.
8412 * c-pragma.h (enum pragma_cilk_clause): Remove.
ab20d992 8413 (enum pragma_omp_clause): Added the following fields:
41958c28
BI
8414 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
8415 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
8416 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
8417 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
8418 PRAGMA_CILK_CLAUSE_UNIFORM.
8419
b1726d6c 8420
12893402
BI
84212013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
8422
8423 * cilk.c (cilk_outline): Made this function non-static.
8424 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
8425 (create_cilk_wrapper): Added a new parameter: a function pointer.
8426 (c_install_body_w_frame_cleanup): Remove
8427 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
8428 * c-common.h (cilk_outline): New prototype.
8429 (gimplify_cilk_spawn): Removed two parameters.
8430 (cilk_install_body_with_frame_cleanup): New prototype.
8431 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
8432 CILK_SPAWN_STMT case.
8433
085b42ed
BS
84342013-12-11 Bernd Schmidt <bernds@codesourcery.com>
8435
2ce064c3
BS
8436 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
8437
085b42ed
BS
8438 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
8439 (int_array_type_node): Remove.
8440 * c-common.c (c_common_nodes_and_builtins): Don't build it.
8441
9e36c9ed
MP
84422013-12-05 Marek Polacek <polacek@redhat.com>
8443
8444 PR c/52023
8445 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
8446 [ADJUST_FIELD_ALIGN].
8447
296674db
JM
84482013-12-04 Joseph Myers <joseph@codesourcery.com>
8449
8450 PR c/52023
8451 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
8452 and check field alignment if set.
8453 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
8454 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
8455
b1726d6c 84562013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
8457 Marek Polacek <polacek@redhat.com>
8458
8459 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
8460 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
8461
d7947e19
L
84622013-11-29 H.J. Lu <hongjiu.lu@intel.com>
8463
8464 PR c/59309
8465 * cilk.c (gimplify_cilk_spawn): Properly handle function without
8466 arguments.
8467
fad7652e
JJ
84682013-11-29 Jakub Jelinek <jakub@redhat.com>
8469
8470 PR c/59280
8471 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
8472 goto invalid. If it is error_mark_node, don't issue further
8473 diagnostics.
8474
8b5e1202
SO
84752013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
8476
8477 * c.opt (Wopenmp-simd): New.
8478
0a508bb6
JJ
84792013-11-22 Jakub Jelinek <jakub@redhat.com>
8480
8481 * c-ubsan.h (ubsan_instrument_return): New prototype.
8482 * c-ubsan.c (ubsan_instrument_return): New function.
8483
2fb9a547
AM
84842013-11-22 Andrew MacLeod <amacleod@redhat.com>
8485
8486 * c-common.c: Add required include files from gimple.h.
ab20d992
JJ
8487 * c-gimplify.c: Likewise.
8488 * cilk.c: Likewise.
2fb9a547 8489
8400e75e
DM
84902013-11-22 David Malcolm <dmalcolm@redhat.com>
8491
8492 * c-common.c (unsafe_conversion_p): Remove use of
8493 EXPR_LOC_OR_HERE macro.
8494 (conversion_warning): Likewise.
8495 (warnings_for_convert_and_check): Likewise.
8496 (warn_for_collisions_1): Likewise.
8497 (shorten_compare): Likewise, and remove use of in_system_header
8498 macro, using the location from the former.
8499 * c-lex.c (dump_one_header): Remove use of input_filename macro.
8500 (cb_def_pragma): Remove use of in_system_header macro.
8501 (lex_string): Likewise.
8502 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
8503
eb1ce453
KZ
85042013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
8505 Mike Stump <mikestump@comcast.net>
8506 Richard Sandiford <rdsandiford@googlemail.com>
8507
8508 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
8509 instead of TREE_INT_CST_LOW, in cases where there is a protecting
8510 tree_fits_shwi_p or tree_fits_uhwi_p.
8511 (dump_generic_ada_node): Likewise.
8512 * c-format.c (check_format_arg): Likewise.
8513 * c-pretty-print.c (pp_c_integer_constant): Likewise.
8514
6b3b8c27
KZ
85152013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
8516
8517 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
8518
49b0aa18
JC
85192013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
8520
8521 PR c/53001
8522 * c-common.c (unsafe_conversion_p): Make this function
8523 return an enumeration with more detail.
8524 (conversion_warning): Use the new return type of
8525 unsafe_conversion_p to separately warn either about conversions
8526 that lower floating point number precision or about the other
8527 kinds of conversions.
8528 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
8529 (unsafe_conversion_p): switching return type to
8530 conversion_safety enumeration.
49b0aa18
JC
8531 * c.opt: Adding new warning -Wfloat-conversion and
8532 enabling it with -Wconversion.
8533
b826515a
BS
85342013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
8535
8e745a17
JJ
8536 * c-opts.c: Include plugin.h.
8537 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 8538
b9a55b13
MP
85392013-11-19 Marek Polacek <polacek@redhat.com>
8540
8541 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
8542 call.
8543 (ubsan_instrument_shift): Likewise.
8544 (ubsan_instrument_vla): Likewise.
8545
7d362f6c
RS
85462013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8547
8548 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
8549 cast to unsigned type.
8550
386b1f1f
RS
85512013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8552
8553 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
8554 tree_low_cst.
8555 (complete_array_type): Update comment to refer to tree_to_[su]hwi
8556 rather than tree_low_cst.
8557
ae7e9ddd
RS
85582013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8559
8560 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
8561 tree_to_uhwi throughout.
8562
9439e9a1
RS
85632013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8564
8565 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
8566 tree_low_cst (..., 0) with tree_to_shwi throughout.
8567
cc269bb6
RS
85682013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8569
8570 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
8571 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
8572
9541ffee
RS
85732013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8574
8575 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
8576 host_integerp (..., 0) with tree_fits_shwi_p throughout.
8577
c02065fc
AH
85782013-11-15 Aldy Hernandez <aldyh@redhat.com>
8579
8580 * c-cilkplus.c: New file.
8581 * c-common.c (readonly_error): Add location argument.
8582 * c-common.h (readonly_error): Same.
8583 (c_finish_cilk_clauses): Protoize.
8584 (c_check_cilk_loop): Same.
8585 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
8586 Do not fail on error_mark_node.
8587 Abstract increment canonicalization to here...
8588 (c_omp_for_incr_canonicalize_ptr): New.
8589 c-pragma.c (init_pragma): Register "simd" pragma.
8590 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
8591 (enum pragma_cilk_clause): New.
8592
9cc65f15
RS
85932013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
8594
8595 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
8596 wchar_type and host_integerp checks.
8597
18f429e2
AM
85982013-11-14 Andrew MacLeod <amacleod@redhat.com>
8599
8600 * c-common.c: Likewise.
8601 * c-gimplify.c: Likewise.
8602 * cilk.c: Likewise.
8603
d8a2d370
DN
86042013-11-14 Diego Novillo <dnovillo@google.com>
8605
8606 * c-common.c: Include fold-const.h.
8607 Include stor-layout.h.
8608 Include calls.h.
8609 Include stringpool.h.
8610 Include attribs.h.
8611 Include varasm.h.
8612 Include trans-mem.h.
8613 * c-cppbuiltin.c: Include stor-layout.h.
8614 Include stringpool.h.
8615 * c-format.c: Include stringpool.h.
8616 * c-lex.c: Include stringpool.h.
8617 Include stor-layout.h.
8618 * c-pragma.c: Include stringpool.h.
8619 Include attribs.h.
8620 Include varasm.h.
8621 Include gcc-symtab.h.
8622 * c-pretty-print.c: Include stor-layout.h.
8623 Include attribs.h.
8624 * cilk.c: Include stringpool.h.
8625 Include calls.h.
8626
38b7bc7f
JM
86272013-11-13 Joseph Myers <joseph@codesourcery.com>
8628
8629 * c-common.h (enum rid): Add RID_AUTO_TYPE.
8630 * c-common.c (c_common_reswords): Add __auto_type.
8631 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
8632
45b0be94
AM
86332013-11-12 Andrew MacLeod <amacleod@redhat.com>
8634
18f429e2
AM
8635 * c-common.c: Include gimplify.h.
8636 * c-gimplify.c: Likewise.
8637 * cilk.c: Likewise.
8638 * c-omp.c: Include gimple-expr.h instead of gimple.h.
8639 * c-ubsan.c: Don't include gimple.h.
45b0be94 8640
582d9b50
JM
86412013-11-12 Joseph Myers <joseph@codesourcery.com>
8642
8643 * c-common.c (c_common_reswords): Add _Thread_local.
8644
6b28e197
JM
86452013-11-09 Joseph Myers <joseph@codesourcery.com>
8646
8647 * c-common.c (atomic_size_supported_p): New function.
8648 (resolve_overloaded_atomic_exchange)
8649 (resolve_overloaded_atomic_compare_exchange)
8650 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
8651 Use it instead of comparing size with a local list of sizes.
8652
267bac10
JM
86532013-11-07 Andrew MacLeod <amacleod@redhat.com>
8654 Joseph Myers <joseph@codesourcery.com>
8655
8656 * c-common.h (enum rid): Add RID_ATOMIC.
8657 * c-common.c (c_common_reswords): Add _Atomic.
8658 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
8659 (keyword_is_type_qualifier): Accept RID_ATOMIC.
8660 * c-format.c (check_format_types): Check for extra _Atomic
8661 qualifiers in format argument.
8662 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
8663 (pp_c_type_qualifier_list): Mention _Atomic in comment.
8664
5157b91e
TB
86652013-11-06 Tobias Burnus <burnus@net-b.de>
8666
8667 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
8668
6dbe0958
JM
86692013-11-06 Joseph Myers <joseph@codesourcery.com>
8670
8671 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
8672 standards modes.
8673 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
8674 to mean lack of IEEE 754 support.
8675
e8ff5196
TB
86762013-11-05 Tobias Burnus <burnus@net-b.de>
8677
8678 * c.opt (-Wdate-time): New option
8679 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
8680
254a0760
JM
86812013-11-05 Joseph Myers <joseph@codesourcery.com>
8682
8683 * c-cppbuiltin.c (cpp_iec_559_value): Test
8684 flag_excess_precision_cmdline not flag_excess_precision.
8685
6d7f7e0a
TB
86862013-11-05 Tobias Burnus <burnus@net-b.de>
8687
8688 * c.opt (fopenmp-simd): New option.
8689 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
8690 (omp_pragmas): ... this new struct.
8691 (c_pp_lookup_pragma): Also walk omp_pragmas.
8692 (init_pragma): Init pragmas for -fopenmp-simd.
8693
55a7f02f
MP
86942013-11-04 Marek Polacek <polacek@redhat.com>
8695
8696 PR c++/58979
8697 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
8698
9193fb05
JM
86992013-11-04 Joseph Myers <joseph@codesourcery.com>
8700
8701 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
8702 New functions.
8703 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
8704
94159ecf
EB
87052013-11-04 Eric Botcazou <ebotcazou@adacore.com>
8706
8707 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
8708 (dump_ada_specs): Adjust prototype of second callback.
8709 * c-ada-spec.c (cpp_check): New global variable.
8710 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
8711 (print_generic_ada_decl): Likewise.
8712 (has_static_fields): Change return type to bool and add guard.
8713 (has_nontrivial_methods): New predicate.
8714 (is_tagged_type): Change return type to bool.
8715 (separate_class_package): Call has_nontrivial_methods.
8716 (pp_ada_tree_identifier): Minor tweaks.
8717 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
8718 (dump_ada_array_domains): Likewise.
8719 (dump_ada_array_type): Likewise.
8720 (dump_template_types): Remove cpp_check parameter and do not pass it to
8721 dump_generic_ada_node.
8722 (dump_ada_template): Likewise.
8723 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
8724 recursively.
8725 (print_ada_methods): Change return type to integer. Remove cpp_check
8726 parameter and do not pass it down.
8727 (dump_nested_types): Remove cpp_check parameter and do not pass it to
8728 dump_generic_ada_node.
8729 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
8730 accessing methods.
8731 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
8732 down. Use has_nontrivial_methods to recognize C++ classes. Use return
8733 value of print_ada_methods.
8734 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
8735 Set cpp_check to it before invoking dump_ada_nodes.
8736 (dump_ada_specs): Likewise.
8737
b906f4ca
MP
87382013-11-03 Marek Polacek <polacek@redhat.com>
8739
8740 * c-ubsan.c: Don't include hash-table.h.
8741 (ubsan_instrument_vla): New function.
8742 * c-ubsan.h: Declare it.
8743
5e20cdc9
DM
87442013-10-31 David Malcolm <dmalcolm@redhat.com>
8745
8746 Automated part of renaming of symtab_node_base to symtab_node.
8747
8748 Patch autogenerated by rename_symtab.py from
8749 https://github.com/davidmalcolm/gcc-refactoring-scripts
8750 revision 58bb219cc090b2f4516a9297d868c245495ee622
8751
8752 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
8753 symtab_node_base to symtab_node.
8754
7057e645
ESR
87552013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
8756
8e745a17 8757 Implement C++14 digit separators.
7057e645
ESR
8758 * c-lex.c (interpret_float): Remove digit separators from scratch string
8759 before building real literal.
8760
193ea7bc
JJ
87612013-10-30 Jakub Jelinek <jakub@redhat.com>
8762
8763 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
8764
939b37da
BI
87652013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
8766
8767 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
8768 fields.
8769 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
8770 enabled.
8771 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
8772 (insert_cilk_frame): New prototype.
8773 (cilk_init_builtins): Likewise.
8774 (gimplify_cilk_spawn): Likewise.
8775 (c_cilk_install_body_w_frame_cleanup): Likewise.
8776 (cilk_detect_spawn_and_unwrap): Likewise.
8777 (cilk_set_spawn_marker): Likewise.
8778 (build_cilk_sync): Likewise.
8779 (build_cilk_spawn): Likewise.
8780 * cilk.c: New file.
8781
67348ccc
DM
87822013-10-29 David Malcolm <dmalcolm@redhat.com>
8783
8784 Patch autogenerated by refactor_symtab.py from
8785 https://github.com/davidmalcolm/gcc-refactoring-scripts
8786 revision 58bb219cc090b2f4516a9297d868c245495ee622
8787
8788 * c-gimplify.c (c_genericize): Update for conversion of symtab types
8789 to a true class hierarchy.
8790 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
8791
d570872d
RS
87922013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
8793
8794 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
8795
98906124
JL
87962013-10-26 Jeff Law <law@redhat.com>
8797
adfac8df
JJ
8798 * c-common.c (c_define_builtins): Remove mudflap support.
8799 * c.opt: Ignore and warn for mudflap options.
98906124 8800
d73749df 88012013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
8802
8803 PR other/33426
8804 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
8805 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
8806
3f04b1bb
JM
88072013-10-23 Jason Merrill <jason@redhat.com>
8808
8809 * c-format.c (gcc_cxxdiag_char_table): Add %X.
8810
acf0174b
JJ
88112013-10-11 Jakub Jelinek <jakub@redhat.com>
8812
acd15a28
JJ
8813 * c-common.h (omp_clause_mask::operator !=): New method.
8814 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
8815 instead of if (mask & something) tests everywhere.
8816
acf0174b
JJ
8817 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
8818 201307 instead of 201107.
8819 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
8820 (c_common_attribute_table): Add "omp declare target" and
8821 "omp declare simd" attributes.
8822 (handle_omp_declare_target_attribute,
8823 handle_omp_declare_simd_attribute): New functions.
8824 * c-omp.c: Include c-pragma.h.
8825 (c_finish_omp_taskgroup): New function.
8826 (c_finish_omp_atomic): Add swapped argument, if true,
8827 build the operation first with rhs, lhs arguments and use NOP_EXPR
8828 build_modify_expr.
8829 (c_finish_omp_for): Add code argument, pass it down to make_code.
8830 (c_omp_split_clauses): New function.
8831 (c_split_parallel_clauses): Removed.
8832 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
8833 c_omp_declare_simd_clauses_to_decls): New functions.
8834 * c-common.h (omp_clause_mask): New type.
8835 (OMP_CLAUSE_MASK_1): Define.
8836 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
8837 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
8838 omp_clause_mask::operator |, omp_clause_mask::operator &,
8839 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
8840 omp_clause_mask::operator ==): New methods.
8841 (enum c_omp_clause_split): New.
8842 (c_finish_omp_taskgroup): New prototype.
8843 (c_finish_omp_atomic): Add swapped argument.
8844 (c_finish_omp_for): Add code argument.
8845 (c_omp_split_clauses): New prototype.
8846 (c_split_parallel_clauses): Removed.
8847 (c_omp_declare_simd_clauses_to_numbers,
8848 c_omp_declare_simd_clauses_to_decls): New prototypes.
8849 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
8850 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
8851 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
8852 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
8853 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
8854 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
8855 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
8856 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
8857 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
8858 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
8859 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
8860 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
8861 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
8862 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
8863 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
8864 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
8865 PRAGMA_OMP_CLAUSE_UNIFORM.
8866
826cacfe
MG
88672013-10-09 Marc Glisse <marc.glisse@inria.fr>
8868
8869 PR tree-optimization/20318
8870 * c-common.c (handle_returns_nonnull_attribute): New function.
8871 (c_common_attribute_table): Add returns_nonnull.
8872
2284b034
MG
88732013-10-03 Marc Glisse <marc.glisse@inria.fr>
8874
8875 PR c++/19476
8876 * c.opt (fcheck-new): Move to common.opt.
8877
b56e9788
MP
88782013-09-25 Marek Polacek <polacek@redhat.com>
8879 Jakub Jelinek <jakub@redhat.com>
8880
8881 PR sanitizer/58413
8882 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
8883 an expression if we can prove it is correct.
8884 (ubsan_instrument_division): Likewise. Remove unnecessary
8885 check.
8886
ce6923c5
MP
88872013-09-18 Marek Polacek <polacek@redhat.com>
8888
8889 PR sanitizer/58411
8890 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
8891 Declare it.
8892 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
8893
fb5610fb
IS
88942013-09-14 Iain Sandoe <iain@codesourcery.com>
8895
8896 PR target/48094
8897 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
8898 fobjc-gc, freplace-objc-classes): Accept for LTO.
8899
88b0e79e
JC
89002013-09-13 Jacek Caban <jacek@codeweavers.com>
8901
8902 * c-target.def: New hook
8903
c9b0866a
PC
89042013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
8905
8906 PR c++/43452
8907 * c.opt (Wdelete-incomplete): Add.
8908
0af94e6f
JR
89092013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
8910
8911 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
8912 (vector_types_compatible_elements_p): New function.
8913 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
8914 declaration.
8915 (vector_types_compatible_elements_p): Declare.
8916
7c26172c
GDR
89172013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8918
8919 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
8920 a virtual member function.
8921 (pp_simple_type_specifier): Remove.
8922 (pp_c_type_specifier): Likewise.
8923 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
8924 Rename from pp_c_type_specifier. Adjust.
8925 (c_pretty_printer::c_pretty_printer): Do not assign to
8926 simple_type_specifier.
8927
20059c8b
GDR
89282013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8929
8930 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
8931 member function.
8932 (c_pretty_printer::storage_class_specifier): Likewise.
8933 (c_pretty_printer::initializer): Likewise.
8934 (pp_declaration): Remove.
8935 (pp_declaration_specifiers): Likewise.
8936 (pp_abstract_declarator): Likewise.
8937 (pp_declarator): Likewise.
8938 (pp_type_id): Likewise.
8939 (pp_statement): Likewise.
8940 (pp_constant): Likewise.
8941 (pp_id_expression): Likewise.
8942 (pp_primary_expression): Likewise.
8943 (pp_unary_expression): Likewise.
8944 (pp_multiplicative_expression): Likewise.
8945 (pp_conditional_expression): Likewise.
8946 (pp_assignment_expression): Likewise.
8947 (pp_expression): Likewise.
8948 (pp_c_type_id): Likewise.
8949 (pp_c_storage_class_specifier): Likewise.
8950 * c-pretty-print.c (pp_c_type_cast): Tidy.
8951 (pp_c_pointer): Likewise.
8952 (pp_c_type_specifier): Likewise.
8953 (pp_c_parameter_type_list): Likewise.
8954 (pp_c_function_definition): Likewise.
8955 (pp_c_init_declarator): Likewise.
8956 (pp_c_initializer_list): Likewise.
8957 (pp_c_constructor_elts): Likewise.
8958 (c_pretty_printer::direct_abstract_declarator): Likewise.
8959 (c_pretty_printer::declaration_specifiers): Likewise.
8960 (c_pretty_printer::primary_expression): Likewise.
8961 (c_pretty_printer::postfix_expression): Likewise.
8962 (c_pretty_printer::type_id): Rename from pp_c_type_id.
8963 (c_pretty_printer::storage_class_specifier): Rename from
8964 pp_c_storage_class_specifier.
8965 (c_pretty_printer::initializer): Rename from pp_c_initializer.
8966 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
8967 storage_class_specifier, initializer, offset_list, flags.
8968
de5a5fa1
MP
89692013-08-30 Marek Polacek <polacek@redhat.com>
8970
8971 * c-ubsan.c: New file.
8972 * c-ubsan.h: New file.
8973
8f0e4d72
GDR
89742013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
8975
8976 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
8977 member function.
8978 (c_pretty_printer::declaration_specifiers): Likewise.
8979 (c_pretty_printer::declarator): Likewise.
8980 (c_pretty_printer::abstract_declarator): Likewise.
8981 (c_pretty_printer::direct_abstract_declarator): Likewise.
8982 (c_pretty_printer::direct_declarator): Likewise.
8983 (c_pretty_printer::function_specifier): Likewise.
8984 (pp_declaration): Adjust.
8985 (pp_declaration_specifiers): Likewise.
8986 (pp_abstract_declarator): Likewise.
8987 (pp_direct_declarator): Likewise.
8988 (pp_function_specifier): Likewise.
8989 (pp_direct_abstract_declarator): Remove as unused.
8990 (pp_c_declaration): Remove.
8991 (pp_c_declaration_specifiers): Likewise.
8992 (pp_c_declarator): Likewise.
8993 (pp_c_direct_declarator): Likewise.
8994 (pp_c_function_specifier): Likewise.
8995 (pp_c_direct_abstract_declarator): Likewise.
8996 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
8997 from pp_c_abstract_declarator. Adjust.
ab20d992 8998 (c_pretty_printer::direct_abstract_declarator): Rename from
8f0e4d72
GDR
8999 pp_c_direct_abstract_declarator. Adjust.
9000 (c_pretty_printer::function_specifier): Rename from
9001 pp_c_function_specifier. Adjust.
9002 (c_pretty_printer::declaration_specifiers): Rename from
9003 pp_c_declaration_specifiers. Adjust.
9004 (c_pretty_printer::direct_declarator): Rename from
9005 pp_c_direct_declarator. Adjust.
9006 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
9007 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
9008 (c_pretty_printer::c_pretty_printer): Do not assign to
9009 declaration, declaration_specifiers, declarator,
9010 direct_declarator, direct_abstract_declarator, function_specifier.
9011
00d34d3a
GDR
90122013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
9013
9014 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
9015 virtual member function.
9016 (c_pretty_printer::multiplicative_expression): Likewise.
9017 (c_pretty_printer::conditional_expression): Likewise.
9018 (c_pretty_printer::assignment_expression): Likewise.
9019 (c_pretty_printer::expression): Likewise.
9020 (pp_unary_expression): Adjust.
9021 (pp_multiplicative_expression): Likewise.
9022 (pp_assignment_expression): Likewise.
9023 (pp_conditional_expression): Likewise.
9024 (pp_expression): Likewise.
9025 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
9026 from pp_c_unary_expression. Adjust.
9027 (c_pretty_printer::multiplicative_expression): Rename from
9028 pp_c_multiplicative_expression. Adjust.
9029 (c_pretty_printer::conditional_expression): Rename from
9030 pp_c_conditional_expression. Adjust.
9031 (c_pretty_printer::assignment_expression): Rename from
9032 pp_c_assignment_expression. Adjust.
9033 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
9034 (c_pretty_printer::c_pretty_printer): Do not assign to
9035 unary_expression, multiplicative_expression,
9036 conditional_expression, expression.
9037
fb22178f
GDR
90382013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
9039
9040 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
9041 virtual member function.
9042 (pp_postfix_expression): Adjust.
9043 (pp_c_postfix_expression): Remove.
9044 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
9045 from pp_c_postfix_expression. Adjust.
9046 (c_pretty_printer::c_pretty_printer): Do not assign to
9047 postfix_expression.
9048
7ecc2600
GDR
90492013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
9050
9051 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
9052 virtua member function.
9053 (pp_primary_expression): Adjust.
9054 (pp_c_primary_expression): Remove.
9055 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
9056 from pp_c_primary_expression. Adjust.
9057 (pp_c_initializer_list): Use pp_primary_expression.
9058 (c_pretty_printer::c_pretty_printer): Do not assign to
9059 primary_expression.
9060
0691175f
GDR
90612013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
9062
9063 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
9064 * c-pretty-print.c (M_): Remove.
9065 (c_pretty_printer::translate_string): Define.
9066 (pp_c_type_specifier): Use it.
9067 (pp_c_primary_expression): Likewise.
9068 (pp_c_expression): Likewise.
9069
66dfe4c4
GDR
90702013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
9071
9072 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
9073 virtual function.
9074 (pp_c_id_expression): Remove.
9075 (pp_id_expression): Adjust.
9076 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
9077 pp_c_id_expression. Adjust.
9078 (pp_c_postfix_expression): Use pp_id_expression.
9079 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
9080
ca43e9d5
GDR
90812013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
9082
9083 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
9084 member function.
9085 (pp_constant): Adjust.
9086 (pp_c_constant): Remove.
9087 * c-pretty-print.c (c_pretty_printer::constant): Rename from
9088 pp_c_constant. Adjust.
9089 (pp_c_constant)
9090 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
9091 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
9092
da6ca2b5
GDR
90932013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
9094
9095 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
9096 (c_pretty_printer::c_pretty_printer): Declare.
9097 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
9098 c_pretty_printer_init. Adjust.
9099 (print_c_tree): Do not call c_pretty_printer_init.
9100 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
9101
65a372f4
AC
91022013-08-09 Arnaud Charlet <charlet@adacore.com>
9103
9104 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
9105
fd9b0f32
PC
91062013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
9107
9108 PR c++/58080
9109 * c-common.c (pointer_int_sum): Add bool parameter.
9110 * c-common.h (pointer_int_sum): Adjust declaration.
9111
e0aec1e9
GDR
91122013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
9113
9114 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
9115 c_pretty_printer variable.
9116
b066401f
GDR
91172013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
9118
9119 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
9120 (pp_base): Remove.
9121 (pp_c_base): Likewise. Adjust users.
9122 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
9123 (pp_c_whitespace): Do not call pp_base.
9124 (pp_c_left_paren): Likewise.
9125 (pp_c_right_paren): Likewise.
9126 (pp_c_left_brace): Likewise.
9127 (pp_c_right_brace): Likewise.
9128 (pp_c_left_bracket): Likewise.
9129 (pp_c_right_bracket): Likewise.
9130 (pp_c_dot): Likewise.
9131 (pp_c_ampersand): Likewise.
9132 (pp_c_star): Likewise.
9133 (pp_c_arrow): Likewise.
9134 (pp_c_semicolon): Likewise.
9135 (pp_c_complement): Likewise.
9136 (pp_c_exclamation): Likewise.
9137 (pp_c_direct_declarator): Likewise.
9138 (pp_c_ws_string): Likewise.
9139 (pp_c_identifier): Likewise.
9140 (pp_c_statement): Likewise.
9141 (print_c_tree): Likewise.
9142
65e5a578
ESR
91432013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
9144
9145 PR c++/58072
9146 * c-common.c (c_parse_error): Catch user-defined literal tokens and
9147 provide useful error strings.
9148
137a1a27
GDR
91492013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9150
9151 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
9152 printer functions instead of pp_string or operators and punctuators.
9153 (dump_generic_ada_node): Likewise.
9154 * c-pretty-print.c (pp_c_type_specifier): Likewise.
9155 (pp_c_relational_expression): Likewise.
9156 (pp_c_logical_or_expression): Likewise.
9157
07838b13
GDR
91582013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9159
9160 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
9161 functions instead of pp_character.
9162 (pp_ada_tree_identifier): Likewise.
9163 (dump_ada_double_name): Likewise.
9164 (dump_ada_function_declaration): Likewise.
9165 (dump_ada_array_domains): Likewise.
9166 (dump_template_types): Likewise.
9167 (dump_generic_ada_node): Likewise.
9168 (print_ada_declaration): Likewise.
9169 (print_ada_struct_decl): Likewise.
9170 * c-pretty-print.c (pp_c_integer_constant): Likewise.
9171
433cc7b0
TT
91722013-07-23 Tom Tromey <tromey@redhat.com>
9173
9174 * c-common.h (enum rid) <RID_GENERIC>: New constant.
9175 * c-common.c (c_common_reswords): Add _Generic.
9176
688010ba
OB
91772013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
9178
9179 * c-common.c: Fix typos.
9180 * c-common.h: Likewise.
9181
2a99e5e6
LL
91822013-07-13 Lubos Lunak <l.lunak@suse.cz>
9183
9184 PR c++/55203
9185 * c-common.c (c_common_attribute_table): Add warn_unused.
9186 (handle_warn_unused_attribute): New.
9187
c26302d5
JJ
91882013-07-10 Jakub Jelinek <jakub@redhat.com>
9189
9190 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
9191 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
9192
dfeadaa0
PC
91932013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
9194
9195 PR c++/57869
9196 * c.opt: Add Wconditionally-supported.
9197
6a2fa4b2
GS
91982013-07-08 Graham Stott <graham.stott@btinternet.com>
9199
adfac8df 9200 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
9201 unused variables l_length and l_node.
9202
ecdbd01a 92032013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
9204
9205 PR c/57821
9206 * c-common.c (complete_array_type): Delay folding first index
9207 like other indices. When folding, check for index overflow.
9208
bedc293e
MG
92092013-06-27 Marc Glisse <marc.glisse@inria.fr>
9210
9211 PR c++/57509
9212 * c-common.h (c_build_vec_perm_expr): New complain argument.
9213 * c-common.c (c_build_vec_perm_expr): Likewise.
9214 Use save_expr also in C++.
9215
604b2bfc
GDR
92162013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
9217
9218 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
9219 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
9220 * c-opts.c (c_common_post_options): Likewise.
9221
dfeadaa0 92222013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
9223
9224 * array-notation-common.c (length_mismatch_in_expr): Changed the
9225 parameter type's from a dynamic array to a vec_tree. Also removed
9226 the size parameters.
9227 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
9228 the change above.
9229
2ce86d2e
BI
92302013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
9231
9232 * c-common.h (struct cilkplus_an_parts): New structure.
9233 (struct cilkplus_an_loop_parts): Likewise.
9234 (cilkplus_extract_an_triplets): New prototype.
9235 (fix_sec_implicit_args): Likewise.
9236 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
9237 (fix_sec_implicit_args): Likewise.
604b2bfc 9238
07a6825b
BI
92392013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
9240
9241 * array-notation-common.c (find_inv_trees): Removed an unwanted
9242 typecasting.
9243 * c-common.h (struct inv_list::additional_tcodes): Changed type from
9244 enum rid to enum tree_code.
9245
08346abd
JH
92462013-06-11 Jan Hubicka <jh@suse.cz>
9247
9248 * c-common.c (handle_alias_ifunc_attribute): Do not set
9249 DECL_EXTERNAL for weakref variables.
9250 * c-pragma.c (handle_pragma_weak): Make sure aliases
9251 are not declared as external.
9252
d60f1706
BI
92532013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
9254
9255 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
9256 function from c/c-array-notation.c.
9257 (is_cilkplus_reduce_builtin): Likewise.
9258 (find_rank): Likewise.
9259 (extract_array_notation_exprs): Likewise.
9260 (replace_array_notations): Likewise.
9261 (find_inv_trees): Likewise.
9262 (replace_inv_trees): Likewise.
9263 (contains_array_notation_expr): Likewise.
9264 (find_correct_array_notation_type): Likewise.
9265 * c-common.h (struct inv_list): Moved this struct from the file
9266 c/c-array-notation.c and added a new field called additional tcodes.
9267 (length_mismatch_in_expr_p): New prototype.
9268 (is_cilkplus_reduce_builtin): Likewise.
9269 (find_rank): Likewise.
9270 (extract_array_notation_exprs): Likewise.
9271 (replace_array_notation): Likewise.
9272 (find_inv_trees): Likewise.
9273 (replace_inv_trees): Likewise.
9274 (find_correct_array_notation_type): Likewise.
dfeadaa0 9275
36536d79
BI
92762013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
9277
9278 * c-common.c (c_define_builtins): When cilkplus is enabled, the
9279 function array_notation_init_builtins is called.
9280 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
9281 * c-common.def (ARRAY_NOTATION_REF): New tree.
9282 * c-common.h (build_array_notation_expr): New function declaration.
9283 (build_array_notation_ref): Likewise.
9284 (extract_sec_implicit_index_arg): New extern declaration.
9285 (is_sec_implicit_index_fn): Likewise.
9286 (ARRAY_NOTATION_CHECK): New define.
9287 (ARRAY_NOTATION_ARRAY): Likewise.
9288 (ARRAY_NOTATION_START): Likewise.
9289 (ARRAY_NOTATION_LENGTH): Likewise.
9290 (ARRAY_NOTATION_STRIDE): Likewise.
9291 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
9292 ARRAY_NOTATION_REF.
9293 (pp_c_expression): Likewise.
9294 * c.opt (flag_enable_cilkplus): New flag.
9295 * array-notation-common.c: New file.
9296
f7716d57
JJ
92972013-05-14 Jakub Jelinek <jakub@redhat.com>
9298
9299 PR c++/57274
9300 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
9301
a5e0cd1d
MG
93022013-05-10 Marc Glisse <marc.glisse@inria.fr>
9303
9304 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
9305 vectors.
9306
f6bc1c4a
HS
93072013-05-07 Han Shen <shenhan@google.com>
9308
9309 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
9310
3f12f6e9
SKS
93112013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
9312
9313 * c-common.c (check_user_alignment): Emit error for negative values.
9314
61949153
PC
93152013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
9316
9317 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
9318
e93e18e9
PC
93192013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
9320
9321 * c-cppbuiltin.c (c_cpp_builtins): Do not define
9322 __GXX_EXPERIMENTAL_CXX1Y__.
9323
44d90fe1 93242013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 9325 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
9326
9327 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
9328 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
9329 to simply use OPT_Wpointer_arith.
9330 (c_sizeof_or_alignof_type): Likewise.
9331
13f39b2e
PC
93322013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
9333
9334 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
9335
4b84d650
JJ
93362013-04-12 Jakub Jelinek <jakub@redhat.com>
9337
9338 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
9339 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
9340 specifiers.
9341
fb037b5d
SB
93422013-04-07 Steven Bosscher <steven@gcc.gnu.org>
9343
9344 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
9345
4e856798
PC
93462013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
9347
9348 * c-common.c (pointer_int_sum): Remove dead code.
9349
4b1baac8
RS
93502013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
9351
9352 PR middle-end/56524
9353 * c-common.c (handle_optimize_attribute): Don't call
9354 save_optabs_if_changed.
9355
0b50e654
JJ
93562013-03-05 Jakub Jelinek <jakub@redhat.com>
9357
9358 PR middle-end/56461
9359 * c-pch.c (pch_init): Free target_validity at the end.
9360
48c41403
JJ
93612013-03-04 Jakub Jelinek <jakub@redhat.com>
9362
9363 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
9364
e664c61c
KS
93652013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
9366 Jakub Jelinek <jakub@redhat.com>
9367
9368 PR sanitizer/56454
9369 * c-common.c (handle_no_sanitize_address_attribute): New function.
9370 (c_common_attribute_table): Add no_sanitize_address attribute.
9371 (handle_no_address_safety_analysis_attribute): Add
9372 no_sanitize_address attribute, not no_address_safety_analysis
9373 attribute.
9374
a475fd3d 93752013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
9376
9377 PR target/52555
9378 * c-common.c (handle_optimize_attribute): Call
9379 save_optabs_if_changed.
9380
f6007d99
JJ
93812013-02-18 Jakub Jelinek <jakub@redhat.com>
9382 Steven Bosscher <steven@gcc.gnu.org>
9383
9384 PR pch/54117
9385 * c-opts.c (c_common_post_options): If debug info is enabled
9386 and non-dwarf*, refuse to load PCH files and when writing PCH
9387 file warn.
9388
cf35e2b1
JJ
93892013-02-05 Jakub Jelinek <jakub@redhat.com>
9390
9391 PR middle-end/56167
9392 * c-common.c (handle_error_attribute): Fix condition.
9393
32887460
JJ
93942013-01-30 Jakub Jelinek <jakub@redhat.com>
9395
9396 PR c++/55742
9397 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
9398
5af057d8
JM
93992013-01-18 Jason Merrill <jason@redhat.com>
9400
9401 PR target/54908
9402 * c.opt (-fextern-tls-init): New.
9403 * c-opts.c (c_common_post_options): Handle it.
9404
cc83c823
JJ
94052013-01-09 Jakub Jelinek <jakub@redhat.com>
9406
9407 PR c/48418
9408 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
9409 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
9410 and is either negative or bigger or equal to type precision
9411 of the first operand.
9412
a859517f
MP
94132012-12-03 Marek Polacek <polacek@redhat.com>
9414
9415 PR c/55570
9416 * c-common.c (check_user_alignment): Swap order of tests,
9417 check TREE_CODE first.
9418
2d7aa578
ESR
94192012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
9420
9421 PR c++/52654
9422 * c-common.h (overflow_type): New enum.
9423 (build_userdef_literal): Add overflow_type argument.
9424 (tree_userdef_literal): Add overflow_type.
9425 (USERDEF_LITERAL_OVERFLOW): New access macro.
9426 * c-common.c (build_userdef_literal): Add overflow_type
9427 argument.
9428 * c-lex.c (c_lex_with_flags): Add overflow_type to
9429 build_userdef_literal calls.
9430 (interpret_integer, interpret_float): Add overflow_type argument.
9431
cc3c4f62
RB
94322012-11-28 Richard Biener <rguenther@suse.de>
9433
9434 PR c/35634
9435 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
9436 here and use a type with proper overflow behavior for types that would
9437 need to be promoted for the arithmetic.
9438
77bc5132
JJ
94392012-11-23 Jakub Jelinek <jakub@redhat.com>
9440
9441 PR sanitizer/55435
9442 * c-common.c (handle_no_address_safety_analysis_attribute): New
9443 function.
9444 (c_common_attribute_table): Add no_address_safety_analysis.
9445
5dc99c46
SB
94462012-11-16 Simon Baldwin <simonb@google.com>
9447
9448 * c.opt: Add f[no-]canonical-system-headers.
9449 * c-opts.c (c_common_handle_option): Handle
9450 OPT_fcanonical_system_headers.
9451
a4a0016d
ESR
94522012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
9453
9454 PR c++/54413
9455 * c-opts.c (c_common_handle_option): Set new flags.
9456 * c.opt: Describe new flags.
9457
7dbb85a7
JM
94582012-11-09 Jason Merrill <jason@redhat.com>
9459
9460 * c.opt (Wabi-tag): New.
9461
ad7bac31
AK
94622012-11-09 Andi Kleen <ak@linux.intel.com>
9463
9464 PR 55139
9465 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 9466 MEMMODEL_MASK
ad7bac31 9467
7332899a
MLI
94682012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
9469
9470 PR c/53063
9471 * c.opt (Wformat): Make it Alias Wformat=1.
9472 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
9473 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
9474 LangEnabledBy.
9475 (Wformat=): RejectNegative. Use LangEnabledBy.
9476 (Wnonnull): Use LangEnabledBy.
9477 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
9478 * c-format.c (set_Wformat): Delete.
9479 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
ab20d992
JJ
9480 (maybe_read_dollar_number): Likewise.
9481 (avoid_dollar_number): Likewise.
9482 (finish_dollar_format_checking): Likewise.
9483 (check_format_info): Likewise.
9484 (check_format_info_main): Likewise.
9485 (check_format_types): Likewise.
9486 (format_type_warning): Likewise.
9487 * c-common.c (int): Likewise.
9488 (check_function_sentinel): Likewise.
8e745a17 9489 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 9490
34a180a6
MLI
94912012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
9492
9493 PR c/53063
9494 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
9495 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
9496 Use LangEnabledBy.
9497 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
9498 common.opt.
9499 (Wvariadic-macros): Init(1).
9500 * c-opts.c (c_common_handle_option): Do not handle them
9501 explicitly.
9502 (c_common_post_options): Likewise.
9503 (sanitize_cpp_opts): warn_unused_macros is now
9504 cpp_warn_unused_macros.
9505 (push_command_line_include): Likewise.
9506 * c-common.c (warn_unknown_pragmas): Do not define.
9507 * c-common.h (warn_unknown_pragmas): Do not declare.
9508
3f46d6a5
MLI
95092012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
9510
9511 PR c/51294
9512 * c-common.c (conversion_warning): Handle conditional expressions.
9513
880661a4
JW
95142012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
9515
9516 PR c++/54930
9517 * c.opt (Wreturn_local_addr): Define new option.
9518
4514a96b
JM
95192012-10-25 Jason Merrill <jason@redhat.com>
9520
f14edc1a
JM
9521 * c.opt (Wvirtual-move-assign): New.
9522
4514a96b
JM
9523 * c.opt (Winherited-variadic-ctor): New.
9524
93100c6b
MG
95252012-10-25 Marc Glisse <marc.glisse@inria.fr>
9526
9527 PR c++/54427
9528 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
9529
1efcb8c6
JM
95302012-10-23 Joseph Myers <joseph@codesourcery.com>
9531
9532 * c-common.h (pch_cpp_save_state): Declare.
9533 * c-target.def (c_preinclude): New hook.
9534 * c-opts.c (done_preinclude): New.
9535 (push_command_line_include): Handle default preincluded header.
9536 (cb_file_change): Call pch_cpp_save_state when calling
9537 push_command_line_include.
9538 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
9539 (pch_cpp_save_state): New.
9540 (pch_init): Call pch_cpp_save_state conditionally, instead of
9541 calling cpp_save_state.
9542
4a0ae68e
MLI
95432012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9544
9545 PR c/53063
9546 PR c/40989
9547 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
9548 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
9549 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
9550 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
9551 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
9552 * c-opts.c (c_common_handle_option): Remove explicit handling from
9553 here.
9554 (c_common_post_options): Likewise.
9555
67e4210b
EB
95562012-10-18 Eric Botcazou <ebotcazou@adacore.com>
9557
9558 * c-ada-spec.c (LOCATION_COL): Delete.
9559 (compare_location): New function.
9560 (compare_node): Use it.
9561 (compare_comment): Likewise.
9562
65d4f2cd
MLI
95632012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
9564
9565 PR c/53063
9566 PR c/40989
9567 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
9568 * c-opts.c (c_common_handle_option): Do not set them here. Add
9569 comment.
9570 (c_common_post_options): Likewise.
9571
909881cb
EB
95722012-10-16 Eric Botcazou <ebotcazou@adacore.com>
9573
9574 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
9575 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
9576 Remove POINTER_TYPE handling, add large unsigned handling and use
9577 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
9578
3a785c97
JJ
95792012-10-12 Jakub Jelinek <jakub@redhat.com>
9580
9581 PR c/54381
9582 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
9583 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
9584 locs and array of 3 trees instead of just single loc and single
9585 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
9586 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
9587 For *cmp* builtins that take two sources strings report warnings
9588 about first and second source, not about destination and source.
9589
5e54f81d
MG
95902012-10-12 Marc Glisse <marc.glisse@inria.fr>
9591
9592 PR c++/53055
9593 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
9594
f5b02f1e
EB
95952012-10-11 Eric Botcazou <ebotcazou@adacore.com>
9596
9597 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
9598 declaring something coming from another file.
9599
b46dbc6c
AC
96002012-10-10 Arnaud Charlet <charlet@adacore.com>
9601
f5b02f1e 9602 PR ada/54845
b46dbc6c
AC
9603 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
9604
5d9de0d0
PC
96052012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
9606
9607 PR c++/54194
9608 * c-common.c (warn_about_parentheses): Add location_t parameter;
9609 use EXPR_LOC_OR_LOC.
9610 * c-common.h: Update declaration.
9611
a212e43f
MG
96122012-10-09 Marc Glisse <marc.glisse@inria.fr>
9613
9614 PR c++/54427
9615 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
9616 more operations. Make error messages optional.
9617 * c-common.h (enum stv_conv): Moved from c-typeck.c.
9618 (scalar_to_vector): Declare.
9619
b1db7f91
JM
96202012-10-08 Jason Merrill <jason@redhat.com>
9621
9622 * c-common.c (c_common_reswords): Add thread_local.
9623
e28d52cf
DS
96242012-10-08 Dodji Seketeli <dodji@redhat.com>
9625
9626 PR c++/53528 C++11 attribute support
9627 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
9628 new functions.
9629 * c-common.c (check_cxx_fundamental_alignment_constraints): New
9630 static function.
9631 (handle_aligned_attribute): In choose strictest alignment
9632 among many. Use new check_cxx_fundamental_alignment_constraints.
9633 (handle_transparent_union_attribute): In c++11 attribute syntax,
9634 don't look through typedefs.
9635
3b78de56
AC
96362012-10-04 Arnaud Charlet <charlet@adacore.com>
9637
9638 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
9639 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
9640 out of dumpfile.h.
9641
6040bb5f
DC
96422012-09-25 Dehao Chen <dehao@google.com>
9643
9644 PR middle-end/54645
3b78de56 9645 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
9646 map when read in the pch.
9647
3f8257db 96482012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
9649
9650 * c-ada-spec.c: Style fixes.
9651
3f8257db 96522012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
9653
9654 * c.opt (-fada-spec-parent): Define new command line switch.
9655 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
9656 is specified, generate binding spec as a child of the specified unit.
9657
0ccb505d
PC
96582012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
9659 Manuel López-Ibáñez <manu@gcc.gnu.org>
9660
9661 PR c++/53210
9662 * c.opt ([Winit-self]): Enabled by -Wall in C++.
9663
c583af79
AC
96642012-08-23 Arnaud Charlet <charlet@adacore.com>
9665
9666 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
9667 for pointers, and add missing Convention C pragma.
9668 (print_ada_struct_decl): Add missing aliased keyword.
9669 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
9670
1a4049e7
JJ
96712012-08-17 Jakub Jelinek <jakub@redhat.com>
9672
9673 * c-common.c (sizeof_pointer_memaccess_warning): New function.
9674 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
9675 * c-opts.c (c_common_handle_option): Enable it for -Wall.
9676 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
9677 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
9678
70b5e7dc
RG
96792012-08-10 Richard Guenther <rguenther@suse.de>
9680
9681 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
9682
f8923f7e
SB
96832012-08-07 Steven Bosscher <steven@gcc.gnu.org>
9684
9685 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
9686 instead of separate pp_newline and pp_flush.
9687 (print_c_tree): Likewise.
9688
e45abe1f
RH
96892012-07-26 Richard Henderson <rth@redhat.com>
9690
9691 * c-common.c (handle_hot_attribute): Allow labels.
9692 (handle_cold_attribute): Likewise.
9693
332f1d24
JJ
96942012-07-20 Jakub Jelinek <jakub@redhat.com>
9695
9696 PR c++/28656
9697 * c-common.c (check_function_nonnull): Handle multiple nonnull
9698 attributes properly.
9699
7ee2468b
SB
97002012-07-16 Steven Bosscher <steven@gcc.gnu.org>
9701
9702 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
9703 * c-ada-spec.c: Likewise.
9704 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
9705
ee7b28eb
SB
97062012-07-14 Steven Bosscher <steven@gcc.gnu.org>
9707
9708 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
9709 Remove code conditional on it.
9710
6bdf3519
SB
97112012-07-11 Steven Bosscher <steven@gcc.gnu.org>
9712
9713 * c-gimplify.c: Do not include basic-block.h.
9714 * c-common.c: Do not include linfuncs.h.
9715
532aafad
SB
97162012-07-08 Steven Bosscher <steven@gcc.gnu.org>
9717
9718 * c-common.h: Include tree.h.
9719
8d0d1915
JM
97202012-07-02 Jason Merrill <jason@redhat.com>
9721
9722 PR c++/53524
9723 * c-common.c (get_priority): Call default_conversion.
9724
fbc873ad
UB
97252012-07-01 Uros Bizjak <ubizjak@gmail.com>
9726
9727 * c-pch.c (c_common_write_pch): Remove unused variables.
9728
d4a10d0a
SB
97292012-06-29 Steven Bosscher <steven@gcc.gnu.org>
9730
9731 * cppspec.c: Moved from gcc/ to here.
9732
6f3a2e23
KT
97332012-06-27 Kai Tietz <ktietz@redhat.com>
9734
9735 PR preprocessor/37215
9736 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
9737
8ca92d04
SB
97382012-06-21 Steven Bosscher <steven@gcc.gnu.org>
9739
9740 * c-common.h (c_common_print_pch_checksum): Remove.
9741 * c-pch.c: Do not include output.h.
9742 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
9743 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
9744 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
9745 (struct c_pch_header): Remove.
9746 (get_ident): Update gpch version.
9747 (pch_init): Do not print executable_checksum to asm_out_file.
9748 Do not fail if there is no asm_out_file to read back from. Set
9749 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
9750 (c_common_write_pch): Verify that nothing was written to asm_out_file
9751 since pch_init was called. Do not write a c_pch_header, and do not
9752 copy from asm_out_file to the PCH.
9753 (c_common_read_pch): Do not read a c_pch_header, and do not restore
9754 the content of asm_out_file from the PCH.
9755 (c_common_print_pch_checksum): Remove.
9756 * c-opts.c (c_common_init): Print out executable_checksum directly.
9757
70f42967
SB
97582012-06-19 Steven Bosscher <steven@gcc.gnu.org>
9759
9760 * c-target.def (objc_declare_unresolved_class_reference,
9761 objc_declare_class_definition): Add new hooks.
9762
a8781821
SB
97632012-06-19 Steven Bosscher <steven@gcc.gnu.org>
9764
9765 * c-lex.c: Do not include output.h.
9766 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
9767 Remove uses of ASM_OUTPUT_IDENT.
9768
9e1a8dd1
RR
97692012-06-15 Marc Glisse <marc.glisse@inria.fr>
9770
9771 PR c++/51033
9772 * c-common.h (c_build_vec_perm_expr): Move decl here.
9773 * c-common.c (c_build_vec_perm_expr): Move definition
9774 here.
9775
6f07a821
SB
97762012-06-06 Steven Bosscher <steven@gcc.gnu.org>
9777
9778 * c.opt (fconserve-space): Turn into a no-op.
9779
9faeb493 97802012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
9781
9782 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
9783 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
9784 both the start and end of the function.
9785
a4b7d13c
SB
97862012-06-04 Steven Bosscher <steven@gcc.gnu.org>
9787
9788 * c-common.c: Do not include output.h.
9789 * c-pragma.c: Likewise.
9790
c265f413
SA
97912012-06-04 Steven Bosscher <steven@gcc.gnu.org>
9792
9793 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
9794 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
9795 (lang_decl_name): Handle namespace decls.
9796
be7a421e
SB
97972012-05-31 Steven Bosscher <steven@gcc.gnu.org>
9798
9799 * c-ada-spec.c: Do not include output.h.
9800 * c-semantics.c: Likewise.
9801
65de6659
JM
98022012-05-29 Joseph Myers <joseph@codesourcery.com>
9803
9804 * c-common.c: Fix typo.
9805
ca5f4331
MM
98062012-05-29 Michael Matz <matz@suse.de>
9807
9808 * c-common.h (c_expand_decl): Remove prototype.
9809
4f7f7aca
MLI
98102012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9811
9812 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
9813 * c-opts.c (c_common_handle_option): Remove code handling
9814 warn_missing_braces.
9815
4a792f9b
PC
98162012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
9817
9818 PR c++/25137
9819 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
9820 -Wmissing_braces.
9821
650dc14a
DS
98222012-05-22 Dodji Seketeli <dodji@redhat.com>
9823
9824 PR c++/53322
9825 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
9826
9b095bf1
MLI
98272012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
9828
9829 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
9830 * c-opts.c (c_common_handle_option): Do not handle explicitly
9831 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
9832
0b2c4be5
DS
98332012-05-16 Dodji Seketeli <dodji@redhat.com>
9834
9835 PR preprocessor/7263
ab20d992 9836 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
0b2c4be5
DS
9837 to cpp_classify_number. For diagnostics, use the precise location
9838 instead of the global input_location.
9839
a1bde5af
PC
98402012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
9841
d02924ef 9842 PR c++/11856
a1bde5af
PC
9843 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
9844
d1ede5f4
BS
98452012-05-14 Bernd Schmidt <bernds@codesourcery.com>
9846
a1bde5af 9847 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 9848
f2bc201f
MLI
98492012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
9850
9851 PR 53063
9852 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
9853 Wreorder): Use LangEnabledBy.
9854 * c-opts.c (c_common_handle_option): Do not enable them
9855 explicitly. Call lang-specific generated functions.
9856 (c_common_post_options): Do not set them here.
9857
95744782
MLI
98582012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
9859
9860 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
9861 Wmissing-field-initializers,Wmissing-parameter-type,
9862 Wold-style-declaration,Woverride-init): Use EnabledBy.
9863 * c-opts.c (c_common_post_options): Do not set here explicitly.
9864
7d5a5747
MLI
98652012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
9866
9867 PR 53063
9868 * c-opts.c (c_common_handle_option): Use handle_generated_option
9869 to enable sub-options.
9870
5a3c9cf2
PC
98712012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
9872
9873 PR c++/53158
9874 * c-common.c (warnings_for_convert_and_check): Use warning_at.
9875
3ac8781c
RG
98762012-05-10 Richard Guenther <rguenther@suse.de>
9877
9878 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
9879 adjust commentary about TYPE_IS_SIZETYPE types.
9880
1e537948
MLI
98812012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9882
9883 PR c++/53261
9884 * c-common.c (warn_logical_operator): Check that argument of
9885 integer_zerop is not NULL.
9886
f2c4a785
MLI
98872012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
9888
9889 PR c/43772
9890 * c-common.c (warn_logical_operator): Do not warn if either side
9891 is already true or false.
9892
50f305ca
MLI
98932012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
9894
9895 PR c/51712
9896 * c-common.c (expr_original_type): New.
9897 (shorten_compare): Do not warn for enumeration types.
9898
0c3641b0
MLI
98992012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
9900
9901 * c.opt (fpermissive): Add Var(flag_permissive).
9902
7edaa4d2
MG
99032012-04-30 Marc Glisse <marc.glisse@inria.fr>
9904
9905 PR c++/51033
9906 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
9907 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
9908
b9c8da34
DS
99092012-04-30 Dodji Seketeli <dodji@redhat.com>
9910
9911 Add -Wvarargs option
ab20d992 9912 * c.opt (Wvarargs): Define new option.
b9c8da34 9913
e6c69da0
MLI
99142012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9915
9916 * c-common.c (check_function_arguments): Replace
9917 Wmissing-format-attribute with Wsuggest-attribute=format.
9918
90137d8f
MLI
99192012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9920
9921 * c.opt (Wsuggest-attribute=format): New. Alias of
9922 Wmissing-format-attribute.
9923 * c-format.c (decode_format_type): Replace
9924 Wmissing-format-attribute with Wsuggest-attribute=format.
9925 (check_function_format): Likewise.
9926
9faeb493 99272012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
9928
9929 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
9930 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
9931 * c.opt: Add Wliteral-suffix.
9932
c1771a20
MLI
99332012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
9934
9935 PR c/44774
9936 * c.opt (Wpedantic): New.
9937 (pedantic): Alias Wpedantic.
9938 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
9939 (c_common_post_options): Likewise.
9940 (sanitize_cpp_opts): Likewise.
9941 * c-lex.c (interpret_float): Likewise.
9942 * c-format.c (check_format_types): Likewise.
9943 * c-common.c (pointer_int_sum): Likewise.
9944 (c_sizeof_or_alignof_type): Likewise.
9945 (c_add_case_label): Likewise.
9946 (c_do_switch_warnings): Likewise.
9947 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
9948
04b391c1
JM
99492012-04-15 Jason Merrill <jason@redhat.com>
9950
9951 PR c++/52818
9952 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
9953 (C_STD_NAME): Distinguish between C++98 and C++11.
9954
ac868f29
EB
99552012-04-11 Eric Botcazou <ebotcazou@adacore.com>
9956
9957 PR target/52624
9958 * c-common.h (uint16_type_node): Rename into...
9959 (c_uint16_type_node): ...this.
9960 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
9961 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
9962
fd4116f4
MLI
99632012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
9964
9965 * c-common.c (warn_if_unused_value): Move definition to here.
9966 * c-common.h (warn_if_unused_value): Move declaration to here.
9967
573ac65e
WB
99682012-03-23 William Bader <williambader@hotmail.com>
9969
9970 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
9971
552b8185
JM
99722012-03-20 Jason Merrill <jason@redhat.com>
9973
9974 * c-common.h (enum cxx_dialect): Add cxx1y.
9975 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
9976 test.
9977 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
9978 * c-opts.c (c_common_post_options): Likewise.
9979 (set_std_cxx1y): New.
9980 (c_common_handle_option): Call it.
9981 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
9982
04398fa8
PC
99832012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
9984
9985 PR c++/14710
9986 * c.opt ([Wuseless-cast]): Add.
9987
d2a12ae7
RG
99882012-03-16 Richard Guenther <rguenther@suse.de>
9989
9990 * c-pretty-print.c (pp_c_initializer_list): Adjust.
9991
a12bf402
MLI
99922012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9993
9994 PR c++/44783
9995 * c.opt (ftemplate-backtrace-limit) Add.
9996
5c30094f
RO
99972012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9998
9999 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
10000 handling.
10001 * c-pragma.c (handle_pragma_extern_prefix): Remove.
10002 (init_pragma): Don't register extern_prefix.
10003
21fa2faf
RG
100042012-03-12 Richard Guenther <rguenther@suse.de>
10005
10006 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
10007 (builtin_type_for_size): Likewise.
10008
e3793c6f
JJ
100092012-02-13 Jakub Jelinek <jakub@redhat.com>
10010
10011 PR c++/52215
10012 * c-common.c (sync_resolve_params): Don't decide whether to convert
10013 or not based on TYPE_SIZE comparison, convert whenever arg_type
10014 is unsigned INTEGER_TYPE.
10015
93286335
PC
100162012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
10017
10018 PR c/52118
10019 * c.opt ([Wunused-local-typedefs]): Fix description.
10020
7a421706
MS
100212012-01-24 Mike Stump <mikestump@comcast.net>
10022
10023 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
10024 exactly.
10025
ba9b1f11
RG
100262012-01-18 Richard Guenther <rguenther@suse.de>
10027
10028 * c-opts.c (c_common_post_options): Reset LTO flags if
10029 we are about to generate a PCH.
10030
465406be
PC
100312012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
10032
10033 PR c++/51777
10034 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
10035 use pp_unsigned_wide_integer.
10036
aee15221
RG
100372012-01-10 Richard Guenther <rguenther@suse.de>
10038
10039 PR middle-end/51806
10040 * c-opts.c (c_common_handle_option): Move -Werror handling
10041 to language independent code.
10042
5720c0dc
RG
100432012-01-05 Richard Guenther <rguenther@suse.de>
10044
10045 PR middle-end/51764
10046 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
10047 from common.opt.
10048
73ac190a
PC
100492011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
10050
10051 PR c++/51316
10052 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
10053 of array types with an unknown bound.
10054
48b0b196
JM
100552011-12-20 Joseph Myers <joseph@codesourcery.com>
10056
10057 * c-common.c (flag_isoc99): Update comment to refer to C11.
10058 (flag_isoc1x): Change to flag_isoc11.
10059 * c-common.h (flag_isoc99): Update comment to refer to C11.
10060 (flag_isoc1x): Change to flag_isoc11.
10061 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
10062 C11.
10063 * c-opts.c (set_std_c1x): Change to set_std_c11.
10064 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
10065 Call set_std_c11.
10066 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
10067 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
10068 * c.opt (std=c1x): Change to std=c11. Document as non-draft
10069 standard.
10070 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
10071 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
10072 (std=gnu1x): Make alias of std=gnu11.
10073
d58d6eb5
JM
100742011-12-19 Jason Merrill <jason@redhat.com>
10075
10076 PR c++/51228
10077 * c-common.c (handle_transparent_union_attribute): Check the first
10078 field if the type is complete.
10079
b3908fcc
JW
100802011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
10081
10082 PR libstdc++/51365
10083 * c-common.c (RID_IS_FINAL): Add.
10084 * c-common.h (RID_IS_FINAL): Add.
10085
fea3ca91
IS
100862011-11-30 Iain Sandoe <iains@gcc.gnu.org>
10087
10088 * c.opt (fgnu-runtime): Provide full description.
10089 (fnext-runtime): Likewise.
10090 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
10091
62bad7cd
AM
100922011-11-28 Andrew MacLeod <amacleod@redhat.com>
10093
10094 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
10095 predefines in one place. Add LOCK_FREE predefines.
10096 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
10097 new func.
10098
c466c4ff
AM
100992011-11-24 Andrew MacLeod <amacleod@redhat.com>
10100
10101 PR c/51256
9faeb493 10102 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 10103 conditions
9faeb493
UB
10104 (resolve_overloaded_atomic_exchange,
10105 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
10106 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
10107 error_mark_node for error conditions.
9faeb493 10108
a5952633
RG
101092011-11-08 Richard Guenther <rguenther@suse.de>
10110
10111 PR middle-end/51010
ab20d992 10112 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
a5952633 10113
0a35513e
AH
101142011-11-07 Richard Henderson <rth@redhat.com>
10115 Aldy Hernandez <aldyh@redhat.com>
10116 Torvald Riegel <triegel@redhat.com>
10117
10118 Merged from transactional-memory.
10119
10120 * c-common.c (handle_tm_wrap_attribute,
10121 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
10122 (struct c_common_reswords): Added __transaction* keywords.
10123 (struct c_common_attribute_table): Added transaction* and tm_regparm
10124 attributes.
10125 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
10126 masks.
10127 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
10128 find_tm_attribute): Declare.
10129
6d87092d
JM
101302011-11-07 Jason Merrill <jason@redhat.com>
10131
10132 PR c++/35688
10133 * c-common.c, c-common.h: Revert yesterday's changes.
10134
8e7860a1
JM
101352011-11-06 Jason Merrill <jason@redhat.com>
10136
10137 PR c++/35688
10138 * c-common.c (decl_has_visibility_attr): Split out from...
10139 (c_determine_visibility): ...here.
10140 * c-common.h: Declare it.
10141
d19fa6b5
JM
101422011-11-06 Joseph Myers <joseph@codesourcery.com>
10143
10144 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
10145 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
10146 type.
10147 (check_user_alignment): New. Split out of
10148 handle_aligned_attribute. Disallow integer constants with
10149 noninteger types. Conditionally allow zero.
10150 (handle_aligned_attribute): Use check_user_alignment.
10151 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
10152
86951993
AM
101532011-11-06 Andrew MacLeod <amacleod@redhat.com>
10154 Richard Henderson <rth@redhat.com>
10155
10156 Merged from cxx-mem-model.
10157
10158 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 10159 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
10160 parameters that are the same type size.
10161 (get_atomic_generic_size): New. Find size of generic
10162 atomic function parameters and do typechecking.
10163 (add_atomic_size_parameter): New. Insert size into parameter list.
10164 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
10165 either __atomic_exchange_n or external library call.
9faeb493 10166 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 10167 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 10168 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
10169 __atomic_load_n or an external library call.
10170 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
10171 __atomic_store_n or an external library call.
10172 (resolve_overloaded_builtin): Handle new __atomic builtins.
10173
cf9e9959
EB
101742011-11-04 Eric Botcazou <ebotcazou@adacore.com>
10175
10176 PR c++/50608
10177 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
10178 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
10179 <INDIRECT_REF>: Return the argument.
10180 <ARRAY_REF>: Remove special code for negative offset.
10181 Call fold_build_pointer_plus instead of size_binop.
10182 (fold_offsetof): Remove STOP_REF argument and adjust.
10183 * c-common.h (fold_offsetof_1): Declare.
10184 (fold_offsetof): Remove STOP_REF argument.
10185
25339f10
JM
101862011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
10187
10188 PR c++/50810
10189 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
10190 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
10191 Wnarrowing for C++0x and C++98.
10192 * c.opt ([Wnarrowing]): Update.
10193
89401152
PC
101942011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
10195
10196 PR c++/44277
10197 * c.opt: Add Wzero-as-null-pointer-constant.
10198
97e3ad20
JM
101992011-10-31 Jason Merrill <jason@redhat.com>
10200
15694fdd
JM
10201 * c.opt (-fdeduce-init-list): Off by default.
10202
97e3ad20
JM
10203 PR c++/50920
10204 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
10205 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
10206 and -Wc++11-compat.
10207 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
10208
fb9120e3
RAV
102092011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
10210
10211 PR c++/30066
10212 * c.opt (fvisibility-inlines-hidden): Description change.
10213
3ce4f9e4
ESR
102142011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
10215
10216 Implement C++11 user-defined literals.
10217 * c-common.c (build_userdef_literal): New.
10218 * c-common.def: New tree code.
10219 * c-common.h (tree_userdef_literal): New tree struct and accessors.
10220 * c-lex.c (interpret_float): Add suffix parm.
10221 (c_lex_with_flags): Build literal tokens.
10222
5f53c243
PC
102232011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
10224
10225 PR c++/50841
10226 Revert:
10227 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
10228
10229 PR c++/50810
10230 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
10231 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
10232 Wnarrowing for C++0x and C++98.
10233 * c.opt ([Wnarrowing]): Update.
10234
263734e1
PC
102352011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
10236
10237 PR c++/50810
10238 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
10239 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
10240 Wnarrowing for C++0x and C++98.
10241 * c.opt ([Wnarrowing]): Update.
10242
d2e312d7
PC
102432011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
10244
10245 PR c++/45385
10246 * c-common.c (conversion_warning): Remove code looking for
10247 artificial operands.
10248
d17687f6
DS
102492011-10-18 Dodji Seketeli <dodji@redhat.com>
10250
10251 PR bootstrap/50760
10252 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 10253 !NO_IMPLICIT_EXTERN_C.
d17687f6 10254
fc8396e9
PC
102552011-10-17 Michael Spertus <mike_spertus@symantec.com>
10256
10257 * c-common.c (c_common_reswords): Add __bases,
10258 __direct_bases.
10259 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
10260
102612011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
10262
10263 PR c++/50757
10264 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
10265
847e697a
TT
102662011-10-15 Tom Tromey <tromey@redhat.com>
10267 Dodji Seketeli <dodji@redhat.com>
10268
10269 * c.opt (fdebug-cpp): New option.
10270 * c-opts.c (c_common_handle_option): Handle the option.
10271 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
10272 output stream in parameter. Factorized from ...
10273 (maybe_print_line): ... this. Dump location debug information when
10274 -fdebug-cpp is in effect.
10275 (print_line_1): New static function. Takes an output stream in
10276 parameter. Factorized from ...
10277 (print_line): ... here. Dump location information when -fdebug-cpp
10278 is in effect.
10279 (scan_translation_unit): Dump location information when
10280 -fdebug-cpp is in effect.
10281
92582b75
TT
102822011-10-15 Tom Tromey <tromey@redhat.com>
10283 Dodji Seketeli <dodji@redhat.com>
10284
10285 * c.opt (ftrack-macro-expansion): New option. Handle it with and
10286 without argument.
10287 * c-opts.c (c_common_handle_option)<case
10288 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
10289 cases. Handle -ftrack-macro-expansion with and without argument.
10290
46427374
TT
102912011-10-15 Tom Tromey <tromey@redhat.com>
10292 Dodji Seketeli <dodji@redhat.com>
10293
10294 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
10295 (print_line, cb_define, do_line_change): Adjust to avoid touching
10296 the internals of struct line_map. Use the public API instead.
10297 * c-pch.c (c_common_read_pch): Likewise.
10298 * c-lex.c (fe_file_change): Likewise.
10299
fc8396e9
PC
103002011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
10301
10302 PR c++/17212
10303 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
10304
103052011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
10306
10307 PR c++/33067
10308 * c-pretty-print.c (pp_c_floating_constant): Output
10309 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
10310
e79983f4
MM
103112011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
10312
10313 * c-common.c (def_builtin_1): Delete old interface with two
10314 parallel arrays to hold standard builtin declarations, and replace
10315 it with a function based interface that can support creating
10316 builtins on the fly in the future. Change all uses, and poison
10317 the old names. Make sure 0 is not a legitimate builtin index.
10318 * c-omp.c (c_finish_omp_barrier): Ditto.
10319 (c_finish_omp_taskwait): Ditto.
10320 (c_finish_omp_flush): Ditto.
10321
6637388f
TG
103222011-10-11 Tristan Gingold <gingold@adacore.com>
10323
10324 * c.opt: (fallow-parameterless-variadic-functions): New.
10325
3797cb21
DS
103262011-09-08 Dodji Seketeli <dodji@redhat.com>
10327
10328 PR c++/33255 - Support -Wunused-local-typedefs warning
10329 * c-common.h (struct c_language_function::local_typedefs): New
10330 field.
9faeb493
UB
10331 (record_locally_defined_typedef, maybe_record_typedef_use)
10332 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 10333 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
10334 (maybe_record_typedef_use)
10335 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
10336 * c.opt: Declare new -Wunused-local-typedefs flag.
10337
693ddb1b
EB
103382011-09-06 Eric Botcazou <ebotcazou@adacore.com>
10339
10340 PR middle-end/50266
10341 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
10342 computations.
10343
830c740f
RG
103442011-09-05 Richard Guenther <rguenther@suse.de>
10345
10346 * c-common.c (complete_array_type): Use ssize_int (-1) instead
10347 of integer_minus_one_node for empty array upper bounds.
10348
892a371f
DS
103492011-08-28 Dodji Seketeli <dodji@redhat.com>
10350
10351 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
10352 it's the first time it's being called on this main TU.
10353
0e3fdb48
RB
103542011-08-24 Richard Guenther <rguenther@suse.de>
10355
10356 PR c/49396
10357 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
10358
103592011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
10360
10361 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
10362 defined in cpp_init_builtins and c_cpp_builtins.
10363
d4a83c10
JM
103642011-08-19 Joseph Myers <joseph@codesourcery.com>
10365
10366 * c-common.c (c_common_reswords): Add __builtin_complex.
10367 * c-common.h (RID_BUILTIN_COMPLEX): New.
10368
bbceee64
JM
103692011-08-18 Joseph Myers <joseph@codesourcery.com>
10370
10371 * c-common.c (c_common_reswords): Add _Noreturn.
10372 (keyword_is_function_specifier): Handle RID_NORETURN.
10373 * c-common.h (RID_NORETURN): New.
10374
3f8257db 103752011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
10376
10377 * c-common.c (unsafe_conversion_p): New function. Check if it is
10378 unsafe to convert an expression to the type.
10379 (conversion_warning): Adjust, use unsafe_conversion_p.
10380 * c-common.h (unsafe_conversion_p): New function declaration.
10381
20906c66
JJ
103822011-08-02 Jakub Jelinek <jakub@redhat.com>
10383
10384 * c-common.h (c_finish_omp_atomic): Adjust prototype.
10385 (c_finish_omp_taskyield): New prototype.
10386 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
10387 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
10388 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
10389 or RHS1 have side-effects, evaluate those too in the right spot,
10390 if it is a decl and LHS is also a decl, error out if they
10391 aren't the same.
10392 (c_finish_omp_taskyield): New function.
10393 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
10394 * c-pragma.c (omp_pragmas): Add taskyield.
10395 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
10396 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
10397 PRAGMA_OMP_CLAUSE_MERGEABLE.
10398
770e5a2e
DS
103992011-07-25 Dodji Seketeli <dodji@redhat.com>
10400
10401 * c-common.h (set_underlying_type): Remove parm name from
10402 declaration.
10403
1baae426
RG
104042011-07-25 Romain Geissler <romain.geissler@gmail.com>
10405
10406 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 10407
fcb21722
JM
104082011-07-22 Jason Merrill <jason@redhat.com>
10409
76f86d00
JM
10410 PR c++/49793
10411 * c.opt (Wnarrowing): New.
10412
3a636414
JM
10413 PR c++/30112
10414 * c-common.h: Declare c_linkage_bindings.
10415 * c-pragma.c (handle_pragma_redefine_extname): Use it.
10416
fcb21722
JM
10417 PR c++/49813
10418 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
10419 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
10420 as flag_isoc99 for 'restrict'.
10421 (pp_c_specifier_qualifier_list): Likewise for _Complex.
10422
02614448
ILT
104232011-07-21 Ian Lance Taylor <iant@google.com>
10424
10425 PR middle-end/49705
10426 * c-common.c (c_disable_warnings): New static function.
10427 (c_enable_warnings): New static function.
10428 (c_fully_fold_internal): Change local unused_p to bool. Call
10429 c_disable_warnings and c_enable_warnings rather than change
10430 c_inhibit_evaluation_warnings.
10431
34429675
JM
104322011-07-20 Jason Merrill <jason@redhat.com>
10433
10434 PR c++/6709 (DR 743)
10435 PR c++/42603 (DR 950)
10436 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
10437 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
10438 (CPP_DECLTYPE): New.
10439 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
10440
5d49b6a7
RG
104412011-07-19 Richard Guenther <rguenther@suse.de>
10442
10443 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
10444 * c-omp.c (c_finish_omp_for): Likewise.
10445
e84a58ff
EB
104462011-07-12 Eric Botcazou <ebotcazou@adacore.com>
10447
10448 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
10449 body on the next line.
10450
329af3c7
JM
104512011-07-08 Jason Merrill <jason@redhat.com>
10452
4063e61b
JM
10453 PR c++/45437
10454 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
10455
329af3c7
JM
10456 PR c++/49673
10457 * c-common.c (c_apply_type_quals_to_decl): Don't check
10458 TYPE_NEEDS_CONSTRUCTING.
10459
1a072294
RG
104602011-07-06 Richard Guenther <rguenther@suse.de>
10461
10462 * c-common.c (c_common_nodes_and_builtins):
10463 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
10464
fce5dddd
RG
104652011-07-05 Richard Guenther <rguenther@suse.de>
10466
10467 * c-common.c (c_common_nodes_and_builtins): Build all common
10468 tree nodes first.
10469
45d439ac
JJ
104702011-06-27 Jakub Jelinek <jakub@redhat.com>
10471
56300785
JJ
10472 * c-common.h (c_tree_chain_next): New static inline function.
10473
45d439ac
JJ
10474 * c-common.c (check_builtin_function_arguments): Handle
10475 BUILT_IN_ASSUME_ALIGNED.
10476
e0a8ecf2
AM
104772011-06-21 Andrew MacLeod <amacleod@redhat.com>
10478
10479 * c-common.c: Add sync_ or SYNC__ to builtin names.
10480 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
10481
104822011-06-20 Pierre Vittet <piervit@pvittet.com>
10483
10484 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
10485 handler.
10486 (gen_pragma_handler): New union.
10487 (internal_pragma_handler): New type.
10488 (c_register_pragma_with_data)
10489 (c_register_pragma_with_expansion_and_data): New functions.
10490
10491 * c-pragma.c (registered_pragmas, c_register_pragma_1)
10492 (c_register_pragma, c_register_pragma_with_expansion)
10493 (c_invoke_pragma_handler): Changed to work with
10494 internal_pragma_handler.
10495 (c_register_pragma_with_data)
10496 (c_register_pragma_with_expansion_and_data): New functions.
10497
677f3fa8
JM
104982011-06-14 Joseph Myers <joseph@codesourcery.com>
10499
10500 * c-common.c: Include common/common-target.h.
10501 (handle_section_attribute): Use
10502 targetm_common.have_named_sections.
10503 * c-cppbuiltin.c: Include common/common-target.h.
10504 (c_cpp_builtins): Use targetm_common.except_unwind_info.
10505
d7fc8c14
RG
105062011-06-10 Richard Guenther <rguenther@suse.de>
10507
10508 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
10509 to print a IDENTIFIER_NODE.
10510
10e48e39
RO
105112011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10512 Joseph Myers <joseph@codesourcery.com>
10513
10514 * c.opt (fbuilding-libgcc): New option.
10515 * c-cppbuiltin.c (c_cpp_builtins): Define
10516 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
10517
6976ae51
JM
105182011-06-07 Jason Merrill <jason@redhat.com>
10519
3ff60975
JM
10520 * c-common.c (max_tinst_depth): Lower default to 900.
10521
6976ae51
JM
10522 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
10523
009db074
RG
105242011-06-07 Richard Guenther <rguenther@suse.de>
10525
10526 * c-common.c (c_common_nodes_and_builtins): Do not set
10527 size_type_node or call set_sizetype.
10528
b4592b92
DS
105292011-06-07 Dodji Seketeli <dodji@redhat.com>
10530
10531 PR debug/49130
10532 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 10533 type when using pointer comparison to compare types.
b4592b92 10534
014ab419
JW
105352011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
10536
10537 * c.opt: Add -Wdelete-non-virtual-dtor.
10538 * c-opts.c (c_common_handle_option): Include it in -Wall.
10539
4f60111f
NF
105402011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
10541
10542 PR bootstrap/49190
10543
10544 Revert:
10545 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
10546
10547 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
10548 not tree_common.
10549
4cc4f2f4
JJ
105502011-05-27 Jakub Jelinek <jakub@redhat.com>
10551
10552 PR c++/49165
10553 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
10554 C++ don't call c_common_truthvalue_conversion on void type arms.
10555
38e01f9e
NF
105562011-05-27 Nathan Froyd <froydnj@codesourcery.com>
10557
10558 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
10559 (stmt_list_stack): Define.
10560 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
10561 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
10562
92e948a8
NF
105632011-05-26 Nathan Froyd <froydnj@codesourcery.com>
10564
10565 * c-common.c (warning_candidate_p): Check for BLOCKs.
10566
a2fc3e63
NF
105672011-05-26 Nathan Froyd <froydnj@codesourcery.com>
10568
10569 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
10570 not tree_common.
10571
0957c029
JJ
105722011-05-25 Jakub Jelinek <jakub@redhat.com>
10573
10574 * c-common.c (def_fn_type): Remove extra va_end.
10575
828fb3ba
JM
105762011-05-23 Jason Merrill <jason@redhat.com>
10577
10578 PR c++/48106
10579 * c-common.c (c_common_get_narrower): New.
10580 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
10581
dde05067
NF
105822011-05-23 Nathan Froyd <froydnj@codesourcery.com>
10583
10584 * c-common.h (check_function_arguments): Tweak prototype of
10585 check_function_arguments.
10586 * c-common.c (check_function_arguments): Likewise. Adjust
10587 calls to check_function_nonnull, check_function_format, and
10588 check_function_sentinel.
10589 (check_function_sentinel): Take a FUNCTION_TYPE rather than
10590 separate attributes and typelist arguments. Use
10591 FOREACH_FUNCTION_ARGS to iterate over argument types.
10592
3c0d13bf
PC
105932011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
10594
10595 * c-common.c (c_common_reswords): Reorder.
10596 * c-common.h (rid): Likewise.
10597
8242dd04
NF
105982011-05-10 Nathan Froyd <froydnj@codesourcery.com>
10599
10600 * c-common.c (def_fn_type): Don't call build_function_type, call
10601 build_function_type_array or build_varargs_function_type_array
10602 instead.
10603 (c_common_nodes_and_builtins): Likewise.
10604
3d528853
NF
106052011-05-05 Nathan Froyd <froydnj@codesourcery.com>
10606
10607 * c-common.c (c_add_case_label): Omit the loc argument to
10608 build_case_label.
10609 * c-common.h (build_case_label): Remove.
10610 * c-semantics.c (build_case_label): Remove.
10611
a04a722b
JM
106122011-05-05 Joseph Myers <joseph@codesourcery.com>
10613
10614 * c-objc.h (objc_start_method_definition): Update prototype.
10615 * stub-objc.c (objc_start_method_definition): Add extra parameter.
10616
e19a18d4
NF
106172011-05-04 Nathan Froyd <froydnj@codesourcery.com>
10618
10619 * c-common.c (check_main_parameter_types): Reindent. Don't use
10620 TYPE_ARG_TYPES directly.
10621 (handle_nonnull_attribute): Likewise.
10622 (sync_resolve_params): Likewise.
10623 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
10624 to check_format_string.
10625 (handle_format_attribute): Likewise.
10626 (check_format_string): Take a function type to examine instead of
10627 a type list. Use a function_arg_iterator to step through argument
10628 types.
10629
c62c040f
RG
106302011-05-04 Richard Guenther <rguenther@suse.de>
10631
10632 * c-common.c (fix_string_type): Use size_int for index type bounds.
10633 (start_fname_decls): Do not pass NULL to build_int_cst.
10634 (c_init_attributes): Likewise.
10635 * c-lex.c (c_lex_with_flags): Likewise.
10636
c12ff9d8
JM
106372011-04-27 Jason Merrill <jason@redhat.com>
10638
10639 * c-common.c (make_tree_vector_from_list): New.
10640 * c-common.h: Declare it.
10641
304dfbe3
RG
106422011-04-26 Richard Guenther <rguenther@suse.de>
10643
10644 PR preprocessor/48248
10645 * c-ppoutput.c (maybe_print_line): Always optimize newlines
10646 for output size with -P.
10647
3c0d13bf
PC
106482011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
10649
10650 * c-common.c (struct c_common_resword): Add __underlying_type.
10651 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
10652
04695783
JM
106532011-04-20 Jim Meyering <meyering@redhat.com>
10654
10655 * c-format.c (init_dollar_format_checking): Remove useless
10656 if-before-free.
10657
0dc33c3c
NP
106582011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
10659
10660 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 10661 (objc_detect_field_duplicates): New.
0dc33c3c 10662 * stub-objc.c: Likewise.
3c0d13bf 10663
c59633d9
NP
106642011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
10665
10666 * stub-objc.c (objc_declare_protocols): Renamed to
10667 objc_declare_protocol.
10668 * c-objc.h: Likewise.
3c0d13bf 10669
32dabdaf
NP
106702011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
10671
10672 * stub-objc.c (objc_declare_class): Updated argument name.
10673
81f653d6
NF
106742011-04-12 Nathan Froyd <froydnj@codesourcery.com>
10675
10676 * c-common.h (c_common_init_ts): Declare.
10677 * c-common.c (c_common_init_ts): Define.
10678
eb345401
NP
106792011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
10680
10681 * c-objc.h (objc_build_message_expr): Updated prototype.
10682 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 10683
a358e188
MJ
106842011-04-12 Martin Jambor <mjambor@suse.cz>
10685
10686 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
10687 of cgraph_node.
10688
e6313a78
RG
106892011-04-11 Richard Guenther <rguenther@suse.de>
10690
10691 * c-common.c (complete_array_type): Build a range type of
10692 proper type.
10693
dcf0c47e
NF
106942011-04-08 Nathan Froyd <froydnj@codesourcery.com>
10695
10696 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
10697 (handle_type_generic_attribute): Likewise.
10698
1ee44b26
JM
106992011-04-07 Jason Merrill <jason@redhat.com>
10700
10701 PR c++/48450
10702 * c-common.c (c_common_truthvalue_conversion): Don't ignore
10703 conversion from C++0x scoped enum.
10704
acce4e77
JM
107052011-04-06 Joseph Myers <joseph@codesourcery.com>
10706
10707 * c-target-def.h: New file.
10708 * c-target.def: New file.
10709 * c-target.h: New file.
10710 * c-common.c (targetcm): Don't define here.
10711 * c-common.h (default_handle_c_option): Declare.
10712 * c-format.c: Include c-target.h instead of target.h.
10713 * c-opts.c: Include c-target.h instead of target.h. Explicitly
10714 include tm.h.
10715 (default_handle_c_option): Move from targhooks.c.
10716
e2eefb55
JJ
107172011-03-29 Jakub Jelinek <jakub@redhat.com>
10718
10719 PR preprocessor/48248
10720 * c-ppoutput.c (print): Add src_file field.
10721 (init_pp_output): Initialize it.
10722 (maybe_print_line): Don't optimize by adding up to 8 newlines
10723 if map->to_file and print.src_file are different file.
10724 (print_line): Update print.src_file.
10725
ba78087b
KT
107262011-03-25 Kai Tietz <ktietz@redhat.com>
10727
10728 * c-ada-spec.c (compare_comment): Use filename_cmp
10729 instead of strcmp for filename.
10730
0edf1bb2
JL
107312011-03-25 Jeff Law <law@redhat.com>
10732
adfac8df 10733 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 10734
c7dc8804
JM
107352011-03-25 Jason Merrill <jason@redhat.com>
10736
10737 * c.opt: Add -std=c++03.
10738
d1d879b1
EB
107392011-03-22 Eric Botcazou <ebotcazou@adacore.com>
10740
10741 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
10742
3f8257db 107432011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
10744
10745 PR target/12171
5050afdf
KT
10746 * c-pretty-print.c (pp_c_specifier_qualifier_list):
10747 Display allowed attributes for function pointer types.
10748 (pp_c_attributes_display): New function to display
10749 attributes having affects_type_identity flag set to true.
10750 * c-pretty-print.h (pp_c_attributes_display): New prototype.
10751
62d784f7
KT
10752 * c-common.c (c_common_attribute_table):
10753 Add new element.
10754 (c_common_format_attribute_table): Likewise.
10755
82d37118
JM
107562011-03-18 Jason Merrill <jason@redhat.com>
10757
49a000c3
JM
10758 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
10759 * c-common.h: Don't declare it here.
10760 * c-common.c: Or define it here.
10761 * c-opts.c (c_common_handle_option): Or set it here.
10762
82d37118
JM
10763 PR c++/35315
10764 * c-common.c (handle_transparent_union_attribute): Don't
10765 make a duplicate type in C++.
10766
17bc631c
JM
107672011-03-15 Jason Merrill <jason@redhat.com>
10768
10769 * c-common.c (max_constexpr_depth): New.
10770 * c-common.h: Declare it.
10771 * c-opts.c (c_common_handle_option): Set it.
10772 * c.opt (fconstexpr-depth): New option.
10773
1b9b91a6
JM
107742011-03-11 Jason Merrill <jason@redhat.com>
10775
f231b5ff
JM
10776 * c-common.c (attribute_takes_identifier_p): Add missing const.
10777
1b9b91a6
JM
10778 PR c++/46803
10779 * c-common.c (attribute_takes_identifier_p): Assume that an
10780 unknown attribute takes an identifier.
10781
a19e4d44
NF
107822011-03-07 Nathan Froyd <froydnj@codesourcery.com>
10783
10784 PR c/47786
10785 * c-common.c (c_type_hash): Call list_length instead of iterating
10786 through DECL_CHAIN. Rename 'i' to 'n_elements'.
10787
982d62f6
JJ
107882011-02-19 Jakub Jelinek <jakub@redhat.com>
10789
10790 PR c/47809
10791 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
10792
0a256240
NP
107932011-02-17 Iain Sandoe <iains@gcc.gnu.org>
10794
10795 * c.opt (fobjc-abi-version=) New.
10796 (fobjc-nilcheck): New.
10797
ba9e6dd5
NF
107982011-02-03 Nathan Froyd <froydnj@codesourcery.com>
10799
10800 PR c++/46890
10801 * c-common.h (keyword_is_decl_specifier): Declare.
10802 * c-common.c (keyword_is_decl_specifier): Define.
10803 (keyword_is_function_specifier): New function.
10804
7273813a
JJ
108052011-01-26 Jakub Jelinek <jakub@redhat.com>
10806
10807 PR c/47473
10808 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
10809 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
10810 REAL_TYPE.
10811
908ef79b
AC
108122011-01-26 Arnaud Charlet <charlet@adacore.com>
10813
10814 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
10815
237e9384
JJ
108162011-01-26 Jakub Jelinek <jakub@redhat.com>
10817
10818 PR pch/47430
10819 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
10820 after init_c_lex if pch_file is set.
10821
47ea1edf
DK
108222011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
10823
d4dba752 10824 PR c++/43601
47ea1edf
DK
10825 * c.opt (-fkeep-inline-dllexport): New switch.
10826
2aa9c6ae
RG
108272011-01-12 Richard Guenther <rguenther@suse.de>
10828
10829 PR middle-end/32511
10830 * c-common.c (handle_weak_attribute): Warn instead of error
10831 on declaring an inline function weak.
10832
7bd11157
TT
108332011-01-05 Tom Tromey <tromey@redhat.com>
10834
10835 * c-common.h (lvalue_error): Update.
10836 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
10837 not error.
10838
0e66e494 108392010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 10840
b4f588c4
NP
10841 PR objc/47075
10842 * c-objc.h (objc_finish_message_expr): Added argument to
10843 prototype.
10844
f4da8dce
NF
108452010-12-22 Nathan Froyd <froydnj@codesourcery.com>
10846
10847 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
10848 Use prototype_p.
10849
46270f14
NP
108502010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
10851
10852 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 10853 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 10854
4816c593
NF
108552010-12-10 Nathan Froyd <froydnj@codesourcery.com>
10856
10857 * c-common.h (readonly_error): Declare.
10858 * c-common.c (readonly_error): Define.
10859
7a6daeb0
NF
108602010-12-09 Nathan Froyd <froydnj@codesourcery.com>
10861
10862 * c-common.h (invalid_indirection_error): Declare.
10863 * c-common.c (invalid_indirection_error): Define.
10864
892f6119
RG
108652010-12-03 Richard Guenther <rguenther@suse.de>
10866
10867 PR c/46745
10868 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
10869 (pp_c_unary_expression): Likewise.
10870 (pp_c_expression): Likewise.
10871
6c39e757
NP
108722010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
10873
10874 * c-common.h (objc_finish_function): New.
10875 (objc_non_volatilized_type): Removed.
10876 (objc_type_quals_match): Removed.
10877 * stub-objc.c (objc_finish_function): New.
10878 (objc_non_volatilized_type): Removed.
10879 (objc_type_quals_match): Removed.
9faeb493 10880
7c475d11
JM
108812010-11-30 Joseph Myers <joseph@codesourcery.com>
10882
10883 * c-common.h (parse_optimize_options): Declare.
10884 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
10885 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
10886
71f3e391
JM
108872010-11-29 Joseph Myers <joseph@codesourcery.com>
10888
10889 * c-opts.c (check_deps_environment_vars): Use getenv instead of
10890 GET_ENVIRONMENT.
10891 * c-pch.c (O_BINARY): Don't define here.
10892 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
10893
d5fabb58
JM
108942010-11-25 Joseph Myers <joseph@codesourcery.com>
10895
10896 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
10897 targetm.except_unwind_info.
10898
299404a1
JM
108992010-11-23 Joseph Myers <joseph@codesourcery.com>
10900
10901 * c-opts.c (c_common_handle_option): Pass location to
10902 set_struct_debug_option.
10903
c98cd5bf
JM
109042010-11-23 Joseph Myers <joseph@codesourcery.com>
10905
10906 * c-common.c (visibility_options): Move from ../opts.c.
10907 * c-common.h (struct visibility_flags, visibility_options):
10908 Declare here.
10909 * c-opts.c (finish_options): Rename to c_finish_options.
10910 (c_common_init): Update call to finish_options.
10911
a9546771
NP
109122010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
10913
10914 PR objc/34033
10915 * c-lex.c (lex_string): Check that each string in an Objective-C
10916 string concat sequence starts with either one or zero '@', and
10917 that there are no spurious '@' signs at the end.
10918
24a57808
JM
109192010-11-20 Joseph Myers <joseph@codesourcery.com>
10920
10921 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
10922 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
10923 HANDLE_PRAGMA_VISIBILITY.
10924 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
10925 HANDLE_PRAGMA_VISIBILITY): Don't define.
10926 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
10927
a9aa2c3a
NF
109282010-11-20 Nathan Froyd <froydnj@codesourcery.com>
10929
10930 PR c++/16189
10931 PR c++/36888
10932 PR c++/45331
10933 * c-common.h (keyword_begins_type_specifier): Declare.
10934 (keyword_is_storage_class_specifier): Declare.
10935 (keyword_is_type_qualifier): Declare.
10936 * c-common.c (keyword_begins_type_specifier): New function.
10937 (keyword_is_storage_class_specifier): New function.
10938 (keyword_is_type_qualifier): Declare.
10939
5386338c
JM
109402010-11-19 Joseph Myers <joseph@codesourcery.com>
10941
10942 PR c/46547
10943 * c-common.c (in_late_binary_op): Define.
10944 (c_common_truthvalue_conversion): Check in_late_binary_op before
10945 calling c_save_expr.
10946 * c-common.h (in_late_binary_op): Declare.
10947
69ccdddb
JM
109482010-11-19 Joseph Myers <joseph@codesourcery.com>
10949
10950 * c-opts.c (c_common_handle_option): Update calls to
10951 set_struct_debug_option.
10952
6b192a09
NP
109532010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
10954
10955 * c-common.h (objc_declare_protocols): Added additional argument.
10956 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 10957
fb52b50a
NF
109582010-11-18 Nathan Froyd <froydnj@codesourcery.com>
10959
10960 PR c/33193
10961 * c-common.h (build_real_imag_expr): Declare.
10962 * c-semantics.c (build_real_imag_expr): Define.
10963
b37421c6
JM
109642010-11-17 Joseph Myers <joseph@codesourcery.com>
10965
10966 * c-opts.c (c_common_parse_file): Take no arguments.
10967 * c-common.h (c_common_parse_file): Update prototype.
10968
07078664
JJ
109692010-11-16 Jakub Jelinek <jakub@redhat.com>
10970
10971 PR c++/46401
10972 * c-common.c (warning_candidate_p): Don't track non-const calls
10973 or STRING_CSTs.
10974
c6a13190
ILT
109752010-11-15 Ian Lance Taylor <iant@google.com>
10976
10977 * c-lex.c (init_c_lex): Set macro debug callbacks if
10978 flag_dump_go_spec is set.
10979
925e8657
NP
109802010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
10981
10982 * c-common.h (objc_build_incr_expr_for_property_ref): New.
10983 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
10984
bb0a9581
NF
109852010-11-15 Nathan Froyd <froydnj@codesourcery.com>
10986
10987 PR preprocessor/45038
10988 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
10989 dialects.
10990
c5fa0890
JM
109912010-11-12 Joseph Myers <joseph@codesourcery.com>
10992
10993 * c-common.h (c_family_lang_mask): Declare.
10994 * c-opts.c (c_family_lang_mask): Make extern.
10995 * c-pragma.c (handle_pragma_diagnostic): Use
10996 control_warning_option.
10997
a4d8c676
JM
109982010-11-12 Joseph Myers <joseph@codesourcery.com>
10999
11000 * c-common.c (parse_optimize_options): Update call to
11001 decode_options.
11002 * c-common.h (c_common_handle_option): Update prototype.
11003 * c-opts.c (c_common_handle_option): Take location_t parameter and
11004 pass it to other functions.
11005
f954bd2c
JM
110062010-11-11 Joseph Myers <joseph@codesourcery.com>
11007
11008 * c-opts.c (warning_as_error_callback): Remove.
11009 (c_common_initialize_diagnostics): Don't call
11010 register_warning_as_error_callback.
11011 (c_common_handle_option): Handle -Werror=normalized= here.
11012
d8a07487
JM
110132010-11-10 Joseph Myers <joseph@codesourcery.com>
11014
11015 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
11016 in diagnostic.
11017 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
11018 letter.
11019 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
11020 Remove trailing '.' from diagnostics.
11021 * c.opt (Wwrite-strings_: Avoid '`' in help text.
11022
d5478783
JM
110232010-11-10 Joseph Myers <joseph@codesourcery.com>
11024
11025 * c-common.c (parse_optimize_options): Pass global_dc to
11026 decode_options.
11027 * c-opts.c (c_common_handle_option): Pass &global_options to
11028 set_Wstrict_aliasing.
11029 * c.opt (v): Don't mark Common or document here.
11030
91ebb981
IS
110312010-11-06 Iain Sandoe <iains@gcc.gnu.org>
11032
11033 PR target/44981
11034 * c-format.c (format_type): New type gcc_objc_string_format_type.
11035 (valid_stringptr_type_p): New.
11036 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 11037 (check_format_string): Pass expected type, use
91ebb981
IS
11038 valid_stringptr_type_p (), check that the format string types are
11039 consistent with the format specification.
11040 (decode_format_attr): Warn if NSString is used outside objective-c.
11041 (format_types_orig): Add NSString.
11042 (format_name): New.
11043 (format_flags): New.
11044 (check_format_arg): Handle format strings requiring an external parser.
11045 first_target_format_type: New variable.
11046 (handle_format_attribute): Set up first_target_format_type, pass the
11047 expected format arg string type to check_format_string().
ab20d992 11048 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
91ebb981
IS
11049 * stub-objc.c (objc_string_ref_type_p): New.
11050 (objc_check_format_arg): New.
11051
bede2adc
NP
110522010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
11053
9faeb493 11054 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
11055 * c-common.h (objc_build_class_component_ref): New.
11056 * stub-objc.c (objc_build_class_component_ref): New.
11057
9a179d01
NP
110582010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
11059
11060 * c.opt (Wproperty-assign-default): New option.
11061
22d8d616
NP
110622010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
11063
11064 Implemented -fobjc-std=objc1 flag.
11065 * c.opt (fobjc-std=objc1): New option.
11066
2debdb4f
NP
110672010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
11068
11069 Implemented format and noreturn attributes for Objective-C methods.
11070 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
11071 attribute for Objective-C methods.
11072
ec52b111
JM
110732010-10-31 Jason Merrill <jason@redhat.com>
11074
11075 * c-common.c (conversion_warning, warn_for_collisions_1): Use
11076 EXPR_LOC_OR_HERE.
11077
46a88c12
NP
110782010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
11079
11080 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
11081 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
11082 (objc_add_property_declaration): Removed arguments for copies and
11083 ivar.
11084 (objc_build_getter_call): Renamed to
11085 objc_maybe_build_component_ref.
11086 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
11087 (objc_is_property_ref): New.
11088 * c-common.c (c_common_reswords): Removed copies and ivar.
11089 * stub-objc.c (objc_add_property_declaration): Removed arguments
11090 for copies and ivar.
11091 (objc_build_getter_call): Renamed to
11092 objc_maybe_build_component_ref.
11093 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
11094 (objc_is_property_ref): New.
9faeb493 11095
1e4bf85b
AC
110962010-10-29 Arnaud Charlet <charlet@adacore.com>
11097 Matthew Gingell <gingell@adacore.com>
11098
11099 * c-ada-spec.c (separate_class_package): New function.
11100 (pp_ada_tree_identifier): Prefix references to C++ classes with the
11101 name of their enclosing package.
11102 (print_ada_declaration): Use separate_class_package.
11103
81f0bab2
JM
111042010-10-27 Jason Merrill <jason@redhat.com>
11105
2b08f2c5
JM
11106 * c-common.c (c_common_reswords): Add __is_literal_type.
11107 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
11108
81f0bab2
JM
11109 * c-common.c (check_case_value): Remove special C++ code.
11110
200290f2
NP
111112010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
11112
11113 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
11114 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
11115 and RID_LAST_PATTR.
11116 (objc_add_property_declaration): Added additional arguments.
11117 (objc_property_attribute_kind): Removed.
11118 (objc_set_property_attr): Removed.
11119 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
11120 copy and nonatomic.
11121 * stub-objc.c (objc_add_property_declaration): Added additional
11122 arguments.
11123 (objc_set_property_attr): Removed.
9faeb493 11124
f614132b
NP
111252010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
11126
11127 * c-common.h (objc_add_property_variable): Renamed to
11128 objc_add_property_declaration. Added location argument.
11129 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 11130
b8a18805
NP
111312010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
11132
11133 * c-common.h (objc_maybe_printable_name): New.
11134 * stub-objc.c (objc_maybe_printable_name): New.
11135
3f8257db
JJ
111362010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
11137 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
11138
11139 * c-common.h (c_common_mark_addressable_vec): Declare.
11140 * c-common.c (c_common_mark_addressable_vec): New function.
11141
249a82c4
NP
111422010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
11143
11144 * c-common.h (objc_set_method_type): Removed.
11145 (objc_add_method_declaration): Added boolean argument.
11146 (objc_start_method_definition): Same change.
11147 (objc_build_method_signature): Same change.
11148 * stub-objc.c (objc_set_method_type): Removed.
11149 (objc_add_method_declaration): Added boolean argument.
11150 (objc_start_method_definition): Same change.
11151 (objc_build_method_signature): Same change.
11152
977e30bc
NP
111532010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
11154
11155 * c-common.h (finish_file): Removed.
11156 (objc_write_global_declarations): New.
11157 * c-opts.c (c_common_parse_file): Do not call finish_file.
11158 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 11159
da57d1b9
NP
111602010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
11161
11162 Implemented parsing @synthesize and @dynamic for
11163 Objective-C/Objective-C++.
11164 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
11165 (objc_add_synthesize_declaration): New.
11166 (objc_add_dynamic_declaration): New.
11167 * c-common.c (c_common_reswords): Add synthesize and dynamic.
11168 * stub-objc.c (objc_add_synthesize_declaration): New.
11169 (objc_add_dynamic_declaration): New.
9faeb493 11170
0069111f
MM
111712010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
11172
11173 PR target/46041
11174 * c-cppbuiltin.c (mode_has_fma): Move function here from
11175 builtins.c. Don't use the fma optab, instead just use the
11176 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
11177 using -save-temps.
11178
e426b47b
NP
111792010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
11180
11181 Merge from 'apple/trunk' branch on FSF servers.
0069111f 11182
3f8257db 11183 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 11184
9faeb493 11185 Radar 4330422
e426b47b
NP
11186 * c-common.h (objc_non_volatilized_type): New declaration
11187 * stub-objc.c (objc_non_volatilized_type): New stub.
11188
90fbfdc3
NP
111892010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
11190
e426b47b 11191 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 11192
ab20d992 11193 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 11194
9faeb493 11195 Radar 4133425
90fbfdc3 11196 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 11197 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 11198
c37d8c30
IS
111992010-10-17 Iain Sandoe <iains@gcc.gnu.org>
11200
11201 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
11202 * c-common.h (enum rid): Add RID_AT_PACKAGE.
11203 (objc_ivar_visibility_kind): New enum.
11204 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 11205 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
11206 visibility enum.
11207
1b1562a5
MM
112082010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
11209
11210 * c-cppbuiltin.c (builtin_define_float_constants): Emit
11211 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
11212 has the appropriate fma builtins.
11213 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
11214
668ea4b1
IS
112152010-10-14 Iain Sandoe <iains@gcc.gnu.org>
11216
1b1562a5 11217 merge from FSF apple 'trunk' branch.
3f8257db 11218 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 11219
668ea4b1
IS
11220 Radars 4436866, 4505126, 4506903, 4517826
11221 * c-common.c (c_common_resword): Define @property and its attributes.
11222 * c-common.h: Define property attribute enum entries.
11223 (OBJC_IS_PATTR_KEYWORD): New.
11224 (objc_property_attribute_kind): New enum.
11225 Declare objc_set_property_attr (), objc_add_property_variable (),
11226 objc_build_getter_call () and objc_build_setter_call ().
11227 * stub-objc.c (objc_set_property_attr): New stub.
11228 (objc_add_property_variable): Likewise.
11229 (objc_build_getter_call): Likewise.
11230 (objc_build_setter_call) Likewise.
1b1562a5 11231
a1178b30
IS
112322010-10-13 Iain Sandoe <iains@gcc.gnu.org>
11233
1b1562a5 11234 merge from FSF apple 'trunk' branch.
ab20d992 11235 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
11236
11237 Radar 3803157 (method attributes)
11238 * c-common.c (handle_deprecated_attribute): Recognize
11239 objc methods as valid declarations.
11240 * c-common.h: Declare objc_method_decl ().
1b1562a5 11241 * stub-objc.c (objc_method_decl): New stub.
a1178b30 11242
a75bfaa6
JM
112432010-10-08 Joseph Myers <joseph@codesourcery.com>
11244
11245 * c-common.c (parse_optimize_options): Call
11246 decode_cmdline_options_to_array_default_mask before
11247 decode_options. Update arguments to decode_options.
11248 * c-common.h (c_common_init_options_struct): Declare.
11249 * c-opts.c (c_common_init_options_struct): New. Split out from
11250 c_common_init_options.
11251
f05b9d93
NP
112522010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
11253
11254 Implemented fast enumeration for Objective-C.
11255 * c-common.h (objc_finish_foreach_loop): New.
11256 * stub-objc.c (objc_finish_foreach_loop): New.
11257
1ebe4b4f
JM
112582010-10-05 Joseph Myers <joseph@codesourcery.com>
11259
11260 * c-common.h (struct diagnostic_context): Don't declare here.
11261 (c_common_initialize_diagnostics): Declare using
11262 diagnostic_context typedef.
11263 * c-opts.c (c_common_handle_option): Pass global_dc to
11264 handle_generated_option.
11265
d4d24ba4
JM
112662010-10-04 Joseph Myers <joseph@codesourcery.com>
11267
11268 * c-opts.c (c_common_handle_option): Pass &global_options_set to
11269 handle_generated_option.
11270
478a1c5b
ILT
112712010-10-03 Ian Lance Taylor <iant@google.com>
11272
11273 * c.opt (-fplan9-extensions): New option.
11274
82a1c2fe
FXC
112752010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
11276
11277 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
11278 Remove.
11279 (c_cpp_builtins): Call functions from cppbuiltin.c instead
11280 of duplicating code.
11281
92902b1b
IS
112822010-09-30 Iain Sandoe <iains@gcc.gnu.org>
11283
11284 * c-common.c: Add two new entries for @optional
11285 and @required keywords.
11286
11287 merge from FSF 'apple/trunk' branch.
3f8257db 11288 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
11289
11290 Radar 4386773
11291 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
11292 objective-c keywords.
11293 (objc_set_method_opt): New declaration.
11294 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 11295
46625112
JM
112962010-09-30 Joseph Myers <joseph@codesourcery.com>
11297
11298 * c-common.c (handle_optimize_attribute): Pass &global_options to
11299 cl_optimization_save and cl_optimization_restore.
11300 * c-opts.c (c_common_handle_option): Pass &global_options to
11301 handle_generated_option.
11302 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
11303 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
11304 &global_options to cl_optimization_restore.
11305
49b91f05
NP
113062010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
11307
11308 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
11309 Objective-C/Objective-C++ keywords.
11310
13ed556f 113112010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 11312
9faeb493
UB
11313 Merge from 'apple/trunk' branch on FSF servers.
11314
3f8257db 11315 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
11316
11317 Radar 4281748
11318 * c-common.h (objc_check_global_decl): New declaration.
11319 * stub-objc.c (objc_check_global_decl): New stub.
11320
f0036cca
JM
113212010-09-29 Joseph Myers <joseph@codesourcery.com>
11322
11323 * c.opt: Don't use VarExists.
11324
e3339d0f
JM
113252010-09-29 Joseph Myers <joseph@codesourcery.com>
11326
11327 * c-common.c (c_cpp_error): Update names of diagnostic_context
11328 members.
11329 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
11330 cl_optimization members.
11331 * c-opts.c (warning_as_error_callback, c_common_handle_option,
11332 sanitize_cpp_opts, finish_options): Update names of cpp_options
11333 members.
11334
1973201f
NP
113352010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
11336
11337 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
11338 (objc_is_reserved_word): Removed.
11339 * c-common.c: Updated comments.
11340 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
11341 objc_is_reserved_word.
11342 * stub-objc.c (objc_is_reserved_word): Removed.
11343
f7e71da5
IS
113442010-09-28 Iain Sandoe <iains@gcc.gnu.org>
11345
9faeb493 11346 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
11347 include attributes.
11348 (objc_start_method_definition): Likewise.
11349 (objc_build_keyword_decl): Likewise.
11350 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
11351 (objc_start_method_definition): Likewise.
11352 (objc_build_keyword_decl): Likewise.
11353
c165dca7
IS
113542010-09-28 Iain Sandoe <iains@gcc.gnu.org>
11355
11356 * c-common.h (objc_start_class_interface): Adjust prototype.
11357 (objc_start_category_interface): Likewise.
11358 (objc_start_protocol): Likewise.
11359 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
11360 (objc_start_class_interface): Likewise.
11361 (objc_start_category_interface): Likewise.
11362
7458026b
ILT
113632010-09-27 Ian Lance Taylor <iant@google.com>
11364
11365 * c-common.c (c_common_attribute_table): Add no_split_stack.
11366 (handle_no_split_stack_attribute): New static function.
11367
b581b85b
NP
113682010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
11369
9faeb493 11370 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 11371
3f8257db 11372 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 11373
9faeb493 11374 Radar 4229905
b581b85b
NP
11375 * c-common.h (objc_have_common_type): New declaration.
11376 * stub-objc.c (objc_have_common_type): New stub.
11377
11378 2005-06-22 Ziemowit Laski <zlaski@apple.com>
11379
11380 Radar 4154928
11381 * c-common.h (objc_common_type): New prototype.
9faeb493 11382 * stub-objc.c (objc_common_type): New stub.
b581b85b 11383
46a4da10
JH
113842010-09-24 Jan Hubicka <jh@suse.cz>
11385
11386 * c-common.c (handle_leaf_attribute): New function.
11387 (struct attribute_spec c_common_att): Add leaf.
11388
e200444e
JM
113892010-09-22 Joseph Myers <joseph@codesourcery.com>
11390
11391 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
11392 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
11393 -dump, -dump=, -imacros, -imacros=, -include, -include=,
11394 -include-barrier, -include-directory, -include-directory=,
11395 -include-directory-after, -include-directory-after=,
11396 -include-prefix, -include-prefix=, -include-with-prefix,
11397 -include-with-prefix=, -include-with-prefix-after,
11398 -include-with-prefix-after=, -include-with-prefix-before,
11399 -include-with-prefix-before=, -no-integrated-cpp,
11400 -no-line-commands, -no-standard-includes, -no-warnings, -output,
11401 -output=, -pedantic, -pedantic-errors, -preprocess,
11402 -print-missing-file-dependencies, -trace-includes, -traditional,
11403 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
11404 -user-dependencies, -verbose, -write-dependencies,
11405 -write-user-dependencies, no-integrated-cpp, traditional): New.
11406
29a80ea6
NP
114072010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
11408
11409 PR objc/23710
ac1fc2fc
NP
11410 * c-common.h (objc_start_method_definition): Return bool instead
11411 of void.
11412 * stub-objc.c (objc_start_method_definition): Return bool instead
11413 of void.
11414
114152010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
11416
11417 PR objc/25965
11418 * c-common.h (objc_get_interface_ivars): New declaration.
11419 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 11420
de621752
ILT
114212010-09-15 Ian Lance Taylor <iant@google.com>
11422
11423 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 11424 messages. Remove period at end of warning message.
de621752 11425
ba885ec5
NS
114262010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11427
11428 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
11429 (handle_alias_attribute): ... here.
11430 (handle_ifunc_attribute): New.
11431
c5ee1358
MM
114322010-09-06 Mark Mitchell <mark@codesourcery.com>
11433
11434 * c-common.h (do_warn_double_promotion): Declare.
11435 * c-common.c (do_warn_double_promotion): Define.
11436
0a0b3574
MM
114372010-09-05 Mark Mitchell <mark@codesourcery.com>
11438
11439 * c.opt (Wdouble-promotion): New.
11440
d1779886
JM
114412010-09-02 Joseph Myers <joseph@codesourcery.com>
11442
11443 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
11444 fvtable-thunks, fxref): Mark no longer supported in help text.
11445
2d2bd949
JM
114462010-09-02 Joseph Myers <joseph@codesourcery.com>
11447
11448 * c.opt (Wimport, fall-virtual, falt-external-templates,
11449 fdefault-inline, fenum-int-equiv, fexternal-templates,
11450 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
11451 fname-mangling-version-, fnew-abi, fnonnull-objects,
11452 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
11453 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
11454 applicable.
11455 (fhandle-exceptions): Mark with Alias and Warn.
11456 * c-opts.c (c_common_handle_option): Don't handle options marked
11457 as ignored.
11458
5de8299c
JM
114592010-09-02 Joseph Myers <joseph@codesourcery.com>
11460
11461 * c.opt (Wcomments, Werror-implicit-function-declaration,
11462 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
11463 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
11464 aliases.
11465 * c-common.c (option_codes): Use OPT_Wcomment instead of
11466 OPT_Wcomments.
11467 * c-opts.c (warning_as_error_callback, c_common_handle_option):
11468 Don't handle options marked as aliases.
11469
0ceb0201
RG
114702010-08-25 Richard Guenther <rguenther@suse.de>
11471
11472 * c-common.c (c_common_get_alias_set): Remove special
11473 handling for pointers.
11474
ac47786e
NF
114752010-08-20 Nathan Froyd <froydnj@codesourcery.com>
11476
11477 * c-common.c: Use FOR_EACH_VEC_ELT.
11478 * c-gimplify.c: Likewise.
11479 * c-pragma.c: Likewise.
11480
c878765b
JM
114812010-08-16 Joseph Myers <joseph@codesourcery.com>
11482
11483 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
11484 RejectDriver.
11485 (MMDX): Change back to MMD. Mark NoDriverArg instead of
11486 RejectDriver.
11487 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
11488 instead of OPT_MDX and OPT_MMDX.
11489
603349bf
JM
114902010-08-16 Joseph Myers <joseph@codesourcery.com>
11491
11492 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
11493
644fa7ac
JM
114942010-08-12 Joseph Myers <joseph@codesourcery.com>
11495
11496 * c.opt (MD, MMD): Change to MDX and MMDX.
11497 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
11498
481e1176
JM
114992010-08-11 Joseph Myers <joseph@codesourcery.com>
11500
11501 * c-opts.c (c_common_handle_option): Call handle_generated_option
11502 instead of handle_option.
11503
ac8dc9f7
NF
115042010-08-08 Nathan Froyd <froydnj@codesourcery.com>
11505
11506 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
11507 (maybe_apply_renaming_pragma): Delete unneeded declarations.
11508
4f8c876d
NF
115092010-08-08 Nathan Froyd <froydnj@codesourcery.com>
11510
11511 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
11512 (pending_redefine_extname): Change type to a VEC.
11513 (add_to_renaming_pragma_list): Update for new type of
11514 pending_redefine_extname.
ac8dc9f7 11515 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 11516
3b0c690e
AC
115172010-08-04 Arnaud Charlet <charlet@adacore.com>
11518
11519 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
11520 visited.
11521 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
11522 decide whether a type has already been declared/seen.
11523 Do not go to the original type.
11524 (dump_nested_types): New parameter forward.
11525 Generate forward declaration if needed and mark type as visited.
11526 (print_ada_declaration): Call dump_nested_types if not already done.
11527 Mark types as visited.
11528
1890bccc
JM
115292010-08-03 Joseph Myers <joseph@codesourcery.com>
11530
11531 * c.opt (-print-pch-checksum): Remove option.
11532 * c-opts.c (c_common_handle_option): Don't handle
11533 OPT_print_pch_checksum.
11534
5f20c657
JM
115352010-07-27 Joseph Myers <joseph@codesourcery.com>
11536
11537 * c-common.h (c_common_handle_option): Update prototype and return
11538 value type.
11539 * c-opts.c (c_common_handle_option): Update prototype and return
11540 value type. Update calls to handle_option and
11541 enable_warning_as_error.
11542
f551f80c
JJ
115432010-07-27 Jakub Jelinek <jakub@redhat.com>
11544
11545 PR c/45079
11546 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
11547
61ff2bdc
JM
115482010-07-27 Joseph Myers <joseph@codesourcery.com>
11549
11550 * c-common.h (c_common_missing_argument): Remove.
11551 * c-opts.c (c_common_missing_argument): Remove.
11552 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
11553 idirafter, imacros, include, isysroot, isystem, iquote): Add
11554 MissingArgError.
11555 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
11556
7a9bf9a4
JM
115572010-07-27 Joseph Myers <joseph@codesourcery.com>
11558
11559 * c-common.h (c_common_option_lang_mask,
11560 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
11561 New.
11562 (c_common_init_options): Update prototype.
11563 * c-opts.c (c_common_option_lang_mask): New.
11564 (c_common_initialize_diagnostics): Split out of
11565 c_common_init_options.
11566 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
11567 New.
11568 (c_common_init_options): Update prototype. Use decoded options in
11569 search for -lang-asm.
11570
910ad8de
NF
115712010-07-15 Nathan Froyd <froydnj@codesourcery.com>
11572
11573 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
11574 * c-format.c: Likewise.
11575
718f9c0f
MLI
115762010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
11577
11578 * c-common.h: Include diagnostic-core.h. Error if already
11579 included.
11580 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
11581
4d451982
MLI
115822010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
11583
adfac8df 11584 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
11585 Do not include expr.h
11586 (vector_mode_valid_p): Move here.
11587
119fe915
SB
115882010-06-21 DJ Delorie <dj@redhat.com>
11589
11590 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
11591 allow these pragmas anywhere.
11592
115932010-06-14 Jakub Jelinek <jakub@redhat.com>
11594
11595 PR bootstrap/44509
11596 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
11597 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
11598 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
11599 ggc_strdup instead of xstrdup.
11600
116012010-06-10 Jakub Jelinek <jakub@redhat.com>
11602
11603 * c-cppbuiltin.c: Include cpp-id-data.h.
11604 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
11605 (lazy_hex_fp_value): New function.
11606 (builtin_define_with_hex_fp_value): Provide definitions lazily.
11607
6662d794
MLI
116082010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11609
11610 * c-gimplify.c: Do not include tree-flow.h
11611
38f8b050
JR
116122010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
11613
11614 PR other/44034
11615 * c-common.c: Rename targetm member:
11616 targetm.enum_va_list -> targetm.enum_va_list_p
11617
9589f23e
AS
116182010-06-28 Anatoly Sokolov <aesok@post.ru>
11619
11620 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
11621
3b06d379
SB
116222010-06-28 Steven Bosscher <steven@gcc.gnu.org>
11623
11624 * c-cppbuiltin.c: Do not include except.h.
11625
d166d4c3
AK
116262010-06-24 Andi Kleen <ak@linux.intel.com>
11627
9faeb493
UB
11628 * c-common.c (warn_for_omitted_condop): New.
11629 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 11630
70cb8be6
JM
116312010-06-21 Joseph Myers <joseph@codesourcery.com>
11632
11633 * c.opt (lang-objc): Remove.
11634 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
11635
a4c97feb
JR
116362010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
11637
11638 * c-opts.c: Include "tm_p.h".
11639
6e2f1956
JM
116402010-06-20 Joseph Myers <joseph@codesourcery.com>
11641
11642 * c-common.c (parse_optimize_options): Update call to
11643 decode_options.
11644
bc87224e
NF
116452010-06-18 Nathan Froyd <froydnj@codesourcery.com>
11646
11647 * c-common.c (record_types_used_by_current_var_decl): Adjust for
11648 new type of types_used_by_cur_var_decl.
11649
b49cf425
JR
116502010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
11651
11652 PR bootstrap/44512
11653 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
11654 for C++ standard compliance.
11655
59f9c2ed
JM
116562010-06-16 Jason Merrill <jason@redhat.com>
11657
11658 * c.opt: Add -Wnoexcept.
11659
33766b66
RG
116602010-06-16 Richard Guenther <rguenther@suse.de>
11661
11662 PR c/44555
11663 * c-common.c (c_common_truthvalue_conversion): Remove
11664 premature and wrong optimization concering ADDR_EXPRs.
11665
eff7e30c
AC
116662010-06-15 Arnaud Charlet <charlet@adacore.com>
11667
11668 * c-ada-spec.c (dump_sloc): Remove column info.
11669 (is_simple_enum): New function.
11670 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
11671 enum types when relevant.
11672
6312e84d
MLI
116732010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
11674
9faeb493 11675 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
11676 location.
11677
1cb42611
JM
116782010-06-10 Joseph Myers <joseph@codesourcery.com>
11679
11680 * c-opts.c (c_common_handle_option): Don't handle
11681 OPT_fshow_column.
11682
a9429e29
LB
116832010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
11684
11685 * c-pragma.c (push_alignment): Use typed GC allocation.
11686 (handle_pragma_push_options): Likewise.
11687
11688 * c-common.c (parse_optimize_options): Likewise.
11689
11690 * c-common.h (struct sorted_fields_type): Add variable_size GTY
11691 option.
11692
5498f011
JM
116932010-06-07 Joseph Myers <joseph@codesourcery.com>
11694
11695 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
11696 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
11697 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
11698 flag_signed_bitfields, warn_strict_null_sentinel,
11699 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
11700 flag_gen_declaration, flag_no_gnu_keywords,
11701 flag_implement_inlines, flag_implicit_templates,
11702 flag_implicit_inline_templates, flag_optional_diags,
11703 flag_elide_constructors, flag_default_inline, flag_rtti,
11704 flag_conserve_space, flag_access_control, flag_check_new,
11705 flag_new_for_scope, flag_weak, flag_working_directory,
11706 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
11707 flag_enforce_eh_specs, flag_threadsafe_statics,
11708 flag_pretty_templates): Remove.
11709 * c-common.h (flag_preprocess_only, flag_nil_receivers,
11710 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
11711 flag_replace_objc_classes, flag_undef, flag_no_builtin,
11712 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
11713 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
11714 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
11715 flag_no_gnu_keywords, flag_implement_inlines,
11716 flag_implicit_templates, flag_implicit_inline_templates,
11717 flag_optional_diags, flag_elide_constructors, flag_default_inline,
11718 flag_rtti, flag_conserve_space, flag_access_control,
11719 flag_check_new, flag_new_for_scope, flag_weak,
11720 flag_working_directory, flag_use_cxa_atexit,
11721 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
11722 flag_threadsafe_statics, flag_pretty_templates,
11723 warn_strict_null_sentinel): Remove.
11724 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
11725 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
11726 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
11727 fimplicit-inline-templates, fimplicit-templates,
11728 flax-vector-conversions, fms-extensions, fnil-receivers,
11729 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
11730 frtti, fshort-double, fshort-enums, fshort-wchar,
11731 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
11732 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
11733 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
11734 gen-decls, undef): Use Var.
11735 (fdefault-inline, foptional-diags): Document as doing nothing.
11736 * c-opts.c (c_common_handle_option): Remove cases for options now
11737 using Var. Mark ignored options as such.
11738
39dabefd
SB
117392010-06-05 Steven Bosscher <steven@gcc.gnu.org>
11740
9faeb493 11741 * c-common.c: Moved to here from parent directory.
39dabefd
SB
11742 * c-common.def: Likewise.
11743 * c-common.h: Likewise.
11744 * c-cppbuiltin.c: Likewise.
11745 * c-dump.c: Likewise.
11746 * c-format.c: Likewise.
11747 * c-format.h : Likewise.
11748 * c-gimplify.c: Likewise.
11749 * c-lex.c: Likewise.
11750 * c-omp.c: Likewise.
11751 * c.opt: Likewise.
11752 * c-opts.c: Likewise.
11753 * c-pch.c: Likewise.
11754 * c-ppoutput.c: Likewise.
11755 * c-pragma.c: Likewise.
11756 * c-pragma.h: Likewise.
11757 * c-pretty-print.c: Likewise.
11758 * c-pretty-print.h: Likewise.
11759 * c-semantics.c: Likewise.
11760 * stub-objc.c: Likewise.
11761
11762 * c-common.c: Include gt-c-family-c-common.h.
11763 * c-pragma.c: Include gt-c-family-c-pragma.h.
11764\f
8d9254fc 11765Copyright (C) 2010-2020 Free Software Foundation, Inc.
39dabefd
SB
11766
11767Copying and distribution of this file, with or without modification,
11768are permitted in any medium without royalty provided the copyright
11769notice and this notice are preserved.
This page took 4.358485 seconds and 5 git commands to generate.