]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
Daily bump.
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
4dabb037
GA
12020-11-17 Nathan Sidwell <nathan@acm.org>
2
3 * c-common.h (enum c_tree_index): Reorder to place lazy fields
4 after newly-added CTI_MODULE_HWM.
5
62020-11-17 Joseph Myers <joseph@codesourcery.com>
7
8 * c-cppbuiltin.c (builtin_define_float_constants): Define
9 "*_IS_IEC_60559__" macros.
10
112020-11-17 Nathan Sidwell <nathan@acm.org>
12
13 * c-lex.c: #include "langhooks.h".
14 (cb_undef): Maybe call preprocess_undef lang hook.
15 * c-opts.c (c_common_post_options): Maybe call preprocess_options
16 lang hook.
17 (push_command_line_include): Maybe call preprocess_main_file lang
18 hook.
19 (cb_file_change): Likewise.
20 * c-ppoutput.c: #include "langhooks.h.
21 (scan_translation_unit): Maybe call preprocess_token lang hook.
22 (class do_streamer): New, derive from token_streamer.
23 (directives_only_cb): Data pointer is do_streamer, call
24 preprocess_token lang hook.
25 (scan_translation_unit_directives_only): Use do_streamer.
26 (print_line_1): Move src_line recording to after string output.
27 (cb_undef): Maybe call preprocess_undef lang hook.
28
292020-11-17 Nathan Sidwell <nathan@acm.org>
30
31 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
32 code duplicating that functionality.
33
342020-11-17 Jakub Jelinek <jakub@redhat.com>
35
36 PR c/90628
37 * c-common.c (check_builtin_function_arguments)
38 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
39 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
40 for more builtins and argument positions.
41
29c5d9ce
GA
422020-11-16 Iain Sandoe <iain@sandoe.co.uk>
43
44 PR objc/97854
45 * stub-objc.c: Include c-common.h to declare enum rid.
46
77f67db2
GA
472020-11-13 Jakub Jelinek <jakub@redhat.com>
48
49 PR c++/63287
50 * c-cppbuiltin.c: Include configargs.h.
51 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
52 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
53 "single".
54
552020-11-13 Gergö Barany <gergo@codesourcery.com>
56 Thomas Schwinge <thomas@codesourcery.com>
57
58 * c.opt (fopenacc-kernels): Add.
59
602020-11-13 Jason Merrill <jason@redhat.com>
61
62 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
63
642020-11-13 Piotr H. Dabrowski <phd@phd.re>
65
66 PR c++/91318
67 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
68
692020-11-13 Martin Liska <mliska@suse.cz>
70
71 * c-attribs.c (build_attr_access_from_parms): Format properly.
72
732020-11-13 Iain Sandoe <iain@sandoe.co.uk>
74
75 PR objc/90707
76 * c-common.c (c_common_reswords): null_unspecified, nullable,
77 nonnull, null_resettable: New keywords.
78 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
79 RID_NONNULL, RID_NULL_RESETTABLE: New.
80 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
81 ranges accepted for property attributes.
82 * c-attribs.c (handle_objc_nullability_attribute): New.
83 * c-objc.h (enum objc_property_attribute_group): Add
84 OBJC_PROPATTR_GROUP_NULLABLE.
85 (enum objc_property_attribute_kind):Add
86 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
87 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
88
892020-11-13 Iain Sandoe <iain@sandoe.co.uk>
90
91 PR objc/77404
92 * c-attribs.c (handle_objc_root_class_attribute): New
93 * c-objc.h (objc_start_class_interface): Add a location
94 value for the position of the class name.
95 * c.opt: Add Wobjc-root-class.
96 * stub-objc.c (objc_start_class_interface): Add a location
97 value for the position of the class name.
98
a5a11525
GA
992020-11-12 Joseph Myers <joseph@codesourcery.com>
100
101 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
102 Allow scope for C. Handle standard attributes for C. Do not
103 accept unscoped attributes if std_syntax and not handled as
104 standard attributes.
105 * c-common.h (c_common_has_attribute): Update prototype.
106
1072020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
108
109 PR pch/86674
110 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
111 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
112
0f5f9ed5
GA
1132020-11-11 Patrick Palka <ppalka@redhat.com>
114
115 PR c++/88115
116 * c-opts.c (c_common_post_options): Update latest_abi_version.
117
bb622641
GA
1182020-11-10 Jakub Jelinek <jakub@redhat.com>
119
120 PR c/97748
121 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
122 to false.
123 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
124 recursively and just return true instead of warning if it is true.
125 Handle COMPLEX_EXPR.
126
1272020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
128
129 * c-common.h (c_omp_adjust_map_clauses): New declaration.
130 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
131 (c_omp_adjust_map_clauses): New function.
132
2bee28dd
GA
1332020-11-09 Marek Polacek <polacek@redhat.com>
134
135 DR 1914
136 * c-common.c (attribute_fallthrough_p): Tweak the warning
137 message.
138
1392020-11-09 Patrick Palka <ppalka@redhat.com>
140
141 * c-pragma.c (handle_pragma_diagnostic): Split the
142 unknown-option -Wpragmas diagnostic into a warning and a
143 subsequent note containing a spelling suggestion. Avoid
144 computing the suggestion if -Wpragmas warnings are being
145 suppressed.
146
1472020-11-09 Patrick Palka <ppalka@redhat.com>
148
149 PR testsuite/97117
150 * c-indentation.c (get_visual_column): Remove location_t
151 parameter. Move the column-tracking diagnostic code from here
152 to ...
153 (should_warn_for_misleading_indentation): ... here, before the
154 early exit for when the loci are not all distinct. Don't pass a
155 location_t argument to get_visual_column.
156 (assert_get_visual_column_succeeds): Don't pass a location_t
157 argument to get_visual_column.
158 (assert_get_visual_column_fails): Likewise.
159
fb95de7a
GA
1602020-11-08 Iain Sandoe <iain@sandoe.co.uk>
161
162 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
163 of keywords accepted in @property attribute contexts.
164 * c-objc.h (enum objc_property_attribute_group): Add
165 OBJC_PROPATTR_GROUP_CLASS.
166 (enum objc_property_attribute_kind): Add
167 OBJC_PROPERTY_ATTR_CLASS.
168
2da7ee05
GA
1692020-11-07 Iain Sandoe <iain@sandoe.co.uk>
170
171 * c-common.c (c_common_reswords): Add 'atomic' property
172 attribute.
173 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
174 property attributes.
175
1762020-11-07 Iain Sandoe <iain@sandoe.co.uk>
177
178 * c-attribs.c (handle_nsobject_attribute): New.
179 * c.opt: Add WNSObject-attribute.
180
44cab2d8
GA
1812020-11-06 Iain Sandoe <iain@sandoe.co.uk>
182
183 * c-objc.h (enum objc_property_attribute_group): New
184 (enum objc_property_attribute_kind): New.
185 (OBJC_PROPATTR_GROUP_MASK): New.
186 (struct property_attribute_info): Small class encapsulating
187 parser output from property attributes.
188 (objc_prop_attr_kind_for_rid): New
189 (objc_add_property_declaration): Simplify interface.
190 * stub-objc.c (enum rid): Dummy type.
191 (objc_add_property_declaration): Simplify interface.
192 (objc_prop_attr_kind_for_rid): New.
193
1942020-11-06 Nathan Sidwell <nathan@acm.org>
195
196 * c-ada-spec.c (collect_ada_nodes): Rename
197 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
198 (collect_ada_node): Likewise.
199 (dump_forward_type): Likewise.
200 * c-common.c (set_underlying_type): Rename
201 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
202 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
203
2042020-11-06 Jakub Jelinek <jakub@redhat.com>
205
206 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
207
0cfd9109
GA
2082020-11-05 Marek Polacek <polacek@redhat.com>
209
210 PR c++/97675
211 * c.opt (Wexceptions): New option.
212
2132020-11-05 Marek Polacek <polacek@redhat.com>
214
215 PR c++/25814
216 * c.opt (Wvexing-parse): New option.
217
35c125cb
GA
2182020-11-04 Jakub Jelinek <jakub@redhat.com>
219
220 PR c++/97670
221 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
222 underlying decl to clear in the allocate_head bitmap.
223
2242020-11-04 Iain Sandoe <iain@sandoe.co.uk>
225
226 * c-objc.h (objc_non_constant_expr_p): New.
227 * stub-objc.c (objc_non_constant_expr_p): New.
228
fd2325ea
GA
2292020-11-03 Nathan Sidwell <nathan@acm.org>
230
231 * c.opt (MQ,MT): Reword description to be make-agnostic.
232
88ce3d5f
GA
2332020-11-02 Nathan Sidwell <nathan@acm.org>
234
235 * c-opts.c (c_common_post_options): Move var decl to its
236 initialization point.
237
2382020-11-01 Iain Sandoe <iain@sandoe.co.uk>
239
240 * c-lex.c (c_lex_with_flags): When combining '@' with a
241 keyword for Objective-C, combine the location ranges too.
242
2432020-10-30 Qing Zhao <qing.zhao@oracle.com>
244 H.J.Lu <hjl.tools@gmail.com>
245
246 * c-attribs.c (c_common_attribute_table): Add new attribute
247 zero_call_used_regs.
248 (handle_zero_call_used_regs_attribute): New function.
249
e93aae4a
GA
2502020-10-28 Marek Polacek <polacek@redhat.com>
251
252 PR c++/97573
253 * c-opts.c (c_common_post_options): In C++20, turn on
254 -Wdeprecated-enum-enum-conversion and
255 -Wdeprecated-enum-float-conversion.
256 * c.opt (Wdeprecated-enum-enum-conversion,
257 Wdeprecated-enum-float-conversion): New options.
258 (Wenum-conversion): Allow for C++ too.
259
2602020-10-28 Jakub Jelinek <jakub@redhat.com>
261
262 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
263 * c-omp.c: Include bitmap.h.
264 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
265
f19e7c8d
GA
2662020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
267
268 * c-common.c (__is_nothrow_assignable): New.
269 (__is_nothrow_constructible): Likewise.
270 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
271 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
272
efe71fcc
GA
2732020-10-23 Jan Hubicka <hubicka@ucw.cz>
274
275 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
276
2772020-10-23 Marek Polacek <polacek@redhat.com>
278
279 PR c++/91741
280 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
281 (c_common_init_ts): Likewise.
282 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
283 * c-common.h (maybe_warn_sizeof_array_div): Declare.
284 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
285 (maybe_warn_sizeof_array_div): New function.
286 * c.opt (Wsizeof-array-div): New option.
287
2882020-10-23 Martin Sebor <msebor@redhat.com>
289
290 PR c/97463
291 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
292
56ddd5e2
GA
2932020-10-22 Martin Liska <mliska@suse.cz>
294
295 PR c/94722
296 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
297 (handle_stack_protect_attribute): Add error message for a
298 no_stack_protector function.
299
3002020-10-22 Martin Liska <mliska@suse.cz>
301
302 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
303
3042020-10-22 Jan Hubicka <hubicka@ucw.cz>
305
306 * c-gimplify.c: Include tree-nested.h
307 (c_genericize): Update for new nested function info.
308
b2698c21
GA
3092020-10-14 Martin Sebor <msebor@redhat.com>
310
311 PR c/97413
312 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
313 bounds in an extra list.
314
7e9282ae
GA
3152020-10-05 Richard Biener <rguenther@suse.de>
316 Jakub Jelinek <jakub@redhat.com>
317
318 PR c++/97197
319 * c-pretty-print.c: Include langhooks.h.
320 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
321 expression.
322 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
323 unary_expression.
324 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
325
660bfe61
GA
3262020-09-30 Martin Sebor <msebor@redhat.com>
327
328 PR middle-end/97189
329 * c-attribs.c (append_access_attr): Use the function declaration
330 location for a warning about an attribute access argument.
331
93bca37c
GA
3322020-09-29 Marek Polacek <polacek@redhat.com>
333
334 PR c++/94695
335 * c.opt (Wrange-loop-construct): New option.
336
82b77dee
GA
3372020-09-23 Martin Sebor <msebor@redhat.com>
338
339 PR c/97131
340 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
341
3422020-09-23 Marek Polacek <polacek@redhat.com>
343
344 PR c/97125
345 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
346 after loops and other structured control constructs have been lowered.
347
521d2711
GA
3482020-09-22 Jakub Jelinek <jakub@redhat.com>
349
350 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
351 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
352
44135373
GA
3532020-09-21 Marek Polacek <polacek@redhat.com>
354
355 * c.opt (Wctad-maybe-unsupported): New option.
356
2fe5b7d1
GA
3572020-09-19 Martin Sebor <msebor@redhat.com>
358
359 PR c/50584
360 * c-common.h (warn_parm_array_mismatch): Declare new function.
361 (has_attribute): Move declaration of an existing function.
362 (build_attr_access_from_parms): Declare new function.
363 * c-warn.c (parm_array_as_string): Define new function.
364 (plus_one): Define new function.
365 (warn_parm_ptrarray_mismatch): Define new function.
366 (warn_parm_array_mismatch): Define new function.
367 (vla_bound_parm_decl): New function.
368 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
369 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
370 qualifiers here...
371 (c_pretty_printer::direct_abstract_declarator): ...but instead print
372 them in brackets here. Also print [static]. Strip extraneous
373 expressions from VLA bounds.
374
3752020-09-19 Martin Sebor <msebor@redhat.com>
376
377 PR c/50584
378 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
379 (handle_argspec_attribute): New function.
380 (get_argument, get_argument_type): New functions.
381 (append_access_attrs): Add overload. Handle internal attribute
382 representation in addition to external.
383 (handle_access_attribute): Handle internal attribute representation
384 in addition to external.
385 (build_attr_access_from_parms): New function.
386
3872020-09-19 Sandra Loosemore <sandra@codesourcery.com>
388
389 * c-gimplify.c (genericize_c_loop): Rewrite to match
390 c_finish_loop in c-typeck.c.
391
3922020-09-19 Sandra Loosemore <sandra@codesourcery.com>
393
394 * c-common.c (c_block_may_fallthrough): New, split from
395 cxx_block_may_fallthrough in the cp front end.
396 (c_common_init_ts): Move handling of loop and switch-related
397 statements here from the cp front end.
398 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
399 cp front end.
400 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
401 * c-common.h (c_block_may_fallthru): Declare.
402 (bc_state_t): Move here from cp front end.
403 (save_bc_state, restore_bc_state): Declare.
404 (c_genericize_control_stmt): Declare.
405 (WHILE_COND, WHILE_BODY): Likewise.
406 (DO_COND, DO_BODY): Likewise.
407 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
408 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
409 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
410 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
411 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
412 * c-dump.c (dump_stmt): Copy from cp front end.
413 (c_dump_tree): Move code to handle structured loop and switch
414 tree nodes here from cp front end.
415 * c-gimplify.c: Adjust includes.
416 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
417 cp front end.
418 (save_bc_state, restore_bc_state): New functions using old code
419 from cp front end.
420 (get_bc_label, expr_loc_or_loc): Move from cp front end.
421 (genericize_c_loop): Move from cp front end.
422 (genericize_for_stmt, genericize_while_stmt): Likewise.
423 (genericize_do_stmt, genericize_switch_stmt): Likewise.
424 (genericize_continue_stmt, genericize_break_stmt): Likewise.
425 (genericize_omp_for_stmt): Likewise.
426 (c_genericize_control_stmt): New function using code split from
427 cp front end.
428 (c_genericize_control_r): New.
429 (c_genericize): Call walk_tree with c_genericize_control_r.
430 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
431 structured loop and switch tree nodes here from cp front end.
432
2aad20c0
GA
4332020-09-17 Patrick Palka <ppalka@redhat.com>
434
435 PR c/80076
436 * c-indentation.c (should_warn_for_misleading_indentation): Move
437 declarations of local variables closer to their first use.
438 Handle virtual token locations by resolving them to their
439 respective macro expansion points. If all three tokens are
440 produced from the same macro expansion, then instead use their
441 loci within the macro definition.
442
ecde1b0a
GA
4432020-09-16 Martin Sebor <msebor@redhat.com>
444
445 PR c/78666
446 PR c/96126
447 * c-attribs.c (validate_attr_args): New function.
448 (validate_attr_arg): Same.
449 (handle_section_attribute): Call it. Introduce a local variable.
450 (handle_alloc_size_attribute): Same.
451 (handle_alloc_align_attribute): Same.
452
50a71cd0
GA
4532020-09-14 Jakub Jelinek <jakub@redhat.com>
454
455 * c-attribs.c (handle_optimize_attribute): Adjust
456 cl_optimization_save, cl_optimization_restore and
457 build_optimization_node callers.
458 * c-pragma.c (handle_pragma_optimize): Adjust
459 build_optimization_node caller.
460 (handle_pragma_push_options): Adjust
461 build_optimization_node and build_target_option_node callers.
462 (handle_pragma_pop_options, handle_pragma_reset_options):
463 Adjust cl_optimization_restore callers.
464
8f7ea26a
GA
4652020-08-28 Martin Sebor <msebor@redhat.com>
466
467 * c.opt (Wstringop-overread): New option.
468
a6493809
GA
4692020-08-11 Jakub Jelinek <jakub@redhat.com>
470
471 PR c/96545
472 * c-common.c (get_atomic_generic_size): Require that first argument's
473 type points to a complete type and use tree_fits_uhwi_p instead of
474 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
475
48cc2e46
GA
4762020-07-31 Martin Sebor <msebor@redhat.com>
477
478 PR c++/96003
479 * c-common.c (check_function_arguments_recurse): Return early when
480 no-warning bit is set.
481
4822020-07-31 Richard Biener <rguenther@suse.de>
483
484 PR debug/96383
485 * c-common.h (c_common_finalize_early_debug): Declare.
486 * c-common.c: Include debug.h.
487 (c_common_finalize_early_debug): finalize_early_debug langhook
488 implementation generating debug for extern declarations.
489
e71dab87
GA
4902020-07-27 Nathan Sidwell <nathan@acm.org>
491
492 * c-common.c (try_to_locate_new_include_insertion_point): Use
493 strcmp, not pointer equality.
494
ae2e0bc1
GA
4952020-07-25 Martin Sebor <msebor@redhat.com>
496
497 PR c++/96310
498 * c-common.c (check_nonnull_arg): Print note only when warning was
499 issued.
500
3ea9abca
GA
5012020-07-22 Tobias Burnus <tobias@codesourcery.com>
502
503 * c-omp.c (c_finish_omp_critical): Check for no name but
504 nonzero hint provided.
505
0933f508
GA
5062020-07-20 Jason Merrill <jason@redhat.com>
507
508 * c-cppbuiltin.c (c_cpp_builtins): Update
509 __cpp_nontype_template_args for C++20.
510
5112020-07-20 Martin Sebor <msebor@redhat.com>
512
513 PR c/96249
514 * c.opt: Remove stray text.
515
8ca07a30
GA
5162020-07-14 Lewis Hyatt <lhyatt@gmail.com>
517
518 PR other/86904
519 * c-indentation.c (should_warn_for_misleading_indentation): Get
520 global tabstop from the new source.
521 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
522 is now a common option.
523 * c.opt: Likewise.
524
a82c4c4c 5252020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
526
527 * c.opt (Wscalar-storage-order): Add explicit variable.
528
f60ee68d
GA
5292020-07-07 Nathan Sidwell <nathan@acm.org>
530
531 * c-opts.c (c_common_post_options): Add 'injecting' arg to
532 cpp_read_main_file.
533 (c_finish_options): Add linemap_line_start calls for builtin and cmd
534 maps. Force token position to line_table's highest line.
535 * c-ppoutput.c (print_line_1): Refactor, print line zero.
536 (cb_define): Always increment source line.
537
4077d74c
GA
5382020-07-06 Martin Sebor <msebor@redhat.com>
539
540 PR c++/95984
541 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
542 to stub lambda objects with null this pointer.
543 (check_nonnull_arg): Handle C++ nullptr.
544
b5f24739
GA
5452020-07-02 Jason Merrill <jason@redhat.com>
546 Jakub Jelinek <jakub@redhat.com>
547
548 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
549
46fbb6c6
GA
5502020-06-30 Jakub Jelinek <jakub@redhat.com>
551
552 PR c++/95963
553 * c-common.c (check_function_arguments_recurse): Don't crash on
554 calls to internal functions.
555
69273534
GA
5562020-06-28 Martin Sebor <msebor@redhat.com>
557
558 PR c++/86568
559 * c-common.c (struct nonnull_arg_ctx): Add members.
560 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
561 C++ member functions specially. Consider the this pointer implicitly
562 nonnull.
563 (check_nonnull_arg): Use location of argument when available.
564 (check_function_arguments): Use nonnull_arg_ctx as argument.
565
9a33c41f
GA
5662020-06-27 Jakub Jelinek <jakub@redhat.com>
567
568 PR middle-end/95903
569 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
570 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
571 smaller precision intop operands separately.
572
c9c05f73
GA
5732020-06-26 Marek Polacek <polacek@redhat.com>
574
575 * c-opts.c (c_common_init_options): Default to gnu++17.
576
aff95ee7
GA
5772020-06-17 Jonathan Wakely <jwakely@redhat.com>
578
bd0a89dc 579 PR c/95378
aff95ee7
GA
580 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
581 pointer arguments.
582
56638b9b
GA
5832020-06-16 Jakub Jelinek <jakub@redhat.com>
584
585 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
586 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
587 idx members.
588 (c_omp_is_loop_iterator): New function.
589 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
590 if outer loop iterator is present. Perform duplicate checking through
591 hash_set in the function rather than expecting caller to do that.
592 Pass NULL instead of d->ppset to walk_tree_1.
593 (c_omp_check_nonrect_loop_iv): New function.
594 (c_omp_check_loop_iv): Use it. Fill in new members, allow
595 non-rectangular loop forms, diagnose multiple associated loops with
596 the same iterator. Pass NULL instead of &pset to walk_tree_1.
597 (c_omp_check_loop_iv_exprs): Likewise.
598
ec6ffbb9
GA
5992020-06-10 Martin Liska <mliska@suse.cz>
600
601 PR tree-optimization/92860
602 * c-attribs.c (handle_optimize_attribute):
603 Save global options and compare it after parsing of function
604 attribute.
605 * c-pragma.c (opt_stack::saved_global_options): New field.
606 (handle_pragma_push_options): Save global_options.
607 (handle_pragma_pop_options): Compare them after pop.
608
b952c2cf
GA
6092020-06-09 Jakub Jelinek <jakub@redhat.com>
610
611 PR c/95580
612 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
613 case when MEM_REF's first argument has type pointer to incomplete type.
614
1a59f3db
GA
6152020-06-05 Jason Merrill <jason@redhat.com>
616
617 * c-pretty-print.c (pp_c_additive_expression): Handle negative
618 operand to POINTER_PLUS_EXPR.
619
3add3425
GA
6202020-06-04 Martin Sebor <msebor@redhat.com>
621
622 PR middle-end/10138
623 PR middle-end/95136
624 * c-attribs.c (append_access_attrs): Handle attr_access::none.
625 (handle_access_attribute): Same.
626
9a5b7438
GA
6272020-06-03 Mark Wielaard <mark@klomp.org>
628
629 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
630 New function.
631 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
632 New function declaration.
633
6342020-06-03 Mark Wielaard <mark@klomp.org>
635
636 * known-headers.cc (get_string_macro_hint): New function.
637 (get_stdlib_header_for_name): Use get_string_macro_hint.
638 (get_c_stdlib_header_for_string_macro_name): New function.
639 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
640 New function declaration.
641
6422020-06-03 Tobias Burnus <tobias@codesourcery.com>
643
644 * c-common.h (c_omp_predetermined_mapping): Declare.
645 * c-omp.c (c_omp_predetermined_mapping): New.
646
af114c38
MW
6472020-05-22 Mark Wielaard <mark@klomp.org>
648
649 * known-headers.cc (get_stdlib_header_for_name): Add a new
650 stdlib_hint array for stdbool and stdint.
651
45c50b6a
MW
6522020-05-22 Mark Wielaard <mark@klomp.org>
653
654 * known-headers.cc (get_stdlib_header_for_name): Return
655 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
656 flag_isoc99.
657
c22027a0
NS
6582020-05-20 Nathan Sidwell <nathan@acm.org>
659
38a4db21
NS
660 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
661
c22027a0
NS
662 * c-common.c (try_to_locate_new_include_insertion_point): Use
663 strcmp to compare filenames.
664 * c-lex.c (init_c_lex): Move declaration to initialization.
665 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
666 deferred count loop.
667
29f0e90d
JM
6682020-05-15 Jason Merrill <jason@redhat.com>
669
670 * c-opts.c (set_std_cxx20): Set flag_coroutines.
671
b04445d4
JM
6722020-05-13 Jason Merrill <jason@redhat.com>
673
674 * c.opt (std=c++20): Make c++2a the alias.
675 (std=gnu++20): Likewise.
676 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
677 * c-opts.c: Adjust.
678 * c-cppbuiltin.c: Adjust.
679 * c-ubsan.c: Adjust.
680 * c-warn.c: Adjust.
681
11dd3be5
EB
6822020-05-12 Eric Botcazou <ebotcazou@adacore.com>
683
684 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
685
b224c376
NS
6862020-05-08 Nathan Sidwell <nathan@acm.org>
687
688 Reimplement directives only processing.
689 * c-ppoutput.c (token_streamer): Ne.
690 (directives_only_cb): New. Swallow ...
691 (print_lines_directives_only): ... this.
692 (scan_translation_unit_directives_only): Reimplment using the
693 published interface.
694
f1d94677
MP
6952020-05-07 Marek Polacek <polacek@redhat.com>
696
697 * c-format.c (badwords): Add "nonstatic".
698
9b95bb52
JJ
699202-05-07 Jakub Jelinek <jakub@redhat.com>
700
701 PR c/94968
702 * c-common.c (speculation_safe_value_resolve_params): Return false if
703 error_operand_p (val2).
704 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
705 Remove extraneous semicolon.
706
530b4409 7072020-05-06 qing zhao <qing.zhao@oracle.com>
708
709 PR c/94230
710 * c-indentation.c (get_visual_column): Add a hint to use the new
711 -flarge-source-files option.
712
b776bdca
SSF
7132020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
714
715 * c-attribs.c (handle_vector_size_attribute): Add attribute
716 nonnull for argument args in order to silence warning of
717 uninitialized variable usage. Since this is local to the
718 compilation unit and thus cannot be checked at call sides by the
719 compiler, added an assert statement in order to verify this.
720
6607bdd9
L
7212020-05-01 H.J. Lu <hongjiu.lu@intel.com>
722
723 PR target/93492
724 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
725 value to USHRT_MAX (65535).
726
691eeb65
JJ
7272020-04-29 Jakub Jelinek <jakub@redhat.com>
728
729 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
730
26d76be7
JJ
7312020-04-27 Jakub Jelinek <jakub@redhat.com>
732
733 PR c/94755
734 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
735 fncode == BUILT_IN_NONE before initialization of first_param.
736
7291b2ed
MP
7372020-04-23 Marek Polacek <polacek@redhat.com>
738
739 PR c++/94733
740 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
741 TREE_PURPOSE.
742
58a29af8
PP
7432020-04-14 Patrick Palka <ppalka@redhat.com>
744
745 PR c++/85278
746 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
747 ampersand if it's an rvalue reference type.
748
09f04139
MS
7492020-04-13 Martin Sebor <msebor@redhat.com>
750
751 PR c/92326
752 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
753 printing array bound for flexible array members.
754
ee26baf4
IS
7552020-04-13 Iain Sandoe <iain@sandoe.co.uk>
756
757 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
758 define, per n4861.
759
75efe9cb
RB
7602020-04-02 Richard Biener <rguenther@suse.de>
761
762 PR c/94392
763 * c-opts.c (c_common_post_options): Enable -ffinite-loops
764 for -O2 and C++11 or newer.
765
75defde9
PP
7662020-03-28 Patrick Palka <ppalka@redhat.com>
767
768 * c.opt: Add -fconcepts-diagnostics-depth.
769
52f24a9e
MS
7702020-03-27 Martin Sebor <msebor@redhat.com>
771
772 PR c++/94346
773 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
774 to decl_attributes. Make handling of different kinds of entities
775 more robust.
776
ccacf77b
MS
7772020-03-27 Martin Sebor <msebor@redhat.com>
778
779 PR c++/94098
780 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
781 here.
782
ca6c7225
JJ
7832020-03-23 Jakub Jelinek <jakub@redhat.com>
784
785 PR c++/91993
786 * c-warn.c (warnings_for_convert_and_check): For expr and/or
787 result being COMPOUND_EXPRs, skip to ultimate rhs.
788
1aa22b19
RS
7892020-03-20 Richard Sandiford <richard.sandiford@arm.com>
790
791 PR middle-end/94072
792 * c-common.c (c_common_type_for_mode): Before using a registered
793 built-in type, check that the vectorness of the type matches
794 the vectorness of the mode.
795
700d4cb0
JJ
7962020-03-17 Jakub Jelinek <jakub@redhat.com>
797
798 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
799 issue in a diagnostic message.
800
b408e010
LH
8012020-03-15 Lewis Hyatt <lhyatt@gmail.com>
802
803 * c.opt: Avoid redundancy in the help text.
804
e78e50d5
MP
8052020-03-02 Marek Polacek <polacek@redhat.com>
806
807 PR c++/93958 - add missing -std=gnu++20.
808 * c.opt: Add -std=gnu++20.
809
649e1741
MS
8102020-03-01 Martin Sebor <msebor@redhat.com>
811
812 PR c++/92721
813 * c-attribs.c (append_access_attrs): Correctly handle attribute.
814 (handle_access_attribute): Same.
815
7b60f3ba
JJ
8162020-02-25 Jakub Jelinek <jakub@redhat.com>
817
818 PR c/93858
819 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
820 "did you mean" hint in diagnostics.
821
fb260504
JM
8222020-02-15 Jason Merrill <jason@redhat.com>
823
824 * c.opt: Add -std=c++20.
825
1d757b09
EB
8262020-02-14 Eric Botcazou <ebotcazou@adacore.com>
827
828 * c-ada-spec.c: Include bitmap.h.
829 (dump_ada_double_name): Rename into...
830 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
831 (dump_ada_array_type): Adjust to above renaming. Robustify.
832 (dump_nested_types_1): New function copied from... Add dumped_types
833 parameter and pass it down to dump_nested_type.
834 (dump_nested_types): ...this. Remove parent parameter. Just call
835 dump_nested_types_1 on an automatic bitmap.
836 (dump_nested_type): Add dumped_types parameter.
837 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
838 Adjust recursive calls and adjust to above renaming.
839 (dump_ada_declaration): Adjust call to dump_nested_types.
840 Tidy up and adjust to above renaming.
841 (dump_ada_specs): Initialize and release bitmap obstack.
842
0cc575e4
MS
8432020-02-10 Martin Sebor <msebor@redhat.com>
844
845 PR c/93640
846 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
847
a59aa302
JJ
8482020-02-10 Jakub Jelinek <jakub@redhat.com>
849
850 PR other/93641
851 * c-format.c (check_plain): Fix up last argument of strncasecmp.
852 Remove useless extra test.
853
e464fc90
TB
8542020-02-03 Julian Brown <julian@codesourcery.com>
855 Tobias Burnus <tobias@codesourcery.com>
856
857 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
858
e3b6c052
JM
8592020-01-29 Jason Merrill <jason@redhat.com>
860
861 PR c++/89357
862 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
863
6d00f052
JM
8642020-01-23 Jason Merrill <jason@redhat.com>
865
866 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
867
8a990ffa
MS
8682020-01-23 Martin Sebor <msebor@redhat.com>
869
870 PR c/84919
871 * c-common.c (check_function_arguments): Avoid overlap checking
872 of sprintf functions.
873
55b7df8b
JM
8742020-01-22 Jason Merrill <jason@redhat.com>
875
876 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
877 PR c++/40752
878 * c-warn.c (conversion_warning): Check operands only after checking
879 the whole expression. Don't check second operand of + for sign.
880
c77074d0
JM
8812020-01-21 Jason Merrill <jason@redhat.com>
882 Manuel López-Ibáñez <manu@gcc.gnu.org>
883
884 PR c++/40752 - useless -Wconversion with short +=.
885 * c.opt (-Warith-conversion): New.
886 * c-warn.c (conversion_warning): Recurse for operands of
887 operators. Only warn about the whole expression with
888 -Warith-conversion.
889
731dbfc3
JM
8902020-01-21 Jason Merrill <jason@redhat.com>
891
892 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
893 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
894
ad1a3914
NS
8952020-01-20 Nathan Sidwell <nathan@acm.org>
896
897 PR preprocessor/80005
898 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
899
49789fd0
IS
9002020-01-18 Iain Sandoe <iain@sandoe.co.uk>
901
902 * c-common.c (co_await, co_yield, co_return): New.
903 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
904 RID_CO_RETURN): New enumeration values.
905 (D_CXX_COROUTINES): Bit to identify coroutines are active.
906 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
907 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
908 * c.opt (fcoroutines): New command-line switch.
909
4bc1899b
DM
9102020-01-10 David Malcolm <dmalcolm@redhat.com>
911
912 * c-format.c (local_event_ptr_node): New.
913 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
914 (init_dynamic_diag_info): Initialize local_event_ptr_node.
915 * c-format.h (T_EVENT_PTR): New define.
916
f25e33fa
MS
9172020-01-10 Martin Sebor <msebor@redhat.com>
918
919 PR c/93132
920 * c-attribs.c (append_access_attrs): Validate against the translated
921 access string rather than the human-readable representation.
922
8d9254fc
JJ
9232020-01-01 Jakub Jelinek <jakub@redhat.com>
924
925 Update copyright years.
926
39292e25
EB
9272019-12-20 Eric Botcazou <ebotcazou@adacore.com>
928
929 * c-ada-spec.h (decl_sloc): Delete.
930 * c-ada-spec.c (decl_sloc): Make static.
931
519d7496
JB
9322019-12-19 Julian Brown <julian@codesourcery.com>
933
934 * c-common.h (c_omp_map_clause_name): Add prototype.
935 * c-omp.c (c_omp_map_clause_name): New function.
936 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
937 PRAGMA_OACC_CLAUSE_DETACH.
938
a6163563
JB
9392019-12-19 Julian Brown <julian@codesourcery.com>
940 Maciej W. Rozycki <macro@codesourcery.com>
941 Tobias Burnus <tobias@codesourcery.com>
942 Thomas Schwinge <thomas@codesourcery.com>
943
944 * c-pragma.h (pragma_omp_clause): Add
945 PRAGMA_OACC_CLAUSE_NO_CREATE.
946
e8f1ade2
MS
9472019-12-17 Martin Sebor <msebor@redhat.com>
948
949 PR c++/61339
950 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
951
368877a1
DM
9522019-12-11 David Malcolm <dmalcolm@redhat.com>
953
954 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
955 implementation.
956 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
957
d68f5d45
DM
9582019-12-09 David Malcolm <dmalcolm@redhat.com>
959
960 * c-format.c (range_label_for_format_type_mismatch::get_text):
961 Replace label_text ctor called with true with label_text::take.
962
d3e28653
DM
9632019-12-09 David Malcolm <dmalcolm@redhat.com>
964
965 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
966 initial newline from expected outputs.
967 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
968 call to diagnostic_show_locus.
969
abd6d8cc
JJ
9702019-12-06 Jakub Jelinek <jakub@redhat.com>
971
972 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
973 now.
974
7906797e
MP
9752019-12-05 Marek Polacek <polacek@redhat.com>
976 Jakub Jelinek <jakub@redhat.com>
977
978 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
979 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
980
5c04da88
MP
9812019-12-05 Marek Polacek <polacek@redhat.com>
982
983 PR c++/92271 - make __is_same alias for __is_same_as.
984 * c-common.c: Add __is_same, an alias for __is_same_as.
985
43aae289
MP
9862019-12-03 Marek Polacek <polacek@redhat.com>
987
988 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
989 * c-cppbuiltin.c (c_cpp_builtins): Predefine
990 __cpp_aggregate_paren_init=201902 for -std=c++2a.
991
d7ddfbcb
JH
9922019-11-30 Jan Hubicka <hubicka@ucw.cz>
993
994 * c-attribs.c (handle_symver_attribute): New function
995 (c_common_attributes): Add symver.
996
65ef05d0
RS
9972019-11-30 Richard Sandiford <richard.sandiford@arm.com>
998
999 * c-common.c (pointer_int_sum): Use verify_type_context to check
1000 whether the target allows pointer arithmetic for the types involved.
1001 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
1002 to check whether the target allows sizeof and alignof operations
1003 for the types involved.
1004
1a291106
JM
10052019-11-27 Jason Merrill <jason@redhat.com>
1006
1007 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
1008
05d6cb1a
JJ
10092019-11-26 Jakub Jelinek <jakub@redhat.com>
1010
1011 PR c++/61414
1012 * c-attribs.c (handle_mode_attribute): Add mode attribute to
1013 ENUMERAL_TYPEs.
1014
5b8d9367
JM
10152019-11-25 Joseph Myers <joseph@codesourcery.com>
1016
1017 PR c/91985
1018 * c-common.c (c_common_type_for_mode): Handle decimal
1019 floating-point types being NULL_TREE.
1020 * c-format.c (get_format_for_type_1): Handle specified types being
1021 NULL_TREE.
1022 * c-lex.c (interpret_float): Give an error for decimal
1023 floating-point constants when decimal floating-point not
1024 supported.
1025
1fbf51cb
JJ
10262019-11-23 Jakub Jelinek <jakub@redhat.com>
1027
1028 PR middle-end/83859
1029 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
1030 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
1031 group warning with inform together.
1032 (handle_access_attribute): Formatting fix.
1033
761df906
JJ
10342019-11-22 Jakub Jelinek <jakub@redhat.com>
1035
bdaf8be1
JJ
1036 PR c/90677
1037 * c-common.h (identifier_global_tag): Declare.
1038 * c-format.c (get_pointer_to_named_type): Renamed to ...
1039 (get_named_type): ... this. Use identifier_global_tag instead of
1040 identifier_global_value, handle the return value being a TYPE_P.
1041 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
1042 to call get_named_type instead. Formatting fixes.
1043
c2ecce6d 1044 Implement P1902R1, Missing feature-test macros 2017-2019.
761df906
JJ
1045 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
1046 and __cpp_generic_lambdas for -std=c++2a. Define
1047 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
1048 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
1049 __cpp_concepts for -std=c++2a.
1050
54aa6b58
MS
10512019-11-22 Martin Sebor <msebor@redhat.com>
1052
1053 PR middle-end/83859
1054 * c-attribs.c (handle_access_attribute): New function.
1055 (c_common_attribute_table): Add new attribute.
1056 (get_argument_type): New function.
1057 (append_access_attrs): New function.
1058 (get_nonnull_operand): Rename...
1059 (get_attribute_operand): ...to this.
1060 * c-common.c (get_nonnull_operand): Rename...
1061 (get_attribute_operand): ...to this.
1062
6c80b1b5
JM
10632019-11-21 Joseph Myers <joseph@codesourcery.com>
1064
1065 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
1066 of warning.
1067
192961ff
JM
10682019-11-19 Joseph Myers <joseph@codesourcery.com>
1069
1070 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
1071 warning for standard attributes mixed with fallthrough attributes.
1072
f8aea5e3
JM
10732019-11-15 Joseph Myers <joseph@codesourcery.com>
1074
1075 * c-attribs.c (handle_fallthrough_attribute): Remove static.
1076 * c-common.h (handle_fallthrough_attribute): Declare.
1077
2cc94aa8
JM
10782019-11-15 Joseph Myers <joseph@codesourcery.com>
1079
1080 * c-attribs.c (handle_deprecated_attribute): Remove static.
1081 * c-common.h (handle_deprecated_attribute): Declare.
1082
7c5890cc
JM
10832019-11-14 Joseph Myers <joseph@codesourcery.com>
1084
1085 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
1086 char for C.
1087
b2417b59
JJ
10882019-11-14 Jakub Jelinek <jakub@redhat.com>
1089
d0ec7c93
JJ
1090 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
1091 valid vendors.
1092
b2417b59
JJ
1093 * c-omp.c (c_omp_check_context_selector): Handle name lists
1094 containing string literals. Don't diagnose atomic_default_mem_order
1095 with multiple props.
1096
00be2a5f
JM
10972019-11-13 Joseph Myers <joseph@codesourcery.com>
1098
1099 * c-cppbuiltin.c (builtin_define_float_constants): Also define
1100 NORM_MAX constants. Update call to get_max_float.
1101 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
1102 constants.
1103
2dbad62d
EB
11042019-11-13 Eric Botcazou <ebotcazou@adacore.com>
1105
1106 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
1107 (dump_forward_type): Do not generate a declaration for function types.
1108 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
1109 of the component type if it is declared in another file.
1110
6ed76044
ML
11112019-11-12 Martin Liska <mliska@suse.cz>
1112
1113 * c-opts.c (c_common_post_options):
1114 Use SET_OPTION_IF_UNSET.
1115
62aee289
MR
11162019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
1117 Frederik Harwath <frederik@codesourcery.com>
1118
1119 gcc/c-family/
1120 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
1121 constant.
1122 * c-pragma.c (oacc_pragmas): Add "serial" entry.
1123
f486280c
RS
11242019-11-08 Richard Sandiford <richard.sandiford@arm.com>
1125
1126 * c-common.h (gnu_vector_type_p): New function.
1127 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
1128 vectors to satisfy gnu_vector_type_p.
1129 (c_build_vec_convert): Likewise __builtin_convertvector.
1130 (convert_vector_to_array_for_subscript): Likewise when applying
1131 implicit vector to array conversion.
1132 (scalar_to_vector): Likewise when converting vector-scalar
1133 operations to vector-vector operations.
1134
017c6491
JM
11352019-11-08 Joseph Myers <joseph@codesourcery.com>
1136
1137 * c.opt (Wold-style-definition): Initialize to -1.
1138 * c-opts.c (c_common_post_options): Set warn_old_style_definition
1139 to flag_isoc2x if not set explicitly.
1140
c01bd174
JM
11412019-11-07 Joseph Myers <joseph@codesourcery.com>
1142
1143 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
1144
0df65305
JM
11452019-11-05 Jason Merrill <jason@redhat.com>
1146
1147 * c-opts.c (c_common_post_options): -fconcepts-ts implies
1148 -fconcepts.
1149
e0c866dd
KK
11502019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
1151
1152 * c-opts.c (c_common_post_options): Update
1153 latest_abi_version.
1154
f968ef9b
JJ
11552019-11-02 Jakub Jelinek <jakub@redhat.com>
1156
d0c464d2
JJ
1157 * c-common.h (c_omp_get_context_selector): Remove.
1158 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
1159 and renamed to omp_get_context_selector.
1160
917dd789
JJ
1161 * c-omp.c (c_omp_mark_declare_variant): Use
1162 omp_context_selector_set_compare.
1163
f968ef9b
JJ
1164 PR c++/88335 - Implement P1073R3: Immediate functions
1165 * c-common.h (enum rid): Add RID_CONSTEVAL.
1166 * c-common.c (c_common_reswords): Add consteval.
1167
5f6705b7
JJ
11682019-11-01 Martin Sebor <msebor@redhat.com>
1169
1170 PR middle-end/91679
1171 PR middle-end/91647
1172 PR middle-end/91463
1173 PR middle-end/92312
1174 * c-pretty-print.c (direct_abstract_declarator): Print
1175 bound in zero-length arrays.
1176 * c.opt (-Wzero-length-bounds): New option.
1177
43f1814c
NS
11782019-10-30 Nathan Sidwell <nathan@acm.org>
1179
1180 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
1181 macros.
1182
ad1539d5
MS
11832019-10-28 Martin Sebor <msebor@redhat.com>
1184
1185 PR c/66970
1186 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
1187 even when only preprocessing.
1188 * c-common.h (names_builtin_p): Declare new function.
1189 * c-lex.c (init_c_lex): Set has_builtin.
1190 (c_common_has_builtin): Define a new function.
1191 * c-ppoutput.c (init_pp_output): Set has_builtin.
1192
135df52c
JJ
11932019-10-24 Jakub Jelinek <jakub@redhat.com>
1194
1195 * c-common.h (c_omp_context_selector_matches): Remove.
1196 * c-omp.c (c_omp_context_selector_matches): Remove.
1197 * c-attribs.c (c_common_attribute_table): Add
1198 "omp declare target {host,nohost,block}" attributes.
1199
8ad0c477
JM
12002019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
1201
1202 * c-lex.c (c_common_has_attribute): Update nodiscard value.
1203
56898e43
RS
12042019-10-14 Richard Sandiford <richard.sandiford@arm.com>
1205
1206 * c-common.h (user_facing_original_type_p): Declare.
1207 * c-common.c: Include c-spellcheck.h.
1208 (user_facing_original_type_p): New function.
1209
20de9568
JJ
12102019-10-12 Jakub Jelinek <jakub@redhat.com>
1211
1212 * c-common.h (c_omp_mark_declare_variant,
1213 c_omp_context_selector_matches): Declare.
1214 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
1215 and hsa-common.h.
1216 (c_omp_get_context_selector): Support second argument NULL.
1217 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
1218 functions.
1219 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
1220 attribute, add "omp declare variant base" and
1221 "omp declare variant variant" attributes.
1222
175a85b2
JM
12232019-10-11 Joseph Myers <joseph@codesourcery.com>
1224
1225 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
1226 CppReason(CPP_W_C11_C2X_COMPAT).
1227
fe2bc27c
JM
12282019-10-11 Joseph Myers <joseph@codesourcery.com>
1229
1230 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
1231 _Decimal64 and _Decimal128.
1232
27dfdc0f
JM
12332019-10-10 Joseph Myers <joseph@codesourcery.com>
1234
1235 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
1236 types if DFP not supported.
1237
94e7f906
JJ
12382019-10-10 Jakub Jelinek <jakub@redhat.com>
1239
1240 * c-common.h (c_omp_check_context_selector,
1241 c_omp_get_context_selector): Declare.
1242 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
1243 in diagnostic message.
1244 (c_omp_check_context_selector, c_omp_get_context_selector): New
1245 functions.
1246 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
1247 attribute.
1248 (handle_omp_declare_variant_attribute): New function.
1249
a7160771
MS
12502019-10-09 Martin Sebor <msebor@redhat.com>
1251
1252 PR tree-optimization/90879
1253 * c.opt (-Wstring-compare): New option.
1254
cb57504a
JM
12552019-10-08 Andrew Sutton <asutton@lock3software.com>
1256 Jason Merrill <jason@redhat.com>
1257
1258 Update the concepts implementation to conform to the C++20
1259 specification, improve compile times, and generally clean up
1260 the implementation.
1261
1262 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
1263 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
1264 * c.opt: Add -Wconcepts-ts.
1265 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
1266 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
1267 (set_std_cxx2a): Enable concepts by default.
1268
fbb2a6dc
JM
12692019-10-08 Joseph Myers <joseph@codesourcery.com>
1270
1271 * c-opts.c (c_common_post_options): Set
1272 -fno-fp-int-builtin-inexact for C2X.
1273
8e007055
JJ
12742019-10-05 Jakub Jelinek <jakub@redhat.com>
1275
1276 PR c++/91369 - Implement P0784R7: constexpr new
1277 * c-cppbuiltin.c (c_cpp_builtins): Predefine
1278 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
1279
843f104d
JM
12802019-10-04 Joseph Myers <joseph@codesourcery.com>
1281
1282 PR c/82752
1283 * c-format.c (C_STD_VER): Handle C2x.
1284 (C_STD_NAME): Likewise.
1285 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
1286 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
1287 modifier allowed and 'p' flag.
1288 * c-format.h (enum format_std_version): Add STD_C2X.
1289 (struct format_char_info): Mention 'p' in comment on flags2.
1290
e9c9a142
DM
12912019-10-01 David Malcolm <dmalcolm@redhat.com>
1292
1293 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
1294 calling diagnostic_show_locus, rather than destroying it afterwards.
1295
7552c36a
JJ
12962019-10-01 Jakub Jelinek <jakub@redhat.com>
1297
1298 PR c++/91925
1299 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
1300 with NULL DECL_FIELD_OFFSET.
1301
8209db25
RS
13022019-10-01 Richard Sandiford <richard.sandiford@arm.com>
1303
1304 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
1305 has a type name, use it in preference to the __vector syntax.
1306
9343bf99
RS
13072019-09-30 Richard Sandiford <richard.sandiford@arm.com>
1308
1309 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
1310 two spaces between a comma and "...".
1311
59bc434a
JJ
13122019-09-27 Jakub Jelinek <jakub@redhat.com>
1313
1314 PR c++/88203
1315 * c-common.h (c_omp_predefined_variable): Declare.
1316 * c-omp.c (c_omp_predefined_variable): New function.
1317 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
1318 for predefined variables.
1319
c6447c20
RS
13202019-09-27 Richard Sandiford <richard.sandiford@arm.com>
1321
1322 * c-common.h (build_function_call_vec): Take the original
1323 function decl as an optional final parameter.
1324 (check_builtin_function_arguments): Take the original function decl.
1325 * c-common.c (check_builtin_function_arguments): Likewise.
1326 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
1327 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
1328
c4438114
JM
13292019-09-15 Jason Merrill <jason@redhat.com>
1330
1331 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
1332 fold_for_warn in "|| mask" warning.
1333
68a57628
ML
13342019-09-10 Martin Liska <mliska@suse.cz>
1335
1336 * c.opt: Use newly added WarnRemoved.
1337
f48ef52e
ML
13382019-09-09 Martin Liska <mliska@suse.cz>
1339
1340 * c.opt: Update comment of removed
1341 options that are preserved only for backward
1342 compatibility.
1343
67f6e649
ML
13442019-09-06 Martin Liska <mliska@suse.cz>
1345
1346 PR c++/91125
1347 * c-common.c: Remove definition of flag_use_repository.
1348 * c-common.h: Likewise.
1349 * c-opts.c (c_common_handle_option):
1350 Do not handle OPT_frepo option.
1351 * c.opt: Mark the option with Deprecated.
1352
db9d2274
MP
13532019-09-04 Marek Polacek <polacek@redhat.com>
1354
1355 * c.opt (fdeduce-init-list): Ignored.
1356
68e2c199
PK
13572019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1358
1359 PR c/78736
1360 * c.opt (Wenum-conversion): New option.
1361
7a4418a5
JL
13622019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1363
1364 * c-attribs.c (handle_section_attribute): Call the
1365 handle_generic_attribute target hook after performing target
1366 independent processing.
1367 (handle_noinit_attribute): Likewise.
1368
5f76ab15
ILT
13692019-09-03 Ian Lance Taylor <iant@golang.org>
1370
1371 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
1372 when using -fgo-dump-spec.
1373
ae0d3f6a
ML
13742019-09-02 Martin Liska <mliska@suse.cz>
1375
1376 PR c++/91155
1377 * c-common.c (fname_as_string): Use cxx_printable_name for
1378 __PRETTY_FUNCTION__ same as was used before r265711.
1379
8a902edb
MP
13802019-08-28 Marek Polacek <polacek@redhat.com>
1381
1382 Implement P1152R4: Deprecating some uses of volatile.
1383 PR c++/91361
1384 * c-opts.c (c_common_post_options): Enable -Wvolatile by
1385 default for C++2a, unless -Wno-deprecated.
1386 * c.opt (Wvolatile): New warning.
1387
4742dbe7
MP
13882019-08-28 Marek Polacek <polacek@redhat.com>
1389
1390 PR c++/91360 - Implement C++20 P1143R2: constinit.
1391 * c-common.c (c_common_reswords): Add constinit and __constinit.
1392 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
1393 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
1394 RID_LAST_CXX20.
1395 (D_CXX20): Define.
1396 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
1397 * c-format.c (cxx_keywords): Add "constinit".
1398 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
1399
6a074892
JJ
14002019-08-27 Jakub Jelinek <jakub@redhat.com>
1401
1402 PR c++/91415
1403 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
1404 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
1405 like COMPOUND_EXPR rather than normal expression.
1406
22f8849d
IS
14072019-08-23 Iain Sandoe <iain@sandoe.co.uk>
1408
1409 PR pch/61250
1410 * c-lex.c (c_lex_with_flags): Don't call
1411 c_common_no_more_pch () from here.
1412
df375b03
JJ
14132019-08-23 Jakub Jelinek <jakub@redhat.com>
1414
1415 PR middle-end/91283
1416 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
1417 instead of flag_excess_precision_cmdline.
1418 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
1419 * c-opts.c (c_common_post_options): Likewise.
1420
14b7950f
MS
14212019-08-22 Martin Sebor <msebor@redhat.com>
1422
1423 PR middle-end/91490
1424 * c-common.c (braced_list_to_string): Add argument and overload.
1425 Handle flexible length arrays and unions.
1426
8bb2ee59
EB
14272019-08-21 Eric Botcazou <ebotcazou@adacore.com>
1428
1429 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
1430 function declarations where arguments are missing. Rename variables.
1431
21c1e205
RB
14322019-08-15 Richard Biener <rguenther@suse.de>
1433
1434 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
1435 enabled, define __SIZETYPE__.
1436
f0033821
CL
14372019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
1438
1439 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
1440 exclusion with "section" attribute.
1441 (attr_noinit_exclusions): New table.
1442 (handle_noinit_attribute): New function.
1443
4d732405
RS
14442019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1445
1446 PR middle-end/91421
1447 * c-common.c (resolve_overloaded_builtin): Use
1448 copy_decl_built_in_function.
1449
51ad8481
MS
14502019-08-13 Martin Sebor <msebor@redhat.com>
1451
1452 PR c/80619
1453 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
1454 (asm_fprintf_length_spec): Same.
1455 * c-format.h (format_lengths): Add FMT_LEN_w.
1456
77eb117f
JJ
14572019-08-10 Jakub Jelinek <jakub@redhat.com>
1458
1459 * c-pragma.h (enum pragma_omp_clause): Add
1460 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1461
398e3feb
JJ
14622019-08-07 Jakub Jelinek <jakub@redhat.com>
1463
1464 * c-pragma.h (enum pragma_omp_clause): Add
1465 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
1466 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
1467 enumeration value.
1468
ab574db6
MP
14692019-08-05 Marek Polacek <polacek@redhat.com>
1470
1471 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
1472 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
1473 default for C++2a, unless -Wno-deprecated.
1474 * c.opt (Wcomma-subscript): New warning.
1475
554a530f
JJ
14762019-07-20 Jakub Jelinek <jakub@redhat.com>
1477
1478 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
1479 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
1480 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
1481 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
1482 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
1483 constructs with the loop construct.
1484
1a888209
JJ
14852019-07-13 Jakub Jelinek <jakub@redhat.com>
1486
1487 PR c/91149
1488 * c-omp.c (c_omp_split_clauses): Fix a pasto in
1489 OMP_CLAUSE_REDUCTION_TASK handling.
1490
1fdd6f04
JJ
14912019-07-12 Jakub Jelinek <jakub@redhat.com>
1492
1493 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
1494 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
1495
99b1c316
MS
14962019-07-09 Martin Sebor <msebor@redhat.com>
1497
1498 PR c++/61339
1fdd6f04 1499 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
1500 and others to class.
1501 * c-pretty-print.h: Same.
1502
6c1dae73
MS
15032019-07-09 Martin Sebor <msebor@redhat.com>
1504
1505 PR c++/61339
1506 * c-format.c (check_argument_type): Change class-key from class to
1507 struct and vice versa to match convention and avoid -Wclass-is-pod
1508 and -Wstruct-no-pod.
1509 * c-pretty-print.h: Same.
1510
8ba6ea87
ML
15112019-07-03 Martin Liska <mliska@suse.cz>
1512
1513 * c-common.c (try_to_locate_new_include_insertion_point): Remove
1514 dead assignemts.
1515
83eb9522
JJ
15162019-07-03 Jakub Jelinek <jakub@redhat.com>
1517
1518 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
1519 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
1520 with OMP_PARALLEL.
1521
1c6ffbab
QZ
15222019-07-02 qing zhao <qing.zhao@oracle.com>
1523
1524 PR preprocessor/90581
1525 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
1526 * c.opt: Add new option -fmax-include-depth.
1527
7ffc7de5
JM
15282019-06-26 Jason Merrill <jason@redhat.com>
1529
1530 PR c++/55442 - memory-hog with highly recursive constexpr.
1531 * c.opt (fconstexpr-loop-limit): New.
1532
361af3e4
JJ
15332019-06-25 Jakub Jelinek <jakub@redhat.com>
1534
1535 PR sanitizer/90954
1536 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
1537 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
1538
ab20d992
JJ
15392019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1540
1541 * c-common.c (c_common_nodes_and_builtins): Define
1542 alternate "__intN__" name for "__intN" types.
1543
f4af4019
JH
15442019-06-24 Jan Hubicka <jh@suse.cz>
1545
1546 * c-common.c (braced_lists_to_strings): Check that
1547 type is array or integer prior checking string flag.
1548
da9e9b57
MB
15492019-06-21 Matthew Beliveau <mbelivea@redhat.com>
1550
1551 PR c++/90875 - added -Wswitch-outside-range option
1552 * c.opt (Wswitch-outside-range): Added new option.
1553 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
1554
3f3d6a6f
MP
15552019-06-21 Marek Polacek <polacek@redhat.com>
1556
1557 PR c++/90953 - ICE with -Wmissing-format-attribute.
1558 * c-common.c (check_function_arguments_recurse): Use
1559 get_attribute_name.
1560 (check_missing_format_attribute): Likewise.
1561
1bf32c11
MP
15622019-06-19 Marek Polacek <polacek@redhat.com>
1563
1564 PR c++/60364 - noreturn after first decl not diagnosed.
1565 * c-attribs.c (handle_noreturn_attribute): No longer static.
1566 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
1567 Declare.
1568 * c-format.c (check_function_format): Use get_attribute_name.
1569
a04c0734
MS
15702019-06-19 Martin Sebor <msebor@redhat.com>
1571
1572 PR translation/90156
1573 * c-format.c (function_format_info::format_type): Adjust type.
1574 (function_format_info::is_raw): New member.
1575 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
1576 (decode_format_attr): Adjust call to decode_format_type.
1577 Avoid a redundant call to convert_format_name_to_system_name.
1578 Avoid abbreviating the word "arguments" in a diagnostic.
1579 (format_warning_substr): New function.
1580 (avoid_dollar_number): Quote dollar sign in a diagnostic.
1581 (finish_dollar_format_checking): Same.
1582 (check_format_info): Same.
1583 (struct baltoks_t): New.
1584 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
1585 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
1586 functions.
1587 (check_format_info_main): Call check_plain. Use baltoks_t. Call
1588 maybe_diag_unbalanced_tokens.
1589 (handle_format_attribute): Spell out the word "arguments" in
1590 a diagnostic.
1591
d3786ebb
MB
15922019-06-11 Matthew Beliveau <mbelivea@redhat.com>
1593
1594 PR c++/90449 - add -Winaccessible-base option.
1595 * c.opt (Winaccessible-base): New option.
1596
bf38f7e9
JJ
15972019-06-10 Jakub Jelinek <jakub@redhat.com>
1598
1599 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
1600 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
1601 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
1602 combined/composite constructs where it is not allowed. Copy over
1603 OMP_CLAUSE_REDUCTION_INSCAN.
1604
0ecf545c
MS
16052019-06-05 Martin Sebor <msebor@redhat.com>
1606
1607 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
1608 (handle_alias_ifunc_attribute): Same.
1609 (handle_copy_attribute): Same.
1610 (handle_weakref_attribute): Same.
1611 (handle_nonnull_attribute): Same.
1612 * c-warn.c (warn_for_sign_compare): Same.
1613 (warn_for_restrict): Same.
1614 * c.opt: Same.
1615
36b34127
MS
16162019-06-05 Martin Sebor <msebor@redhat.com>
1617
1618 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
1619 * c.opt (-Wformat-diag): Remove a spurious period.
1620
357a352f
JJ
16212019-05-29 Jakub Jelinek <jakub@redhat.com>
1622
1623 PR c/90628
1624 * c-common.c (check_builtin_function_arguments)
1625 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
1626 as last argument.
1627
2b8235ea
EB
16282019-05-23 Eric Botcazou <ebotcazou@adacore.com>
1629
1630 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
1631
6d86ddc4
ML
16322019-05-22 Martin Liska <mliska@suse.cz>
1633
1634 PR lto/90500
1635 * c-attribs.c (handle_copy_attribute): Do not copy
1636 target_clones attribute.
1637
419ba5b9
EB
16382019-05-21 Eric Botcazou <ebotcazou@adacore.com>
1639
1640 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
1641 * c-ada-spec.c (print_assignment_operator): New function.
1642 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
1643 assignment operators declared as methods and filter out the others.
1644
e03436e7
TS
16452019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1646
1647 PR c/89433
1648 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
1649 "omp declare target".
1650
a9c697b8
MS
16512019-05-16 Martin Sebor <msebor@redhat.com>
1652
ab20d992
JJ
1653 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
1654 keywords, operators, and types in diagnostics.
1655 (handle_scalar_storage_order_attribute): Same.
1656 (handle_mode_attribute): Same.
1657 (handle_visibility_attribute): Same.
1658 (handle_assume_aligned_attribute): Same.
1659 (handle_no_split_stack_attribute): Same.
1660 * c-common.c (shorten_compare): Same.
1661 (c_common_truthvalue_conversion): Same.
1662 (cb_get_source_date_epoch): Same.
1663 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
1664 in diagnostics.
1665 (interpret_float): Same.
1666 * c-omp.c (c_finish_omp_for): Same.
1667 * c-opts.c (c_common_post_options): Same.
1668 * c-pch.c (c_common_pch_pragma): Same.
1669 * c-pragma.c (pop_alignment): Same.
1670 (handle_pragma_pack): Same.
1671 (apply_pragma_weak): Same.
1672 (handle_pragma_weak): Same.
1673 (handle_pragma_scalar_storage_order): Same.
1674 (handle_pragma_redefine_extname): Same.
1675 (add_to_renaming_pragma_list): Same.
1676 (maybe_apply_renaming_pragma): Same.
1677 (push_visibility): Same.
1678 (handle_pragma_visibility): Same.
1679 (handle_pragma_optimize): Same.
1680 (handle_pragma_message): Same.
1681 * c-warn.c (warn_for_omitted_condop): Same.
1682 (lvalue_error): Same.
a9c697b8 1683
6b943512
RB
16842019-05-15 Richard Biener <rguenther@suse.de>
1685
1686 PR c/90474
1687 * c-common.c (c_common_mark_addressable_vec): Also mark
1688 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
1689 c_mark_addressable.
ab20d992 1690
b744fc85
NS
16912019-05-06 Nathan Sidwell <nathan@acm.org>
1692
1693 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
1694
598f50d7
NS
16952019-04-30 Nathan Sidwell <nathan@acm.org>
1696
1697 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
1698
5bcc5a3b
ML
16992019-04-30 Martin Liska <mliska@suse.cz>
1700
1701 * c-pragma.c (handle_pragma_diagnostic): Provide hints
1702 for unknown options.
1703
e78a87f7
RS
17042019-04-26 Richard Sandiford <richard.sandiford@arm.com>
1705
1706 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
1707 the pointer target rather than the pointer itself.
1708
c280b7ee
JJ
17092019-04-19 Jakub Jelinek <jakub@redhat.com>
1710
1711 PR c/89888
1712 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
1713 arguments.
1714 (c_do_switch_warnings): Remove outside_range_p argument.
1715 * c-common.c (check_case_bounds): Removed.
1716 (c_add_case_label): Remove orig_type and outside_range_p arguments.
1717 Don't call check_case_bounds. Fold low_value as well as high_value.
1718 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
1719 Check for case labels outside of range of original type here and
1720 adjust them.
1721
8e8225e6
JJ
17222019-04-12 Jakub Jelinek <jakub@redhat.com>
1723
63b8a166
JJ
1724 PR translation/90041
1725 * c.opt (-fhandle-exceptions): Use %< and %> around option names
1726 in the Warn diagnostics.
1727
8e8225e6
JJ
1728 PR c/89946
1729 * c-attribs.c (handle_patchable_function_entry_attribute): Add
1730 function comment. Warn if arguments of the attribute are not positive
1731 integer constants.
1732
53a3f614
EB
17332019-04-09 Eric Botcazou <ebotcazou@adacore.com>
1734
1735 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
1736 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
1737
22be5873
EB
17382019-04-07 Eric Botcazou <ebotcazou@adacore.com>
1739
1740 * c-ada-spec.c (is_float128): New predicate extracted from...
1741 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
1742 <REAL_TYPE>: ...here. Call it.
1743
34facf20
DM
17442019-04-05 David Malcolm <dmalcolm@redhat.com>
1745
1746 PR c/89985
1747 * c-warn.c (check_address_or_pointer_of_packed_member): Add
1748 auto_diagnostic_group. Guard inform calls by result of
1749 warning_at call.
1750
05564120
MP
17512019-04-05 Marek Polacek <polacek@redhat.com>
1752
ab20d992 1753 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
05564120
MP
1754 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
1755 of RHS.
1756
7a506c3c
JM
17572019-04-03 Jason Merrill <jason@redhat.com>
1758
1759 PR c++/86586 - -fcompare-debug=-Wsign-compare.
1760 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
1761
ddeae8c8
MS
17622019-04-01 Martin Sebor <msebor@redhat.com>
1763
1764 PR c/89685
1765 * c-attribs.c (handle_copy_attribute): Handle references and
1766 non-constant expressions.
1767
a15ffa22
JJ
17682019-03-22 Jakub Jelinek <jakub@redhat.com>
1769
1770 PR c++/87481
1771 * c.opt (-fconstexpr-ops-limit=): New option.
1772
36a3a7a3
JJ
17732019-03-21 Jakub Jelinek <jakub@redhat.com>
1774
1775 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
1776 template param.
1777
bec1da64
MS
17782019-03-19 Martin Sebor <msebor@redhat.com>
1779
1780 PR tree-optimization/89688
1781 * c-common.c (braced_list_to_string): Make static.
1782 (braced_lists_to_strings): Define new function.
1783 * c-common.h (braced_list_to_string): Remove.
1784 (braced_lists_to_strings): Declare.
1785
1fe61adf
ML
17862019-03-12 Martin Liska <mliska@suse.cz>
1787
1788 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
1789
93964ebd
ML
17902019-03-11 Martin Liska <mliska@suse.cz>
1791
1792 * c-opts.c (c_common_post_options): Wrap apostrophes
1793 in gcc internal format with %'.
1794
a3f9f006
ML
17952019-03-11 Martin Liska <mliska@suse.cz>
1796
1797 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
1798 in a string format message and fix GNU coding style.
1799 * c-common.c (vector_types_convertible_p): Likewise.
1800 (c_build_vec_perm_expr): Likewise.
1801 * c-indentation.c (get_visual_column): Likewise.
1802 * c-opts.c (c_common_handle_option): Likewise.
1803 (c_common_post_options): Likewise.
1804 (sanitize_cpp_opts): Likewise.
1805 * c-pch.c (c_common_pch_pragma): Likewise.
1806 * c-pragma.c (handle_pragma_pack): Likewise.
1807
1db01ff9
JJ
18082019-03-08 Jakub Jelinek <jakub@redhat.com>
1809
1810 PR tree-optimization/89550
1811 * c-common.c (c_common_truthvalue_conversion): Only set
1812 TREE_NO_WARNING if warning_at returned true.
1813 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
1814
ba790e6f
JJ
18152019-02-25 Sandra Loosemore <sandra@codesourcery.com>
1816 Martin Sebor <msebor@gmail.com>
1817
1818 * c.opt (Wmissing-attributes): Clean up doc string.
1819
7da73ba7
JJ
18202019-02-25 Jakub Jelinek <jakub@redhat.com>
1821
1822 PR c/89495
1823 * c-format.c (maybe_read_dollar_number): Compute nargnum in
1824 HOST_WIDE_INT type to avoid overflows and change overflow_flag
1825 checking.
1826
921bb9d1
RB
18272019-02-22 Richard Biener <rguenther@suse.de>
1828
1829 * c-pch.c (no_checksum): Remove.
1830 (pch_init): Remove assertion that executable_checksum is not
1831 all zero.
1832 (c_common_valid_pch): Likewise.
1833
e2ebb05c
MS
18342019-02-18 Martin Sebor <msebor@redhat.com>
1835
1836 PR middle-end/89294
1837 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
1838
3fe53000
DM
18392019-02-16 David Malcolm <dmalcolm@redhat.com>
1840
1841 PR c++/88680
1842 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
1843 implementing -Wtype-limits.
1844
28a8cef1
MS
18452019-02-11 Martin Sebor <msebor@redhat.com>
1846
1847 PR c++/87996
1848 * c-common.c (invalid_array_size_error): New function.
1849 (valid_array_size_p): Call it. Handle size as well as type.
1850 * c-common.h (valid_constant_size_p): New function.
1851 (enum cst_size_error): New type.
1852
ec2be203
DM
18532019-01-31 David Malcolm <dmalcolm@redhat.com>
1854
1855 PR c/89122
1856 * known-headers.cc (get_stdlib_header_for_name): Add
1857 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
1858
8936f047
JJ
18592019-01-31 Jakub Jelinek <jakub@redhat.com>
1860
1861 PR libstdc++/88170
1862 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
1863 a C cast in pp_c_flag_gnu_v3 mode.
1864
6a335b96
JJ
18652019-01-29 Jakub Jelinek <jakub@redhat.com>
1866
1867 PR c/86125
1868 * c-common.c (c_common_nodes_and_builtins): Build type variants for
1869 builtin_structptr_types types even for C.
1870
2a06eba5
BE
18712019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
1872
1873 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
1874 when rhs is of array type correctly. Fix handling of nested structures.
1875 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
1876 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
1877 type casts within nested compound expressions.
1878
18a23298
JJ
18792019-01-22 Jakub Jelinek <jakub@redhat.com>
1880
1881 PR middle-end/88968
1882 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
1883 variable after using BIT_FIELD_REF.
1884
420183d9
L
18852019-01-18 H.J. Lu <hongjiu.lu@intel.com>
1886
1887 PR c/51628
1888 PR c/88664
1889 * c-common.h (warn_for_address_or_pointer_of_packed_member):
1890 Remove the boolean argument.
1891 * c-warn.c (check_address_of_packed_member): Renamed to ...
1892 (check_address_or_pointer_of_packed_member): This. Also
1893 warn pointer conversion.
1894 (check_and_warn_address_of_packed_member): Renamed to ...
1895 (check_and_warn_address_or_pointer_of_packed_member): This.
1896 Also warn pointer conversion.
1897 (warn_for_address_or_pointer_of_packed_member): Remove the
1898 boolean argument. Don't check pointer conversion here.
1899
99063eee
RS
19002019-01-15 Richard Sandiford <richard.sandiford@arm.com>
1901
1902 PR inline-asm/52813
1903 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
1904
a30d0196
JJ
19052019-01-14 Jakub Jelinek <jakub@redhat.com>
1906
1907 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
1908 and __cpp_nontype_template_parameter_auto. Add a comment that
1909 __cpp_template_auto is deprecated.
1910
2d91f79d
TH
19112019-01-14 Tom Honermann <tom@honermann.net>
1912
1913 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
1914 * c-common.c (c_common_reswords): Add char8_t.
1915 (fix_string_type): Use char8_t for the type of u8 string literals.
1916 (c_common_get_alias_set): char8_t doesn't alias.
1917 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
1918 C++.
1919 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
1920 (keyword_begins_type_specifier): Add RID_CHAR8.
1921 * c-common.h (rid): Add RID_CHAR8.
1922 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
1923 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
1924 Define char8_type_node and char8_array_type_node.
1925 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
1926 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
1927 (c_cpp_builtins): Predefine __cpp_char8_t.
1928 * c-lex.c (lex_string): Use char8_array_type_node as the type of
1929 CPP_UTF8STRING.
1930 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
1931 * c-opts.c: If not otherwise specified, enable -fchar8_t when
1932 targeting C++2a.
1933 * c.opt: Add the -fchar8_t command line option.
1934
23db6ced
MS
19352019-01-14 Martin Sebor <msebor@redhat.com>
1936
1937 PR target/88638
1938 * c-attribs.c (positional_argument): Call valid_format_string_type_p
1939 and issue errors if it fails.
1940 * c-common.h (valid_format_string_type_p): Declare.
1941 * c-format.c (valid_stringptr_type_p): Rename...
1942 (valid_format_string_type_p): ...to this and make extern.
1943 (handle_format_arg_attribute): Adjust to new name.
1944 (check_format_string): Same.
1945
234c3818
L
19462019-01-13 H.J. Lu <hongjiu.lu@intel.com>
1947
1948 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
1949 Replace "may may" with "may" in warning message.
1950
d8fcab68
JJ
19512019-01-07 Jakub Jelinek <jakub@redhat.com>
1952
1953 PR c++/85052
1954 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
1955 (c_build_vec_convert): Declare.
1956 * c-common.c (c_build_vec_convert): New function.
1957
29d24852
MS
19582019-01-04 Martin Sebor <msebor@redhat.com>
1959
1960 PR c/88546
1961 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
1962 Handle C++ empty throw specification and C11 _Noreturn.
1963 (has_attribute): Also handle C11 _Noreturn.
1964
9069a4c9
MS
19652019-01-04 Martin Sebor <msebor@redhat.com>
1966
1967 PR c/88363
1968 * c-attribs.c (positional_argument): Also accept enumerated types.
1969
a5544970
JJ
19702019-01-01 Jakub Jelinek <jakub@redhat.com>
1971
1972 Update copyright years.
1973
da77eace
L
19742018-12-20 H.J. Lu <hongjiu.lu@intel.com>
1975
1976 PR c/51628
1977 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
1978 * c-warn.c (check_alignment_of_packed_member): New function.
1979 (check_address_of_packed_member): Likewise.
1980 (check_and_warn_address_of_packed_member): Likewise.
1981 (warn_for_address_or_pointer_of_packed_member): Likewise.
1982 * c.opt: Add -Wno-address-of-packed-member.
1983
573767d4
DM
19842018-12-20 David Malcolm <dmalcolm@redhat.com>
1985
1986 PR c++/87504
1987 * c-warn.c (get_outermost_macro_expansion): New function.
1988 (spelled_the_same_p): Use it to unwind the macro expansions, and
1989 compare the outermost macro in each nested expansion, rather than
1990 the innermost.
1991
a14feb3c
DM
19922018-12-19 David Malcolm <dmalcolm@redhat.com>
1993
1994 PR c++/87504
1995 * c-common.h (warn_tautological_cmp): Convert 1st param from
1996 location_t to const op_location_t &.
1997 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
1998 when testing for INTEGER_CST.
1999 (warn_tautological_bitwise_comparison): Convert 1st param from
2000 location_t to const op_location_t &; use it to build a
2001 binary_op_rich_location, and use this.
2002 (spelled_the_same_p): New function.
2003 (warn_tautological_cmp): Convert 1st param from location_t to
2004 const op_location_t &. Warn for macro expansions if
2005 spelled_the_same_p. Use binary_op_rich_location.
2006
dfd7fdca
DM
20072018-12-19 David Malcolm <dmalcolm@redhat.com>
2008
2009 PR c++/43064
2010 PR c++/43486
2011 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
2012 (verify_tree): Handle location wrappers.
2013 (c_common_truthvalue_conversion): Strip any location wrapper.
2014 Handle CONST_DECL.
2015 (fold_offsetof): Strip any location wrapper.
2016 (complete_array_type): Likewise for initial_value.
2017 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
2018 index before checking for INTEGER_CST.
2019 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
2020 print parentheses around location wrappers.
2021 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
2022 before checking for INTEGER_CST.
2023 (warn_tautological_bitwise_comparison): Call
2024 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
2025 before checking for INTEGER_CST.
2026 (readonly_error): Strip any location wrapper.
2027 (warn_array_subscript_with_type_char): Strip location wrappers
2028 before checking for INTEGER_CST. Use the location of the index if
2029 available.
2030
5c8b3702
JM
20312018-12-06 Jason Merrill <jason@redhat.com>
2032
2033 PR c++/88136 - -Wdeprecated-copy false positives
2034 * c.opt (Wdeprecated-copy-dtor): New.
2035 (Wdeprecated-copy): Move to -Wextra.
2036
673670da
MS
20372018-11-29 Martin Sebor <msebor@redhat.com>
2038
2039 PR c/88172
2040 PR testsuite/88208
2041 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
2042 alignments to values less than the target requires.
2043 (has_attribute): For attribute aligned consider both the attribute
2044 and the alignment bits.
2045 * c-common.c (c_init_attributes): Optionally issue a warning for
2046 zero alignment.
2047
04864ec8
MS
20482018-11-28 Martin Sebor <msebor@redhat.com>
2049
2050 PR c/88065
2051 PR c/87297
2052 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
2053 or destination is an error.
2054
ace83db0
JJ
20552018-11-28 Jakub Jelinek <jakub@redhat.com>
2056
2057 PR c++/88215
2058 * c-ubsan.c: Include langhooks.h.
2059 (ubsan_instrument_division): Change gcc_assert that main variants
2060 of op0 and op1 types are equal to gcc_checking_assert that the
2061 main variants are compatible types.
2062
da193a27
EB
20632018-11-27 Eric Botcazou <ebotcazou@adacore.com>
2064
2065 * c-ada-spec.c: Include stringpool.h.
2066 (has_static_fields): Return false for incomplete types.
2067 (is_tagged_type): Likewise.
2068 (has_nontrivial_methods): Likewise.
2069 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
2070 (struct overloaded_name_hash): New structure.
2071 (struct overloaded_name_hasher): Likewise.
2072 (overloaded_names): New global variable.
2073 (init_overloaded_names): New static function.
2074 (overloaded_name_p): New predicate.
2075 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
2076 on the TYPE_STUB_DECL of the original type of a typedef, if any.
2077 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
2078 Remove always-true condition and dump forward types.
2079 (dump_ada_specs): Delete overloaded_names.
2080
98f08eb8
MS
20812018-11-20 Martin Sebor <msebor@redhat.com>
2082
2083 * c-attribs.c (type_for_vector_size): New function.
2084 (type_valid_for_vector_size): Same.
2085 (handle_vector_size_attribute): Move code to the functions above
2086 and call them.
2087 (validate_attribute, has_attribute): New functions.
2088 * c-common.h (has_attribute): Declare.
2089 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
2090 * c-common.c (c_common_resword): Same.
2091
2674fa47
JM
20922018-11-16 Jason Merrill <jason@redhat.com>
2093
2094 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
2095 * c-attribs.c (attr_cold_hot_exclusions): Make public.
2096
258b3854
JJ
20972018-11-16 Jakub Jelinek <jakub@redhat.com>
2098
2099 PR middle-end/87854
2100 * c-common.c (fix_string_type): Reject string literals larger than
2101 TYPE_MAX_VALUE (ssizetype) bytes.
2102
1d249509
MS
21032018-11-15 Martin Sebor <msebor@redhat.com>
2104
2105 PR c++/87541
2106 PR c++/87542
2107 * c-attribs.c (positional_argument): New function.
2108 (handle_alloc_size_attribute): Use it and simplify.
2109 (handle_alloc_align_attribute): Same.
2110 (handle_assume_aligned_attribute): Same.
2111 (handle_nonnull_attribute): Same.
2112 * c-common.c (check_function_arguments): Pass fntype to
2113 check_function_format.
2114 * c-common.h (check_function_format): Add an argument.
2115 (PosArgFlags, positional_argument): Declare new type and function.
2116 * c-format.c (decode_format_attr): Add arguments.
2117 (check_format_string, get_constant): Same.
2118 (convert_format_name_to_system_name): Adjust.
2119
478dd60d
DM
21202018-11-15 David Malcolm <dmalcolm@redhat.com>
2121
2122 PR other/19165
2123 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
2124
8cca0163
JJ
21252018-11-14 Jakub Jelinek <jakub@redhat.com>
2126
8ee09943
JJ
2127 P1236R1 - Signed integers are two's complement
2128 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
2129 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
2130 with in-range second operand well defined for -std=c++2a.
2131
8cca0163
JJ
2132 PR other/88007
2133 * c-common.c (parse_optimize_options): Allocate option string from
2134 opts_obstack rather than as GC memory. Move the allocation after
2135 warning for invalid option.
2136
620e594b
DM
21372018-11-13 David Malcolm <dmalcolm@redhat.com>
2138
2139 * c-common.c (c_get_substring_location): Update for renaming of
2140 get_source_location_for_substring to get_location_within_string.
2141 * c-lex.c: Replace "source_location" with "location_t".
2142 * c-opts.c: Likewise.
2143 * c-ppoutput.c: Likewise.
2144
f9731de3
MS
21452018-11-13 Martin Sebor <msebor@redhat.com>
2146
2147 PR middle-end/81824
2148 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
2149 (handle_tls_model_attribute): Improve diagnostics.
2150
e4bd6d5e
JM
21512018-11-12 Jason Merrill <jason@redhat.com>
2152
a6bb6b07
JM
2153 * c-cppbuiltin.c (c_cpp_builtins): Define
2154 __cpp_impl_destroying_delete.
2155
e4bd6d5e
JM
2156 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
2157 __cpp_conditional_explicit.
2158
79a2c428
MS
21592018-11-09 Martin Sebor <msebor@redhat.com>
2160
2161 PR middle-end/81824
2162 * c-attribs.c (handle_copy_attribute): New function.
2163
4c7bd361
MS
21642018-11-09 Martin Sebor <msebor@redhat.com>
2165
2166 PR c/87795
2167 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
2168
28567c40
JJ
21692018-11-08 Jakub Jelinek <jakub@redhat.com>
2170
2171 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
2172 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
2173 enum omp_memory_order MEMORY_ORDER.
2174 (c_finish_omp_flush): Add MO argument.
2175 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
2176 (c_finish_omp_for): Add FINAL_P argument.
2177 * c-omp.c: Include memmodel.h.
2178 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
2179 OMP_TASKGROUP_CLAUSES to it.
2180 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
2181 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
2182 instead of OMP_ATOMIC_SEQ_CST.
2183 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
2184 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
2185 __atomic_thread_fence call with the given value.
2186 (check_omp_for_incr_expr): Formatting fixes.
2187 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
2188 even in OpenMP loops, diagnose if NE_EXPR and incr expression
2189 is not constant expression 1 or -1. Transform NE_EXPR loops
2190 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
2191 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
2192 loops too.
2193 (c_omp_split_clauses): Add support for combined
2194 #pragma omp parallel master and
2195 #pragma omp {,parallel }master taskloop{, simd} constructs.
2196 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
2197 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
2198 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
2199 (c_omp_predetermined_sharing): Don't return
2200 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
2201 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
2202 PRAGMA_OMP_REQUIRES.
2203 * c-pragma.h (enum pragma_kind): Likewise.
2204 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
2205 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
2206
204839e7
DM
22072018-11-08 David Malcolm <dmalcolm@redhat.com>
2208
2209 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
2210
d8010ee4
DM
22112018-11-08 David Malcolm <dmalcolm@redhat.com>
2212
2213 * c-format.c (local_cgraph_node_ptr_node): New variable.
2214 (gcc_dump_printf_char_table): Add entry for %C.
2215 (get_pointer_to_named_type): New function, taken from the handling
2216 code for "gimple *" from...
2217 (init_dynamic_diag_info): ...here. Add handling for
2218 "cgraph_node *".
2219 * c-format.h (T_CGRAPH_NODE): New.
2220
4be5c72c
JM
22212018-10-19 Jason Merrill <jason@redhat.com>
2222
2223 * c-cppbuiltin.c (c_cpp_builtins): Add
2224 __cpp_nontype_template_parameter_class.
2225
f3f6029d
NS
22262018-10-31 Nathan Sidwell <nathan@acm.org>
2227
ab5324fb
NS
2228 * c-opts.c (c_finish_options): Force command line macro
2229 location. Refactor to avoid repeating main debug hook.
2230 (push_command_line_include): Clarify comment.
2231
f3f6029d
NS
2232 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
2233
91e3ec29
MS
22342018-10-30 Martin Sebor <msebor@redhat.com>
2235
2236 PR middle-end/87041
2237 * c-format.c (check_format_types): Avoid diagnosing null pointer
2238 arguments to printf-family of functions.
2239
b5ff4f5c
MP
22402018-10-30 Marek Polacek <polacek@redhat.com>
2241
2242 Implement P0892R2, explicit(bool).
2243 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
2244
7e2de6df
DM
22452018-10-29 David Malcolm <dmalcolm@redhat.com>
2246
2247 * name-hint.h (name_hint::take_deferred): New member function.
2248
b2bf438c
DM
22492018-10-29 David Malcolm <dmalcolm@redhat.com>
2250
2251 PR c++/56856
2252 * c-common.c (check_function_sentinel): Call fold_for_warn on the
2253 argument.
2254 (check_function_restrict): Rename param "argarray" to
2255 "unfolded_argarray", and make a copy named "argarray", calling
2256 fold_for_warn on each argument.
2257 (check_function_arguments): Add note about responsibility for
2258 folding the arguments.
2259
9f936c86
JM
22602018-10-17 Joseph Myers <joseph@codesourcery.com>
2261
2262 * c-common.c (flag_isoc2x): New variable.
2263 * c-common.h (clk_c): Update comment to reference C2X.
2264 (flag_isoc99, flag_isoc11): Update comments to reference future
2265 standard versions in general.
2266 (flag_isoc2x): Declare.
2267 * c-opts.c (set_std_c2x): New function.
2268 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
2269 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
2270 flag_isoc2x to 0.
2271 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
2272
7a8a92c4
JM
22732018-10-17 Joseph Myers <joseph@codesourcery.com>
2274
2275 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
2276 (std=iso9899:2018): Document C17 as published in 2018.
2277
4dc003ff
CL
22782018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
2279
2280 PR c++/87364
2281 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
2282
79371671
WW
22832018-10-11 Will Wray <wjwray@gmail.com>
2284
2285 PR c++/87364
2286 * c-pretty-print.h (pp_c_type_cast): Prototype.
2287 (pp_c_integer_constant): Likewise.
2288 * c-pretty-print.c (pp_c_type_cast): No longer static.
2289 (pp_c_integer_constant): Likewise.
2290 (pp_c_enumeration_constant): Fix loop termination when finding
2291 name of constant. No longer returns a value. Call
2292 pp_c_integer_constant.
2293 (c_pretty_printer::constant): Update for changes to
2294 pp_c_enumeration_constant.
2295
46c62690
JJ
22962018-10-11 Jakub Jelinek <jakub@redhat.com>
2297
2298 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
2299 for no_unique_address.
2300
c24300ba
DM
23012018-10-09 David Malcolm <dmalcolm@redhat.com>
2302
2303 * c-common.c (c_option_controlling_cpp_error): Rename to...
2304 (c_option_controlling_cpp_diagnostic): ...this, and convert
2305 "reason" from int to enum.
2306 (c_cpp_error): Rename to...
2307 (c_cpp_diagnostic): ...this, converting level and reason to enums.
2308 * c-common.h (c_cpp_error): Rename to...
2309 (c_cpp_diagnostic): ...this, converting level and reason to enums.
2310 * c-opts.c (c_common_init_options): Update for renaming.
2311
8656dafa
RS
23122018-10-08 Richard Sandiford <richard.sandiford@arm.com>
2313
2314 PR c/87286
2315 * c-common.c (vector_types_compatible_elements_p): Use
2316 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
2317
8cff0652
VK
23182018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
2319
2320 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
2321 to generate constructor destructor priority warning.
2322 * c.opt (-Wprio-ctor-dtor): New option.
2323
bedf03a2
JM
23242018-10-01 Jason Merrill <jason@redhat.com>
2325
2326 * c-lex.c (c_common_has_attribute): Add no_unique_address.
2327
6cc430c1
EB
23282018-10-01 Eric Botcazou <ebotcazou@adacore.com>
2329
2330 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
2331 (dump_ada_node): Add const keyword.
2332
87677ac7
ML
23332018-09-25 Martin Liska <mliska@suse.cz>
2334
2335 * c-common.c (c_common_truthvalue_conversion):
2336 Remove Pascal from documentation.
2337
518196cb
EB
23382018-09-21 Eric Botcazou <ebotcazou@adacore.com>
2339
2340 * c-ada-spec.c: Include diagnostic.h.
2341 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
2342
a599af84
MP
23432018-09-19 Marek Polacek <polacek@redhat.com>
2344
2345 * c.opt (Wclass-conversion): New.
2346
9c4a4b3c
DM
23472018-09-17 David Malcolm <dmalcolm@redhat.com>
2348
2349 * c-format.c (range_label_for_format_type_mismatch::get_text):
2350 Update for new param.
2351
c896ecfe
DM
23522018-09-17 David Malcolm <dmalcolm@redhat.com>
2353
2354 * c-format.c (format_warning_at_char): Update for introduction of
2355 format_string_diagnostic_t.
2356 (format_type_warning): Likewise.
2357
80c6d1f4
MJ
23582018-09-17 Martin Jambor <mjambor@suse.cz>
2359
2360 PR c/63886
2361 * c.opt (Wabsolute-value): New.
2362
6d900107
BE
23632018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2364
2365 * c-common.c (complete_flexible_array_elts): New helper function.
2366 * c-common.h (complete_flexible_array_elts): Declare.
2367
b5764229
BE
23682018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2369
2370 * c-common.c (braced_list_to_string): Remove eval parameter.
2371 Add some more checks. Always create zero-terminated STRING_CST.
2372 * c-common.h (braced_list_to_string): Adjust prototype.
2373
85204e23
DM
23742018-08-27 David Malcolm <dmalcolm@redhat.com>
2375
2376 PR 87091
2377 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
2378 to a tri-state.
2379 (maybe_suggest_missing_token_insertion): Likewise.
2380 (maybe_add_include_fixit): Add param "override_location". If set,
2381 and source-printing is enabled, then override the rich_location's
2382 primary location with that of the insertion point for the fix-it
2383 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
2384 * c-common.h (extern void maybe_add_include_fixit): Add bool
2385 param.
2386 * c-format.c (selftest::test_type_mismatch_range_labels): Update
2387 for conversion of show_caret_p to a tri-state.
2388 * c-warn.c (warn_for_restrict): Likewise.
2389 * known-headers.cc
2390 (suggest_missing_header::~suggest_missing_header): Update call to
2391 maybe_add_include_fixit to suggest overriding the location, as it
2392 is for a note.
2393
3d78e008
ML
23942018-08-27 Martin Liska <mliska@suse.cz>
2395
2396 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
2397 fndecl_built_in_p and remove check for FUNCTION_DECL if
2398 possible.
3d78e008
ML
2399 (check_builtin_function_arguments): Likewise.
2400 (reject_gcc_builtin): Likewise.
2401 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
2402
b5be6d0c
MP
24032018-08-26 Marek Polacek <polacek@redhat.com>
2404
2405 PR c++/87029, Implement -Wredundant-move.
2406 * c.opt (Wredundant-move): New option.
2407
79ca9c35
MP
24082018-08-21 Marek Polacek <polacek@redhat.com>
2409
2410 PR c++/86981, Implement -Wpessimizing-move.
2411 * c.opt (Wpessimizing-move): New option.
2412
097f82ec
DM
24132018-08-20 David Malcolm <dmalcolm@redhat.com>
2414
2415 PR other/84889
2416 * c-attribs.c (common_handle_aligned_attribute): Add
2417 auto_diagnostic_group instance.
2418 * c-indentation.c (warn_for_misleading_indentation): Likewise.
2419 * c-opts.c (c_common_post_options): Likewise.
2420 * c-warn.c (warn_logical_not_parentheses): Likewise.
2421 (warn_duplicated_cond_add_or_warn): Likewise.
2422 (warn_for_multistatement_macros): Likewise.
2423
3fb558b1
NS
24242018-08-20 Nathan Sidwell <nathan@acm.org>
2425
2426 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
2427 access.
2428
800c0e98
NS
24292018-08-17 Nathan Sidwell <nathan@acm.org>
2430
2431 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
2432 field.
2433 (laxy_hex_fp_value_count): Make unsigned.
2434 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
2435 manipulate the macro.
2436 (builtin_defin_with_hex_fp_value): Adjust callback name, use
2437 cpp_define_lazily.
2438
6f795a92
DM
24392018-08-17 David Malcolm <dmalcolm@redhat.com>
2440
2441 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
2442 (gcc_dump_printf_length_specs): New.
2443 (gcc_dump_printf_flag_pairs): New.
2444 (gcc_dump_printf_flag_specs): New.
2445 (gcc_dump_printf_char_table): New.
2446 (format_types_orig): Add entry for "gcc_dump_printf".
2447 (init_dynamic_diag_info): Set up length_char_specs and
2448 conversion_specs for gcc_dump_printf_format_type.
2449 (handle_format_attribute): Handle gcc_dump_printf_format_type.
2450
c5d725c0
NS
24512018-08-17 Nathan Sidwell <nathan@acm.org>
2452
10f04917
NS
2453 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
2454
c5d725c0
NS
2455 * c-ada-spec.c: Don't #include "cpp-id-data.h"
2456 * c-cppbuiltin.c: Likewise.
2457
c0c12356
ML
24582018-08-17 Martin Liska <mliska@suse.cz>
2459
2460 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
2461 Ignore/Deprecated flag. Warning is done automatically for
2462 Deprecated flags.
c0c12356 2463
10fcc142
DM
24642018-08-16 David Malcolm <dmalcolm@redhat.com>
2465
2466 PR c++/70693
2467 * c-common.c (selftest::c_family_tests): Call
2468 selftest::c_indentation_c_tests.
2469 * c-common.h (selftest::c_indentation_c_tests): New decl.
2470 * c-indentation.c: Include "selftest.h".
2471 (next_tab_stop): Add "tab_width" param, rather than accessing
2472 cpp_opts.
2473 (get_visual_column): Likewise. Clarify comment. Bulletproof
2474 against reading past the end of the line.
2475 (get_first_nws_vis_column): Add "tab_width" param.
2476 (detect_intervening_unindent): Likewise.
2477 (should_warn_for_misleading_indentation): Read tab width from
2478 cpp_opts and pass around.
2479 (selftest::test_next_tab_stop): New test.
2480 (selftest::assert_get_visual_column_succeeds): New function.
2481 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
2482 (selftest::assert_get_visual_column_fails): New function.
2483 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
2484 (selftest::test_get_visual_column): New test.
2485 (selftest::c_indentation_c_tests): New function.
2486
3f6677f4
NS
24872018-08-16 Nathan Sidwell <nathan@acm.org>
2488
2489 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
2490 (store_ada_macro): Likewise.
2491 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
2492 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
2493
96e6ae57
DM
24942018-08-15 David Malcolm <dmalcolm@redhat.com>
2495
2496 * c-format.c: Include "selftest-diagnostic.h" and
2497 "gcc-rich-location.h".
2498 (format_warning_at_char): Pass NULL for new label params of
2499 format_warning_va.
2500 (class indirection_suffix): New class.
2501 (class range_label_for_format_type_mismatch): New class.
2502 (format_type_warning): Move logic for generating "*" suffix to
2503 class indirection_suffix. Create "fmt_label" and "param_label"
2504 to show their types, and pass them to the
2505 format_warning_at_substring calls.
2506 (selftest::test_type_mismatch_range_labels): New test.
2507 (selftest::c_format_c_tests): Call it.
2508
23aa9f7c
MS
25092018-08-13 Martin Sebor <msebor@redhat.com>
2510
2511 PR tree-optimization/71625
2512 * c-common.c (braced_list_to_string): New function.
2513 * c-common.h (braced_list_to_string): Declare it.
2514
f10a9135
NS
25152018-08-08 Nathan Sidwell <nathan@acm.org>
2516
2517 * c-common.c (try_to_locate_new_include_inertion_point): Use
2518 linemap_included_from_linemap.
2519 * c-lex.c (fe_file_change): Use linemap_included_from.
2520 * c-ppoutput.c (pp_file_change): Likewise.
2521
8a45b051
MS
25222018-08-01 Martin Sebor <msebor@redhat.com>
2523
2524 PR tree-optimization/86650
ab20d992 2525 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
8a45b051
MS
2526 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
2527 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
2528 * c-format.h (T89_G): Update to be "gimple *" rather than
2529 "gcall *".
2530 (local_gcall_ptr_node): Rename...
2531 (local_gimple_ptr_node): ...to this.
2532
e540ccc0
DM
25332018-07-31 David Malcolm <dmalcolm@redhat.com>
2534
2535 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
2536 table entries for gcc_diag_char_table, and the 'Z' entry from
2537 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
2538 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
2539 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
2540 adding missing "Z" for this table. Remove erroneous "G" and "K"
2541 entries.
2542 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
2543 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
2544 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
2545
425fc685
RE
25462018-07-31 Richard Earnshaw <rearnsha@arm.com>
2547
2548 * c-common.c (speculation_safe_resolve_call): New function.
2549 (speculation_safe_resolve_params): New function.
2550 (speculation_safe_resolve_return): New function.
2551 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
2552 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
2553 __HAVE_SPECULATION_SAFE_VALUE.
2554
181463c2
DM
25552018-07-20 David Malcolm <dmalcolm@redhat.com>
2556
2557 * c-common.c (c_cpp_error): Remove redundant "line_table"
2558 parameter from call to rich_location::set_range.
2559 (maybe_suggest_missing_token_insertion): Likewise.
2560
0d7f9065
MS
25612018-07-20 Martin Sebor <msebor@redhat.com>
2562
2563 PR middle-end/82063
ab20d992 2564 * c.opt (-Warray-bounds): Remove redundant -Wall.
0d7f9065 2565
00abf86c
MS
25662018-07-20 Martin Sebor <msebor@redhat.com>
2567
2568 PR middle-end/82063
2569 * c-common.h (c_common_handle_option): Change function argument
2570 to HOST_WIDE_INT.
2571 * c-opts.c (c_common_init_options): Same.
2572 (c_common_handle_option): Same. Remove special handling of
2573 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
2574 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
2575 options to take a HOST_WIDE_INT argument and accept a byte-size
2576 suffix. Initialize.
2577 (-Wvla-larger-than): Same.
2578 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
2579 (-Wno-vla-larger-than): Same.
2580
9b452033
JJ
25812018-07-12 Jakub Jelinek <jakub@redhat.com>
2582
2583 * c-attribs.c (c_common_attribute_table): Add
2584 "omp declare target implicit" attribute.
2585
cd0762f3
RB
25862018-07-12 Richard Biener <rguenther@suse.de>
2587
2588 PR c/86453
2589 * c-attribs.c (handle_packed_attribute): Do not build a variant
2590 type with TYPE_PACKED, instead ignore the attribute if we may
2591 not apply to the original type.
2592
0b27c3ed
JJ
25932018-07-10 Jakub Jelinek <jakub@redhat.com>
2594
2595 PR c++/86443
2596 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
2597 to contain TREE_LIST for both the original class iterator and the
2598 "last" helper var.
2599
e730a0ef
EB
26002018-07-07 Eric Botcazou <ebotcazou@adacore.com>
2601
2602 * c-ada-spec.c (to_ada_name): Remove index parameter.
2603 (pp_ada_tree_identifier): Likewise.
2604 (dump_ada_macros): Adjust call to to_ada_name.
2605 (struct overloaded_name_hash): Delete.
2606 (struct overloaded_name_hasher): Likewise.
2607 (overloaded_names): Likewise.
2608 (compute_overloading_index): Likewise.
2609 (dump_ada_decl_name): Do not call compute_overloading_index and
2610 adjust calls to pp_ada_tree_identifier.
2611 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
2612 (dump_ada_import): Add spc parameter and switch to aspect syntax.
2613 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
2614 (dump_ada_enum_type): Remove type and display_convention parameters.
2615 Adjust calls to pp_ada_tree_identifier.
2616 (dump_ada_node): Likewise and for dump_ada_structure.
2617 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
2618 and tidy up.
2619 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
2620 syntax.
2621 (print_constructor): Adjust call to pp_ada_tree_identifier.
2622 (print_destructor): Likewise.
2623 (dump_ada_declaration): Switch to aspect syntax.
2624 (dump_ada_structure): Likewise and tidy up. Replace display_convention
2625 parameter with nested parameter.
2626 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
2627 (dump_ada_specs): Do not delete overloaded_names table.
2628
8de583fc
PB
26292018-07-06 Peter Bergner <bergner@linux.ibm.com>
2630
2631 PR target/86324
e730a0ef 2632 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
2633 target hook.
2634
09cff37b
NS
26352018-07-05 Nathan Sidwell <nathan@acm.org>
2636
2637 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
2638 NO_IMPLICIT_EXTERN_C.
2639
98086b2b
ML
26402018-06-28 Martin Liska <mliska@suse.cz>
2641
2642 * cppspec.c: Include opt-suggestions.h.
2643
ab20d992
JJ
26442018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2645 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
2646 Cesar Philippidis <cesar@codesourcery.com>
2647
2648 * c-pragma.h (enum pragma_omp_clause): Add
2649 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
2650 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
2651
f41b7612
JJ
26522018-06-20 Jakub Jelinek <jakub@redhat.com>
2653
2654 PR c++/86210
2655 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
2656 comment.
2657
4252ccd7
MS
26582018-06-18 Martin Sebor <msebor@redhat.com>
2659
2660 PR middle-end/85602
2661 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
2662 nonstring.
2663
e197e64e
KV
26642018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2665
2666 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
2667
34a7a230
JM
26682018-06-13 Jason Merrill <jason@redhat.com>
2669
5cef3733
JM
2670 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
2671 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
2672 handling.
2673
34a7a230
JM
2674 PR c++/86094 - wrong code with defaulted move ctor.
2675 * c-opts.c (c_common_post_options): Bump the current ABI version to
2676 13. Set warn_abi_version and flag_abi_compat_version to the current
2677 version rather than 0. Fix defaulting flag_abi_compat_version from
2678 warn_abi_version.
2679
bb0f14ae
MS
26802018-06-12 Martin Sebor <msebor@redhat.com>
2681
2682 PR c/85931
2683 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
2684 sizeof source and destination yields the same value.
2685
3713f2e2
ML
26862018-06-12 Martin Liska <mliska@suse.cz>
2687
2688 * c.opt: Make MPX-related options as Deprecated.
2689
4af78ef8
DM
26902018-06-08 David Malcolm <dmalcolm@redhat.com>
2691
2692 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
2693 rather than 0.
2694
31db0fe0
ML
26952018-06-08 Martin Liska <mliska@suse.cz>
2696
2697 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
2698 for MPX (macros, related functions, fields in cgraph_node, ...).
2699 (handle_bnd_legacy): Likewise.
2700 (handle_bnd_instrument): Likewise.
2701 * c.opt: Likewise.
2702
fe16acf2
JJ
27032018-06-06 Jakub Jelinek <jakub@redhat.com>
2704
2705 PR c++/86068
2706 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
2707 __cpp_transactional_memory to 201500 instead of 210500.
2708
4dbdb49b
JM
27092018-06-06 Jason Merrill <jason@redhat.com>
2710
2711 PR c++/85710 - ICE with -Wmemset-elt-size.
2712 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
2713
f8ad043f
JM
27142018-06-01 Jason Merrill <jason@redhat.com>
2715
2716 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
2717 201703.
2718
abc24d93
EB
27192018-06-01 Eric Botcazou <ebotcazou@adacore.com>
2720
2721 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
2722 declaration for a typedef independently of whether the declaration of
2723 the subtype is generated.
2724
d258f4aa
MS
27252018-05-31 Martin Sebor <msebor@redhat.com>
2726
2727 PR c/82063
2728 * c.opt (-Wno-alloc-size-larger-than): New option.
2729
b67b9225
DP
27302018-04-22 David Pagan <dave.pagan@oracle.com>
2731
2732 PR c/55976
2733 * c-opts.c (c_common_post_options): Set default for warn_return_type
ab20d992 2734 for C++/C++ with ObjC extensions only. For C, makes it possible to
b67b9225
DP
2735 differentiate between default (no option), -Wreturn-type, and
2736 -Wno-return-type.
2737
04eb9c55
JM
27382018-05-29 Jason Merrill <jason@redhat.com>
2739
2740 * c.opt (Winit-list-lifetime): New flag.
2741
b0c31bc6
BE
27422018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
2743
2744 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
2745 splay_tree_delete_pointers.
2746
44284983
JJ
27472018-05-26 Jakub Jelinek <jakub@redhat.com>
2748
2749 PR bootstrap/85921
2750 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
2751 noinline variable to workaround broken kernel headers.
2752
b46b715d
JM
27532018-05-18 Jason Merrill <jason@redhat.com>
2754
2755 * c.opt (Wdeprecated-copy): New flag.
2756
40659769
ML
27572018-05-17 Martin Liska <mliska@suse.cz>
2758
2759 * c-warn.c (overflow_warning): Do not use
2760 space in between 'G_' and '('.
2761
403962ea
JM
27622018-05-09 Jason Merrill <jason@redhat.com>
2763
2764 * c-common.c (valid_array_size_p): Add complain parameter.
2765 * c-common.h: ...which defaults to true.
2766
1c9ee609
JJ
27672018-05-11 Jakub Jelinek <jakub@redhat.com>
2768
2769 PR c/85696
2770 * c-omp.c (c_omp_predetermined_sharing): Return
2771 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
2772
19916065
ML
27732018-05-11 Martin Liska <mliska@suse.cz>
2774
92a285c1 2775 PR sanitizer/85556
19916065
ML
2776 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
2777 TREE_LIST values.
2778
79e7b1fe
JJ
27792018-05-10 Jakub Jelinek <jakub@redhat.com>
2780
2781 PR c++/85662
2782 * c-common.h (fold_offsetof_1): Removed.
2783 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
2784 CTX argument defaulted to ERROR_MARK.
2785 * c-common.c (fold_offsetof_1): Renamed to ...
2786 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
2787 argument, convert the pointer constant to TYPE and use size_binop
2788 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
2789 a pointer type. Adjust recursive calls.
2790
86c12f76
EB
27912018-05-10 Eric Botcazou <ebotcazou@adacore.com>
2792
2793 PR c++/85400
2794 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
2795
ee336e84
NS
27962018-05-07 Nathan Sidwell <nathan@acm.org>
2797
2798 * c.opt (ffor-scope): Remove functionality, issue warning.
2799
6c072e21
NS
28002018-05-03 Nathan Sidwell <nathan@acm.org>
2801
2802 * c.opt (ffriend-injection): Remove functionality, issue warning.
2803
2cc7d3a7
DM
28042018-05-01 David Malcolm <dmalcolm@redhat.com>
2805
2806 PR c/84258
2807 * c-format.c (struct format_check_results): Add field
2808 "number_non_char".
2809 (check_format_info): Initialize it, and warn if encountered.
2810 (check_format_arg): Distinguish between wide char and
2811 everything else when detecting arrays of non-char.
2812
7761dfbe
DM
28132018-04-30 David Malcolm <dmalcolm@redhat.com>
2814
2815 * c-format.c (get_corrected_substring): Update for
2816 location_get_source_line returning a char_span. Use a char_span
2817 when handling the prefix of the correction.
2818 * c-indentation.c (get_visual_column): Update for
2819 location_get_source_line returning a char_span.
2820 (get_first_nws_vis_column): Likewise.
2821
62e98ef1
DM
28222018-03-29 David Malcolm <dmalcolm@redhat.com>
2823
2824 PR c++/84269
2825 * known-headers.cc (get_stdlib_header_for_name): Add various names
2826 from <assert.h>, <string.h>, and <memory.h>; add more names from
2827 <stdio.h>.
2828
a7dea617
JJ
28292018-03-27 Jakub Jelinek <jakub@redhat.com>
2830
2831 PR c++/85061
2832 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
2833 get_base_address of the second operand is a VAR_P, rather than the
2834 operand itself, and use gcc_checking_assert instead of gcc_assert.
2835
889a3a30
MP
28362018-03-23 Marek Polacek <polacek@redhat.com>
2837
2838 PR c++/85045
2839 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
2840 <case RDIV_EXPR>: Tweak condition.
2841
452154b9
EB
28422018-03-20 Eric Botcazou <ebotcazou@adacore.com>
2843
2844 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
2845
63ecb626
JJ
28462018-03-16 Jakub Jelinek <jakub@redhat.com>
2847
ce811fc4
JJ
2848 PR c/84909
2849 * c-warn.c (conversion_warning): Replace "to to" with "to" in
2850 diagnostics.
2851
63ecb626
JJ
2852 PR c/84910
2853 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
2854 diagnostics.
2855
a1295eec
RB
28562018-03-16 Richard Biener <rguenther@suse.de>
2857
2858 PR c/84873
2859 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
2860 unshare the possibly folded expression.
2861
919674fb
RB
28622018-03-15 Richard Biener <rguenther@suse.de>
2863
2864 PR c/84873
2865 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
2866
f99309b2
MS
28672018-03-13 Martin Sebor <msebor@redhat.com>
2868
2869 PR tree-optimization/84725
2870 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
2871 with all three narrow character types, including their qualified forms.
2872
e9b9fa4c
MS
28732018-03-12 Martin Sebor <msebor@redhat.com>
2874
2875 PR tree-optimization/83456
ab20d992 2876 * c-common.c (check_function_restrict): Return bool.
e9b9fa4c
MS
2877 Restore checking of bounded built-in functions.
2878 (check_function_arguments): Also return the result
2879 of warn_for_restrict.
ab20d992
JJ
2880 * c-common.c (check_function_restrict): Return bool.
2881 * c-warn.c (warn_for_restrict): Return bool.
e9b9fa4c 2882
0805d020
MP
28832018-03-02 Marek Polacek <polacek@redhat.com>
2884
2885 PR c++/84171
2886 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
2887 is erroneous.
2888
ed2a2f08
TS
28892018-03-02 Thomas Schwinge <thomas@codesourcery.com>
2890
2891 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
2892 function".
2893
90abdde0
MP
28942018-03-01 Marek Polacek <polacek@redhat.com>
2895
2896 PR c++/84639
2897 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
2898 alignment in computation.
2899
c6db43fa
EB
29002018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2901
2902 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
2903 <REAL_TYPE>: Deal specifically with _Float128/__float128.
2904
9e25c7ed
EB
29052018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2906
2907 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
2908 (is_char_array): Take a type instead of a declaration.
2909 (dump_ada_array_type): Likewise.
2910 (is_simple_enum): Minor tweak.
2911 (dump_ada_enum_type): New function extracted from...
2912 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
2913 <INTEGER_TYPE>: Remove unreachable code.
2914 <RECORD_TYPE>: Likewise. Minor tweaks.
2915 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
2916 <ENUMERAL_TYPE>: New case.
2917 <RECORD_TYPE>: Factor out common code.
2918 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
2919 Minor tweaks. Deal with enumeral types.
2920 (dump_ada_structure): Minor tweaks.
2921
09de3550
EB
29222018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2923
2924 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
2925 address for incomplete structures.
2926 (dump_forward_type): Do not bail out for incomplete structures.
2927 (dump_ada_declaration): Do not special-case incomplete structures
2928 for subtypes. Dump them as null records for types.
2929
095d8d4b
EB
29302018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2931
2932 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
2933 (is_char_array): Fix formatting.
2934 (dump_template_types): Likewise.
2935 (dump_generic_ada_node): Rename into...
2936 (dump_ada_node): ...this.
2937 <POINTER_TYPE>: Remove superfluous space. Use generic address for
2938 incomplete structures and not for empty structures. Do not use it
2939 when forward declarations are needed.
2940 (dump_forward_type): New function.
2941 (dump_nested_types): Remove FORWARD parameter. Do not consider
2942 TREE_VISITED and do not generate a forward declaration. Only dump
2943 original nested types for nested declaration.
2944 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
2945 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
2946 <RECORD_TYPE>: Do not consider TREE_VISITED.
2947 (dump_ada_declaration): Use booleans and fix formatting throughout.
2948 <TYPE_DECL>: Skip incomplete structures and not empty structures.
2949 Call dump_forward_type instead of dump_nested_types for a typedef.
2950 Remove superfluous check and adjust call to dump_nested_types.
2951 <POINTER_TYPE>: Call dump_forward_type and fall through.
2952 (dump_ada_struct_decl): Rename into...
2953 (dump_ada_structure): ...this. Do not special-case empty structures.
2954
d4cfd486
MS
29552018-02-27 Martin Sebor <msebor@redhat.com>
2956
2957 PR c++/83871
2958 * c.opt (-Wmissing-attributes): New option.
2959
b22dbd03
ML
29602018-02-21 Martin Liska <mliska@suse.cz>
2961
2962 * c.opt (Wcatch-value=): Add IntegerRange.
2963
883dfe2a
JM
29642018-02-15 Jason Merrill <jason@redhat.com>
2965
2966 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
2967
0444aa9c
NS
29682018-02-09 Nathan Sidwell <nathan@acm.org>
2969
2970 PR c/84293
2971 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
2972 arg.
2973 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
2974 arg. Adjust.
2975
cea71f0a
MS
29762018-02-09 Martin Sebor <msebor@redhat.com>
2977
2978 PR lto/84212
2979 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
2980 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
2981 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
2982 (-Wstrict-overflow, -Wsuggest-attribute): Same.
2983 (-Wuninitialized): Same.
2984
8c8b7be5
EB
29852018-02-09 Eric Botcazou <ebotcazou@adacore.com>
2986
2987 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
2988 keyword for components.
2989
7c30b12a
PC
29902018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2991
2992 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
2993
eece7fe5
JK
29942018-02-02 Julia Koval <julia.koval@intel.com>
2995
2996 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
2997
7d07a93a
MP
29982018-01-29 Marek Polacek <polacek@redhat.com>
2999
3000 PR c/83966
3001 * c-format.c (check_function_format): Check current_function_decl.
3002
53723269
JJ
30032018-01-27 Jakub Jelinek <jakub@redhat.com>
3004
3005 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
3006 argument.
3007 (LAZY_HEX_FP_VALUES_CNT): Define.
3008 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
3009 values rather than just 12.
3010 (builtin_define_with_hex_fp_value): Likewise.
3011
7365279f
BK
30122018-01-18 Boris Kolpackov <boris@codesynthesis.com>
3013
92a285c1
ML
3014 PR other/70268
3015 * c.opt (-fmacro-prefix-map): New option.
3016 * c-opts.c (c_common_handle_option): Handle it.
3017 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
3018 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 3019
bb9869d5
DM
30202018-01-17 David Malcolm <dmalcolm@redhat.com>
3021
3022 PR c++/83814
3023 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
3024
68dc87c3
EB
30252018-01-10 Eric Botcazou <ebotcazou@adacore.com>
3026
3027 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
3028 Skip 'f' and 'F' characters if it is true.
3029 (store_ada_macro): Minor tweak.
3030 (dump_ada_macros) <CPP_COMMENT>: Likewise.
3031 <CPP_WSTRING>: Likewise.
3032 <CPP_STRING>: Output '&' in the buffer if not the first string.
3033 <CPP_NUMBER>: Adjust calls to dump_number.
3034
9a004410
DM
30352018-01-10 David Malcolm <dmalcolm@redhat.com>
3036
3037 PR c++/43486
3038 * c-common.c: Include "selftest.h".
3039 (get_atomic_generic_size): Perform the test for integral type
3040 before the range test for any integer constant, fixing indentation
3041 of braces. Call fold_for_warn before testing for an INTEGER_CST.
3042 (reject_gcc_builtin): Strip any location wrapper from EXPR.
3043 (selftest::test_fold_for_warn): New function.
3044 (selftest::c_common_c_tests): New function.
3045 (selftest::c_family_tests): Call it, and
3046 selftest::c_pretty_print_c_tests.
3047 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
3048 * c-format.c (check_format_arg): Convert VAR_P check to a
3049 fold_for_warn.
3050 * c-pretty-print.c: Include "selftest.h".
3051 (pp_c_cast_expression): Don't print casts for location wrappers.
3052 (selftest::assert_c_pretty_printer_output): New function.
3053 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
3054 (selftest::test_location_wrappers): New function.
3055 (selftest::c_pretty_print_c_tests): New function.
3056 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
3057
5c0caeb3
RS
30582018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3059 Alan Hayward <alan.hayward@arm.com>
3060 David Sherwood <david.sherwood@arm.com>
3061
3062 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
3063
73a699ae
RS
30642018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3065 Alan Hayward <alan.hayward@arm.com>
3066 David Sherwood <david.sherwood@arm.com>
3067
3068 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
3069 as polynomial.
3070
928686b1
RS
30712018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3072 Alan Hayward <alan.hayward@arm.com>
3073 David Sherwood <david.sherwood@arm.com>
3074
3075 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
3076 (convert_vector_to_array_for_subscript): Handle polynomial
3077 TYPE_VECTOR_SUBPARTS.
3078 (c_common_type_for_mode): Check valid_vector_subparts_p.
3079 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
3080 VECTOR_CST_NELTS.
3081
85ec4feb
JJ
30822018-01-03 Jakub Jelinek <jakub@redhat.com>
3083
3084 Update copyright years.
3085
170a8bd6 30862017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 3087 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
3088
3089 * c-pragma.c (init_pragma): Register pragma GCC unroll.
3090 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
3091
ab20d992 30922017-12-22 Alexandre Oliva <aoliva@redhat.com>
18408e96
AO
3093
3094 PR debug/83527
3095 PR debug/83419
3096 * c-semantics.c (only_debug_stmts_after_p): New.
3097 (pop_stmt_list): Clear side effects in debug-only stmt list.
3098 Check for single nondebug stmt followed by debug stmts only.
3099
c12d20d4
AO
31002017-12-21 Alexandre Oliva <aoliva@redhat.com>
3101
3102 PR debug/83419
3103 * c-semantics.c (pop_stmt_list): Propagate side effects from
3104 single nondebug stmt to container list.
3105
01512446
JJ
31062017-12-19 Jakub Jelinek <jakub@redhat.com>
3107
3108 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
3109 conditions with typical order conditions.
3110
82cfbd01
MP
31112017-12-18 Marek Polacek <polacek@redhat.com>
3112
3113 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
3114 not in effect.
3115
99da11ec
MS
31162017-12-17 Martin Sebor <msebor@redhat.com>
3117
3118 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
3119 an error for attribute warn_if_not_aligned.
3120
cc8bea0a
MS
31212017-12-16 Martin Sebor <msebor@redhat.com>
3122
3123 PR tree-optimization/78918
3124 * c-common.c (check_function_restrict): Avoid checking built-ins.
3125 * c.opt (-Wrestrict): Include in -Wall.
3126
4849deb1
JJ
31272017-12-15 Jakub Jelinek <jakub@redhat.com>
3128
3129 * c-attribs.c (c_common_attribute_table,
3130 c_common_format_attribute_table): Swap affects_type_identity
3131 and handler fields, adjust comments.
3132
c65e18d3
BE
31332017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3134
3135 * c.opt (Wcast-function-type): New warning option.
3136 * c-lex.c (get_fileinfo): Avoid warning.
3137 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
3138
2004617a
QZ
31392017-12-14 Qing Zhao <qing.zhao@oracle.com>
3140
7365279f 3141 PR middle_end/79538
2004617a
QZ
3142 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
3143 Adjust the size of buf1 and buf2, add a new buf to avoid
3144 format-overflow warning.
3145
ab20d992 31462017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
3147
3148 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
3149 subsequent statement list.
3150
5d9ae53d
MS
31512017-12-07 Martin Sebor <msebor@redhat.com>
3152
3153 PR c/81544
3154 PR c/81566
3155 * c-attribs.c (attr_aligned_exclusions): New array.
3156 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
3157 (attr_common_exclusions, attr_const_pure_exclusions): Same.
3158 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
3159 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
3160 (attr_warn_unused_result_exclusions): Same.
3161 (handle_hot_attribute, handle_cold_attribute): Simplify.
3162 (handle_const_attribute): Warn on function returning void.
3163 (handle_pure_attribute): Same.
3164 (handle_aligned_attribute): Diagnose conflicting attribute
3165 specifications.
3166 * c-warn.c (diagnose_mismatched_attributes): Simplify.
3167
c79144f8
DM
31682017-12-06 David Malcolm <dmalcolm@redhat.com>
3169
3170 PR c/83236
3171 * c-common.c (selftest::c_family_tests): Call
3172 selftest::c_spellcheck_cc_tests.
3173 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
3174 * c-spellcheck.cc: Include "selftest.h".
3175 (name_reserved_for_implementation_p): New function.
3176 (should_suggest_as_macro_p): New function.
3177 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
3178 should_suggest_as_macro_p and call it.
3179 (selftest::test_name_reserved_for_implementation_p): New function.
3180 (selftest::c_spellcheck_cc_tests): New function.
3181 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
3182
613bc14f
DM
31832017-12-06 David Malcolm <dmalcolm@redhat.com>
3184
3185 * c-spellcheck.cc: New file, taken from macro-handling code in
3186 spellcheck-tree.c.
3187 * c-spellcheck.h: New file, taken from macro-handling code in
3188 spellcheck-tree.h.
3189
e76c7157
JJ
31902017-12-01 Jakub Jelinek <jakub@redhat.com>
3191
3192 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
3193 attribute.
3194 (handle_simd_attribute): Don't check for "cilk simd function"
3195 attribute. Reindent, formatting changes.
3196
b0da4034
JK
31972017-11-30 Julia Koval <julia.koval@intel.com>
3198
3199 * c-common.h (inv_list): Remove.
3200
058f0b9e
JJ
32012017-11-28 Jakub Jelinek <jakub@redhat.com>
3202
3203 PR sanitizer/81275
3204 * c-common.c (c_switch_covers_all_cases_p_1,
3205 c_switch_covers_all_cases_p): New functions.
3206 * c-common.h (c_switch_covers_all_cases_p): Declare.
3207
5e9d6aa4 32082017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 3209 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
3210
3211 * array-notation-common.c: Delete.
3212 * c-cilkplus.c: Ditto.
3213 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
3214 * c-common.def (ARRAY_NOTATION_REF): Remove.
3215 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
3216 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
3217 c_validate_cilk_plus_loop, cilkplus_an_parts,
3218 cilk_ignorable_spawn_rhs_op,
3219 cilk_recognize_spawn): Remove.
3220 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
3221 * c-omp.c: Remove CILK_SIMD check.
3222 * c-pragma.c: Ditto.
3223 * c-pragma.h: Remove CILK related pragmas.
3224 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
3225 ARRAY_NOTATION_REF condition.
3226 (c_pretty_printer::expression): Ditto.
3227 * c.opt (fcilkplus): Remove.
3228 * cilk.c: Delete.
3229
1af4ebf5
MG
32302017-11-21 Marc Glisse <marc.glisse@inria.fr>
3231
3232 * c-pretty-print.c (pp_c_additive_expression,
3233 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
3234
d44ed508
JJ
32352017-11-21 Jakub Jelinek <jakub@redhat.com>
3236
7d2f0f9b
JJ
3237 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
3238
d44ed508
JJ
3239 PR c++/83059
3240 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
3241 instead of tree_to_uhwi, formatting fix.
3242
26edace6
DM
32432017-11-20 David Malcolm <dmalcolm@redhat.com>
3244
3245 PR c/81404
3246 * known-headers.cc: New file, based on material from c/c-decl.c.
3247 (suggest_missing_header): Copied as-is.
3248 (get_stdlib_header_for_name): New, based on get_c_name_hint but
3249 heavily edited to add C++ support. Add some knowledge about
3250 <limits.h>, <stdint.h>, and <wchar.h>.
3251 * known-headers.h: Likewise.
3252
6c7a259b
DM
32532017-11-20 David Malcolm <dmalcolm@redhat.com>
3254
3255 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
3256 (lookup_name_fuzzy): Likewise. Convert return type from
3257 const char * to name_hint. Add location_t param.
3258 * name-hint.h: New header.
3259
f9c59f7e
JJ
32602017-11-19 Jakub Jelinek <jakub@redhat.com>
3261
3262 PR c/66618
3263 PR c/69960
3264 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
3265
1e39313a
JM
32662017-11-16 Joseph Myers <joseph@codesourcery.com>
3267
3268 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
3269 expected publication date of C17.
3270 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
3271
3ca0dc60
JM
32722017-11-15 Joseph Myers <joseph@codesourcery.com>
3273
3274 PR c/81156
3275 * c-common.c (c_common_reswords): Add __builtin_tgmath.
3276 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
3277
025d57f0
MS
32782017-11-10 Martin Sebor <msebor@redhat.com>
3279
3280 PR c/81117
3281 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
3282 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
3283 * c.opt (-Wstringop-truncation): New option.
3284
1b6fa695
ML
32852017-11-06 Martin Liska <mliska@suse.cz>
3286
3287 PR middle-end/82404
3288 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
3289 FE.
3290 * c.opt: Set default value of warn_return_type.
3291
64a5912c
DM
32922017-10-31 David Malcolm <dmalcolm@redhat.com>
3293
3294 * c-common.c (binary_op_error): Update for renaming of
3295 error_at_rich_loc.
3296 (c_parse_error): Likewise.
3297 * c-warn.c (warn_logical_not_parentheses): Likewise for
3298 renaming of inform_at_rich_loc.
3299 (warn_for_restrict): Likewise for renaming of
3300 warning_at_rich_loc_n.
3301
c76dc9c3
JM
33022017-10-30 Joseph Myers <joseph@codesourcery.com>
3303
3304 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
3305 * c-opts.c (set_std_c17): New function.
3306 (c_common_init_options): Use gnu17 as default C version.
3307 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
3308
ee5fd23a
MM
33092017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
3310
3311 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
3312 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
3313 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
3314 __FP_FAST_FMA<N>X.
3315
d1047465
MP
33162017-10-23 Marek Polacek <polacek@redhat.com>
3317
3318 PR c/82681
3319 * c-warn.c (warnings_for_convert_and_check): Fix typos.
3320
9e878cf1
EB
33212017-10-19 Eric Botcazou <ebotcazou@adacore.com>
3322
3323 * c-common.c (check_builtin_function_arguments): Also check arguments
3324 of __builtin_alloca_with_align_and_max.
3325
89b6abbb
DM
33262017-10-17 David Malcolm <dmalcolm@redhat.com>
3327
3328 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
3329 rather than NULL to format_warning_va.
3330 (check_format_types): Likewise when calling format_type_warning.
3331 Remove code to extract source_ranges and source_range * in favor
3332 of just a location_t.
3333 (format_type_warning): Convert source_range * param to a
3334 location_t.
3335
39382c09
JJ
33362017-10-13 Jakub Jelinek <jakub@redhat.com>
3337
3338 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
3339 [LR]SHIFT_EXPR.
3340
62e1c678
DM
33412017-10-12 David Malcolm <dmalcolm@redhat.com>
3342
3343 * c-common.c (enum missing_token_insertion_kind): New enum.
3344 (get_missing_token_insertion_kind): New function.
3345 (maybe_suggest_missing_token_insertion): New function.
3346 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
3347
b90c9338
NS
33482017-10-11 Nathan Sidwell <nathan@acm.org>
3349
3350 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
3351 (c_common_handle_option): Update incpath_kind names.
3352
3a266bcd
ML
33532017-10-11 Martin Liska <mliska@suse.cz>
3354
3355 PR sanitizer/82490
3356 * c-attribs.c (handle_no_sanitize_attribute): Report directly
3357 Wattributes warning.
3358
8e6cdc90
RS
33592017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
3360
3361 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
3362 operating on trees as wide_ints.
3363 * c-common.c (pointer_int_sum): Likewise.
3364 * c-pretty-print.c (pp_c_integer_constant): Likewise.
3365 * c-warn.c (match_case_to_enum_1): Likewise.
3366 (c_do_switch_warnings): Likewise.
3367 (maybe_warn_shift_overflow): Likewise.
3368
802b38c9
JJ
33692017-10-10 Jakub Jelinek <jakub@redhat.com>
3370
3371 PR c/82437
3372 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
3373 instead of wide_int::from.
3374
4e34b338
JJ
33752017-10-06 Jakub Jelinek <jakub@redhat.com>
3376
3377 PR c/82437
3378 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
3379 using to_widest use wide_int with the larger of the two precisions.
3380
4bc4b2b4
BE
33812017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
3382
3383 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
3384 functions.
3385
a1488398
RS
33862017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
3387
3388 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
3389 when combining the original unconverted comparison operands.
3390
01c9fb68
JJ
33912017-09-29 Jakub Jelinek <jakub@redhat.com>
3392
3393 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
3394 attribute.
3395
6e3e8419
EB
33962017-09-29 Eric Botcazou <ebotcazou@adacore.com>
3397
3398 * c-ada-spec.c (to_ada_name): Add index parameter.
3399 (pp_ada_tree_identifier): Likewise.
3400 (dump_ada_macros): Adjust call to to_ada_name.
3401 (struct overloaded_name_hash): New type.
3402 (struct overloaded_name_hasher): Likewise.
3403 (overloaded_names): New hash table.
3404 (compute_overloading_index): New function.
3405 (dump_ada_decl_name): Call it and pass the result to
3406 pp_ada_tree_identifier.
3407 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
3408 (dump_ada_function_declaration): Likewise.
3409 (dump_generic_ada_node): Likewise.
3410 (print_constructor): Likewise.
3411 (print_destructor): Likewise.
3412 (dump_ada_specs): Delete overloaded_names table.
3413
79310774
EB
34142017-09-29 Eric Botcazou <ebotcazou@adacore.com>
3415
3416 * c-ada-spec.c (max_ada_macros): Move around.
3417 (store_ada_macro_index): Likewise.
3418 (source_file): Rename into...
3419 (macro_source_file): ...this.
3420 (count_ada_macro): Move around.
3421 (store_ada_macro): Likewise.
3422 (compare_macro): Likewise.
3423 (print_ada_macros): Merge in...
3424 (dump_ada_macros): ...this.
3425 (source_file_base): Rename into...
3426 (current_source_file): ...this.
3427 (print_comment): Move around.
3428 (dump_ada_nodes): Call dump_ada_declaration directly.
3429 (struct with): Change type of limited field to bool.
3430 (append_withs): Change type of limited_access parameter to bool.
3431 (pp_ada_tree_identifie): Likewise.
3432 (dump_ada_decl_nam): Likewise.
3433 (dump_generic_ada_node): Likewise. Do not print the return type.
3434 (to_ada_name): Change type of space_found parameter to bool.
3435 (dump_ada_function_declaration): Return void and change type of
3436 parameters to bool. Also print the return type for a function.
3437 (print_ada_methods): Rename into...
3438 (dump_ada_methods): ...this.
3439 (print_ada_declaration): Rename into ...
3440 (dump_ada_declaration): ...this. Do not print the return type.
3441 (print_ada_struct_decl): Rename into...
3442 (dump_ada_struct_decl): ...this.
3443
7d386d45
JJ
34442017-09-29 Jakub Jelinek <jakub@redhat.com>
3445
3446 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
3447 rather than DECL_INITIAL.
3448 (common_handle_aligned_attribute): Likewise.
3449
ab20d992 34502017-09-20 Alexandre Oliva <aoliva@redhat.com>
9ed32e27
AO
3451
3452 * c.opt (gen-decls): Add RejectNegative.
3453
026a79f7
AS
34542017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
3455 Jakub Jelinek <jakub@redhat.com>
3456
3457 Add support for -std=c++2a.
3458 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
3459 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
3460 * c-opts.c (set_std_cxx2a): New.
3461 (c_common_handle_option): Set options when -std=c++2a is enabled.
3462 (c_common_post_options): Adjust comments.
3463 (set_std_cxx14, set_std_cxx17): Likewise.
3464
4a8ca690
EB
34652017-09-15 Eric Botcazou <ebotcazou@adacore.com>
3466
3467 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
3468 message for non-uniform endianness and issue a warning in C++.
3469
7b936140
JJ
34702017-09-15 Jakub Jelinek <jakub@redhat.com>
3471
3472 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
3473 (Wc++17-compat): Change from undocumented alias to option.
3474 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
3475 change C++1z to C++17 in description.
3476 (std=c++1z, std=gnu++1z): Change from option to undocumented
3477 deprecated alias.
3478 (std=c++17, std=gnu++17): Change from undocumented alias to option.
3479 Adjust description.
3480 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
3481 * c-opts.c (set_std_cxx1z): Rename to ...
3482 (set_std_cxx17): ... this.
3483 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
3484 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 3485 caller.
7b936140
JJ
3486 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
3487 comments.
3488
12263f13
L
34892017-09-12 H.J. Lu <hongjiu.lu@intel.com>
3490
3491 * c-attribs.c (common_handle_aligned_attribute): Don't warn
3492 function alignment if warn_if_not_aligned_p is true.
3493
6836632e
NS
34942017-09-12 Nathan Sidwell <nathan@acm.org>
3495
3496 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
3497 resort_sorted_fields): Move to c/c-decl.c.
3498 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
3499 (struct sorted_fields_type): Move to c/c-lang.h.
3500
019bf9ad
JW
35012017-09-09 Jonathan Wakely <jwakely@redhat.com>
3502
3503 PR c++/81852
3504 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
3505
bc7fe952
MP
35062017-09-04 Marek Polacek <polacek@redhat.com>
3507
3508 PR c/81783
3509 * c-warn.c (warn_tautological_bitwise_comparison): New function.
3510 (warn_tautological_cmp): Call it.
3511
ab20d992 35122017-09-01 Boris Kolpackov <boris@codesynthesis.com>
de7c2c6a
BK
3513
3514 * c-opts.c (c_common_finish): Write dependency information even if
3515 there are errors.
3516
d2e05fcb
JJ
35172017-09-01 Jakub Jelinek <jakub@redhat.com>
3518
3519 PR c/81887
3520 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
3521 (omp_pragmas_simd): ... here.
3522 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
3523 create new clauses list containing just simd clause.
3524
18e2a8b8
RS
35252017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3526 Alan Hayward <alan.hayward@arm.com>
3527 David Sherwood <david.sherwood@arm.com>
3528
3529 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
3530 into scalar_mode_supported_p call.
3531 (handle_mode_attribute): Update call to scalar_mode_supported_p.
3532
16d22000
RS
35332017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3534 Alan Hayward <alan.hayward@arm.com>
3535 David Sherwood <david.sherwood@arm.com>
3536
3537 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
3538 for the mode iterator.
3539
b397965c
RS
35402017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3541 Alan Hayward <alan.hayward@arm.com>
3542 David Sherwood <david.sherwood@arm.com>
3543
3544 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
3545 * c-common.c (c_build_vec_perm_expr): Likewise.
3546
357b7604
RS
35472017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3548 Alan Hayward <alan.hayward@arm.com>
3549 David Sherwood <david.sherwood@arm.com>
3550
3551 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
3552
e05c94ba
RS
35532017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3554 Alan Hayward <alan.hayward@arm.com>
3555 David Sherwood <david.sherwood@arm.com>
3556
3557 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
3558 before calling targetm.addr_space.valid_pointer_mode.
3559
5c20c4af
RS
35602017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3561 Alan Hayward <alan.hayward@arm.com>
3562 David Sherwood <david.sherwood@arm.com>
3563
3564 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
3565
c94843d2 35662017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
3567 Alan Hayward <alan.hayward@arm.com>
3568 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
3569
3570 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
3571 iterators.
3572 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
3573
4e10a5a7
RS
35742017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3575 Alan Hayward <alan.hayward@arm.com>
3576 David Sherwood <david.sherwood@arm.com>
3577
3578 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
3579 case statements.
3580
130fcab0
ML
35812017-08-29 Martin Liska <mliska@suse.cz>
3582
3583 PR other/39851
3584 * c-common.c (parse_optimize_options): Add argument to function
3585 call.
3586 * c-pragma.c (handle_pragma_diagnostic): Likewise.
3587
14e18d71
DM
35882017-08-24 David Malcolm <dmalcolm@redhat.com>
3589
3590 * c-lex.c (interpret_float): Use token location
3591 when building an EXCESS_PRECISION_EXPR.
3592
2f687306
DM
35932017-08-21 David Malcolm <dmalcolm@redhat.com>
3594
3595 * c-common.c (check_function_arguments): Add "arglogs" param; pass
3596 it to check_function_format.
3597 * c-common.h (check_function_arguments): Add vec<location_t> *
3598 param.
3599 (check_function_format): Likewise.
3600 * c-format.c (struct format_check_context): Add field "arglocs".
3601 (check_function_format): Add param "arglocs"; pass it to
3602 check_format_info.
ab20d992 3603 (check_format_info): Add param "arglocs"; use it to initialize
2f687306
DM
3604 new field of format_ctx.
3605 (check_format_arg): Pass format_ctx->arglocs to new param of
3606 check_format_info_main.
3607 (class argument_parser): New field "arglocs".
3608 (argument_parser::argument_parser): Add "arglocs_" param and use
3609 it to initialize new field.
3610 (argument_parser::check_argument_type): Pass new arglocs field to
3611 check_format_types.
3612 (check_format_info_main): Add param "arglocs", and use it when
3613 constructing arg_parser.
3614 (check_format_types): Add param "arglocs"; use it if non-NULL when
3615 !EXPR_HAS_LOCATION (cur_param) to get at location information.
3616
00aa1fa2
L
36172017-08-18 H.J. Lu <hongjiu.lu@intel.com>
3618
3619 PR c/53037
3620 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
3621 (c_common_attribute_table): Add warn_if_not_aligned.
3622 (handle_aligned_attribute): Renamed to ...
3623 (common_handle_aligned_attribute): Remove argument, name, and add
3624 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
3625 (handle_aligned_attribute): New.
3626 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
3627
27be025d
MS
36282017-08-14 Martin Sebor <msebor@redhat.com>
3629
3630 PR c/81117
3631 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
3632 (handle_nonstring_attribute): New function.
3633
da67acb9
MS
36342017-08-14 Martin Sebor <msebor@redhat.com>
3635
3636 PR c/81117
3637 * c-format.h (T89_G): New macro.
3638 * c-format.c (local_gcall_ptr_node): New variable.
3639 (init_dynamic_diag_info): Initialize it.
3640
a8b522b4
ML
36412017-08-11 Martin Liska <mliska@suse.cz>
3642
3643 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
3644 TARGET_SUPPORTS_ALIASES.
3645
32129a17
DM
36462017-08-10 David Malcolm <dmalcolm@redhat.com>
3647
3648 * c-common.c (c_parse_error): Add rich_location * param, using it
3649 rather implicitly using input_location.
3650 * c-common.h (c_parse_error): Add rich_location * param.
3651
30af3a2b
MP
36522017-08-09 Marek Polacek <polacek@redhat.com>
3653
3654 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
3655 (c_common_truthvalue_conversion): Likewise.
3656 * c-omp.c (c_finish_omp_atomic): Likewise.
3657 * c-common.h (build_binary_op): Update declaration.
3658
314e6352
ML
36592017-08-08 Martin Liska <mliska@suse.cz>
3660
3661 * c-ada-spec.c: Include header files.
3662 * c-ubsan.c: Likewise.
3663 * c-warn.c: Likewise.
3664
56b5041c
JJ
36652017-08-07 Jakub Jelinek <jakub@redhat.com>
3666
3667 PR c/69389
3668 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
3669
db440138
EB
36702017-08-07 Eric Botcazou <ebotcazou@adacore.com>
3671
3672 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
3673 (print_ada_methods): Likewise.
3674 (print_ada_declaration): Likewise.
3675
577eec56
ML
36762017-08-07 Martin Liska <mliska@suse.cz>
3677
3678 * array-notation-common.c: Add new includes.
3679 * c-format.c( handle_format_attribute): Canonicalize a format
3680 function name.
3681 * c-lex.c (c_common_has_attribute): Canonicalize name of an
3682 attribute.
3683 * c-pretty-print.c: Add new include.
3684
b854df3c
EB
36852017-08-05 Eric Botcazou <ebotcazou@adacore.com>
3686
3687 * c-ada-spec.c (has_static_fields): Look only into variables.
3688 (print_constructor): Add TYPE parameter and use it for the name.
3689 (print_destructor): Likewise.
3690 (print_ada_declaration): Adjust to new constructor/destructor names.
3691 Adjust calls to print_constructor and print_destructor.
3692 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
3693 Look only into variables in the final loop.
3694
9f2cb25e
EB
36952017-08-01 Eric Botcazou <ebotcazou@adacore.com>
3696
3697 * c-ada-spec.c (has_static_fields): Look only into fields.
3698 (dump_generic_ada_node): Small tweak.
3699 (dump_nested_types): Look only into fields.
3700 (print_ada_declaration): Look only into methods. Small tweak.
3701 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
3702
f4bcd9eb
EB
37032017-08-01 Eric Botcazou <ebotcazou@adacore.com>
3704
3705 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
3706 (dump_ada_function_declaration): Likewise.
3707 (dump_generic_ada_node): Likewise.
3708 (print_ada_declaration): Add support for const-qualified variables.
3709
f34ebeb2
ML
37102017-07-31 Martin Liska <mliska@suse.cz>
3711
3712 PR sanitize/81530
3713 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
3714 Guard condition with flag_sanitize_p also with current_function_decl
3715 non-null equality.
3716 (ubsan_maybe_instrument_reference_or_call): Likewise.
3717
218e5d04
UB
37182017-07-30 Uros Bizjak <ubizjak@gmail.com>
3719
3720 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
3721
942047f2
EB
37222017-07-29 Eric Botcazou <ebotcazou@adacore.com>
3723
3724 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
3725 for enumeral types.
3726 (print_ada_declaration): Add missing guard for record types.
3727
a40ff0ae
JJ
37282017-07-27 Jakub Jelinek <jakub@redhat.com>
3729
3730 PR c/45784
3731 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
3732 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
3733 new COMPOUND_EXPRs around the rhs of the comparison.
3734
06bd22f6
MP
37352017-07-27 Marek Polacek <polacek@redhat.com>
3736
3737 PR c/81417
3738 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
3739 the types.
3740
036ea399
JJ
37412017-07-27 Jakub Jelinek <jakub@redhat.com>
3742
3743 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
3744 (handle_noipa_attribute): New function.
3745
417ca011
TD
37462017-07-07 Torsten Duwe <duwe@suse.de>
3747
3748 * c-attribs.c (c_common_attribute_table): Add entry for
3749 "patchable_function_entry".
3750
5aaa8fb4
NS
37512017-07-20 Nathan Sidwell <nathan@acm.org>
3752
3753 Remove TYPE_METHODS.
3754 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
3755 dump_ada_template, print_ada_methods,
3756 print_ada_declaration): Member fns are on TYPE_FIELDS.
3757
ff22eb12
NS
37582017-07-18 Nathan Sidwell <nathan@acm.org>
3759
3760 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
3761
eea77d1f
DM
37622017-07-14 David Malcolm <dmalcolm@redhat.com>
3763
3764 * c-common.c (try_to_locate_new_include_insertion_point): New
3765 function.
3766 (per_file_includes_t): New typedef.
3767 (added_includes_t): New typedef.
3768 (added_includes): New variable.
3769 (maybe_add_include_fixit): New function.
3770 * c-common.h (maybe_add_include_fixit): New decl.
3771
281ac396
MS
37722017-07-10 Martin Sebor <msebor@redhat.com>
3773
3774 PR other/81345
3775 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
3776
b6f43128
DM
37772017-07-06 David Malcolm <dmalcolm@redhat.com>
3778
3779 * c-common.c (selftest::c_family_tests): New.
3780 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
3781 (selftest::c_family_tests): New decl.
3782
efbf55b0
MP
37832017-07-04 Marek Polacek <polacek@redhat.com>
3784
3785 PR c/81231
3786 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
3787 types.
3788
6c86bd88
MP
37892017-07-04 Marek Polacek <polacek@redhat.com>
3790
3791 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
3792
17a7218b
ML
37932017-06-28 Martin Liska <mliska@suse.cz>
3794
3795 PR ipa/81128
3796 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
3797 to a function declaration.
3798
63010089
ML
37992017-06-28 Martin Liska <mliska@suse.cz>
3800
3801 PR driver/79659
3802 * c.opt: Add IntegerRange to various options.
3803
3e2becc4
MP
38042017-06-26 Marek Polacek <polacek@redhat.com>
3805
3806 PR c/80116
3807 * c-common.h (warn_for_multistatement_macros): Declare.
3808 * c-warn.c: Include "c-family/c-indentation.h".
3809 (warn_for_multistatement_macros): New function.
3810 * c.opt (Wmultistatement-macros): New option.
3811 * c-indentation.c (guard_tinfo_to_string): No longer static.
3812 Change the parameter type to "enum rid". Handle RID_SWITCH.
3813 * c-indentation.h (guard_tinfo_to_string): Declare.
3814
2db9b7cd
MG
38152017-06-23 Marc Glisse <marc.glisse@inria.fr>
3816
3817 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
3818
c3684b7b
MS
38192017-06-15 Martin Sebor <msebor@redhat.com>
3820
3821 PR c++/80560
3822 * c.opt (-Wclass-memaccess): New option.
3823
e72c4afd
BK
38242017-06-14 Boris Kolpackov <boris@codesynthesis.com>
3825
3826 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
3827
8a516588
MP
38282017-06-13 Marek Polacek <polacek@redhat.com>
3829
3830 PR objc/80949
3831 * c-warn.c (do_warn_duplicated_branches): Return if any of the
3832 branches is null.
3833
45b2222a
ML
38342017-06-13 Martin Liska <mliska@suse.cz>
3835
3836 PR sanitize/78204
3837 * c-attribs.c (add_no_sanitize_value): New function.
3838 (handle_no_sanitize_attribute): Likewise.
3839 (handle_no_sanitize_address_attribute): Use the function.
3840 (handle_no_sanitize_thread_attribute): New function.
3841 (handle_no_address_safety_analysis_attribute): Use
3842 add_no_sanitize_value.
3843 (handle_no_sanitize_undefined_attribute): Likewise.
3844 * c-common.h: Declare new functions.
3845 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
3846 (ubsan_instrument_shift): Likewise.
3847 (ubsan_instrument_bounds): Likewise.
3848 (ubsan_maybe_instrument_array_ref): Likewise.
3849 (ubsan_maybe_instrument_reference_or_call): Likewise.
3850
a01f151f
JM
38512017-06-11 Jason Merrill <jason@redhat.com>
3852
3853 * c-ada-spec.c, c-pragma.c: Use id_equal.
3854
3de4ac6d
MP
38552017-06-04 Marek Polacek <polacek@redhat.com>
3856
3857 PR c/80919
3858 * c-format.c (matching_type_p): Return false if any of the types
3859 requires structural equality.
3860
2474f48f
MS
38612017-06-02 Martin Sebor <msebor@redhat.com>
3862
3863 PR c/80892
3864 * c-warn.c (conversion_warning): Use -Wconversion for integer
3865 conversion and -Wfloat-conversion for floating one.
3866
40ffd95f
BE
38672017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3868
3869 * c.opt (Wsizeof-pointer-div): New warning option.
3870
3fa4634c
VR
38712017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
3872
3873 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
3874 (Wcatch-value=1): Enable by -Wall.
3875
f012c8ef
DM
38762017-05-30 David Malcolm <dmalcolm@redhat.com>
3877
3878 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
3879 format_chars.
3880 * c.opt (fdiagnostics-show-template-tree): New option.
3881 (felide-type): New option.
3882
63dbcd13
VR
38832017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
3884
3885 * c.opt (Wcatch-value=): New C++ warning flag.
3886
be136b5c
NS
38872017-05-24 Nathan Sidwell <nathan@acm.org>
3888
3889 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
3890 const casts to avoid warning.
3891
3cd211af
MS
38922017-05-24 Martin Sebor <msebor@redhat.com>
3893
3894 PR c/80731
3895 * c-common.h (unsafe_conversion_p): Add a function argument.
3896 * c-common.c (unsafe_conversion_p): Same.
3897 Add type names and values to diagnostics.
3898 (scalar_to_vector): Adjust.
3899 * c-warn.c (constant_expression_error): Add a function argument.
3900 Add type names and values to diagnostics.
3901 (conversion_warning): Add a function argument.
3902 Add type names and values to diagnostics.
3903 (warnings_for_convert_and_check): Same.
3904
1ff7be5a
JM
39052017-05-19 Jason Merrill <jason@redhat.com>
3906
3907 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
3908 enumerators.
3909
ff502317
BE
39102017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3911
3912 * c-format.c (locus): Move out of function scope,
3913 add GTY attribute.
3914
2a8a8d7b
NS
39152017-05-19 Nathan Sidwell <nathan@acm.org>
3916
3917 * c-opts.c (class_dump_file, class_dump_flags): Delete.
3918 (c_common_parse_file): Remove class dump handling.
3919 (get_dump_info): Likewise.
3920
39aac208
RB
39212017-05-19 Richard Biener <rguenther@suse.de>
3922
3923 PR c++/80593
3924 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
3925 to alias-set zero memory.
3926
6ecd2339
BE
39272017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3928
3929 * c-format.c (local_tree_type_node): Add GTY attribute.
3930
6574d78e
MP
39312017-05-18 Marek Polacek <polacek@redhat.com>
3932
3933 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
3934 (c_common_fixed_point_type_for_size): Likewise.
3935 (c_common_type_for_mode): Likewise.
3936 (shorten_compare): Likewise.
3937 (c_promoting_integer_type_p): Use false/true instead of 0/1.
3938 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
3939
e3455240
MP
39402017-05-18 Marek Polacek <polacek@redhat.com>
3941
3942 * c-common.c (self_promoting_args_p): Change the return type to bool.
3943 Use false/true instead of 0/1.
3944 * c-common.h (self_promoting_args_p): Update.
3945
3fa8871b
MP
39462017-05-17 Marek Polacek <polacek@redhat.com>
3947
3948 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
3949 * c-warn.c: Likewise.
3950
b42cc3ca
VV
39512017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
3952
3953 Implement new C++ intrinsics __is_assignable and __is_constructible.
3954 * c-common.c (__is_assignable, __is_constructible): New.
3955 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
3956
1a817418
ML
39572017-05-17 Martin Liska <mliska@suse.cz>
3958
3959 * c-common.h: Introduce dump_flags_t type and
3960 use it instead of int type.
3961 * c-gimplify.c (c_genericize): Likewise.
3962 * c-opts.c: Likewise.
3963
b2fa0a8b
MP
39642017-05-17 Marek Polacek <polacek@redhat.com>
3965
3966 * c-common.c (c_save_expr): Remove.
3967 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
3968 * c-common.h (c_save_expr): Remove declaration.
3969
31c2d57d
VR
39702017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
3971
3972 PR c/35441
3973 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
3974 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
3975 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
3976 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
3977 RDIV_EXPR.
3978 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
3979
684f84de
MP
39802017-05-09 Marek Polacek <polacek@redhat.com>
3981
3982 PR c/80525
3983 * c-warn.c (unwrap_c_maybe_const): New.
3984 (warn_logical_operator): Call it.
3985
641da50a
NS
39862017-05-09 Nathan Sidwell <nathan@acm.org>
3987
3988 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
3989 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
3990
631238ac
MS
39912017-05-08 Martin Sebor <msebor@redhat.com>
3992
3993 PR translation/80280
3994 * c-format.h (struct format_flag_spec): Add new member.
3995 (T89_T): New macro.
3996 * c-format.c (local_tree_type_node): New global.
3997 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
3998 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
3999 (strfmon_flag_specs): Likewise.
4000 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
4001 with distinct quoting properties.
4002 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
4003 (flag_chars_t::validate): Add argument and handle bad quoting.
4004 (check_format_info_main): Handle quoting problems.
4005 (init_dynamic_diag_info): Simplify.
4006
49f0c04c
JM
40072017-05-08 Jason Merrill <jason@redhat.com>
4008
4009 * c-opts.c (c_common_post_options): Update defaults for
4010 flag_abi_version and flag_abi_compat_version.
4011
56d35585
DM
40122017-05-05 David Malcolm <dmalcolm@redhat.com>
4013
4014 * c-common.c (c_cpp_error): Replace report_diagnostic
4015 with diagnostic_report_diagnostic.
4016
0f2c4a8f
MS
40172017-05-04 Martin Sebor <msebor@redhat.com>
4018
4019 PR translation/80280
4020 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
4021 (handle_weakref_attribute): Same.
4022
6fe63fb4
NS
40232017-05-03 Nathan Sidwell <nathan@acm.org>
4024
4025 Canonicalize canonical type hashing
4026 * c-common.c (complete_array_type): Use type_hash_canon.
4027
815d9cc6
XR
40282017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
4029
92a285c1 4030 PR c++/80038
815d9cc6
XR
4031 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
4032 prototype.
4033 (cilk_install_body_pedigree_operations): Likewise.
4034 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
4035 detatched.
4036 (cilk_gimplify_call_params_in_spawned_fn): Remove.
4037 (cilk_install_body_pedigree_operations): Likewise.
4038 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
4039 unwrapping.
4040
f8a36447
JJ
40412017-04-27 Jakub Jelinek <jakub@redhat.com>
4042
4043 PR c++/80534
4044 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
4045 flag on non-aggregate element types.
4046
7c145456
BE
40472017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
4048
4049 * c-common.c (c_type_hasher, type_hash_table): Remove.
4050 (c_common_get_alias_set): Remove unreachable code.
4051 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
4052
c3cbcd45
VR
40532017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
4054
4055 * c.opt (Wextra-semi): New C++ warning flag.
4056
8a59d466
JJ
40572017-04-20 Jakub Jelinek <jakub@redhat.com>
4058
4059 PR middle-end/80423
4060 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
4061
8487c9a5
JJ
40622017-04-18 Jakub Jelinek <jakub@redhat.com>
4063
4064 PR middle-end/79788
4065 PR middle-end/80375
4066 * c-common.c (c_common_type_for_mode): Don't handle
4067 widest_*_literal_type_node here.
4068 c_common_signed_or_unsigned_type): Likewise.
4069 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
4070 to *intTI_type_node or *intDI_type_node depending on whether
4071 TImode is supported by the target or not.
4072
3ee0fb02
ML
40732017-04-10 Martin Liska <mliska@suse.cz>
4074
4075 PR sanitizer/80350
4076 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
4077 doing an UBSAN check.
4078
5764ee3c
JW
40792017-04-03 Jonathan Wakely <jwakely@redhat.com>
4080
4081 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
4082
6f3af356
JJ
40832017-03-31 Jakub Jelinek <jakub@redhat.com>
4084
4085 PR c++/79572
4086 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
4087 tree *.
4088 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
4089 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
4090 REFERENCE_TYPE.
4091
f6a7a9d5
DM
40922017-03-31 David Malcolm <dmalcolm@redhat.com>
4093
4094 PR documentation/78732
4095 * c.opt (Wendif-labels): Fix description to refer to
4096 #else rather than #elif.
4097
af88f557
JJ
40982017-03-31 Jakub Jelinek <jakub@redhat.com>
4099
4100 PR libstdc++/80251
4101 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
4102 * c-common.c (c_common_reswords): Add __is_aggregate trait.
4103
a9e4a1a5
JJ
41042017-03-27 Jakub Jelinek <jakub@redhat.com>
4105
4106 PR middle-end/80162
4107 * c-common.c (c_common_mark_addressable_vec): Don't set
4108 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
4109
3f01b620
MS
41102017-03-21 Martin Sebor <msebor@redhat.com>
4111
4112 PR c++/79548
4113 * c-common.c (set_underlying_type): Mark type used only when
4114 original del is declared unused.
4115
2f6f187a
DM
41162017-03-10 David Malcolm <dmalcolm@redhat.com>
4117
4118 PR translation/79848
4119 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
4120 "%qs".
4121
a02fa805
DM
41222017-03-10 David Malcolm <dmalcolm@redhat.com>
4123
4124 PR c/79921
4125 * c-indentation.c (warn_for_misleading_indentation): Remove parens
4126 from inform's message, so that xgettext can locate it.
4127
822a132c
MP
41282017-03-09 Marek Polacek <polacek@redhat.com>
4129
4130 PR c++/79962
4131 PR c++/79984
4132 * c-attribs.c (handle_nonnull_attribute): Save the result of default
4133 conversion to the attribute list.
4134
bba81f1c
ML
41352017-03-09 Martin Liska <mliska@suse.cz>
4136
4137 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
4138
108154ff
JM
41392017-03-03 Jason Merrill <jason@redhat.com>
4140
4141 * c.opt (Wnoexcept-type): New.
4142
eb0e7c34
RB
41432017-03-02 Richard Biener <rguenther@suse.de>
4144
4145 PR c/79756
4146 * c-common.c (c_common_mark_addressable_vec): Look through
4147 C_MAYBE_CONST_EXPR.
4148
9453ba0a
ML
41492017-02-28 Martin Liska <mliska@suse.cz>
4150
4151 * c.opt: Replace space with tabular for options of <number>
4152 type.
4153
6a825afe
ML
41542017-02-28 Martin Liska <mliska@suse.cz>
4155
4156 * c.opt: Fix --help=option -Q for options which are of
4157 an enum type.
4158
4227c9ad
JJ
41592017-02-24 Jakub Jelinek <jakub@redhat.com>
4160
4161 PR c++/79588
4162 * c-common.c (check_function_restrict): New function.
4163 (check_function_arguments): Add FNDECL argument. Call
4164 check_function_restrict if -Wrestrict.
4165 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
4166 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
4167 * c-common.h (check_function_arguments): Add FNDECL argument.
4168 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
4169
59909673
EB
41702017-02-24 Eric Botcazou <ebotcazou@adacore.com>
4171
4172 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
4173 treatment of parameters with pointer-to-tagged type and tidy up.
4174 (print_ada_methods): Remove the special treatment of C++ static member
4175 functions.
4176
54dcd526
ML
41772017-02-22 Martin Liska <mliska@suse.cz>
4178
4179 * c.opt: Replace inequality signs with square brackets
4180 for -Wnornalized.
4181
00bc9de3
JJ
41822017-02-21 Jakub Jelinek <jakub@redhat.com>
4183
4184 PR c++/79641
4185 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
4186 preserve quals.
4187
97fcf744
JM
41882017-02-17 Joseph Myers <joseph@codesourcery.com>
4189
4190 * c-cppbuiltin.c (builtin_define_float_constants): Define
4191 __DECIMAL_DIG__ to the value for long double.
4192
c7545f1c
MP
41932017-02-15 Marek Polacek <polacek@redhat.com>
4194
4195 PR c/79515
4196 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
4197 conversion has occured.
4198
c2e84327
DM
41992017-01-24 David Malcolm <dmalcolm@redhat.com>
4200
4201 * c-common.c (c_common_reswords): Add "__RTL".
4202 * c-common.h (enum rid): Add RID_RTL.
4203
2ebd93e1
MP
42042017-01-20 Marek Polacek <polacek@redhat.com>
4205
4206 PR c/64279
4207 * c-common.h (do_warn_duplicated_branches_r): Declare.
4208 * c-gimplify.c (c_genericize): Walk the function tree calling
4209 do_warn_duplicated_branches_r.
4210 * c-warn.c (expr_from_macro_expansion_r): New.
4211 (do_warn_duplicated_branches): New.
4212 (do_warn_duplicated_branches_r): New.
4213 * c.opt (Wduplicated-branches): New option.
4214
0d80ab91
DM
42152017-01-17 David Malcolm <dmalcolm@redhat.com>
4216
4217 PR c++/71497
4218 * c-indentation.c (warn_for_misleading_indentation): Use the past
4219 subjunctive in the note.
4220
7f991c36
AH
42212017-01-17 Aldy Hernandez <aldyh@redhat.com>
4222
4223 PR c/79116
4224 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
4225 start type to integer_type.
4226
1c70261c
JJ
42272017-01-16 Jakub Jelinek <jakub@redhat.com>
4228
4229 PR driver/49726
4230 * c.opt (gen-decls): Add Driver flag.
4231
1ddca3f3
PC
42322017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
4233
4234 Revert:
4235 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
4236
4237 PR c++/71737
4238 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
4239
7d2f3f1d
PC
42402017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
4241
4242 PR c++/71737
4243 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
4244
bce6f760
MS
42452017-01-12 Martin Sebor <msebor@redhat.com>
4246
4247 (-Wformat-overflow): ...to this.
4248
bf5fbf46
MS
42492017-01-11 Martin Sebor <msebor@redhat.com>
4250
4251 PR c/78768
4252 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
4253 Also enable for LTO.
4254
e363df3f
JM
42552017-01-10 Jason Merrill <jason@redhat.com>
4256
4257 Implement P0195R2, C++17 variadic using.
4258 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
4259
bd2c6270
JJ
42602017-01-09 Jakub Jelinek <jakub@redhat.com>
4261
4262 PR translation/79019
4263 PR translation/79020
4264 * c.opt (Wnormalized=): Fix typo in description.
4265
efcc8d38
MS
42662017-01-08 Martin Sebor <msebor@redhat.com>
4267
4268 PR middle-end/77708
4269 * c.opt (-Wformat-truncation): New option.
4270
ab20d992 42712017-01-06 Alexandre Oliva <aoliva@redhat.com>
435f3f7a
AO
4272
4273 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
4274 value to unsigned short to fit in 4 hex digits without
4275 warnings.
4276
4e89adf9
EB
42772017-01-05 Eric Botcazou <ebotcazou@adacore.com>
4278
4279 * c.opt (fsso-struct): Add 'native' value.
4280
cd445b54
ML
42812017-01-05 Martin Liska <mliska@suse.cz>
4282
4283 PR pch/78970
4284 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
4285 header.
4286
a9342885
MP
42872017-01-04 Marek Polacek <polacek@redhat.com>
4288
4289 PR c++/64767
4290 * c.opt (Wpointer-compare): New option.
4291
fc73e60c
JJ
42922017-01-04 Jakub Jelinek <jakub@redhat.com>
4293
4294 PR driver/78957
4295 * c.opt (fsso-struct=): Add RejectNegative.
4296
cbe34bb5
JJ
42972017-01-01 Jakub Jelinek <jakub@redhat.com>
4298
4299 Update copyright years.
4300
d4a6c0ea
ML
43012016-12-29 Martin Liska <mliska@suse.cz>
4302
4303 PR c/78933
4304 * c.opt (strong-eval-order): Add RejectNegative keyword.
4305
67a5ad7c
JM
43062016-12-22 Jason Merrill <jason@redhat.com>
4307
4308 Implement P0522R0, matching of template template arguments.
4309 * c-cppbuiltin.c (c_cpp_builtins): Define
4310 __cpp_template_template_args.
4311
0dba7960
JJ
43122016-12-21 Jakub Jelinek <jakub@redhat.com>
4313
4314 PR bootstrap/78817
4315 * c-common.c (struct nonnull_arg_ctx): New type.
4316 (check_function_nonnull): Return bool instead of void. Use
4317 nonnull_arg_ctx as context rather than just location_t.
4318 (check_nonnull_arg): Adjust for the new context type, set
4319 warned_p to true if a warning has been diagnosed.
4320 (check_function_arguments): Return bool instead of void.
4321 * c-common.h (check_function_arguments): Adjust prototype.
4322
31bfc9b9
JM
43232016-12-21 Jason Merrill <jason@redhat.com>
4324
4325 * c.opt (-fnew-ttp-matching): New flag.
4326 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
4327
629b3d75
MJ
43282016-12-14 Martin Jambor <mjambor@suse.cz>
4329
4330 * c-omp.c: Include omp-general.h instead of omp-low.h.
4331 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
4332 name.
4333
474da67e
MS
43342016-12-14 Martin Sebor <msebor@redhat.com>
4335
4336 PR c/17308
4337 * c-common.c (check_nonnull_arg): Disable when optimization
4338 is enabled.
4339
fe366b87
MP
43402016-12-12 Marek Polacek <polacek@redhat.com>
4341
4342 PR c++/78647
4343 * c-common.c (attribute_fallthrough_p): Return false for
4344 error_mark_node.
4345
8bd9f164
MS
43462016-12-08 Martin Sebor <msebor@redhat.com>
4347
4348 PR c/78284
4349 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
4350
060162e0
MS
43512016-12-08 Martin Sebor <msebor@redhat.com>
4352
4353 PR c/78165
92a285c1
ML
4354 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
4355 suffix.
060162e0 4356
ee92e7ba
MS
43572016-12-07 Martin Sebor <msebor@redhat.com>
4358
4359 PR c/53562
4360 PR middle-end/77784
4361 PR middle-end/78149
4362 PR middle-end/78138
4363 * c.opt (-Wstringop-overflow): New option.
4364
84b0769e
MO
43652016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
4366
4367 * c-attribs.c (asan odr indicator): New attribute.
4368 (handle_asan_odr_indicator_attribute): New function.
4369
7fa6a965
PK
43702016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4371
4372 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
4373 ptrdiff_type_node;
4374
56d8ffc1
JG
43752016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
4376
4377 * c-common.c (excess_precision_mode_join): New.
4378 (c_ts18661_flt_eval_method): New.
4379 (c_c11_flt_eval_method): Likewise.
4380 (c_flt_eval_method): Likewise.
4381 * c-common.h (excess_precision_mode_join): New.
4382 (c_flt_eval_method): Likewise.
4383 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
4384 (cpp_iec_559_value): Call it.
4385 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
4386 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
4387 __FLT_EVAL_METHOD_TS_18661_3__.
4388
04f0fcf7
JG
43892016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
4390
4391 * c-opts.c (c_common_post_options): Add logic to handle the default
4392 case for -fpermitted-flt-eval-methods.
4393
fb2675cb
PB
43942016-11-23 Paolo Bonzini <bonzini@gnu.org>
4395
4396 * c.opt (Wexpansion-to-defined): New.
4397
ec1c5694
JJ
43982016-11-23 Jakub Jelinek <jakub@redhat.com>
4399
4400 PR target/78451
4401 * c-pragma.c (handle_pragma_target): Don't replace
4402 current_target_pragma, but chainon the new args to the current one.
4403
730c9e75
NS
44042016-11-22 Nathan Sidwell <nathan@acm.org>
4405
4406 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 4407 indentation and formatting.
730c9e75 4408
89990732
MS
44092016-11-21 Martin Sebor <msebor@redhat.com>
4410
4411 * c.opt (-fprintf-return-value): Enable by default.
4412
48330c93
BE
44132016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4414
4415 PR c++/71973
4416 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
4417 * c-common.c (c_common_nodes_and_builtins): Initialize
4418 const_tm_ptr_type_node.
4419
0d939c95
MP
44202016-11-16 Marek Polacek <polacek@redhat.com>
4421
4422 PR c/78285
4423 * c-common.c (c_add_case_label): Turn error_at calls into inform.
4424
8e745a17
JJ
44252016-11-14 Jakub Jelinek <jakub@redhat.com>
4426
4427 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
4428
1ee62b92 44292016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
4430 Richard Biener <rguenther@suse.de>
4431
4432 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
4433 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
4434 * c.opt (fgimple): New option.
1ee62b92 4435
22b15758
UB
44362016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4437
4438 PR c/35503
4439 * c-common.h (warn_for_restrict): Declare.
4440 * c-warn.c: Include gcc-rich-location.h.
4441 (warn_for_restrict): New function.
4442 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
4443 (gcc_cdiag_char_table): Likewise.
4444 (gcc_cxxdiag_char_table): Likewise.
4445 * c.opt (Wrestrict): New option.
4446
4be719cd
EB
44472016-11-13 Eric Botcazou <ebotcazou@adacore.com>
4448
4449 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
4450 for nested types only if the type is a record or union and dump SLOC.
4451
4a826ca6
JM
44522016-11-09 Jason Merrill <jason@redhat.com>
4453
4454 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
4455
2e955d50
JJ
44562016-11-09 Jakub Jelinek <jakub@redhat.com>
4457
4458 * c-ubsan.c (ubsan_instrument_shift): Handle split
4459 -fsanitize=shift-base and -fsanitize=shift-exponent.
4460
51dc6603
JM
44612016-11-07 Jason Merrill <jason@redhat.com>
4462
4463 * c.opt (Wc++1z-compat): New.
4464 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
4465
6dc4a604
ML
44662016-11-07 Martin Liska <mliska@suse.cz>
4467
4468 * c-warn.c (warn_for_unused_label): Save all labels used
4469 in goto or in &label.
4470
b302001e
JM
44712016-11-03 Jason Merrill <jason@redhat.com>
4472
4473 * c-cppbuiltin.c (c_cpp_builtins): Correct
4474 __cpp_inheriting_constructors.
4475
31f7f784
JM
44762016-11-01 Jason Merrill <jason@redhat.com>
4477
2bc78e3c
JM
4478 * c-cppbuiltin.c (c_cpp_builtins): Update
4479 __cpp_inheriting_constructors.
4480
31f7f784
JM
4481 * c.opt (-fnew-inheriting-ctors): New.
4482 * c-opts.c: Default to on for ABI 11+.
4483
dcb466ec
JJ
44842016-10-31 Jakub Jelinek <jakub@redhat.com>
4485
4486 PR c++/77948
4487 * c.opt (fext-numeric-literals): Add Var and Init.
4488 * c-opts.c (c_common_handle_option): Don't clear
4489 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
4490 (c_common_post_options): Clear it here if not set
4491 explicitly.
4492
52e1b91e
AH
44932016-10-28 Aldy Hernandez <aldyh@redhat.com>
4494
4495 PR debug/77773
4496 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
4497 if NULL.
4498
e16f1cc7
JJ
44992016-10-25 Jakub Jelinek <jakub@redhat.com>
4500
4501 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
4502 * c-common.c (c_common_reswords): Add __builtin_launder.
4503
f8348061
BE
45042016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
4505
4506 * c-common.c (c_common_truthvalue_conversion): Warn for
4507 multiplications in boolean context. Fix the quoting of '<<' and '<'
4508 in the shift warning.
4509
eff89e01
BE
45102016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
4511
4512 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
4513
24bc7bf4
JM
45142016-10-20 Jason Merrill <jason@redhat.com>
4515
4516 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
4517
4c712374
BE
45182016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4519
4520 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
4521 integer shift ops in boolean context.
4522
45232016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
4524
4525 * c.opt (Walloca): New.
4526 (Walloca-larger-than=): New.
4527 (Wvla-larger-than=): New.
4528
8fa18c06
MP
45292016-10-17 Marek Polacek <polacek@redhat.com>
4530
4531 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
4532 Return immediately when finding a match.
4533 (warn_tautological_cmp): Remove a boolean variable that is no longer
4534 needed.
4535
b12b1915
MP
45362016-10-17 Marek Polacek <polacek@redhat.com>
4537
4538 * c-attribs.c: New file.
4539 * c-common.c: Move attributes handling to c-attribs.c.
4540 (get_nonnull_operand): No longer static.
4541 * c-common.h: Move the declarations from c-attribs.c to its own section.
4542
2045acd9
JM
45432016-10-14 Jason Merrill <jason@redhat.com>
4544
4545 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
4546 and __cpp_deduction_guides.
4547
14a2c9aa
JM
45482016-10-13 Jason Merrill <jason@redhat.com>
4549
4550 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
4551
4d0cdd0c
TP
45522016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
4553
4554 * c-cppbuiltin.c: Include memmodel.h.
4555 * c-opts.c: Likewise.
4556 * c-pragma.c: Likewise.
4557 * c-warn.c: Likewise.
4558
70f6d5e1
JJ
45592016-10-12 Jakub Jelinek <jakub@redhat.com>
4560
4561 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
4562 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
4563 * c-opts.c (sanitize_cpp_opts): Initialize
4564 cpp_opts->cpp_warn_implicit_fallthrough.
4565
78f61294
MP
45662016-10-11 Marek Polacek <polacek@redhat.com>
4567
4568 * c-common.c (warning_candidate_p): Change the return type to bool
4569 and return true/false instead of 1/0.
4570 (vector_mode_valid_p): Likewise.
4571
038b5cc0
MP
45722016-10-11 Marek Polacek <polacek@redhat.com>
4573
4574 * c-common.c (fold_for_warn): No longer static.
4575 (bool_promoted_to_int_p): Likewise.
4576 (c_common_get_narrower): Likewise.
4577 (constant_expression_warning): Move to c-warn.c.
4578 (constant_expression_error): Likewise.
4579 (overflow_warning): Likewise.
4580 (warn_logical_operator): Likewise.
4581 (find_array_ref_with_const_idx_r): Likewise.
4582 (warn_tautological_cmp): Likewise.
4583 (expr_has_boolean_operands_p): Likewise.
4584 (warn_logical_not_parentheses): Likewise.
4585 (warn_if_unused_value): Likewise.
4586 (strict_aliasing_warning): Likewise.
4587 (sizeof_pointer_memaccess_warning): Likewise.
4588 (check_main_parameter_types): Likewise.
4589 (conversion_warning): Likewise.
4590 (warnings_for_convert_and_check): Likewise.
4591 (match_case_to_enum_1): Likewise.
4592 (match_case_to_enum): Likewise.
4593 (c_do_switch_warnings): Likewise.
4594 (warn_for_omitted_condop): Likewise.
4595 (readonly_error): Likewise.
4596 (lvalue_error): Likewise.
4597 (invalid_indirection_error): Likewise.
4598 (warn_array_subscript_with_type_char): Likewise.
4599 (warn_about_parentheses): Likewise.
4600 (warn_for_unused_label): Likewise.
4601 (warn_for_div_by_zero): Likewise.
4602 (warn_for_memset): Likewise.
4603 (warn_for_sign_compare): Likewise.
4604 (do_warn_double_promotion): Likewise.
4605 (do_warn_unused_parameter): Likewise.
4606 (record_locally_defined_typedef): Likewise.
4607 (maybe_record_typedef_use): Likewise.
4608 (maybe_warn_unused_local_typedefs): Likewise.
4609 (maybe_warn_bool_compare): Likewise.
4610 (maybe_warn_shift_overflow): Likewise.
4611 (warn_duplicated_cond_add_or_warn): Likewise.
4612 (diagnose_mismatched_attributes): Likewise.
4613 * c-common.h: Move the declarations from c-warn.c to its own section.
4614 * c-warn.c: New file.
4615
627be19f
JM
46162016-10-08 Jason Merrill <jason@redhat.com>
4617
4618 * c-common.c (c_common_truthvalue_conversion): Don't distribute
4619 into COND_EXPR in C++.
4620
7bad794a
JJ
46212016-10-08 Jakub Jelinek <jakub@redhat.com>
4622
4623 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
4624 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
4625 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
4626
be845b04
JJ
46272016-10-07 Jakub Jelinek <jakub@redhat.com>
4628
4629 Implement LWG2296 helper intrinsic
4630 * c-common.h (enum rid): Add RID_ADDRESSOF.
4631 * c-common.c (c_common_reswords): Add __builtin_addressof.
4632
c09c4992
BE
46332016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
4634
4635 PR c++/77700
4636 * c-common.c (c_common_truthvalue_conversion): Warn also for
4637 suspicious enum values in boolean context.
4638
342cfb3e
JJ
46392016-10-06 Jakub Jelinek <jakub@redhat.com>
4640
4641 Implement P0258R2 - helper for C++17
4642 std::has_unique_object_representations trait
4643 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
4644 * c-common.c (c_common_reswords): Add
4645 __has_unique_object_representations.
4646
2e69f143
JJ
46472016-10-05 Jakub Jelinek <jakub@redhat.com>
4648
4649 PR sanitizer/66343
4650 * c-ubsan.c (ubsan_instrument_return): Don't call
4651 initialize_sanitizer_builtins here.
4652
700fff34
BE
46532016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
4654
4655 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
4656 conditional expression in boolean context when only one arm is
4657 non-boolean.
4658
9563bfcd
JJ
46592016-10-05 Jakub Jelinek <jakub@redhat.com>
4660
04a32443
JJ
4661 PR sanitizer/77823
4662 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
4663 is not integral.
4664
9563bfcd
JJ
4665 * c-common.c (c_common_reswords): Update comment for C++11.
4666
f1644724
JM
46672016-10-04 Jason Merrill <jason@redhat.com>
4668
4669 * c-common.c (make_tree_vector_from_ctor): New.
4670 * c-common.h: Declare it.
4671
5a79befb
JJ
46722016-10-04 Jakub Jelinek <jakub@redhat.com>
4673
4674 * c-cppbuiltin.c (c_cpp_builtins): Don't define
4675 __LIBGCC_JCR_SECTION_NAME__.
4676
1633d3b9
BE
46772016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
4678
4679 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
4680 left shift in boolean context.
4681
a2c6e7f2
JJ
46822016-09-29 Jakub Jelinek <jakub@redhat.com>
4683
4684 Implement P0001R1 - C++17 removal of register storage class specifier
4685 * c.opt (Wregister): New warning.
4686 * c-opts.c (c_common_post_options): Enable -Wregister by
4687 default for C++17.
4688
75304c87
JG
46892016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
4690
4691 * c-opts.c (c_common_post_options): Remove special case for
4692 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
4693 in C++.
4694
bbfac6da
JJ
46952016-09-27 Jakub Jelinek <jakub@redhat.com>
4696
6e39060a
JJ
4697 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
4698 -std=c++1z.
4699
bbfac6da
JJ
4700 * c-ada-spec.c (print_ada_declaration): Remove break after return.
4701
e73cf9a2
TP
47022016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
4703
4704 * c-common.c: Include memmodel.h.
4705
c6147dc4
MP
47062016-09-26 Marek Polacek <polacek@redhat.com>
4707
4708 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
4709
81fea426
MP
47102016-09-26 Marek Polacek <polacek@redhat.com>
4711
4712 PR c/7652
4713 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
4714 (handle_fallthrough_attribute): New function.
4715 (attribute_fallthrough_p): New function.
4716 * c-common.h (attribute_fallthrough_p): Declare.
4717
9a2300e9
MP
47182016-09-24 Marek Polacek <polacek@redhat.com>
4719
4720 PR c/77490
4721 * c.opt (Wbool-operation): New.
4722
a09e9e35
BE
47232016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4724
4725 * c-common.c (c_common_truthvalue_conversion): Inhibit
4726 Wint-in-bool-context warning with from_macro_definition_at.
4727 Mention the expression will always evaluate to true.
4728
d43b4ccc
MS
47292016-09-21 Martin Sebor <msebor@redhat.com>
4730
4731 PR bootstrap/77676
4732 * c.opt (fprintf-return-value): Temporarily initialize to zero
4733 to unblock bootstrap failures.
4734
2e1c20b1
JJ
47352016-09-21 Jakub Jelinek <jakub@redhat.com>
4736
4737 PR c++/77651
4738 * c.opt (Waligned-new=): Add RejectNegative.
4739 (faligned-new=): Likewise. Spelling fix - change
4740 aligned_new_threshhold to aligned_new_threshold.
4741 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
4742 to aligned_new_threshold.
4743
88d0c3f0
MS
47442016-09-20 Martin Sebor <msebor@redhat.com>
4745
4746 PR middle-end/49905
4747 * c.opt: Add -Wformat-length and -fprintf-return-value.
4748
144a96e4
BE
47492016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4750
4751 PR c++/77434
4752 * c.opt (Wint-in-bool-context): New warning.
4753 * c-common.c (c_common_truthvalue_conversion): Warn on integer
4754 constants in boolean context.
4755
63012d9a
JM
47562016-09-19 Joseph Myers <joseph@codesourcery.com>
4757
4758 * c-common.c (max_align_t_align): Also consider alignment of
4759 float128_type_node.
4760
931388ce
JM
47612016-09-15 Jason Merrill <jason@redhat.com>
4762
4763 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
4764 DECL_EXTERNAL.
4765
38711381
JM
47662016-09-14 Jason Merrill <jason@redhat.com>
4767
4768 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
4769 limit FIELD_DECL, either.
4770
e51fbec3
MP
47712016-09-14 Marek Polacek <polacek@redhat.com>
4772
4773 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
4774 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
4775 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
4776
254830ba
DM
47772016-09-13 David Malcolm <dmalcolm@redhat.com>
4778
4779 * c-common.c (warn_logical_not_parentheses): Replace
4780 rich_location::add_fixit_insert calls with add_fixit_insert_before
4781 and add_fixit_insert_after, eliminating the "next_loc" calculation.
4782
42763690
JM
47832016-09-13 Jason Merrill <jason@redhat.com>
4784 Tom de Vries <tom@codesourcery.com>
4785
4786 PR c++/77427
4787 * c-common.c (set_underlying_type): Don't treat array as builtin type.
4788
9453eee9
JM
47892016-09-13 Jason Merrill <jason@redhat.com>
4790
4791 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
4792 limit types at all.
4793
e96809e3
JM
47942016-09-12 Jason Merrill <jason@redhat.com>
4795
4796 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
4797 bit/byte confusion, allow large alignment for types.
4798
54dcdb88
BE
47992016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
4800
4801 PR c++/77496
4802 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
4803
d1463eb9
DM
48042016-09-12 David Malcolm <dmalcolm@redhat.com>
4805
4806 PR c/72858
4807 * c-format.c (argument_parser::check_argument_type): Add params
4808 "type_start" and "conversion_char". Use the former to generate
4809 offset_to_type_start and pass it and conversion_char to
4810 check_format_types.
4811 (check_format_info_main): Capture the start of the type
4812 information as "type_start", and pass it an format_char
4813 to arg_parser.check_argument_type.
4814 (check_format_types): Provide an example in the leading comment.
4815 Add params "offset_to_type_start" and "conversion_char"; pass
4816 them to format_type_warning calls.
4817 (test_get_modifier_for_format_len): Likewise.
4818 (matching_type_p): New function.
4819 (get_format_for_type): Add param "conversion_char" and move
4820 implementation into...
4821 (get_format_for_type_1): ...new function, called twice.
4822 Use new function matching_type_p rather than checking for
4823 TYPE_CANONICAL equality.
4824 (get_corrected_substring): New function.
4825 (format_type_warning): Provide an example in the leading comment.
4826 Add params "offset_to_type_start" and "conversion_char". Replace
4827 call to get_format_for_type with call to get_corrected_substring
4828 and move rejection of hints for widths/precisions there.
4829 (assert_format_for_type_streq): Add param "conversion_char".
4830 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
4831 (test_get_format_for_type_printf): Add conversion chars to the
4832 tests, adding coverage for various combinations of integer
4833 vs double conversions, and for preserving octal and hexadecimal
4834 conversions.
4835 (test_get_format_for_type_scanf): Add conversion chars to the
4836 tests.
4837
5b28efbb
TV
48382016-09-10 Tom de Vries <tom@codesourcery.com>
4839
4840 PR C/71602
4841 * c-common.c (build_va_arg): Handle more strict
4842 targetm.canonical_va_list_type. Replace first argument type error with
4843 assert.
4844
3f0177e7
MS
48452016-09-09 Martin Sebor <msebor@redhat.com>
4846
4847 PR c/77520
4848 PR c/77521
4849 * c-format.c (argument_parser::find_format_char_info): Use %qc
4850 format directive unconditionally.
4851
af63ba4b
JM
48522016-09-09 Jason Merrill <jason@redhat.com>
4853
4854 Implement C++17 new of over-aligned types.
4855 * c.opt: Add -faligned-new and -Waligned-new.
4856 * c-common.c (max_align_t_align): Split out from...
4857 (cxx_fundamental_alignment_p): ...here.
4858 * c-common.h: Declare it.
4859 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
4860
c65248cb
JM
48612016-09-09 Joseph Myers <joseph@codesourcery.com>
4862
4863 * c-cppbuiltin.c (builtin_define_type_width): New function.
4864 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
4865 macros.
4866
e5106e27
DM
48672016-09-07 David Malcolm <dmalcolm@redhat.com>
4868
4869 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
4870 a POINTER_TYPE.
4871 (substring_loc::get_location): Move to substring-locations.c,
4872 keeping implementation as...
4873 (c_get_substring_location): New function, from the above, reworked
4874 to use accessors rather than member lookup.
4875 * c-common.h (class substring_loc): Move to substring-locations.h,
4876 replacing with a forward decl.
4877 (c_get_substring_location): New decl.
4878 * c-format.c: Include "substring-locations.h".
4879 (format_warning_va): Move to substring-locations.c.
4880 (format_warning_at_substring): Likewise.
4881
ab20d992 48822016-09-06 Martin Sebor <msebor@redhat.com>
a42e7952
MS
4883
4884 PR c/77336
4885 * c-format.c (check_function_format): Avoid issuing warnings for
4886 functions unless they call format functions with non-constant
4887 format strings.
4888
b772a565
RB
48892016-09-06 Richard Biener <rguenther@suse.de>
4890
4891 PR c/77450
4892 * c-common.c (c_common_mark_addressable_vec): Handle
4893 COMPOUND_LITERAL_EXPR.
4894
25ff5dd3
MP
48952016-09-05 Marek Polacek <polacek@redhat.com>
4896
4897 PR c/77423
4898 * c-common.c (bool_promoted_to_int_p): New function.
4899 (expr_has_boolean_operands_p): New function.
4900 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
4901 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
4902
21234eb5
TV
49032016-09-04 Tom de Vries <tom@codesourcery.com>
4904
4905 revert:
4906 2016-08-29 Tom de Vries <tom@codesourcery.com>
4907
4908 * c-common.c (build_va_arg): Replace first argument type error
4909 with assert.
4910
9dc5773f
JJ
49112016-09-02 Jakub Jelinek <jakub@redhat.com>
4912
4913 PR c/65467
4914 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
4915 (c_finish_omp_for): Reject _Atomic qualified iterators.
4916
49172016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
4918
4919 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
4920 size to guarantee it fits the output of the formatted function
4921 regardless of its arguments.
4922
295844f6
MP
49232016-09-01 Marek Polacek <polacek@redhat.com>
4924
4925 PR c/7652
4926 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
4927 FALLTHRU comments.
4928
3d06b6f2
MP
49292016-08-29 Marek Polacek <polacek@redhat.com>
4930
4931 PR c/77292
4932 * c-common.c (warn_logical_not_parentheses): Don't warn for
4933 a comparison or a logical operator.
4934
34cedad5
TV
49352016-08-29 Tom de Vries <tom@codesourcery.com>
4936
4937 * c-common.c (build_va_arg): Fix type comparison assert.
4938
f162d717
TV
49392016-08-29 Tom de Vries <tom@codesourcery.com>
4940
4941 * c-common.c (build_va_arg): Replace first argument type error
4942 with assert.
4943
ba9bbd6f
TV
49442016-08-29 Tom de Vries <tom@codesourcery.com>
4945
4946 PR c/77398
4947 * c-common.c (build_va_arg): Add first argument error. Build va_arg
4948 with error_mark_node as va_list instead of with illegal va_list.
4949
ebef225f
MP
49502016-08-25 Marek Polacek <polacek@redhat.com>
4951 David Malcolm <dmalcolm@redhat.com>
4952
4953 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
4954 * c-common.h (warn_logical_not_parentheses): Update declaration.
4955
b00e6e75
MP
49562016-08-22 Marek Polacek <polacek@redhat.com>
4957
4958 PR c++/77321
4959 * c-common.c (warn_for_memset): Check type for null.
4960
6dc198e3
JM
49612016-08-22 Joseph Myers <joseph@codesourcery.com>
4962
14ec014e 4963 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
4964 _FloatNx types for suffixes for built-in functions.
4965
c65699ef
JM
49662016-08-19 Joseph Myers <joseph@codesourcery.com>
4967
4968 PR c/32187
4969 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
4970 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
4971 (RID_FLOAT128X): New enum rid values.
4972 (CASE_RID_FLOATN_NX): New macro.
4973 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
4974 keywords.
4975 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
4976 corresponding complex types.
4977 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
4978 _FloatNx and corresponding complex types.
4979 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
4980 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
4981 and _FloatNx types for the widest type for determining
4982 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
4983 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
4984 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
4985 and _FloatNx types.
4986 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
4987 constants.
4988 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
4989 _FloatNx types.
4990
cc015f3a
DM
49912016-08-18 David Malcolm <dmalcolm@redhat.com>
4992
4993 * c-opts.c (c_diagnostic_finalizer): Update for change to
4994 diagnostic_show_locus.
4995
cb18fd07
DM
49962016-08-18 David Malcolm <dmalcolm@redhat.com>
4997
4998 * c-common.c: Include "spellcheck.h".
4999 (cb_get_suggestion): New function.
5000 * c-common.h (cb_get_suggestion): New decl.
5001 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
5002 cb_get_suggestion.
5003
a76989dc
MP
50042016-08-18 Marek Polacek <polacek@redhat.com>
5005
5006 PR c/71514
5007 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
5008 and pointer-to-VLA.
5009
65e736c0
DM
50102016-08-16 David Malcolm <dmalcolm@redhat.com>
5011
5012 PR c/72857
5013 * c-common.c (substring_loc::get_range): Rename to...
5014 (substring_loc::get_location): ...this, converting param from a
5015 source_range * to a location_t *. Call
5016 get_source_location_for_substring rather than
5017 get_source_range_for_substring, and pass in m_caret_idx.
5018 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
5019 (substring_loc::get_range): Replace with...
5020 (substring_loc::get_location): ...this.
5021 (substring_loc::set_caret_index): New method.
5022 (substring_loc): Add field m_caret_idx.
5023 * c-format.c (format_warning_va): Update for above changes.
5024 Rename local "substring_loc" to "fmt_substring_loc" to avoid
5025 clashing with type name.
5026 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
5027 (check_argument_type): Likewise.
5028 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
5029 Use a copy when emitting warnings, setting the caret index from TYPE.
5030
7e1dde14 50312016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 5032 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
5033
5034 * c-ada-spec.c (dump_number): New function.
5035 (handle_escape_character): Likewise.
5036 (print_ada_macros): Add handling of constant integers and strings.
5037
191816a3
MP
50382016-08-12 Marek Polacek <polacek@redhat.com>
5039
5040 PR c/7652
5041 * c-common.c (scalar_to_vector): Adjust fall through comment.
5042 * c-opts.c (c_common_handle_option): Likewise.
5043 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
5044 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
5045 fall through comment.
5046 * cilk.c (extract_free_variables): Add FALLTHRU.
5047
452df4a4
JM
50482016-08-10 Jason Merrill <jason@redhat.com>
5049
5050 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
5051
f3365c12
JM
50522016-08-09 Jason Merrill <jason@redhat.com>
5053
5054 * c-common.c (c_common_attribute_table): vector_size affects type
5055 identity.
5056
f0bc3323
MP
50572016-08-09 Marek Polacek <polacek@redhat.com>
5058
5059 PR c/7652
5060 * c-ada-spec.c (dump_generic_ada_node): Add return.
5061
98e5a19a
JM
50622016-08-09 Jason Merrill <jason@redhat.com>
5063
5064 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
5065 C++17 constexpr lambdas.
5066
895aa8e1
DM
50672016-08-08 David Malcolm <dmalcolm@redhat.com>
5068
5069 PR c/64955
5070 * c-common.h (selftest::c_format_c_tests): New declaration.
5071 (selftest::run_c_tests): New declaration.
5072 * c-format.c: Include "selftest.h.
5073 (format_warning_va): Add param "corrected_substring" and use
5074 it to add a replacement fix-it hint.
5075 (format_warning_at_substring): Likewise.
5076 (format_warning_at_char): Update for new param of
5077 format_warning_va.
5078 (argument_parser::check_argument_type): Pass "fki" to
5079 check_format_types.
5080 (check_format_types): Add param "fki" and pass it to
5081 format_type_warning.
5082 (deref_n_times): New function.
5083 (get_modifier_for_format_len): New function.
5084 (selftest::test_get_modifier_for_format_len): New function.
5085 (get_format_for_type): New function.
5086 (format_type_warning): Add param "fki" and use it to attempt
5087 to provide hints for argument types when calling
5088 format_warning_at_substring.
5089 (selftest::get_info): New function.
5090 (selftest::assert_format_for_type_streq): New function.
5091 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
5092 (selftest::test_get_format_for_type_printf): New function.
5093 (selftest::test_get_format_for_type_scanf): New function.
5094 (selftest::c_format_c_tests): New function.
5095
e52ed3fe
DM
50962016-08-08 David Malcolm <dmalcolm@redhat.com>
5097
5098 PR c/52952
5099 * c-format.c: Include "diagnostic.h".
5100 (location_column_from_byte_offset): Delete.
5101 (location_from_offset): Delete.
5102 (format_warning_va): New function.
5103 (format_warning_at_substring): New function.
5104 (format_warning_at_char): New function.
5105 (check_format_arg): Capture location of format_tree and pass to
5106 check_format_info_main.
5107 (argument_parser): Add fields "start_of_this_format" and
5108 "format_string_cst".
5109 (flag_chars_t::validate): Add param "format_string_cst". Convert
5110 warning_at call using location_from_offset to call to
5111 format_warning_at_char.
5112 (argument_parser::argument_parser): Add param "format_string_cst_"
5113 and use use it to initialize field "format_string_cst".
5114 Initialize new field "start_of_this_format".
5115 (argument_parser::read_format_flags): Convert warning_at call
5116 using location_from_offset to a call to format_warning_at_char.
5117 (argument_parser::read_any_format_left_precision): Likewise.
5118 (argument_parser::read_any_format_precision): Likewise.
5119 (argument_parser::read_any_other_modifier): Likewise.
5120 (argument_parser::find_format_char_info): Likewise, in three places.
5121 (argument_parser::parse_any_scan_set): Likewise, in one place.
5122 (argument_parser::handle_conversions): Likewise, in two places.
5123 (argument_parser::check_argument_type): Add param "fmt_param_loc"
5124 and use it to make a substring_loc. Pass the latter to
5125 check_format_types.
5126 (check_format_info_main): Add params "fmt_param_loc" and
5127 "format_string_cst". Convert warning_at calls using
5128 location_from_offset to calls to format_warning_at_char. Pass the
5129 new params to the arg_parser ctor. Pass "format_string_cst" to
5130 flag_chars.validate. Pass "fmt_param_loc" to
5131 arg_parser.check_argument_type.
5132 (check_format_types): Convert first param from a location_t
5133 to a const substring_loc & and rename to "fmt_loc". Attempt
5134 to extract the range of the relevant parameter and pass it
5135 to format_type_warning.
5136 (format_type_warning): Convert first param from a location_t
5137 to a const substring_loc & and rename to "fmt_loc". Add
5138 params "param_range" and "type". Replace calls to warning_at
5139 with calls to format_warning_at_substring.
5140
1c4d457e
DM
51412016-08-08 David Malcolm <dmalcolm@redhat.com>
5142
5143 * c-format.c (class flag_chars_t): New class.
5144 (struct length_modifier): New struct.
5145 (class argument_parser): New class.
5146 (flag_chars_t::flag_chars_t): New ctor.
5147 (flag_chars_t::has_char_p): New method.
5148 (flag_chars_t::add_char): New method.
5149 (flag_chars_t::validate): New method.
5150 (flag_chars_t::get_alloc_flag): New method.
5151 (flag_chars_t::assignment_suppression_p): New method.
5152 (argument_parser::argument_parser): New ctor.
5153 (argument_parser::read_any_dollar): New method.
5154 (argument_parser::read_format_flags): New method.
5155 (argument_parser::read_any_format_width): New method.
5156 (argument_parser::read_any_format_left_precision): New method.
5157 (argument_parser::read_any_format_precision): New method.
5158 (argument_parser::handle_alloc_chars): New method.
5159 (argument_parser::read_any_length_modifier): New method.
5160 (argument_parser::read_any_other_modifier): New method.
5161 (argument_parser::find_format_char_info): New method.
5162 (argument_parser::validate_flag_pairs): New method.
5163 (argument_parser::give_y2k_warnings): New method.
5164 (argument_parser::parse_any_scan_set): New method.
5165 (argument_parser::handle_conversions): New method.
5166 (argument_parser::check_argument_type): New method.
5167 (check_format_info_main): Introduce classes argument_parser
5168 and flag_chars_t, moving the code within the loop into methods
5169 of these classes. Make various locals "const".
5170
88fa5555
DM
51712016-08-05 David Malcolm <dmalcolm@redhat.com>
5172
5173 * c-common.c: Include "substring-locations.h".
5174 (get_cpp_ttype_from_string_type): New function.
5175 (g_string_concat_db): New global.
5176 (substring_loc::get_range): New method.
5177 * c-common.h (g_string_concat_db): New declaration.
5178 (class substring_loc): New class.
5179 * c-lex.c (lex_string): When concatenating strings, capture the
5180 locations of all tokens using a new obstack, and record the
5181 concatenation locations within g_string_concat_db.
5182 * c-opts.c (c_common_init_options): Construct g_string_concat_db
5183 on the ggc-heap.
5184
78169471
MP
51852016-07-29 Marek Polacek <polacek@redhat.com>
5186
638fc14f
MP
5187 PR c/71926
5188 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
5189 parentheses warning.
5190
78169471
MP
5191 PR c/71574
5192 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
5193
1225d6b1
ML
51942016-07-28 Martin Liska <mliska@suse.cz>
5195
5196 PR gcov-profile/68025
5197 * c-common.c (handle_no_profile_instrument_function_attribute):
5198
ec1e2a40
BE
51992016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
5200
5201 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
5202 BITS_PER_UNIT_LOG.
5203
5ec2cd9f
JM
52042016-07-25 Jason Merrill <jason@redhat.com>
5205
5206 PR c++/65970
5207 * c.opt (fconstexpr-loop-limit): New.
5208
9dc5773f 52092016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
5210
5211 PR c++/71675
5212 * c-common.c (resolve_overloaded_builtin): Avoid converting
5213 __atomic_compare_exchange_n return type to that of what its
5214 first argument points to.
5215
e3fe09c1
UB
52162016-07-22 Uros Bizjak <ubizjak@gmail.com>
5217
5218 * c-common.c: Use HOST_WIDE_INT_M1U instead of
5219 ~(unsigned HOST_WIDE_INT) 0.
5220
bc91c436
ML
52212016-07-22 Martin Liska <mliska@suse.cz>
5222
5223 PR gcov-profile/69028
5224 PR gcov-profile/62047
5225 * cilk.c (create_cilk_helper_decl): Set location of a new decl
5226 to the current_function_decl.
5227
451dcc66
JM
52282016-07-21 Jason Merrill <jason@redhat.com>
5229
5230 PR c++/65168
5231 * c-common.c (c_common_truthvalue_conversion): Check
5232 c_inhibit_evaluation_warnings for warning about address of
5233 reference.
5234
de6a69ee
DM
52352016-07-20 David Malcolm <dmalcolm@redhat.com>
5236
5237 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
5238 const char *.
5239
d022c55a
JM
52402016-07-15 Jason Merrill <jason@redhat.com>
5241
5242 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
5243
ddbbcb19
JJ
52442016-07-15 Jakub Jelinek <jakub@redhat.com>
5245
5246 PR c/71858
5247 * c-common.h (enum lookup_name_fuzzy_kind): Add
5248 FUZZY_LOOKUP_FUNCTION_NAME.
5249
d0cf395a
JM
52502016-07-08 Jason Merrill <jason@redhat.com>
5251
5252 P0145: Refining Expression Order for C++.
5253 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
5254 * c-opts.c: Adjust.
5255
98d44e93
MT
52562016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
5257
5258 PR c++/71214
5259 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
5260
f9d8d994
TS
52612016-06-29 Thomas Schwinge <thomas@codesourcery.com>
5262
5263 * c-pragma.h (enum pragma_kind): Rename
5264 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
5265 users.
5266
4aa83879
RB
52672016-06-29 Richard Biener <rguenther@suse.de>
5268
5269 PR middle-end/71002
5270 * c-common.c (c_common_get_alias_set): Remove union type punning case.
5271
a25bd9e6
JM
52722016-06-24 Jason Merrill <jason@redhat.com>
5273
5274 P0145R2: Refining Expression Order for C++.
5275 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
5276 MODIFY_EXPR.
5277
a86451b9
JJ
52782016-06-24 Jakub Jelinek <jakub@redhat.com>
5279
5280 * c-common.c (check_builtin_function_arguments): Require last
5281 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
5282 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
5283 if the last argument is pointer to enumerated or boolean type.
5284
1a4f11c8
DM
52852016-06-22 David Malcolm <dmalcolm@redhat.com>
5286
5287 PR c/70339
5288 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
5289 (lookup_name_fuzzy): New prototype.
5290
fe55692c
JDA
52912016-06-21 John David Anglin <danglin@gcc.gnu.org>
5292
5293 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
5294
4eb24e01
JM
52952016-06-14 Jason Merrill <jason@redhat.com>
5296
5297 P0145R2: Refining Expression Order for C++.
5298 * c.opt (fargs-in-order): New.
5299 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
5300
ef7cf206
JJ
53012016-06-13 Jakub Jelinek <jakub@redhat.com>
5302
0dda258b
JJ
5303 PR sanitizer/71498
5304 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
5305 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
5306
ef7cf206
JJ
5307 PR preprocessor/71183
5308 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
5309 to cb_get_source_date_epoch.
5310
50b15873
JJ
53112016-06-10 Jakub Jelinek <jakub@redhat.com>
5312
5313 PR c/68657
5314 * c.opt (Wpsabi): Add Warning flag.
5315
4d926e34
MS
53162016-06-10 Martin Sebor <msebor@redhat.com>
5317
5318 PR c/71392
14ec014e 5319 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
5320 the nonnull attribute in type-generic builtins.
5321
e01b4e16
MS
53222016-06-09 Martin Sebor <msebor@redhat.com>
5323
5324 PR c/70883
5325 * c-common.c (builtin_function_validate_nargs): Make text of error
5326 message consistent with others like it.
5327
44a845ca
MS
53282016-06-08 Martin Sebor <msebor@redhat.com>
5329 Jakub Jelinek <jakub@redhat.com>
5330
5331 PR c++/70507
5332 PR c/68120
5333 * c-common.c (check_builtin_function_arguments): Handle
5334 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
5335
a80a7051
RB
53362016-06-08 Richard Biener <rguenther@suse.de>
5337
5338 * c-common.c (parse_optimize_options): Improve diagnostic messages.
5339
bfd67b47
RB
53402016-06-07 Richard Biener <rguenther@suse.de>
5341
5342 PR c/61564
5343 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
5344 options and warn about others.
5345
15c98b2e
ES
53462016-06-01 Eduard Sanou <dhole@openmailbox.org>
5347
5348 * c-common.c (get_source_date_epoch): Rename to
5349 cb_get_source_date_epoch.
5350 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
5351 message when the parsing fails. Use error_at instead of fatal_error.
5352 * c-common.h (get_source_date_epoch): Rename to
5353 cb_get_source_date_epoch.
5354 * c-common.h (cb_get_source_date_epoch): Prototype.
5355 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
5356 * c-common.h (c_omp_region_type): Remove trailing comma.
5357 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
5358 * c-lex.c (c_lex_with_flags): Remove initialization of
5359 pfile->source_date_epoch.
5360
00631022
JJ
53612016-05-30 Jakub Jelinek <jakub@redhat.com>
5362
5363 PR c++/71349
5364 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
5365 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
5366 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
5367 instead of C_OMP_CLAUSE_SPLIT_FOR.
5368
f17a223d
RB
53692016-05-24 Richard Biener <rguenther@suse.de>
5370
5371 PR middle-end/70434
5372 PR c/69504
5373 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
5374 (convert_vector_to_array_for_subscript): ... this.
5375 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
5376 VIEW_CONVERT_EXPR to an array type. Rename to ...
5377 (convert_vector_to_array_for_subscript): ... this.
5378
4f2e1536
MP
53792016-05-12 Marek Polacek <polacek@redhat.com>
5380
5381 PR c/70756
5382 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
5383 size_in_bytes and pass LOC to it.
5384
d6e83a8d
MM
53852016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5386
5387 PR c/43651
5388 * c.opt (Wduplicate-decl-specifier): New option.
5389
5c3a10fb
MP
53902016-05-11 Marek Polacek <polacek@redhat.com>
5391
5392 PR c++/71024
5393 * c-common.c (diagnose_mismatched_attributes): New function.
5394 * c-common.h (diagnose_mismatched_attributes): Declare.
5395
deef7113
MP
53962016-05-04 Marek Polacek <polacek@redhat.com>
5397
5398 * c.opt (Wdangling-else): New option.
5399
79ce98bc
MP
54002016-05-03 Marek Polacek <polacek@redhat.com>
5401
5402 PR c/70859
5403 * c-common.c (builtin_function_validate_nargs): Add location
5404 parameter. Use it.
5405 (check_builtin_function_arguments): Add location and arguments
5406 parameters. Use them.
5407 * c-common.h (check_builtin_function_arguments): Update declaration.
5408
381cdae4
RB
54092016-05-03 Richard Biener <rguenther@suse.de>
5410
5411 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
5412 allow call args to gimplify to SSA names.
5413
1d793c34
MP
54142016-05-03 Marek Polacek <polacek@redhat.com>
5415
5416 * c-common.h (enum c_omp_region_type): Remove stray comma.
5417
77886428
CP
54182016-05-02 Cesar Philippidis <cesar@codesourcery.com>
5419
5420 * c-common.h (enum c_omp_region_type): Define.
5421
697e0b28
RS
54222016-05-02 Richard Sandiford <richard.sandiford@arm.com>
5423
5424 * c-common.c (shorten_compare): Use wi::to_wide.
5425
e7ff0319
CP
54262016-04-29 Cesar Philippidis <cesar@codesourcery.com>
5427
5428 PR middle-end/70626
5429 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
5430 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
5431 reduction clauses in acc parallel loops.
5432
2fff3db8
MP
54332016-04-29 Marek Polacek <polacek@redhat.com>
5434
5435 PR c/70852
5436 * c-common.c (warn_for_memset): Check domain before accessing it.
5437
509063eb
DV
54382016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
5439
5440 PR/69089
5441 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
5442 "aligned" attribute.
5443
b632761d
JM
54442016-04-28 Jason Merrill <jason@redhat.com>
5445
5446 * c-lex.c (c_common_has_attribute): Handle nodiscard.
5447
174f6622
ES
54482016-04-28 Eduard Sanou <dhole@openmailbox.org>
5449 Matthias Klose <doko@debian.org>
5450
5451 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 5452 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
5453 handling.
5454 * c-common.h (get_source_date_epoch): Prototype.
5455 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
5456
6bc2bb18
RB
54572015-04-27 Ryan Burn <contact@rnburn.com>
5458
5459 PR c++/69024
5460 PR c++/68997
5461 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
5462 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
5463 external linkage.
5464 (cilk_detect_and_unwrap): Corresponding changes.
5465 (extract_free_variables): Don't extract free variables from
5466 AGGR_INIT_EXPR slot.
5467 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
5468 (cilk_recognize_spawn): Likewise.
5469
c1e1f433
BS
54702016-04-27 Bernd Schmidt <bschmidt@redhat.com>
5471
5472 * c.opt (Wmemset-elt-size): New option.
5473 * c-common.c (warn_for_memset): New function.
5474 * c-common.h (warn_for_memset): Declare.
5475
d067e05f
JM
54762016-04-25 Jason Merrill <jason@redhat.com>
5477
5478 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
5479 No longer static.
5480 * c-common.h: Declare it.
5481 * c-lex.c (c_common_has_attribute): Add maybe_unused.
5482
9aa36ae5
JM
54832016-04-22 Jason Merrill <jason@redhat.com>
5484
5485 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
5486
477d4906
IV
54872016-04-20 Ilya Verbin <ilya.verbin@intel.com>
5488
5489 PR c++/69363
5490 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
5491 * c-common.h (c_finish_cilk_clauses): Remove declaration.
5492
fe37c7af
MM
54932016-04-18 Michael Matz <matz@suse.de>
5494
5495 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
5496 and SET_DECL_ALIGN.
5497
23f2660f
EB
54982016-04-17 Eric Botcazou <ebotcazou@adacore.com>
5499
5500 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
5501 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
5502 to incomplete types.
5503 (dump_nested_type): Remove redundant tests and tidy up.
5504 (print_ada_declaration): Also set TREE_VISITED on the declaration of
5505 a type which is the typedef of an original type.
5506
1e77281b
MP
55072016-04-15 Marek Polacek <polacek@redhat.com>
5508
5509 PR c/70651
5510 * c-common.c (build_va_arg): Change two asserts into errors and return
5511 error_mark_node.
5512
b3a77f21
MP
55132016-04-13 Marek Polacek <polacek@redhat.com>
5514
5515 PR c++/70639
5516 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
5517 for switch statements, too.
5518
322b8466
JM
55192016-03-28 Jason Merrill <jason@redhat.com>
5520
5521 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
5522
fbdb6baf
MP
55232016-03-23 Marek Polacek <polacek@redhat.com>
5524
5525 PR c++/69884
5526 * c.opt (Wignored-attributes): New option.
5527
5c240f4d
DM
55282016-03-22 David Malcolm <dmalcolm@redhat.com>
5529
5530 PR c/69993
5531 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
5532 diagnostic text, reversing the order of the warning and note so
5533 that they appear in source order.
5534
14ba7b28
MP
55352016-03-17 Marek Polacek <polacek@redhat.com>
5536
5537 PR c/69407
5538 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
5539 operations.
5540
08a1cadc
JM
55412016-03-14 Jason Merrill <jason@redhat.com>
5542
2aaeea19
JM
5543 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
5544
08a1cadc
JM
5545 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
5546
c06d25bb
RB
55472016-03-09 Richard Biener <rguenther@suse.de>
5548
5549 PR c/70143
5550 * c-common.c (strict_aliasing_warning): Add back
5551 alias_sets_conflict_p check.
5552
80aac5c8
JM
55532016-03-08 Jason Merrill <jason@redhat.com>
5554
5555 * c-opts.c (set_std_cxx1z): Don't enable concepts.
5556
64b23c13
DM
55572016-03-04 David Malcolm <dmalcolm@redhat.com>
5558
5559 PR c/68187
5560 * c-indentation.c (get_visual_column): Move code to determine next
5561 tab stop to...
5562 (next_tab_stop): ...this new function.
5563 (line_contains_hash_if): Delete function.
5564 (detect_preprocessor_logic): Delete function.
5565 (get_first_nws_vis_column): New function.
5566 (detect_intervening_unindent): New function.
5567 (should_warn_for_misleading_indentation): Replace call to
5568 detect_preprocessor_logic with a call to
5569 detect_intervening_unindent.
5570
729526f5
DM
55712016-03-04 David Malcolm <dmalcolm@redhat.com>
5572
5573 PR c/68187
5574 * c-indentation.c (should_warn_for_misleading_indentation): When
5575 suppressing warnings about cases where the guard and body are on
5576 the same column, only use the first non-whitespace column in place
5577 of the guard token column when dealing with "else" clauses.
5578 When rejecting aligned BODY and NEXT, loosen the requirement
5579 from equality with the first non-whitespace of guard to simply
5580 that they not be indented relative to it.
5581
e9a35493
RB
55822016-03-04 Richard Biener <rguenther@suse.de>
5583
5584 PR c++/70054
5585 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
5586 instead of alias_sets_conflict_p.
5587
1be56bc5
MP
55882016-03-01 Marek Polacek <polacek@redhat.com>
5589
5590 PR c++/69795
5591 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
5592 any DECL.
5593
35886f0b
MS
55942016-02-22 Martin Sebor <msebor@redhat.com>
5595
5596 PR middle-end/69780
5597 * c-common.c (check_builtin_function_arguments): Validate and
5598 reject invalid arguments to __builtin_alloca_with_align.
5599
4246c8da
MW
56002016-02-20 Mark Wielaard <mjw@redhat.com>
5601
5602 PR c/28901
5603 * c.opt (Wunused-const-variable): Turn into Alias for...
5604 (Wunused-const-variable=): New option.
5605
268be88c
BE
56062016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5607
5608 PR c++/69865
5609 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
5610 here...
5611 (c_common_init_options): ...to here.
5612 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
5613
871b3f47
JJ
56142016-02-19 Jakub Jelinek <jakub@redhat.com>
5615
5616 PR c++/69826
5617 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
5618 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
5619 flag_preprocess_only.
5620
bf14eba2
JJ
56212016-02-16 Jakub Jelinek <jakub@redhat.com>
5622
5623 PR c/69835
5624 * c.opt (Wnonnull-compare): Enable for -Wall.
5625
ba6b3795
JJ
56262016-02-15 Jakub Jelinek <jakub@redhat.com>
5627
5628 PR c++/69797
5629 * c-common.c (sync_resolve_size): Diagnose too few arguments
5630 even when params is non-NULL empty vector.
5631
a011cd92
BS
56322016-02-08 Bernd Schmidt <bschmidt@redhat.com>
5633
5634 PR target/60410
5635 * c.opt (fshort-double): Remove.
5636
46cb9332
MS
56372016-02-05 Martin Sebor <msebor@redhat.com>
5638
5639 PR c++/69662
5640 * c.opt (Warning options): Update -Wplacement-new to take
5641 an optional argument.
5642
e1b81f2b
JJ
56432016-02-01 Jakub Jelinek <jakub@redhat.com>
5644
5645 PR preprocessor/69543
5646 PR c/69558
5647 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
5648 instead of loc to control_warning_option.
5649
b6adbb9f
NS
56502016-02-01 Nathan Sidwell <nathan@codesourcery.com>
5651
5652 * c.opt (fopenacc-dim=): New option.
5653
5d70666e
RB
56542016-01-27 Ryan Burn <contact@rnburn.com>
5655
5656 PR cilkplus/69267
5657 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
5658 gimplify_arg. Removed superfluous post_p argument.
5659 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
5660 superfluous post_p argument.
5661 * c-gimplify.c (c_gimplify_expr): Likewise.
5662
01e1dea3
DM
56632016-01-26 David Malcolm <dmalcolm@redhat.com>
5664
5665 PR other/69006
5666 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
5667 pp_newline_and_flush with pp_flush.
5668
9f04a53e
MS
56692016-01-20 Martin Sebor <msebor@redhat.com>
5670
5671 PR c/69405
5672 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
5673 an incompatible argument when the argument isn't a valid tree node.
5674
7f26f7df
JM
56752016-01-18 Jason Merrill <jason@redhat.com>
5676
5677 PR c++/68767
5678 * c-common.c (check_function_arguments_recurse): Fold the whole
5679 COND_EXPR, not just the condition.
5680
f62bf092
TV
56812016-01-18 Tom de Vries <tom@codesourcery.com>
5682
5683 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
5684 classify as loop clause.
5685
e0a575ff
JJ
56862016-01-15 Jakub Jelinek <jakub@redhat.com>
5687
5688 PR bootstrap/68271
5689 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
5690 C++ FE no longer has limit on number of pragmas.
5691
56922015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
5693
5694 PR c++/69048
5695 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 5696 to add missing cleanup point.
b6e3db06 5697
c7df95d8
DM
56982016-01-14 David Malcolm <dmalcolm@redhat.com>
5699
5700 PR c++/68819
5701 * c-indentation.c (get_visual_column): Add location_t param.
5702 Handle the column number being zero by effectively disabling the
5703 warning, with an "inform".
5704 (should_warn_for_misleading_indentation): Add location_t argument
5705 for all uses of get_visual_column.
5706
21efdd80
PP
57072016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
5708
5709 PR c++/69029
5710 * c-indentation.c (should_warn_for_misleading_indentation):
5711 Don't warn about do-while statements.
5712
7a127fa7
MS
57132016-01-07 Martin Sebor <msebor@redhat.com>
5714
5715 PR c/68966
5716 * c-common.c (sync_resolve_size): Reject first argument when it's
5717 a pointer to _Bool.
5718
c589e975
DM
57192016-01-05 David Malcolm <dmalcolm@redhat.com>
5720
5721 PR c/69122
5722 * c-indentation.c (get_visual_column): Remove default argument.
5723 (should_warn_for_misleading_indentation): For the multiline case,
5724 update call to get_visual_column for next_stmt_exploc so that it
5725 captures the location of the first non-whitespace character in the
5726 relevant line. Don't issue warnings if there is non-whitespace
5727 before the next statement.
5728
818ab71a
JJ
57292016-01-04 Jakub Jelinek <jakub@redhat.com>
5730
5731 Update copyright years.
5732
745e411d
DM
57332015-12-21 David Malcolm <dmalcolm@redhat.com>
5734
5735 * c-common.c (binary_op_error): Convert first param from
5736 location_t to rich_location * and use it when emitting an error.
5737 * c-common.h (binary_op_error): Convert first param from
5738 location_t to rich_location *.
5739
de67c4c3
DM
57402015-12-16 David Malcolm <dmalcolm@redhat.com>
5741
5742 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
5743 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
5744
4a38b02b
IV
57452015-12-15 Ilya Verbin <ilya.verbin@intel.com>
5746
5747 * c-common.c (c_common_attribute_table): Handle "omp declare target
5748 link" attribute.
5749
54d62f51
JJ
57502015-12-14 Jakub Jelinek <jakub@redhat.com>
5751
5752 PR c/68833
5753 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
5754
8d4227c8
TB
57552014-12-12 Tobias Burnus <burnus@net-b.de>
5756
5757 PR fortran/68815
5758 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
5759 specifiers (%d, %i,%u and %c).
5760
f6069ccc
DM
57612015-12-10 David Malcolm <dmalcolm@redhat.com>
5762
5763 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
5764
63bbf46d
JJ
57652015-12-08 Jakub Jelinek <jakub@redhat.com>
5766
5767 PR c/48088
5768 PR c/68657
5769 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
5770 * c-pragma.c (handle_pragma_diagnostic): Adjust
5771 control_warning_option caller.
5772
f79520bb
DM
57732015-12-07 David Malcolm <dmalcolm@redhat.com>
5774
5775 * c-common.c (c_cpp_error): Update for change to
5776 rich_location::set_range.
5777
b3d5bc62
JJ
57782015-12-04 Paolo Bonzini <bonzini@gnu.org>
5779
5780 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
5781 shifting 1 out of the sign bit.
5782
57832015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
5784
5785 * c-common.c (c_common_attribute_table[]): Update max arguments
5786 count for "simd" attribute.
5787 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
5788
6eb4a537
JJ
57892015-12-03 Jakub Jelinek <jakub@redhat.com>
5790
5791 PR preprocessor/57580
5792 * c-ppoutput.c (print): Change printed field to bool.
5793 Move src_file last for smaller padding.
5794 (init_pp_output): Set print.printed to false instead of 0.
5795 (scan_translation_unit): Fix up formatting. Set print.printed
5796 to true after printing something other than newline.
5797 (scan_translation_unit_trad): Set print.printed to true instead of 1.
5798 (maybe_print_line_1): Set print.printed to false instead of 0.
5799 (print_line_1): Likewise.
5800 (do_line_change): Set print.printed to true instead of 1.
5801 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
5802 dump_macro): Set print.printed to false after printing newline.
5803
4250754e
JM
58042015-12-02 Jason Merrill <jason@redhat.com>
5805
f479b43d
JM
5806 * c-common.c (fold_for_warn): New.
5807 (warn_logical_operator, warn_tautological_cmp)
5808 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
5809
4250754e
JM
5810 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
5811 (c_fully_fold_internal, decl_constant_value_for_optimization):
5812 Move to c/c-fold.c.
5813 * c-common.h: Don't declare decl_constant_value_for_optimization.
5814
e9e32ee6
JM
58152015-12-02 Joseph Myers <joseph@codesourcery.com>
5816
5817 PR c/68162
5818 * c-common.h (c_build_qualified_type): Add extra default
5819 arguments.
5820
37d5ad46
JB
58212015-12-01 Julian Brown <julian@codesourcery.com>
5822 Cesar Philippidis <cesar@codesourcery.com>
5823 James Norris <James_Norris@mentor.com>
5824
5825 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
5826 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
5827 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
5828
f07862c7
EB
58292015-11-30 Eric Botcazou <ebotcazou@adacore.com>
5830
5831 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
5832 (decl_sloc_common): Delete and move bulk of processing to...
5833 (decl_sloc): ...here.
5834 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
5835 (dump_ada_double_name): Remove S parameter and compute the suffix.
5836 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
5837 element type and deal with an anonymous one.
5838 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
5839 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
5840 and remove reference to QUAL_UNION_TYPE.
5841 (dump_nested_types): Make 2 passes on the fields and move bulk to...
5842 (dump_nested_type): ...here. New function extracted from above.
5843 Generate a full declaration for anonymous element type of arrays.
5844 (print_ada_declaration): Really skip anonymous declarations. Remove
5845 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
5846 Clean up processing of declarations of array types and objects.
5847 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
5848 Remove obsolete code and tidy up.
5849
75c8aac3
JH
58502015-11-29 Jan Hubicka <hubicka@ucw.cz>
5851
5852 PR c/67581
5853 * c-common.c (handle_transparent_union_attribute): Update
5854 also type variants.
5855
b58d3df2
ML
58562015-11-27 Martin Liska <mliska@suse.cz>
5857
5858 PR c++/68312
5859 * array-notation-common.c (cilkplus_extract_an_triplets):
5860 Release vector of vectors.
5861 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
5862
89a01fcf
EB
58632015-11-26 Eric Botcazou <ebotcazou@adacore.com>
5864
5865 PR c++/68527
5866 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
5867 (print_ada_struct_decl): Likewise.
5868
cc5c5226
IZ
58692015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
5870
5871 PR c++/68001
5872 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
5873 * cilk.c (recognize_spawn): Determine location in a more precise
5874 way.
5875
269adb9d
JM
58762015-11-19 Jason Merrill <jason@redhat.com>
5877
5878 * c-common.c (shorten_compare): But look through macros from
5879 system headers.
5880
d0eccfcd
JM
58812015-11-18 Jason Merrill <jason@redhat.com>
5882
5883 * c-common.c (shorten_compare): Don't -Wtype-limits if the
5884 non-constant operand comes from a macro.
5885
3e44547c
JM
58862015-11-17 Jason Merrill <jason@redhat.com>
5887
5888 PR bootstrap/68346
5889 * c-common.c (warn_tautological_cmp): Fold before checking for
5890 constants.
5891
0f62c7a0
MP
58922015-11-16 Marek Polacek <polacek@redhat.com>
5893
5894 PR c++/68362
5895 * c-common.c (check_case_bounds): Fold low and high cases.
5896
a868811e
MP
58972015-11-16 Marek Polacek <polacek@redhat.com>
5898
5899 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
5900 * c-common.c (c_common_get_alias_set): Likewise.
5901 (handle_visibility_attribute): Likewise.
5902
fff77217
KY
59032015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
5904
5905 * c-common.c (handle_simd_attribute): New.
5906 (struct attribute_spec): Add entry for "simd".
5907 (handle_simd_attribute): New.
5908
269e63b7
KT
59092015-11-13 Kai Tietz <ktietz70@googlemail.com>
5910
5911 * c-lex.c (interpret_float): Use fold_convert.
5912
ebedc9a3
DM
59132015-11-13 David Malcolm <dmalcolm@redhat.com>
5914
5915 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
5916 and store it on the result.
5917 * c-opts.c (c_common_init_options): Set
5918 global_dc->colorize_source_p.
5919
6e232ba4
JN
59202015-11-12 James Norris <jnorris@codesourcery.com>
5921 Joseph Myers <joseph@codesourcery.com>
5922
7365279f 5923 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
5924 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
5925 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
5926 PRAGMA_OACC_CLAUSE_LINK.
5927
e78bede6
MP
59282015-11-11 Marek Polacek <polacek@redhat.com>
5929
5930 PR c/68107
5931 PR c++/68266
5932 * c-common.c (valid_array_size_p): New function.
5933 * c-common.h (valid_array_size_p): Declare.
5934
3f8257db 59352015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
5936
5937 PR bootstrap/68271
5938 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
5939
69f293c9
AM
59402015-11-11 Andrew MacLeod <amacleod@redhat.com>
5941
5942 * array-notation-common.c: Remove unused header files.
5943 * c-ada-spec.c: Likewise.
5944 * c-cilkplus.c: Likewise.
5945 * c-common.c: Likewise.
5946 * c-cppbuiltin.c: Likewise.
5947 * c-dump.c: Likewise.
5948 * c-format.c: Likewise.
5949 * c-gimplify.c: Likewise.
5950 * c-indentation.c: Likewise.
5951 * c-lex.c: Likewise.
5952 * c-omp.c: Likewise.
5953 * c-opts.c: Likewise.
5954 * c-pch.c: Likewise.
5955 * c-ppoutput.c: Likewise.
5956 * c-pragma.c: Likewise.
5957 * c-pretty-print.c: Likewise.
5958 * c-semantics.c: Likewise.
5959 * c-ubsan.c: Likewise.
5960 * cilk.c: Likewise.
5961 * stub-objc.c: Likewise.
5962
3a40d81d
NS
59632015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5964 Cesar Philippidis <cesar@codesourcery.com>
5965 James Norris <jnorris@codesourcery.com>
5966 Julian Brown <julian@codesourcery.com>
5967 Nathan Sidwell <nathan@codesourcery.com>
5968
5969 * c-pragma.c (oacc_pragmas): Add "routine".
5970 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
5971
ee45a32d
EB
59722015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5973
5974 * c-common.c (c_common_attributes): Add scalar_storage_order.
5975 (handle_scalar_storage_order_attribute): New function.
5976 * c-pragma.c (global_sso): New variable.
5977 (maybe_apply_pragma_scalar_storage_order): New function.
5978 (handle_pragma_scalar_storage_order): Likewise.
5979 (init_pragma): Register scalar_storage_order.
5980 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
5981 * c.opt (Wscalar-storage-order): New warning.
5982 (fsso-struct=): New option.
5983
eb11eb15
MS
59842015-11-08 Martin Sebor <msebor@redhat.com>
5985
5986 * c.opt (Wplacement-new): Add a period to the end of a sentence.
5987
0aad0198
RS
59882015-11-07 Richard Sandiford <richard.sandiford@arm.com>
5989
5990 * c-common.c: Don't undef DEF_BUILTIN.
5991
8a645150
DM
59922015-11-06 David Malcolm <dmalcolm@redhat.com>
5993
5994 * c-common.c (c_cpp_error): Convert parameter from location_t to
5995 rich_location *. Eliminate the "column_override" parameter and
5996 the call to diagnostic_override_column.
5997 Update the "done_lexing" clause to set range 0
5998 on the rich_location, rather than overwriting a location_t.
5999 * c-common.h (c_cpp_error): Convert parameter from location_t to
6000 rich_location *. Eliminate the "column_override" parameter.
6001
7a5e4956
CP
60022015-11-05 Cesar Philippidis <cesar@codesourcery.com>
6003 Thomas Schwinge <thomas@codesourcery.com>
6004 James Norris <jnorris@codesourcery.com>
6005
6006 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
6007 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
6008 clauses with parallel and kernels and loops.
6009 * c-pragma.h (enum pragma_omp_clause): Add entries for
6010 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
6011 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
6012 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
6013 INDEPENDENT,SEQ}.
6014 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
6015
e2f5cc96
MS
60162015-11-05 Martin Sebor <msebor@redhat.com>
6017
6018 PR c++/67942
6019 * c.opt (-Wplacement-new): New option.
6020
e01d41e5
JJ
60212015-11-05 Jakub Jelinek <jakub@redhat.com>
6022
6023 * c-common.h (c_finish_omp_atomic): Add TEST argument.
6024 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
6025 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
6026 save_expr or create_tmp_var* if TEST is true.
6027 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
6028 Don't call add_stmt here.
6029 (struct c_omp_check_loop_iv_data): New type.
6030 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
6031 c_omp_check_loop_iv_exprs): New functions.
6032 (c_omp_split_clauses): Adjust for lastprivate being allowed on
6033 distribute.
6034 (c_omp_declare_simd_clauses_to_numbers): Change
6035 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
6036 (c_omp_declare_simd_clauses_to_decls): Similarly change those
6037 from numbers to PARM_DECLs.
6038
595278be
MM
60392015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
6040
6041 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
6042 flag_checking.
6043
3f8257db 60442015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
6045
6046 PR c++-common/67882
b3d5bc62
JJ
6047 * c-common.h (fold_offsetof_1): Add argument.
6048 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
6049 offsetof expressions that reference elements past the end of
6050 an array.
6051
4bf9e5a8
TS
60522015-11-03 Thomas Schwinge <thomas@codesourcery.com>
6053 Chung-Lin Tang <cltang@codesourcery.com>
6054
6055 * c-pragma.c (oacc_pragmas): Add "atomic".
6056 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
6057
3b1661a9
ES
60582015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
6059
6060 * c-common.c (handle_target_clones_attribute): New.
6061 (c_common_attribute_table): Add handle_target_clones_attribute.
6062 (handle_always_inline_attribute): Add check on target_clones attribute.
6063 (handle_target_attribute): Ditto.
6064
2adfab87
AM
60652015-10-29 Andrew MacLeod <amacleod@redhat.com>
6066
6067 * array-notation-common.c: Reorder #include's and remove duplicates.
6068 * c-ada-spec.c: Likewise.
6069 * c-cilkplus.c: Likewise.
6070 * c-common.c: Likewise.
6071 * c-cppbuiltin.c: Likewise.
6072 * c-dump.c: Likewise.
6073 * c-format.c: Likewise.
6074 * c-gimplify.c: Likewise.
6075 * c-indentation.c: Likewise.
6076 * c-lex.c: Likewise.
6077 * c-omp.c: Likewise.
6078 * c-opts.c: Likewise.
6079 * c-pch.c: Likewise.
6080 * c-ppoutput.c: Likewise.
6081 * c-pragma.c: Likewise.
6082 * c-pretty-print.c: Likewise.
6083 * c-semantics.c: Likewise.
6084 * c-ubsan.c: Likewise.
6085 * cilk.c: Likewise.
6086 * stub-objc.c: Likewise.
6087
d90ec4f2
JM
60882015-10-28 Jason Merrill <jason@redhat.com>
6089
6090 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
6091
88bae6f4
TS
60922015-10-27 Thomas Schwinge <thomas@codesourcery.com>
6093 James Norris <jnorris@codesourcery.com>
6094 Cesar Philippidis <cesar@codesourcery.com>
6095
6096 PR c/64765
6097 PR c/64880
6098 * c-common.h (c_oacc_split_loop_clauses): Declare function.
6099 * c-omp.c (c_oacc_split_loop_clauses): New function.
6100
b1726d6c
MS
61012015-10-21 Martin Sebor <msebor@redhat.com>
6102
6103 PR driver/68043
6104 * c.opt: End each sentence that describes an option with a period.
6105
fa60eeb9
MP
61062015-10-20 Marek Polacek <polacek@redhat.com>
6107
6108 * array-notation-common.c (is_cilkplus_vector_p): Define.
6109 * c-common.h (is_cilkplus_vector_p): Declare.
6110
95979049
MP
61112015-10-20 Marek Polacek <polacek@redhat.com>
6112
6113 * c.opt (std=gnu++11): Do not describe as experimental.
6114 (std=gnu++14): Likewise.
6115
2a9fb712
JM
61162015-10-19 Jason Merrill <jason@redhat.com>
6117
6118 * c-cppbuiltin.c (c_cpp_builtins): Define
6119 __cpp_nontype_template_args.
6120
13b380a3
JM
61212015-10-19 Jason Merrill <jason@redhat.com>
6122
6123 * c-cppbuiltin.c (c_cpp_builtins): Define
6124 __cpp_enumerator_attributes, __cpp_fold_expressions,
6125 __cpp_unicode_characters.
6126
d9a6bd32
JJ
61272015-10-13 Jakub Jelinek <jakub@redhat.com>
6128 Aldy Hernandez <aldyh@redhat.com>
6129
6130 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
6131 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
6132 (c_define_builtins): Likewise.
6133 * c-common.h (enum c_omp_clause_split): Add
6134 C_OMP_CLAUSE_SPLIT_TASKLOOP.
6135 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
6136 (c_finish_omp_for): Add ORIG_DECLV argument.
6137 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
6138 201511 instead of 201307.
6139 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
6140 OMP_CRITICAL_CLAUSES to it.
6141 (c_finish_omp_ordered): Add CLAUSES argument, set
6142 OMP_ORDERED_CLAUSES to it.
6143 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
6144 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
6145 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
6146 constructs and new OpenMP 4.5 clauses. Clear
6147 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
6148 verification code.
6149 * c-pragma.c (omp_pragmas_simd): Add taskloop.
6150 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
6151 (enum pragma_omp_clause): Add
6152 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
6153 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
6154
624d31fe
RS
61552015-10-05 Richard Sandiford <richard.sandiford@arm.com>
6156
6157 * c-lex.c (interpret_float): Use real_equal instead of
6158 REAL_VALUES_EQUAL.
6159
b8fd7909
JM
61602015-10-04 Jason Merrill <jason@redhat.com>
6161
6162 Implement N4514, C++ Extensions for Transactional Memory.
6163 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
6164 (c_common_attribute_table): Add transaction_safe_dynamic.
6165 transaction_safe now affects type identity.
6166 (handle_tm_attribute): Handle transaction_safe_dynamic.
6167 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
6168 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
6169 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
6170 (D_TRANSMEM): New.
6171 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
6172 * c-pretty-print.c (pp_c_attributes_display): Don't print
6173 transaction_safe in C++.
6174
12651878
MP
61752015-10-02 Marek Polacek <polacek@redhat.com>
6176
6177 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
6178
3e3b8d63
MP
61792015-10-02 Marek Polacek <polacek@redhat.com>
6180
6181 PR c/64249
6182 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
6183 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
6184 * c.opt (Wduplicated-cond): New option.
6185
0d1a8f75
JM
61862015-10-01 Joseph Myers <joseph@codesourcery.com>
6187
6188 * c.opt (std=c11): Do not describe as experimental.
6189 (std=gnu11): Likewise.
6190 (std=iso9899:2011): Likewise.
6191
3e32ee19
NS
61922015-09-28 Nathan Sidwell <nathan@codesourcery.com>
6193
6194 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
6195 (DEF_FUNCTION_TYPE_VAR_11): Delete.
6196
974348ee
MP
61972015-09-25 Marek Polacek <polacek@redhat.com>
6198
6199 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
6200 (ubsan_instrument_shift): Likewise.
6201
15dbc1a6
MP
62022015-09-25 Marek Polacek <polacek@redhat.com>
6203
6204 PR sanitizer/64906
6205 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
6206
6b95d7cc
PP
62072015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
6208
6209 * c-indentation.c (should_warn_for_misleading_indentation):
6210 Compare next_stmt_vis_column with guard_line_first_nws instead
6211 of with guard_line_vis_column.
6212
c1822f9c
MLI
62132015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
6214
6215 PR c/49654
6216 PR c/49655
6217 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
6218 options and options not valid for the current language.
6219
d5398058
PP
62202015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
6221
6222 * c-indentation.c (should_warn_for_misleading_indentation):
6223 Float out and consolidate the calls to get_visual_column that
6224 are passed guard_exploc as an argument. Compare
6225 next_stmt_vis_column with guard_line_first_nws instead of with
6226 body_line_first_nws.
6227
6b333269
NS
62282015-09-22 Nathan Sidwell <nathan@codesourcery.com>
6229
6230 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
6231 Wnamespaces): New C++ warnings.
6232
a75f1574
JM
62332015-09-22 Jason Merrill <jason@redhat.com>
6234
6235 * c-common.h (abi_compat_version_crosses): New.
6236 (warn_abi_version): Declare.
6237 * c-common.c: Define it.
6238 * c-opts.c (c_common_post_options): Handle it.
6239 flag_abi_compat_version defaults to 8.
6240
bdaaa8b7
VV
62412015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
6242
6243 Complete the implementation of N4230, Nested namespace definition.
6244 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
6245 __cpp_nested_namespace_definitions.
6246
eaa797e8
MLI
62472015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6248
6249 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
6250
c4914de6
MLI
62512015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6252
6253 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
6254 when warning.
6255 * c-pragma.h (pragma_lex): Add optional loc argument.
6256
fcb87c50
MM
62572015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
6258
6259 * c-format.c (check_format_arg): Adjust to use common block size in all
6260 object pools.
6261
31bdd08a
DM
62622015-09-15 David Malcolm <dmalcolm@redhat.com>
6263
6264 * c-format.c (location_from_offset): Update for change in
6265 signature of location_get_source_line.
6266 * c-indentation.c (get_visual_column): Likewise.
6267 (line_contains_hash_if): Likewise.
6268
aa9f4b4c
MP
62692015-09-14 Marek Polacek <polacek@redhat.com>
6270
6271 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
6272 setting various warnings.
6273
aa256c4a
MP
62742015-09-14 Marek Polacek <polacek@redhat.com>
6275
6276 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
6277 a negative value.
6278
0f876f22
MW
62792015-09-11 Mark Wielaard <mjw@redhat.com>
6280
6281 PR c/28901
6282 * c.opt (Wunused-variable): Option from common.opt.
6283 (Wunused-const-variable): New option.
6284
273aa49e
PC
62852015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
6286
6287 PR c++/53184
6288 * c.opt ([Wsubobject-linkage]): Add.
6289
1807ffc1
MS
62902015-09-03 Martin Sebor <msebor@redhat.com>
6291
6292 PR c/66516
6293 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
6294 functions.
6295 * c-common.c (reject_gcc_builtin): Define.
6296
38942840
BI
62972015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
6298
6299 PR middle-end/60586
6300 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
6301 prototype.
6302 * c-gimplify.c (c_gimplify_expr): Added a call to the function
6303 cilk_gimplify_call_params_in_spawned_fn.
6304 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
6305 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
6306 unwrapping.
6307
c316b5e4
MP
63082015-08-25 Marek Polacek <polacek@redhat.com>
6309
6310 PR middle-end/67330
6311 * c-common.c (handle_weak_attribute): Don't check whether the
6312 visibility can be changed here.
6313
584a7c46
MLI
63142015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
6315
6316 * c-lex.c (c_lex_with_flags): Use explicit locations.
6317
a79683d5
TS
63182015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
6319
6320 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
6321 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
6322
61717a45
FXC
63232015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
6324
6325 PR middle-end/36757
6326 * c-common.c (check_builtin_function_arguments): Add check
6327 for BUILT_IN_SIGNBIT argument.
6328
329524f5
PC
63292015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
6330
6331 PR c++/67160
6332 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
6333 in c++1z mode.
6334
4ee55665
MP
63352015-08-17 Marek Polacek <polacek@redhat.com>
6336
6337 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
6338 with whitespaces before qualifier names.
6339
b893e375
MP
63402015-08-12 Marek Polacek <polacek@redhat.com>
6341
6342 PR c++/55095
6343 * c-common.c (maybe_warn_shift_overflow): Properly handle
6344 left-shifting 1 into the sign bit.
6345
c2d89095
MLI
63462015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6347
6348 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
6349
971e17ff
AS
63502015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
6351 Braden Obrzut <admin@maniacsvault.net>
6352 Jason Merrill <jason@redhat.com>
6353
6354 Add C++ Concepts TS support.
6355 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
6356 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
6357 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
6358 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
6359 * c-opts.c (set_std_cxx1z): Set flag_concepts.
6360 * c.opt (fconcepts): New.
6361
b3d5bc62
JJ
63622015-08-02 Martin Sebor <msebor@redhat.com>
6363
6364 * c.opt (-Wframe-address): New warning option.
6365
8ebca419
PP
63662015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6367
6368 * c-indentation.c (should_warn_for_misleading_indentation):
6369 Improve heuristics.
6370
1a1e101f
PP
63712015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6372
6373 * c-indentation.c (get_visual_column): Add parameter first_nws,
6374 use it. Update comment documenting the function.
6375 (is_first_nonwhitespace_on_line): Remove.
6376 (should_warn_for_misleading_indentation): Replace usage of
6377 of is_first_nonwhitespace_on_line with get_visual_column.
6378
992118a1
PP
63792015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6380
6381 * c-indentation.h (struct token_indent_info): Define.
6382 (get_token_indent_info): Define.
6383 (warn_for_misleading_information): Declare.
6384 * c-common.h (warn_for_misleading_information): Remove.
6385 * c-identation.c (warn_for_misleading_indentation):
6386 Change declaration to take three token_indent_infos. Adjust
6387 accordingly.
6388 * c-identation.c (should_warn_for_misleading_indentation):
6389 Likewise. Bail out early if the body is a compound statement.
6390 (guard_tinfo_to_string): Define.
6391
e8fa3817
JM
63922015-07-30 Jason Merrill <jason@redhat.com>
6393
6394 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
6395 '*' for reference decay.
6396
173864e8
MP
63972015-07-30 Marek Polacek <polacek@redhat.com>
6398
6399 * c-common.c (warn_tautological_cmp): Bail for float types.
6400
f2afe6dd
MP
64012015-07-27 Marek Polacek <polacek@redhat.com>
6402
6403 PR bootstrap/67030
6404 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
6405
05b28fd6
MP
64062015-07-27 Marek Polacek <polacek@redhat.com>
6407
6408 PR c++/66555
6409 PR c/54979
6410 * c-common.c (find_array_ref_with_const_idx_r): New function.
6411 (warn_tautological_cmp): New function.
6412 * c-common.h (warn_tautological_cmp): Declare.
6413 * c.opt (Wtautological-compare): New option.
6414
5a5062b8
MP
64152015-07-23 Marek Polacek <polacek@redhat.com>
6416
6417 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
6418 (ubsan_instrument_shift): Likewise.
6419
dc891fe7
MP
64202015-07-23 Marek Polacek <polacek@redhat.com>
6421
6422 PR sanitizer/66908
6423 * c-ubsan.c: Include gimplify.h.
6424 (ubsan_instrument_division): Unshare OP0 and OP1.
6425 (ubsan_instrument_shift): Likewise.
6426
451b5e48
MP
64272015-07-20 Marek Polacek <polacek@redhat.com>
6428 Richard Sandiford <richard.sandiford@arm.com>
6429
6430 PR c++/55095
6431 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
6432 Use EXPR_LOC_OR_LOC.
6433 (maybe_warn_shift_overflow): New function.
6434 * c-common.h (maybe_warn_shift_overflow): Declare.
6435 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
6436 * c.opt (Wshift-overflow): New option.
6437
fb0b2914
ML
64382015-07-16 Martin Liska <mliska@suse.cz>
6439
6440 * c-format.c (static void check_format_info_main): Use
6441 object_allocator instead of pool_allocator.
6442 (check_format_arg): Likewise.
6443 (check_format_info_main): Likewise.
6444
903f5c23
AM
64452015-07-15 Andrew MacLeod <amacleod@redhat.com>
6446
6447 * c-opts.c: Remove multiline #include comment.
6448
026c3cfd
AH
64492015-07-12 Aldy Hernandez <aldyh@redhat.com>
6450
6451 * c-common.c: Fix double word typos.
6452
bb49ee66
EB
64532015-07-10 Eric Botcazou <ebotcazou@adacore.com>
6454
6455 * c-ada-spec.h (cpp_operation): Revert latest change.
6456 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
6457 constructors and destructors.
6458
1916bcb5
AM
64592015-07-09 Andrew MacLeod <amacleod@redhat.com>
6460
6461 * c-common.h: Adjust includes for flags.h changes.
6462 * stub-objc.c: Likewise.
026c3cfd 6463
a9dcd529
EB
64642015-07-08 Eric Botcazou <ebotcazou@adacore.com>
6465
6466 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
6467 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
6468
b03b462f
JJ
64692015-07-08 Jakub Jelinek <jakub@redhat.com>
6470
6471 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
6472 are to be removed, return NULL rather than original clauses list.
6473
c7131fb2
AM
64742015-07-07 Andrew MacLeod <amacleod@redhat.com>
6475
6476 * array-notation-common.c: Adjust includes.
6477 * c-ada-spec.c: Likewise.
6478 * c-cilkplus.c: Likewise.
6479 * c-common.h: Likewise.
6480 * c-cppbuiltin.c: Likewise.
6481 * c-dump.c: Likewise.
6482 * c-format.c: Likewise.
6483 * c-gimplify.c: Likewise.
6484 * c-indentation.c: Likewise.
6485 * c-lex.c: Likewise.
6486 * c-omp.c: Likewise.
6487 * c-opts.c: Likewise.
6488 * c-pch.c: Likewise.
6489 * c-ppoutput.c: Likewise.
6490 * c-pragma.c: Likewise.
6491 * c-pretty-print.c: Likewise.
6492 * c-semantics.c: Likewise.
6493 * c-ubsan.c: Likewise.
6494 * cilk.c: Likewise.
6495 * stub-objc.c: Likewise.
6496
2a7fb83f
EB
64972015-07-07 Eric Botcazou <ebotcazou@adacore.com>
6498
6499 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
6500 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
6501
a03c9bf1
JM
65022015-07-01 Jason Merrill <jason@redhat.com>
6503
36a85135
JM
6504 * c-common.h (D_CXX11): Rename from D_CXX0X.
6505 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
6506 * c-common.c: Adjust.
6507
e7fa68d5
JM
6508 * c-opts.c (c_common_post_options): Default to C++14.
6509
a03c9bf1
JM
6510 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
6511
fe95b036
ESR
65122015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
6513
6514 Implement N4197 - Adding u8 character literals
b3d5bc62 6515 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 6516 CPP_CHAR.
b3d5bc62 6517 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 6518 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 6519 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
6520 and CPP_UTF8CHAR tokens.
6521 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 6522
da2e71c9
MLI
65232015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6524
6525 PR fortran/66605
6526 * c-common.c (do_warn_unused_parameter): Move here.
6527 * c-common.h (do_warn_unused_parameter): Declare.
6528
b155cfd9
MP
65292015-06-29 Marek Polacek <polacek@redhat.com>
6530
6531 PR c/66322
6532 * c-common.c (check_case_bounds): Add bool * parameter. Set
6533 OUTSIDE_RANGE_P.
6534 (c_add_case_label): Add bool * parameter. Pass it down to
6535 check_case_bounds.
6536 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
6537 warning here.
6538 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
6539 declarations.
6540
31521951
MP
65412015-06-27 Marek Polacek <polacek@redhat.com>
6542
6543 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
6544 or VECTOR_INTEGER_TYPE_P throughout.
6545 * c-gimplify.c: Likewise.
6546
22d03525
MP
65472015-06-26 Marek Polacek <polacek@redhat.com>
6548
6549 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
6550 * c-common.c (c_fully_fold_internal): Likewise.
6551 (c_alignof_expr): Likewise.
6552 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
6553 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 6554 * cilk.c (create_parm_list): Likewise.
22d03525 6555
af05e6e5
MP
65562015-06-26 Marek Polacek <polacek@redhat.com>
6557
6558 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
6559
f0889939
AM
65602015-06-25 Andrew MacLeod <amacleod@redhat.com>
6561
6562 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
6563 * c-gimplify.c: Likewise.
6564 * c-pragma.c: Likewise.
6565 * c-ubsan.c: Likewise.
6566 * cilk.c: Likewise.
6567
ca752f39
RS
65682015-06-25 Richard Sandiford <richard.sandiford@arm.com>
6569
6570 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
6571 ggc_hasher.
6572
16a16ec7
AM
65732015-06-25 Andrew MacLeod <amacleod@redhat.com>
6574
6575 * cilk.c: Move calls.h after tm.h in the include chain.
6576
0ae9bd27
MP
65772015-06-25 Marek Polacek <polacek@redhat.com>
6578
6579 * array-notation-common.c: Use VAR_P throughout.
6580 * c-ada-spec.c: Likewise.
6581 * c-common.c: Likewise.
6582 * c-format.c: Likewise.
6583 * c-gimplify.c: Likewise.
6584 * c-omp.c: Likewise.
6585 * c-pragma.c: Likewise.
6586 * c-pretty-print.c: Likewise.
6587 * cilk.c: Likewise.
6588
62f9079a
MP
65892015-06-25 Marek Polacek <polacek@redhat.com>
6590
6591 * cilk.c (extract_free_variables): Use is_global_var.
6592
0fa16060
RS
65932015-06-23 Richard Sandiford <richard.sandiford@arm.com>
6594
6595 * c-common.c: Don't include target-def.h.
6596
a68ae2e1
MP
65972015-06-23 Marek Polacek <polacek@redhat.com>
6598
6599 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
6600 when comparing INTEGER_CSTs.
6601
c6a2f2d9
PMR
66022015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
6603
6604 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
6605 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
6606 (dump_ada_template): Skip partially specialized types.
6607
6b4db501
MM
66082015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
6609
6610 * c-common.c (scalar_to_vector): Use std::swap instead of manually
6611 swapping.
6612
abb226c9
AM
66132015-06-17 Andrew MacLeod <amacleod@redhat.com>
6614
6615 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
6616 * c-ada-spec.c: Likewise.
6617 * c-cilkplus.c: Likewise.
6618 * c-common.c: Likewise.
6619 * c-common.h: Likewise.
6620 * c-cppbuiltin.c: Likewise.
6621 * c-dump.c: Likewise.
6622 * c-format.c: Likewise.
6623 * c-gimplify.c: Likewise.
6624 * c-indentation.c: Likewise.
6625 * c-lex.c: Likewise.
6626 * c-omp.c: Likewise.
6627 * c-opts.c: Likewise.
6628 * c-pch.c: Likewise.
6629 * c-ppoutput.c: Likewise.
6630 * c-pragma.c: Likewise.
6631 * c-pretty-print.c: Likewise.
6632 * c-semantics.c: Likewise.
6633 * c-ubsan.c: Likewise.
6634 * cilk.c: Likewise.
6635 * stub-objc.c: Likewise.
6636
076fecad
PP
66372015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
6638
6639 PR c++/65168
6640 * c-common.c (c_common_truthvalue_conversion): Warn when
6641 converting an address of a reference to a truth value.
6642
13fdf2e2
AM
66432015-06-08 Andrew MacLeod <amacleod@redhat.com>
6644
6645 * array-notation-common.c : Adjust include files.
6646 * c-ada-spec.c : Likewise.
6647 * c-cilkplus.c : Likewise.
6648 * c-common.c : Likewise.
6649 * c-common.h : Likewise.
6650 * c-cppbuiltin.c : Likewise.
6651 * c-dump.c : Likewise.
6652 * c-format.c : Likewise.
6653 * c-gimplify.c : Likewise.
6654 * c-indentation.c : Likewise.
6655 * c-lex.c : Likewise.
6656 * c-omp.c : Likewise.
6657 * c-opts.c : Likewise.
6658 * c-pch.c : Likewise.
6659 * c-ppoutput.c : Likewise.
6660 * c-pragma.c : Likewise.
6661 * c-pretty-print.c : Likewise.
6662 * c-semantics.c : Likewise.
6663 * c-ubsan.c : Likewise.
6664 * cilk.c : Likewise.
6665 * stub-objc.c : Likewise.
6666
a1661b90
MP
66672015-06-08 Marek Polacek <polacek@redhat.com>
6668
6669 PR c/66415
6670 * c-format.c (location_from_offset): Return LOC if LINE is null.
6671
d7438551
AH
66722015-06-05 Aldy Hernandez <aldyh@redhat.com>
6673
6674 * c-common.h (c_parse_final_cleanups): New prototype.
6675 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
6676
b3d5bc62
JJ
66772015-06-04 Sriraman Tallam <tmsriram@google.com>
6678
6679 * c-common.c (noplt): New attribute.
6680 (handle_noplt_attribute): New handler.
6681
ecb9f223
AM
66822015-06-04 Andrew MacLeod <amacleod@redhat.com>
6683
6684 * array-notation-common.c: Adjust includes for restructured coretypes.h.
6685 * c-ada-spec.c: Likewise.
6686 * c-cilkplus.c: Likewise.
6687 * c-common.c: Likewise.
6688 * c-common.h: Likewise.
6689 * c-cppbuiltin.c: Likewise.
6690 * c-dump.c: Likewise.
6691 * c-format.c: Likewise.
6692 * c-gimplify.c: Likewise.
6693 * c-indentation.c: Likewise.
6694 * c-lex.c: Likewise.
6695 * c-omp.c: Likewise.
6696 * c-opts.c: Likewise.
6697 * c-pch.c: Likewise.
6698 * c-ppoutput.c: Likewise.
6699 * c-pragma.c: Likewise.
6700 * c-pretty-print.c: Likewise.
6701 * c-semantics.c: Likewise.
6702 * c-ubsan.c: Likewise.
6703 * cilk.c: Likewise.
6704 * stub-objc.c: Likewise.
6705
6ac48155
DM
67062015-06-02 David Malcolm <dmalcolm@redhat.com>
6707
6708 PR c/66220:
6709 * c-indentation.c (should_warn_for_misleading_indentation): Use
6710 expand_location rather than expand_location_to_spelling_point.
6711 Don't warn if the guarding statement is more indented than the
6712 next/body stmts.
6713
773ce42e
DM
67142015-06-02 David Malcolm <dmalcolm@redhat.com>
6715
6716 * c-indentation.c (warn_for_misleading_indentation): Bail out
6717 immediately if -Wmisleading-indentation isn't enabled.
6718
4fef8379
ML
67192015-06-01 Martin Liska <mliska@suse.cz>
6720
6721 * c-format.c (check_format_arg):Use new type-based pool allocator.
6722 (check_format_info_main) Likewise.
6723
1edfb384
EB
67242015-05-31 Eric Botcazou <ebotcazou@adacore.com>
6725
6726 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
6727 (has_nontrivial_methods): Likewise.
6728
9677ef52
MP
67292015-05-25 Marek Polacek <polacek@redhat.com>
6730
6731 * c-ubsan.c (ubsan_instrument_shift): Use type0.
6732
fd5c817a
MP
67332015-05-22 Marek Polacek <polacek@redhat.com>
6734
6735 PR c/47043
6736 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
6737
a2f45fe6 67382015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
6739
6740 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
6741 STACK_GROWS_DOWNWARD.
6742
a2f45fe6 67432015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
6744
6745 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
6746 STACK_GROWS_DOWNWARD rather than if it is defined.
6747
0fee2ac2 67482015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 6749
0fee2ac2
MLI
6750 PR c/52952
6751 * c-format.c (location_column_from_byte_offset): New.
6752 (location_from_offset): New.
6753 (struct format_wanted_type): Add offset_loc field.
6754 (check_format_info): Move handling of location for extra arguments
6755 closer to the point of warning.
6756 (check_format_info_main): Pass the result of location_from_offset
6757 to warning_at.
6758 (format_type_warning): Pass the result of location_from_offset
6759 to warning_at.
6760
cf4ef6f7
MP
67612015-05-20 Marek Polacek <polacek@redhat.com>
6762
6763 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
6764
3a65ee74
MP
67652015-05-20 Marek Polacek <polacek@redhat.com>
6766
6767 * c-ada-spec.c (dump_sloc): Use DECL_P.
6768
21b634ae
MP
67692015-05-20 Marek Polacek <polacek@redhat.com>
6770
6771 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
6772 * c-common.c: Likewise.
6773
0e50b624
DM
67742015-05-19 David Malcolm <dmalcolm@redhat.com>
6775
6776 * c-common.h (fe_file_change): Strengthen param from
6777 const line_map * to const line_map_ordinary *.
6778 (pp_file_change): Likewise.
6779 * c-lex.c (fe_file_change): Likewise.
6780 (cb_define): Use linemap_check_ordinary when invoking
6781 SOURCE_LINE.
6782 (cb_undef): Likewise.
6783 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
6784 invoking cb_file_change.
6785 (c_finish_options): Likewise.
6786 (push_command_line_include): Likewise.
6787 (cb_file_change): Strengthen param "new_map" from
6788 const line_map * to const line_map_ordinary *.
6789 * c-ppoutput.c (cb_define): Likewise for local "map".
6790 (pp_file_change): Likewise for param "map" and local "from".
6791
fab27f52
MM
67922015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
6793
6794 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
6795
2fe1d762
TV
67962015-05-18 Tom de Vries <tom@codesourcery.com>
6797
6798 * c-common.c (build_va_arg_1): New function.
6799 (build_va_arg): Add address operator to va_list operand if necessary.
6800
7a37fa90
MM
68012015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
6802
6803 PR c/48956
6804 * c-common.c (int_safely_convertible_to_real_p): Define.
6805 (unsafe_conversion_p): Check conversions involving complex types.
6806 (conversion_warning): Add new warning message for conversions which
6807 discard imaginary component.
6808 * c-common.h: (enum conversion_safety): Add new enumerator for such
6809 conversions.
6810
3aa3c9fc
MP
68112015-05-14 Marek Polacek <polacek@redhat.com>
6812
6813 PR c/66066
6814 PR c/66127
6815 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
6816 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
6817 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
6818 use it. If FOR_INT_CONST, require that all evaluated operands be
6819 INTEGER_CSTs.
6820
c3388e62
DM
68212015-05-12 David Malcolm <dmalcolm@redhat.com>
6822
6823 * c-common.h (warn_for_misleading_indentation): New prototype.
6824 * c-indentation.c: New file.
6825 * c.opt (Wmisleading-indentation): New option.
6826
c7b38fd5
TV
68272015-05-12 Tom de Vries <tom@codesourcery.com>
6828
6829 PR tree-optimization/66010
6830 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
6831
381bf11e
JM
68322015-05-09 Jason Merrill <jason@redhat.com>
6833
edff0c06
JM
6834 * c-opts.c (c_common_post_options): Also clear
6835 cpp_opts->cpp_warn_cxx11_compat.
6836
129211bc
JM
6837 * c-common.h (enum cxx_dialect): Add cxx_unset.
6838 * c-common.c (cxx_dialect): Initialize to cxx_unset.
6839 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
6840
381bf11e
JM
6841 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
6842 (std=gnu++0x): Mark as Undocumented.
6843 (std=gnu++1y): Add deprecated message.
6844
fe191308
JM
68452015-05-08 Jason Merrill <jason@redhat.com>
6846
765189ff
JM
6847 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
6848 * c-opts.c: Adjust.
6849
fe191308
JM
6850 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
6851
755e528f
MP
68522015-05-08 Marek Polacek <polacek@redhat.com>
6853
6854 PR c/64918
6855 * c.opt (Woverride-init-side-effects): New option.
6856
0173bd2a
MP
68572015-05-07 Marek Polacek <polacek@redhat.com>
6858
6859 PR c/65179
6860 * c-common.c (c_fully_fold_internal): Warn when left shifting a
6861 negative value.
6862 * c.opt (Wshift-negative-value): New option.
6863 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
6864 when -Wextra and C99/C++11 mode.
6865
e0f0d3b9
MP
68662015-05-07 Marek Polacek <polacek@redhat.com>
6867 Martin Uecker <uecker@eecs.berkeley.edu>
6868
6869 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
6870 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
6871
8243e2a9
JM
68722015-05-05 Jason Merrill <jason@redhat.com>
6873
6874 * c.opt (Wterminate): New.
6875
577cd070
MP
68762015-04-30 Marek Polacek <polacek@redhat.com>
6877
6878 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
6879 require that the non-constant be of a boolean type.
6880
0373796b
JT
68812015-04-29 Josh Triplett <josh@joshtriplett.org>
6882
e0f0d3b9
MP
6883 * c-common.c (handle_section_attribute): Refactor to reduce
6884 nesting and distinguish between error cases.
0373796b 6885
716c0ba6
MP
68862015-04-29 Marek Polacek <polacek@redhat.com>
6887
6888 PR c/64610
6889 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
6890 with 0/1.
6891
8848828b
JJ
68922015-04-29 Jakub Jelinek <jakub@redhat.com>
6893
6894 * c-common.h (omp_clause_mask): Unconditionally define as a class.
6895 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
6896 HOST_BITS_PER_WIDE_INT.
6897
ecd0e562
TV
68982015-04-28 Tom de Vries <tom@codesourcery.com>
6899
6900 PR tree-optimization/65887
6901 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
6902
2a877204 69032015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 6904 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
6905
6906 * c-ada-spec.c (in_function): Delete.
6907 (dump_generic_ada_node): Do not change in_function and remove the
6908 redundant code dealing with it.
6909 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
6910 (print_ada_methods): Output the static member functions in a nested
6911 package after the regular methods as well as associated renamings.
6912
4853031e
MP
69132015-04-24 Marek Polacek <polacek@redhat.com>
6914
6915 PR c/65830
6916 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
6917 and OPT_Wshift_count_overflow.
6918
8c2b7f79
MP
6919 PR c/63357
6920 * c-common.c (warn_logical_operator): Warn if the operands have the
6921 same expressions.
6922
b8787813
MP
69232015-04-24 Marek Polacek <polacek@redhat.com>
6924
6925 PR c/61534
6926 * c-common.c (warn_logical_operator): Bail if either operand comes
6927 from a macro expansion.
6928
8fba1830
BRF
69292015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
6930
6931 PR target/55143
6932 * c-common.c (c_default_pointer_mode): Add definition.
6933 * c-common.h (c_default_pointer_mode): Add declaration.
6934
17958621
JJ
69352015-03-11 Jakub Jelinek <jakub@redhat.com>
6936
6937 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
6938 on record_builtin_type argument.
6939
7ccb1a11
JJ
69402015-03-10 Jakub Jelinek <jakub@redhat.com>
6941
6942 PR c/65120
6943 * c-common.c (warn_logical_not_parentheses): Don't warn for
6944 !x == 0 or !x != 0.
6945
04fd785e
MP
69462015-03-07 Marek Polacek <polacek@redhat.com>
6947
6948 PR sanitizer/65280
6949 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
6950 before trying to figure out whether we have a flexible array member.
6951
a4e26206 69522015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 6953 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
6954
6955 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
6956
0d2489f4
EB
69572015-03-05 Eric Botcazou <ebotcazou@adacore.com>
6958
6959 PR ada/65319
6960 * c-ada-spec.c (print_destructor): Remove obsolete code.
6961
83ed54d7
EB
69622015-03-01 Eric Botcazou <ebotcazou@adacore.com>
6963
6964 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
6965 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
6966 DECL_TEMPLATE_RESULT emulations.
6967 (dump_ada_template)): Add guard for TYPE_METHODS.
6968
7631f0e2
MP
69692015-02-27 Marek Polacek <polacek@redhat.com>
6970
6971 PR c/65040
6972 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
6973
d1783ae5
KT
69742015-02-27 Kai Tietz <ktietz@redhat.com>
6975
6976 PR c/35330
6977 * c-pragma.c (handle_pragma_weak): Do not try to create
6978 weak/alias of declarations not being function, or variable
6979 declarations.
6980
56a9f6bc
TS
69812015-02-24 Thomas Schwinge <thomas@codesourcery.com>
6982
6983 PR libgomp/64625
6984 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
6985 Remove macros.
6986 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
6987
3d5cb23d
MP
69882015-02-16 Marek Polacek <polacek@redhat.com>
6989
6990 PR c/65066
6991 * c-format.c (check_format_types): Handle null param.
6992
fa008882
MP
69932015-02-13 Marek Polacek <polacek@redhat.com>
6994
6995 PR c/65040
6996 * c-format.c (check_format_types): Don't warn about different
6997 signedness if the original value is in the range of WANTED_TYPE.
6998
785f21af
JM
69992015-02-12 Jason Merrill <jason@redhat.com>
7000
7001 PR c++/64956
7002 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
7003 to the current highest version.
7004 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
7005
4886ec8e
JJ
70062015-02-04 Jakub Jelinek <jakub@redhat.com>
7007
7008 PR c/64824
7009 PR c/64868
7010 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
7011 instead of RDIV_EXPR. Use build_binary_op instead of
7012 build2_loc.
7013
40fecdd6
JM
70142015-01-30 Joseph Myers <joseph@codesourcery.com>
7015
7016 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
7017 to pass input_location as first argument.
7018
a0c88d06
TV
70192015-01-23 Tom de Vries <tom@codesourcery.com>
7020
7021 PR libgomp/64672
7022 * c.opt (fopenacc): Mark as LTO option.
7023
1506ae0e
TV
70242015-01-23 Tom de Vries <tom@codesourcery.com>
7025
7026 PR libgomp/64707
7027 * c.opt (fopenmp): Mark as LTO option.
7028
31be63ab
JJ
70292015-01-21 Jakub Jelinek <jakub@redhat.com>
7030
7031 PR c/63307
b1726d6c 7032 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
7033 (compare_decls): Fix up formatting.
7034
70352015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
7036
7037 PR c/63307
7038 * cilk.c: Include vec.h.
7039 (struct cilk_decls): New structure.
7040 (wrapper_parm_cb): Split this function to...
7041 (fill_decls_vec): ...this...
7042 (create_parm_list): ...and this.
7043 (compare_decls): New function.
7044 (for_local_cb): Remove.
7045 (wrapper_local_cb): Ditto.
7046 (build_wrapper_type): For now first traverse and fill vector of
7047 declarations then sort it and then deal with sorted vector.
7048 (cilk_outline): Ditto.
7049 (declare_one_free_variable): Ditto.
7050
6875457f
JM
70512015-01-21 Jason Merrill <jason@redhat.com>
7052
7053 PR c++/64629
7054 * c-format.c (check_format_arg): Call decl_constant_value.
7055
185c9e56
ML
70562015-01-19 Martin Liska <mliska@suse.cz>
7057
7058 * c-common.c (handle_noicf_attribute): New function.
7059
41dbbb37
TS
70602015-01-15 Thomas Schwinge <thomas@codesourcery.com>
7061 Bernd Schmidt <bernds@codesourcery.com>
7062 James Norris <jnorris@codesourcery.com>
7063 Cesar Philippidis <cesar@codesourcery.com>
7064 Ilmir Usmanov <i.usmanov@samsung.com>
7065 Jakub Jelinek <jakub@redhat.com>
7066
7067 * c.opt (fopenacc): New option.
7068 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
7069 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
7070 New macros.
7071 * c-common.h (c_finish_oacc_wait): New prototype.
7072 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
7073 (c_finish_oacc_wait): New function.
7074 * c-pragma.c (oacc_pragmas): New variable.
7075 (c_pp_lookup_pragma, init_pragma): Handle it.
7076 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
7077 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
7078 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
7079 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
7080 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
7081 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
7082 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
7083 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
7084 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
7085 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
7086 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
7087 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
7088 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
7089 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
7090 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
7091 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
7092 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
7093 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
7094 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
7095 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
7096 PRAGMA_OACC_CLAUSE_WORKER.
7097
3f8257db 70982015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
7099
7100 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
7101 for the new option fstack-protector_explicit.
7102 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
7103 (handle_stack_protect_attribute): New function.
7104
3f8257db 71052015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
7106
7107 * c.opt: New option -Warray-bounds=.
7108
adfac8df
JJ
71092015-01-09 Michael Collison <michael.collison@linaro.org>
7110
7111 * array-notation-common.c: Include hash-set.h, machmode.h,
7112 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7113 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
7114 * c-ada-spec.c: Ditto.
7115 * c-cilkplus.c: Ditto.
7116 * c-common.c: Include input.h due to flattening of tree.h.
7117 Define macro GCC_C_COMMON_C.
7118 * c-common.h: Flatten tree.h header files into c-common.h.
7119 Remove include of tree-core.h.
7120 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
7121 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7122 fold-const.h, wide-int.h, and inchash.h due to
7123 flattening of tree.h.
7124 * c-dump.c: Ditto.
7125 * c-format.c: Flatten tree.h header files into c-common.h.
7126 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
7127 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7128 fold-const.h, wide-int.h, and inchash.h due to
7129 flattening of tree.h.
7130 * c-dump.c: Include hash-set.h, machmode.h,
7131 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7132 fold-const.h, wide-int.h, and inchash.h due to
7133 flattening of tree.h.
7134 * c-format.c: Include hash-set.h, machmode.h,
7135 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7136 fold-const.h, wide-int.h, inchash.h and real.h due to
7137 flattening of tree.h.
7138 * c-gimplify.c: Include hash-set.h, machmode.h,
7139 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7140 fold-const.h, wide-int.h, and inchash.h due to
7141 flattening of tree.h.
7142 * cilk.c: Ditto.
7143 * c-lex.c: Ditto.
7144 * c-omp.c: Ditto.
7145 * c-opts.c: Ditto.
7146 * c-pch.c: Ditto.
7147 * c-ppoutput.c: Ditto.
7148 * c-pragma.c: Ditto.
7149 * c-pretty-print.c: Ditto.
7150 * c-semantics.c: Ditto.
7151 * c-ubsan.c: Ditto.
7152 * stub-objc.c: Ditto.
7153
f5481fc4
JM
71542015-01-08 Jason Merrill <jason@redhat.com>
7155
7156 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
7157 do_ubsan_in_current_function.
7158 (ubsan_maybe_instrument_reference_or_call): Likewise.
7159 * c-ubsan.h: Declare it.
7160
de35aa66
MS
71612015-01-08 Mike Stump <mikestump@comcast.net>
7162
7163 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
7164
4a9a42ab
MP
71652015-01-07 Marek Polacek <polacek@redhat.com>
7166
7167 PR c/64440
7168 * c-common.c (c_fully_fold_internal): Warn for division and modulo
7169 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
7170
2f42e5de
TS
71712015-01-05 Trevor Saunders <tsaunders@mozilla.com>
7172
7173 PR c++/31397
7174 * c.opt (Wsuggest-override): New option.
7175
5624e564
JJ
71762015-01-05 Jakub Jelinek <jakub@redhat.com>
7177
7178 Update copyright years.
7179
5bd012f8
MP
71802015-01-05 Marek Polacek <polacek@redhat.com>
7181
7182 PR c/64423
7183 * c-common.c (warn_array_subscript_with_type_char): Add location_t
7184 parameter. Use it.
7185 * c-common.h (warn_array_subscript_with_type_char): Update
7186 declaration.
7187
a7fa8d18
ESR
71882014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
7189
7190 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
7191 Control macro with flag_sized_deallocation.
7192
3f8257db 71932014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
7194
7195 * c.opt (Wdiscarded-array-qualifiers): New option.
7196
1f8d3e84
JJ
71972014-12-19 Jakub Jelinek <jakub@redhat.com>
7198
7199 PR preprocessor/63831
7200 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
7201 and __has_cpp_attribute here.
7202 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
7203 c_common_has_attribute.
7204 * c-common.h (c_common_has_attribute): New prototype.
7205 * c-lex.c (init_c_lex): Set cb->has_attribute to
7206 c_common_has_attribute instead of cb_has_attribute.
7207 (get_token_no_padding): New function.
7208 (cb_has_attribute): Renamed to ...
7209 (c_common_has_attribute): ... this. No longer static. Use
7210 get_token_no_padding, require ()s, don't build TREE_LIST
7211 unnecessarily, fix up formatting, adjust diagnostics, call
7212 init_attributes.
7213
20b06add
JM
72142014-12-15 Jason Merrill <jason@redhat.com>
7215
7216 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
7217 (-Wsized-deallocation): New.
7218 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
7219 to on in C++14 and up.
7220
94a073b2
JM
72212014-12-11 Jason Merrill <jason@redhat.com>
7222
acaa5911
JM
7223 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
7224
94a073b2
JM
7225 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
7226 we aren't complaining about VLAs.
7227
7fb66c15
MP
72282014-12-06 Marek Polacek <polacek@redhat.com>
7229
7230 PR tree-optimization/64183
7231 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
7232 shift-expression if it is integer_type_node. Use types_compatible_p.
7233
b731b390
JJ
72342014-11-29 Jakub Jelinek <jakub@redhat.com>
7235
7236 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
7237 last argument from create_tmp_var_raw and create_tmp_var calls.
7238 * cilk.c (gimplify_cilk_spawn): Likewise.
7239 * c-omp.c (c_finish_omp_atomic): Likewise.
7240
6a4da643
MP
72412014-11-28 Marek Polacek <polacek@redhat.com>
7242
7243 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
7244 instead of unsigned_type_node.
7245
541e35a6
MP
72462014-11-28 Marek Polacek <polacek@redhat.com>
7247
7248 PR c/63862
7249 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
7250 to op1_utype.
7251 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
7252 expression to unsigned_type_node.
7253
dcc97066
MW
72542014-11-20 Mark Wielaard <mjw@redhat.com>
7255
7256 PR debug/38757
7257 * c-opts.c (set_std_c89): Set lang_hooks.name.
7258 (set_std_c99): Likewise.
7259 (set_std_c11): Likewise.
7260 (set_std_cxx98): Likewise.
7261 (set_std_cxx11): Likewise.
7262 (set_std_cxx14): Likewise.
7263 (set_std_cxx1z): Likewise.
7264
aa7da51a
JJ
72652014-11-21 Jakub Jelinek <jakub@redhat.com>
7266
7267 PR target/63764
7268 * c-common.h (convert_vector_to_pointer_for_subscript): Change
7269 return type to bool.
009a3480 7270 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
7271 (convert_vector_to_pointer_for_subscript): Change return type to
7272 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
7273 and copy it into a TARGET_EXPR and use that instead of *vecp
7274 directly.
7275
538dd0b7
DM
72762014-11-19 David Malcolm <dmalcolm@redhat.com>
7277
7278 Merger of git branch "gimple-classes-v2-option-3".
7279 * ChangeLog.gimple-classes: New.
7280 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
7281 from being just a vec<gimple> to a vec<gbind *>.
7282
c39a5e99
JJ
72832014-11-18 Jakub Jelinek <jakub@redhat.com>
7284
7285 PR sanitizer/63813
7286 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
7287 argument to ptype, set type to TREE_TYPE (ptype). Don't call
7288 get_pointer_alignment for non-pointers. Use ptype, or if it is
7289 reference type, corresponding pointer type, as type of kind
7290 argument.
7291 (ubsan_maybe_instrument_reference,
7292 ubsan_maybe_instrument_member_call): Adjust callers.
7293
8537a4a9
MP
72942014-11-15 Marek Polacek <polacek@redhat.com>
7295
7296 PR middle-end/63884
7297 * array-notation-common.c (is_sec_implicit_index_fn): Return false
7298 for NULL fndecl.
7299 (extract_array_notation_exprs): Return for NULL node.
7300
2079956a
JM
73012014-11-12 Joseph Myers <joseph@codesourcery.com>
7302
7303 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
7304 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
7305
1304953e
JJ
73062014-11-12 Jakub Jelinek <jakub@redhat.com>
7307
7308 PR c/59708
7309 * c-common.c (check_builtin_function_arguments): Handle
7310 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
7311
e5e44252
AK
73122014-11-10 Andi Kleen <ak@linux.intel.com>
7313
7314 PR c/60804
7315 * c-common.h (check_no_cilk): Declare.
7316 * cilk.c (get_error_location): New function.
7317 (check_no_cilk): Dito.
7318
e64b984d
AK
73192014-11-10 Andi Kleen <ak@linux.intel.com>
7320
7321 * cilk.c (recognize_spawn): Use expression location
7322 for error message.
7323
13c21655
PC
73242014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
7325
7326 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
7327
42fd12b1
ESR
73282014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
7329
7330 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
7331 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
7332 (__cpp_range_based_for, __cpp_initializer_lists,
7333 __cpp_delegating_constructors, __cpp_nsdmi,
7334 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
7335 for C++11; (__cpp_attribute_deprecated): Remove in favor of
7336 __has_cpp_attribute.
7337 * c-lex.c (cb_has_attribute): New callback CPP function;
7338 (init_c_lex): Set has_attribute callback.
7339
6f450181
RB
73402014-11-04 Richard Biener <rguenther@suse.de>
7341
7342 * c-common.c (shorten_compare): Do not shorten mixed
7343 DFP and non-DFP compares.
7344
26f0e1d6
ESR
73452014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
7346
7347 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
7348 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
7349 Commentary and rearrangement of tests.
7350 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
7351 Commentary and rearrangement of tests.
ab20d992 7352 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
26f0e1d6
ESR
7353 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
7354
ef4bddc2
RS
73552014-10-29 Richard Sandiford <richard.sandiford@arm.com>
7356
7357 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
7358 enum from machine_mode.
7359
c582198b
AM
73602014-10-28 Andrew MacLeod <amacleod@redhat.com>
7361
adfac8df
JJ
7362 * c-common.c: Adjust include files.
7363 * c-gimplify.c: Ditto.
7364 * cilk.c: Ditto.
7365 * c-pragma.c: Ditto.
7366 * c-ubsan.c: Ditto.
c582198b 7367
60393bbc
AM
73682014-10-27 Andrew MacLeod <amacleod@redhat.com>
7369
7370 * c-gimplify.c: Adjust include files.
7371
d723bb7c
MLI
73722014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
7373
7374 PR c++/53061
7375 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
7376 c_common_initialize_diagnostics.
7377 * c-common.h: Likewise.
7378
90f3520e
MP
73792014-10-24 Marek Polacek <polacek@redhat.com>
7380
7381 PR c/56980
7382 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
7383 print "struct"/"union"/"enum" for typedefed names.
7384
59d7607a
MP
73852014-10-23 Marek Polacek <polacek@redhat.com>
7386
7387 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
7388 in unsigned type.
7389
d95a2703
JJ
73902014-10-22 Jakub Jelinek <jakub@redhat.com>
7391 Yury Gribov <y.gribov@samsung.com>
7392
7393 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
7394 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
7395 instead of flag_sanitize_recover as bool flag.
7396
8e6ef852
KY
73972014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
7398
7399 * cilk.c: Revert previous change.
7400
948cf550
IZ
74012014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
7402
7403 PR c/63307
7404 * cilk.c: Include vec.h.
7405 (struct cilk_decls): New structure.
7406 (wrapper_parm_cb): Split this function to...
7407 (fill_decls_vec): ...this...
7408 (create_parm_list): ...and this.
7409 (compare_decls): New function.
7410 (for_local_cb): Remove.
7411 (wrapper_local_cb): Ditto.
7412 (build_wrapper_type): For now first traverse and fill vector of
7413 declarations then sort it and then deal with sorted vector.
7414 (cilk_outline): Ditto.
7415 (declare_one_free_variable): Ditto.
7416
92574c7c
MP
74172014-10-17 Marek Polacek <polacek@redhat.com>
7418
7419 * c-opts.c (c_common_post_options): Set warn_implicit_int.
7420 * c.opt (Wimplicit-int): Initialize to -1.
7421
83685514
AM
74222014-10-16 Andrew MacLeod <amacleod@redhat.com>
7423
7424 * c-pragma.c: Adjust include files.
7425 * c-semantics.c: Likewise.
7426
5b8300ea
DD
74272014-10-16 DJ Delorie <dj@redhat.com>
7428
7429 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
7430 multiples of bytes.
7431
5f83e90b
JM
74322014-10-14 Jason Merrill <jason@redhat.com>
7433
7434 PR c++/63455
7435 * c-common.h (CPP_PREPARSED_EXPR): New.
7436 (N_CP_TTYPES): Adjust.
7437
d73326ca
MP
74382014-10-15 Marek Polacek <polacek@redhat.com>
7439
7440 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
7441
78a7c317
DD
74422014-10-14 DJ Delorie <dj@redhat.com>
7443
7444 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
7445 types, not just __int128.
7446 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
7447 types, not just __int128.
7448 (cpp_atomic_builtins): Round pointer sizes up.
7449 (type_suffix): Use type precision, not specific types.
7450 * c-common.c (c_common_reswords): Remove __int128 special case.
7451 (c_common_type_for_size): Check for all __intN types, not just
7452 __int128.
7453 (c_common_type_for_mode): Likewise.
7454 (c_common_signed_or_unsigned_type): Likewise.
7455 (c_build_bitfield_integer_type): Likewise.
7456 (c_common_nodes_and_builtins): Likewise.
7457 (keyword_begins_type_specifier): Likewise.
7458 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
7459 __intN variants.
7460
2a22f99c
TS
74612014-10-12 Trevor Saunders <tsaunders@mozilla.com>
7462
7463 * c-common.c: Use hash_table instead of hashtab.
7464
2a8ef767
ESR
74652014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
7466
adfac8df 7467 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
7468 C++11 section.
7469
3c9aabbd
MG
74702014-10-03 Marc Glisse <marc.glisse@inria.fr>
7471
7472 PR c++/54427
7473 PR c++/57198
7474 PR c++/58845
7475 * c-common.c (warn_logical_operator): Punt for vectors.
7476
a15f7cb8
ESR
74772014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
7478
7479 Implement SD-6: SG10 Feature Test Recommendations
7480 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
7481 macros and the __has_header macro.
7482
8d0cf15e
JM
74832014-09-30 Jason Merrill <jason@redhat.com>
7484
dd5d5481
JM
7485 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
7486 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
7487 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
7488
b752325e
JM
7489 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
7490 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
7491
8d0cf15e
JM
7492 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
7493 * c-common.c (c_common_reswords): Remove __is_convertible_to.
7494
083e891e
MP
74952014-09-24 Marek Polacek <polacek@redhat.com>
7496
7497 PR c/61405
7498 PR c/53874
7499 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
7500
7861b648
AK
75012014-09-23 Andi Kleen <ak@linux.intel.com>
7502
7503 * c-common.c (handle_no_reorder_attribute): New function.
7504 (c_common_attribute_table): Add no_reorder attribute.
7505
9a79452d
JM
75062014-09-22 Joseph Myers <joseph@codesourcery.com>
7507
7508 * c-cppbuiltin.c (c_cpp_builtins): Define
7509 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
7510 modes.
7511
dd69f047
JM
75122014-09-18 Joseph Myers <joseph@codesourcery.com>
7513
7514 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
7515 for supported floating-point modes.
7516
737a4826
MLI
75172014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
7518
7519 * c.opt (Wpsabi): Use LangEnabledBy.
7520 * c-opts.c (c_common_handle_option): Do not handle here.
7521
8cc4b7a2
JM
75222014-09-12 Joseph Myers <joseph@codesourcery.com>
7523
7524 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
7525 macros for floating-point modes.
7526
179b5a55
MG
75272014-09-11 Marc Glisse <marc.glisse@inria.fr>
7528
7529 PR target/58757
7530 * c-cppbuiltin.c (builtin_define_float_constants): Correct
7531 __*_DENORM_MIN__ without denormals.
7532
570a11fe
JJ
75332014-09-10 Jakub Jelinek <jakub@redhat.com>
7534
7535 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
7536 ubsan_instrument_vla, ubsan_instrument_return): Adjust
7537 ubsan_create_data callers.
7538 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
7539 index is constant or BIT_AND_EXPR with constant mask and is
7540 small enough for the bound.
7541 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
7542 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
7543
b559c810
MLI
75442014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7545
7546 * c.opt: Add CppReason to various flags.
7547 (Wdate-time): Re-sort.
7548 * c-common.c: Include c-common.h earlier.
7549 (struct reason_option_codes_t): Delete.
7550 (c_option_controlling_cpp_error): Prefix global type and struct
7551 with cpp_.
7552
1ef33fd4
MLI
75532014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7554
7555 * c.opt (Wnormalized): New.
7556 (Wnormalized=): Use Enum and Reject Negative.
7557 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
7558
66bb34c0
JM
75592014-09-08 Joseph Myers <joseph@codesourcery.com>
7560
7561 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
7562 digits of floating-point modes if -fbuilding-libgcc.
7563
53d68b9f
JM
75642014-09-05 Joseph Myers <joseph@codesourcery.com>
7565
7566 * c-cppbuiltin.c (c_cpp_builtins): Also define
7567 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
7568 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
7569 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
7570 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
7571 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
7572 __LIBGCC_STACK_GROWS_DOWNWARD__,
7573 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
7574 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
7575 __LIBGCC_DWARF_FRAME_REGISTERS__,
7576 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
7577 __LIBGCC_STACK_POINTER_REGNUM__ and
7578 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
7579 (builtin_define_with_value): Handle backslash-escaping in string
7580 macro values.
7581
f65586dc
RB
75822014-09-05 Richard Biener <rguenther@suse.de>
7583
7584 PR middle-end/63148
7585 * c-format.c (check_format_arg): Properly handle
7586 effectively signed POINTER_PLUS_EXPR offset.
7587
2b71f4a4
MLI
75882014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
7589
7590 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
7591 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
7592 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
7593 and Init.
7594 * c-opts.c (c_common_handle_option): Do not handle here.
7595 (sanitize_cpp_opts): Likewise.
7596 * c-common.c (struct reason_option_codes_t): Handle
7597 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
7598
d2e4feca
MP
75992014-09-03 Marek Polacek <polacek@redhat.com>
7600
7601 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
7602
9a771876
JJ
76032014-09-02 Jakub Jelinek <jakub@redhat.com>
7604 Balaji V. Iyer <balaji.v.iyer@intel.com>
7605 Igor Zamyatin <igor.zamyatin@intel.com>
7606
7607 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
7608 * c-common.c (c_common_reswords): Added _Cilk_for.
7609 * c-common.h (enum rid): Added RID_CILK_FOR.
7610 (cilk_for_number_of_iterations): Add declaration.
7611 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
7612 CILK_FOR.
7613 * c-pragma.c (init_pragma): Register "grainsize" pragma.
7614 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
7615
81b5d104
MLI
76162014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7617
7618 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
7619 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
7620 Wundef): Use CPP, Var and Init.
7621 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
7622
b753b37b
MLI
76232014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7624
7625 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
7626 * c-opts.c (c_common_handle_option): Do not handle here.
7627
028aee17
JM
76282014-08-25 Jason Merrill <jason@redhat.com>
7629
7630 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
7631 -std=c++14 and -std=gnu++14, rather than the reverse.
7632 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
7633 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
7634 * c-common.h (cxx_dialect): Remove cxx1y.
7635
e4276ba5
ESR
76362014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
7637
7638 * c-common.h (enum cxx_dialect): Add cxx14.
7639 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
7640 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
7641 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
7642
a545cacd
JM
76432014-08-22 Jason Merrill <jason@redhat.com>
7644
7645 * c.opt (std=gnu++17): Fix alias.
7646
59ea0364
MP
76472014-08-22 Marek Polacek <polacek@redhat.com>
7648
7649 PR c++/62199
7650 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
7651 check for vector types. Drop LHS argument.
7652 * c-common.h (warn_logical_not_parentheses): Adjust.
7653
596e808c
MLI
76542014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
7655
7656 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
7657 (Wmultichar): Likewise.
7658 (Wdate-time): Use C-family languages instead of Common. Use CPP
7659 and Var.
7660 * c-opts.c (c_common_handle_option): Do not handle the above
7661 options here.
7662 (sanitize_cpp_opts): Likewise.
7663
18767f65
MLI
76642014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
7665
7666 PR fortran/44054
7667 * c-opts.c: Include tree-diagnostics.h.
7668 (c_diagnostic_finalizer): New.
7669 (c_common_initialize_diagnostics): Use it.
7670
b4413594
MLI
76712014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
7672
7673 PR preprocessor/51303
7674 * c-common.c (struct reason_option_codes_t option_codes):
7675 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
7676
43f9a13c
MLI
76772014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
7678
7679 PR c/60975
7680 PR c/53063
7681 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
7682 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
7683 (c_common_post_options): Call init_global_opts_from_cpp.
7684 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
7685
04159acf
MP
76862014-08-19 Marek Polacek <polacek@redhat.com>
7687
7688 PR c++/62153
7689 * c-common.c (maybe_warn_bool_compare): New function.
7690 * c-common.h (maybe_warn_bool_compare): Declare.
7691 * c.opt (Wbool-compare): New option.
7692
35aff4fb
MP
76932014-08-19 Marek Polacek <polacek@redhat.com>
7694
7695 * c.opt (Wc99-c11-compat): New option.
7696
177cce46
MP
76972014-08-19 Marek Polacek <polacek@redhat.com>
7698
7699 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
7700 to warn_c90_c99_compat.
7701 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
7702 to -1.
7703
6ae9194f
MLI
77042014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
7705 Steven Bosscher <steven@gcc.gnu.org>
7706
7707 PR c/52952
7708 * c-format.c: Add extra_arg_loc and format_string_loc to struct
7709 format_check_results.
7710 (check_function_format): Use true and add comment for boolean
7711 argument.
7712 (finish_dollar_format_checking): Use explicit location when warning.
7713 (check_format_info): Likewise.
7714 (check_format_arg): Set extra_arg_loc and format_string_loc.
7715 (check_format_info_main): Use explicit location when warning.
7716 (check_format_types): Pass explicit location.
7717 (format_type_warning): Likewise.
7718
8e54f6d3
MLI
77192014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
7720
7721 PR fortran/44054
7722 * c-format.c: Handle Fortran flags.
7723
cd4e76fc
IZ
77242014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
7725
7726 PR other/61962
7727 * array-notation-common.c (find_rank): Added handling for other
7728 types of references.
7729
f3bede71
MP
77302014-08-10 Marek Polacek <polacek@redhat.com>
7731
7732 PR c/51849
7733 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
7734 * c.opt (Wc90-c99-compat): Add option.
7735
9f25a338
TS
77362014-08-07 Trevor Saunders <tsaunders@mozilla.com>
7737
7738 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
7739
62e4eb35
MP
77402014-08-03 Marek Polacek <polacek@redhat.com>
7741
ab20d992 7742 * c-common.c (check_case_value): Add location_t parameter. Use it.
62e4eb35
MP
7743 (c_add_case_label): Pass loc to check_case_value.
7744
b787e7a2
TS
77452014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7746
7747 * cilk.c: Use hash_map instead of pointer_map.
7748
6e2830c3
TS
77492014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7750
7751 * c-gimplify.c: Use hash_set instead of pointer_set.
7752
a7ee52fb
IZ
77532014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
7754
7755 PR middle-end/61455
7756 * array-notation-common.c (extract_array_notation_exprs): Handling
7757 of DECL_EXPR added.
7758
944fa280
JJ
77592014-08-01 Jakub Jelinek <jakub@redhat.com>
7760
7761 * c-common.h (min_align_of_type): Removed prototype.
7762 * c-common.c (min_align_of_type): Removed.
7763 * c-ubsan.h (ubsan_maybe_instrument_reference,
7764 ubsan_maybe_instrument_member_call): New prototypes.
7765 * c-ubsan.c: Include stor-layout.h and builtins.h.
7766 (ubsan_maybe_instrument_reference_or_call,
7767 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
7768 functions.
7769
b4dfdc11
MG
77702014-07-31 Marc Glisse <marc.glisse@inria.fr>
7771
7772 PR c++/60517
7773 * c.opt (-Wreturn-local-addr): Move to common.opt.
7774
a41844e5
JM
77752014-07-30 Jason Merrill <jason@redhat.com>
7776
7777 PR c++/61659
7778 PR c++/61687
7779 Revert:
7780 * c.opt (-fuse-all-virtuals): New.
7781
976d5a22
TT
77822014-07-30 Tom Tromey <tromey@redhat.com>
7783
7784 PR c/59855
7785 * c.opt (Wdesignated-init): New option.
7786 * c-common.c (c_common_attribute_table): Add "designated_init".
7787 (handle_designated_init): New function.
7788
cdc94aca
MP
77892014-07-24 Marek Polacek <polacek@redhat.com>
7790
7791 PR c/57653
7792 * c-opts.c (c_finish_options): If -imacros is in effect, return.
7793
f41373b6
DS
77942014-07-16 Dodji Seketeli <dodji@redhat.com>
7795
7796 PR preprocessor/60723 - missing system-ness marks for macro tokens
7797 * c-ppoutput.c (struct print::prev_was_system_token): New data
7798 member.
7799 (init_pp_output): Initialize it.
7800 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
7801 (do_line_change): Return a flag saying if a line marker was
7802 emitted or not.
7803 (scan_translation_unit): Detect if the system-ness of the token we
7804 are about to emit is different from the one of the previously
7805 emitted token. If so, emit a line marker. Avoid emitting useless
7806 adjacent line markers. Avoid emitting line markers for tokens
7807 originating from the expansion of built-in macros.
7808 (scan_translation_unit_directives_only): Adjust.
7809
4d661eaa
MP
78102014-07-15 Marek Polacek <polacek@redhat.com>
7811
7812 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
7813 TYPE_MAX_VALUE is NULL.
7814
b108f48f
JJ
78152014-07-14 Jakub Jelinek <jakub@redhat.com>
7816
7817 PR middle-end/61294
7818 * c.opt (Wmemset-transposed-args): New warning.
7819
c0221884
JM
78202014-07-10 Jason Merrill <jason@redhat.com>
7821
7822 PR c++/61659
7823 PR c++/61687
7824 * c.opt (-fuse-all-virtuals): New.
7825
63dfbb95
RB
78262014-07-09 Richard Biener <rguenther@suse.de>
7827
7828 PR c-family/61741
7829 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
7830 using unsigned arithmetic if overflow does not wrap instead of
7831 if overflow is undefined.
7832
773ec47f
MP
78332014-07-06 Marek Polacek <polacek@redhat.com>
7834
7835 PR c/6940
7836 * c.opt (Wsizeof-array-argument): New option.
7837
00a7ba58
JJ
78382014-07-03 Jakub Jelinek <jakub@redhat.com>
7839
b1726d6c 7840 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
7841 comments->count <= 1, as comments->entries might be NULL.
7842
52ec0ea3
MP
78432014-07-01 Marek Polacek <polacek@redhat.com>
7844
7845 * c.opt (Wint-conversion): New option.
7846
d5c3d343
MP
78472014-07-01 Marek Polacek <polacek@redhat.com>
7848
7849 PR c/58286
7850 * c.opt (Wincompatible-pointer-types): New option.
7851
6e7ceb17
PC
78522014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
7853
7854 PR c++/51400
7855 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
7856 Do not discard TYPE_QUALS of type.
7857
da73100b
JM
78582014-06-26 Jason Merrill <jason@redhat.com>
7859
7860 * c-common.h (enum cxx_dialect): Add cxx1z.
7861 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
7862 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
7863
08eedf75
TJ
78642014-06-26 Teresa Johnson <tejohnson@google.com>
7865
7866 * c-common.h (get_dump_info): Declare.
7867 * c-gimplify.c (c_genericize): Use saved dump files.
7868 * c-opts.c (c_common_parse_file): Begin and end dumps
7869 once around parsing invocation.
7870 (get_dump_info): New function.
7871
7b56b2f8
MP
78722014-06-23 Marek Polacek <polacek@redhat.com>
7873 Andrew MacLeod <amacleod@redhat.com>
7874
7875 PR c/61553
7876 * c-common.c (get_atomic_generic_size): Don't segfault if the
7877 type doesn't have a size.
7878
0e37a2f3
MP
78792014-06-20 Marek Polacek <polacek@redhat.com>
7880
7881 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
7882 (ubsan_walk_array_refs_r): New function.
7883 (c_genericize): Instrument array bounds.
7884 * c-ubsan.c: Include "internal-fn.h".
7885 (ubsan_instrument_division): Mark instrumented arrays as having
7886 side effects. Adjust ubsan_type_descriptor call.
7887 (ubsan_instrument_shift): Likewise.
7888 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
7889 (ubsan_instrument_bounds): New function.
7890 (ubsan_array_ref_instrumented_p): New function.
7891 (ubsan_maybe_instrument_array_ref): New function.
7892 * c-ubsan.h (ubsan_instrument_bounds): Declare.
7893 (ubsan_array_ref_instrumented_p): Declare.
7894 (ubsan_maybe_instrument_array_ref): Declare.
7895
78962014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
7897
7898 PR lto/61123
7899 * c.opt (fshort-enums): Add to LTO.
7900 * c.opt (fshort-wchar): Likewise.
7901
5c3d09f7
MP
79022014-06-16 Marek Polacek <polacek@redhat.com>
7903
7904 PR c/60439
7905 * c.opt (Wswitch-bool): Add Var.
7906
9cf32741
JJ
79072014-06-12 Jakub Jelinek <jakub@redhat.com>
7908
7909 PR middle-end/61486
7910 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
7911 #pragma omp target teams or
7912 #pragma omp {,target }teams distribute simd.
7913
62984918
JM
79142014-06-12 Jason Merrill <jason@redhat.com>
7915
7916 * c.opt (Wabi=, fabi-compat-version): New.
7917 * c-opts.c (c_common_handle_option): Handle -Wabi=.
7918 (c_common_post_options): Handle flag_abi_compat_version default.
7919 Disallow -fabi-compat-version=1.
7920 * c-common.h (abi_version_crosses): New.
7921
f961457f
JH
79222014-06-11 Jan Hubicka <hubicka@ucw.cz>
7923
adfac8df 7924 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
7925 section names that are no longer trees.
7926
92d28cbb
JJ
79272014-06-10 Jakub Jelinek <jakub@redhat.com>
7928
7929 PR fortran/60928
7930 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
7931 (omp_pragmas): ... back here.
7932
742938c9
MP
79332014-06-05 Marek Polacek <polacek@redhat.com>
7934
7935 PR c/49706
7936 * c-common.c (warn_logical_not_parentheses): New function.
7937 * c-common.h (warn_logical_not_parentheses): Declare.
7938 * c.opt (Wlogical-not-parentheses): New option.
7939
9d548dfb
MP
79402014-06-04 Marek Polacek <polacek@redhat.com>
7941
7942 PR c/30020
7943 * c-common.c (check_case_bounds): Add location parameter.
7944 Use it.
7945 (c_add_case_label): Pass loc to check_case_bounds.
7946
fedfecef
MP
79472014-06-03 Marek Polacek <polacek@redhat.com>
7948
7949 PR c/60439
7950 * c.opt (Wswitch-bool): New option.
7951
f6a7cffc
TS
79522014-05-22 Thomas Schwinge <thomas@codesourcery.com>
7953
040d18b6
TS
7954 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
7955 Remove prototypes.
7956 (record_types_used_by_current_var_decl): Move prototype to where
7957 it belongs.
7958
f6a7cffc
TS
7959 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
7960 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
7961 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
7962
632f2871
RS
79632014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
7964
7965 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
7966 * c-common.c (c_common_nodes_and_builtins): Don't initialize
7967 void_zero_node.
7968 * c-pretty-print.c (pp_c_void_constant): New function.
7969 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
7970 (c_pretty_printer::expression): Handle VOID_CST.
7971 * cilk.c (extract_free_variables): Likewise.
7972 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
7973 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
7974
766090c2
TS
79752014-05-17 Trevor Saunders <tsaunders@mozilla.com>
7976
7977 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
7978 * c-pragma.c (push_alignment): Adjust.
7979 (handle_pragma_push_options): Likewise.
7980
661a0813
MP
79812014-05-09 Marek Polacek <polacek@redhat.com>
7982
7983 PR c/50459
7984 * c-common.c (check_user_alignment): Return -1 if alignment is error
7985 node.
7986 (handle_aligned_attribute): Don't call default_conversion on
7987 FUNCTION_DECLs.
7988 (handle_vector_size_attribute): Likewise.
7989 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
7990 (handle_sentinel_attribute): Call default_conversion and allow even
7991 integral types as an argument.
7992
2793eeab
MP
79932014-05-08 Marek Polacek <polacek@redhat.com>
7994
7995 PR c/61053
7996 * c-common.c (min_align_of_type): New function factored out from...
7997 (c_sizeof_or_alignof_type): ...here.
7998 * c-common.h (min_align_of_type): Declare.
7999
f827930a
MP
80002014-05-08 Marek Polacek <polacek@redhat.com>
8001
8002 PR c/61077
8003 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
8004 parameter type of main.
8005
ca49b74e
DD
80062014-05-07 DJ Delorie <dj@redhat.com>
8007
8008 * c-cppbuiltin.c (print_bits_of_hex): New.
8009 (builtin_define_type_minmax): Print values using hex so as not to
8010 require a pre-computed list of string values.
8011
1d60af08
KZ
80122014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
8013 Mike Stump <mikestump@comcast.net>
8014 Richard Sandiford <rdsandiford@googlemail.com>
8015
8016 * c-ada-spec.c: Include wide-int.h.
8017 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
8018 (dump_generic_ada_node): Use wide-int interfaces.
8019 * c-common.c: Include wide-int-print.h.
8020 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
8021 (pointer_int_sum): Use wide-int interfaces.
8022 (c_common_nodes_and_builtins): Use make_int_cst.
8023 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
8024 (handle_alloc_size_attribute): Use wide-int interfaces.
8025 (get_nonnull_operand): Likewise.
8026 * c-format.c (get_constant): Use tree_fits_uhwi_p.
8027 * c-lex.c: Include wide-int.h.
8028 (narrowest_unsigned_type): Take a widest_int rather than two
8029 HOST_WIDE_INTs.
8030 (narrowest_signed_type): Likewise.
8031 (interpret_integer): Update accordingly. Use wide-int interfaces.
8032 (lex_charconst): Use wide-int interfaces.
8033 * c-pretty-print.c: Include wide-int.h.
8034 (pp_c_integer_constant): Use wide-int interfaces.
8035 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
8036 INT_CST_LT_UNSIGNED.
8037
b15458be
RB
80382014-05-06 Richard Biener <rguenther@suse.de>
8039
8040 * c-opts.c (c_common_post_options): For -freestanding,
8041 -fno-hosted and -fno-builtin disable pattern recognition
8042 if not enabled explicitely.
8043
6577374e
MP
80442014-05-02 Marek Polacek <polacek@redhat.com>
8045
8046 * c.opt (Wsizeof-pointer-memaccess): Describe option.
8047
d00887e8
MP
80482014-05-01 Marek Polacek <polacek@redhat.com>
8049
8050 PR c/43245
8051 * c.opt (Wdiscarded-qualifiers): Add.
8052
f8ed5150
MP
80532014-04-30 Marek Polacek <polacek@redhat.com>
8054
8055 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
8056 INT_MIN / -1 sanitization only for integer types.
8057
45484dcf
MP
80582014-04-25 Marek Polacek <polacek@redhat.com>
8059
8060 PR c/18079
8061 * c-common.c (handle_noinline_attribute): Warn if the attribute
8062 conflicts with always_inline attribute.
8063 (handle_always_inline_attribute): Warn if the attribute conflicts
8064 with noinline attribute.
8065
38e514c0
MP
80662014-04-25 Marek Polacek <polacek@redhat.com>
8067
8068 PR c/60156
8069 * c-common.c (check_main_parameter_types): Warn about variadic main.
8070
44875f92
MS
80712014-04-24 Mike Stump <mikestump@comcast.net>
8072
8073 * c.opt (Wshadow-ivar): Default to on.
8074
dcaaa5a0
DP
80752014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
8076
8077 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
8078
c07d7c02
MP
80792014-04-23 Marek Polacek <polacek@redhat.com>
8080
8081 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
8082
1c33c9b7
JJ
80832014-04-22 Jakub Jelinek <jakub@redhat.com>
8084
8085 PR sanitizer/60275
8086 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
8087 if flag_sanitize_undefined_trap_on_error.
8088 (ubsan_instrument_division, ubsan_instrument_shift,
8089 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
8090 if !flag_sanitize_recover.
8091
793c625f
MG
80922014-04-22 Marc Glisse <marc.glisse@inria.fr>
8093
8094 PR libstdc++/43622
8095 * c-common.c (registered_builtin_types): Make non-static.
8096 * c-common.h (registered_builtin_types): Declare.
8097
b0f1bf36 80982014-04-14 Richard Biener <rguenther@suse.de>
ab20d992 8099 Marc Glisse <marc.glisse@inria.fr>
b0f1bf36
RB
8100
8101 PR c/60819
8102 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
8103 apply may-alias the scalar pointer type when applicable.
8104
3b07fa4a
IZ
81052014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
8106
8107 PR middle-end/60467
8108 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
8109 as possible argument for Cilk_spawn.
8110
cbbd2b1c
TB
81112014-04-11 Tobias Burnus <burnus@net-b.de>
8112
8113 PR c/60194
8114 * c.opt (Wformat-signedness): Add
8115 * c-format.c(check_format_types): Use it.
8116
6415bd5d
JM
81172014-04-11 Jason Merrill <jason@redhat.com>
8118
8119 PR c++/57926
8120 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
8121 default_conversion for an array argument.
8122
6525783a
MP
81232014-04-08 Marek Polacek <polacek@redhat.com>
8124
8125 PR sanitizer/60745
8126 * c-ubsan.c: Include asan.h.
8127 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
8128
880a467b
NS
81292014-04-03 Nathan Sidwell <nathan@codesourcery.com>
8130
8131 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
8132
7b59ff2d
MP
81332014-04-02 Marek Polacek <polacek@redhat.com>
8134
8135 * c-common.h (c_expand_expr): Remove declaration.
8136
8edbfaa6
JJ
81372014-03-28 Jakub Jelinek <jakub@redhat.com>
8138
8139 PR c++/60689
8140 * c-common.c (add_atomic_size_parameter): When creating new
8141 params vector, push the size argument first.
8142
07d72e1d
JJ
81432014-03-26 Jakub Jelinek <jakub@redhat.com>
8144
8145 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8146 ubsan_instrument_vla, ubsan_instrument_return): Adjust
8147 ubsan_create_data callers.
8148
b35e0fa0
JJ
81492014-03-22 Jakub Jelinek <jakub@redhat.com>
8150
8151 PR debug/60603
8152 * c-opts.c (c_finish_options): Restore cb_file_change call to
8153 <built-in>.
8154
39a1ebb3
JJ
81552014-03-13 Jakub Jelinek <jakub@redhat.com>
8156
8157 PR middle-end/36282
8158 * c-pragma.c (apply_pragma_weak): Only look at
8159 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
8160 DECL_ASSEMBLER_NAME_SET_P (decl).
8161 (maybe_apply_pending_pragma_weaks): Exit early if
8162 vec_safe_is_empty (pending_weaks) rather than only when
8163 !pending_weaks.
8164 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
8165 set assembler name back to NULL afterwards.
8166
a07f6ed2
JM
81672014-03-11 Jason Merrill <jason@redhat.com>
8168
8169 * c.opt: Add -std=gnu++14.
8170
75b107f5
IB
81712014-03-11 Ian Bolton <ian.bolton@arm.com>
8172
8173 * c-opts.c (c_common_post_options): Don't override
8174 -ffp-contract=fast if unsafe-math-optimizations is on.
8175
f42c637e
PM
81762014-03-08 Paulo Matos <paulo@matos-sorge.com>
8177
22b15758 8178 * c.opt: Enable LTO FE for fshort-double.
f42c637e 8179
70e24808
JM
81802014-03-07 Jason Merrill <jason@redhat.com>
8181
8182 * c.opt: Add -std=c++14.
8183
3af9c5e9
MP
81842014-03-06 Marek Polacek <polacek@redhat.com>
8185
8186 PR c/60197
8187 * cilk.c (contains_cilk_spawn_stmt): New function.
8188 (contains_cilk_spawn_stmt_walker): Likewise.
8189 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
8190 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
8191
b3bdf019
JJ
81922014-03-03 Jakub Jelinek <jakub@redhat.com>
8193
8194 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
8195 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
8196 even when flag_preprocess_only.
8197
ca7e759d
JM
81982014-02-26 Jason Merrill <jason@redhat.com>
8199
8200 PR c++/59231
8201 PR c++/11586
8202 * c-common.c (shorten_compare): Don't check
8203 c_inhibit_evaluation_warnings.
8204
28e41874
JJ
82052014-02-19 Jakub Jelinek <jakub@redhat.com>
8206
cca615af
JJ
8207 PR c/37743
8208 * c-common.c (c_common_nodes_and_builtins): When initializing
8209 c_uint{16,32,64}_type_node, also set corresponding
8210 uint{16,32,64}_type_node to the same value.
8211
28e41874
JJ
8212 PR c++/60267
8213 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
8214 for PRAGMA_IVDEP if flag_preprocess_only.
8215
c2bf53a1
JJ
82162014-02-12 Jakub Jelinek <jakub@redhat.com>
8217
8218 PR c/60101
8219 * c-common.c (merge_tlist): If copy is true, call new_tlist,
8220 if false, add ADD itself, rather than vice versa.
8221 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
8222 copy. For SAVE_EXPR, only call merge_tlist once.
8223
8fcbce72
JJ
82242014-02-08 Jakub Jelinek <jakub@redhat.com>
8225
8226 PR middle-end/60092
8227 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
8228 and tree_to_uhwi.
8229 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
8230 functions.
8231 (c_common_attribute_table): Add alloc_align and assume_aligned
8232 attributes.
8233
0a756a3f
MP
82342014-02-06 Marek Polacek <polacek@redhat.com>
8235
8236 PR c/60087
8237 * c-common.c (warn_for_sign_compare): Call warning_at with location
8238 instead of warning.
8239
7ec4847a
MP
82402014-02-05 Marek Polacek <polacek@redhat.com>
8241
8242 PR c/53123
8243 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
8244 statement.
8245
66f20604
MP
82462014-02-04 Marek Polacek <polacek@redhat.com>
8247
8248 PR c/60036
8249 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
8250 SAVE_EXPR.
8251
5d77fb19
MG
82522014-02-03 Marc Glisse <marc.glisse@inria.fr>
8253
8254 PR c++/53017
8255 PR c++/59211
8256 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
8257 handle_vector_size_attribute, handle_nonnull_attribute): Call
8258 default_conversion on the attribute argument.
8259 (handle_nonnull_attribute): Increment the argument number.
8260
81e5eca8
MP
82612014-01-31 Marek Polacek <polacek@redhat.com>
8262
8263 PR c/59963
8264 * c-common.c (add_atomic_size_parameter): Pass vNULL to
8265 build_function_call_vec.
8266 (resolve_overloaded_builtin): Likewise.
8267 * c-common.h (build_function_call_vec): Adjust declaration.
8268
68fca595
MP
82692014-01-30 Marek Polacek <polacek@redhat.com>
8270
8271 PR c/59940
8272 * c-common.h (unsafe_conversion_p): Adjust declaration.
8273 (warnings_for_convert_and_check): Likewise.
8274 (convert_and_check): Likewise.
8275 * c-common.c (unsafe_conversion_p): Add location parameter. Call
8276 expansion_point_location_if_in_system_header on it.
8277 (warnings_for_convert_and_check): Add location parameter. Call
8278 expansion_point_location_if_in_system_header on it. Use it.
8279 (convert_and_check): Add location parameter. Use it.
8280 (conversion_warning): Likewise.
8281 (c_add_case_label): Adjust convert_and_check calls.
8282 (scalar_to_vector): Adjust unsafe_conversion_p calls.
8283
b72271b9
BI
82842014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
8285
8286 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
8287 flag_cilkplus.
8288 * c-pragma.c (init_pragma): Likewise.
8289 * c.opt: Likewise.
8290
393e8e8b
MP
82912014-01-23 Marek Polacek <polacek@redhat.com>
8292
8293 PR c/59846
8294 * c-common.c (shorten_compare): Add location_t parameter.
8295 * c-common.h (shorten_binary_op): Adjust declaration.
8296
f04dda30
MP
82972014-01-23 Marek Polacek <polacek@redhat.com>
8298
8299 PR c/58346
8300 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
8301 * c-common.h: Declare it.
8302
621955cb
EB
83032014-01-20 Eric Botcazou <ebotcazou@adacore.com>
8304
8305 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
8306 * c-ada-spec.c (dump_ads): Likewise.
8307 (cpp_check): Likewise.
8308 (dump_ada_specs): Likewise.
8309
83102014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
8311
8312 PR c++/49718
8313 * c-common.c (handle_no_instrument_function_attribute): Allow
8314 no_instrument_function attribute in class member
8315 definition/declaration.
8316
241f845a
JJ
83172014-01-15 Jakub Jelinek <jakub@redhat.com>
8318
8319 PR c/58943
8320 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
8321 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
8322 being COMPOUND_EXPR.
8323 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
8324 operand a SAVE_EXPR and second MODIFY_EXPR.
8325
e83b8e2e
JJ
83262014-01-09 Jakub Jelinek <jakub@redhat.com>
8327
8328 PR target/58115
8329 * c-pch.c (c_common_write_pch): Call
8330 prepare_target_option_nodes_for_pch.
8331
23a5b65a
RS
83322014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8333
8334 Update copyright years
8335
f9030485
RS
83362014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8337
8338 * array-notation-common.c, c-cilkplus.c: Use the standard form for
8339 the copyright notice.
8340
f2aa696b
EB
83412013-12-28 Eric Botcazou <ebotcazou@adacore.com>
8342
8343 * c-ada-spec.c (print_constructor): New function.
8344 (print_destructor): Retrieve the origin of the destructor.
8345 (print_ada_declaration): Revamp handling of constructors/destructors.
8346
3f8257db 83472013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
8348 Bill Maddox <maddox@google.com>
8349 Jason Merrill <jason@redhat.com>
8350
8351 * c.opt: Add -fdeclone-ctor-dtor.
8352 * c-opts.c (c_common_post_options): Default to on iff -Os.
8353
41958c28
BI
83542013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
8355
8356 * c-common.c (c_common_attribute_table): Added "cilk simd function"
8357 attribute.
8358 * c-pragma.h (enum pragma_cilk_clause): Remove.
ab20d992 8359 (enum pragma_omp_clause): Added the following fields:
41958c28
BI
8360 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
8361 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
8362 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
8363 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
8364 PRAGMA_CILK_CLAUSE_UNIFORM.
8365
b1726d6c 8366
12893402
BI
83672013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
8368
8369 * cilk.c (cilk_outline): Made this function non-static.
8370 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
8371 (create_cilk_wrapper): Added a new parameter: a function pointer.
8372 (c_install_body_w_frame_cleanup): Remove
8373 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
8374 * c-common.h (cilk_outline): New prototype.
8375 (gimplify_cilk_spawn): Removed two parameters.
8376 (cilk_install_body_with_frame_cleanup): New prototype.
8377 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
8378 CILK_SPAWN_STMT case.
8379
085b42ed
BS
83802013-12-11 Bernd Schmidt <bernds@codesourcery.com>
8381
2ce064c3
BS
8382 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
8383
085b42ed
BS
8384 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
8385 (int_array_type_node): Remove.
8386 * c-common.c (c_common_nodes_and_builtins): Don't build it.
8387
9e36c9ed
MP
83882013-12-05 Marek Polacek <polacek@redhat.com>
8389
8390 PR c/52023
8391 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
8392 [ADJUST_FIELD_ALIGN].
8393
296674db
JM
83942013-12-04 Joseph Myers <joseph@codesourcery.com>
8395
8396 PR c/52023
8397 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
8398 and check field alignment if set.
8399 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
8400 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
8401
b1726d6c 84022013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
8403 Marek Polacek <polacek@redhat.com>
8404
8405 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
8406 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
8407
d7947e19
L
84082013-11-29 H.J. Lu <hongjiu.lu@intel.com>
8409
8410 PR c/59309
8411 * cilk.c (gimplify_cilk_spawn): Properly handle function without
8412 arguments.
8413
fad7652e
JJ
84142013-11-29 Jakub Jelinek <jakub@redhat.com>
8415
8416 PR c/59280
8417 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
8418 goto invalid. If it is error_mark_node, don't issue further
8419 diagnostics.
8420
8b5e1202
SO
84212013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
8422
8423 * c.opt (Wopenmp-simd): New.
8424
0a508bb6
JJ
84252013-11-22 Jakub Jelinek <jakub@redhat.com>
8426
8427 * c-ubsan.h (ubsan_instrument_return): New prototype.
8428 * c-ubsan.c (ubsan_instrument_return): New function.
8429
2fb9a547
AM
84302013-11-22 Andrew MacLeod <amacleod@redhat.com>
8431
8432 * c-common.c: Add required include files from gimple.h.
ab20d992
JJ
8433 * c-gimplify.c: Likewise.
8434 * cilk.c: Likewise.
2fb9a547 8435
8400e75e
DM
84362013-11-22 David Malcolm <dmalcolm@redhat.com>
8437
8438 * c-common.c (unsafe_conversion_p): Remove use of
8439 EXPR_LOC_OR_HERE macro.
8440 (conversion_warning): Likewise.
8441 (warnings_for_convert_and_check): Likewise.
8442 (warn_for_collisions_1): Likewise.
8443 (shorten_compare): Likewise, and remove use of in_system_header
8444 macro, using the location from the former.
8445 * c-lex.c (dump_one_header): Remove use of input_filename macro.
8446 (cb_def_pragma): Remove use of in_system_header macro.
8447 (lex_string): Likewise.
8448 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
8449
eb1ce453
KZ
84502013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
8451 Mike Stump <mikestump@comcast.net>
8452 Richard Sandiford <rdsandiford@googlemail.com>
8453
8454 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
8455 instead of TREE_INT_CST_LOW, in cases where there is a protecting
8456 tree_fits_shwi_p or tree_fits_uhwi_p.
8457 (dump_generic_ada_node): Likewise.
8458 * c-format.c (check_format_arg): Likewise.
8459 * c-pretty-print.c (pp_c_integer_constant): Likewise.
8460
6b3b8c27
KZ
84612013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
8462
8463 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
8464
49b0aa18
JC
84652013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
8466
8467 PR c/53001
8468 * c-common.c (unsafe_conversion_p): Make this function
8469 return an enumeration with more detail.
8470 (conversion_warning): Use the new return type of
8471 unsafe_conversion_p to separately warn either about conversions
8472 that lower floating point number precision or about the other
8473 kinds of conversions.
8474 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
8475 (unsafe_conversion_p): switching return type to
8476 conversion_safety enumeration.
49b0aa18
JC
8477 * c.opt: Adding new warning -Wfloat-conversion and
8478 enabling it with -Wconversion.
8479
b826515a
BS
84802013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
8481
8e745a17
JJ
8482 * c-opts.c: Include plugin.h.
8483 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 8484
b9a55b13
MP
84852013-11-19 Marek Polacek <polacek@redhat.com>
8486
8487 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
8488 call.
8489 (ubsan_instrument_shift): Likewise.
8490 (ubsan_instrument_vla): Likewise.
8491
7d362f6c
RS
84922013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8493
8494 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
8495 cast to unsigned type.
8496
386b1f1f
RS
84972013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8498
8499 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
8500 tree_low_cst.
8501 (complete_array_type): Update comment to refer to tree_to_[su]hwi
8502 rather than tree_low_cst.
8503
ae7e9ddd
RS
85042013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8505
8506 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
8507 tree_to_uhwi throughout.
8508
9439e9a1
RS
85092013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8510
8511 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
8512 tree_low_cst (..., 0) with tree_to_shwi throughout.
8513
cc269bb6
RS
85142013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8515
8516 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
8517 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
8518
9541ffee
RS
85192013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8520
8521 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
8522 host_integerp (..., 0) with tree_fits_shwi_p throughout.
8523
c02065fc
AH
85242013-11-15 Aldy Hernandez <aldyh@redhat.com>
8525
8526 * c-cilkplus.c: New file.
8527 * c-common.c (readonly_error): Add location argument.
8528 * c-common.h (readonly_error): Same.
8529 (c_finish_cilk_clauses): Protoize.
8530 (c_check_cilk_loop): Same.
8531 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
8532 Do not fail on error_mark_node.
8533 Abstract increment canonicalization to here...
8534 (c_omp_for_incr_canonicalize_ptr): New.
8535 c-pragma.c (init_pragma): Register "simd" pragma.
8536 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
8537 (enum pragma_cilk_clause): New.
8538
9cc65f15
RS
85392013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
8540
8541 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
8542 wchar_type and host_integerp checks.
8543
18f429e2
AM
85442013-11-14 Andrew MacLeod <amacleod@redhat.com>
8545
8546 * c-common.c: Likewise.
8547 * c-gimplify.c: Likewise.
8548 * cilk.c: Likewise.
8549
d8a2d370
DN
85502013-11-14 Diego Novillo <dnovillo@google.com>
8551
8552 * c-common.c: Include fold-const.h.
8553 Include stor-layout.h.
8554 Include calls.h.
8555 Include stringpool.h.
8556 Include attribs.h.
8557 Include varasm.h.
8558 Include trans-mem.h.
8559 * c-cppbuiltin.c: Include stor-layout.h.
8560 Include stringpool.h.
8561 * c-format.c: Include stringpool.h.
8562 * c-lex.c: Include stringpool.h.
8563 Include stor-layout.h.
8564 * c-pragma.c: Include stringpool.h.
8565 Include attribs.h.
8566 Include varasm.h.
8567 Include gcc-symtab.h.
8568 * c-pretty-print.c: Include stor-layout.h.
8569 Include attribs.h.
8570 * cilk.c: Include stringpool.h.
8571 Include calls.h.
8572
38b7bc7f
JM
85732013-11-13 Joseph Myers <joseph@codesourcery.com>
8574
8575 * c-common.h (enum rid): Add RID_AUTO_TYPE.
8576 * c-common.c (c_common_reswords): Add __auto_type.
8577 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
8578
45b0be94
AM
85792013-11-12 Andrew MacLeod <amacleod@redhat.com>
8580
18f429e2
AM
8581 * c-common.c: Include gimplify.h.
8582 * c-gimplify.c: Likewise.
8583 * cilk.c: Likewise.
8584 * c-omp.c: Include gimple-expr.h instead of gimple.h.
8585 * c-ubsan.c: Don't include gimple.h.
45b0be94 8586
582d9b50
JM
85872013-11-12 Joseph Myers <joseph@codesourcery.com>
8588
8589 * c-common.c (c_common_reswords): Add _Thread_local.
8590
6b28e197
JM
85912013-11-09 Joseph Myers <joseph@codesourcery.com>
8592
8593 * c-common.c (atomic_size_supported_p): New function.
8594 (resolve_overloaded_atomic_exchange)
8595 (resolve_overloaded_atomic_compare_exchange)
8596 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
8597 Use it instead of comparing size with a local list of sizes.
8598
267bac10
JM
85992013-11-07 Andrew MacLeod <amacleod@redhat.com>
8600 Joseph Myers <joseph@codesourcery.com>
8601
8602 * c-common.h (enum rid): Add RID_ATOMIC.
8603 * c-common.c (c_common_reswords): Add _Atomic.
8604 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
8605 (keyword_is_type_qualifier): Accept RID_ATOMIC.
8606 * c-format.c (check_format_types): Check for extra _Atomic
8607 qualifiers in format argument.
8608 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
8609 (pp_c_type_qualifier_list): Mention _Atomic in comment.
8610
5157b91e
TB
86112013-11-06 Tobias Burnus <burnus@net-b.de>
8612
8613 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
8614
6dbe0958
JM
86152013-11-06 Joseph Myers <joseph@codesourcery.com>
8616
8617 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
8618 standards modes.
8619 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
8620 to mean lack of IEEE 754 support.
8621
e8ff5196
TB
86222013-11-05 Tobias Burnus <burnus@net-b.de>
8623
8624 * c.opt (-Wdate-time): New option
8625 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
8626
254a0760
JM
86272013-11-05 Joseph Myers <joseph@codesourcery.com>
8628
8629 * c-cppbuiltin.c (cpp_iec_559_value): Test
8630 flag_excess_precision_cmdline not flag_excess_precision.
8631
6d7f7e0a
TB
86322013-11-05 Tobias Burnus <burnus@net-b.de>
8633
8634 * c.opt (fopenmp-simd): New option.
8635 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
8636 (omp_pragmas): ... this new struct.
8637 (c_pp_lookup_pragma): Also walk omp_pragmas.
8638 (init_pragma): Init pragmas for -fopenmp-simd.
8639
55a7f02f
MP
86402013-11-04 Marek Polacek <polacek@redhat.com>
8641
8642 PR c++/58979
8643 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
8644
9193fb05
JM
86452013-11-04 Joseph Myers <joseph@codesourcery.com>
8646
8647 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
8648 New functions.
8649 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
8650
94159ecf
EB
86512013-11-04 Eric Botcazou <ebotcazou@adacore.com>
8652
8653 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
8654 (dump_ada_specs): Adjust prototype of second callback.
8655 * c-ada-spec.c (cpp_check): New global variable.
8656 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
8657 (print_generic_ada_decl): Likewise.
8658 (has_static_fields): Change return type to bool and add guard.
8659 (has_nontrivial_methods): New predicate.
8660 (is_tagged_type): Change return type to bool.
8661 (separate_class_package): Call has_nontrivial_methods.
8662 (pp_ada_tree_identifier): Minor tweaks.
8663 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
8664 (dump_ada_array_domains): Likewise.
8665 (dump_ada_array_type): Likewise.
8666 (dump_template_types): Remove cpp_check parameter and do not pass it to
8667 dump_generic_ada_node.
8668 (dump_ada_template): Likewise.
8669 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
8670 recursively.
8671 (print_ada_methods): Change return type to integer. Remove cpp_check
8672 parameter and do not pass it down.
8673 (dump_nested_types): Remove cpp_check parameter and do not pass it to
8674 dump_generic_ada_node.
8675 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
8676 accessing methods.
8677 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
8678 down. Use has_nontrivial_methods to recognize C++ classes. Use return
8679 value of print_ada_methods.
8680 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
8681 Set cpp_check to it before invoking dump_ada_nodes.
8682 (dump_ada_specs): Likewise.
8683
b906f4ca
MP
86842013-11-03 Marek Polacek <polacek@redhat.com>
8685
8686 * c-ubsan.c: Don't include hash-table.h.
8687 (ubsan_instrument_vla): New function.
8688 * c-ubsan.h: Declare it.
8689
5e20cdc9
DM
86902013-10-31 David Malcolm <dmalcolm@redhat.com>
8691
8692 Automated part of renaming of symtab_node_base to symtab_node.
8693
8694 Patch autogenerated by rename_symtab.py from
8695 https://github.com/davidmalcolm/gcc-refactoring-scripts
8696 revision 58bb219cc090b2f4516a9297d868c245495ee622
8697
8698 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
8699 symtab_node_base to symtab_node.
8700
7057e645
ESR
87012013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
8702
8e745a17 8703 Implement C++14 digit separators.
7057e645
ESR
8704 * c-lex.c (interpret_float): Remove digit separators from scratch string
8705 before building real literal.
8706
193ea7bc
JJ
87072013-10-30 Jakub Jelinek <jakub@redhat.com>
8708
8709 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
8710
939b37da
BI
87112013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
8712
8713 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
8714 fields.
8715 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
8716 enabled.
8717 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
8718 (insert_cilk_frame): New prototype.
8719 (cilk_init_builtins): Likewise.
8720 (gimplify_cilk_spawn): Likewise.
8721 (c_cilk_install_body_w_frame_cleanup): Likewise.
8722 (cilk_detect_spawn_and_unwrap): Likewise.
8723 (cilk_set_spawn_marker): Likewise.
8724 (build_cilk_sync): Likewise.
8725 (build_cilk_spawn): Likewise.
8726 * cilk.c: New file.
8727
67348ccc
DM
87282013-10-29 David Malcolm <dmalcolm@redhat.com>
8729
8730 Patch autogenerated by refactor_symtab.py from
8731 https://github.com/davidmalcolm/gcc-refactoring-scripts
8732 revision 58bb219cc090b2f4516a9297d868c245495ee622
8733
8734 * c-gimplify.c (c_genericize): Update for conversion of symtab types
8735 to a true class hierarchy.
8736 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
8737
d570872d
RS
87382013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
8739
8740 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
8741
98906124
JL
87422013-10-26 Jeff Law <law@redhat.com>
8743
adfac8df
JJ
8744 * c-common.c (c_define_builtins): Remove mudflap support.
8745 * c.opt: Ignore and warn for mudflap options.
98906124 8746
d73749df 87472013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
8748
8749 PR other/33426
8750 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
8751 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
8752
3f04b1bb
JM
87532013-10-23 Jason Merrill <jason@redhat.com>
8754
8755 * c-format.c (gcc_cxxdiag_char_table): Add %X.
8756
acf0174b
JJ
87572013-10-11 Jakub Jelinek <jakub@redhat.com>
8758
acd15a28
JJ
8759 * c-common.h (omp_clause_mask::operator !=): New method.
8760 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
8761 instead of if (mask & something) tests everywhere.
8762
acf0174b
JJ
8763 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
8764 201307 instead of 201107.
8765 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
8766 (c_common_attribute_table): Add "omp declare target" and
8767 "omp declare simd" attributes.
8768 (handle_omp_declare_target_attribute,
8769 handle_omp_declare_simd_attribute): New functions.
8770 * c-omp.c: Include c-pragma.h.
8771 (c_finish_omp_taskgroup): New function.
8772 (c_finish_omp_atomic): Add swapped argument, if true,
8773 build the operation first with rhs, lhs arguments and use NOP_EXPR
8774 build_modify_expr.
8775 (c_finish_omp_for): Add code argument, pass it down to make_code.
8776 (c_omp_split_clauses): New function.
8777 (c_split_parallel_clauses): Removed.
8778 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
8779 c_omp_declare_simd_clauses_to_decls): New functions.
8780 * c-common.h (omp_clause_mask): New type.
8781 (OMP_CLAUSE_MASK_1): Define.
8782 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
8783 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
8784 omp_clause_mask::operator |, omp_clause_mask::operator &,
8785 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
8786 omp_clause_mask::operator ==): New methods.
8787 (enum c_omp_clause_split): New.
8788 (c_finish_omp_taskgroup): New prototype.
8789 (c_finish_omp_atomic): Add swapped argument.
8790 (c_finish_omp_for): Add code argument.
8791 (c_omp_split_clauses): New prototype.
8792 (c_split_parallel_clauses): Removed.
8793 (c_omp_declare_simd_clauses_to_numbers,
8794 c_omp_declare_simd_clauses_to_decls): New prototypes.
8795 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
8796 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
8797 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
8798 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
8799 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
8800 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
8801 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
8802 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
8803 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
8804 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
8805 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
8806 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
8807 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
8808 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
8809 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
8810 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
8811 PRAGMA_OMP_CLAUSE_UNIFORM.
8812
826cacfe
MG
88132013-10-09 Marc Glisse <marc.glisse@inria.fr>
8814
8815 PR tree-optimization/20318
8816 * c-common.c (handle_returns_nonnull_attribute): New function.
8817 (c_common_attribute_table): Add returns_nonnull.
8818
2284b034
MG
88192013-10-03 Marc Glisse <marc.glisse@inria.fr>
8820
8821 PR c++/19476
8822 * c.opt (fcheck-new): Move to common.opt.
8823
b56e9788
MP
88242013-09-25 Marek Polacek <polacek@redhat.com>
8825 Jakub Jelinek <jakub@redhat.com>
8826
8827 PR sanitizer/58413
8828 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
8829 an expression if we can prove it is correct.
8830 (ubsan_instrument_division): Likewise. Remove unnecessary
8831 check.
8832
ce6923c5
MP
88332013-09-18 Marek Polacek <polacek@redhat.com>
8834
8835 PR sanitizer/58411
8836 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
8837 Declare it.
8838 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
8839
fb5610fb
IS
88402013-09-14 Iain Sandoe <iain@codesourcery.com>
8841
8842 PR target/48094
8843 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
8844 fobjc-gc, freplace-objc-classes): Accept for LTO.
8845
88b0e79e
JC
88462013-09-13 Jacek Caban <jacek@codeweavers.com>
8847
8848 * c-target.def: New hook
8849
c9b0866a
PC
88502013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
8851
8852 PR c++/43452
8853 * c.opt (Wdelete-incomplete): Add.
8854
0af94e6f
JR
88552013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
8856
8857 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
8858 (vector_types_compatible_elements_p): New function.
8859 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
8860 declaration.
8861 (vector_types_compatible_elements_p): Declare.
8862
7c26172c
GDR
88632013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8864
8865 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
8866 a virtual member function.
8867 (pp_simple_type_specifier): Remove.
8868 (pp_c_type_specifier): Likewise.
8869 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
8870 Rename from pp_c_type_specifier. Adjust.
8871 (c_pretty_printer::c_pretty_printer): Do not assign to
8872 simple_type_specifier.
8873
20059c8b
GDR
88742013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8875
8876 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
8877 member function.
8878 (c_pretty_printer::storage_class_specifier): Likewise.
8879 (c_pretty_printer::initializer): Likewise.
8880 (pp_declaration): Remove.
8881 (pp_declaration_specifiers): Likewise.
8882 (pp_abstract_declarator): Likewise.
8883 (pp_declarator): Likewise.
8884 (pp_type_id): Likewise.
8885 (pp_statement): Likewise.
8886 (pp_constant): Likewise.
8887 (pp_id_expression): Likewise.
8888 (pp_primary_expression): Likewise.
8889 (pp_unary_expression): Likewise.
8890 (pp_multiplicative_expression): Likewise.
8891 (pp_conditional_expression): Likewise.
8892 (pp_assignment_expression): Likewise.
8893 (pp_expression): Likewise.
8894 (pp_c_type_id): Likewise.
8895 (pp_c_storage_class_specifier): Likewise.
8896 * c-pretty-print.c (pp_c_type_cast): Tidy.
8897 (pp_c_pointer): Likewise.
8898 (pp_c_type_specifier): Likewise.
8899 (pp_c_parameter_type_list): Likewise.
8900 (pp_c_function_definition): Likewise.
8901 (pp_c_init_declarator): Likewise.
8902 (pp_c_initializer_list): Likewise.
8903 (pp_c_constructor_elts): Likewise.
8904 (c_pretty_printer::direct_abstract_declarator): Likewise.
8905 (c_pretty_printer::declaration_specifiers): Likewise.
8906 (c_pretty_printer::primary_expression): Likewise.
8907 (c_pretty_printer::postfix_expression): Likewise.
8908 (c_pretty_printer::type_id): Rename from pp_c_type_id.
8909 (c_pretty_printer::storage_class_specifier): Rename from
8910 pp_c_storage_class_specifier.
8911 (c_pretty_printer::initializer): Rename from pp_c_initializer.
8912 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
8913 storage_class_specifier, initializer, offset_list, flags.
8914
de5a5fa1
MP
89152013-08-30 Marek Polacek <polacek@redhat.com>
8916
8917 * c-ubsan.c: New file.
8918 * c-ubsan.h: New file.
8919
8f0e4d72
GDR
89202013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
8921
8922 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
8923 member function.
8924 (c_pretty_printer::declaration_specifiers): Likewise.
8925 (c_pretty_printer::declarator): Likewise.
8926 (c_pretty_printer::abstract_declarator): Likewise.
8927 (c_pretty_printer::direct_abstract_declarator): Likewise.
8928 (c_pretty_printer::direct_declarator): Likewise.
8929 (c_pretty_printer::function_specifier): Likewise.
8930 (pp_declaration): Adjust.
8931 (pp_declaration_specifiers): Likewise.
8932 (pp_abstract_declarator): Likewise.
8933 (pp_direct_declarator): Likewise.
8934 (pp_function_specifier): Likewise.
8935 (pp_direct_abstract_declarator): Remove as unused.
8936 (pp_c_declaration): Remove.
8937 (pp_c_declaration_specifiers): Likewise.
8938 (pp_c_declarator): Likewise.
8939 (pp_c_direct_declarator): Likewise.
8940 (pp_c_function_specifier): Likewise.
8941 (pp_c_direct_abstract_declarator): Likewise.
8942 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
8943 from pp_c_abstract_declarator. Adjust.
ab20d992 8944 (c_pretty_printer::direct_abstract_declarator): Rename from
8f0e4d72
GDR
8945 pp_c_direct_abstract_declarator. Adjust.
8946 (c_pretty_printer::function_specifier): Rename from
8947 pp_c_function_specifier. Adjust.
8948 (c_pretty_printer::declaration_specifiers): Rename from
8949 pp_c_declaration_specifiers. Adjust.
8950 (c_pretty_printer::direct_declarator): Rename from
8951 pp_c_direct_declarator. Adjust.
8952 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
8953 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
8954 (c_pretty_printer::c_pretty_printer): Do not assign to
8955 declaration, declaration_specifiers, declarator,
8956 direct_declarator, direct_abstract_declarator, function_specifier.
8957
00d34d3a
GDR
89582013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
8959
8960 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
8961 virtual member function.
8962 (c_pretty_printer::multiplicative_expression): Likewise.
8963 (c_pretty_printer::conditional_expression): Likewise.
8964 (c_pretty_printer::assignment_expression): Likewise.
8965 (c_pretty_printer::expression): Likewise.
8966 (pp_unary_expression): Adjust.
8967 (pp_multiplicative_expression): Likewise.
8968 (pp_assignment_expression): Likewise.
8969 (pp_conditional_expression): Likewise.
8970 (pp_expression): Likewise.
8971 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
8972 from pp_c_unary_expression. Adjust.
8973 (c_pretty_printer::multiplicative_expression): Rename from
8974 pp_c_multiplicative_expression. Adjust.
8975 (c_pretty_printer::conditional_expression): Rename from
8976 pp_c_conditional_expression. Adjust.
8977 (c_pretty_printer::assignment_expression): Rename from
8978 pp_c_assignment_expression. Adjust.
8979 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
8980 (c_pretty_printer::c_pretty_printer): Do not assign to
8981 unary_expression, multiplicative_expression,
8982 conditional_expression, expression.
8983
fb22178f
GDR
89842013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8985
8986 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
8987 virtual member function.
8988 (pp_postfix_expression): Adjust.
8989 (pp_c_postfix_expression): Remove.
8990 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
8991 from pp_c_postfix_expression. Adjust.
8992 (c_pretty_printer::c_pretty_printer): Do not assign to
8993 postfix_expression.
8994
7ecc2600
GDR
89952013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8996
8997 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
8998 virtua member function.
8999 (pp_primary_expression): Adjust.
9000 (pp_c_primary_expression): Remove.
9001 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
9002 from pp_c_primary_expression. Adjust.
9003 (pp_c_initializer_list): Use pp_primary_expression.
9004 (c_pretty_printer::c_pretty_printer): Do not assign to
9005 primary_expression.
9006
0691175f
GDR
90072013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
9008
9009 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
9010 * c-pretty-print.c (M_): Remove.
9011 (c_pretty_printer::translate_string): Define.
9012 (pp_c_type_specifier): Use it.
9013 (pp_c_primary_expression): Likewise.
9014 (pp_c_expression): Likewise.
9015
66dfe4c4
GDR
90162013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
9017
9018 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
9019 virtual function.
9020 (pp_c_id_expression): Remove.
9021 (pp_id_expression): Adjust.
9022 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
9023 pp_c_id_expression. Adjust.
9024 (pp_c_postfix_expression): Use pp_id_expression.
9025 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
9026
ca43e9d5
GDR
90272013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
9028
9029 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
9030 member function.
9031 (pp_constant): Adjust.
9032 (pp_c_constant): Remove.
9033 * c-pretty-print.c (c_pretty_printer::constant): Rename from
9034 pp_c_constant. Adjust.
9035 (pp_c_constant)
9036 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
9037 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
9038
da6ca2b5
GDR
90392013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
9040
9041 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
9042 (c_pretty_printer::c_pretty_printer): Declare.
9043 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
9044 c_pretty_printer_init. Adjust.
9045 (print_c_tree): Do not call c_pretty_printer_init.
9046 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
9047
65a372f4
AC
90482013-08-09 Arnaud Charlet <charlet@adacore.com>
9049
9050 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
9051
fd9b0f32
PC
90522013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
9053
9054 PR c++/58080
9055 * c-common.c (pointer_int_sum): Add bool parameter.
9056 * c-common.h (pointer_int_sum): Adjust declaration.
9057
e0aec1e9
GDR
90582013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
9059
9060 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
9061 c_pretty_printer variable.
9062
b066401f
GDR
90632013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
9064
9065 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
9066 (pp_base): Remove.
9067 (pp_c_base): Likewise. Adjust users.
9068 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
9069 (pp_c_whitespace): Do not call pp_base.
9070 (pp_c_left_paren): Likewise.
9071 (pp_c_right_paren): Likewise.
9072 (pp_c_left_brace): Likewise.
9073 (pp_c_right_brace): Likewise.
9074 (pp_c_left_bracket): Likewise.
9075 (pp_c_right_bracket): Likewise.
9076 (pp_c_dot): Likewise.
9077 (pp_c_ampersand): Likewise.
9078 (pp_c_star): Likewise.
9079 (pp_c_arrow): Likewise.
9080 (pp_c_semicolon): Likewise.
9081 (pp_c_complement): Likewise.
9082 (pp_c_exclamation): Likewise.
9083 (pp_c_direct_declarator): Likewise.
9084 (pp_c_ws_string): Likewise.
9085 (pp_c_identifier): Likewise.
9086 (pp_c_statement): Likewise.
9087 (print_c_tree): Likewise.
9088
65e5a578
ESR
90892013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
9090
9091 PR c++/58072
9092 * c-common.c (c_parse_error): Catch user-defined literal tokens and
9093 provide useful error strings.
9094
137a1a27
GDR
90952013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9096
9097 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
9098 printer functions instead of pp_string or operators and punctuators.
9099 (dump_generic_ada_node): Likewise.
9100 * c-pretty-print.c (pp_c_type_specifier): Likewise.
9101 (pp_c_relational_expression): Likewise.
9102 (pp_c_logical_or_expression): Likewise.
9103
07838b13
GDR
91042013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9105
9106 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
9107 functions instead of pp_character.
9108 (pp_ada_tree_identifier): Likewise.
9109 (dump_ada_double_name): Likewise.
9110 (dump_ada_function_declaration): Likewise.
9111 (dump_ada_array_domains): Likewise.
9112 (dump_template_types): Likewise.
9113 (dump_generic_ada_node): Likewise.
9114 (print_ada_declaration): Likewise.
9115 (print_ada_struct_decl): Likewise.
9116 * c-pretty-print.c (pp_c_integer_constant): Likewise.
9117
433cc7b0
TT
91182013-07-23 Tom Tromey <tromey@redhat.com>
9119
9120 * c-common.h (enum rid) <RID_GENERIC>: New constant.
9121 * c-common.c (c_common_reswords): Add _Generic.
9122
688010ba
OB
91232013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
9124
9125 * c-common.c: Fix typos.
9126 * c-common.h: Likewise.
9127
2a99e5e6
LL
91282013-07-13 Lubos Lunak <l.lunak@suse.cz>
9129
9130 PR c++/55203
9131 * c-common.c (c_common_attribute_table): Add warn_unused.
9132 (handle_warn_unused_attribute): New.
9133
c26302d5
JJ
91342013-07-10 Jakub Jelinek <jakub@redhat.com>
9135
9136 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
9137 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
9138
dfeadaa0
PC
91392013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
9140
9141 PR c++/57869
9142 * c.opt: Add Wconditionally-supported.
9143
6a2fa4b2
GS
91442013-07-08 Graham Stott <graham.stott@btinternet.com>
9145
adfac8df 9146 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
9147 unused variables l_length and l_node.
9148
ecdbd01a 91492013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
9150
9151 PR c/57821
9152 * c-common.c (complete_array_type): Delay folding first index
9153 like other indices. When folding, check for index overflow.
9154
bedc293e
MG
91552013-06-27 Marc Glisse <marc.glisse@inria.fr>
9156
9157 PR c++/57509
9158 * c-common.h (c_build_vec_perm_expr): New complain argument.
9159 * c-common.c (c_build_vec_perm_expr): Likewise.
9160 Use save_expr also in C++.
9161
604b2bfc
GDR
91622013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
9163
9164 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
9165 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
9166 * c-opts.c (c_common_post_options): Likewise.
9167
dfeadaa0 91682013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
9169
9170 * array-notation-common.c (length_mismatch_in_expr): Changed the
9171 parameter type's from a dynamic array to a vec_tree. Also removed
9172 the size parameters.
9173 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
9174 the change above.
9175
2ce86d2e
BI
91762013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
9177
9178 * c-common.h (struct cilkplus_an_parts): New structure.
9179 (struct cilkplus_an_loop_parts): Likewise.
9180 (cilkplus_extract_an_triplets): New prototype.
9181 (fix_sec_implicit_args): Likewise.
9182 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
9183 (fix_sec_implicit_args): Likewise.
604b2bfc 9184
07a6825b
BI
91852013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
9186
9187 * array-notation-common.c (find_inv_trees): Removed an unwanted
9188 typecasting.
9189 * c-common.h (struct inv_list::additional_tcodes): Changed type from
9190 enum rid to enum tree_code.
9191
08346abd
JH
91922013-06-11 Jan Hubicka <jh@suse.cz>
9193
9194 * c-common.c (handle_alias_ifunc_attribute): Do not set
9195 DECL_EXTERNAL for weakref variables.
9196 * c-pragma.c (handle_pragma_weak): Make sure aliases
9197 are not declared as external.
9198
d60f1706
BI
91992013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
9200
9201 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
9202 function from c/c-array-notation.c.
9203 (is_cilkplus_reduce_builtin): Likewise.
9204 (find_rank): Likewise.
9205 (extract_array_notation_exprs): Likewise.
9206 (replace_array_notations): Likewise.
9207 (find_inv_trees): Likewise.
9208 (replace_inv_trees): Likewise.
9209 (contains_array_notation_expr): Likewise.
9210 (find_correct_array_notation_type): Likewise.
9211 * c-common.h (struct inv_list): Moved this struct from the file
9212 c/c-array-notation.c and added a new field called additional tcodes.
9213 (length_mismatch_in_expr_p): New prototype.
9214 (is_cilkplus_reduce_builtin): Likewise.
9215 (find_rank): Likewise.
9216 (extract_array_notation_exprs): Likewise.
9217 (replace_array_notation): Likewise.
9218 (find_inv_trees): Likewise.
9219 (replace_inv_trees): Likewise.
9220 (find_correct_array_notation_type): Likewise.
dfeadaa0 9221
36536d79
BI
92222013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
9223
9224 * c-common.c (c_define_builtins): When cilkplus is enabled, the
9225 function array_notation_init_builtins is called.
9226 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
9227 * c-common.def (ARRAY_NOTATION_REF): New tree.
9228 * c-common.h (build_array_notation_expr): New function declaration.
9229 (build_array_notation_ref): Likewise.
9230 (extract_sec_implicit_index_arg): New extern declaration.
9231 (is_sec_implicit_index_fn): Likewise.
9232 (ARRAY_NOTATION_CHECK): New define.
9233 (ARRAY_NOTATION_ARRAY): Likewise.
9234 (ARRAY_NOTATION_START): Likewise.
9235 (ARRAY_NOTATION_LENGTH): Likewise.
9236 (ARRAY_NOTATION_STRIDE): Likewise.
9237 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
9238 ARRAY_NOTATION_REF.
9239 (pp_c_expression): Likewise.
9240 * c.opt (flag_enable_cilkplus): New flag.
9241 * array-notation-common.c: New file.
9242
f7716d57
JJ
92432013-05-14 Jakub Jelinek <jakub@redhat.com>
9244
9245 PR c++/57274
9246 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
9247
a5e0cd1d
MG
92482013-05-10 Marc Glisse <marc.glisse@inria.fr>
9249
9250 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
9251 vectors.
9252
f6bc1c4a
HS
92532013-05-07 Han Shen <shenhan@google.com>
9254
9255 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
9256
3f12f6e9
SKS
92572013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
9258
9259 * c-common.c (check_user_alignment): Emit error for negative values.
9260
61949153
PC
92612013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
9262
9263 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
9264
e93e18e9
PC
92652013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
9266
9267 * c-cppbuiltin.c (c_cpp_builtins): Do not define
9268 __GXX_EXPERIMENTAL_CXX1Y__.
9269
44d90fe1 92702013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 9271 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
9272
9273 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
9274 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
9275 to simply use OPT_Wpointer_arith.
9276 (c_sizeof_or_alignof_type): Likewise.
9277
13f39b2e
PC
92782013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
9279
9280 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
9281
4b84d650
JJ
92822013-04-12 Jakub Jelinek <jakub@redhat.com>
9283
9284 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
9285 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
9286 specifiers.
9287
fb037b5d
SB
92882013-04-07 Steven Bosscher <steven@gcc.gnu.org>
9289
9290 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
9291
4e856798
PC
92922013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
9293
9294 * c-common.c (pointer_int_sum): Remove dead code.
9295
4b1baac8
RS
92962013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
9297
9298 PR middle-end/56524
9299 * c-common.c (handle_optimize_attribute): Don't call
9300 save_optabs_if_changed.
9301
0b50e654
JJ
93022013-03-05 Jakub Jelinek <jakub@redhat.com>
9303
9304 PR middle-end/56461
9305 * c-pch.c (pch_init): Free target_validity at the end.
9306
48c41403
JJ
93072013-03-04 Jakub Jelinek <jakub@redhat.com>
9308
9309 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
9310
e664c61c
KS
93112013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
9312 Jakub Jelinek <jakub@redhat.com>
9313
9314 PR sanitizer/56454
9315 * c-common.c (handle_no_sanitize_address_attribute): New function.
9316 (c_common_attribute_table): Add no_sanitize_address attribute.
9317 (handle_no_address_safety_analysis_attribute): Add
9318 no_sanitize_address attribute, not no_address_safety_analysis
9319 attribute.
9320
a475fd3d 93212013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
9322
9323 PR target/52555
9324 * c-common.c (handle_optimize_attribute): Call
9325 save_optabs_if_changed.
9326
f6007d99
JJ
93272013-02-18 Jakub Jelinek <jakub@redhat.com>
9328 Steven Bosscher <steven@gcc.gnu.org>
9329
9330 PR pch/54117
9331 * c-opts.c (c_common_post_options): If debug info is enabled
9332 and non-dwarf*, refuse to load PCH files and when writing PCH
9333 file warn.
9334
cf35e2b1
JJ
93352013-02-05 Jakub Jelinek <jakub@redhat.com>
9336
9337 PR middle-end/56167
9338 * c-common.c (handle_error_attribute): Fix condition.
9339
32887460
JJ
93402013-01-30 Jakub Jelinek <jakub@redhat.com>
9341
9342 PR c++/55742
9343 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
9344
5af057d8
JM
93452013-01-18 Jason Merrill <jason@redhat.com>
9346
9347 PR target/54908
9348 * c.opt (-fextern-tls-init): New.
9349 * c-opts.c (c_common_post_options): Handle it.
9350
cc83c823
JJ
93512013-01-09 Jakub Jelinek <jakub@redhat.com>
9352
9353 PR c/48418
9354 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
9355 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
9356 and is either negative or bigger or equal to type precision
9357 of the first operand.
9358
a859517f
MP
93592012-12-03 Marek Polacek <polacek@redhat.com>
9360
9361 PR c/55570
9362 * c-common.c (check_user_alignment): Swap order of tests,
9363 check TREE_CODE first.
9364
2d7aa578
ESR
93652012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
9366
9367 PR c++/52654
9368 * c-common.h (overflow_type): New enum.
9369 (build_userdef_literal): Add overflow_type argument.
9370 (tree_userdef_literal): Add overflow_type.
9371 (USERDEF_LITERAL_OVERFLOW): New access macro.
9372 * c-common.c (build_userdef_literal): Add overflow_type
9373 argument.
9374 * c-lex.c (c_lex_with_flags): Add overflow_type to
9375 build_userdef_literal calls.
9376 (interpret_integer, interpret_float): Add overflow_type argument.
9377
cc3c4f62
RB
93782012-11-28 Richard Biener <rguenther@suse.de>
9379
9380 PR c/35634
9381 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
9382 here and use a type with proper overflow behavior for types that would
9383 need to be promoted for the arithmetic.
9384
77bc5132
JJ
93852012-11-23 Jakub Jelinek <jakub@redhat.com>
9386
9387 PR sanitizer/55435
9388 * c-common.c (handle_no_address_safety_analysis_attribute): New
9389 function.
9390 (c_common_attribute_table): Add no_address_safety_analysis.
9391
5dc99c46
SB
93922012-11-16 Simon Baldwin <simonb@google.com>
9393
9394 * c.opt: Add f[no-]canonical-system-headers.
9395 * c-opts.c (c_common_handle_option): Handle
9396 OPT_fcanonical_system_headers.
9397
a4a0016d
ESR
93982012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
9399
9400 PR c++/54413
9401 * c-opts.c (c_common_handle_option): Set new flags.
9402 * c.opt: Describe new flags.
9403
7dbb85a7
JM
94042012-11-09 Jason Merrill <jason@redhat.com>
9405
9406 * c.opt (Wabi-tag): New.
9407
ad7bac31
AK
94082012-11-09 Andi Kleen <ak@linux.intel.com>
9409
9410 PR 55139
9411 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 9412 MEMMODEL_MASK
ad7bac31 9413
7332899a
MLI
94142012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
9415
9416 PR c/53063
9417 * c.opt (Wformat): Make it Alias Wformat=1.
9418 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
9419 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
9420 LangEnabledBy.
9421 (Wformat=): RejectNegative. Use LangEnabledBy.
9422 (Wnonnull): Use LangEnabledBy.
9423 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
9424 * c-format.c (set_Wformat): Delete.
9425 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
ab20d992
JJ
9426 (maybe_read_dollar_number): Likewise.
9427 (avoid_dollar_number): Likewise.
9428 (finish_dollar_format_checking): Likewise.
9429 (check_format_info): Likewise.
9430 (check_format_info_main): Likewise.
9431 (check_format_types): Likewise.
9432 (format_type_warning): Likewise.
9433 * c-common.c (int): Likewise.
9434 (check_function_sentinel): Likewise.
8e745a17 9435 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 9436
34a180a6
MLI
94372012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
9438
9439 PR c/53063
9440 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
9441 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
9442 Use LangEnabledBy.
9443 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
9444 common.opt.
9445 (Wvariadic-macros): Init(1).
9446 * c-opts.c (c_common_handle_option): Do not handle them
9447 explicitly.
9448 (c_common_post_options): Likewise.
9449 (sanitize_cpp_opts): warn_unused_macros is now
9450 cpp_warn_unused_macros.
9451 (push_command_line_include): Likewise.
9452 * c-common.c (warn_unknown_pragmas): Do not define.
9453 * c-common.h (warn_unknown_pragmas): Do not declare.
9454
3f46d6a5
MLI
94552012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
9456
9457 PR c/51294
9458 * c-common.c (conversion_warning): Handle conditional expressions.
9459
880661a4
JW
94602012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
9461
9462 PR c++/54930
9463 * c.opt (Wreturn_local_addr): Define new option.
9464
4514a96b
JM
94652012-10-25 Jason Merrill <jason@redhat.com>
9466
f14edc1a
JM
9467 * c.opt (Wvirtual-move-assign): New.
9468
4514a96b
JM
9469 * c.opt (Winherited-variadic-ctor): New.
9470
93100c6b
MG
94712012-10-25 Marc Glisse <marc.glisse@inria.fr>
9472
9473 PR c++/54427
9474 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
9475
1efcb8c6
JM
94762012-10-23 Joseph Myers <joseph@codesourcery.com>
9477
9478 * c-common.h (pch_cpp_save_state): Declare.
9479 * c-target.def (c_preinclude): New hook.
9480 * c-opts.c (done_preinclude): New.
9481 (push_command_line_include): Handle default preincluded header.
9482 (cb_file_change): Call pch_cpp_save_state when calling
9483 push_command_line_include.
9484 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
9485 (pch_cpp_save_state): New.
9486 (pch_init): Call pch_cpp_save_state conditionally, instead of
9487 calling cpp_save_state.
9488
4a0ae68e
MLI
94892012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9490
9491 PR c/53063
9492 PR c/40989
9493 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
9494 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
9495 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
9496 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
9497 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
9498 * c-opts.c (c_common_handle_option): Remove explicit handling from
9499 here.
9500 (c_common_post_options): Likewise.
9501
67e4210b
EB
95022012-10-18 Eric Botcazou <ebotcazou@adacore.com>
9503
9504 * c-ada-spec.c (LOCATION_COL): Delete.
9505 (compare_location): New function.
9506 (compare_node): Use it.
9507 (compare_comment): Likewise.
9508
65d4f2cd
MLI
95092012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
9510
9511 PR c/53063
9512 PR c/40989
9513 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
9514 * c-opts.c (c_common_handle_option): Do not set them here. Add
9515 comment.
9516 (c_common_post_options): Likewise.
9517
909881cb
EB
95182012-10-16 Eric Botcazou <ebotcazou@adacore.com>
9519
9520 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
9521 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
9522 Remove POINTER_TYPE handling, add large unsigned handling and use
9523 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
9524
3a785c97
JJ
95252012-10-12 Jakub Jelinek <jakub@redhat.com>
9526
9527 PR c/54381
9528 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
9529 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
9530 locs and array of 3 trees instead of just single loc and single
9531 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
9532 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
9533 For *cmp* builtins that take two sources strings report warnings
9534 about first and second source, not about destination and source.
9535
5e54f81d
MG
95362012-10-12 Marc Glisse <marc.glisse@inria.fr>
9537
9538 PR c++/53055
9539 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
9540
f5b02f1e
EB
95412012-10-11 Eric Botcazou <ebotcazou@adacore.com>
9542
9543 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
9544 declaring something coming from another file.
9545
b46dbc6c
AC
95462012-10-10 Arnaud Charlet <charlet@adacore.com>
9547
f5b02f1e 9548 PR ada/54845
b46dbc6c
AC
9549 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
9550
5d9de0d0
PC
95512012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
9552
9553 PR c++/54194
9554 * c-common.c (warn_about_parentheses): Add location_t parameter;
9555 use EXPR_LOC_OR_LOC.
9556 * c-common.h: Update declaration.
9557
a212e43f
MG
95582012-10-09 Marc Glisse <marc.glisse@inria.fr>
9559
9560 PR c++/54427
9561 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
9562 more operations. Make error messages optional.
9563 * c-common.h (enum stv_conv): Moved from c-typeck.c.
9564 (scalar_to_vector): Declare.
9565
b1db7f91
JM
95662012-10-08 Jason Merrill <jason@redhat.com>
9567
9568 * c-common.c (c_common_reswords): Add thread_local.
9569
e28d52cf
DS
95702012-10-08 Dodji Seketeli <dodji@redhat.com>
9571
9572 PR c++/53528 C++11 attribute support
9573 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
9574 new functions.
9575 * c-common.c (check_cxx_fundamental_alignment_constraints): New
9576 static function.
9577 (handle_aligned_attribute): In choose strictest alignment
9578 among many. Use new check_cxx_fundamental_alignment_constraints.
9579 (handle_transparent_union_attribute): In c++11 attribute syntax,
9580 don't look through typedefs.
9581
3b78de56
AC
95822012-10-04 Arnaud Charlet <charlet@adacore.com>
9583
9584 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
9585 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
9586 out of dumpfile.h.
9587
6040bb5f
DC
95882012-09-25 Dehao Chen <dehao@google.com>
9589
9590 PR middle-end/54645
3b78de56 9591 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
9592 map when read in the pch.
9593
3f8257db 95942012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
9595
9596 * c-ada-spec.c: Style fixes.
9597
3f8257db 95982012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
9599
9600 * c.opt (-fada-spec-parent): Define new command line switch.
9601 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
9602 is specified, generate binding spec as a child of the specified unit.
9603
0ccb505d
PC
96042012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
9605 Manuel López-Ibáñez <manu@gcc.gnu.org>
9606
9607 PR c++/53210
9608 * c.opt ([Winit-self]): Enabled by -Wall in C++.
9609
c583af79
AC
96102012-08-23 Arnaud Charlet <charlet@adacore.com>
9611
9612 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
9613 for pointers, and add missing Convention C pragma.
9614 (print_ada_struct_decl): Add missing aliased keyword.
9615 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
9616
1a4049e7
JJ
96172012-08-17 Jakub Jelinek <jakub@redhat.com>
9618
9619 * c-common.c (sizeof_pointer_memaccess_warning): New function.
9620 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
9621 * c-opts.c (c_common_handle_option): Enable it for -Wall.
9622 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
9623 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
9624
70b5e7dc
RG
96252012-08-10 Richard Guenther <rguenther@suse.de>
9626
9627 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
9628
f8923f7e
SB
96292012-08-07 Steven Bosscher <steven@gcc.gnu.org>
9630
9631 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
9632 instead of separate pp_newline and pp_flush.
9633 (print_c_tree): Likewise.
9634
e45abe1f
RH
96352012-07-26 Richard Henderson <rth@redhat.com>
9636
9637 * c-common.c (handle_hot_attribute): Allow labels.
9638 (handle_cold_attribute): Likewise.
9639
332f1d24
JJ
96402012-07-20 Jakub Jelinek <jakub@redhat.com>
9641
9642 PR c++/28656
9643 * c-common.c (check_function_nonnull): Handle multiple nonnull
9644 attributes properly.
9645
7ee2468b
SB
96462012-07-16 Steven Bosscher <steven@gcc.gnu.org>
9647
9648 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
9649 * c-ada-spec.c: Likewise.
9650 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
9651
ee7b28eb
SB
96522012-07-14 Steven Bosscher <steven@gcc.gnu.org>
9653
9654 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
9655 Remove code conditional on it.
9656
6bdf3519
SB
96572012-07-11 Steven Bosscher <steven@gcc.gnu.org>
9658
9659 * c-gimplify.c: Do not include basic-block.h.
9660 * c-common.c: Do not include linfuncs.h.
9661
532aafad
SB
96622012-07-08 Steven Bosscher <steven@gcc.gnu.org>
9663
9664 * c-common.h: Include tree.h.
9665
8d0d1915
JM
96662012-07-02 Jason Merrill <jason@redhat.com>
9667
9668 PR c++/53524
9669 * c-common.c (get_priority): Call default_conversion.
9670
fbc873ad
UB
96712012-07-01 Uros Bizjak <ubizjak@gmail.com>
9672
9673 * c-pch.c (c_common_write_pch): Remove unused variables.
9674
d4a10d0a
SB
96752012-06-29 Steven Bosscher <steven@gcc.gnu.org>
9676
9677 * cppspec.c: Moved from gcc/ to here.
9678
6f3a2e23
KT
96792012-06-27 Kai Tietz <ktietz@redhat.com>
9680
9681 PR preprocessor/37215
9682 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
9683
8ca92d04
SB
96842012-06-21 Steven Bosscher <steven@gcc.gnu.org>
9685
9686 * c-common.h (c_common_print_pch_checksum): Remove.
9687 * c-pch.c: Do not include output.h.
9688 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
9689 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
9690 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
9691 (struct c_pch_header): Remove.
9692 (get_ident): Update gpch version.
9693 (pch_init): Do not print executable_checksum to asm_out_file.
9694 Do not fail if there is no asm_out_file to read back from. Set
9695 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
9696 (c_common_write_pch): Verify that nothing was written to asm_out_file
9697 since pch_init was called. Do not write a c_pch_header, and do not
9698 copy from asm_out_file to the PCH.
9699 (c_common_read_pch): Do not read a c_pch_header, and do not restore
9700 the content of asm_out_file from the PCH.
9701 (c_common_print_pch_checksum): Remove.
9702 * c-opts.c (c_common_init): Print out executable_checksum directly.
9703
70f42967
SB
97042012-06-19 Steven Bosscher <steven@gcc.gnu.org>
9705
9706 * c-target.def (objc_declare_unresolved_class_reference,
9707 objc_declare_class_definition): Add new hooks.
9708
a8781821
SB
97092012-06-19 Steven Bosscher <steven@gcc.gnu.org>
9710
9711 * c-lex.c: Do not include output.h.
9712 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
9713 Remove uses of ASM_OUTPUT_IDENT.
9714
9e1a8dd1
RR
97152012-06-15 Marc Glisse <marc.glisse@inria.fr>
9716
9717 PR c++/51033
9718 * c-common.h (c_build_vec_perm_expr): Move decl here.
9719 * c-common.c (c_build_vec_perm_expr): Move definition
9720 here.
9721
6f07a821
SB
97222012-06-06 Steven Bosscher <steven@gcc.gnu.org>
9723
9724 * c.opt (fconserve-space): Turn into a no-op.
9725
9faeb493 97262012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
9727
9728 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
9729 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
9730 both the start and end of the function.
9731
a4b7d13c
SB
97322012-06-04 Steven Bosscher <steven@gcc.gnu.org>
9733
9734 * c-common.c: Do not include output.h.
9735 * c-pragma.c: Likewise.
9736
c265f413
SA
97372012-06-04 Steven Bosscher <steven@gcc.gnu.org>
9738
9739 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
9740 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
9741 (lang_decl_name): Handle namespace decls.
9742
be7a421e
SB
97432012-05-31 Steven Bosscher <steven@gcc.gnu.org>
9744
9745 * c-ada-spec.c: Do not include output.h.
9746 * c-semantics.c: Likewise.
9747
65de6659
JM
97482012-05-29 Joseph Myers <joseph@codesourcery.com>
9749
9750 * c-common.c: Fix typo.
9751
ca5f4331
MM
97522012-05-29 Michael Matz <matz@suse.de>
9753
9754 * c-common.h (c_expand_decl): Remove prototype.
9755
4f7f7aca
MLI
97562012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9757
9758 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
9759 * c-opts.c (c_common_handle_option): Remove code handling
9760 warn_missing_braces.
9761
4a792f9b
PC
97622012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
9763
9764 PR c++/25137
9765 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
9766 -Wmissing_braces.
9767
650dc14a
DS
97682012-05-22 Dodji Seketeli <dodji@redhat.com>
9769
9770 PR c++/53322
9771 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
9772
9b095bf1
MLI
97732012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
9774
9775 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
9776 * c-opts.c (c_common_handle_option): Do not handle explicitly
9777 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
9778
0b2c4be5
DS
97792012-05-16 Dodji Seketeli <dodji@redhat.com>
9780
9781 PR preprocessor/7263
ab20d992 9782 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
0b2c4be5
DS
9783 to cpp_classify_number. For diagnostics, use the precise location
9784 instead of the global input_location.
9785
a1bde5af
PC
97862012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
9787
d02924ef 9788 PR c++/11856
a1bde5af
PC
9789 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
9790
d1ede5f4
BS
97912012-05-14 Bernd Schmidt <bernds@codesourcery.com>
9792
a1bde5af 9793 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 9794
f2bc201f
MLI
97952012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
9796
9797 PR 53063
9798 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
9799 Wreorder): Use LangEnabledBy.
9800 * c-opts.c (c_common_handle_option): Do not enable them
9801 explicitly. Call lang-specific generated functions.
9802 (c_common_post_options): Do not set them here.
9803
95744782
MLI
98042012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
9805
9806 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
9807 Wmissing-field-initializers,Wmissing-parameter-type,
9808 Wold-style-declaration,Woverride-init): Use EnabledBy.
9809 * c-opts.c (c_common_post_options): Do not set here explicitly.
9810
7d5a5747
MLI
98112012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
9812
9813 PR 53063
9814 * c-opts.c (c_common_handle_option): Use handle_generated_option
9815 to enable sub-options.
9816
5a3c9cf2
PC
98172012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
9818
9819 PR c++/53158
9820 * c-common.c (warnings_for_convert_and_check): Use warning_at.
9821
3ac8781c
RG
98222012-05-10 Richard Guenther <rguenther@suse.de>
9823
9824 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
9825 adjust commentary about TYPE_IS_SIZETYPE types.
9826
1e537948
MLI
98272012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9828
9829 PR c++/53261
9830 * c-common.c (warn_logical_operator): Check that argument of
9831 integer_zerop is not NULL.
9832
f2c4a785
MLI
98332012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
9834
9835 PR c/43772
9836 * c-common.c (warn_logical_operator): Do not warn if either side
9837 is already true or false.
9838
50f305ca
MLI
98392012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
9840
9841 PR c/51712
9842 * c-common.c (expr_original_type): New.
9843 (shorten_compare): Do not warn for enumeration types.
9844
0c3641b0
MLI
98452012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
9846
9847 * c.opt (fpermissive): Add Var(flag_permissive).
9848
7edaa4d2
MG
98492012-04-30 Marc Glisse <marc.glisse@inria.fr>
9850
9851 PR c++/51033
9852 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
9853 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
9854
b9c8da34
DS
98552012-04-30 Dodji Seketeli <dodji@redhat.com>
9856
9857 Add -Wvarargs option
ab20d992 9858 * c.opt (Wvarargs): Define new option.
b9c8da34 9859
e6c69da0
MLI
98602012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9861
9862 * c-common.c (check_function_arguments): Replace
9863 Wmissing-format-attribute with Wsuggest-attribute=format.
9864
90137d8f
MLI
98652012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9866
9867 * c.opt (Wsuggest-attribute=format): New. Alias of
9868 Wmissing-format-attribute.
9869 * c-format.c (decode_format_type): Replace
9870 Wmissing-format-attribute with Wsuggest-attribute=format.
9871 (check_function_format): Likewise.
9872
9faeb493 98732012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
9874
9875 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
9876 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
9877 * c.opt: Add Wliteral-suffix.
9878
c1771a20
MLI
98792012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
9880
9881 PR c/44774
9882 * c.opt (Wpedantic): New.
9883 (pedantic): Alias Wpedantic.
9884 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
9885 (c_common_post_options): Likewise.
9886 (sanitize_cpp_opts): Likewise.
9887 * c-lex.c (interpret_float): Likewise.
9888 * c-format.c (check_format_types): Likewise.
9889 * c-common.c (pointer_int_sum): Likewise.
9890 (c_sizeof_or_alignof_type): Likewise.
9891 (c_add_case_label): Likewise.
9892 (c_do_switch_warnings): Likewise.
9893 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
9894
04b391c1
JM
98952012-04-15 Jason Merrill <jason@redhat.com>
9896
9897 PR c++/52818
9898 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
9899 (C_STD_NAME): Distinguish between C++98 and C++11.
9900
ac868f29
EB
99012012-04-11 Eric Botcazou <ebotcazou@adacore.com>
9902
9903 PR target/52624
9904 * c-common.h (uint16_type_node): Rename into...
9905 (c_uint16_type_node): ...this.
9906 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
9907 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
9908
fd4116f4
MLI
99092012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
9910
9911 * c-common.c (warn_if_unused_value): Move definition to here.
9912 * c-common.h (warn_if_unused_value): Move declaration to here.
9913
573ac65e
WB
99142012-03-23 William Bader <williambader@hotmail.com>
9915
9916 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
9917
552b8185
JM
99182012-03-20 Jason Merrill <jason@redhat.com>
9919
9920 * c-common.h (enum cxx_dialect): Add cxx1y.
9921 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
9922 test.
9923 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
9924 * c-opts.c (c_common_post_options): Likewise.
9925 (set_std_cxx1y): New.
9926 (c_common_handle_option): Call it.
9927 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
9928
04398fa8
PC
99292012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
9930
9931 PR c++/14710
9932 * c.opt ([Wuseless-cast]): Add.
9933
d2a12ae7
RG
99342012-03-16 Richard Guenther <rguenther@suse.de>
9935
9936 * c-pretty-print.c (pp_c_initializer_list): Adjust.
9937
a12bf402
MLI
99382012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9939
9940 PR c++/44783
9941 * c.opt (ftemplate-backtrace-limit) Add.
9942
5c30094f
RO
99432012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9944
9945 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
9946 handling.
9947 * c-pragma.c (handle_pragma_extern_prefix): Remove.
9948 (init_pragma): Don't register extern_prefix.
9949
21fa2faf
RG
99502012-03-12 Richard Guenther <rguenther@suse.de>
9951
9952 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
9953 (builtin_type_for_size): Likewise.
9954
e3793c6f
JJ
99552012-02-13 Jakub Jelinek <jakub@redhat.com>
9956
9957 PR c++/52215
9958 * c-common.c (sync_resolve_params): Don't decide whether to convert
9959 or not based on TYPE_SIZE comparison, convert whenever arg_type
9960 is unsigned INTEGER_TYPE.
9961
93286335
PC
99622012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
9963
9964 PR c/52118
9965 * c.opt ([Wunused-local-typedefs]): Fix description.
9966
7a421706
MS
99672012-01-24 Mike Stump <mikestump@comcast.net>
9968
9969 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
9970 exactly.
9971
ba9b1f11
RG
99722012-01-18 Richard Guenther <rguenther@suse.de>
9973
9974 * c-opts.c (c_common_post_options): Reset LTO flags if
9975 we are about to generate a PCH.
9976
465406be
PC
99772012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
9978
9979 PR c++/51777
9980 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
9981 use pp_unsigned_wide_integer.
9982
aee15221
RG
99832012-01-10 Richard Guenther <rguenther@suse.de>
9984
9985 PR middle-end/51806
9986 * c-opts.c (c_common_handle_option): Move -Werror handling
9987 to language independent code.
9988
5720c0dc
RG
99892012-01-05 Richard Guenther <rguenther@suse.de>
9990
9991 PR middle-end/51764
9992 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
9993 from common.opt.
9994
73ac190a
PC
99952011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
9996
9997 PR c++/51316
9998 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
9999 of array types with an unknown bound.
10000
48b0b196
JM
100012011-12-20 Joseph Myers <joseph@codesourcery.com>
10002
10003 * c-common.c (flag_isoc99): Update comment to refer to C11.
10004 (flag_isoc1x): Change to flag_isoc11.
10005 * c-common.h (flag_isoc99): Update comment to refer to C11.
10006 (flag_isoc1x): Change to flag_isoc11.
10007 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
10008 C11.
10009 * c-opts.c (set_std_c1x): Change to set_std_c11.
10010 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
10011 Call set_std_c11.
10012 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
10013 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
10014 * c.opt (std=c1x): Change to std=c11. Document as non-draft
10015 standard.
10016 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
10017 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
10018 (std=gnu1x): Make alias of std=gnu11.
10019
d58d6eb5
JM
100202011-12-19 Jason Merrill <jason@redhat.com>
10021
10022 PR c++/51228
10023 * c-common.c (handle_transparent_union_attribute): Check the first
10024 field if the type is complete.
10025
b3908fcc
JW
100262011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
10027
10028 PR libstdc++/51365
10029 * c-common.c (RID_IS_FINAL): Add.
10030 * c-common.h (RID_IS_FINAL): Add.
10031
fea3ca91
IS
100322011-11-30 Iain Sandoe <iains@gcc.gnu.org>
10033
10034 * c.opt (fgnu-runtime): Provide full description.
10035 (fnext-runtime): Likewise.
10036 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
10037
62bad7cd
AM
100382011-11-28 Andrew MacLeod <amacleod@redhat.com>
10039
10040 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
10041 predefines in one place. Add LOCK_FREE predefines.
10042 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
10043 new func.
10044
c466c4ff
AM
100452011-11-24 Andrew MacLeod <amacleod@redhat.com>
10046
10047 PR c/51256
9faeb493 10048 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 10049 conditions
9faeb493
UB
10050 (resolve_overloaded_atomic_exchange,
10051 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
10052 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
10053 error_mark_node for error conditions.
9faeb493 10054
a5952633
RG
100552011-11-08 Richard Guenther <rguenther@suse.de>
10056
10057 PR middle-end/51010
ab20d992 10058 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
a5952633 10059
0a35513e
AH
100602011-11-07 Richard Henderson <rth@redhat.com>
10061 Aldy Hernandez <aldyh@redhat.com>
10062 Torvald Riegel <triegel@redhat.com>
10063
10064 Merged from transactional-memory.
10065
10066 * c-common.c (handle_tm_wrap_attribute,
10067 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
10068 (struct c_common_reswords): Added __transaction* keywords.
10069 (struct c_common_attribute_table): Added transaction* and tm_regparm
10070 attributes.
10071 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
10072 masks.
10073 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
10074 find_tm_attribute): Declare.
10075
6d87092d
JM
100762011-11-07 Jason Merrill <jason@redhat.com>
10077
10078 PR c++/35688
10079 * c-common.c, c-common.h: Revert yesterday's changes.
10080
8e7860a1
JM
100812011-11-06 Jason Merrill <jason@redhat.com>
10082
10083 PR c++/35688
10084 * c-common.c (decl_has_visibility_attr): Split out from...
10085 (c_determine_visibility): ...here.
10086 * c-common.h: Declare it.
10087
d19fa6b5
JM
100882011-11-06 Joseph Myers <joseph@codesourcery.com>
10089
10090 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
10091 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
10092 type.
10093 (check_user_alignment): New. Split out of
10094 handle_aligned_attribute. Disallow integer constants with
10095 noninteger types. Conditionally allow zero.
10096 (handle_aligned_attribute): Use check_user_alignment.
10097 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
10098
86951993
AM
100992011-11-06 Andrew MacLeod <amacleod@redhat.com>
10100 Richard Henderson <rth@redhat.com>
10101
10102 Merged from cxx-mem-model.
10103
10104 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 10105 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
10106 parameters that are the same type size.
10107 (get_atomic_generic_size): New. Find size of generic
10108 atomic function parameters and do typechecking.
10109 (add_atomic_size_parameter): New. Insert size into parameter list.
10110 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
10111 either __atomic_exchange_n or external library call.
9faeb493 10112 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 10113 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 10114 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
10115 __atomic_load_n or an external library call.
10116 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
10117 __atomic_store_n or an external library call.
10118 (resolve_overloaded_builtin): Handle new __atomic builtins.
10119
cf9e9959
EB
101202011-11-04 Eric Botcazou <ebotcazou@adacore.com>
10121
10122 PR c++/50608
10123 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
10124 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
10125 <INDIRECT_REF>: Return the argument.
10126 <ARRAY_REF>: Remove special code for negative offset.
10127 Call fold_build_pointer_plus instead of size_binop.
10128 (fold_offsetof): Remove STOP_REF argument and adjust.
10129 * c-common.h (fold_offsetof_1): Declare.
10130 (fold_offsetof): Remove STOP_REF argument.
10131
25339f10
JM
101322011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
10133
10134 PR c++/50810
10135 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
10136 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
10137 Wnarrowing for C++0x and C++98.
10138 * c.opt ([Wnarrowing]): Update.
10139
89401152
PC
101402011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
10141
10142 PR c++/44277
10143 * c.opt: Add Wzero-as-null-pointer-constant.
10144
97e3ad20
JM
101452011-10-31 Jason Merrill <jason@redhat.com>
10146
15694fdd
JM
10147 * c.opt (-fdeduce-init-list): Off by default.
10148
97e3ad20
JM
10149 PR c++/50920
10150 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
10151 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
10152 and -Wc++11-compat.
10153 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
10154
fb9120e3
RAV
101552011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
10156
10157 PR c++/30066
10158 * c.opt (fvisibility-inlines-hidden): Description change.
10159
3ce4f9e4
ESR
101602011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
10161
10162 Implement C++11 user-defined literals.
10163 * c-common.c (build_userdef_literal): New.
10164 * c-common.def: New tree code.
10165 * c-common.h (tree_userdef_literal): New tree struct and accessors.
10166 * c-lex.c (interpret_float): Add suffix parm.
10167 (c_lex_with_flags): Build literal tokens.
10168
5f53c243
PC
101692011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
10170
10171 PR c++/50841
10172 Revert:
10173 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
10174
10175 PR c++/50810
10176 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
10177 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
10178 Wnarrowing for C++0x and C++98.
10179 * c.opt ([Wnarrowing]): Update.
10180
263734e1
PC
101812011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
10182
10183 PR c++/50810
10184 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
10185 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
10186 Wnarrowing for C++0x and C++98.
10187 * c.opt ([Wnarrowing]): Update.
10188
d2e312d7
PC
101892011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
10190
10191 PR c++/45385
10192 * c-common.c (conversion_warning): Remove code looking for
10193 artificial operands.
10194
d17687f6
DS
101952011-10-18 Dodji Seketeli <dodji@redhat.com>
10196
10197 PR bootstrap/50760
10198 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 10199 !NO_IMPLICIT_EXTERN_C.
d17687f6 10200
fc8396e9
PC
102012011-10-17 Michael Spertus <mike_spertus@symantec.com>
10202
10203 * c-common.c (c_common_reswords): Add __bases,
10204 __direct_bases.
10205 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
10206
102072011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
10208
10209 PR c++/50757
10210 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
10211
847e697a
TT
102122011-10-15 Tom Tromey <tromey@redhat.com>
10213 Dodji Seketeli <dodji@redhat.com>
10214
10215 * c.opt (fdebug-cpp): New option.
10216 * c-opts.c (c_common_handle_option): Handle the option.
10217 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
10218 output stream in parameter. Factorized from ...
10219 (maybe_print_line): ... this. Dump location debug information when
10220 -fdebug-cpp is in effect.
10221 (print_line_1): New static function. Takes an output stream in
10222 parameter. Factorized from ...
10223 (print_line): ... here. Dump location information when -fdebug-cpp
10224 is in effect.
10225 (scan_translation_unit): Dump location information when
10226 -fdebug-cpp is in effect.
10227
92582b75
TT
102282011-10-15 Tom Tromey <tromey@redhat.com>
10229 Dodji Seketeli <dodji@redhat.com>
10230
10231 * c.opt (ftrack-macro-expansion): New option. Handle it with and
10232 without argument.
10233 * c-opts.c (c_common_handle_option)<case
10234 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
10235 cases. Handle -ftrack-macro-expansion with and without argument.
10236
46427374
TT
102372011-10-15 Tom Tromey <tromey@redhat.com>
10238 Dodji Seketeli <dodji@redhat.com>
10239
10240 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
10241 (print_line, cb_define, do_line_change): Adjust to avoid touching
10242 the internals of struct line_map. Use the public API instead.
10243 * c-pch.c (c_common_read_pch): Likewise.
10244 * c-lex.c (fe_file_change): Likewise.
10245
fc8396e9
PC
102462011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
10247
10248 PR c++/17212
10249 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
10250
102512011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
10252
10253 PR c++/33067
10254 * c-pretty-print.c (pp_c_floating_constant): Output
10255 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
10256
e79983f4
MM
102572011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
10258
10259 * c-common.c (def_builtin_1): Delete old interface with two
10260 parallel arrays to hold standard builtin declarations, and replace
10261 it with a function based interface that can support creating
10262 builtins on the fly in the future. Change all uses, and poison
10263 the old names. Make sure 0 is not a legitimate builtin index.
10264 * c-omp.c (c_finish_omp_barrier): Ditto.
10265 (c_finish_omp_taskwait): Ditto.
10266 (c_finish_omp_flush): Ditto.
10267
6637388f
TG
102682011-10-11 Tristan Gingold <gingold@adacore.com>
10269
10270 * c.opt: (fallow-parameterless-variadic-functions): New.
10271
3797cb21
DS
102722011-09-08 Dodji Seketeli <dodji@redhat.com>
10273
10274 PR c++/33255 - Support -Wunused-local-typedefs warning
10275 * c-common.h (struct c_language_function::local_typedefs): New
10276 field.
9faeb493
UB
10277 (record_locally_defined_typedef, maybe_record_typedef_use)
10278 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 10279 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
10280 (maybe_record_typedef_use)
10281 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
10282 * c.opt: Declare new -Wunused-local-typedefs flag.
10283
693ddb1b
EB
102842011-09-06 Eric Botcazou <ebotcazou@adacore.com>
10285
10286 PR middle-end/50266
10287 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
10288 computations.
10289
830c740f
RG
102902011-09-05 Richard Guenther <rguenther@suse.de>
10291
10292 * c-common.c (complete_array_type): Use ssize_int (-1) instead
10293 of integer_minus_one_node for empty array upper bounds.
10294
892a371f
DS
102952011-08-28 Dodji Seketeli <dodji@redhat.com>
10296
10297 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
10298 it's the first time it's being called on this main TU.
10299
0e3fdb48
RB
103002011-08-24 Richard Guenther <rguenther@suse.de>
10301
10302 PR c/49396
10303 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
10304
103052011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
10306
10307 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
10308 defined in cpp_init_builtins and c_cpp_builtins.
10309
d4a83c10
JM
103102011-08-19 Joseph Myers <joseph@codesourcery.com>
10311
10312 * c-common.c (c_common_reswords): Add __builtin_complex.
10313 * c-common.h (RID_BUILTIN_COMPLEX): New.
10314
bbceee64
JM
103152011-08-18 Joseph Myers <joseph@codesourcery.com>
10316
10317 * c-common.c (c_common_reswords): Add _Noreturn.
10318 (keyword_is_function_specifier): Handle RID_NORETURN.
10319 * c-common.h (RID_NORETURN): New.
10320
3f8257db 103212011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
10322
10323 * c-common.c (unsafe_conversion_p): New function. Check if it is
10324 unsafe to convert an expression to the type.
10325 (conversion_warning): Adjust, use unsafe_conversion_p.
10326 * c-common.h (unsafe_conversion_p): New function declaration.
10327
20906c66
JJ
103282011-08-02 Jakub Jelinek <jakub@redhat.com>
10329
10330 * c-common.h (c_finish_omp_atomic): Adjust prototype.
10331 (c_finish_omp_taskyield): New prototype.
10332 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
10333 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
10334 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
10335 or RHS1 have side-effects, evaluate those too in the right spot,
10336 if it is a decl and LHS is also a decl, error out if they
10337 aren't the same.
10338 (c_finish_omp_taskyield): New function.
10339 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
10340 * c-pragma.c (omp_pragmas): Add taskyield.
10341 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
10342 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
10343 PRAGMA_OMP_CLAUSE_MERGEABLE.
10344
770e5a2e
DS
103452011-07-25 Dodji Seketeli <dodji@redhat.com>
10346
10347 * c-common.h (set_underlying_type): Remove parm name from
10348 declaration.
10349
1baae426
RG
103502011-07-25 Romain Geissler <romain.geissler@gmail.com>
10351
10352 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 10353
fcb21722
JM
103542011-07-22 Jason Merrill <jason@redhat.com>
10355
76f86d00
JM
10356 PR c++/49793
10357 * c.opt (Wnarrowing): New.
10358
3a636414
JM
10359 PR c++/30112
10360 * c-common.h: Declare c_linkage_bindings.
10361 * c-pragma.c (handle_pragma_redefine_extname): Use it.
10362
fcb21722
JM
10363 PR c++/49813
10364 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
10365 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
10366 as flag_isoc99 for 'restrict'.
10367 (pp_c_specifier_qualifier_list): Likewise for _Complex.
10368
02614448
ILT
103692011-07-21 Ian Lance Taylor <iant@google.com>
10370
10371 PR middle-end/49705
10372 * c-common.c (c_disable_warnings): New static function.
10373 (c_enable_warnings): New static function.
10374 (c_fully_fold_internal): Change local unused_p to bool. Call
10375 c_disable_warnings and c_enable_warnings rather than change
10376 c_inhibit_evaluation_warnings.
10377
34429675
JM
103782011-07-20 Jason Merrill <jason@redhat.com>
10379
10380 PR c++/6709 (DR 743)
10381 PR c++/42603 (DR 950)
10382 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
10383 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
10384 (CPP_DECLTYPE): New.
10385 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
10386
5d49b6a7
RG
103872011-07-19 Richard Guenther <rguenther@suse.de>
10388
10389 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
10390 * c-omp.c (c_finish_omp_for): Likewise.
10391
e84a58ff
EB
103922011-07-12 Eric Botcazou <ebotcazou@adacore.com>
10393
10394 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
10395 body on the next line.
10396
329af3c7
JM
103972011-07-08 Jason Merrill <jason@redhat.com>
10398
4063e61b
JM
10399 PR c++/45437
10400 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
10401
329af3c7
JM
10402 PR c++/49673
10403 * c-common.c (c_apply_type_quals_to_decl): Don't check
10404 TYPE_NEEDS_CONSTRUCTING.
10405
1a072294
RG
104062011-07-06 Richard Guenther <rguenther@suse.de>
10407
10408 * c-common.c (c_common_nodes_and_builtins):
10409 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
10410
fce5dddd
RG
104112011-07-05 Richard Guenther <rguenther@suse.de>
10412
10413 * c-common.c (c_common_nodes_and_builtins): Build all common
10414 tree nodes first.
10415
45d439ac
JJ
104162011-06-27 Jakub Jelinek <jakub@redhat.com>
10417
56300785
JJ
10418 * c-common.h (c_tree_chain_next): New static inline function.
10419
45d439ac
JJ
10420 * c-common.c (check_builtin_function_arguments): Handle
10421 BUILT_IN_ASSUME_ALIGNED.
10422
e0a8ecf2
AM
104232011-06-21 Andrew MacLeod <amacleod@redhat.com>
10424
10425 * c-common.c: Add sync_ or SYNC__ to builtin names.
10426 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
10427
104282011-06-20 Pierre Vittet <piervit@pvittet.com>
10429
10430 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
10431 handler.
10432 (gen_pragma_handler): New union.
10433 (internal_pragma_handler): New type.
10434 (c_register_pragma_with_data)
10435 (c_register_pragma_with_expansion_and_data): New functions.
10436
10437 * c-pragma.c (registered_pragmas, c_register_pragma_1)
10438 (c_register_pragma, c_register_pragma_with_expansion)
10439 (c_invoke_pragma_handler): Changed to work with
10440 internal_pragma_handler.
10441 (c_register_pragma_with_data)
10442 (c_register_pragma_with_expansion_and_data): New functions.
10443
677f3fa8
JM
104442011-06-14 Joseph Myers <joseph@codesourcery.com>
10445
10446 * c-common.c: Include common/common-target.h.
10447 (handle_section_attribute): Use
10448 targetm_common.have_named_sections.
10449 * c-cppbuiltin.c: Include common/common-target.h.
10450 (c_cpp_builtins): Use targetm_common.except_unwind_info.
10451
d7fc8c14
RG
104522011-06-10 Richard Guenther <rguenther@suse.de>
10453
10454 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
10455 to print a IDENTIFIER_NODE.
10456
10e48e39
RO
104572011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10458 Joseph Myers <joseph@codesourcery.com>
10459
10460 * c.opt (fbuilding-libgcc): New option.
10461 * c-cppbuiltin.c (c_cpp_builtins): Define
10462 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
10463
6976ae51
JM
104642011-06-07 Jason Merrill <jason@redhat.com>
10465
3ff60975
JM
10466 * c-common.c (max_tinst_depth): Lower default to 900.
10467
6976ae51
JM
10468 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
10469
009db074
RG
104702011-06-07 Richard Guenther <rguenther@suse.de>
10471
10472 * c-common.c (c_common_nodes_and_builtins): Do not set
10473 size_type_node or call set_sizetype.
10474
b4592b92
DS
104752011-06-07 Dodji Seketeli <dodji@redhat.com>
10476
10477 PR debug/49130
10478 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 10479 type when using pointer comparison to compare types.
b4592b92 10480
014ab419
JW
104812011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
10482
10483 * c.opt: Add -Wdelete-non-virtual-dtor.
10484 * c-opts.c (c_common_handle_option): Include it in -Wall.
10485
4f60111f
NF
104862011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
10487
10488 PR bootstrap/49190
10489
10490 Revert:
10491 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
10492
10493 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
10494 not tree_common.
10495
4cc4f2f4
JJ
104962011-05-27 Jakub Jelinek <jakub@redhat.com>
10497
10498 PR c++/49165
10499 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
10500 C++ don't call c_common_truthvalue_conversion on void type arms.
10501
38e01f9e
NF
105022011-05-27 Nathan Froyd <froydnj@codesourcery.com>
10503
10504 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
10505 (stmt_list_stack): Define.
10506 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
10507 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
10508
92e948a8
NF
105092011-05-26 Nathan Froyd <froydnj@codesourcery.com>
10510
10511 * c-common.c (warning_candidate_p): Check for BLOCKs.
10512
a2fc3e63
NF
105132011-05-26 Nathan Froyd <froydnj@codesourcery.com>
10514
10515 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
10516 not tree_common.
10517
0957c029
JJ
105182011-05-25 Jakub Jelinek <jakub@redhat.com>
10519
10520 * c-common.c (def_fn_type): Remove extra va_end.
10521
828fb3ba
JM
105222011-05-23 Jason Merrill <jason@redhat.com>
10523
10524 PR c++/48106
10525 * c-common.c (c_common_get_narrower): New.
10526 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
10527
dde05067
NF
105282011-05-23 Nathan Froyd <froydnj@codesourcery.com>
10529
10530 * c-common.h (check_function_arguments): Tweak prototype of
10531 check_function_arguments.
10532 * c-common.c (check_function_arguments): Likewise. Adjust
10533 calls to check_function_nonnull, check_function_format, and
10534 check_function_sentinel.
10535 (check_function_sentinel): Take a FUNCTION_TYPE rather than
10536 separate attributes and typelist arguments. Use
10537 FOREACH_FUNCTION_ARGS to iterate over argument types.
10538
3c0d13bf
PC
105392011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
10540
10541 * c-common.c (c_common_reswords): Reorder.
10542 * c-common.h (rid): Likewise.
10543
8242dd04
NF
105442011-05-10 Nathan Froyd <froydnj@codesourcery.com>
10545
10546 * c-common.c (def_fn_type): Don't call build_function_type, call
10547 build_function_type_array or build_varargs_function_type_array
10548 instead.
10549 (c_common_nodes_and_builtins): Likewise.
10550
3d528853
NF
105512011-05-05 Nathan Froyd <froydnj@codesourcery.com>
10552
10553 * c-common.c (c_add_case_label): Omit the loc argument to
10554 build_case_label.
10555 * c-common.h (build_case_label): Remove.
10556 * c-semantics.c (build_case_label): Remove.
10557
a04a722b
JM
105582011-05-05 Joseph Myers <joseph@codesourcery.com>
10559
10560 * c-objc.h (objc_start_method_definition): Update prototype.
10561 * stub-objc.c (objc_start_method_definition): Add extra parameter.
10562
e19a18d4
NF
105632011-05-04 Nathan Froyd <froydnj@codesourcery.com>
10564
10565 * c-common.c (check_main_parameter_types): Reindent. Don't use
10566 TYPE_ARG_TYPES directly.
10567 (handle_nonnull_attribute): Likewise.
10568 (sync_resolve_params): Likewise.
10569 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
10570 to check_format_string.
10571 (handle_format_attribute): Likewise.
10572 (check_format_string): Take a function type to examine instead of
10573 a type list. Use a function_arg_iterator to step through argument
10574 types.
10575
c62c040f
RG
105762011-05-04 Richard Guenther <rguenther@suse.de>
10577
10578 * c-common.c (fix_string_type): Use size_int for index type bounds.
10579 (start_fname_decls): Do not pass NULL to build_int_cst.
10580 (c_init_attributes): Likewise.
10581 * c-lex.c (c_lex_with_flags): Likewise.
10582
c12ff9d8
JM
105832011-04-27 Jason Merrill <jason@redhat.com>
10584
10585 * c-common.c (make_tree_vector_from_list): New.
10586 * c-common.h: Declare it.
10587
304dfbe3
RG
105882011-04-26 Richard Guenther <rguenther@suse.de>
10589
10590 PR preprocessor/48248
10591 * c-ppoutput.c (maybe_print_line): Always optimize newlines
10592 for output size with -P.
10593
3c0d13bf
PC
105942011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
10595
10596 * c-common.c (struct c_common_resword): Add __underlying_type.
10597 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
10598
04695783
JM
105992011-04-20 Jim Meyering <meyering@redhat.com>
10600
10601 * c-format.c (init_dollar_format_checking): Remove useless
10602 if-before-free.
10603
0dc33c3c
NP
106042011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
10605
10606 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 10607 (objc_detect_field_duplicates): New.
0dc33c3c 10608 * stub-objc.c: Likewise.
3c0d13bf 10609
c59633d9
NP
106102011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
10611
10612 * stub-objc.c (objc_declare_protocols): Renamed to
10613 objc_declare_protocol.
10614 * c-objc.h: Likewise.
3c0d13bf 10615
32dabdaf
NP
106162011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
10617
10618 * stub-objc.c (objc_declare_class): Updated argument name.
10619
81f653d6
NF
106202011-04-12 Nathan Froyd <froydnj@codesourcery.com>
10621
10622 * c-common.h (c_common_init_ts): Declare.
10623 * c-common.c (c_common_init_ts): Define.
10624
eb345401
NP
106252011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
10626
10627 * c-objc.h (objc_build_message_expr): Updated prototype.
10628 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 10629
a358e188
MJ
106302011-04-12 Martin Jambor <mjambor@suse.cz>
10631
10632 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
10633 of cgraph_node.
10634
e6313a78
RG
106352011-04-11 Richard Guenther <rguenther@suse.de>
10636
10637 * c-common.c (complete_array_type): Build a range type of
10638 proper type.
10639
dcf0c47e
NF
106402011-04-08 Nathan Froyd <froydnj@codesourcery.com>
10641
10642 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
10643 (handle_type_generic_attribute): Likewise.
10644
1ee44b26
JM
106452011-04-07 Jason Merrill <jason@redhat.com>
10646
10647 PR c++/48450
10648 * c-common.c (c_common_truthvalue_conversion): Don't ignore
10649 conversion from C++0x scoped enum.
10650
acce4e77
JM
106512011-04-06 Joseph Myers <joseph@codesourcery.com>
10652
10653 * c-target-def.h: New file.
10654 * c-target.def: New file.
10655 * c-target.h: New file.
10656 * c-common.c (targetcm): Don't define here.
10657 * c-common.h (default_handle_c_option): Declare.
10658 * c-format.c: Include c-target.h instead of target.h.
10659 * c-opts.c: Include c-target.h instead of target.h. Explicitly
10660 include tm.h.
10661 (default_handle_c_option): Move from targhooks.c.
10662
e2eefb55
JJ
106632011-03-29 Jakub Jelinek <jakub@redhat.com>
10664
10665 PR preprocessor/48248
10666 * c-ppoutput.c (print): Add src_file field.
10667 (init_pp_output): Initialize it.
10668 (maybe_print_line): Don't optimize by adding up to 8 newlines
10669 if map->to_file and print.src_file are different file.
10670 (print_line): Update print.src_file.
10671
ba78087b
KT
106722011-03-25 Kai Tietz <ktietz@redhat.com>
10673
10674 * c-ada-spec.c (compare_comment): Use filename_cmp
10675 instead of strcmp for filename.
10676
0edf1bb2
JL
106772011-03-25 Jeff Law <law@redhat.com>
10678
adfac8df 10679 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 10680
c7dc8804
JM
106812011-03-25 Jason Merrill <jason@redhat.com>
10682
10683 * c.opt: Add -std=c++03.
10684
d1d879b1
EB
106852011-03-22 Eric Botcazou <ebotcazou@adacore.com>
10686
10687 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
10688
3f8257db 106892011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
10690
10691 PR target/12171
5050afdf
KT
10692 * c-pretty-print.c (pp_c_specifier_qualifier_list):
10693 Display allowed attributes for function pointer types.
10694 (pp_c_attributes_display): New function to display
10695 attributes having affects_type_identity flag set to true.
10696 * c-pretty-print.h (pp_c_attributes_display): New prototype.
10697
62d784f7
KT
10698 * c-common.c (c_common_attribute_table):
10699 Add new element.
10700 (c_common_format_attribute_table): Likewise.
10701
82d37118
JM
107022011-03-18 Jason Merrill <jason@redhat.com>
10703
49a000c3
JM
10704 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
10705 * c-common.h: Don't declare it here.
10706 * c-common.c: Or define it here.
10707 * c-opts.c (c_common_handle_option): Or set it here.
10708
82d37118
JM
10709 PR c++/35315
10710 * c-common.c (handle_transparent_union_attribute): Don't
10711 make a duplicate type in C++.
10712
17bc631c
JM
107132011-03-15 Jason Merrill <jason@redhat.com>
10714
10715 * c-common.c (max_constexpr_depth): New.
10716 * c-common.h: Declare it.
10717 * c-opts.c (c_common_handle_option): Set it.
10718 * c.opt (fconstexpr-depth): New option.
10719
1b9b91a6
JM
107202011-03-11 Jason Merrill <jason@redhat.com>
10721
f231b5ff
JM
10722 * c-common.c (attribute_takes_identifier_p): Add missing const.
10723
1b9b91a6
JM
10724 PR c++/46803
10725 * c-common.c (attribute_takes_identifier_p): Assume that an
10726 unknown attribute takes an identifier.
10727
a19e4d44
NF
107282011-03-07 Nathan Froyd <froydnj@codesourcery.com>
10729
10730 PR c/47786
10731 * c-common.c (c_type_hash): Call list_length instead of iterating
10732 through DECL_CHAIN. Rename 'i' to 'n_elements'.
10733
982d62f6
JJ
107342011-02-19 Jakub Jelinek <jakub@redhat.com>
10735
10736 PR c/47809
10737 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
10738
0a256240
NP
107392011-02-17 Iain Sandoe <iains@gcc.gnu.org>
10740
10741 * c.opt (fobjc-abi-version=) New.
10742 (fobjc-nilcheck): New.
10743
ba9e6dd5
NF
107442011-02-03 Nathan Froyd <froydnj@codesourcery.com>
10745
10746 PR c++/46890
10747 * c-common.h (keyword_is_decl_specifier): Declare.
10748 * c-common.c (keyword_is_decl_specifier): Define.
10749 (keyword_is_function_specifier): New function.
10750
7273813a
JJ
107512011-01-26 Jakub Jelinek <jakub@redhat.com>
10752
10753 PR c/47473
10754 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
10755 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
10756 REAL_TYPE.
10757
908ef79b
AC
107582011-01-26 Arnaud Charlet <charlet@adacore.com>
10759
10760 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
10761
237e9384
JJ
107622011-01-26 Jakub Jelinek <jakub@redhat.com>
10763
10764 PR pch/47430
10765 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
10766 after init_c_lex if pch_file is set.
10767
47ea1edf
DK
107682011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
10769
d4dba752 10770 PR c++/43601
47ea1edf
DK
10771 * c.opt (-fkeep-inline-dllexport): New switch.
10772
2aa9c6ae
RG
107732011-01-12 Richard Guenther <rguenther@suse.de>
10774
10775 PR middle-end/32511
10776 * c-common.c (handle_weak_attribute): Warn instead of error
10777 on declaring an inline function weak.
10778
7bd11157
TT
107792011-01-05 Tom Tromey <tromey@redhat.com>
10780
10781 * c-common.h (lvalue_error): Update.
10782 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
10783 not error.
10784
0e66e494 107852010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 10786
b4f588c4
NP
10787 PR objc/47075
10788 * c-objc.h (objc_finish_message_expr): Added argument to
10789 prototype.
10790
f4da8dce
NF
107912010-12-22 Nathan Froyd <froydnj@codesourcery.com>
10792
10793 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
10794 Use prototype_p.
10795
46270f14
NP
107962010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
10797
10798 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 10799 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 10800
4816c593
NF
108012010-12-10 Nathan Froyd <froydnj@codesourcery.com>
10802
10803 * c-common.h (readonly_error): Declare.
10804 * c-common.c (readonly_error): Define.
10805
7a6daeb0
NF
108062010-12-09 Nathan Froyd <froydnj@codesourcery.com>
10807
10808 * c-common.h (invalid_indirection_error): Declare.
10809 * c-common.c (invalid_indirection_error): Define.
10810
892f6119
RG
108112010-12-03 Richard Guenther <rguenther@suse.de>
10812
10813 PR c/46745
10814 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
10815 (pp_c_unary_expression): Likewise.
10816 (pp_c_expression): Likewise.
10817
6c39e757
NP
108182010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
10819
10820 * c-common.h (objc_finish_function): New.
10821 (objc_non_volatilized_type): Removed.
10822 (objc_type_quals_match): Removed.
10823 * stub-objc.c (objc_finish_function): New.
10824 (objc_non_volatilized_type): Removed.
10825 (objc_type_quals_match): Removed.
9faeb493 10826
7c475d11
JM
108272010-11-30 Joseph Myers <joseph@codesourcery.com>
10828
10829 * c-common.h (parse_optimize_options): Declare.
10830 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
10831 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
10832
71f3e391
JM
108332010-11-29 Joseph Myers <joseph@codesourcery.com>
10834
10835 * c-opts.c (check_deps_environment_vars): Use getenv instead of
10836 GET_ENVIRONMENT.
10837 * c-pch.c (O_BINARY): Don't define here.
10838 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
10839
d5fabb58
JM
108402010-11-25 Joseph Myers <joseph@codesourcery.com>
10841
10842 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
10843 targetm.except_unwind_info.
10844
299404a1
JM
108452010-11-23 Joseph Myers <joseph@codesourcery.com>
10846
10847 * c-opts.c (c_common_handle_option): Pass location to
10848 set_struct_debug_option.
10849
c98cd5bf
JM
108502010-11-23 Joseph Myers <joseph@codesourcery.com>
10851
10852 * c-common.c (visibility_options): Move from ../opts.c.
10853 * c-common.h (struct visibility_flags, visibility_options):
10854 Declare here.
10855 * c-opts.c (finish_options): Rename to c_finish_options.
10856 (c_common_init): Update call to finish_options.
10857
a9546771
NP
108582010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
10859
10860 PR objc/34033
10861 * c-lex.c (lex_string): Check that each string in an Objective-C
10862 string concat sequence starts with either one or zero '@', and
10863 that there are no spurious '@' signs at the end.
10864
24a57808
JM
108652010-11-20 Joseph Myers <joseph@codesourcery.com>
10866
10867 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
10868 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
10869 HANDLE_PRAGMA_VISIBILITY.
10870 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
10871 HANDLE_PRAGMA_VISIBILITY): Don't define.
10872 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
10873
a9aa2c3a
NF
108742010-11-20 Nathan Froyd <froydnj@codesourcery.com>
10875
10876 PR c++/16189
10877 PR c++/36888
10878 PR c++/45331
10879 * c-common.h (keyword_begins_type_specifier): Declare.
10880 (keyword_is_storage_class_specifier): Declare.
10881 (keyword_is_type_qualifier): Declare.
10882 * c-common.c (keyword_begins_type_specifier): New function.
10883 (keyword_is_storage_class_specifier): New function.
10884 (keyword_is_type_qualifier): Declare.
10885
5386338c
JM
108862010-11-19 Joseph Myers <joseph@codesourcery.com>
10887
10888 PR c/46547
10889 * c-common.c (in_late_binary_op): Define.
10890 (c_common_truthvalue_conversion): Check in_late_binary_op before
10891 calling c_save_expr.
10892 * c-common.h (in_late_binary_op): Declare.
10893
69ccdddb
JM
108942010-11-19 Joseph Myers <joseph@codesourcery.com>
10895
10896 * c-opts.c (c_common_handle_option): Update calls to
10897 set_struct_debug_option.
10898
6b192a09
NP
108992010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
10900
10901 * c-common.h (objc_declare_protocols): Added additional argument.
10902 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 10903
fb52b50a
NF
109042010-11-18 Nathan Froyd <froydnj@codesourcery.com>
10905
10906 PR c/33193
10907 * c-common.h (build_real_imag_expr): Declare.
10908 * c-semantics.c (build_real_imag_expr): Define.
10909
b37421c6
JM
109102010-11-17 Joseph Myers <joseph@codesourcery.com>
10911
10912 * c-opts.c (c_common_parse_file): Take no arguments.
10913 * c-common.h (c_common_parse_file): Update prototype.
10914
07078664
JJ
109152010-11-16 Jakub Jelinek <jakub@redhat.com>
10916
10917 PR c++/46401
10918 * c-common.c (warning_candidate_p): Don't track non-const calls
10919 or STRING_CSTs.
10920
c6a13190
ILT
109212010-11-15 Ian Lance Taylor <iant@google.com>
10922
10923 * c-lex.c (init_c_lex): Set macro debug callbacks if
10924 flag_dump_go_spec is set.
10925
925e8657
NP
109262010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
10927
10928 * c-common.h (objc_build_incr_expr_for_property_ref): New.
10929 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
10930
bb0a9581
NF
109312010-11-15 Nathan Froyd <froydnj@codesourcery.com>
10932
10933 PR preprocessor/45038
10934 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
10935 dialects.
10936
c5fa0890
JM
109372010-11-12 Joseph Myers <joseph@codesourcery.com>
10938
10939 * c-common.h (c_family_lang_mask): Declare.
10940 * c-opts.c (c_family_lang_mask): Make extern.
10941 * c-pragma.c (handle_pragma_diagnostic): Use
10942 control_warning_option.
10943
a4d8c676
JM
109442010-11-12 Joseph Myers <joseph@codesourcery.com>
10945
10946 * c-common.c (parse_optimize_options): Update call to
10947 decode_options.
10948 * c-common.h (c_common_handle_option): Update prototype.
10949 * c-opts.c (c_common_handle_option): Take location_t parameter and
10950 pass it to other functions.
10951
f954bd2c
JM
109522010-11-11 Joseph Myers <joseph@codesourcery.com>
10953
10954 * c-opts.c (warning_as_error_callback): Remove.
10955 (c_common_initialize_diagnostics): Don't call
10956 register_warning_as_error_callback.
10957 (c_common_handle_option): Handle -Werror=normalized= here.
10958
d8a07487
JM
109592010-11-10 Joseph Myers <joseph@codesourcery.com>
10960
10961 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
10962 in diagnostic.
10963 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
10964 letter.
10965 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
10966 Remove trailing '.' from diagnostics.
10967 * c.opt (Wwrite-strings_: Avoid '`' in help text.
10968
d5478783
JM
109692010-11-10 Joseph Myers <joseph@codesourcery.com>
10970
10971 * c-common.c (parse_optimize_options): Pass global_dc to
10972 decode_options.
10973 * c-opts.c (c_common_handle_option): Pass &global_options to
10974 set_Wstrict_aliasing.
10975 * c.opt (v): Don't mark Common or document here.
10976
91ebb981
IS
109772010-11-06 Iain Sandoe <iains@gcc.gnu.org>
10978
10979 PR target/44981
10980 * c-format.c (format_type): New type gcc_objc_string_format_type.
10981 (valid_stringptr_type_p): New.
10982 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 10983 (check_format_string): Pass expected type, use
91ebb981
IS
10984 valid_stringptr_type_p (), check that the format string types are
10985 consistent with the format specification.
10986 (decode_format_attr): Warn if NSString is used outside objective-c.
10987 (format_types_orig): Add NSString.
10988 (format_name): New.
10989 (format_flags): New.
10990 (check_format_arg): Handle format strings requiring an external parser.
10991 first_target_format_type: New variable.
10992 (handle_format_attribute): Set up first_target_format_type, pass the
10993 expected format arg string type to check_format_string().
ab20d992 10994 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
91ebb981
IS
10995 * stub-objc.c (objc_string_ref_type_p): New.
10996 (objc_check_format_arg): New.
10997
bede2adc
NP
109982010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
10999
9faeb493 11000 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
11001 * c-common.h (objc_build_class_component_ref): New.
11002 * stub-objc.c (objc_build_class_component_ref): New.
11003
9a179d01
NP
110042010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
11005
11006 * c.opt (Wproperty-assign-default): New option.
11007
22d8d616
NP
110082010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
11009
11010 Implemented -fobjc-std=objc1 flag.
11011 * c.opt (fobjc-std=objc1): New option.
11012
2debdb4f
NP
110132010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
11014
11015 Implemented format and noreturn attributes for Objective-C methods.
11016 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
11017 attribute for Objective-C methods.
11018
ec52b111
JM
110192010-10-31 Jason Merrill <jason@redhat.com>
11020
11021 * c-common.c (conversion_warning, warn_for_collisions_1): Use
11022 EXPR_LOC_OR_HERE.
11023
46a88c12
NP
110242010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
11025
11026 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
11027 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
11028 (objc_add_property_declaration): Removed arguments for copies and
11029 ivar.
11030 (objc_build_getter_call): Renamed to
11031 objc_maybe_build_component_ref.
11032 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
11033 (objc_is_property_ref): New.
11034 * c-common.c (c_common_reswords): Removed copies and ivar.
11035 * stub-objc.c (objc_add_property_declaration): Removed arguments
11036 for copies and ivar.
11037 (objc_build_getter_call): Renamed to
11038 objc_maybe_build_component_ref.
11039 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
11040 (objc_is_property_ref): New.
9faeb493 11041
1e4bf85b
AC
110422010-10-29 Arnaud Charlet <charlet@adacore.com>
11043 Matthew Gingell <gingell@adacore.com>
11044
11045 * c-ada-spec.c (separate_class_package): New function.
11046 (pp_ada_tree_identifier): Prefix references to C++ classes with the
11047 name of their enclosing package.
11048 (print_ada_declaration): Use separate_class_package.
11049
81f0bab2
JM
110502010-10-27 Jason Merrill <jason@redhat.com>
11051
2b08f2c5
JM
11052 * c-common.c (c_common_reswords): Add __is_literal_type.
11053 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
11054
81f0bab2
JM
11055 * c-common.c (check_case_value): Remove special C++ code.
11056
200290f2
NP
110572010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
11058
11059 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
11060 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
11061 and RID_LAST_PATTR.
11062 (objc_add_property_declaration): Added additional arguments.
11063 (objc_property_attribute_kind): Removed.
11064 (objc_set_property_attr): Removed.
11065 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
11066 copy and nonatomic.
11067 * stub-objc.c (objc_add_property_declaration): Added additional
11068 arguments.
11069 (objc_set_property_attr): Removed.
9faeb493 11070
f614132b
NP
110712010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
11072
11073 * c-common.h (objc_add_property_variable): Renamed to
11074 objc_add_property_declaration. Added location argument.
11075 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 11076
b8a18805
NP
110772010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
11078
11079 * c-common.h (objc_maybe_printable_name): New.
11080 * stub-objc.c (objc_maybe_printable_name): New.
11081
3f8257db
JJ
110822010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
11083 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
11084
11085 * c-common.h (c_common_mark_addressable_vec): Declare.
11086 * c-common.c (c_common_mark_addressable_vec): New function.
11087
249a82c4
NP
110882010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
11089
11090 * c-common.h (objc_set_method_type): Removed.
11091 (objc_add_method_declaration): Added boolean argument.
11092 (objc_start_method_definition): Same change.
11093 (objc_build_method_signature): Same change.
11094 * stub-objc.c (objc_set_method_type): Removed.
11095 (objc_add_method_declaration): Added boolean argument.
11096 (objc_start_method_definition): Same change.
11097 (objc_build_method_signature): Same change.
11098
977e30bc
NP
110992010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
11100
11101 * c-common.h (finish_file): Removed.
11102 (objc_write_global_declarations): New.
11103 * c-opts.c (c_common_parse_file): Do not call finish_file.
11104 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 11105
da57d1b9
NP
111062010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
11107
11108 Implemented parsing @synthesize and @dynamic for
11109 Objective-C/Objective-C++.
11110 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
11111 (objc_add_synthesize_declaration): New.
11112 (objc_add_dynamic_declaration): New.
11113 * c-common.c (c_common_reswords): Add synthesize and dynamic.
11114 * stub-objc.c (objc_add_synthesize_declaration): New.
11115 (objc_add_dynamic_declaration): New.
9faeb493 11116
0069111f
MM
111172010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
11118
11119 PR target/46041
11120 * c-cppbuiltin.c (mode_has_fma): Move function here from
11121 builtins.c. Don't use the fma optab, instead just use the
11122 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
11123 using -save-temps.
11124
e426b47b
NP
111252010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
11126
11127 Merge from 'apple/trunk' branch on FSF servers.
0069111f 11128
3f8257db 11129 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 11130
9faeb493 11131 Radar 4330422
e426b47b
NP
11132 * c-common.h (objc_non_volatilized_type): New declaration
11133 * stub-objc.c (objc_non_volatilized_type): New stub.
11134
90fbfdc3
NP
111352010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
11136
e426b47b 11137 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 11138
ab20d992 11139 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 11140
9faeb493 11141 Radar 4133425
90fbfdc3 11142 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 11143 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 11144
c37d8c30
IS
111452010-10-17 Iain Sandoe <iains@gcc.gnu.org>
11146
11147 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
11148 * c-common.h (enum rid): Add RID_AT_PACKAGE.
11149 (objc_ivar_visibility_kind): New enum.
11150 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 11151 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
11152 visibility enum.
11153
1b1562a5
MM
111542010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
11155
11156 * c-cppbuiltin.c (builtin_define_float_constants): Emit
11157 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
11158 has the appropriate fma builtins.
11159 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
11160
668ea4b1
IS
111612010-10-14 Iain Sandoe <iains@gcc.gnu.org>
11162
1b1562a5 11163 merge from FSF apple 'trunk' branch.
3f8257db 11164 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 11165
668ea4b1
IS
11166 Radars 4436866, 4505126, 4506903, 4517826
11167 * c-common.c (c_common_resword): Define @property and its attributes.
11168 * c-common.h: Define property attribute enum entries.
11169 (OBJC_IS_PATTR_KEYWORD): New.
11170 (objc_property_attribute_kind): New enum.
11171 Declare objc_set_property_attr (), objc_add_property_variable (),
11172 objc_build_getter_call () and objc_build_setter_call ().
11173 * stub-objc.c (objc_set_property_attr): New stub.
11174 (objc_add_property_variable): Likewise.
11175 (objc_build_getter_call): Likewise.
11176 (objc_build_setter_call) Likewise.
1b1562a5 11177
a1178b30
IS
111782010-10-13 Iain Sandoe <iains@gcc.gnu.org>
11179
1b1562a5 11180 merge from FSF apple 'trunk' branch.
ab20d992 11181 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
11182
11183 Radar 3803157 (method attributes)
11184 * c-common.c (handle_deprecated_attribute): Recognize
11185 objc methods as valid declarations.
11186 * c-common.h: Declare objc_method_decl ().
1b1562a5 11187 * stub-objc.c (objc_method_decl): New stub.
a1178b30 11188
a75bfaa6
JM
111892010-10-08 Joseph Myers <joseph@codesourcery.com>
11190
11191 * c-common.c (parse_optimize_options): Call
11192 decode_cmdline_options_to_array_default_mask before
11193 decode_options. Update arguments to decode_options.
11194 * c-common.h (c_common_init_options_struct): Declare.
11195 * c-opts.c (c_common_init_options_struct): New. Split out from
11196 c_common_init_options.
11197
f05b9d93
NP
111982010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
11199
11200 Implemented fast enumeration for Objective-C.
11201 * c-common.h (objc_finish_foreach_loop): New.
11202 * stub-objc.c (objc_finish_foreach_loop): New.
11203
1ebe4b4f
JM
112042010-10-05 Joseph Myers <joseph@codesourcery.com>
11205
11206 * c-common.h (struct diagnostic_context): Don't declare here.
11207 (c_common_initialize_diagnostics): Declare using
11208 diagnostic_context typedef.
11209 * c-opts.c (c_common_handle_option): Pass global_dc to
11210 handle_generated_option.
11211
d4d24ba4
JM
112122010-10-04 Joseph Myers <joseph@codesourcery.com>
11213
11214 * c-opts.c (c_common_handle_option): Pass &global_options_set to
11215 handle_generated_option.
11216
478a1c5b
ILT
112172010-10-03 Ian Lance Taylor <iant@google.com>
11218
11219 * c.opt (-fplan9-extensions): New option.
11220
82a1c2fe
FXC
112212010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
11222
11223 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
11224 Remove.
11225 (c_cpp_builtins): Call functions from cppbuiltin.c instead
11226 of duplicating code.
11227
92902b1b
IS
112282010-09-30 Iain Sandoe <iains@gcc.gnu.org>
11229
11230 * c-common.c: Add two new entries for @optional
11231 and @required keywords.
11232
11233 merge from FSF 'apple/trunk' branch.
3f8257db 11234 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
11235
11236 Radar 4386773
11237 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
11238 objective-c keywords.
11239 (objc_set_method_opt): New declaration.
11240 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 11241
46625112
JM
112422010-09-30 Joseph Myers <joseph@codesourcery.com>
11243
11244 * c-common.c (handle_optimize_attribute): Pass &global_options to
11245 cl_optimization_save and cl_optimization_restore.
11246 * c-opts.c (c_common_handle_option): Pass &global_options to
11247 handle_generated_option.
11248 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
11249 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
11250 &global_options to cl_optimization_restore.
11251
49b91f05
NP
112522010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
11253
11254 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
11255 Objective-C/Objective-C++ keywords.
11256
13ed556f 112572010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 11258
9faeb493
UB
11259 Merge from 'apple/trunk' branch on FSF servers.
11260
3f8257db 11261 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
11262
11263 Radar 4281748
11264 * c-common.h (objc_check_global_decl): New declaration.
11265 * stub-objc.c (objc_check_global_decl): New stub.
11266
f0036cca
JM
112672010-09-29 Joseph Myers <joseph@codesourcery.com>
11268
11269 * c.opt: Don't use VarExists.
11270
e3339d0f
JM
112712010-09-29 Joseph Myers <joseph@codesourcery.com>
11272
11273 * c-common.c (c_cpp_error): Update names of diagnostic_context
11274 members.
11275 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
11276 cl_optimization members.
11277 * c-opts.c (warning_as_error_callback, c_common_handle_option,
11278 sanitize_cpp_opts, finish_options): Update names of cpp_options
11279 members.
11280
1973201f
NP
112812010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
11282
11283 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
11284 (objc_is_reserved_word): Removed.
11285 * c-common.c: Updated comments.
11286 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
11287 objc_is_reserved_word.
11288 * stub-objc.c (objc_is_reserved_word): Removed.
11289
f7e71da5
IS
112902010-09-28 Iain Sandoe <iains@gcc.gnu.org>
11291
9faeb493 11292 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
11293 include attributes.
11294 (objc_start_method_definition): Likewise.
11295 (objc_build_keyword_decl): Likewise.
11296 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
11297 (objc_start_method_definition): Likewise.
11298 (objc_build_keyword_decl): Likewise.
11299
c165dca7
IS
113002010-09-28 Iain Sandoe <iains@gcc.gnu.org>
11301
11302 * c-common.h (objc_start_class_interface): Adjust prototype.
11303 (objc_start_category_interface): Likewise.
11304 (objc_start_protocol): Likewise.
11305 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
11306 (objc_start_class_interface): Likewise.
11307 (objc_start_category_interface): Likewise.
11308
7458026b
ILT
113092010-09-27 Ian Lance Taylor <iant@google.com>
11310
11311 * c-common.c (c_common_attribute_table): Add no_split_stack.
11312 (handle_no_split_stack_attribute): New static function.
11313
b581b85b
NP
113142010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
11315
9faeb493 11316 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 11317
3f8257db 11318 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 11319
9faeb493 11320 Radar 4229905
b581b85b
NP
11321 * c-common.h (objc_have_common_type): New declaration.
11322 * stub-objc.c (objc_have_common_type): New stub.
11323
11324 2005-06-22 Ziemowit Laski <zlaski@apple.com>
11325
11326 Radar 4154928
11327 * c-common.h (objc_common_type): New prototype.
9faeb493 11328 * stub-objc.c (objc_common_type): New stub.
b581b85b 11329
46a4da10
JH
113302010-09-24 Jan Hubicka <jh@suse.cz>
11331
11332 * c-common.c (handle_leaf_attribute): New function.
11333 (struct attribute_spec c_common_att): Add leaf.
11334
e200444e
JM
113352010-09-22 Joseph Myers <joseph@codesourcery.com>
11336
11337 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
11338 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
11339 -dump, -dump=, -imacros, -imacros=, -include, -include=,
11340 -include-barrier, -include-directory, -include-directory=,
11341 -include-directory-after, -include-directory-after=,
11342 -include-prefix, -include-prefix=, -include-with-prefix,
11343 -include-with-prefix=, -include-with-prefix-after,
11344 -include-with-prefix-after=, -include-with-prefix-before,
11345 -include-with-prefix-before=, -no-integrated-cpp,
11346 -no-line-commands, -no-standard-includes, -no-warnings, -output,
11347 -output=, -pedantic, -pedantic-errors, -preprocess,
11348 -print-missing-file-dependencies, -trace-includes, -traditional,
11349 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
11350 -user-dependencies, -verbose, -write-dependencies,
11351 -write-user-dependencies, no-integrated-cpp, traditional): New.
11352
29a80ea6
NP
113532010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
11354
11355 PR objc/23710
ac1fc2fc
NP
11356 * c-common.h (objc_start_method_definition): Return bool instead
11357 of void.
11358 * stub-objc.c (objc_start_method_definition): Return bool instead
11359 of void.
11360
113612010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
11362
11363 PR objc/25965
11364 * c-common.h (objc_get_interface_ivars): New declaration.
11365 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 11366
de621752
ILT
113672010-09-15 Ian Lance Taylor <iant@google.com>
11368
11369 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 11370 messages. Remove period at end of warning message.
de621752 11371
ba885ec5
NS
113722010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11373
11374 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
11375 (handle_alias_attribute): ... here.
11376 (handle_ifunc_attribute): New.
11377
c5ee1358
MM
113782010-09-06 Mark Mitchell <mark@codesourcery.com>
11379
11380 * c-common.h (do_warn_double_promotion): Declare.
11381 * c-common.c (do_warn_double_promotion): Define.
11382
0a0b3574
MM
113832010-09-05 Mark Mitchell <mark@codesourcery.com>
11384
11385 * c.opt (Wdouble-promotion): New.
11386
d1779886
JM
113872010-09-02 Joseph Myers <joseph@codesourcery.com>
11388
11389 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
11390 fvtable-thunks, fxref): Mark no longer supported in help text.
11391
2d2bd949
JM
113922010-09-02 Joseph Myers <joseph@codesourcery.com>
11393
11394 * c.opt (Wimport, fall-virtual, falt-external-templates,
11395 fdefault-inline, fenum-int-equiv, fexternal-templates,
11396 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
11397 fname-mangling-version-, fnew-abi, fnonnull-objects,
11398 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
11399 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
11400 applicable.
11401 (fhandle-exceptions): Mark with Alias and Warn.
11402 * c-opts.c (c_common_handle_option): Don't handle options marked
11403 as ignored.
11404
5de8299c
JM
114052010-09-02 Joseph Myers <joseph@codesourcery.com>
11406
11407 * c.opt (Wcomments, Werror-implicit-function-declaration,
11408 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
11409 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
11410 aliases.
11411 * c-common.c (option_codes): Use OPT_Wcomment instead of
11412 OPT_Wcomments.
11413 * c-opts.c (warning_as_error_callback, c_common_handle_option):
11414 Don't handle options marked as aliases.
11415
0ceb0201
RG
114162010-08-25 Richard Guenther <rguenther@suse.de>
11417
11418 * c-common.c (c_common_get_alias_set): Remove special
11419 handling for pointers.
11420
ac47786e
NF
114212010-08-20 Nathan Froyd <froydnj@codesourcery.com>
11422
11423 * c-common.c: Use FOR_EACH_VEC_ELT.
11424 * c-gimplify.c: Likewise.
11425 * c-pragma.c: Likewise.
11426
c878765b
JM
114272010-08-16 Joseph Myers <joseph@codesourcery.com>
11428
11429 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
11430 RejectDriver.
11431 (MMDX): Change back to MMD. Mark NoDriverArg instead of
11432 RejectDriver.
11433 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
11434 instead of OPT_MDX and OPT_MMDX.
11435
603349bf
JM
114362010-08-16 Joseph Myers <joseph@codesourcery.com>
11437
11438 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
11439
644fa7ac
JM
114402010-08-12 Joseph Myers <joseph@codesourcery.com>
11441
11442 * c.opt (MD, MMD): Change to MDX and MMDX.
11443 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
11444
481e1176
JM
114452010-08-11 Joseph Myers <joseph@codesourcery.com>
11446
11447 * c-opts.c (c_common_handle_option): Call handle_generated_option
11448 instead of handle_option.
11449
ac8dc9f7
NF
114502010-08-08 Nathan Froyd <froydnj@codesourcery.com>
11451
11452 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
11453 (maybe_apply_renaming_pragma): Delete unneeded declarations.
11454
4f8c876d
NF
114552010-08-08 Nathan Froyd <froydnj@codesourcery.com>
11456
11457 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
11458 (pending_redefine_extname): Change type to a VEC.
11459 (add_to_renaming_pragma_list): Update for new type of
11460 pending_redefine_extname.
ac8dc9f7 11461 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 11462
3b0c690e
AC
114632010-08-04 Arnaud Charlet <charlet@adacore.com>
11464
11465 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
11466 visited.
11467 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
11468 decide whether a type has already been declared/seen.
11469 Do not go to the original type.
11470 (dump_nested_types): New parameter forward.
11471 Generate forward declaration if needed and mark type as visited.
11472 (print_ada_declaration): Call dump_nested_types if not already done.
11473 Mark types as visited.
11474
1890bccc
JM
114752010-08-03 Joseph Myers <joseph@codesourcery.com>
11476
11477 * c.opt (-print-pch-checksum): Remove option.
11478 * c-opts.c (c_common_handle_option): Don't handle
11479 OPT_print_pch_checksum.
11480
5f20c657
JM
114812010-07-27 Joseph Myers <joseph@codesourcery.com>
11482
11483 * c-common.h (c_common_handle_option): Update prototype and return
11484 value type.
11485 * c-opts.c (c_common_handle_option): Update prototype and return
11486 value type. Update calls to handle_option and
11487 enable_warning_as_error.
11488
f551f80c
JJ
114892010-07-27 Jakub Jelinek <jakub@redhat.com>
11490
11491 PR c/45079
11492 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
11493
61ff2bdc
JM
114942010-07-27 Joseph Myers <joseph@codesourcery.com>
11495
11496 * c-common.h (c_common_missing_argument): Remove.
11497 * c-opts.c (c_common_missing_argument): Remove.
11498 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
11499 idirafter, imacros, include, isysroot, isystem, iquote): Add
11500 MissingArgError.
11501 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
11502
7a9bf9a4
JM
115032010-07-27 Joseph Myers <joseph@codesourcery.com>
11504
11505 * c-common.h (c_common_option_lang_mask,
11506 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
11507 New.
11508 (c_common_init_options): Update prototype.
11509 * c-opts.c (c_common_option_lang_mask): New.
11510 (c_common_initialize_diagnostics): Split out of
11511 c_common_init_options.
11512 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
11513 New.
11514 (c_common_init_options): Update prototype. Use decoded options in
11515 search for -lang-asm.
11516
910ad8de
NF
115172010-07-15 Nathan Froyd <froydnj@codesourcery.com>
11518
11519 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
11520 * c-format.c: Likewise.
11521
718f9c0f
MLI
115222010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
11523
11524 * c-common.h: Include diagnostic-core.h. Error if already
11525 included.
11526 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
11527
4d451982
MLI
115282010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
11529
adfac8df 11530 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
11531 Do not include expr.h
11532 (vector_mode_valid_p): Move here.
11533
119fe915
SB
115342010-06-21 DJ Delorie <dj@redhat.com>
11535
11536 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
11537 allow these pragmas anywhere.
11538
115392010-06-14 Jakub Jelinek <jakub@redhat.com>
11540
11541 PR bootstrap/44509
11542 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
11543 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
11544 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
11545 ggc_strdup instead of xstrdup.
11546
115472010-06-10 Jakub Jelinek <jakub@redhat.com>
11548
11549 * c-cppbuiltin.c: Include cpp-id-data.h.
11550 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
11551 (lazy_hex_fp_value): New function.
11552 (builtin_define_with_hex_fp_value): Provide definitions lazily.
11553
6662d794
MLI
115542010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11555
11556 * c-gimplify.c: Do not include tree-flow.h
11557
38f8b050
JR
115582010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
11559
11560 PR other/44034
11561 * c-common.c: Rename targetm member:
11562 targetm.enum_va_list -> targetm.enum_va_list_p
11563
9589f23e
AS
115642010-06-28 Anatoly Sokolov <aesok@post.ru>
11565
11566 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
11567
3b06d379
SB
115682010-06-28 Steven Bosscher <steven@gcc.gnu.org>
11569
11570 * c-cppbuiltin.c: Do not include except.h.
11571
d166d4c3
AK
115722010-06-24 Andi Kleen <ak@linux.intel.com>
11573
9faeb493
UB
11574 * c-common.c (warn_for_omitted_condop): New.
11575 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 11576
70cb8be6
JM
115772010-06-21 Joseph Myers <joseph@codesourcery.com>
11578
11579 * c.opt (lang-objc): Remove.
11580 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
11581
a4c97feb
JR
115822010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
11583
11584 * c-opts.c: Include "tm_p.h".
11585
6e2f1956
JM
115862010-06-20 Joseph Myers <joseph@codesourcery.com>
11587
11588 * c-common.c (parse_optimize_options): Update call to
11589 decode_options.
11590
bc87224e
NF
115912010-06-18 Nathan Froyd <froydnj@codesourcery.com>
11592
11593 * c-common.c (record_types_used_by_current_var_decl): Adjust for
11594 new type of types_used_by_cur_var_decl.
11595
b49cf425
JR
115962010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
11597
11598 PR bootstrap/44512
11599 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
11600 for C++ standard compliance.
11601
59f9c2ed
JM
116022010-06-16 Jason Merrill <jason@redhat.com>
11603
11604 * c.opt: Add -Wnoexcept.
11605
33766b66
RG
116062010-06-16 Richard Guenther <rguenther@suse.de>
11607
11608 PR c/44555
11609 * c-common.c (c_common_truthvalue_conversion): Remove
11610 premature and wrong optimization concering ADDR_EXPRs.
11611
eff7e30c
AC
116122010-06-15 Arnaud Charlet <charlet@adacore.com>
11613
11614 * c-ada-spec.c (dump_sloc): Remove column info.
11615 (is_simple_enum): New function.
11616 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
11617 enum types when relevant.
11618
6312e84d
MLI
116192010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
11620
9faeb493 11621 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
11622 location.
11623
1cb42611
JM
116242010-06-10 Joseph Myers <joseph@codesourcery.com>
11625
11626 * c-opts.c (c_common_handle_option): Don't handle
11627 OPT_fshow_column.
11628
a9429e29
LB
116292010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
11630
11631 * c-pragma.c (push_alignment): Use typed GC allocation.
11632 (handle_pragma_push_options): Likewise.
11633
11634 * c-common.c (parse_optimize_options): Likewise.
11635
11636 * c-common.h (struct sorted_fields_type): Add variable_size GTY
11637 option.
11638
5498f011
JM
116392010-06-07 Joseph Myers <joseph@codesourcery.com>
11640
11641 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
11642 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
11643 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
11644 flag_signed_bitfields, warn_strict_null_sentinel,
11645 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
11646 flag_gen_declaration, flag_no_gnu_keywords,
11647 flag_implement_inlines, flag_implicit_templates,
11648 flag_implicit_inline_templates, flag_optional_diags,
11649 flag_elide_constructors, flag_default_inline, flag_rtti,
11650 flag_conserve_space, flag_access_control, flag_check_new,
11651 flag_new_for_scope, flag_weak, flag_working_directory,
11652 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
11653 flag_enforce_eh_specs, flag_threadsafe_statics,
11654 flag_pretty_templates): Remove.
11655 * c-common.h (flag_preprocess_only, flag_nil_receivers,
11656 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
11657 flag_replace_objc_classes, flag_undef, flag_no_builtin,
11658 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
11659 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
11660 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
11661 flag_no_gnu_keywords, flag_implement_inlines,
11662 flag_implicit_templates, flag_implicit_inline_templates,
11663 flag_optional_diags, flag_elide_constructors, flag_default_inline,
11664 flag_rtti, flag_conserve_space, flag_access_control,
11665 flag_check_new, flag_new_for_scope, flag_weak,
11666 flag_working_directory, flag_use_cxa_atexit,
11667 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
11668 flag_threadsafe_statics, flag_pretty_templates,
11669 warn_strict_null_sentinel): Remove.
11670 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
11671 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
11672 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
11673 fimplicit-inline-templates, fimplicit-templates,
11674 flax-vector-conversions, fms-extensions, fnil-receivers,
11675 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
11676 frtti, fshort-double, fshort-enums, fshort-wchar,
11677 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
11678 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
11679 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
11680 gen-decls, undef): Use Var.
11681 (fdefault-inline, foptional-diags): Document as doing nothing.
11682 * c-opts.c (c_common_handle_option): Remove cases for options now
11683 using Var. Mark ignored options as such.
11684
39dabefd
SB
116852010-06-05 Steven Bosscher <steven@gcc.gnu.org>
11686
9faeb493 11687 * c-common.c: Moved to here from parent directory.
39dabefd
SB
11688 * c-common.def: Likewise.
11689 * c-common.h: Likewise.
11690 * c-cppbuiltin.c: Likewise.
11691 * c-dump.c: Likewise.
11692 * c-format.c: Likewise.
11693 * c-format.h : Likewise.
11694 * c-gimplify.c: Likewise.
11695 * c-lex.c: Likewise.
11696 * c-omp.c: Likewise.
11697 * c.opt: Likewise.
11698 * c-opts.c: Likewise.
11699 * c-pch.c: Likewise.
11700 * c-ppoutput.c: Likewise.
11701 * c-pragma.c: Likewise.
11702 * c-pragma.h: Likewise.
11703 * c-pretty-print.c: Likewise.
11704 * c-pretty-print.h: Likewise.
11705 * c-semantics.c: Likewise.
11706 * stub-objc.c: Likewise.
11707
11708 * c-common.c: Include gt-c-family-c-common.h.
11709 * c-pragma.c: Include gt-c-family-c-pragma.h.
11710\f
8d9254fc 11711Copyright (C) 2010-2020 Free Software Foundation, Inc.
39dabefd
SB
11712
11713Copying and distribution of this file, with or without modification,
11714are permitted in any medium without royalty provided the copyright
11715notice and this notice are preserved.