]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
Daily bump.
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
1e2c9a27
GA
12020-11-24 Martin Sebor <msebor@redhat.com>
2
3 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
4
8e6198d0
GA
52020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6
7 * c-attribs.c (handle_special_var_sec_attribute): New.
8 (handle_noinit_attribute): Remove.
9 (attr_noinit_exclusions): Rename to...
10 (attr_section_exclusions): ...this, and add "persistent" attribute
11 exclusion.
12 (c_common_attribute_table): Add "persistent" attribute.
13
7a97e2fc
GA
142020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
15
16 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
17 Treat opaque types like other types.
18 (c_pretty_printer::direct_abstract_declarator): Opaque types are
19 supported types.
20
82e5048e
GA
212020-11-20 Martin Sebor <msebor@redhat.com>
22
23 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
24 with fewer arguments.
25
262020-11-20 Martin Sebor <msebor@redhat.com>
27
28 PR middle-end/97879
29 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
30 Error out on invalid modes.
31
322020-11-20 Jakub Jelinek <jakub@redhat.com>
33
34 PR libstdc++/88101
35 * c-common.c (check_builtin_function_arguments): Handle
36 BUILT_IN_CLEAR_PADDING.
37
25bb75f8
GA
382020-11-18 Nathan Sidwell <nathan@acm.org>
39
40 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
41
4dabb037
GA
422020-11-17 Nathan Sidwell <nathan@acm.org>
43
44 * c-common.h (enum c_tree_index): Reorder to place lazy fields
45 after newly-added CTI_MODULE_HWM.
46
472020-11-17 Joseph Myers <joseph@codesourcery.com>
48
49 * c-cppbuiltin.c (builtin_define_float_constants): Define
50 "*_IS_IEC_60559__" macros.
51
522020-11-17 Nathan Sidwell <nathan@acm.org>
53
54 * c-lex.c: #include "langhooks.h".
55 (cb_undef): Maybe call preprocess_undef lang hook.
56 * c-opts.c (c_common_post_options): Maybe call preprocess_options
57 lang hook.
58 (push_command_line_include): Maybe call preprocess_main_file lang
59 hook.
60 (cb_file_change): Likewise.
61 * c-ppoutput.c: #include "langhooks.h.
62 (scan_translation_unit): Maybe call preprocess_token lang hook.
63 (class do_streamer): New, derive from token_streamer.
64 (directives_only_cb): Data pointer is do_streamer, call
65 preprocess_token lang hook.
66 (scan_translation_unit_directives_only): Use do_streamer.
67 (print_line_1): Move src_line recording to after string output.
68 (cb_undef): Maybe call preprocess_undef lang hook.
69
702020-11-17 Nathan Sidwell <nathan@acm.org>
71
72 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
73 code duplicating that functionality.
74
752020-11-17 Jakub Jelinek <jakub@redhat.com>
76
77 PR c/90628
78 * c-common.c (check_builtin_function_arguments)
79 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
80 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
81 for more builtins and argument positions.
82
29c5d9ce
GA
832020-11-16 Iain Sandoe <iain@sandoe.co.uk>
84
85 PR objc/97854
86 * stub-objc.c: Include c-common.h to declare enum rid.
87
77f67db2
GA
882020-11-13 Jakub Jelinek <jakub@redhat.com>
89
90 PR c++/63287
91 * c-cppbuiltin.c: Include configargs.h.
92 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
93 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
94 "single".
95
962020-11-13 Gergö Barany <gergo@codesourcery.com>
97 Thomas Schwinge <thomas@codesourcery.com>
98
99 * c.opt (fopenacc-kernels): Add.
100
1012020-11-13 Jason Merrill <jason@redhat.com>
102
103 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
104
1052020-11-13 Piotr H. Dabrowski <phd@phd.re>
106
107 PR c++/91318
108 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
109
1102020-11-13 Martin Liska <mliska@suse.cz>
111
112 * c-attribs.c (build_attr_access_from_parms): Format properly.
113
1142020-11-13 Iain Sandoe <iain@sandoe.co.uk>
115
116 PR objc/90707
117 * c-common.c (c_common_reswords): null_unspecified, nullable,
118 nonnull, null_resettable: New keywords.
119 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
120 RID_NONNULL, RID_NULL_RESETTABLE: New.
121 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
122 ranges accepted for property attributes.
123 * c-attribs.c (handle_objc_nullability_attribute): New.
124 * c-objc.h (enum objc_property_attribute_group): Add
125 OBJC_PROPATTR_GROUP_NULLABLE.
126 (enum objc_property_attribute_kind):Add
127 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
128 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
129
1302020-11-13 Iain Sandoe <iain@sandoe.co.uk>
131
132 PR objc/77404
133 * c-attribs.c (handle_objc_root_class_attribute): New
134 * c-objc.h (objc_start_class_interface): Add a location
135 value for the position of the class name.
136 * c.opt: Add Wobjc-root-class.
137 * stub-objc.c (objc_start_class_interface): Add a location
138 value for the position of the class name.
139
a5a11525
GA
1402020-11-12 Joseph Myers <joseph@codesourcery.com>
141
142 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
143 Allow scope for C. Handle standard attributes for C. Do not
144 accept unscoped attributes if std_syntax and not handled as
145 standard attributes.
146 * c-common.h (c_common_has_attribute): Update prototype.
147
1482020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
149
150 PR pch/86674
151 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
152 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
153
0f5f9ed5
GA
1542020-11-11 Patrick Palka <ppalka@redhat.com>
155
156 PR c++/88115
157 * c-opts.c (c_common_post_options): Update latest_abi_version.
158
bb622641
GA
1592020-11-10 Jakub Jelinek <jakub@redhat.com>
160
161 PR c/97748
162 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
163 to false.
164 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
165 recursively and just return true instead of warning if it is true.
166 Handle COMPLEX_EXPR.
167
1682020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
169
170 * c-common.h (c_omp_adjust_map_clauses): New declaration.
171 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
172 (c_omp_adjust_map_clauses): New function.
173
2bee28dd
GA
1742020-11-09 Marek Polacek <polacek@redhat.com>
175
176 DR 1914
177 * c-common.c (attribute_fallthrough_p): Tweak the warning
178 message.
179
1802020-11-09 Patrick Palka <ppalka@redhat.com>
181
182 * c-pragma.c (handle_pragma_diagnostic): Split the
183 unknown-option -Wpragmas diagnostic into a warning and a
184 subsequent note containing a spelling suggestion. Avoid
185 computing the suggestion if -Wpragmas warnings are being
186 suppressed.
187
1882020-11-09 Patrick Palka <ppalka@redhat.com>
189
190 PR testsuite/97117
191 * c-indentation.c (get_visual_column): Remove location_t
192 parameter. Move the column-tracking diagnostic code from here
193 to ...
194 (should_warn_for_misleading_indentation): ... here, before the
195 early exit for when the loci are not all distinct. Don't pass a
196 location_t argument to get_visual_column.
197 (assert_get_visual_column_succeeds): Don't pass a location_t
198 argument to get_visual_column.
199 (assert_get_visual_column_fails): Likewise.
200
fb95de7a
GA
2012020-11-08 Iain Sandoe <iain@sandoe.co.uk>
202
203 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
204 of keywords accepted in @property attribute contexts.
205 * c-objc.h (enum objc_property_attribute_group): Add
206 OBJC_PROPATTR_GROUP_CLASS.
207 (enum objc_property_attribute_kind): Add
208 OBJC_PROPERTY_ATTR_CLASS.
209
2da7ee05
GA
2102020-11-07 Iain Sandoe <iain@sandoe.co.uk>
211
212 * c-common.c (c_common_reswords): Add 'atomic' property
213 attribute.
214 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
215 property attributes.
216
2172020-11-07 Iain Sandoe <iain@sandoe.co.uk>
218
219 * c-attribs.c (handle_nsobject_attribute): New.
220 * c.opt: Add WNSObject-attribute.
221
44cab2d8
GA
2222020-11-06 Iain Sandoe <iain@sandoe.co.uk>
223
224 * c-objc.h (enum objc_property_attribute_group): New
225 (enum objc_property_attribute_kind): New.
226 (OBJC_PROPATTR_GROUP_MASK): New.
227 (struct property_attribute_info): Small class encapsulating
228 parser output from property attributes.
229 (objc_prop_attr_kind_for_rid): New
230 (objc_add_property_declaration): Simplify interface.
231 * stub-objc.c (enum rid): Dummy type.
232 (objc_add_property_declaration): Simplify interface.
233 (objc_prop_attr_kind_for_rid): New.
234
2352020-11-06 Nathan Sidwell <nathan@acm.org>
236
237 * c-ada-spec.c (collect_ada_nodes): Rename
238 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
239 (collect_ada_node): Likewise.
240 (dump_forward_type): Likewise.
241 * c-common.c (set_underlying_type): Rename
242 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
243 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
244
2452020-11-06 Jakub Jelinek <jakub@redhat.com>
246
247 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
248
0cfd9109
GA
2492020-11-05 Marek Polacek <polacek@redhat.com>
250
251 PR c++/97675
252 * c.opt (Wexceptions): New option.
253
2542020-11-05 Marek Polacek <polacek@redhat.com>
255
256 PR c++/25814
257 * c.opt (Wvexing-parse): New option.
258
35c125cb
GA
2592020-11-04 Jakub Jelinek <jakub@redhat.com>
260
261 PR c++/97670
262 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
263 underlying decl to clear in the allocate_head bitmap.
264
2652020-11-04 Iain Sandoe <iain@sandoe.co.uk>
266
267 * c-objc.h (objc_non_constant_expr_p): New.
268 * stub-objc.c (objc_non_constant_expr_p): New.
269
fd2325ea
GA
2702020-11-03 Nathan Sidwell <nathan@acm.org>
271
272 * c.opt (MQ,MT): Reword description to be make-agnostic.
273
88ce3d5f
GA
2742020-11-02 Nathan Sidwell <nathan@acm.org>
275
276 * c-opts.c (c_common_post_options): Move var decl to its
277 initialization point.
278
2792020-11-01 Iain Sandoe <iain@sandoe.co.uk>
280
281 * c-lex.c (c_lex_with_flags): When combining '@' with a
282 keyword for Objective-C, combine the location ranges too.
283
2842020-10-30 Qing Zhao <qing.zhao@oracle.com>
285 H.J.Lu <hjl.tools@gmail.com>
286
287 * c-attribs.c (c_common_attribute_table): Add new attribute
288 zero_call_used_regs.
289 (handle_zero_call_used_regs_attribute): New function.
290
e93aae4a
GA
2912020-10-28 Marek Polacek <polacek@redhat.com>
292
293 PR c++/97573
294 * c-opts.c (c_common_post_options): In C++20, turn on
295 -Wdeprecated-enum-enum-conversion and
296 -Wdeprecated-enum-float-conversion.
297 * c.opt (Wdeprecated-enum-enum-conversion,
298 Wdeprecated-enum-float-conversion): New options.
299 (Wenum-conversion): Allow for C++ too.
300
3012020-10-28 Jakub Jelinek <jakub@redhat.com>
302
303 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
304 * c-omp.c: Include bitmap.h.
305 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
306
f19e7c8d
GA
3072020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
308
309 * c-common.c (__is_nothrow_assignable): New.
310 (__is_nothrow_constructible): Likewise.
311 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
312 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
313
efe71fcc
GA
3142020-10-23 Jan Hubicka <hubicka@ucw.cz>
315
316 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
317
3182020-10-23 Marek Polacek <polacek@redhat.com>
319
320 PR c++/91741
321 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
322 (c_common_init_ts): Likewise.
323 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
324 * c-common.h (maybe_warn_sizeof_array_div): Declare.
325 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
326 (maybe_warn_sizeof_array_div): New function.
327 * c.opt (Wsizeof-array-div): New option.
328
3292020-10-23 Martin Sebor <msebor@redhat.com>
330
331 PR c/97463
332 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
333
56ddd5e2
GA
3342020-10-22 Martin Liska <mliska@suse.cz>
335
336 PR c/94722
337 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
338 (handle_stack_protect_attribute): Add error message for a
339 no_stack_protector function.
340
3412020-10-22 Martin Liska <mliska@suse.cz>
342
343 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
344
3452020-10-22 Jan Hubicka <hubicka@ucw.cz>
346
347 * c-gimplify.c: Include tree-nested.h
348 (c_genericize): Update for new nested function info.
349
b2698c21
GA
3502020-10-14 Martin Sebor <msebor@redhat.com>
351
352 PR c/97413
353 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
354 bounds in an extra list.
355
7e9282ae
GA
3562020-10-05 Richard Biener <rguenther@suse.de>
357 Jakub Jelinek <jakub@redhat.com>
358
359 PR c++/97197
360 * c-pretty-print.c: Include langhooks.h.
361 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
362 expression.
363 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
364 unary_expression.
365 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
366
660bfe61
GA
3672020-09-30 Martin Sebor <msebor@redhat.com>
368
369 PR middle-end/97189
370 * c-attribs.c (append_access_attr): Use the function declaration
371 location for a warning about an attribute access argument.
372
93bca37c
GA
3732020-09-29 Marek Polacek <polacek@redhat.com>
374
375 PR c++/94695
376 * c.opt (Wrange-loop-construct): New option.
377
82b77dee
GA
3782020-09-23 Martin Sebor <msebor@redhat.com>
379
380 PR c/97131
381 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
382
3832020-09-23 Marek Polacek <polacek@redhat.com>
384
385 PR c/97125
386 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
387 after loops and other structured control constructs have been lowered.
388
521d2711
GA
3892020-09-22 Jakub Jelinek <jakub@redhat.com>
390
391 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
392 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
393
44135373
GA
3942020-09-21 Marek Polacek <polacek@redhat.com>
395
396 * c.opt (Wctad-maybe-unsupported): New option.
397
2fe5b7d1
GA
3982020-09-19 Martin Sebor <msebor@redhat.com>
399
400 PR c/50584
401 * c-common.h (warn_parm_array_mismatch): Declare new function.
402 (has_attribute): Move declaration of an existing function.
403 (build_attr_access_from_parms): Declare new function.
404 * c-warn.c (parm_array_as_string): Define new function.
405 (plus_one): Define new function.
406 (warn_parm_ptrarray_mismatch): Define new function.
407 (warn_parm_array_mismatch): Define new function.
408 (vla_bound_parm_decl): New function.
409 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
410 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
411 qualifiers here...
412 (c_pretty_printer::direct_abstract_declarator): ...but instead print
413 them in brackets here. Also print [static]. Strip extraneous
414 expressions from VLA bounds.
415
4162020-09-19 Martin Sebor <msebor@redhat.com>
417
418 PR c/50584
419 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
420 (handle_argspec_attribute): New function.
421 (get_argument, get_argument_type): New functions.
422 (append_access_attrs): Add overload. Handle internal attribute
423 representation in addition to external.
424 (handle_access_attribute): Handle internal attribute representation
425 in addition to external.
426 (build_attr_access_from_parms): New function.
427
4282020-09-19 Sandra Loosemore <sandra@codesourcery.com>
429
430 * c-gimplify.c (genericize_c_loop): Rewrite to match
431 c_finish_loop in c-typeck.c.
432
4332020-09-19 Sandra Loosemore <sandra@codesourcery.com>
434
435 * c-common.c (c_block_may_fallthrough): New, split from
436 cxx_block_may_fallthrough in the cp front end.
437 (c_common_init_ts): Move handling of loop and switch-related
438 statements here from the cp front end.
439 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
440 cp front end.
441 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
442 * c-common.h (c_block_may_fallthru): Declare.
443 (bc_state_t): Move here from cp front end.
444 (save_bc_state, restore_bc_state): Declare.
445 (c_genericize_control_stmt): Declare.
446 (WHILE_COND, WHILE_BODY): Likewise.
447 (DO_COND, DO_BODY): Likewise.
448 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
449 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
450 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
451 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
452 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
453 * c-dump.c (dump_stmt): Copy from cp front end.
454 (c_dump_tree): Move code to handle structured loop and switch
455 tree nodes here from cp front end.
456 * c-gimplify.c: Adjust includes.
457 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
458 cp front end.
459 (save_bc_state, restore_bc_state): New functions using old code
460 from cp front end.
461 (get_bc_label, expr_loc_or_loc): Move from cp front end.
462 (genericize_c_loop): Move from cp front end.
463 (genericize_for_stmt, genericize_while_stmt): Likewise.
464 (genericize_do_stmt, genericize_switch_stmt): Likewise.
465 (genericize_continue_stmt, genericize_break_stmt): Likewise.
466 (genericize_omp_for_stmt): Likewise.
467 (c_genericize_control_stmt): New function using code split from
468 cp front end.
469 (c_genericize_control_r): New.
470 (c_genericize): Call walk_tree with c_genericize_control_r.
471 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
472 structured loop and switch tree nodes here from cp front end.
473
2aad20c0
GA
4742020-09-17 Patrick Palka <ppalka@redhat.com>
475
476 PR c/80076
477 * c-indentation.c (should_warn_for_misleading_indentation): Move
478 declarations of local variables closer to their first use.
479 Handle virtual token locations by resolving them to their
480 respective macro expansion points. If all three tokens are
481 produced from the same macro expansion, then instead use their
482 loci within the macro definition.
483
ecde1b0a
GA
4842020-09-16 Martin Sebor <msebor@redhat.com>
485
486 PR c/78666
487 PR c/96126
488 * c-attribs.c (validate_attr_args): New function.
489 (validate_attr_arg): Same.
490 (handle_section_attribute): Call it. Introduce a local variable.
491 (handle_alloc_size_attribute): Same.
492 (handle_alloc_align_attribute): Same.
493
50a71cd0
GA
4942020-09-14 Jakub Jelinek <jakub@redhat.com>
495
496 * c-attribs.c (handle_optimize_attribute): Adjust
497 cl_optimization_save, cl_optimization_restore and
498 build_optimization_node callers.
499 * c-pragma.c (handle_pragma_optimize): Adjust
500 build_optimization_node caller.
501 (handle_pragma_push_options): Adjust
502 build_optimization_node and build_target_option_node callers.
503 (handle_pragma_pop_options, handle_pragma_reset_options):
504 Adjust cl_optimization_restore callers.
505
8f7ea26a
GA
5062020-08-28 Martin Sebor <msebor@redhat.com>
507
508 * c.opt (Wstringop-overread): New option.
509
a6493809
GA
5102020-08-11 Jakub Jelinek <jakub@redhat.com>
511
512 PR c/96545
513 * c-common.c (get_atomic_generic_size): Require that first argument's
514 type points to a complete type and use tree_fits_uhwi_p instead of
515 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
516
48cc2e46
GA
5172020-07-31 Martin Sebor <msebor@redhat.com>
518
519 PR c++/96003
520 * c-common.c (check_function_arguments_recurse): Return early when
521 no-warning bit is set.
522
5232020-07-31 Richard Biener <rguenther@suse.de>
524
525 PR debug/96383
526 * c-common.h (c_common_finalize_early_debug): Declare.
527 * c-common.c: Include debug.h.
528 (c_common_finalize_early_debug): finalize_early_debug langhook
529 implementation generating debug for extern declarations.
530
e71dab87
GA
5312020-07-27 Nathan Sidwell <nathan@acm.org>
532
533 * c-common.c (try_to_locate_new_include_insertion_point): Use
534 strcmp, not pointer equality.
535
ae2e0bc1
GA
5362020-07-25 Martin Sebor <msebor@redhat.com>
537
538 PR c++/96310
539 * c-common.c (check_nonnull_arg): Print note only when warning was
540 issued.
541
3ea9abca
GA
5422020-07-22 Tobias Burnus <tobias@codesourcery.com>
543
544 * c-omp.c (c_finish_omp_critical): Check for no name but
545 nonzero hint provided.
546
0933f508
GA
5472020-07-20 Jason Merrill <jason@redhat.com>
548
549 * c-cppbuiltin.c (c_cpp_builtins): Update
550 __cpp_nontype_template_args for C++20.
551
5522020-07-20 Martin Sebor <msebor@redhat.com>
553
554 PR c/96249
555 * c.opt: Remove stray text.
556
8ca07a30
GA
5572020-07-14 Lewis Hyatt <lhyatt@gmail.com>
558
559 PR other/86904
560 * c-indentation.c (should_warn_for_misleading_indentation): Get
561 global tabstop from the new source.
562 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
563 is now a common option.
564 * c.opt: Likewise.
565
a82c4c4c 5662020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
567
568 * c.opt (Wscalar-storage-order): Add explicit variable.
569
f60ee68d
GA
5702020-07-07 Nathan Sidwell <nathan@acm.org>
571
572 * c-opts.c (c_common_post_options): Add 'injecting' arg to
573 cpp_read_main_file.
574 (c_finish_options): Add linemap_line_start calls for builtin and cmd
575 maps. Force token position to line_table's highest line.
576 * c-ppoutput.c (print_line_1): Refactor, print line zero.
577 (cb_define): Always increment source line.
578
4077d74c
GA
5792020-07-06 Martin Sebor <msebor@redhat.com>
580
581 PR c++/95984
582 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
583 to stub lambda objects with null this pointer.
584 (check_nonnull_arg): Handle C++ nullptr.
585
b5f24739
GA
5862020-07-02 Jason Merrill <jason@redhat.com>
587 Jakub Jelinek <jakub@redhat.com>
588
589 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
590
46fbb6c6
GA
5912020-06-30 Jakub Jelinek <jakub@redhat.com>
592
593 PR c++/95963
594 * c-common.c (check_function_arguments_recurse): Don't crash on
595 calls to internal functions.
596
69273534
GA
5972020-06-28 Martin Sebor <msebor@redhat.com>
598
599 PR c++/86568
600 * c-common.c (struct nonnull_arg_ctx): Add members.
601 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
602 C++ member functions specially. Consider the this pointer implicitly
603 nonnull.
604 (check_nonnull_arg): Use location of argument when available.
605 (check_function_arguments): Use nonnull_arg_ctx as argument.
606
9a33c41f
GA
6072020-06-27 Jakub Jelinek <jakub@redhat.com>
608
609 PR middle-end/95903
610 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
611 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
612 smaller precision intop operands separately.
613
c9c05f73
GA
6142020-06-26 Marek Polacek <polacek@redhat.com>
615
616 * c-opts.c (c_common_init_options): Default to gnu++17.
617
aff95ee7
GA
6182020-06-17 Jonathan Wakely <jwakely@redhat.com>
619
bd0a89dc 620 PR c/95378
aff95ee7
GA
621 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
622 pointer arguments.
623
56638b9b
GA
6242020-06-16 Jakub Jelinek <jakub@redhat.com>
625
626 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
627 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
628 idx members.
629 (c_omp_is_loop_iterator): New function.
630 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
631 if outer loop iterator is present. Perform duplicate checking through
632 hash_set in the function rather than expecting caller to do that.
633 Pass NULL instead of d->ppset to walk_tree_1.
634 (c_omp_check_nonrect_loop_iv): New function.
635 (c_omp_check_loop_iv): Use it. Fill in new members, allow
636 non-rectangular loop forms, diagnose multiple associated loops with
637 the same iterator. Pass NULL instead of &pset to walk_tree_1.
638 (c_omp_check_loop_iv_exprs): Likewise.
639
ec6ffbb9
GA
6402020-06-10 Martin Liska <mliska@suse.cz>
641
642 PR tree-optimization/92860
643 * c-attribs.c (handle_optimize_attribute):
644 Save global options and compare it after parsing of function
645 attribute.
646 * c-pragma.c (opt_stack::saved_global_options): New field.
647 (handle_pragma_push_options): Save global_options.
648 (handle_pragma_pop_options): Compare them after pop.
649
b952c2cf
GA
6502020-06-09 Jakub Jelinek <jakub@redhat.com>
651
652 PR c/95580
653 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
654 case when MEM_REF's first argument has type pointer to incomplete type.
655
1a59f3db
GA
6562020-06-05 Jason Merrill <jason@redhat.com>
657
658 * c-pretty-print.c (pp_c_additive_expression): Handle negative
659 operand to POINTER_PLUS_EXPR.
660
3add3425
GA
6612020-06-04 Martin Sebor <msebor@redhat.com>
662
663 PR middle-end/10138
664 PR middle-end/95136
665 * c-attribs.c (append_access_attrs): Handle attr_access::none.
666 (handle_access_attribute): Same.
667
9a5b7438
GA
6682020-06-03 Mark Wielaard <mark@klomp.org>
669
670 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
671 New function.
672 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
673 New function declaration.
674
6752020-06-03 Mark Wielaard <mark@klomp.org>
676
677 * known-headers.cc (get_string_macro_hint): New function.
678 (get_stdlib_header_for_name): Use get_string_macro_hint.
679 (get_c_stdlib_header_for_string_macro_name): New function.
680 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
681 New function declaration.
682
6832020-06-03 Tobias Burnus <tobias@codesourcery.com>
684
685 * c-common.h (c_omp_predetermined_mapping): Declare.
686 * c-omp.c (c_omp_predetermined_mapping): New.
687
af114c38
MW
6882020-05-22 Mark Wielaard <mark@klomp.org>
689
690 * known-headers.cc (get_stdlib_header_for_name): Add a new
691 stdlib_hint array for stdbool and stdint.
692
45c50b6a
MW
6932020-05-22 Mark Wielaard <mark@klomp.org>
694
695 * known-headers.cc (get_stdlib_header_for_name): Return
696 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
697 flag_isoc99.
698
c22027a0
NS
6992020-05-20 Nathan Sidwell <nathan@acm.org>
700
38a4db21
NS
701 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
702
c22027a0
NS
703 * c-common.c (try_to_locate_new_include_insertion_point): Use
704 strcmp to compare filenames.
705 * c-lex.c (init_c_lex): Move declaration to initialization.
706 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
707 deferred count loop.
708
29f0e90d
JM
7092020-05-15 Jason Merrill <jason@redhat.com>
710
711 * c-opts.c (set_std_cxx20): Set flag_coroutines.
712
b04445d4
JM
7132020-05-13 Jason Merrill <jason@redhat.com>
714
715 * c.opt (std=c++20): Make c++2a the alias.
716 (std=gnu++20): Likewise.
717 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
718 * c-opts.c: Adjust.
719 * c-cppbuiltin.c: Adjust.
720 * c-ubsan.c: Adjust.
721 * c-warn.c: Adjust.
722
11dd3be5
EB
7232020-05-12 Eric Botcazou <ebotcazou@adacore.com>
724
725 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
726
b224c376
NS
7272020-05-08 Nathan Sidwell <nathan@acm.org>
728
729 Reimplement directives only processing.
730 * c-ppoutput.c (token_streamer): Ne.
731 (directives_only_cb): New. Swallow ...
732 (print_lines_directives_only): ... this.
733 (scan_translation_unit_directives_only): Reimplment using the
734 published interface.
735
f1d94677
MP
7362020-05-07 Marek Polacek <polacek@redhat.com>
737
738 * c-format.c (badwords): Add "nonstatic".
739
9b95bb52
JJ
740202-05-07 Jakub Jelinek <jakub@redhat.com>
741
742 PR c/94968
743 * c-common.c (speculation_safe_value_resolve_params): Return false if
744 error_operand_p (val2).
745 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
746 Remove extraneous semicolon.
747
530b4409 7482020-05-06 qing zhao <qing.zhao@oracle.com>
749
750 PR c/94230
751 * c-indentation.c (get_visual_column): Add a hint to use the new
752 -flarge-source-files option.
753
b776bdca
SSF
7542020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
755
756 * c-attribs.c (handle_vector_size_attribute): Add attribute
757 nonnull for argument args in order to silence warning of
758 uninitialized variable usage. Since this is local to the
759 compilation unit and thus cannot be checked at call sides by the
760 compiler, added an assert statement in order to verify this.
761
6607bdd9
L
7622020-05-01 H.J. Lu <hongjiu.lu@intel.com>
763
764 PR target/93492
765 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
766 value to USHRT_MAX (65535).
767
691eeb65
JJ
7682020-04-29 Jakub Jelinek <jakub@redhat.com>
769
770 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
771
26d76be7
JJ
7722020-04-27 Jakub Jelinek <jakub@redhat.com>
773
774 PR c/94755
775 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
776 fncode == BUILT_IN_NONE before initialization of first_param.
777
7291b2ed
MP
7782020-04-23 Marek Polacek <polacek@redhat.com>
779
780 PR c++/94733
781 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
782 TREE_PURPOSE.
783
58a29af8
PP
7842020-04-14 Patrick Palka <ppalka@redhat.com>
785
786 PR c++/85278
787 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
788 ampersand if it's an rvalue reference type.
789
09f04139
MS
7902020-04-13 Martin Sebor <msebor@redhat.com>
791
792 PR c/92326
793 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
794 printing array bound for flexible array members.
795
ee26baf4
IS
7962020-04-13 Iain Sandoe <iain@sandoe.co.uk>
797
798 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
799 define, per n4861.
800
75efe9cb
RB
8012020-04-02 Richard Biener <rguenther@suse.de>
802
803 PR c/94392
804 * c-opts.c (c_common_post_options): Enable -ffinite-loops
805 for -O2 and C++11 or newer.
806
75defde9
PP
8072020-03-28 Patrick Palka <ppalka@redhat.com>
808
809 * c.opt: Add -fconcepts-diagnostics-depth.
810
52f24a9e
MS
8112020-03-27 Martin Sebor <msebor@redhat.com>
812
813 PR c++/94346
814 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
815 to decl_attributes. Make handling of different kinds of entities
816 more robust.
817
ccacf77b
MS
8182020-03-27 Martin Sebor <msebor@redhat.com>
819
820 PR c++/94098
821 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
822 here.
823
ca6c7225
JJ
8242020-03-23 Jakub Jelinek <jakub@redhat.com>
825
826 PR c++/91993
827 * c-warn.c (warnings_for_convert_and_check): For expr and/or
828 result being COMPOUND_EXPRs, skip to ultimate rhs.
829
1aa22b19
RS
8302020-03-20 Richard Sandiford <richard.sandiford@arm.com>
831
832 PR middle-end/94072
833 * c-common.c (c_common_type_for_mode): Before using a registered
834 built-in type, check that the vectorness of the type matches
835 the vectorness of the mode.
836
700d4cb0
JJ
8372020-03-17 Jakub Jelinek <jakub@redhat.com>
838
839 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
840 issue in a diagnostic message.
841
b408e010
LH
8422020-03-15 Lewis Hyatt <lhyatt@gmail.com>
843
844 * c.opt: Avoid redundancy in the help text.
845
e78e50d5
MP
8462020-03-02 Marek Polacek <polacek@redhat.com>
847
848 PR c++/93958 - add missing -std=gnu++20.
849 * c.opt: Add -std=gnu++20.
850
649e1741
MS
8512020-03-01 Martin Sebor <msebor@redhat.com>
852
853 PR c++/92721
854 * c-attribs.c (append_access_attrs): Correctly handle attribute.
855 (handle_access_attribute): Same.
856
7b60f3ba
JJ
8572020-02-25 Jakub Jelinek <jakub@redhat.com>
858
859 PR c/93858
860 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
861 "did you mean" hint in diagnostics.
862
fb260504
JM
8632020-02-15 Jason Merrill <jason@redhat.com>
864
865 * c.opt: Add -std=c++20.
866
1d757b09
EB
8672020-02-14 Eric Botcazou <ebotcazou@adacore.com>
868
869 * c-ada-spec.c: Include bitmap.h.
870 (dump_ada_double_name): Rename into...
871 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
872 (dump_ada_array_type): Adjust to above renaming. Robustify.
873 (dump_nested_types_1): New function copied from... Add dumped_types
874 parameter and pass it down to dump_nested_type.
875 (dump_nested_types): ...this. Remove parent parameter. Just call
876 dump_nested_types_1 on an automatic bitmap.
877 (dump_nested_type): Add dumped_types parameter.
878 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
879 Adjust recursive calls and adjust to above renaming.
880 (dump_ada_declaration): Adjust call to dump_nested_types.
881 Tidy up and adjust to above renaming.
882 (dump_ada_specs): Initialize and release bitmap obstack.
883
0cc575e4
MS
8842020-02-10 Martin Sebor <msebor@redhat.com>
885
886 PR c/93640
887 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
888
a59aa302
JJ
8892020-02-10 Jakub Jelinek <jakub@redhat.com>
890
891 PR other/93641
892 * c-format.c (check_plain): Fix up last argument of strncasecmp.
893 Remove useless extra test.
894
e464fc90
TB
8952020-02-03 Julian Brown <julian@codesourcery.com>
896 Tobias Burnus <tobias@codesourcery.com>
897
898 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
899
e3b6c052
JM
9002020-01-29 Jason Merrill <jason@redhat.com>
901
902 PR c++/89357
903 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
904
6d00f052
JM
9052020-01-23 Jason Merrill <jason@redhat.com>
906
907 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
908
8a990ffa
MS
9092020-01-23 Martin Sebor <msebor@redhat.com>
910
911 PR c/84919
912 * c-common.c (check_function_arguments): Avoid overlap checking
913 of sprintf functions.
914
55b7df8b
JM
9152020-01-22 Jason Merrill <jason@redhat.com>
916
917 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
918 PR c++/40752
919 * c-warn.c (conversion_warning): Check operands only after checking
920 the whole expression. Don't check second operand of + for sign.
921
c77074d0
JM
9222020-01-21 Jason Merrill <jason@redhat.com>
923 Manuel López-Ibáñez <manu@gcc.gnu.org>
924
925 PR c++/40752 - useless -Wconversion with short +=.
926 * c.opt (-Warith-conversion): New.
927 * c-warn.c (conversion_warning): Recurse for operands of
928 operators. Only warn about the whole expression with
929 -Warith-conversion.
930
731dbfc3
JM
9312020-01-21 Jason Merrill <jason@redhat.com>
932
933 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
934 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
935
ad1a3914
NS
9362020-01-20 Nathan Sidwell <nathan@acm.org>
937
938 PR preprocessor/80005
939 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
940
49789fd0
IS
9412020-01-18 Iain Sandoe <iain@sandoe.co.uk>
942
943 * c-common.c (co_await, co_yield, co_return): New.
944 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
945 RID_CO_RETURN): New enumeration values.
946 (D_CXX_COROUTINES): Bit to identify coroutines are active.
947 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
948 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
949 * c.opt (fcoroutines): New command-line switch.
950
4bc1899b
DM
9512020-01-10 David Malcolm <dmalcolm@redhat.com>
952
953 * c-format.c (local_event_ptr_node): New.
954 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
955 (init_dynamic_diag_info): Initialize local_event_ptr_node.
956 * c-format.h (T_EVENT_PTR): New define.
957
f25e33fa
MS
9582020-01-10 Martin Sebor <msebor@redhat.com>
959
960 PR c/93132
961 * c-attribs.c (append_access_attrs): Validate against the translated
962 access string rather than the human-readable representation.
963
8d9254fc
JJ
9642020-01-01 Jakub Jelinek <jakub@redhat.com>
965
966 Update copyright years.
967
39292e25
EB
9682019-12-20 Eric Botcazou <ebotcazou@adacore.com>
969
970 * c-ada-spec.h (decl_sloc): Delete.
971 * c-ada-spec.c (decl_sloc): Make static.
972
519d7496
JB
9732019-12-19 Julian Brown <julian@codesourcery.com>
974
975 * c-common.h (c_omp_map_clause_name): Add prototype.
976 * c-omp.c (c_omp_map_clause_name): New function.
977 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
978 PRAGMA_OACC_CLAUSE_DETACH.
979
a6163563
JB
9802019-12-19 Julian Brown <julian@codesourcery.com>
981 Maciej W. Rozycki <macro@codesourcery.com>
982 Tobias Burnus <tobias@codesourcery.com>
983 Thomas Schwinge <thomas@codesourcery.com>
984
985 * c-pragma.h (pragma_omp_clause): Add
986 PRAGMA_OACC_CLAUSE_NO_CREATE.
987
e8f1ade2
MS
9882019-12-17 Martin Sebor <msebor@redhat.com>
989
990 PR c++/61339
991 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
992
368877a1
DM
9932019-12-11 David Malcolm <dmalcolm@redhat.com>
994
995 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
996 implementation.
997 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
998
d68f5d45
DM
9992019-12-09 David Malcolm <dmalcolm@redhat.com>
1000
1001 * c-format.c (range_label_for_format_type_mismatch::get_text):
1002 Replace label_text ctor called with true with label_text::take.
1003
d3e28653
DM
10042019-12-09 David Malcolm <dmalcolm@redhat.com>
1005
1006 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
1007 initial newline from expected outputs.
1008 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
1009 call to diagnostic_show_locus.
1010
abd6d8cc
JJ
10112019-12-06 Jakub Jelinek <jakub@redhat.com>
1012
1013 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
1014 now.
1015
7906797e
MP
10162019-12-05 Marek Polacek <polacek@redhat.com>
1017 Jakub Jelinek <jakub@redhat.com>
1018
1019 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
1020 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
1021
5c04da88
MP
10222019-12-05 Marek Polacek <polacek@redhat.com>
1023
1024 PR c++/92271 - make __is_same alias for __is_same_as.
1025 * c-common.c: Add __is_same, an alias for __is_same_as.
1026
43aae289
MP
10272019-12-03 Marek Polacek <polacek@redhat.com>
1028
1029 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
1030 * c-cppbuiltin.c (c_cpp_builtins): Predefine
1031 __cpp_aggregate_paren_init=201902 for -std=c++2a.
1032
d7ddfbcb
JH
10332019-11-30 Jan Hubicka <hubicka@ucw.cz>
1034
1035 * c-attribs.c (handle_symver_attribute): New function
1036 (c_common_attributes): Add symver.
1037
65ef05d0
RS
10382019-11-30 Richard Sandiford <richard.sandiford@arm.com>
1039
1040 * c-common.c (pointer_int_sum): Use verify_type_context to check
1041 whether the target allows pointer arithmetic for the types involved.
1042 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
1043 to check whether the target allows sizeof and alignof operations
1044 for the types involved.
1045
1a291106
JM
10462019-11-27 Jason Merrill <jason@redhat.com>
1047
1048 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
1049
05d6cb1a
JJ
10502019-11-26 Jakub Jelinek <jakub@redhat.com>
1051
1052 PR c++/61414
1053 * c-attribs.c (handle_mode_attribute): Add mode attribute to
1054 ENUMERAL_TYPEs.
1055
5b8d9367
JM
10562019-11-25 Joseph Myers <joseph@codesourcery.com>
1057
1058 PR c/91985
1059 * c-common.c (c_common_type_for_mode): Handle decimal
1060 floating-point types being NULL_TREE.
1061 * c-format.c (get_format_for_type_1): Handle specified types being
1062 NULL_TREE.
1063 * c-lex.c (interpret_float): Give an error for decimal
1064 floating-point constants when decimal floating-point not
1065 supported.
1066
1fbf51cb
JJ
10672019-11-23 Jakub Jelinek <jakub@redhat.com>
1068
1069 PR middle-end/83859
1070 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
1071 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
1072 group warning with inform together.
1073 (handle_access_attribute): Formatting fix.
1074
761df906
JJ
10752019-11-22 Jakub Jelinek <jakub@redhat.com>
1076
bdaf8be1
JJ
1077 PR c/90677
1078 * c-common.h (identifier_global_tag): Declare.
1079 * c-format.c (get_pointer_to_named_type): Renamed to ...
1080 (get_named_type): ... this. Use identifier_global_tag instead of
1081 identifier_global_value, handle the return value being a TYPE_P.
1082 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
1083 to call get_named_type instead. Formatting fixes.
1084
c2ecce6d 1085 Implement P1902R1, Missing feature-test macros 2017-2019.
761df906
JJ
1086 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
1087 and __cpp_generic_lambdas for -std=c++2a. Define
1088 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
1089 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
1090 __cpp_concepts for -std=c++2a.
1091
54aa6b58
MS
10922019-11-22 Martin Sebor <msebor@redhat.com>
1093
1094 PR middle-end/83859
1095 * c-attribs.c (handle_access_attribute): New function.
1096 (c_common_attribute_table): Add new attribute.
1097 (get_argument_type): New function.
1098 (append_access_attrs): New function.
1099 (get_nonnull_operand): Rename...
1100 (get_attribute_operand): ...to this.
1101 * c-common.c (get_nonnull_operand): Rename...
1102 (get_attribute_operand): ...to this.
1103
6c80b1b5
JM
11042019-11-21 Joseph Myers <joseph@codesourcery.com>
1105
1106 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
1107 of warning.
1108
192961ff
JM
11092019-11-19 Joseph Myers <joseph@codesourcery.com>
1110
1111 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
1112 warning for standard attributes mixed with fallthrough attributes.
1113
f8aea5e3
JM
11142019-11-15 Joseph Myers <joseph@codesourcery.com>
1115
1116 * c-attribs.c (handle_fallthrough_attribute): Remove static.
1117 * c-common.h (handle_fallthrough_attribute): Declare.
1118
2cc94aa8
JM
11192019-11-15 Joseph Myers <joseph@codesourcery.com>
1120
1121 * c-attribs.c (handle_deprecated_attribute): Remove static.
1122 * c-common.h (handle_deprecated_attribute): Declare.
1123
7c5890cc
JM
11242019-11-14 Joseph Myers <joseph@codesourcery.com>
1125
1126 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
1127 char for C.
1128
b2417b59
JJ
11292019-11-14 Jakub Jelinek <jakub@redhat.com>
1130
d0ec7c93
JJ
1131 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
1132 valid vendors.
1133
b2417b59
JJ
1134 * c-omp.c (c_omp_check_context_selector): Handle name lists
1135 containing string literals. Don't diagnose atomic_default_mem_order
1136 with multiple props.
1137
00be2a5f
JM
11382019-11-13 Joseph Myers <joseph@codesourcery.com>
1139
1140 * c-cppbuiltin.c (builtin_define_float_constants): Also define
1141 NORM_MAX constants. Update call to get_max_float.
1142 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
1143 constants.
1144
2dbad62d
EB
11452019-11-13 Eric Botcazou <ebotcazou@adacore.com>
1146
1147 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
1148 (dump_forward_type): Do not generate a declaration for function types.
1149 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
1150 of the component type if it is declared in another file.
1151
6ed76044
ML
11522019-11-12 Martin Liska <mliska@suse.cz>
1153
1154 * c-opts.c (c_common_post_options):
1155 Use SET_OPTION_IF_UNSET.
1156
62aee289
MR
11572019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
1158 Frederik Harwath <frederik@codesourcery.com>
1159
1160 gcc/c-family/
1161 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
1162 constant.
1163 * c-pragma.c (oacc_pragmas): Add "serial" entry.
1164
f486280c
RS
11652019-11-08 Richard Sandiford <richard.sandiford@arm.com>
1166
1167 * c-common.h (gnu_vector_type_p): New function.
1168 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
1169 vectors to satisfy gnu_vector_type_p.
1170 (c_build_vec_convert): Likewise __builtin_convertvector.
1171 (convert_vector_to_array_for_subscript): Likewise when applying
1172 implicit vector to array conversion.
1173 (scalar_to_vector): Likewise when converting vector-scalar
1174 operations to vector-vector operations.
1175
017c6491
JM
11762019-11-08 Joseph Myers <joseph@codesourcery.com>
1177
1178 * c.opt (Wold-style-definition): Initialize to -1.
1179 * c-opts.c (c_common_post_options): Set warn_old_style_definition
1180 to flag_isoc2x if not set explicitly.
1181
c01bd174
JM
11822019-11-07 Joseph Myers <joseph@codesourcery.com>
1183
1184 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
1185
0df65305
JM
11862019-11-05 Jason Merrill <jason@redhat.com>
1187
1188 * c-opts.c (c_common_post_options): -fconcepts-ts implies
1189 -fconcepts.
1190
e0c866dd
KK
11912019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
1192
1193 * c-opts.c (c_common_post_options): Update
1194 latest_abi_version.
1195
f968ef9b
JJ
11962019-11-02 Jakub Jelinek <jakub@redhat.com>
1197
d0c464d2
JJ
1198 * c-common.h (c_omp_get_context_selector): Remove.
1199 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
1200 and renamed to omp_get_context_selector.
1201
917dd789
JJ
1202 * c-omp.c (c_omp_mark_declare_variant): Use
1203 omp_context_selector_set_compare.
1204
f968ef9b
JJ
1205 PR c++/88335 - Implement P1073R3: Immediate functions
1206 * c-common.h (enum rid): Add RID_CONSTEVAL.
1207 * c-common.c (c_common_reswords): Add consteval.
1208
5f6705b7
JJ
12092019-11-01 Martin Sebor <msebor@redhat.com>
1210
1211 PR middle-end/91679
1212 PR middle-end/91647
1213 PR middle-end/91463
1214 PR middle-end/92312
1215 * c-pretty-print.c (direct_abstract_declarator): Print
1216 bound in zero-length arrays.
1217 * c.opt (-Wzero-length-bounds): New option.
1218
43f1814c
NS
12192019-10-30 Nathan Sidwell <nathan@acm.org>
1220
1221 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
1222 macros.
1223
ad1539d5
MS
12242019-10-28 Martin Sebor <msebor@redhat.com>
1225
1226 PR c/66970
1227 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
1228 even when only preprocessing.
1229 * c-common.h (names_builtin_p): Declare new function.
1230 * c-lex.c (init_c_lex): Set has_builtin.
1231 (c_common_has_builtin): Define a new function.
1232 * c-ppoutput.c (init_pp_output): Set has_builtin.
1233
135df52c
JJ
12342019-10-24 Jakub Jelinek <jakub@redhat.com>
1235
1236 * c-common.h (c_omp_context_selector_matches): Remove.
1237 * c-omp.c (c_omp_context_selector_matches): Remove.
1238 * c-attribs.c (c_common_attribute_table): Add
1239 "omp declare target {host,nohost,block}" attributes.
1240
8ad0c477
JM
12412019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
1242
1243 * c-lex.c (c_common_has_attribute): Update nodiscard value.
1244
56898e43
RS
12452019-10-14 Richard Sandiford <richard.sandiford@arm.com>
1246
1247 * c-common.h (user_facing_original_type_p): Declare.
1248 * c-common.c: Include c-spellcheck.h.
1249 (user_facing_original_type_p): New function.
1250
20de9568
JJ
12512019-10-12 Jakub Jelinek <jakub@redhat.com>
1252
1253 * c-common.h (c_omp_mark_declare_variant,
1254 c_omp_context_selector_matches): Declare.
1255 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
1256 and hsa-common.h.
1257 (c_omp_get_context_selector): Support second argument NULL.
1258 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
1259 functions.
1260 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
1261 attribute, add "omp declare variant base" and
1262 "omp declare variant variant" attributes.
1263
175a85b2
JM
12642019-10-11 Joseph Myers <joseph@codesourcery.com>
1265
1266 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
1267 CppReason(CPP_W_C11_C2X_COMPAT).
1268
fe2bc27c
JM
12692019-10-11 Joseph Myers <joseph@codesourcery.com>
1270
1271 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
1272 _Decimal64 and _Decimal128.
1273
27dfdc0f
JM
12742019-10-10 Joseph Myers <joseph@codesourcery.com>
1275
1276 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
1277 types if DFP not supported.
1278
94e7f906
JJ
12792019-10-10 Jakub Jelinek <jakub@redhat.com>
1280
1281 * c-common.h (c_omp_check_context_selector,
1282 c_omp_get_context_selector): Declare.
1283 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
1284 in diagnostic message.
1285 (c_omp_check_context_selector, c_omp_get_context_selector): New
1286 functions.
1287 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
1288 attribute.
1289 (handle_omp_declare_variant_attribute): New function.
1290
a7160771
MS
12912019-10-09 Martin Sebor <msebor@redhat.com>
1292
1293 PR tree-optimization/90879
1294 * c.opt (-Wstring-compare): New option.
1295
cb57504a
JM
12962019-10-08 Andrew Sutton <asutton@lock3software.com>
1297 Jason Merrill <jason@redhat.com>
1298
1299 Update the concepts implementation to conform to the C++20
1300 specification, improve compile times, and generally clean up
1301 the implementation.
1302
1303 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
1304 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
1305 * c.opt: Add -Wconcepts-ts.
1306 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
1307 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
1308 (set_std_cxx2a): Enable concepts by default.
1309
fbb2a6dc
JM
13102019-10-08 Joseph Myers <joseph@codesourcery.com>
1311
1312 * c-opts.c (c_common_post_options): Set
1313 -fno-fp-int-builtin-inexact for C2X.
1314
8e007055
JJ
13152019-10-05 Jakub Jelinek <jakub@redhat.com>
1316
1317 PR c++/91369 - Implement P0784R7: constexpr new
1318 * c-cppbuiltin.c (c_cpp_builtins): Predefine
1319 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
1320
843f104d
JM
13212019-10-04 Joseph Myers <joseph@codesourcery.com>
1322
1323 PR c/82752
1324 * c-format.c (C_STD_VER): Handle C2x.
1325 (C_STD_NAME): Likewise.
1326 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
1327 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
1328 modifier allowed and 'p' flag.
1329 * c-format.h (enum format_std_version): Add STD_C2X.
1330 (struct format_char_info): Mention 'p' in comment on flags2.
1331
e9c9a142
DM
13322019-10-01 David Malcolm <dmalcolm@redhat.com>
1333
1334 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
1335 calling diagnostic_show_locus, rather than destroying it afterwards.
1336
7552c36a
JJ
13372019-10-01 Jakub Jelinek <jakub@redhat.com>
1338
1339 PR c++/91925
1340 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
1341 with NULL DECL_FIELD_OFFSET.
1342
8209db25
RS
13432019-10-01 Richard Sandiford <richard.sandiford@arm.com>
1344
1345 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
1346 has a type name, use it in preference to the __vector syntax.
1347
9343bf99
RS
13482019-09-30 Richard Sandiford <richard.sandiford@arm.com>
1349
1350 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
1351 two spaces between a comma and "...".
1352
59bc434a
JJ
13532019-09-27 Jakub Jelinek <jakub@redhat.com>
1354
1355 PR c++/88203
1356 * c-common.h (c_omp_predefined_variable): Declare.
1357 * c-omp.c (c_omp_predefined_variable): New function.
1358 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
1359 for predefined variables.
1360
c6447c20
RS
13612019-09-27 Richard Sandiford <richard.sandiford@arm.com>
1362
1363 * c-common.h (build_function_call_vec): Take the original
1364 function decl as an optional final parameter.
1365 (check_builtin_function_arguments): Take the original function decl.
1366 * c-common.c (check_builtin_function_arguments): Likewise.
1367 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
1368 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
1369
c4438114
JM
13702019-09-15 Jason Merrill <jason@redhat.com>
1371
1372 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
1373 fold_for_warn in "|| mask" warning.
1374
68a57628
ML
13752019-09-10 Martin Liska <mliska@suse.cz>
1376
1377 * c.opt: Use newly added WarnRemoved.
1378
f48ef52e
ML
13792019-09-09 Martin Liska <mliska@suse.cz>
1380
1381 * c.opt: Update comment of removed
1382 options that are preserved only for backward
1383 compatibility.
1384
67f6e649
ML
13852019-09-06 Martin Liska <mliska@suse.cz>
1386
1387 PR c++/91125
1388 * c-common.c: Remove definition of flag_use_repository.
1389 * c-common.h: Likewise.
1390 * c-opts.c (c_common_handle_option):
1391 Do not handle OPT_frepo option.
1392 * c.opt: Mark the option with Deprecated.
1393
db9d2274
MP
13942019-09-04 Marek Polacek <polacek@redhat.com>
1395
1396 * c.opt (fdeduce-init-list): Ignored.
1397
68e2c199
PK
13982019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1399
1400 PR c/78736
1401 * c.opt (Wenum-conversion): New option.
1402
7a4418a5
JL
14032019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1404
1405 * c-attribs.c (handle_section_attribute): Call the
1406 handle_generic_attribute target hook after performing target
1407 independent processing.
1408 (handle_noinit_attribute): Likewise.
1409
5f76ab15
ILT
14102019-09-03 Ian Lance Taylor <iant@golang.org>
1411
1412 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
1413 when using -fgo-dump-spec.
1414
ae0d3f6a
ML
14152019-09-02 Martin Liska <mliska@suse.cz>
1416
1417 PR c++/91155
1418 * c-common.c (fname_as_string): Use cxx_printable_name for
1419 __PRETTY_FUNCTION__ same as was used before r265711.
1420
8a902edb
MP
14212019-08-28 Marek Polacek <polacek@redhat.com>
1422
1423 Implement P1152R4: Deprecating some uses of volatile.
1424 PR c++/91361
1425 * c-opts.c (c_common_post_options): Enable -Wvolatile by
1426 default for C++2a, unless -Wno-deprecated.
1427 * c.opt (Wvolatile): New warning.
1428
4742dbe7
MP
14292019-08-28 Marek Polacek <polacek@redhat.com>
1430
1431 PR c++/91360 - Implement C++20 P1143R2: constinit.
1432 * c-common.c (c_common_reswords): Add constinit and __constinit.
1433 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
1434 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
1435 RID_LAST_CXX20.
1436 (D_CXX20): Define.
1437 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
1438 * c-format.c (cxx_keywords): Add "constinit".
1439 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
1440
6a074892
JJ
14412019-08-27 Jakub Jelinek <jakub@redhat.com>
1442
1443 PR c++/91415
1444 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
1445 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
1446 like COMPOUND_EXPR rather than normal expression.
1447
22f8849d
IS
14482019-08-23 Iain Sandoe <iain@sandoe.co.uk>
1449
1450 PR pch/61250
1451 * c-lex.c (c_lex_with_flags): Don't call
1452 c_common_no_more_pch () from here.
1453
df375b03
JJ
14542019-08-23 Jakub Jelinek <jakub@redhat.com>
1455
1456 PR middle-end/91283
1457 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
1458 instead of flag_excess_precision_cmdline.
1459 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
1460 * c-opts.c (c_common_post_options): Likewise.
1461
14b7950f
MS
14622019-08-22 Martin Sebor <msebor@redhat.com>
1463
1464 PR middle-end/91490
1465 * c-common.c (braced_list_to_string): Add argument and overload.
1466 Handle flexible length arrays and unions.
1467
8bb2ee59
EB
14682019-08-21 Eric Botcazou <ebotcazou@adacore.com>
1469
1470 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
1471 function declarations where arguments are missing. Rename variables.
1472
21c1e205
RB
14732019-08-15 Richard Biener <rguenther@suse.de>
1474
1475 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
1476 enabled, define __SIZETYPE__.
1477
f0033821
CL
14782019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
1479
1480 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
1481 exclusion with "section" attribute.
1482 (attr_noinit_exclusions): New table.
1483 (handle_noinit_attribute): New function.
1484
4d732405
RS
14852019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1486
1487 PR middle-end/91421
1488 * c-common.c (resolve_overloaded_builtin): Use
1489 copy_decl_built_in_function.
1490
51ad8481
MS
14912019-08-13 Martin Sebor <msebor@redhat.com>
1492
1493 PR c/80619
1494 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
1495 (asm_fprintf_length_spec): Same.
1496 * c-format.h (format_lengths): Add FMT_LEN_w.
1497
77eb117f
JJ
14982019-08-10 Jakub Jelinek <jakub@redhat.com>
1499
1500 * c-pragma.h (enum pragma_omp_clause): Add
1501 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1502
398e3feb
JJ
15032019-08-07 Jakub Jelinek <jakub@redhat.com>
1504
1505 * c-pragma.h (enum pragma_omp_clause): Add
1506 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
1507 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
1508 enumeration value.
1509
ab574db6
MP
15102019-08-05 Marek Polacek <polacek@redhat.com>
1511
1512 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
1513 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
1514 default for C++2a, unless -Wno-deprecated.
1515 * c.opt (Wcomma-subscript): New warning.
1516
554a530f
JJ
15172019-07-20 Jakub Jelinek <jakub@redhat.com>
1518
1519 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
1520 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
1521 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
1522 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
1523 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
1524 constructs with the loop construct.
1525
1a888209
JJ
15262019-07-13 Jakub Jelinek <jakub@redhat.com>
1527
1528 PR c/91149
1529 * c-omp.c (c_omp_split_clauses): Fix a pasto in
1530 OMP_CLAUSE_REDUCTION_TASK handling.
1531
1fdd6f04
JJ
15322019-07-12 Jakub Jelinek <jakub@redhat.com>
1533
1534 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
1535 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
1536
99b1c316
MS
15372019-07-09 Martin Sebor <msebor@redhat.com>
1538
1539 PR c++/61339
1fdd6f04 1540 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
1541 and others to class.
1542 * c-pretty-print.h: Same.
1543
6c1dae73
MS
15442019-07-09 Martin Sebor <msebor@redhat.com>
1545
1546 PR c++/61339
1547 * c-format.c (check_argument_type): Change class-key from class to
1548 struct and vice versa to match convention and avoid -Wclass-is-pod
1549 and -Wstruct-no-pod.
1550 * c-pretty-print.h: Same.
1551
8ba6ea87
ML
15522019-07-03 Martin Liska <mliska@suse.cz>
1553
1554 * c-common.c (try_to_locate_new_include_insertion_point): Remove
1555 dead assignemts.
1556
83eb9522
JJ
15572019-07-03 Jakub Jelinek <jakub@redhat.com>
1558
1559 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
1560 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
1561 with OMP_PARALLEL.
1562
1c6ffbab
QZ
15632019-07-02 qing zhao <qing.zhao@oracle.com>
1564
1565 PR preprocessor/90581
1566 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
1567 * c.opt: Add new option -fmax-include-depth.
1568
7ffc7de5
JM
15692019-06-26 Jason Merrill <jason@redhat.com>
1570
1571 PR c++/55442 - memory-hog with highly recursive constexpr.
1572 * c.opt (fconstexpr-loop-limit): New.
1573
361af3e4
JJ
15742019-06-25 Jakub Jelinek <jakub@redhat.com>
1575
1576 PR sanitizer/90954
1577 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
1578 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
1579
ab20d992
JJ
15802019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1581
1582 * c-common.c (c_common_nodes_and_builtins): Define
1583 alternate "__intN__" name for "__intN" types.
1584
f4af4019
JH
15852019-06-24 Jan Hubicka <jh@suse.cz>
1586
1587 * c-common.c (braced_lists_to_strings): Check that
1588 type is array or integer prior checking string flag.
1589
da9e9b57
MB
15902019-06-21 Matthew Beliveau <mbelivea@redhat.com>
1591
1592 PR c++/90875 - added -Wswitch-outside-range option
1593 * c.opt (Wswitch-outside-range): Added new option.
1594 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
1595
3f3d6a6f
MP
15962019-06-21 Marek Polacek <polacek@redhat.com>
1597
1598 PR c++/90953 - ICE with -Wmissing-format-attribute.
1599 * c-common.c (check_function_arguments_recurse): Use
1600 get_attribute_name.
1601 (check_missing_format_attribute): Likewise.
1602
1bf32c11
MP
16032019-06-19 Marek Polacek <polacek@redhat.com>
1604
1605 PR c++/60364 - noreturn after first decl not diagnosed.
1606 * c-attribs.c (handle_noreturn_attribute): No longer static.
1607 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
1608 Declare.
1609 * c-format.c (check_function_format): Use get_attribute_name.
1610
a04c0734
MS
16112019-06-19 Martin Sebor <msebor@redhat.com>
1612
1613 PR translation/90156
1614 * c-format.c (function_format_info::format_type): Adjust type.
1615 (function_format_info::is_raw): New member.
1616 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
1617 (decode_format_attr): Adjust call to decode_format_type.
1618 Avoid a redundant call to convert_format_name_to_system_name.
1619 Avoid abbreviating the word "arguments" in a diagnostic.
1620 (format_warning_substr): New function.
1621 (avoid_dollar_number): Quote dollar sign in a diagnostic.
1622 (finish_dollar_format_checking): Same.
1623 (check_format_info): Same.
1624 (struct baltoks_t): New.
1625 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
1626 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
1627 functions.
1628 (check_format_info_main): Call check_plain. Use baltoks_t. Call
1629 maybe_diag_unbalanced_tokens.
1630 (handle_format_attribute): Spell out the word "arguments" in
1631 a diagnostic.
1632
d3786ebb
MB
16332019-06-11 Matthew Beliveau <mbelivea@redhat.com>
1634
1635 PR c++/90449 - add -Winaccessible-base option.
1636 * c.opt (Winaccessible-base): New option.
1637
bf38f7e9
JJ
16382019-06-10 Jakub Jelinek <jakub@redhat.com>
1639
1640 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
1641 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
1642 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
1643 combined/composite constructs where it is not allowed. Copy over
1644 OMP_CLAUSE_REDUCTION_INSCAN.
1645
0ecf545c
MS
16462019-06-05 Martin Sebor <msebor@redhat.com>
1647
1648 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
1649 (handle_alias_ifunc_attribute): Same.
1650 (handle_copy_attribute): Same.
1651 (handle_weakref_attribute): Same.
1652 (handle_nonnull_attribute): Same.
1653 * c-warn.c (warn_for_sign_compare): Same.
1654 (warn_for_restrict): Same.
1655 * c.opt: Same.
1656
36b34127
MS
16572019-06-05 Martin Sebor <msebor@redhat.com>
1658
1659 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
1660 * c.opt (-Wformat-diag): Remove a spurious period.
1661
357a352f
JJ
16622019-05-29 Jakub Jelinek <jakub@redhat.com>
1663
1664 PR c/90628
1665 * c-common.c (check_builtin_function_arguments)
1666 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
1667 as last argument.
1668
2b8235ea
EB
16692019-05-23 Eric Botcazou <ebotcazou@adacore.com>
1670
1671 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
1672
6d86ddc4
ML
16732019-05-22 Martin Liska <mliska@suse.cz>
1674
1675 PR lto/90500
1676 * c-attribs.c (handle_copy_attribute): Do not copy
1677 target_clones attribute.
1678
419ba5b9
EB
16792019-05-21 Eric Botcazou <ebotcazou@adacore.com>
1680
1681 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
1682 * c-ada-spec.c (print_assignment_operator): New function.
1683 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
1684 assignment operators declared as methods and filter out the others.
1685
e03436e7
TS
16862019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1687
1688 PR c/89433
1689 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
1690 "omp declare target".
1691
a9c697b8
MS
16922019-05-16 Martin Sebor <msebor@redhat.com>
1693
ab20d992
JJ
1694 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
1695 keywords, operators, and types in diagnostics.
1696 (handle_scalar_storage_order_attribute): Same.
1697 (handle_mode_attribute): Same.
1698 (handle_visibility_attribute): Same.
1699 (handle_assume_aligned_attribute): Same.
1700 (handle_no_split_stack_attribute): Same.
1701 * c-common.c (shorten_compare): Same.
1702 (c_common_truthvalue_conversion): Same.
1703 (cb_get_source_date_epoch): Same.
1704 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
1705 in diagnostics.
1706 (interpret_float): Same.
1707 * c-omp.c (c_finish_omp_for): Same.
1708 * c-opts.c (c_common_post_options): Same.
1709 * c-pch.c (c_common_pch_pragma): Same.
1710 * c-pragma.c (pop_alignment): Same.
1711 (handle_pragma_pack): Same.
1712 (apply_pragma_weak): Same.
1713 (handle_pragma_weak): Same.
1714 (handle_pragma_scalar_storage_order): Same.
1715 (handle_pragma_redefine_extname): Same.
1716 (add_to_renaming_pragma_list): Same.
1717 (maybe_apply_renaming_pragma): Same.
1718 (push_visibility): Same.
1719 (handle_pragma_visibility): Same.
1720 (handle_pragma_optimize): Same.
1721 (handle_pragma_message): Same.
1722 * c-warn.c (warn_for_omitted_condop): Same.
1723 (lvalue_error): Same.
a9c697b8 1724
6b943512
RB
17252019-05-15 Richard Biener <rguenther@suse.de>
1726
1727 PR c/90474
1728 * c-common.c (c_common_mark_addressable_vec): Also mark
1729 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
1730 c_mark_addressable.
ab20d992 1731
b744fc85
NS
17322019-05-06 Nathan Sidwell <nathan@acm.org>
1733
1734 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
1735
598f50d7
NS
17362019-04-30 Nathan Sidwell <nathan@acm.org>
1737
1738 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
1739
5bcc5a3b
ML
17402019-04-30 Martin Liska <mliska@suse.cz>
1741
1742 * c-pragma.c (handle_pragma_diagnostic): Provide hints
1743 for unknown options.
1744
e78a87f7
RS
17452019-04-26 Richard Sandiford <richard.sandiford@arm.com>
1746
1747 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
1748 the pointer target rather than the pointer itself.
1749
c280b7ee
JJ
17502019-04-19 Jakub Jelinek <jakub@redhat.com>
1751
1752 PR c/89888
1753 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
1754 arguments.
1755 (c_do_switch_warnings): Remove outside_range_p argument.
1756 * c-common.c (check_case_bounds): Removed.
1757 (c_add_case_label): Remove orig_type and outside_range_p arguments.
1758 Don't call check_case_bounds. Fold low_value as well as high_value.
1759 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
1760 Check for case labels outside of range of original type here and
1761 adjust them.
1762
8e8225e6
JJ
17632019-04-12 Jakub Jelinek <jakub@redhat.com>
1764
63b8a166
JJ
1765 PR translation/90041
1766 * c.opt (-fhandle-exceptions): Use %< and %> around option names
1767 in the Warn diagnostics.
1768
8e8225e6
JJ
1769 PR c/89946
1770 * c-attribs.c (handle_patchable_function_entry_attribute): Add
1771 function comment. Warn if arguments of the attribute are not positive
1772 integer constants.
1773
53a3f614
EB
17742019-04-09 Eric Botcazou <ebotcazou@adacore.com>
1775
1776 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
1777 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
1778
22be5873
EB
17792019-04-07 Eric Botcazou <ebotcazou@adacore.com>
1780
1781 * c-ada-spec.c (is_float128): New predicate extracted from...
1782 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
1783 <REAL_TYPE>: ...here. Call it.
1784
34facf20
DM
17852019-04-05 David Malcolm <dmalcolm@redhat.com>
1786
1787 PR c/89985
1788 * c-warn.c (check_address_or_pointer_of_packed_member): Add
1789 auto_diagnostic_group. Guard inform calls by result of
1790 warning_at call.
1791
05564120
MP
17922019-04-05 Marek Polacek <polacek@redhat.com>
1793
ab20d992 1794 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
05564120
MP
1795 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
1796 of RHS.
1797
7a506c3c
JM
17982019-04-03 Jason Merrill <jason@redhat.com>
1799
1800 PR c++/86586 - -fcompare-debug=-Wsign-compare.
1801 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
1802
ddeae8c8
MS
18032019-04-01 Martin Sebor <msebor@redhat.com>
1804
1805 PR c/89685
1806 * c-attribs.c (handle_copy_attribute): Handle references and
1807 non-constant expressions.
1808
a15ffa22
JJ
18092019-03-22 Jakub Jelinek <jakub@redhat.com>
1810
1811 PR c++/87481
1812 * c.opt (-fconstexpr-ops-limit=): New option.
1813
36a3a7a3
JJ
18142019-03-21 Jakub Jelinek <jakub@redhat.com>
1815
1816 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
1817 template param.
1818
bec1da64
MS
18192019-03-19 Martin Sebor <msebor@redhat.com>
1820
1821 PR tree-optimization/89688
1822 * c-common.c (braced_list_to_string): Make static.
1823 (braced_lists_to_strings): Define new function.
1824 * c-common.h (braced_list_to_string): Remove.
1825 (braced_lists_to_strings): Declare.
1826
1fe61adf
ML
18272019-03-12 Martin Liska <mliska@suse.cz>
1828
1829 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
1830
93964ebd
ML
18312019-03-11 Martin Liska <mliska@suse.cz>
1832
1833 * c-opts.c (c_common_post_options): Wrap apostrophes
1834 in gcc internal format with %'.
1835
a3f9f006
ML
18362019-03-11 Martin Liska <mliska@suse.cz>
1837
1838 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
1839 in a string format message and fix GNU coding style.
1840 * c-common.c (vector_types_convertible_p): Likewise.
1841 (c_build_vec_perm_expr): Likewise.
1842 * c-indentation.c (get_visual_column): Likewise.
1843 * c-opts.c (c_common_handle_option): Likewise.
1844 (c_common_post_options): Likewise.
1845 (sanitize_cpp_opts): Likewise.
1846 * c-pch.c (c_common_pch_pragma): Likewise.
1847 * c-pragma.c (handle_pragma_pack): Likewise.
1848
1db01ff9
JJ
18492019-03-08 Jakub Jelinek <jakub@redhat.com>
1850
1851 PR tree-optimization/89550
1852 * c-common.c (c_common_truthvalue_conversion): Only set
1853 TREE_NO_WARNING if warning_at returned true.
1854 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
1855
ba790e6f
JJ
18562019-02-25 Sandra Loosemore <sandra@codesourcery.com>
1857 Martin Sebor <msebor@gmail.com>
1858
1859 * c.opt (Wmissing-attributes): Clean up doc string.
1860
7da73ba7
JJ
18612019-02-25 Jakub Jelinek <jakub@redhat.com>
1862
1863 PR c/89495
1864 * c-format.c (maybe_read_dollar_number): Compute nargnum in
1865 HOST_WIDE_INT type to avoid overflows and change overflow_flag
1866 checking.
1867
921bb9d1
RB
18682019-02-22 Richard Biener <rguenther@suse.de>
1869
1870 * c-pch.c (no_checksum): Remove.
1871 (pch_init): Remove assertion that executable_checksum is not
1872 all zero.
1873 (c_common_valid_pch): Likewise.
1874
e2ebb05c
MS
18752019-02-18 Martin Sebor <msebor@redhat.com>
1876
1877 PR middle-end/89294
1878 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
1879
3fe53000
DM
18802019-02-16 David Malcolm <dmalcolm@redhat.com>
1881
1882 PR c++/88680
1883 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
1884 implementing -Wtype-limits.
1885
28a8cef1
MS
18862019-02-11 Martin Sebor <msebor@redhat.com>
1887
1888 PR c++/87996
1889 * c-common.c (invalid_array_size_error): New function.
1890 (valid_array_size_p): Call it. Handle size as well as type.
1891 * c-common.h (valid_constant_size_p): New function.
1892 (enum cst_size_error): New type.
1893
ec2be203
DM
18942019-01-31 David Malcolm <dmalcolm@redhat.com>
1895
1896 PR c/89122
1897 * known-headers.cc (get_stdlib_header_for_name): Add
1898 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
1899
8936f047
JJ
19002019-01-31 Jakub Jelinek <jakub@redhat.com>
1901
1902 PR libstdc++/88170
1903 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
1904 a C cast in pp_c_flag_gnu_v3 mode.
1905
6a335b96
JJ
19062019-01-29 Jakub Jelinek <jakub@redhat.com>
1907
1908 PR c/86125
1909 * c-common.c (c_common_nodes_and_builtins): Build type variants for
1910 builtin_structptr_types types even for C.
1911
2a06eba5
BE
19122019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
1913
1914 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
1915 when rhs is of array type correctly. Fix handling of nested structures.
1916 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
1917 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
1918 type casts within nested compound expressions.
1919
18a23298
JJ
19202019-01-22 Jakub Jelinek <jakub@redhat.com>
1921
1922 PR middle-end/88968
1923 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
1924 variable after using BIT_FIELD_REF.
1925
420183d9
L
19262019-01-18 H.J. Lu <hongjiu.lu@intel.com>
1927
1928 PR c/51628
1929 PR c/88664
1930 * c-common.h (warn_for_address_or_pointer_of_packed_member):
1931 Remove the boolean argument.
1932 * c-warn.c (check_address_of_packed_member): Renamed to ...
1933 (check_address_or_pointer_of_packed_member): This. Also
1934 warn pointer conversion.
1935 (check_and_warn_address_of_packed_member): Renamed to ...
1936 (check_and_warn_address_or_pointer_of_packed_member): This.
1937 Also warn pointer conversion.
1938 (warn_for_address_or_pointer_of_packed_member): Remove the
1939 boolean argument. Don't check pointer conversion here.
1940
99063eee
RS
19412019-01-15 Richard Sandiford <richard.sandiford@arm.com>
1942
1943 PR inline-asm/52813
1944 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
1945
a30d0196
JJ
19462019-01-14 Jakub Jelinek <jakub@redhat.com>
1947
1948 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
1949 and __cpp_nontype_template_parameter_auto. Add a comment that
1950 __cpp_template_auto is deprecated.
1951
2d91f79d
TH
19522019-01-14 Tom Honermann <tom@honermann.net>
1953
1954 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
1955 * c-common.c (c_common_reswords): Add char8_t.
1956 (fix_string_type): Use char8_t for the type of u8 string literals.
1957 (c_common_get_alias_set): char8_t doesn't alias.
1958 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
1959 C++.
1960 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
1961 (keyword_begins_type_specifier): Add RID_CHAR8.
1962 * c-common.h (rid): Add RID_CHAR8.
1963 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
1964 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
1965 Define char8_type_node and char8_array_type_node.
1966 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
1967 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
1968 (c_cpp_builtins): Predefine __cpp_char8_t.
1969 * c-lex.c (lex_string): Use char8_array_type_node as the type of
1970 CPP_UTF8STRING.
1971 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
1972 * c-opts.c: If not otherwise specified, enable -fchar8_t when
1973 targeting C++2a.
1974 * c.opt: Add the -fchar8_t command line option.
1975
23db6ced
MS
19762019-01-14 Martin Sebor <msebor@redhat.com>
1977
1978 PR target/88638
1979 * c-attribs.c (positional_argument): Call valid_format_string_type_p
1980 and issue errors if it fails.
1981 * c-common.h (valid_format_string_type_p): Declare.
1982 * c-format.c (valid_stringptr_type_p): Rename...
1983 (valid_format_string_type_p): ...to this and make extern.
1984 (handle_format_arg_attribute): Adjust to new name.
1985 (check_format_string): Same.
1986
234c3818
L
19872019-01-13 H.J. Lu <hongjiu.lu@intel.com>
1988
1989 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
1990 Replace "may may" with "may" in warning message.
1991
d8fcab68
JJ
19922019-01-07 Jakub Jelinek <jakub@redhat.com>
1993
1994 PR c++/85052
1995 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
1996 (c_build_vec_convert): Declare.
1997 * c-common.c (c_build_vec_convert): New function.
1998
29d24852
MS
19992019-01-04 Martin Sebor <msebor@redhat.com>
2000
2001 PR c/88546
2002 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
2003 Handle C++ empty throw specification and C11 _Noreturn.
2004 (has_attribute): Also handle C11 _Noreturn.
2005
9069a4c9
MS
20062019-01-04 Martin Sebor <msebor@redhat.com>
2007
2008 PR c/88363
2009 * c-attribs.c (positional_argument): Also accept enumerated types.
2010
a5544970
JJ
20112019-01-01 Jakub Jelinek <jakub@redhat.com>
2012
2013 Update copyright years.
2014
da77eace
L
20152018-12-20 H.J. Lu <hongjiu.lu@intel.com>
2016
2017 PR c/51628
2018 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
2019 * c-warn.c (check_alignment_of_packed_member): New function.
2020 (check_address_of_packed_member): Likewise.
2021 (check_and_warn_address_of_packed_member): Likewise.
2022 (warn_for_address_or_pointer_of_packed_member): Likewise.
2023 * c.opt: Add -Wno-address-of-packed-member.
2024
573767d4
DM
20252018-12-20 David Malcolm <dmalcolm@redhat.com>
2026
2027 PR c++/87504
2028 * c-warn.c (get_outermost_macro_expansion): New function.
2029 (spelled_the_same_p): Use it to unwind the macro expansions, and
2030 compare the outermost macro in each nested expansion, rather than
2031 the innermost.
2032
a14feb3c
DM
20332018-12-19 David Malcolm <dmalcolm@redhat.com>
2034
2035 PR c++/87504
2036 * c-common.h (warn_tautological_cmp): Convert 1st param from
2037 location_t to const op_location_t &.
2038 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
2039 when testing for INTEGER_CST.
2040 (warn_tautological_bitwise_comparison): Convert 1st param from
2041 location_t to const op_location_t &; use it to build a
2042 binary_op_rich_location, and use this.
2043 (spelled_the_same_p): New function.
2044 (warn_tautological_cmp): Convert 1st param from location_t to
2045 const op_location_t &. Warn for macro expansions if
2046 spelled_the_same_p. Use binary_op_rich_location.
2047
dfd7fdca
DM
20482018-12-19 David Malcolm <dmalcolm@redhat.com>
2049
2050 PR c++/43064
2051 PR c++/43486
2052 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
2053 (verify_tree): Handle location wrappers.
2054 (c_common_truthvalue_conversion): Strip any location wrapper.
2055 Handle CONST_DECL.
2056 (fold_offsetof): Strip any location wrapper.
2057 (complete_array_type): Likewise for initial_value.
2058 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
2059 index before checking for INTEGER_CST.
2060 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
2061 print parentheses around location wrappers.
2062 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
2063 before checking for INTEGER_CST.
2064 (warn_tautological_bitwise_comparison): Call
2065 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
2066 before checking for INTEGER_CST.
2067 (readonly_error): Strip any location wrapper.
2068 (warn_array_subscript_with_type_char): Strip location wrappers
2069 before checking for INTEGER_CST. Use the location of the index if
2070 available.
2071
5c8b3702
JM
20722018-12-06 Jason Merrill <jason@redhat.com>
2073
2074 PR c++/88136 - -Wdeprecated-copy false positives
2075 * c.opt (Wdeprecated-copy-dtor): New.
2076 (Wdeprecated-copy): Move to -Wextra.
2077
673670da
MS
20782018-11-29 Martin Sebor <msebor@redhat.com>
2079
2080 PR c/88172
2081 PR testsuite/88208
2082 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
2083 alignments to values less than the target requires.
2084 (has_attribute): For attribute aligned consider both the attribute
2085 and the alignment bits.
2086 * c-common.c (c_init_attributes): Optionally issue a warning for
2087 zero alignment.
2088
04864ec8
MS
20892018-11-28 Martin Sebor <msebor@redhat.com>
2090
2091 PR c/88065
2092 PR c/87297
2093 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
2094 or destination is an error.
2095
ace83db0
JJ
20962018-11-28 Jakub Jelinek <jakub@redhat.com>
2097
2098 PR c++/88215
2099 * c-ubsan.c: Include langhooks.h.
2100 (ubsan_instrument_division): Change gcc_assert that main variants
2101 of op0 and op1 types are equal to gcc_checking_assert that the
2102 main variants are compatible types.
2103
da193a27
EB
21042018-11-27 Eric Botcazou <ebotcazou@adacore.com>
2105
2106 * c-ada-spec.c: Include stringpool.h.
2107 (has_static_fields): Return false for incomplete types.
2108 (is_tagged_type): Likewise.
2109 (has_nontrivial_methods): Likewise.
2110 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
2111 (struct overloaded_name_hash): New structure.
2112 (struct overloaded_name_hasher): Likewise.
2113 (overloaded_names): New global variable.
2114 (init_overloaded_names): New static function.
2115 (overloaded_name_p): New predicate.
2116 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
2117 on the TYPE_STUB_DECL of the original type of a typedef, if any.
2118 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
2119 Remove always-true condition and dump forward types.
2120 (dump_ada_specs): Delete overloaded_names.
2121
98f08eb8
MS
21222018-11-20 Martin Sebor <msebor@redhat.com>
2123
2124 * c-attribs.c (type_for_vector_size): New function.
2125 (type_valid_for_vector_size): Same.
2126 (handle_vector_size_attribute): Move code to the functions above
2127 and call them.
2128 (validate_attribute, has_attribute): New functions.
2129 * c-common.h (has_attribute): Declare.
2130 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
2131 * c-common.c (c_common_resword): Same.
2132
2674fa47
JM
21332018-11-16 Jason Merrill <jason@redhat.com>
2134
2135 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
2136 * c-attribs.c (attr_cold_hot_exclusions): Make public.
2137
258b3854
JJ
21382018-11-16 Jakub Jelinek <jakub@redhat.com>
2139
2140 PR middle-end/87854
2141 * c-common.c (fix_string_type): Reject string literals larger than
2142 TYPE_MAX_VALUE (ssizetype) bytes.
2143
1d249509
MS
21442018-11-15 Martin Sebor <msebor@redhat.com>
2145
2146 PR c++/87541
2147 PR c++/87542
2148 * c-attribs.c (positional_argument): New function.
2149 (handle_alloc_size_attribute): Use it and simplify.
2150 (handle_alloc_align_attribute): Same.
2151 (handle_assume_aligned_attribute): Same.
2152 (handle_nonnull_attribute): Same.
2153 * c-common.c (check_function_arguments): Pass fntype to
2154 check_function_format.
2155 * c-common.h (check_function_format): Add an argument.
2156 (PosArgFlags, positional_argument): Declare new type and function.
2157 * c-format.c (decode_format_attr): Add arguments.
2158 (check_format_string, get_constant): Same.
2159 (convert_format_name_to_system_name): Adjust.
2160
478dd60d
DM
21612018-11-15 David Malcolm <dmalcolm@redhat.com>
2162
2163 PR other/19165
2164 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
2165
8cca0163
JJ
21662018-11-14 Jakub Jelinek <jakub@redhat.com>
2167
8ee09943
JJ
2168 P1236R1 - Signed integers are two's complement
2169 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
2170 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
2171 with in-range second operand well defined for -std=c++2a.
2172
8cca0163
JJ
2173 PR other/88007
2174 * c-common.c (parse_optimize_options): Allocate option string from
2175 opts_obstack rather than as GC memory. Move the allocation after
2176 warning for invalid option.
2177
620e594b
DM
21782018-11-13 David Malcolm <dmalcolm@redhat.com>
2179
2180 * c-common.c (c_get_substring_location): Update for renaming of
2181 get_source_location_for_substring to get_location_within_string.
2182 * c-lex.c: Replace "source_location" with "location_t".
2183 * c-opts.c: Likewise.
2184 * c-ppoutput.c: Likewise.
2185
f9731de3
MS
21862018-11-13 Martin Sebor <msebor@redhat.com>
2187
2188 PR middle-end/81824
2189 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
2190 (handle_tls_model_attribute): Improve diagnostics.
2191
e4bd6d5e
JM
21922018-11-12 Jason Merrill <jason@redhat.com>
2193
a6bb6b07
JM
2194 * c-cppbuiltin.c (c_cpp_builtins): Define
2195 __cpp_impl_destroying_delete.
2196
e4bd6d5e
JM
2197 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
2198 __cpp_conditional_explicit.
2199
79a2c428
MS
22002018-11-09 Martin Sebor <msebor@redhat.com>
2201
2202 PR middle-end/81824
2203 * c-attribs.c (handle_copy_attribute): New function.
2204
4c7bd361
MS
22052018-11-09 Martin Sebor <msebor@redhat.com>
2206
2207 PR c/87795
2208 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
2209
28567c40
JJ
22102018-11-08 Jakub Jelinek <jakub@redhat.com>
2211
2212 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
2213 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
2214 enum omp_memory_order MEMORY_ORDER.
2215 (c_finish_omp_flush): Add MO argument.
2216 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
2217 (c_finish_omp_for): Add FINAL_P argument.
2218 * c-omp.c: Include memmodel.h.
2219 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
2220 OMP_TASKGROUP_CLAUSES to it.
2221 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
2222 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
2223 instead of OMP_ATOMIC_SEQ_CST.
2224 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
2225 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
2226 __atomic_thread_fence call with the given value.
2227 (check_omp_for_incr_expr): Formatting fixes.
2228 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
2229 even in OpenMP loops, diagnose if NE_EXPR and incr expression
2230 is not constant expression 1 or -1. Transform NE_EXPR loops
2231 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
2232 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
2233 loops too.
2234 (c_omp_split_clauses): Add support for combined
2235 #pragma omp parallel master and
2236 #pragma omp {,parallel }master taskloop{, simd} constructs.
2237 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
2238 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
2239 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
2240 (c_omp_predetermined_sharing): Don't return
2241 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
2242 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
2243 PRAGMA_OMP_REQUIRES.
2244 * c-pragma.h (enum pragma_kind): Likewise.
2245 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
2246 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
2247
204839e7
DM
22482018-11-08 David Malcolm <dmalcolm@redhat.com>
2249
2250 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
2251
d8010ee4
DM
22522018-11-08 David Malcolm <dmalcolm@redhat.com>
2253
2254 * c-format.c (local_cgraph_node_ptr_node): New variable.
2255 (gcc_dump_printf_char_table): Add entry for %C.
2256 (get_pointer_to_named_type): New function, taken from the handling
2257 code for "gimple *" from...
2258 (init_dynamic_diag_info): ...here. Add handling for
2259 "cgraph_node *".
2260 * c-format.h (T_CGRAPH_NODE): New.
2261
4be5c72c
JM
22622018-10-19 Jason Merrill <jason@redhat.com>
2263
2264 * c-cppbuiltin.c (c_cpp_builtins): Add
2265 __cpp_nontype_template_parameter_class.
2266
f3f6029d
NS
22672018-10-31 Nathan Sidwell <nathan@acm.org>
2268
ab5324fb
NS
2269 * c-opts.c (c_finish_options): Force command line macro
2270 location. Refactor to avoid repeating main debug hook.
2271 (push_command_line_include): Clarify comment.
2272
f3f6029d
NS
2273 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
2274
91e3ec29
MS
22752018-10-30 Martin Sebor <msebor@redhat.com>
2276
2277 PR middle-end/87041
2278 * c-format.c (check_format_types): Avoid diagnosing null pointer
2279 arguments to printf-family of functions.
2280
b5ff4f5c
MP
22812018-10-30 Marek Polacek <polacek@redhat.com>
2282
2283 Implement P0892R2, explicit(bool).
2284 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
2285
7e2de6df
DM
22862018-10-29 David Malcolm <dmalcolm@redhat.com>
2287
2288 * name-hint.h (name_hint::take_deferred): New member function.
2289
b2bf438c
DM
22902018-10-29 David Malcolm <dmalcolm@redhat.com>
2291
2292 PR c++/56856
2293 * c-common.c (check_function_sentinel): Call fold_for_warn on the
2294 argument.
2295 (check_function_restrict): Rename param "argarray" to
2296 "unfolded_argarray", and make a copy named "argarray", calling
2297 fold_for_warn on each argument.
2298 (check_function_arguments): Add note about responsibility for
2299 folding the arguments.
2300
9f936c86
JM
23012018-10-17 Joseph Myers <joseph@codesourcery.com>
2302
2303 * c-common.c (flag_isoc2x): New variable.
2304 * c-common.h (clk_c): Update comment to reference C2X.
2305 (flag_isoc99, flag_isoc11): Update comments to reference future
2306 standard versions in general.
2307 (flag_isoc2x): Declare.
2308 * c-opts.c (set_std_c2x): New function.
2309 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
2310 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
2311 flag_isoc2x to 0.
2312 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
2313
7a8a92c4
JM
23142018-10-17 Joseph Myers <joseph@codesourcery.com>
2315
2316 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
2317 (std=iso9899:2018): Document C17 as published in 2018.
2318
4dc003ff
CL
23192018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
2320
2321 PR c++/87364
2322 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
2323
79371671
WW
23242018-10-11 Will Wray <wjwray@gmail.com>
2325
2326 PR c++/87364
2327 * c-pretty-print.h (pp_c_type_cast): Prototype.
2328 (pp_c_integer_constant): Likewise.
2329 * c-pretty-print.c (pp_c_type_cast): No longer static.
2330 (pp_c_integer_constant): Likewise.
2331 (pp_c_enumeration_constant): Fix loop termination when finding
2332 name of constant. No longer returns a value. Call
2333 pp_c_integer_constant.
2334 (c_pretty_printer::constant): Update for changes to
2335 pp_c_enumeration_constant.
2336
46c62690
JJ
23372018-10-11 Jakub Jelinek <jakub@redhat.com>
2338
2339 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
2340 for no_unique_address.
2341
c24300ba
DM
23422018-10-09 David Malcolm <dmalcolm@redhat.com>
2343
2344 * c-common.c (c_option_controlling_cpp_error): Rename to...
2345 (c_option_controlling_cpp_diagnostic): ...this, and convert
2346 "reason" from int to enum.
2347 (c_cpp_error): Rename to...
2348 (c_cpp_diagnostic): ...this, converting level and reason to enums.
2349 * c-common.h (c_cpp_error): Rename to...
2350 (c_cpp_diagnostic): ...this, converting level and reason to enums.
2351 * c-opts.c (c_common_init_options): Update for renaming.
2352
8656dafa
RS
23532018-10-08 Richard Sandiford <richard.sandiford@arm.com>
2354
2355 PR c/87286
2356 * c-common.c (vector_types_compatible_elements_p): Use
2357 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
2358
8cff0652
VK
23592018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
2360
2361 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
2362 to generate constructor destructor priority warning.
2363 * c.opt (-Wprio-ctor-dtor): New option.
2364
bedf03a2
JM
23652018-10-01 Jason Merrill <jason@redhat.com>
2366
2367 * c-lex.c (c_common_has_attribute): Add no_unique_address.
2368
6cc430c1
EB
23692018-10-01 Eric Botcazou <ebotcazou@adacore.com>
2370
2371 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
2372 (dump_ada_node): Add const keyword.
2373
87677ac7
ML
23742018-09-25 Martin Liska <mliska@suse.cz>
2375
2376 * c-common.c (c_common_truthvalue_conversion):
2377 Remove Pascal from documentation.
2378
518196cb
EB
23792018-09-21 Eric Botcazou <ebotcazou@adacore.com>
2380
2381 * c-ada-spec.c: Include diagnostic.h.
2382 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
2383
a599af84
MP
23842018-09-19 Marek Polacek <polacek@redhat.com>
2385
2386 * c.opt (Wclass-conversion): New.
2387
9c4a4b3c
DM
23882018-09-17 David Malcolm <dmalcolm@redhat.com>
2389
2390 * c-format.c (range_label_for_format_type_mismatch::get_text):
2391 Update for new param.
2392
c896ecfe
DM
23932018-09-17 David Malcolm <dmalcolm@redhat.com>
2394
2395 * c-format.c (format_warning_at_char): Update for introduction of
2396 format_string_diagnostic_t.
2397 (format_type_warning): Likewise.
2398
80c6d1f4
MJ
23992018-09-17 Martin Jambor <mjambor@suse.cz>
2400
2401 PR c/63886
2402 * c.opt (Wabsolute-value): New.
2403
6d900107
BE
24042018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2405
2406 * c-common.c (complete_flexible_array_elts): New helper function.
2407 * c-common.h (complete_flexible_array_elts): Declare.
2408
b5764229
BE
24092018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2410
2411 * c-common.c (braced_list_to_string): Remove eval parameter.
2412 Add some more checks. Always create zero-terminated STRING_CST.
2413 * c-common.h (braced_list_to_string): Adjust prototype.
2414
85204e23
DM
24152018-08-27 David Malcolm <dmalcolm@redhat.com>
2416
2417 PR 87091
2418 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
2419 to a tri-state.
2420 (maybe_suggest_missing_token_insertion): Likewise.
2421 (maybe_add_include_fixit): Add param "override_location". If set,
2422 and source-printing is enabled, then override the rich_location's
2423 primary location with that of the insertion point for the fix-it
2424 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
2425 * c-common.h (extern void maybe_add_include_fixit): Add bool
2426 param.
2427 * c-format.c (selftest::test_type_mismatch_range_labels): Update
2428 for conversion of show_caret_p to a tri-state.
2429 * c-warn.c (warn_for_restrict): Likewise.
2430 * known-headers.cc
2431 (suggest_missing_header::~suggest_missing_header): Update call to
2432 maybe_add_include_fixit to suggest overriding the location, as it
2433 is for a note.
2434
3d78e008
ML
24352018-08-27 Martin Liska <mliska@suse.cz>
2436
2437 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
2438 fndecl_built_in_p and remove check for FUNCTION_DECL if
2439 possible.
3d78e008
ML
2440 (check_builtin_function_arguments): Likewise.
2441 (reject_gcc_builtin): Likewise.
2442 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
2443
b5be6d0c
MP
24442018-08-26 Marek Polacek <polacek@redhat.com>
2445
2446 PR c++/87029, Implement -Wredundant-move.
2447 * c.opt (Wredundant-move): New option.
2448
79ca9c35
MP
24492018-08-21 Marek Polacek <polacek@redhat.com>
2450
2451 PR c++/86981, Implement -Wpessimizing-move.
2452 * c.opt (Wpessimizing-move): New option.
2453
097f82ec
DM
24542018-08-20 David Malcolm <dmalcolm@redhat.com>
2455
2456 PR other/84889
2457 * c-attribs.c (common_handle_aligned_attribute): Add
2458 auto_diagnostic_group instance.
2459 * c-indentation.c (warn_for_misleading_indentation): Likewise.
2460 * c-opts.c (c_common_post_options): Likewise.
2461 * c-warn.c (warn_logical_not_parentheses): Likewise.
2462 (warn_duplicated_cond_add_or_warn): Likewise.
2463 (warn_for_multistatement_macros): Likewise.
2464
3fb558b1
NS
24652018-08-20 Nathan Sidwell <nathan@acm.org>
2466
2467 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
2468 access.
2469
800c0e98
NS
24702018-08-17 Nathan Sidwell <nathan@acm.org>
2471
2472 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
2473 field.
2474 (laxy_hex_fp_value_count): Make unsigned.
2475 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
2476 manipulate the macro.
2477 (builtin_defin_with_hex_fp_value): Adjust callback name, use
2478 cpp_define_lazily.
2479
6f795a92
DM
24802018-08-17 David Malcolm <dmalcolm@redhat.com>
2481
2482 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
2483 (gcc_dump_printf_length_specs): New.
2484 (gcc_dump_printf_flag_pairs): New.
2485 (gcc_dump_printf_flag_specs): New.
2486 (gcc_dump_printf_char_table): New.
2487 (format_types_orig): Add entry for "gcc_dump_printf".
2488 (init_dynamic_diag_info): Set up length_char_specs and
2489 conversion_specs for gcc_dump_printf_format_type.
2490 (handle_format_attribute): Handle gcc_dump_printf_format_type.
2491
c5d725c0
NS
24922018-08-17 Nathan Sidwell <nathan@acm.org>
2493
10f04917
NS
2494 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
2495
c5d725c0
NS
2496 * c-ada-spec.c: Don't #include "cpp-id-data.h"
2497 * c-cppbuiltin.c: Likewise.
2498
c0c12356
ML
24992018-08-17 Martin Liska <mliska@suse.cz>
2500
2501 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
2502 Ignore/Deprecated flag. Warning is done automatically for
2503 Deprecated flags.
c0c12356 2504
10fcc142
DM
25052018-08-16 David Malcolm <dmalcolm@redhat.com>
2506
2507 PR c++/70693
2508 * c-common.c (selftest::c_family_tests): Call
2509 selftest::c_indentation_c_tests.
2510 * c-common.h (selftest::c_indentation_c_tests): New decl.
2511 * c-indentation.c: Include "selftest.h".
2512 (next_tab_stop): Add "tab_width" param, rather than accessing
2513 cpp_opts.
2514 (get_visual_column): Likewise. Clarify comment. Bulletproof
2515 against reading past the end of the line.
2516 (get_first_nws_vis_column): Add "tab_width" param.
2517 (detect_intervening_unindent): Likewise.
2518 (should_warn_for_misleading_indentation): Read tab width from
2519 cpp_opts and pass around.
2520 (selftest::test_next_tab_stop): New test.
2521 (selftest::assert_get_visual_column_succeeds): New function.
2522 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
2523 (selftest::assert_get_visual_column_fails): New function.
2524 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
2525 (selftest::test_get_visual_column): New test.
2526 (selftest::c_indentation_c_tests): New function.
2527
3f6677f4
NS
25282018-08-16 Nathan Sidwell <nathan@acm.org>
2529
2530 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
2531 (store_ada_macro): Likewise.
2532 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
2533 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
2534
96e6ae57
DM
25352018-08-15 David Malcolm <dmalcolm@redhat.com>
2536
2537 * c-format.c: Include "selftest-diagnostic.h" and
2538 "gcc-rich-location.h".
2539 (format_warning_at_char): Pass NULL for new label params of
2540 format_warning_va.
2541 (class indirection_suffix): New class.
2542 (class range_label_for_format_type_mismatch): New class.
2543 (format_type_warning): Move logic for generating "*" suffix to
2544 class indirection_suffix. Create "fmt_label" and "param_label"
2545 to show their types, and pass them to the
2546 format_warning_at_substring calls.
2547 (selftest::test_type_mismatch_range_labels): New test.
2548 (selftest::c_format_c_tests): Call it.
2549
23aa9f7c
MS
25502018-08-13 Martin Sebor <msebor@redhat.com>
2551
2552 PR tree-optimization/71625
2553 * c-common.c (braced_list_to_string): New function.
2554 * c-common.h (braced_list_to_string): Declare it.
2555
f10a9135
NS
25562018-08-08 Nathan Sidwell <nathan@acm.org>
2557
2558 * c-common.c (try_to_locate_new_include_inertion_point): Use
2559 linemap_included_from_linemap.
2560 * c-lex.c (fe_file_change): Use linemap_included_from.
2561 * c-ppoutput.c (pp_file_change): Likewise.
2562
8a45b051
MS
25632018-08-01 Martin Sebor <msebor@redhat.com>
2564
2565 PR tree-optimization/86650
ab20d992 2566 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
8a45b051
MS
2567 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
2568 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
2569 * c-format.h (T89_G): Update to be "gimple *" rather than
2570 "gcall *".
2571 (local_gcall_ptr_node): Rename...
2572 (local_gimple_ptr_node): ...to this.
2573
e540ccc0
DM
25742018-07-31 David Malcolm <dmalcolm@redhat.com>
2575
2576 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
2577 table entries for gcc_diag_char_table, and the 'Z' entry from
2578 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
2579 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
2580 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
2581 adding missing "Z" for this table. Remove erroneous "G" and "K"
2582 entries.
2583 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
2584 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
2585 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
2586
425fc685
RE
25872018-07-31 Richard Earnshaw <rearnsha@arm.com>
2588
2589 * c-common.c (speculation_safe_resolve_call): New function.
2590 (speculation_safe_resolve_params): New function.
2591 (speculation_safe_resolve_return): New function.
2592 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
2593 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
2594 __HAVE_SPECULATION_SAFE_VALUE.
2595
181463c2
DM
25962018-07-20 David Malcolm <dmalcolm@redhat.com>
2597
2598 * c-common.c (c_cpp_error): Remove redundant "line_table"
2599 parameter from call to rich_location::set_range.
2600 (maybe_suggest_missing_token_insertion): Likewise.
2601
0d7f9065
MS
26022018-07-20 Martin Sebor <msebor@redhat.com>
2603
2604 PR middle-end/82063
ab20d992 2605 * c.opt (-Warray-bounds): Remove redundant -Wall.
0d7f9065 2606
00abf86c
MS
26072018-07-20 Martin Sebor <msebor@redhat.com>
2608
2609 PR middle-end/82063
2610 * c-common.h (c_common_handle_option): Change function argument
2611 to HOST_WIDE_INT.
2612 * c-opts.c (c_common_init_options): Same.
2613 (c_common_handle_option): Same. Remove special handling of
2614 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
2615 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
2616 options to take a HOST_WIDE_INT argument and accept a byte-size
2617 suffix. Initialize.
2618 (-Wvla-larger-than): Same.
2619 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
2620 (-Wno-vla-larger-than): Same.
2621
9b452033
JJ
26222018-07-12 Jakub Jelinek <jakub@redhat.com>
2623
2624 * c-attribs.c (c_common_attribute_table): Add
2625 "omp declare target implicit" attribute.
2626
cd0762f3
RB
26272018-07-12 Richard Biener <rguenther@suse.de>
2628
2629 PR c/86453
2630 * c-attribs.c (handle_packed_attribute): Do not build a variant
2631 type with TYPE_PACKED, instead ignore the attribute if we may
2632 not apply to the original type.
2633
0b27c3ed
JJ
26342018-07-10 Jakub Jelinek <jakub@redhat.com>
2635
2636 PR c++/86443
2637 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
2638 to contain TREE_LIST for both the original class iterator and the
2639 "last" helper var.
2640
e730a0ef
EB
26412018-07-07 Eric Botcazou <ebotcazou@adacore.com>
2642
2643 * c-ada-spec.c (to_ada_name): Remove index parameter.
2644 (pp_ada_tree_identifier): Likewise.
2645 (dump_ada_macros): Adjust call to to_ada_name.
2646 (struct overloaded_name_hash): Delete.
2647 (struct overloaded_name_hasher): Likewise.
2648 (overloaded_names): Likewise.
2649 (compute_overloading_index): Likewise.
2650 (dump_ada_decl_name): Do not call compute_overloading_index and
2651 adjust calls to pp_ada_tree_identifier.
2652 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
2653 (dump_ada_import): Add spc parameter and switch to aspect syntax.
2654 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
2655 (dump_ada_enum_type): Remove type and display_convention parameters.
2656 Adjust calls to pp_ada_tree_identifier.
2657 (dump_ada_node): Likewise and for dump_ada_structure.
2658 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
2659 and tidy up.
2660 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
2661 syntax.
2662 (print_constructor): Adjust call to pp_ada_tree_identifier.
2663 (print_destructor): Likewise.
2664 (dump_ada_declaration): Switch to aspect syntax.
2665 (dump_ada_structure): Likewise and tidy up. Replace display_convention
2666 parameter with nested parameter.
2667 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
2668 (dump_ada_specs): Do not delete overloaded_names table.
2669
8de583fc
PB
26702018-07-06 Peter Bergner <bergner@linux.ibm.com>
2671
2672 PR target/86324
e730a0ef 2673 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
2674 target hook.
2675
09cff37b
NS
26762018-07-05 Nathan Sidwell <nathan@acm.org>
2677
2678 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
2679 NO_IMPLICIT_EXTERN_C.
2680
98086b2b
ML
26812018-06-28 Martin Liska <mliska@suse.cz>
2682
2683 * cppspec.c: Include opt-suggestions.h.
2684
ab20d992
JJ
26852018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2686 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
2687 Cesar Philippidis <cesar@codesourcery.com>
2688
2689 * c-pragma.h (enum pragma_omp_clause): Add
2690 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
2691 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
2692
f41b7612
JJ
26932018-06-20 Jakub Jelinek <jakub@redhat.com>
2694
2695 PR c++/86210
2696 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
2697 comment.
2698
4252ccd7
MS
26992018-06-18 Martin Sebor <msebor@redhat.com>
2700
2701 PR middle-end/85602
2702 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
2703 nonstring.
2704
e197e64e
KV
27052018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2706
2707 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
2708
34a7a230
JM
27092018-06-13 Jason Merrill <jason@redhat.com>
2710
5cef3733
JM
2711 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
2712 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
2713 handling.
2714
34a7a230
JM
2715 PR c++/86094 - wrong code with defaulted move ctor.
2716 * c-opts.c (c_common_post_options): Bump the current ABI version to
2717 13. Set warn_abi_version and flag_abi_compat_version to the current
2718 version rather than 0. Fix defaulting flag_abi_compat_version from
2719 warn_abi_version.
2720
bb0f14ae
MS
27212018-06-12 Martin Sebor <msebor@redhat.com>
2722
2723 PR c/85931
2724 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
2725 sizeof source and destination yields the same value.
2726
3713f2e2
ML
27272018-06-12 Martin Liska <mliska@suse.cz>
2728
2729 * c.opt: Make MPX-related options as Deprecated.
2730
4af78ef8
DM
27312018-06-08 David Malcolm <dmalcolm@redhat.com>
2732
2733 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
2734 rather than 0.
2735
31db0fe0
ML
27362018-06-08 Martin Liska <mliska@suse.cz>
2737
2738 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
2739 for MPX (macros, related functions, fields in cgraph_node, ...).
2740 (handle_bnd_legacy): Likewise.
2741 (handle_bnd_instrument): Likewise.
2742 * c.opt: Likewise.
2743
fe16acf2
JJ
27442018-06-06 Jakub Jelinek <jakub@redhat.com>
2745
2746 PR c++/86068
2747 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
2748 __cpp_transactional_memory to 201500 instead of 210500.
2749
4dbdb49b
JM
27502018-06-06 Jason Merrill <jason@redhat.com>
2751
2752 PR c++/85710 - ICE with -Wmemset-elt-size.
2753 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
2754
f8ad043f
JM
27552018-06-01 Jason Merrill <jason@redhat.com>
2756
2757 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
2758 201703.
2759
abc24d93
EB
27602018-06-01 Eric Botcazou <ebotcazou@adacore.com>
2761
2762 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
2763 declaration for a typedef independently of whether the declaration of
2764 the subtype is generated.
2765
d258f4aa
MS
27662018-05-31 Martin Sebor <msebor@redhat.com>
2767
2768 PR c/82063
2769 * c.opt (-Wno-alloc-size-larger-than): New option.
2770
b67b9225
DP
27712018-04-22 David Pagan <dave.pagan@oracle.com>
2772
2773 PR c/55976
2774 * c-opts.c (c_common_post_options): Set default for warn_return_type
ab20d992 2775 for C++/C++ with ObjC extensions only. For C, makes it possible to
b67b9225
DP
2776 differentiate between default (no option), -Wreturn-type, and
2777 -Wno-return-type.
2778
04eb9c55
JM
27792018-05-29 Jason Merrill <jason@redhat.com>
2780
2781 * c.opt (Winit-list-lifetime): New flag.
2782
b0c31bc6
BE
27832018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
2784
2785 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
2786 splay_tree_delete_pointers.
2787
44284983
JJ
27882018-05-26 Jakub Jelinek <jakub@redhat.com>
2789
2790 PR bootstrap/85921
2791 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
2792 noinline variable to workaround broken kernel headers.
2793
b46b715d
JM
27942018-05-18 Jason Merrill <jason@redhat.com>
2795
2796 * c.opt (Wdeprecated-copy): New flag.
2797
40659769
ML
27982018-05-17 Martin Liska <mliska@suse.cz>
2799
2800 * c-warn.c (overflow_warning): Do not use
2801 space in between 'G_' and '('.
2802
403962ea
JM
28032018-05-09 Jason Merrill <jason@redhat.com>
2804
2805 * c-common.c (valid_array_size_p): Add complain parameter.
2806 * c-common.h: ...which defaults to true.
2807
1c9ee609
JJ
28082018-05-11 Jakub Jelinek <jakub@redhat.com>
2809
2810 PR c/85696
2811 * c-omp.c (c_omp_predetermined_sharing): Return
2812 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
2813
19916065
ML
28142018-05-11 Martin Liska <mliska@suse.cz>
2815
92a285c1 2816 PR sanitizer/85556
19916065
ML
2817 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
2818 TREE_LIST values.
2819
79e7b1fe
JJ
28202018-05-10 Jakub Jelinek <jakub@redhat.com>
2821
2822 PR c++/85662
2823 * c-common.h (fold_offsetof_1): Removed.
2824 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
2825 CTX argument defaulted to ERROR_MARK.
2826 * c-common.c (fold_offsetof_1): Renamed to ...
2827 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
2828 argument, convert the pointer constant to TYPE and use size_binop
2829 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
2830 a pointer type. Adjust recursive calls.
2831
86c12f76
EB
28322018-05-10 Eric Botcazou <ebotcazou@adacore.com>
2833
2834 PR c++/85400
2835 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
2836
ee336e84
NS
28372018-05-07 Nathan Sidwell <nathan@acm.org>
2838
2839 * c.opt (ffor-scope): Remove functionality, issue warning.
2840
6c072e21
NS
28412018-05-03 Nathan Sidwell <nathan@acm.org>
2842
2843 * c.opt (ffriend-injection): Remove functionality, issue warning.
2844
2cc7d3a7
DM
28452018-05-01 David Malcolm <dmalcolm@redhat.com>
2846
2847 PR c/84258
2848 * c-format.c (struct format_check_results): Add field
2849 "number_non_char".
2850 (check_format_info): Initialize it, and warn if encountered.
2851 (check_format_arg): Distinguish between wide char and
2852 everything else when detecting arrays of non-char.
2853
7761dfbe
DM
28542018-04-30 David Malcolm <dmalcolm@redhat.com>
2855
2856 * c-format.c (get_corrected_substring): Update for
2857 location_get_source_line returning a char_span. Use a char_span
2858 when handling the prefix of the correction.
2859 * c-indentation.c (get_visual_column): Update for
2860 location_get_source_line returning a char_span.
2861 (get_first_nws_vis_column): Likewise.
2862
62e98ef1
DM
28632018-03-29 David Malcolm <dmalcolm@redhat.com>
2864
2865 PR c++/84269
2866 * known-headers.cc (get_stdlib_header_for_name): Add various names
2867 from <assert.h>, <string.h>, and <memory.h>; add more names from
2868 <stdio.h>.
2869
a7dea617
JJ
28702018-03-27 Jakub Jelinek <jakub@redhat.com>
2871
2872 PR c++/85061
2873 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
2874 get_base_address of the second operand is a VAR_P, rather than the
2875 operand itself, and use gcc_checking_assert instead of gcc_assert.
2876
889a3a30
MP
28772018-03-23 Marek Polacek <polacek@redhat.com>
2878
2879 PR c++/85045
2880 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
2881 <case RDIV_EXPR>: Tweak condition.
2882
452154b9
EB
28832018-03-20 Eric Botcazou <ebotcazou@adacore.com>
2884
2885 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
2886
63ecb626
JJ
28872018-03-16 Jakub Jelinek <jakub@redhat.com>
2888
ce811fc4
JJ
2889 PR c/84909
2890 * c-warn.c (conversion_warning): Replace "to to" with "to" in
2891 diagnostics.
2892
63ecb626
JJ
2893 PR c/84910
2894 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
2895 diagnostics.
2896
a1295eec
RB
28972018-03-16 Richard Biener <rguenther@suse.de>
2898
2899 PR c/84873
2900 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
2901 unshare the possibly folded expression.
2902
919674fb
RB
29032018-03-15 Richard Biener <rguenther@suse.de>
2904
2905 PR c/84873
2906 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
2907
f99309b2
MS
29082018-03-13 Martin Sebor <msebor@redhat.com>
2909
2910 PR tree-optimization/84725
2911 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
2912 with all three narrow character types, including their qualified forms.
2913
e9b9fa4c
MS
29142018-03-12 Martin Sebor <msebor@redhat.com>
2915
2916 PR tree-optimization/83456
ab20d992 2917 * c-common.c (check_function_restrict): Return bool.
e9b9fa4c
MS
2918 Restore checking of bounded built-in functions.
2919 (check_function_arguments): Also return the result
2920 of warn_for_restrict.
ab20d992
JJ
2921 * c-common.c (check_function_restrict): Return bool.
2922 * c-warn.c (warn_for_restrict): Return bool.
e9b9fa4c 2923
0805d020
MP
29242018-03-02 Marek Polacek <polacek@redhat.com>
2925
2926 PR c++/84171
2927 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
2928 is erroneous.
2929
ed2a2f08
TS
29302018-03-02 Thomas Schwinge <thomas@codesourcery.com>
2931
2932 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
2933 function".
2934
90abdde0
MP
29352018-03-01 Marek Polacek <polacek@redhat.com>
2936
2937 PR c++/84639
2938 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
2939 alignment in computation.
2940
c6db43fa
EB
29412018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2942
2943 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
2944 <REAL_TYPE>: Deal specifically with _Float128/__float128.
2945
9e25c7ed
EB
29462018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2947
2948 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
2949 (is_char_array): Take a type instead of a declaration.
2950 (dump_ada_array_type): Likewise.
2951 (is_simple_enum): Minor tweak.
2952 (dump_ada_enum_type): New function extracted from...
2953 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
2954 <INTEGER_TYPE>: Remove unreachable code.
2955 <RECORD_TYPE>: Likewise. Minor tweaks.
2956 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
2957 <ENUMERAL_TYPE>: New case.
2958 <RECORD_TYPE>: Factor out common code.
2959 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
2960 Minor tweaks. Deal with enumeral types.
2961 (dump_ada_structure): Minor tweaks.
2962
09de3550
EB
29632018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2964
2965 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
2966 address for incomplete structures.
2967 (dump_forward_type): Do not bail out for incomplete structures.
2968 (dump_ada_declaration): Do not special-case incomplete structures
2969 for subtypes. Dump them as null records for types.
2970
095d8d4b
EB
29712018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2972
2973 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
2974 (is_char_array): Fix formatting.
2975 (dump_template_types): Likewise.
2976 (dump_generic_ada_node): Rename into...
2977 (dump_ada_node): ...this.
2978 <POINTER_TYPE>: Remove superfluous space. Use generic address for
2979 incomplete structures and not for empty structures. Do not use it
2980 when forward declarations are needed.
2981 (dump_forward_type): New function.
2982 (dump_nested_types): Remove FORWARD parameter. Do not consider
2983 TREE_VISITED and do not generate a forward declaration. Only dump
2984 original nested types for nested declaration.
2985 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
2986 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
2987 <RECORD_TYPE>: Do not consider TREE_VISITED.
2988 (dump_ada_declaration): Use booleans and fix formatting throughout.
2989 <TYPE_DECL>: Skip incomplete structures and not empty structures.
2990 Call dump_forward_type instead of dump_nested_types for a typedef.
2991 Remove superfluous check and adjust call to dump_nested_types.
2992 <POINTER_TYPE>: Call dump_forward_type and fall through.
2993 (dump_ada_struct_decl): Rename into...
2994 (dump_ada_structure): ...this. Do not special-case empty structures.
2995
d4cfd486
MS
29962018-02-27 Martin Sebor <msebor@redhat.com>
2997
2998 PR c++/83871
2999 * c.opt (-Wmissing-attributes): New option.
3000
b22dbd03
ML
30012018-02-21 Martin Liska <mliska@suse.cz>
3002
3003 * c.opt (Wcatch-value=): Add IntegerRange.
3004
883dfe2a
JM
30052018-02-15 Jason Merrill <jason@redhat.com>
3006
3007 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
3008
0444aa9c
NS
30092018-02-09 Nathan Sidwell <nathan@acm.org>
3010
3011 PR c/84293
3012 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
3013 arg.
3014 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
3015 arg. Adjust.
3016
cea71f0a
MS
30172018-02-09 Martin Sebor <msebor@redhat.com>
3018
3019 PR lto/84212
3020 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
3021 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
3022 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
3023 (-Wstrict-overflow, -Wsuggest-attribute): Same.
3024 (-Wuninitialized): Same.
3025
8c8b7be5
EB
30262018-02-09 Eric Botcazou <ebotcazou@adacore.com>
3027
3028 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
3029 keyword for components.
3030
7c30b12a
PC
30312018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
3032
3033 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
3034
eece7fe5
JK
30352018-02-02 Julia Koval <julia.koval@intel.com>
3036
3037 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
3038
7d07a93a
MP
30392018-01-29 Marek Polacek <polacek@redhat.com>
3040
3041 PR c/83966
3042 * c-format.c (check_function_format): Check current_function_decl.
3043
53723269
JJ
30442018-01-27 Jakub Jelinek <jakub@redhat.com>
3045
3046 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
3047 argument.
3048 (LAZY_HEX_FP_VALUES_CNT): Define.
3049 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
3050 values rather than just 12.
3051 (builtin_define_with_hex_fp_value): Likewise.
3052
7365279f
BK
30532018-01-18 Boris Kolpackov <boris@codesynthesis.com>
3054
92a285c1
ML
3055 PR other/70268
3056 * c.opt (-fmacro-prefix-map): New option.
3057 * c-opts.c (c_common_handle_option): Handle it.
3058 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
3059 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 3060
bb9869d5
DM
30612018-01-17 David Malcolm <dmalcolm@redhat.com>
3062
3063 PR c++/83814
3064 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
3065
68dc87c3
EB
30662018-01-10 Eric Botcazou <ebotcazou@adacore.com>
3067
3068 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
3069 Skip 'f' and 'F' characters if it is true.
3070 (store_ada_macro): Minor tweak.
3071 (dump_ada_macros) <CPP_COMMENT>: Likewise.
3072 <CPP_WSTRING>: Likewise.
3073 <CPP_STRING>: Output '&' in the buffer if not the first string.
3074 <CPP_NUMBER>: Adjust calls to dump_number.
3075
9a004410
DM
30762018-01-10 David Malcolm <dmalcolm@redhat.com>
3077
3078 PR c++/43486
3079 * c-common.c: Include "selftest.h".
3080 (get_atomic_generic_size): Perform the test for integral type
3081 before the range test for any integer constant, fixing indentation
3082 of braces. Call fold_for_warn before testing for an INTEGER_CST.
3083 (reject_gcc_builtin): Strip any location wrapper from EXPR.
3084 (selftest::test_fold_for_warn): New function.
3085 (selftest::c_common_c_tests): New function.
3086 (selftest::c_family_tests): Call it, and
3087 selftest::c_pretty_print_c_tests.
3088 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
3089 * c-format.c (check_format_arg): Convert VAR_P check to a
3090 fold_for_warn.
3091 * c-pretty-print.c: Include "selftest.h".
3092 (pp_c_cast_expression): Don't print casts for location wrappers.
3093 (selftest::assert_c_pretty_printer_output): New function.
3094 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
3095 (selftest::test_location_wrappers): New function.
3096 (selftest::c_pretty_print_c_tests): New function.
3097 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
3098
5c0caeb3
RS
30992018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3100 Alan Hayward <alan.hayward@arm.com>
3101 David Sherwood <david.sherwood@arm.com>
3102
3103 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
3104
73a699ae
RS
31052018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3106 Alan Hayward <alan.hayward@arm.com>
3107 David Sherwood <david.sherwood@arm.com>
3108
3109 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
3110 as polynomial.
3111
928686b1
RS
31122018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3113 Alan Hayward <alan.hayward@arm.com>
3114 David Sherwood <david.sherwood@arm.com>
3115
3116 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
3117 (convert_vector_to_array_for_subscript): Handle polynomial
3118 TYPE_VECTOR_SUBPARTS.
3119 (c_common_type_for_mode): Check valid_vector_subparts_p.
3120 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
3121 VECTOR_CST_NELTS.
3122
85ec4feb
JJ
31232018-01-03 Jakub Jelinek <jakub@redhat.com>
3124
3125 Update copyright years.
3126
170a8bd6 31272017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 3128 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
3129
3130 * c-pragma.c (init_pragma): Register pragma GCC unroll.
3131 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
3132
ab20d992 31332017-12-22 Alexandre Oliva <aoliva@redhat.com>
18408e96
AO
3134
3135 PR debug/83527
3136 PR debug/83419
3137 * c-semantics.c (only_debug_stmts_after_p): New.
3138 (pop_stmt_list): Clear side effects in debug-only stmt list.
3139 Check for single nondebug stmt followed by debug stmts only.
3140
c12d20d4
AO
31412017-12-21 Alexandre Oliva <aoliva@redhat.com>
3142
3143 PR debug/83419
3144 * c-semantics.c (pop_stmt_list): Propagate side effects from
3145 single nondebug stmt to container list.
3146
01512446
JJ
31472017-12-19 Jakub Jelinek <jakub@redhat.com>
3148
3149 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
3150 conditions with typical order conditions.
3151
82cfbd01
MP
31522017-12-18 Marek Polacek <polacek@redhat.com>
3153
3154 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
3155 not in effect.
3156
99da11ec
MS
31572017-12-17 Martin Sebor <msebor@redhat.com>
3158
3159 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
3160 an error for attribute warn_if_not_aligned.
3161
cc8bea0a
MS
31622017-12-16 Martin Sebor <msebor@redhat.com>
3163
3164 PR tree-optimization/78918
3165 * c-common.c (check_function_restrict): Avoid checking built-ins.
3166 * c.opt (-Wrestrict): Include in -Wall.
3167
4849deb1
JJ
31682017-12-15 Jakub Jelinek <jakub@redhat.com>
3169
3170 * c-attribs.c (c_common_attribute_table,
3171 c_common_format_attribute_table): Swap affects_type_identity
3172 and handler fields, adjust comments.
3173
c65e18d3
BE
31742017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3175
3176 * c.opt (Wcast-function-type): New warning option.
3177 * c-lex.c (get_fileinfo): Avoid warning.
3178 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
3179
2004617a
QZ
31802017-12-14 Qing Zhao <qing.zhao@oracle.com>
3181
7365279f 3182 PR middle_end/79538
2004617a
QZ
3183 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
3184 Adjust the size of buf1 and buf2, add a new buf to avoid
3185 format-overflow warning.
3186
ab20d992 31872017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
3188
3189 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
3190 subsequent statement list.
3191
5d9ae53d
MS
31922017-12-07 Martin Sebor <msebor@redhat.com>
3193
3194 PR c/81544
3195 PR c/81566
3196 * c-attribs.c (attr_aligned_exclusions): New array.
3197 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
3198 (attr_common_exclusions, attr_const_pure_exclusions): Same.
3199 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
3200 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
3201 (attr_warn_unused_result_exclusions): Same.
3202 (handle_hot_attribute, handle_cold_attribute): Simplify.
3203 (handle_const_attribute): Warn on function returning void.
3204 (handle_pure_attribute): Same.
3205 (handle_aligned_attribute): Diagnose conflicting attribute
3206 specifications.
3207 * c-warn.c (diagnose_mismatched_attributes): Simplify.
3208
c79144f8
DM
32092017-12-06 David Malcolm <dmalcolm@redhat.com>
3210
3211 PR c/83236
3212 * c-common.c (selftest::c_family_tests): Call
3213 selftest::c_spellcheck_cc_tests.
3214 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
3215 * c-spellcheck.cc: Include "selftest.h".
3216 (name_reserved_for_implementation_p): New function.
3217 (should_suggest_as_macro_p): New function.
3218 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
3219 should_suggest_as_macro_p and call it.
3220 (selftest::test_name_reserved_for_implementation_p): New function.
3221 (selftest::c_spellcheck_cc_tests): New function.
3222 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
3223
613bc14f
DM
32242017-12-06 David Malcolm <dmalcolm@redhat.com>
3225
3226 * c-spellcheck.cc: New file, taken from macro-handling code in
3227 spellcheck-tree.c.
3228 * c-spellcheck.h: New file, taken from macro-handling code in
3229 spellcheck-tree.h.
3230
e76c7157
JJ
32312017-12-01 Jakub Jelinek <jakub@redhat.com>
3232
3233 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
3234 attribute.
3235 (handle_simd_attribute): Don't check for "cilk simd function"
3236 attribute. Reindent, formatting changes.
3237
b0da4034
JK
32382017-11-30 Julia Koval <julia.koval@intel.com>
3239
3240 * c-common.h (inv_list): Remove.
3241
058f0b9e
JJ
32422017-11-28 Jakub Jelinek <jakub@redhat.com>
3243
3244 PR sanitizer/81275
3245 * c-common.c (c_switch_covers_all_cases_p_1,
3246 c_switch_covers_all_cases_p): New functions.
3247 * c-common.h (c_switch_covers_all_cases_p): Declare.
3248
5e9d6aa4 32492017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 3250 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
3251
3252 * array-notation-common.c: Delete.
3253 * c-cilkplus.c: Ditto.
3254 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
3255 * c-common.def (ARRAY_NOTATION_REF): Remove.
3256 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
3257 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
3258 c_validate_cilk_plus_loop, cilkplus_an_parts,
3259 cilk_ignorable_spawn_rhs_op,
3260 cilk_recognize_spawn): Remove.
3261 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
3262 * c-omp.c: Remove CILK_SIMD check.
3263 * c-pragma.c: Ditto.
3264 * c-pragma.h: Remove CILK related pragmas.
3265 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
3266 ARRAY_NOTATION_REF condition.
3267 (c_pretty_printer::expression): Ditto.
3268 * c.opt (fcilkplus): Remove.
3269 * cilk.c: Delete.
3270
1af4ebf5
MG
32712017-11-21 Marc Glisse <marc.glisse@inria.fr>
3272
3273 * c-pretty-print.c (pp_c_additive_expression,
3274 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
3275
d44ed508
JJ
32762017-11-21 Jakub Jelinek <jakub@redhat.com>
3277
7d2f0f9b
JJ
3278 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
3279
d44ed508
JJ
3280 PR c++/83059
3281 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
3282 instead of tree_to_uhwi, formatting fix.
3283
26edace6
DM
32842017-11-20 David Malcolm <dmalcolm@redhat.com>
3285
3286 PR c/81404
3287 * known-headers.cc: New file, based on material from c/c-decl.c.
3288 (suggest_missing_header): Copied as-is.
3289 (get_stdlib_header_for_name): New, based on get_c_name_hint but
3290 heavily edited to add C++ support. Add some knowledge about
3291 <limits.h>, <stdint.h>, and <wchar.h>.
3292 * known-headers.h: Likewise.
3293
6c7a259b
DM
32942017-11-20 David Malcolm <dmalcolm@redhat.com>
3295
3296 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
3297 (lookup_name_fuzzy): Likewise. Convert return type from
3298 const char * to name_hint. Add location_t param.
3299 * name-hint.h: New header.
3300
f9c59f7e
JJ
33012017-11-19 Jakub Jelinek <jakub@redhat.com>
3302
3303 PR c/66618
3304 PR c/69960
3305 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
3306
1e39313a
JM
33072017-11-16 Joseph Myers <joseph@codesourcery.com>
3308
3309 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
3310 expected publication date of C17.
3311 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
3312
3ca0dc60
JM
33132017-11-15 Joseph Myers <joseph@codesourcery.com>
3314
3315 PR c/81156
3316 * c-common.c (c_common_reswords): Add __builtin_tgmath.
3317 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
3318
025d57f0
MS
33192017-11-10 Martin Sebor <msebor@redhat.com>
3320
3321 PR c/81117
3322 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
3323 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
3324 * c.opt (-Wstringop-truncation): New option.
3325
1b6fa695
ML
33262017-11-06 Martin Liska <mliska@suse.cz>
3327
3328 PR middle-end/82404
3329 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
3330 FE.
3331 * c.opt: Set default value of warn_return_type.
3332
64a5912c
DM
33332017-10-31 David Malcolm <dmalcolm@redhat.com>
3334
3335 * c-common.c (binary_op_error): Update for renaming of
3336 error_at_rich_loc.
3337 (c_parse_error): Likewise.
3338 * c-warn.c (warn_logical_not_parentheses): Likewise for
3339 renaming of inform_at_rich_loc.
3340 (warn_for_restrict): Likewise for renaming of
3341 warning_at_rich_loc_n.
3342
c76dc9c3
JM
33432017-10-30 Joseph Myers <joseph@codesourcery.com>
3344
3345 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
3346 * c-opts.c (set_std_c17): New function.
3347 (c_common_init_options): Use gnu17 as default C version.
3348 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
3349
ee5fd23a
MM
33502017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
3351
3352 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
3353 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
3354 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
3355 __FP_FAST_FMA<N>X.
3356
d1047465
MP
33572017-10-23 Marek Polacek <polacek@redhat.com>
3358
3359 PR c/82681
3360 * c-warn.c (warnings_for_convert_and_check): Fix typos.
3361
9e878cf1
EB
33622017-10-19 Eric Botcazou <ebotcazou@adacore.com>
3363
3364 * c-common.c (check_builtin_function_arguments): Also check arguments
3365 of __builtin_alloca_with_align_and_max.
3366
89b6abbb
DM
33672017-10-17 David Malcolm <dmalcolm@redhat.com>
3368
3369 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
3370 rather than NULL to format_warning_va.
3371 (check_format_types): Likewise when calling format_type_warning.
3372 Remove code to extract source_ranges and source_range * in favor
3373 of just a location_t.
3374 (format_type_warning): Convert source_range * param to a
3375 location_t.
3376
39382c09
JJ
33772017-10-13 Jakub Jelinek <jakub@redhat.com>
3378
3379 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
3380 [LR]SHIFT_EXPR.
3381
62e1c678
DM
33822017-10-12 David Malcolm <dmalcolm@redhat.com>
3383
3384 * c-common.c (enum missing_token_insertion_kind): New enum.
3385 (get_missing_token_insertion_kind): New function.
3386 (maybe_suggest_missing_token_insertion): New function.
3387 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
3388
b90c9338
NS
33892017-10-11 Nathan Sidwell <nathan@acm.org>
3390
3391 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
3392 (c_common_handle_option): Update incpath_kind names.
3393
3a266bcd
ML
33942017-10-11 Martin Liska <mliska@suse.cz>
3395
3396 PR sanitizer/82490
3397 * c-attribs.c (handle_no_sanitize_attribute): Report directly
3398 Wattributes warning.
3399
8e6cdc90
RS
34002017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
3401
3402 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
3403 operating on trees as wide_ints.
3404 * c-common.c (pointer_int_sum): Likewise.
3405 * c-pretty-print.c (pp_c_integer_constant): Likewise.
3406 * c-warn.c (match_case_to_enum_1): Likewise.
3407 (c_do_switch_warnings): Likewise.
3408 (maybe_warn_shift_overflow): Likewise.
3409
802b38c9
JJ
34102017-10-10 Jakub Jelinek <jakub@redhat.com>
3411
3412 PR c/82437
3413 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
3414 instead of wide_int::from.
3415
4e34b338
JJ
34162017-10-06 Jakub Jelinek <jakub@redhat.com>
3417
3418 PR c/82437
3419 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
3420 using to_widest use wide_int with the larger of the two precisions.
3421
4bc4b2b4
BE
34222017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
3423
3424 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
3425 functions.
3426
a1488398
RS
34272017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
3428
3429 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
3430 when combining the original unconverted comparison operands.
3431
01c9fb68
JJ
34322017-09-29 Jakub Jelinek <jakub@redhat.com>
3433
3434 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
3435 attribute.
3436
6e3e8419
EB
34372017-09-29 Eric Botcazou <ebotcazou@adacore.com>
3438
3439 * c-ada-spec.c (to_ada_name): Add index parameter.
3440 (pp_ada_tree_identifier): Likewise.
3441 (dump_ada_macros): Adjust call to to_ada_name.
3442 (struct overloaded_name_hash): New type.
3443 (struct overloaded_name_hasher): Likewise.
3444 (overloaded_names): New hash table.
3445 (compute_overloading_index): New function.
3446 (dump_ada_decl_name): Call it and pass the result to
3447 pp_ada_tree_identifier.
3448 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
3449 (dump_ada_function_declaration): Likewise.
3450 (dump_generic_ada_node): Likewise.
3451 (print_constructor): Likewise.
3452 (print_destructor): Likewise.
3453 (dump_ada_specs): Delete overloaded_names table.
3454
79310774
EB
34552017-09-29 Eric Botcazou <ebotcazou@adacore.com>
3456
3457 * c-ada-spec.c (max_ada_macros): Move around.
3458 (store_ada_macro_index): Likewise.
3459 (source_file): Rename into...
3460 (macro_source_file): ...this.
3461 (count_ada_macro): Move around.
3462 (store_ada_macro): Likewise.
3463 (compare_macro): Likewise.
3464 (print_ada_macros): Merge in...
3465 (dump_ada_macros): ...this.
3466 (source_file_base): Rename into...
3467 (current_source_file): ...this.
3468 (print_comment): Move around.
3469 (dump_ada_nodes): Call dump_ada_declaration directly.
3470 (struct with): Change type of limited field to bool.
3471 (append_withs): Change type of limited_access parameter to bool.
3472 (pp_ada_tree_identifie): Likewise.
3473 (dump_ada_decl_nam): Likewise.
3474 (dump_generic_ada_node): Likewise. Do not print the return type.
3475 (to_ada_name): Change type of space_found parameter to bool.
3476 (dump_ada_function_declaration): Return void and change type of
3477 parameters to bool. Also print the return type for a function.
3478 (print_ada_methods): Rename into...
3479 (dump_ada_methods): ...this.
3480 (print_ada_declaration): Rename into ...
3481 (dump_ada_declaration): ...this. Do not print the return type.
3482 (print_ada_struct_decl): Rename into...
3483 (dump_ada_struct_decl): ...this.
3484
7d386d45
JJ
34852017-09-29 Jakub Jelinek <jakub@redhat.com>
3486
3487 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
3488 rather than DECL_INITIAL.
3489 (common_handle_aligned_attribute): Likewise.
3490
ab20d992 34912017-09-20 Alexandre Oliva <aoliva@redhat.com>
9ed32e27
AO
3492
3493 * c.opt (gen-decls): Add RejectNegative.
3494
026a79f7
AS
34952017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
3496 Jakub Jelinek <jakub@redhat.com>
3497
3498 Add support for -std=c++2a.
3499 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
3500 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
3501 * c-opts.c (set_std_cxx2a): New.
3502 (c_common_handle_option): Set options when -std=c++2a is enabled.
3503 (c_common_post_options): Adjust comments.
3504 (set_std_cxx14, set_std_cxx17): Likewise.
3505
4a8ca690
EB
35062017-09-15 Eric Botcazou <ebotcazou@adacore.com>
3507
3508 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
3509 message for non-uniform endianness and issue a warning in C++.
3510
7b936140
JJ
35112017-09-15 Jakub Jelinek <jakub@redhat.com>
3512
3513 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
3514 (Wc++17-compat): Change from undocumented alias to option.
3515 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
3516 change C++1z to C++17 in description.
3517 (std=c++1z, std=gnu++1z): Change from option to undocumented
3518 deprecated alias.
3519 (std=c++17, std=gnu++17): Change from undocumented alias to option.
3520 Adjust description.
3521 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
3522 * c-opts.c (set_std_cxx1z): Rename to ...
3523 (set_std_cxx17): ... this.
3524 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
3525 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 3526 caller.
7b936140
JJ
3527 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
3528 comments.
3529
12263f13
L
35302017-09-12 H.J. Lu <hongjiu.lu@intel.com>
3531
3532 * c-attribs.c (common_handle_aligned_attribute): Don't warn
3533 function alignment if warn_if_not_aligned_p is true.
3534
6836632e
NS
35352017-09-12 Nathan Sidwell <nathan@acm.org>
3536
3537 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
3538 resort_sorted_fields): Move to c/c-decl.c.
3539 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
3540 (struct sorted_fields_type): Move to c/c-lang.h.
3541
019bf9ad
JW
35422017-09-09 Jonathan Wakely <jwakely@redhat.com>
3543
3544 PR c++/81852
3545 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
3546
bc7fe952
MP
35472017-09-04 Marek Polacek <polacek@redhat.com>
3548
3549 PR c/81783
3550 * c-warn.c (warn_tautological_bitwise_comparison): New function.
3551 (warn_tautological_cmp): Call it.
3552
ab20d992 35532017-09-01 Boris Kolpackov <boris@codesynthesis.com>
de7c2c6a
BK
3554
3555 * c-opts.c (c_common_finish): Write dependency information even if
3556 there are errors.
3557
d2e05fcb
JJ
35582017-09-01 Jakub Jelinek <jakub@redhat.com>
3559
3560 PR c/81887
3561 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
3562 (omp_pragmas_simd): ... here.
3563 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
3564 create new clauses list containing just simd clause.
3565
18e2a8b8
RS
35662017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3567 Alan Hayward <alan.hayward@arm.com>
3568 David Sherwood <david.sherwood@arm.com>
3569
3570 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
3571 into scalar_mode_supported_p call.
3572 (handle_mode_attribute): Update call to scalar_mode_supported_p.
3573
16d22000
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-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
3579 for the mode iterator.
3580
b397965c
RS
35812017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3582 Alan Hayward <alan.hayward@arm.com>
3583 David Sherwood <david.sherwood@arm.com>
3584
3585 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
3586 * c-common.c (c_build_vec_perm_expr): Likewise.
3587
357b7604
RS
35882017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3589 Alan Hayward <alan.hayward@arm.com>
3590 David Sherwood <david.sherwood@arm.com>
3591
3592 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
3593
e05c94ba
RS
35942017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3595 Alan Hayward <alan.hayward@arm.com>
3596 David Sherwood <david.sherwood@arm.com>
3597
3598 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
3599 before calling targetm.addr_space.valid_pointer_mode.
3600
5c20c4af
RS
36012017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3602 Alan Hayward <alan.hayward@arm.com>
3603 David Sherwood <david.sherwood@arm.com>
3604
3605 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
3606
c94843d2 36072017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
3608 Alan Hayward <alan.hayward@arm.com>
3609 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
3610
3611 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
3612 iterators.
3613 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
3614
4e10a5a7
RS
36152017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3616 Alan Hayward <alan.hayward@arm.com>
3617 David Sherwood <david.sherwood@arm.com>
3618
3619 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
3620 case statements.
3621
130fcab0
ML
36222017-08-29 Martin Liska <mliska@suse.cz>
3623
3624 PR other/39851
3625 * c-common.c (parse_optimize_options): Add argument to function
3626 call.
3627 * c-pragma.c (handle_pragma_diagnostic): Likewise.
3628
14e18d71
DM
36292017-08-24 David Malcolm <dmalcolm@redhat.com>
3630
3631 * c-lex.c (interpret_float): Use token location
3632 when building an EXCESS_PRECISION_EXPR.
3633
2f687306
DM
36342017-08-21 David Malcolm <dmalcolm@redhat.com>
3635
3636 * c-common.c (check_function_arguments): Add "arglogs" param; pass
3637 it to check_function_format.
3638 * c-common.h (check_function_arguments): Add vec<location_t> *
3639 param.
3640 (check_function_format): Likewise.
3641 * c-format.c (struct format_check_context): Add field "arglocs".
3642 (check_function_format): Add param "arglocs"; pass it to
3643 check_format_info.
ab20d992 3644 (check_format_info): Add param "arglocs"; use it to initialize
2f687306
DM
3645 new field of format_ctx.
3646 (check_format_arg): Pass format_ctx->arglocs to new param of
3647 check_format_info_main.
3648 (class argument_parser): New field "arglocs".
3649 (argument_parser::argument_parser): Add "arglocs_" param and use
3650 it to initialize new field.
3651 (argument_parser::check_argument_type): Pass new arglocs field to
3652 check_format_types.
3653 (check_format_info_main): Add param "arglocs", and use it when
3654 constructing arg_parser.
3655 (check_format_types): Add param "arglocs"; use it if non-NULL when
3656 !EXPR_HAS_LOCATION (cur_param) to get at location information.
3657
00aa1fa2
L
36582017-08-18 H.J. Lu <hongjiu.lu@intel.com>
3659
3660 PR c/53037
3661 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
3662 (c_common_attribute_table): Add warn_if_not_aligned.
3663 (handle_aligned_attribute): Renamed to ...
3664 (common_handle_aligned_attribute): Remove argument, name, and add
3665 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
3666 (handle_aligned_attribute): New.
3667 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
3668
27be025d
MS
36692017-08-14 Martin Sebor <msebor@redhat.com>
3670
3671 PR c/81117
3672 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
3673 (handle_nonstring_attribute): New function.
3674
da67acb9
MS
36752017-08-14 Martin Sebor <msebor@redhat.com>
3676
3677 PR c/81117
3678 * c-format.h (T89_G): New macro.
3679 * c-format.c (local_gcall_ptr_node): New variable.
3680 (init_dynamic_diag_info): Initialize it.
3681
a8b522b4
ML
36822017-08-11 Martin Liska <mliska@suse.cz>
3683
3684 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
3685 TARGET_SUPPORTS_ALIASES.
3686
32129a17
DM
36872017-08-10 David Malcolm <dmalcolm@redhat.com>
3688
3689 * c-common.c (c_parse_error): Add rich_location * param, using it
3690 rather implicitly using input_location.
3691 * c-common.h (c_parse_error): Add rich_location * param.
3692
30af3a2b
MP
36932017-08-09 Marek Polacek <polacek@redhat.com>
3694
3695 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
3696 (c_common_truthvalue_conversion): Likewise.
3697 * c-omp.c (c_finish_omp_atomic): Likewise.
3698 * c-common.h (build_binary_op): Update declaration.
3699
314e6352
ML
37002017-08-08 Martin Liska <mliska@suse.cz>
3701
3702 * c-ada-spec.c: Include header files.
3703 * c-ubsan.c: Likewise.
3704 * c-warn.c: Likewise.
3705
56b5041c
JJ
37062017-08-07 Jakub Jelinek <jakub@redhat.com>
3707
3708 PR c/69389
3709 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
3710
db440138
EB
37112017-08-07 Eric Botcazou <ebotcazou@adacore.com>
3712
3713 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
3714 (print_ada_methods): Likewise.
3715 (print_ada_declaration): Likewise.
3716
577eec56
ML
37172017-08-07 Martin Liska <mliska@suse.cz>
3718
3719 * array-notation-common.c: Add new includes.
3720 * c-format.c( handle_format_attribute): Canonicalize a format
3721 function name.
3722 * c-lex.c (c_common_has_attribute): Canonicalize name of an
3723 attribute.
3724 * c-pretty-print.c: Add new include.
3725
b854df3c
EB
37262017-08-05 Eric Botcazou <ebotcazou@adacore.com>
3727
3728 * c-ada-spec.c (has_static_fields): Look only into variables.
3729 (print_constructor): Add TYPE parameter and use it for the name.
3730 (print_destructor): Likewise.
3731 (print_ada_declaration): Adjust to new constructor/destructor names.
3732 Adjust calls to print_constructor and print_destructor.
3733 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
3734 Look only into variables in the final loop.
3735
9f2cb25e
EB
37362017-08-01 Eric Botcazou <ebotcazou@adacore.com>
3737
3738 * c-ada-spec.c (has_static_fields): Look only into fields.
3739 (dump_generic_ada_node): Small tweak.
3740 (dump_nested_types): Look only into fields.
3741 (print_ada_declaration): Look only into methods. Small tweak.
3742 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
3743
f4bcd9eb
EB
37442017-08-01 Eric Botcazou <ebotcazou@adacore.com>
3745
3746 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
3747 (dump_ada_function_declaration): Likewise.
3748 (dump_generic_ada_node): Likewise.
3749 (print_ada_declaration): Add support for const-qualified variables.
3750
f34ebeb2
ML
37512017-07-31 Martin Liska <mliska@suse.cz>
3752
3753 PR sanitize/81530
3754 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
3755 Guard condition with flag_sanitize_p also with current_function_decl
3756 non-null equality.
3757 (ubsan_maybe_instrument_reference_or_call): Likewise.
3758
218e5d04
UB
37592017-07-30 Uros Bizjak <ubizjak@gmail.com>
3760
3761 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
3762
942047f2
EB
37632017-07-29 Eric Botcazou <ebotcazou@adacore.com>
3764
3765 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
3766 for enumeral types.
3767 (print_ada_declaration): Add missing guard for record types.
3768
a40ff0ae
JJ
37692017-07-27 Jakub Jelinek <jakub@redhat.com>
3770
3771 PR c/45784
3772 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
3773 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
3774 new COMPOUND_EXPRs around the rhs of the comparison.
3775
06bd22f6
MP
37762017-07-27 Marek Polacek <polacek@redhat.com>
3777
3778 PR c/81417
3779 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
3780 the types.
3781
036ea399
JJ
37822017-07-27 Jakub Jelinek <jakub@redhat.com>
3783
3784 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
3785 (handle_noipa_attribute): New function.
3786
417ca011
TD
37872017-07-07 Torsten Duwe <duwe@suse.de>
3788
3789 * c-attribs.c (c_common_attribute_table): Add entry for
3790 "patchable_function_entry".
3791
5aaa8fb4
NS
37922017-07-20 Nathan Sidwell <nathan@acm.org>
3793
3794 Remove TYPE_METHODS.
3795 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
3796 dump_ada_template, print_ada_methods,
3797 print_ada_declaration): Member fns are on TYPE_FIELDS.
3798
ff22eb12
NS
37992017-07-18 Nathan Sidwell <nathan@acm.org>
3800
3801 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
3802
eea77d1f
DM
38032017-07-14 David Malcolm <dmalcolm@redhat.com>
3804
3805 * c-common.c (try_to_locate_new_include_insertion_point): New
3806 function.
3807 (per_file_includes_t): New typedef.
3808 (added_includes_t): New typedef.
3809 (added_includes): New variable.
3810 (maybe_add_include_fixit): New function.
3811 * c-common.h (maybe_add_include_fixit): New decl.
3812
281ac396
MS
38132017-07-10 Martin Sebor <msebor@redhat.com>
3814
3815 PR other/81345
3816 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
3817
b6f43128
DM
38182017-07-06 David Malcolm <dmalcolm@redhat.com>
3819
3820 * c-common.c (selftest::c_family_tests): New.
3821 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
3822 (selftest::c_family_tests): New decl.
3823
efbf55b0
MP
38242017-07-04 Marek Polacek <polacek@redhat.com>
3825
3826 PR c/81231
3827 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
3828 types.
3829
6c86bd88
MP
38302017-07-04 Marek Polacek <polacek@redhat.com>
3831
3832 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
3833
17a7218b
ML
38342017-06-28 Martin Liska <mliska@suse.cz>
3835
3836 PR ipa/81128
3837 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
3838 to a function declaration.
3839
63010089
ML
38402017-06-28 Martin Liska <mliska@suse.cz>
3841
3842 PR driver/79659
3843 * c.opt: Add IntegerRange to various options.
3844
3e2becc4
MP
38452017-06-26 Marek Polacek <polacek@redhat.com>
3846
3847 PR c/80116
3848 * c-common.h (warn_for_multistatement_macros): Declare.
3849 * c-warn.c: Include "c-family/c-indentation.h".
3850 (warn_for_multistatement_macros): New function.
3851 * c.opt (Wmultistatement-macros): New option.
3852 * c-indentation.c (guard_tinfo_to_string): No longer static.
3853 Change the parameter type to "enum rid". Handle RID_SWITCH.
3854 * c-indentation.h (guard_tinfo_to_string): Declare.
3855
2db9b7cd
MG
38562017-06-23 Marc Glisse <marc.glisse@inria.fr>
3857
3858 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
3859
c3684b7b
MS
38602017-06-15 Martin Sebor <msebor@redhat.com>
3861
3862 PR c++/80560
3863 * c.opt (-Wclass-memaccess): New option.
3864
e72c4afd
BK
38652017-06-14 Boris Kolpackov <boris@codesynthesis.com>
3866
3867 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
3868
8a516588
MP
38692017-06-13 Marek Polacek <polacek@redhat.com>
3870
3871 PR objc/80949
3872 * c-warn.c (do_warn_duplicated_branches): Return if any of the
3873 branches is null.
3874
45b2222a
ML
38752017-06-13 Martin Liska <mliska@suse.cz>
3876
3877 PR sanitize/78204
3878 * c-attribs.c (add_no_sanitize_value): New function.
3879 (handle_no_sanitize_attribute): Likewise.
3880 (handle_no_sanitize_address_attribute): Use the function.
3881 (handle_no_sanitize_thread_attribute): New function.
3882 (handle_no_address_safety_analysis_attribute): Use
3883 add_no_sanitize_value.
3884 (handle_no_sanitize_undefined_attribute): Likewise.
3885 * c-common.h: Declare new functions.
3886 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
3887 (ubsan_instrument_shift): Likewise.
3888 (ubsan_instrument_bounds): Likewise.
3889 (ubsan_maybe_instrument_array_ref): Likewise.
3890 (ubsan_maybe_instrument_reference_or_call): Likewise.
3891
a01f151f
JM
38922017-06-11 Jason Merrill <jason@redhat.com>
3893
3894 * c-ada-spec.c, c-pragma.c: Use id_equal.
3895
3de4ac6d
MP
38962017-06-04 Marek Polacek <polacek@redhat.com>
3897
3898 PR c/80919
3899 * c-format.c (matching_type_p): Return false if any of the types
3900 requires structural equality.
3901
2474f48f
MS
39022017-06-02 Martin Sebor <msebor@redhat.com>
3903
3904 PR c/80892
3905 * c-warn.c (conversion_warning): Use -Wconversion for integer
3906 conversion and -Wfloat-conversion for floating one.
3907
40ffd95f
BE
39082017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3909
3910 * c.opt (Wsizeof-pointer-div): New warning option.
3911
3fa4634c
VR
39122017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
3913
3914 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
3915 (Wcatch-value=1): Enable by -Wall.
3916
f012c8ef
DM
39172017-05-30 David Malcolm <dmalcolm@redhat.com>
3918
3919 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
3920 format_chars.
3921 * c.opt (fdiagnostics-show-template-tree): New option.
3922 (felide-type): New option.
3923
63dbcd13
VR
39242017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
3925
3926 * c.opt (Wcatch-value=): New C++ warning flag.
3927
be136b5c
NS
39282017-05-24 Nathan Sidwell <nathan@acm.org>
3929
3930 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
3931 const casts to avoid warning.
3932
3cd211af
MS
39332017-05-24 Martin Sebor <msebor@redhat.com>
3934
3935 PR c/80731
3936 * c-common.h (unsafe_conversion_p): Add a function argument.
3937 * c-common.c (unsafe_conversion_p): Same.
3938 Add type names and values to diagnostics.
3939 (scalar_to_vector): Adjust.
3940 * c-warn.c (constant_expression_error): Add a function argument.
3941 Add type names and values to diagnostics.
3942 (conversion_warning): Add a function argument.
3943 Add type names and values to diagnostics.
3944 (warnings_for_convert_and_check): Same.
3945
1ff7be5a
JM
39462017-05-19 Jason Merrill <jason@redhat.com>
3947
3948 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
3949 enumerators.
3950
ff502317
BE
39512017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3952
3953 * c-format.c (locus): Move out of function scope,
3954 add GTY attribute.
3955
2a8a8d7b
NS
39562017-05-19 Nathan Sidwell <nathan@acm.org>
3957
3958 * c-opts.c (class_dump_file, class_dump_flags): Delete.
3959 (c_common_parse_file): Remove class dump handling.
3960 (get_dump_info): Likewise.
3961
39aac208
RB
39622017-05-19 Richard Biener <rguenther@suse.de>
3963
3964 PR c++/80593
3965 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
3966 to alias-set zero memory.
3967
6ecd2339
BE
39682017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3969
3970 * c-format.c (local_tree_type_node): Add GTY attribute.
3971
6574d78e
MP
39722017-05-18 Marek Polacek <polacek@redhat.com>
3973
3974 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
3975 (c_common_fixed_point_type_for_size): Likewise.
3976 (c_common_type_for_mode): Likewise.
3977 (shorten_compare): Likewise.
3978 (c_promoting_integer_type_p): Use false/true instead of 0/1.
3979 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
3980
e3455240
MP
39812017-05-18 Marek Polacek <polacek@redhat.com>
3982
3983 * c-common.c (self_promoting_args_p): Change the return type to bool.
3984 Use false/true instead of 0/1.
3985 * c-common.h (self_promoting_args_p): Update.
3986
3fa8871b
MP
39872017-05-17 Marek Polacek <polacek@redhat.com>
3988
3989 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
3990 * c-warn.c: Likewise.
3991
b42cc3ca
VV
39922017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
3993
3994 Implement new C++ intrinsics __is_assignable and __is_constructible.
3995 * c-common.c (__is_assignable, __is_constructible): New.
3996 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
3997
1a817418
ML
39982017-05-17 Martin Liska <mliska@suse.cz>
3999
4000 * c-common.h: Introduce dump_flags_t type and
4001 use it instead of int type.
4002 * c-gimplify.c (c_genericize): Likewise.
4003 * c-opts.c: Likewise.
4004
b2fa0a8b
MP
40052017-05-17 Marek Polacek <polacek@redhat.com>
4006
4007 * c-common.c (c_save_expr): Remove.
4008 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
4009 * c-common.h (c_save_expr): Remove declaration.
4010
31c2d57d
VR
40112017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
4012
4013 PR c/35441
4014 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
4015 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
4016 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
4017 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
4018 RDIV_EXPR.
4019 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
4020
684f84de
MP
40212017-05-09 Marek Polacek <polacek@redhat.com>
4022
4023 PR c/80525
4024 * c-warn.c (unwrap_c_maybe_const): New.
4025 (warn_logical_operator): Call it.
4026
641da50a
NS
40272017-05-09 Nathan Sidwell <nathan@acm.org>
4028
4029 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
4030 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
4031
631238ac
MS
40322017-05-08 Martin Sebor <msebor@redhat.com>
4033
4034 PR translation/80280
4035 * c-format.h (struct format_flag_spec): Add new member.
4036 (T89_T): New macro.
4037 * c-format.c (local_tree_type_node): New global.
4038 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
4039 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
4040 (strfmon_flag_specs): Likewise.
4041 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
4042 with distinct quoting properties.
4043 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
4044 (flag_chars_t::validate): Add argument and handle bad quoting.
4045 (check_format_info_main): Handle quoting problems.
4046 (init_dynamic_diag_info): Simplify.
4047
49f0c04c
JM
40482017-05-08 Jason Merrill <jason@redhat.com>
4049
4050 * c-opts.c (c_common_post_options): Update defaults for
4051 flag_abi_version and flag_abi_compat_version.
4052
56d35585
DM
40532017-05-05 David Malcolm <dmalcolm@redhat.com>
4054
4055 * c-common.c (c_cpp_error): Replace report_diagnostic
4056 with diagnostic_report_diagnostic.
4057
0f2c4a8f
MS
40582017-05-04 Martin Sebor <msebor@redhat.com>
4059
4060 PR translation/80280
4061 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
4062 (handle_weakref_attribute): Same.
4063
6fe63fb4
NS
40642017-05-03 Nathan Sidwell <nathan@acm.org>
4065
4066 Canonicalize canonical type hashing
4067 * c-common.c (complete_array_type): Use type_hash_canon.
4068
815d9cc6
XR
40692017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
4070
92a285c1 4071 PR c++/80038
815d9cc6
XR
4072 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
4073 prototype.
4074 (cilk_install_body_pedigree_operations): Likewise.
4075 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
4076 detatched.
4077 (cilk_gimplify_call_params_in_spawned_fn): Remove.
4078 (cilk_install_body_pedigree_operations): Likewise.
4079 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
4080 unwrapping.
4081
f8a36447
JJ
40822017-04-27 Jakub Jelinek <jakub@redhat.com>
4083
4084 PR c++/80534
4085 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
4086 flag on non-aggregate element types.
4087
7c145456
BE
40882017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
4089
4090 * c-common.c (c_type_hasher, type_hash_table): Remove.
4091 (c_common_get_alias_set): Remove unreachable code.
4092 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
4093
c3cbcd45
VR
40942017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
4095
4096 * c.opt (Wextra-semi): New C++ warning flag.
4097
8a59d466
JJ
40982017-04-20 Jakub Jelinek <jakub@redhat.com>
4099
4100 PR middle-end/80423
4101 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
4102
8487c9a5
JJ
41032017-04-18 Jakub Jelinek <jakub@redhat.com>
4104
4105 PR middle-end/79788
4106 PR middle-end/80375
4107 * c-common.c (c_common_type_for_mode): Don't handle
4108 widest_*_literal_type_node here.
4109 c_common_signed_or_unsigned_type): Likewise.
4110 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
4111 to *intTI_type_node or *intDI_type_node depending on whether
4112 TImode is supported by the target or not.
4113
3ee0fb02
ML
41142017-04-10 Martin Liska <mliska@suse.cz>
4115
4116 PR sanitizer/80350
4117 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
4118 doing an UBSAN check.
4119
5764ee3c
JW
41202017-04-03 Jonathan Wakely <jwakely@redhat.com>
4121
4122 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
4123
6f3af356
JJ
41242017-03-31 Jakub Jelinek <jakub@redhat.com>
4125
4126 PR c++/79572
4127 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
4128 tree *.
4129 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
4130 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
4131 REFERENCE_TYPE.
4132
f6a7a9d5
DM
41332017-03-31 David Malcolm <dmalcolm@redhat.com>
4134
4135 PR documentation/78732
4136 * c.opt (Wendif-labels): Fix description to refer to
4137 #else rather than #elif.
4138
af88f557
JJ
41392017-03-31 Jakub Jelinek <jakub@redhat.com>
4140
4141 PR libstdc++/80251
4142 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
4143 * c-common.c (c_common_reswords): Add __is_aggregate trait.
4144
a9e4a1a5
JJ
41452017-03-27 Jakub Jelinek <jakub@redhat.com>
4146
4147 PR middle-end/80162
4148 * c-common.c (c_common_mark_addressable_vec): Don't set
4149 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
4150
3f01b620
MS
41512017-03-21 Martin Sebor <msebor@redhat.com>
4152
4153 PR c++/79548
4154 * c-common.c (set_underlying_type): Mark type used only when
4155 original del is declared unused.
4156
2f6f187a
DM
41572017-03-10 David Malcolm <dmalcolm@redhat.com>
4158
4159 PR translation/79848
4160 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
4161 "%qs".
4162
a02fa805
DM
41632017-03-10 David Malcolm <dmalcolm@redhat.com>
4164
4165 PR c/79921
4166 * c-indentation.c (warn_for_misleading_indentation): Remove parens
4167 from inform's message, so that xgettext can locate it.
4168
822a132c
MP
41692017-03-09 Marek Polacek <polacek@redhat.com>
4170
4171 PR c++/79962
4172 PR c++/79984
4173 * c-attribs.c (handle_nonnull_attribute): Save the result of default
4174 conversion to the attribute list.
4175
bba81f1c
ML
41762017-03-09 Martin Liska <mliska@suse.cz>
4177
4178 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
4179
108154ff
JM
41802017-03-03 Jason Merrill <jason@redhat.com>
4181
4182 * c.opt (Wnoexcept-type): New.
4183
eb0e7c34
RB
41842017-03-02 Richard Biener <rguenther@suse.de>
4185
4186 PR c/79756
4187 * c-common.c (c_common_mark_addressable_vec): Look through
4188 C_MAYBE_CONST_EXPR.
4189
9453ba0a
ML
41902017-02-28 Martin Liska <mliska@suse.cz>
4191
4192 * c.opt: Replace space with tabular for options of <number>
4193 type.
4194
6a825afe
ML
41952017-02-28 Martin Liska <mliska@suse.cz>
4196
4197 * c.opt: Fix --help=option -Q for options which are of
4198 an enum type.
4199
4227c9ad
JJ
42002017-02-24 Jakub Jelinek <jakub@redhat.com>
4201
4202 PR c++/79588
4203 * c-common.c (check_function_restrict): New function.
4204 (check_function_arguments): Add FNDECL argument. Call
4205 check_function_restrict if -Wrestrict.
4206 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
4207 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
4208 * c-common.h (check_function_arguments): Add FNDECL argument.
4209 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
4210
59909673
EB
42112017-02-24 Eric Botcazou <ebotcazou@adacore.com>
4212
4213 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
4214 treatment of parameters with pointer-to-tagged type and tidy up.
4215 (print_ada_methods): Remove the special treatment of C++ static member
4216 functions.
4217
54dcd526
ML
42182017-02-22 Martin Liska <mliska@suse.cz>
4219
4220 * c.opt: Replace inequality signs with square brackets
4221 for -Wnornalized.
4222
00bc9de3
JJ
42232017-02-21 Jakub Jelinek <jakub@redhat.com>
4224
4225 PR c++/79641
4226 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
4227 preserve quals.
4228
97fcf744
JM
42292017-02-17 Joseph Myers <joseph@codesourcery.com>
4230
4231 * c-cppbuiltin.c (builtin_define_float_constants): Define
4232 __DECIMAL_DIG__ to the value for long double.
4233
c7545f1c
MP
42342017-02-15 Marek Polacek <polacek@redhat.com>
4235
4236 PR c/79515
4237 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
4238 conversion has occured.
4239
c2e84327
DM
42402017-01-24 David Malcolm <dmalcolm@redhat.com>
4241
4242 * c-common.c (c_common_reswords): Add "__RTL".
4243 * c-common.h (enum rid): Add RID_RTL.
4244
2ebd93e1
MP
42452017-01-20 Marek Polacek <polacek@redhat.com>
4246
4247 PR c/64279
4248 * c-common.h (do_warn_duplicated_branches_r): Declare.
4249 * c-gimplify.c (c_genericize): Walk the function tree calling
4250 do_warn_duplicated_branches_r.
4251 * c-warn.c (expr_from_macro_expansion_r): New.
4252 (do_warn_duplicated_branches): New.
4253 (do_warn_duplicated_branches_r): New.
4254 * c.opt (Wduplicated-branches): New option.
4255
0d80ab91
DM
42562017-01-17 David Malcolm <dmalcolm@redhat.com>
4257
4258 PR c++/71497
4259 * c-indentation.c (warn_for_misleading_indentation): Use the past
4260 subjunctive in the note.
4261
7f991c36
AH
42622017-01-17 Aldy Hernandez <aldyh@redhat.com>
4263
4264 PR c/79116
4265 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
4266 start type to integer_type.
4267
1c70261c
JJ
42682017-01-16 Jakub Jelinek <jakub@redhat.com>
4269
4270 PR driver/49726
4271 * c.opt (gen-decls): Add Driver flag.
4272
1ddca3f3
PC
42732017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
4274
4275 Revert:
4276 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
4277
4278 PR c++/71737
4279 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
4280
7d2f3f1d
PC
42812017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
4282
4283 PR c++/71737
4284 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
4285
bce6f760
MS
42862017-01-12 Martin Sebor <msebor@redhat.com>
4287
4288 (-Wformat-overflow): ...to this.
4289
bf5fbf46
MS
42902017-01-11 Martin Sebor <msebor@redhat.com>
4291
4292 PR c/78768
4293 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
4294 Also enable for LTO.
4295
e363df3f
JM
42962017-01-10 Jason Merrill <jason@redhat.com>
4297
4298 Implement P0195R2, C++17 variadic using.
4299 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
4300
bd2c6270
JJ
43012017-01-09 Jakub Jelinek <jakub@redhat.com>
4302
4303 PR translation/79019
4304 PR translation/79020
4305 * c.opt (Wnormalized=): Fix typo in description.
4306
efcc8d38
MS
43072017-01-08 Martin Sebor <msebor@redhat.com>
4308
4309 PR middle-end/77708
4310 * c.opt (-Wformat-truncation): New option.
4311
ab20d992 43122017-01-06 Alexandre Oliva <aoliva@redhat.com>
435f3f7a
AO
4313
4314 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
4315 value to unsigned short to fit in 4 hex digits without
4316 warnings.
4317
4e89adf9
EB
43182017-01-05 Eric Botcazou <ebotcazou@adacore.com>
4319
4320 * c.opt (fsso-struct): Add 'native' value.
4321
cd445b54
ML
43222017-01-05 Martin Liska <mliska@suse.cz>
4323
4324 PR pch/78970
4325 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
4326 header.
4327
a9342885
MP
43282017-01-04 Marek Polacek <polacek@redhat.com>
4329
4330 PR c++/64767
4331 * c.opt (Wpointer-compare): New option.
4332
fc73e60c
JJ
43332017-01-04 Jakub Jelinek <jakub@redhat.com>
4334
4335 PR driver/78957
4336 * c.opt (fsso-struct=): Add RejectNegative.
4337
cbe34bb5
JJ
43382017-01-01 Jakub Jelinek <jakub@redhat.com>
4339
4340 Update copyright years.
4341
d4a6c0ea
ML
43422016-12-29 Martin Liska <mliska@suse.cz>
4343
4344 PR c/78933
4345 * c.opt (strong-eval-order): Add RejectNegative keyword.
4346
67a5ad7c
JM
43472016-12-22 Jason Merrill <jason@redhat.com>
4348
4349 Implement P0522R0, matching of template template arguments.
4350 * c-cppbuiltin.c (c_cpp_builtins): Define
4351 __cpp_template_template_args.
4352
0dba7960
JJ
43532016-12-21 Jakub Jelinek <jakub@redhat.com>
4354
4355 PR bootstrap/78817
4356 * c-common.c (struct nonnull_arg_ctx): New type.
4357 (check_function_nonnull): Return bool instead of void. Use
4358 nonnull_arg_ctx as context rather than just location_t.
4359 (check_nonnull_arg): Adjust for the new context type, set
4360 warned_p to true if a warning has been diagnosed.
4361 (check_function_arguments): Return bool instead of void.
4362 * c-common.h (check_function_arguments): Adjust prototype.
4363
31bfc9b9
JM
43642016-12-21 Jason Merrill <jason@redhat.com>
4365
4366 * c.opt (-fnew-ttp-matching): New flag.
4367 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
4368
629b3d75
MJ
43692016-12-14 Martin Jambor <mjambor@suse.cz>
4370
4371 * c-omp.c: Include omp-general.h instead of omp-low.h.
4372 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
4373 name.
4374
474da67e
MS
43752016-12-14 Martin Sebor <msebor@redhat.com>
4376
4377 PR c/17308
4378 * c-common.c (check_nonnull_arg): Disable when optimization
4379 is enabled.
4380
fe366b87
MP
43812016-12-12 Marek Polacek <polacek@redhat.com>
4382
4383 PR c++/78647
4384 * c-common.c (attribute_fallthrough_p): Return false for
4385 error_mark_node.
4386
8bd9f164
MS
43872016-12-08 Martin Sebor <msebor@redhat.com>
4388
4389 PR c/78284
4390 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
4391
060162e0
MS
43922016-12-08 Martin Sebor <msebor@redhat.com>
4393
4394 PR c/78165
92a285c1
ML
4395 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
4396 suffix.
060162e0 4397
ee92e7ba
MS
43982016-12-07 Martin Sebor <msebor@redhat.com>
4399
4400 PR c/53562
4401 PR middle-end/77784
4402 PR middle-end/78149
4403 PR middle-end/78138
4404 * c.opt (-Wstringop-overflow): New option.
4405
84b0769e
MO
44062016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
4407
4408 * c-attribs.c (asan odr indicator): New attribute.
4409 (handle_asan_odr_indicator_attribute): New function.
4410
7fa6a965
PK
44112016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4412
4413 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
4414 ptrdiff_type_node;
4415
56d8ffc1
JG
44162016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
4417
4418 * c-common.c (excess_precision_mode_join): New.
4419 (c_ts18661_flt_eval_method): New.
4420 (c_c11_flt_eval_method): Likewise.
4421 (c_flt_eval_method): Likewise.
4422 * c-common.h (excess_precision_mode_join): New.
4423 (c_flt_eval_method): Likewise.
4424 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
4425 (cpp_iec_559_value): Call it.
4426 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
4427 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
4428 __FLT_EVAL_METHOD_TS_18661_3__.
4429
04f0fcf7
JG
44302016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
4431
4432 * c-opts.c (c_common_post_options): Add logic to handle the default
4433 case for -fpermitted-flt-eval-methods.
4434
fb2675cb
PB
44352016-11-23 Paolo Bonzini <bonzini@gnu.org>
4436
4437 * c.opt (Wexpansion-to-defined): New.
4438
ec1c5694
JJ
44392016-11-23 Jakub Jelinek <jakub@redhat.com>
4440
4441 PR target/78451
4442 * c-pragma.c (handle_pragma_target): Don't replace
4443 current_target_pragma, but chainon the new args to the current one.
4444
730c9e75
NS
44452016-11-22 Nathan Sidwell <nathan@acm.org>
4446
4447 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 4448 indentation and formatting.
730c9e75 4449
89990732
MS
44502016-11-21 Martin Sebor <msebor@redhat.com>
4451
4452 * c.opt (-fprintf-return-value): Enable by default.
4453
48330c93
BE
44542016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4455
4456 PR c++/71973
4457 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
4458 * c-common.c (c_common_nodes_and_builtins): Initialize
4459 const_tm_ptr_type_node.
4460
0d939c95
MP
44612016-11-16 Marek Polacek <polacek@redhat.com>
4462
4463 PR c/78285
4464 * c-common.c (c_add_case_label): Turn error_at calls into inform.
4465
8e745a17
JJ
44662016-11-14 Jakub Jelinek <jakub@redhat.com>
4467
4468 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
4469
1ee62b92 44702016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
4471 Richard Biener <rguenther@suse.de>
4472
4473 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
4474 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
4475 * c.opt (fgimple): New option.
1ee62b92 4476
22b15758
UB
44772016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4478
4479 PR c/35503
4480 * c-common.h (warn_for_restrict): Declare.
4481 * c-warn.c: Include gcc-rich-location.h.
4482 (warn_for_restrict): New function.
4483 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
4484 (gcc_cdiag_char_table): Likewise.
4485 (gcc_cxxdiag_char_table): Likewise.
4486 * c.opt (Wrestrict): New option.
4487
4be719cd
EB
44882016-11-13 Eric Botcazou <ebotcazou@adacore.com>
4489
4490 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
4491 for nested types only if the type is a record or union and dump SLOC.
4492
4a826ca6
JM
44932016-11-09 Jason Merrill <jason@redhat.com>
4494
4495 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
4496
2e955d50
JJ
44972016-11-09 Jakub Jelinek <jakub@redhat.com>
4498
4499 * c-ubsan.c (ubsan_instrument_shift): Handle split
4500 -fsanitize=shift-base and -fsanitize=shift-exponent.
4501
51dc6603
JM
45022016-11-07 Jason Merrill <jason@redhat.com>
4503
4504 * c.opt (Wc++1z-compat): New.
4505 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
4506
6dc4a604
ML
45072016-11-07 Martin Liska <mliska@suse.cz>
4508
4509 * c-warn.c (warn_for_unused_label): Save all labels used
4510 in goto or in &label.
4511
b302001e
JM
45122016-11-03 Jason Merrill <jason@redhat.com>
4513
4514 * c-cppbuiltin.c (c_cpp_builtins): Correct
4515 __cpp_inheriting_constructors.
4516
31f7f784
JM
45172016-11-01 Jason Merrill <jason@redhat.com>
4518
2bc78e3c
JM
4519 * c-cppbuiltin.c (c_cpp_builtins): Update
4520 __cpp_inheriting_constructors.
4521
31f7f784
JM
4522 * c.opt (-fnew-inheriting-ctors): New.
4523 * c-opts.c: Default to on for ABI 11+.
4524
dcb466ec
JJ
45252016-10-31 Jakub Jelinek <jakub@redhat.com>
4526
4527 PR c++/77948
4528 * c.opt (fext-numeric-literals): Add Var and Init.
4529 * c-opts.c (c_common_handle_option): Don't clear
4530 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
4531 (c_common_post_options): Clear it here if not set
4532 explicitly.
4533
52e1b91e
AH
45342016-10-28 Aldy Hernandez <aldyh@redhat.com>
4535
4536 PR debug/77773
4537 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
4538 if NULL.
4539
e16f1cc7
JJ
45402016-10-25 Jakub Jelinek <jakub@redhat.com>
4541
4542 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
4543 * c-common.c (c_common_reswords): Add __builtin_launder.
4544
f8348061
BE
45452016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
4546
4547 * c-common.c (c_common_truthvalue_conversion): Warn for
4548 multiplications in boolean context. Fix the quoting of '<<' and '<'
4549 in the shift warning.
4550
eff89e01
BE
45512016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
4552
4553 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
4554
24bc7bf4
JM
45552016-10-20 Jason Merrill <jason@redhat.com>
4556
4557 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
4558
4c712374
BE
45592016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4560
4561 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
4562 integer shift ops in boolean context.
4563
45642016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
4565
4566 * c.opt (Walloca): New.
4567 (Walloca-larger-than=): New.
4568 (Wvla-larger-than=): New.
4569
8fa18c06
MP
45702016-10-17 Marek Polacek <polacek@redhat.com>
4571
4572 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
4573 Return immediately when finding a match.
4574 (warn_tautological_cmp): Remove a boolean variable that is no longer
4575 needed.
4576
b12b1915
MP
45772016-10-17 Marek Polacek <polacek@redhat.com>
4578
4579 * c-attribs.c: New file.
4580 * c-common.c: Move attributes handling to c-attribs.c.
4581 (get_nonnull_operand): No longer static.
4582 * c-common.h: Move the declarations from c-attribs.c to its own section.
4583
2045acd9
JM
45842016-10-14 Jason Merrill <jason@redhat.com>
4585
4586 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
4587 and __cpp_deduction_guides.
4588
14a2c9aa
JM
45892016-10-13 Jason Merrill <jason@redhat.com>
4590
4591 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
4592
4d0cdd0c
TP
45932016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
4594
4595 * c-cppbuiltin.c: Include memmodel.h.
4596 * c-opts.c: Likewise.
4597 * c-pragma.c: Likewise.
4598 * c-warn.c: Likewise.
4599
70f6d5e1
JJ
46002016-10-12 Jakub Jelinek <jakub@redhat.com>
4601
4602 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
4603 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
4604 * c-opts.c (sanitize_cpp_opts): Initialize
4605 cpp_opts->cpp_warn_implicit_fallthrough.
4606
78f61294
MP
46072016-10-11 Marek Polacek <polacek@redhat.com>
4608
4609 * c-common.c (warning_candidate_p): Change the return type to bool
4610 and return true/false instead of 1/0.
4611 (vector_mode_valid_p): Likewise.
4612
038b5cc0
MP
46132016-10-11 Marek Polacek <polacek@redhat.com>
4614
4615 * c-common.c (fold_for_warn): No longer static.
4616 (bool_promoted_to_int_p): Likewise.
4617 (c_common_get_narrower): Likewise.
4618 (constant_expression_warning): Move to c-warn.c.
4619 (constant_expression_error): Likewise.
4620 (overflow_warning): Likewise.
4621 (warn_logical_operator): Likewise.
4622 (find_array_ref_with_const_idx_r): Likewise.
4623 (warn_tautological_cmp): Likewise.
4624 (expr_has_boolean_operands_p): Likewise.
4625 (warn_logical_not_parentheses): Likewise.
4626 (warn_if_unused_value): Likewise.
4627 (strict_aliasing_warning): Likewise.
4628 (sizeof_pointer_memaccess_warning): Likewise.
4629 (check_main_parameter_types): Likewise.
4630 (conversion_warning): Likewise.
4631 (warnings_for_convert_and_check): Likewise.
4632 (match_case_to_enum_1): Likewise.
4633 (match_case_to_enum): Likewise.
4634 (c_do_switch_warnings): Likewise.
4635 (warn_for_omitted_condop): Likewise.
4636 (readonly_error): Likewise.
4637 (lvalue_error): Likewise.
4638 (invalid_indirection_error): Likewise.
4639 (warn_array_subscript_with_type_char): Likewise.
4640 (warn_about_parentheses): Likewise.
4641 (warn_for_unused_label): Likewise.
4642 (warn_for_div_by_zero): Likewise.
4643 (warn_for_memset): Likewise.
4644 (warn_for_sign_compare): Likewise.
4645 (do_warn_double_promotion): Likewise.
4646 (do_warn_unused_parameter): Likewise.
4647 (record_locally_defined_typedef): Likewise.
4648 (maybe_record_typedef_use): Likewise.
4649 (maybe_warn_unused_local_typedefs): Likewise.
4650 (maybe_warn_bool_compare): Likewise.
4651 (maybe_warn_shift_overflow): Likewise.
4652 (warn_duplicated_cond_add_or_warn): Likewise.
4653 (diagnose_mismatched_attributes): Likewise.
4654 * c-common.h: Move the declarations from c-warn.c to its own section.
4655 * c-warn.c: New file.
4656
627be19f
JM
46572016-10-08 Jason Merrill <jason@redhat.com>
4658
4659 * c-common.c (c_common_truthvalue_conversion): Don't distribute
4660 into COND_EXPR in C++.
4661
7bad794a
JJ
46622016-10-08 Jakub Jelinek <jakub@redhat.com>
4663
4664 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
4665 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
4666 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
4667
be845b04
JJ
46682016-10-07 Jakub Jelinek <jakub@redhat.com>
4669
4670 Implement LWG2296 helper intrinsic
4671 * c-common.h (enum rid): Add RID_ADDRESSOF.
4672 * c-common.c (c_common_reswords): Add __builtin_addressof.
4673
c09c4992
BE
46742016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
4675
4676 PR c++/77700
4677 * c-common.c (c_common_truthvalue_conversion): Warn also for
4678 suspicious enum values in boolean context.
4679
342cfb3e
JJ
46802016-10-06 Jakub Jelinek <jakub@redhat.com>
4681
4682 Implement P0258R2 - helper for C++17
4683 std::has_unique_object_representations trait
4684 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
4685 * c-common.c (c_common_reswords): Add
4686 __has_unique_object_representations.
4687
2e69f143
JJ
46882016-10-05 Jakub Jelinek <jakub@redhat.com>
4689
4690 PR sanitizer/66343
4691 * c-ubsan.c (ubsan_instrument_return): Don't call
4692 initialize_sanitizer_builtins here.
4693
700fff34
BE
46942016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
4695
4696 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
4697 conditional expression in boolean context when only one arm is
4698 non-boolean.
4699
9563bfcd
JJ
47002016-10-05 Jakub Jelinek <jakub@redhat.com>
4701
04a32443
JJ
4702 PR sanitizer/77823
4703 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
4704 is not integral.
4705
9563bfcd
JJ
4706 * c-common.c (c_common_reswords): Update comment for C++11.
4707
f1644724
JM
47082016-10-04 Jason Merrill <jason@redhat.com>
4709
4710 * c-common.c (make_tree_vector_from_ctor): New.
4711 * c-common.h: Declare it.
4712
5a79befb
JJ
47132016-10-04 Jakub Jelinek <jakub@redhat.com>
4714
4715 * c-cppbuiltin.c (c_cpp_builtins): Don't define
4716 __LIBGCC_JCR_SECTION_NAME__.
4717
1633d3b9
BE
47182016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
4719
4720 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
4721 left shift in boolean context.
4722
a2c6e7f2
JJ
47232016-09-29 Jakub Jelinek <jakub@redhat.com>
4724
4725 Implement P0001R1 - C++17 removal of register storage class specifier
4726 * c.opt (Wregister): New warning.
4727 * c-opts.c (c_common_post_options): Enable -Wregister by
4728 default for C++17.
4729
75304c87
JG
47302016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
4731
4732 * c-opts.c (c_common_post_options): Remove special case for
4733 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
4734 in C++.
4735
bbfac6da
JJ
47362016-09-27 Jakub Jelinek <jakub@redhat.com>
4737
6e39060a
JJ
4738 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
4739 -std=c++1z.
4740
bbfac6da
JJ
4741 * c-ada-spec.c (print_ada_declaration): Remove break after return.
4742
e73cf9a2
TP
47432016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
4744
4745 * c-common.c: Include memmodel.h.
4746
c6147dc4
MP
47472016-09-26 Marek Polacek <polacek@redhat.com>
4748
4749 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
4750
81fea426
MP
47512016-09-26 Marek Polacek <polacek@redhat.com>
4752
4753 PR c/7652
4754 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
4755 (handle_fallthrough_attribute): New function.
4756 (attribute_fallthrough_p): New function.
4757 * c-common.h (attribute_fallthrough_p): Declare.
4758
9a2300e9
MP
47592016-09-24 Marek Polacek <polacek@redhat.com>
4760
4761 PR c/77490
4762 * c.opt (Wbool-operation): New.
4763
a09e9e35
BE
47642016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4765
4766 * c-common.c (c_common_truthvalue_conversion): Inhibit
4767 Wint-in-bool-context warning with from_macro_definition_at.
4768 Mention the expression will always evaluate to true.
4769
d43b4ccc
MS
47702016-09-21 Martin Sebor <msebor@redhat.com>
4771
4772 PR bootstrap/77676
4773 * c.opt (fprintf-return-value): Temporarily initialize to zero
4774 to unblock bootstrap failures.
4775
2e1c20b1
JJ
47762016-09-21 Jakub Jelinek <jakub@redhat.com>
4777
4778 PR c++/77651
4779 * c.opt (Waligned-new=): Add RejectNegative.
4780 (faligned-new=): Likewise. Spelling fix - change
4781 aligned_new_threshhold to aligned_new_threshold.
4782 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
4783 to aligned_new_threshold.
4784
88d0c3f0
MS
47852016-09-20 Martin Sebor <msebor@redhat.com>
4786
4787 PR middle-end/49905
4788 * c.opt: Add -Wformat-length and -fprintf-return-value.
4789
144a96e4
BE
47902016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4791
4792 PR c++/77434
4793 * c.opt (Wint-in-bool-context): New warning.
4794 * c-common.c (c_common_truthvalue_conversion): Warn on integer
4795 constants in boolean context.
4796
63012d9a
JM
47972016-09-19 Joseph Myers <joseph@codesourcery.com>
4798
4799 * c-common.c (max_align_t_align): Also consider alignment of
4800 float128_type_node.
4801
931388ce
JM
48022016-09-15 Jason Merrill <jason@redhat.com>
4803
4804 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
4805 DECL_EXTERNAL.
4806
38711381
JM
48072016-09-14 Jason Merrill <jason@redhat.com>
4808
4809 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
4810 limit FIELD_DECL, either.
4811
e51fbec3
MP
48122016-09-14 Marek Polacek <polacek@redhat.com>
4813
4814 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
4815 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
4816 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
4817
254830ba
DM
48182016-09-13 David Malcolm <dmalcolm@redhat.com>
4819
4820 * c-common.c (warn_logical_not_parentheses): Replace
4821 rich_location::add_fixit_insert calls with add_fixit_insert_before
4822 and add_fixit_insert_after, eliminating the "next_loc" calculation.
4823
42763690
JM
48242016-09-13 Jason Merrill <jason@redhat.com>
4825 Tom de Vries <tom@codesourcery.com>
4826
4827 PR c++/77427
4828 * c-common.c (set_underlying_type): Don't treat array as builtin type.
4829
9453eee9
JM
48302016-09-13 Jason Merrill <jason@redhat.com>
4831
4832 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
4833 limit types at all.
4834
e96809e3
JM
48352016-09-12 Jason Merrill <jason@redhat.com>
4836
4837 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
4838 bit/byte confusion, allow large alignment for types.
4839
54dcdb88
BE
48402016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
4841
4842 PR c++/77496
4843 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
4844
d1463eb9
DM
48452016-09-12 David Malcolm <dmalcolm@redhat.com>
4846
4847 PR c/72858
4848 * c-format.c (argument_parser::check_argument_type): Add params
4849 "type_start" and "conversion_char". Use the former to generate
4850 offset_to_type_start and pass it and conversion_char to
4851 check_format_types.
4852 (check_format_info_main): Capture the start of the type
4853 information as "type_start", and pass it an format_char
4854 to arg_parser.check_argument_type.
4855 (check_format_types): Provide an example in the leading comment.
4856 Add params "offset_to_type_start" and "conversion_char"; pass
4857 them to format_type_warning calls.
4858 (test_get_modifier_for_format_len): Likewise.
4859 (matching_type_p): New function.
4860 (get_format_for_type): Add param "conversion_char" and move
4861 implementation into...
4862 (get_format_for_type_1): ...new function, called twice.
4863 Use new function matching_type_p rather than checking for
4864 TYPE_CANONICAL equality.
4865 (get_corrected_substring): New function.
4866 (format_type_warning): Provide an example in the leading comment.
4867 Add params "offset_to_type_start" and "conversion_char". Replace
4868 call to get_format_for_type with call to get_corrected_substring
4869 and move rejection of hints for widths/precisions there.
4870 (assert_format_for_type_streq): Add param "conversion_char".
4871 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
4872 (test_get_format_for_type_printf): Add conversion chars to the
4873 tests, adding coverage for various combinations of integer
4874 vs double conversions, and for preserving octal and hexadecimal
4875 conversions.
4876 (test_get_format_for_type_scanf): Add conversion chars to the
4877 tests.
4878
5b28efbb
TV
48792016-09-10 Tom de Vries <tom@codesourcery.com>
4880
4881 PR C/71602
4882 * c-common.c (build_va_arg): Handle more strict
4883 targetm.canonical_va_list_type. Replace first argument type error with
4884 assert.
4885
3f0177e7
MS
48862016-09-09 Martin Sebor <msebor@redhat.com>
4887
4888 PR c/77520
4889 PR c/77521
4890 * c-format.c (argument_parser::find_format_char_info): Use %qc
4891 format directive unconditionally.
4892
af63ba4b
JM
48932016-09-09 Jason Merrill <jason@redhat.com>
4894
4895 Implement C++17 new of over-aligned types.
4896 * c.opt: Add -faligned-new and -Waligned-new.
4897 * c-common.c (max_align_t_align): Split out from...
4898 (cxx_fundamental_alignment_p): ...here.
4899 * c-common.h: Declare it.
4900 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
4901
c65248cb
JM
49022016-09-09 Joseph Myers <joseph@codesourcery.com>
4903
4904 * c-cppbuiltin.c (builtin_define_type_width): New function.
4905 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
4906 macros.
4907
e5106e27
DM
49082016-09-07 David Malcolm <dmalcolm@redhat.com>
4909
4910 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
4911 a POINTER_TYPE.
4912 (substring_loc::get_location): Move to substring-locations.c,
4913 keeping implementation as...
4914 (c_get_substring_location): New function, from the above, reworked
4915 to use accessors rather than member lookup.
4916 * c-common.h (class substring_loc): Move to substring-locations.h,
4917 replacing with a forward decl.
4918 (c_get_substring_location): New decl.
4919 * c-format.c: Include "substring-locations.h".
4920 (format_warning_va): Move to substring-locations.c.
4921 (format_warning_at_substring): Likewise.
4922
ab20d992 49232016-09-06 Martin Sebor <msebor@redhat.com>
a42e7952
MS
4924
4925 PR c/77336
4926 * c-format.c (check_function_format): Avoid issuing warnings for
4927 functions unless they call format functions with non-constant
4928 format strings.
4929
b772a565
RB
49302016-09-06 Richard Biener <rguenther@suse.de>
4931
4932 PR c/77450
4933 * c-common.c (c_common_mark_addressable_vec): Handle
4934 COMPOUND_LITERAL_EXPR.
4935
25ff5dd3
MP
49362016-09-05 Marek Polacek <polacek@redhat.com>
4937
4938 PR c/77423
4939 * c-common.c (bool_promoted_to_int_p): New function.
4940 (expr_has_boolean_operands_p): New function.
4941 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
4942 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
4943
21234eb5
TV
49442016-09-04 Tom de Vries <tom@codesourcery.com>
4945
4946 revert:
4947 2016-08-29 Tom de Vries <tom@codesourcery.com>
4948
4949 * c-common.c (build_va_arg): Replace first argument type error
4950 with assert.
4951
9dc5773f
JJ
49522016-09-02 Jakub Jelinek <jakub@redhat.com>
4953
4954 PR c/65467
4955 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
4956 (c_finish_omp_for): Reject _Atomic qualified iterators.
4957
49582016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
4959
4960 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
4961 size to guarantee it fits the output of the formatted function
4962 regardless of its arguments.
4963
295844f6
MP
49642016-09-01 Marek Polacek <polacek@redhat.com>
4965
4966 PR c/7652
4967 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
4968 FALLTHRU comments.
4969
3d06b6f2
MP
49702016-08-29 Marek Polacek <polacek@redhat.com>
4971
4972 PR c/77292
4973 * c-common.c (warn_logical_not_parentheses): Don't warn for
4974 a comparison or a logical operator.
4975
34cedad5
TV
49762016-08-29 Tom de Vries <tom@codesourcery.com>
4977
4978 * c-common.c (build_va_arg): Fix type comparison assert.
4979
f162d717
TV
49802016-08-29 Tom de Vries <tom@codesourcery.com>
4981
4982 * c-common.c (build_va_arg): Replace first argument type error
4983 with assert.
4984
ba9bbd6f
TV
49852016-08-29 Tom de Vries <tom@codesourcery.com>
4986
4987 PR c/77398
4988 * c-common.c (build_va_arg): Add first argument error. Build va_arg
4989 with error_mark_node as va_list instead of with illegal va_list.
4990
ebef225f
MP
49912016-08-25 Marek Polacek <polacek@redhat.com>
4992 David Malcolm <dmalcolm@redhat.com>
4993
4994 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
4995 * c-common.h (warn_logical_not_parentheses): Update declaration.
4996
b00e6e75
MP
49972016-08-22 Marek Polacek <polacek@redhat.com>
4998
4999 PR c++/77321
5000 * c-common.c (warn_for_memset): Check type for null.
5001
6dc198e3
JM
50022016-08-22 Joseph Myers <joseph@codesourcery.com>
5003
14ec014e 5004 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
5005 _FloatNx types for suffixes for built-in functions.
5006
c65699ef
JM
50072016-08-19 Joseph Myers <joseph@codesourcery.com>
5008
5009 PR c/32187
5010 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
5011 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
5012 (RID_FLOAT128X): New enum rid values.
5013 (CASE_RID_FLOATN_NX): New macro.
5014 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
5015 keywords.
5016 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
5017 corresponding complex types.
5018 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
5019 _FloatNx and corresponding complex types.
5020 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
5021 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
5022 and _FloatNx types for the widest type for determining
5023 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
5024 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
5025 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
5026 and _FloatNx types.
5027 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
5028 constants.
5029 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
5030 _FloatNx types.
5031
cc015f3a
DM
50322016-08-18 David Malcolm <dmalcolm@redhat.com>
5033
5034 * c-opts.c (c_diagnostic_finalizer): Update for change to
5035 diagnostic_show_locus.
5036
cb18fd07
DM
50372016-08-18 David Malcolm <dmalcolm@redhat.com>
5038
5039 * c-common.c: Include "spellcheck.h".
5040 (cb_get_suggestion): New function.
5041 * c-common.h (cb_get_suggestion): New decl.
5042 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
5043 cb_get_suggestion.
5044
a76989dc
MP
50452016-08-18 Marek Polacek <polacek@redhat.com>
5046
5047 PR c/71514
5048 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
5049 and pointer-to-VLA.
5050
65e736c0
DM
50512016-08-16 David Malcolm <dmalcolm@redhat.com>
5052
5053 PR c/72857
5054 * c-common.c (substring_loc::get_range): Rename to...
5055 (substring_loc::get_location): ...this, converting param from a
5056 source_range * to a location_t *. Call
5057 get_source_location_for_substring rather than
5058 get_source_range_for_substring, and pass in m_caret_idx.
5059 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
5060 (substring_loc::get_range): Replace with...
5061 (substring_loc::get_location): ...this.
5062 (substring_loc::set_caret_index): New method.
5063 (substring_loc): Add field m_caret_idx.
5064 * c-format.c (format_warning_va): Update for above changes.
5065 Rename local "substring_loc" to "fmt_substring_loc" to avoid
5066 clashing with type name.
5067 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
5068 (check_argument_type): Likewise.
5069 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
5070 Use a copy when emitting warnings, setting the caret index from TYPE.
5071
7e1dde14 50722016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 5073 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
5074
5075 * c-ada-spec.c (dump_number): New function.
5076 (handle_escape_character): Likewise.
5077 (print_ada_macros): Add handling of constant integers and strings.
5078
191816a3
MP
50792016-08-12 Marek Polacek <polacek@redhat.com>
5080
5081 PR c/7652
5082 * c-common.c (scalar_to_vector): Adjust fall through comment.
5083 * c-opts.c (c_common_handle_option): Likewise.
5084 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
5085 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
5086 fall through comment.
5087 * cilk.c (extract_free_variables): Add FALLTHRU.
5088
452df4a4
JM
50892016-08-10 Jason Merrill <jason@redhat.com>
5090
5091 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
5092
f3365c12
JM
50932016-08-09 Jason Merrill <jason@redhat.com>
5094
5095 * c-common.c (c_common_attribute_table): vector_size affects type
5096 identity.
5097
f0bc3323
MP
50982016-08-09 Marek Polacek <polacek@redhat.com>
5099
5100 PR c/7652
5101 * c-ada-spec.c (dump_generic_ada_node): Add return.
5102
98e5a19a
JM
51032016-08-09 Jason Merrill <jason@redhat.com>
5104
5105 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
5106 C++17 constexpr lambdas.
5107
895aa8e1
DM
51082016-08-08 David Malcolm <dmalcolm@redhat.com>
5109
5110 PR c/64955
5111 * c-common.h (selftest::c_format_c_tests): New declaration.
5112 (selftest::run_c_tests): New declaration.
5113 * c-format.c: Include "selftest.h.
5114 (format_warning_va): Add param "corrected_substring" and use
5115 it to add a replacement fix-it hint.
5116 (format_warning_at_substring): Likewise.
5117 (format_warning_at_char): Update for new param of
5118 format_warning_va.
5119 (argument_parser::check_argument_type): Pass "fki" to
5120 check_format_types.
5121 (check_format_types): Add param "fki" and pass it to
5122 format_type_warning.
5123 (deref_n_times): New function.
5124 (get_modifier_for_format_len): New function.
5125 (selftest::test_get_modifier_for_format_len): New function.
5126 (get_format_for_type): New function.
5127 (format_type_warning): Add param "fki" and use it to attempt
5128 to provide hints for argument types when calling
5129 format_warning_at_substring.
5130 (selftest::get_info): New function.
5131 (selftest::assert_format_for_type_streq): New function.
5132 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
5133 (selftest::test_get_format_for_type_printf): New function.
5134 (selftest::test_get_format_for_type_scanf): New function.
5135 (selftest::c_format_c_tests): New function.
5136
e52ed3fe
DM
51372016-08-08 David Malcolm <dmalcolm@redhat.com>
5138
5139 PR c/52952
5140 * c-format.c: Include "diagnostic.h".
5141 (location_column_from_byte_offset): Delete.
5142 (location_from_offset): Delete.
5143 (format_warning_va): New function.
5144 (format_warning_at_substring): New function.
5145 (format_warning_at_char): New function.
5146 (check_format_arg): Capture location of format_tree and pass to
5147 check_format_info_main.
5148 (argument_parser): Add fields "start_of_this_format" and
5149 "format_string_cst".
5150 (flag_chars_t::validate): Add param "format_string_cst". Convert
5151 warning_at call using location_from_offset to call to
5152 format_warning_at_char.
5153 (argument_parser::argument_parser): Add param "format_string_cst_"
5154 and use use it to initialize field "format_string_cst".
5155 Initialize new field "start_of_this_format".
5156 (argument_parser::read_format_flags): Convert warning_at call
5157 using location_from_offset to a call to format_warning_at_char.
5158 (argument_parser::read_any_format_left_precision): Likewise.
5159 (argument_parser::read_any_format_precision): Likewise.
5160 (argument_parser::read_any_other_modifier): Likewise.
5161 (argument_parser::find_format_char_info): Likewise, in three places.
5162 (argument_parser::parse_any_scan_set): Likewise, in one place.
5163 (argument_parser::handle_conversions): Likewise, in two places.
5164 (argument_parser::check_argument_type): Add param "fmt_param_loc"
5165 and use it to make a substring_loc. Pass the latter to
5166 check_format_types.
5167 (check_format_info_main): Add params "fmt_param_loc" and
5168 "format_string_cst". Convert warning_at calls using
5169 location_from_offset to calls to format_warning_at_char. Pass the
5170 new params to the arg_parser ctor. Pass "format_string_cst" to
5171 flag_chars.validate. Pass "fmt_param_loc" to
5172 arg_parser.check_argument_type.
5173 (check_format_types): Convert first param from a location_t
5174 to a const substring_loc & and rename to "fmt_loc". Attempt
5175 to extract the range of the relevant parameter and pass it
5176 to format_type_warning.
5177 (format_type_warning): Convert first param from a location_t
5178 to a const substring_loc & and rename to "fmt_loc". Add
5179 params "param_range" and "type". Replace calls to warning_at
5180 with calls to format_warning_at_substring.
5181
1c4d457e
DM
51822016-08-08 David Malcolm <dmalcolm@redhat.com>
5183
5184 * c-format.c (class flag_chars_t): New class.
5185 (struct length_modifier): New struct.
5186 (class argument_parser): New class.
5187 (flag_chars_t::flag_chars_t): New ctor.
5188 (flag_chars_t::has_char_p): New method.
5189 (flag_chars_t::add_char): New method.
5190 (flag_chars_t::validate): New method.
5191 (flag_chars_t::get_alloc_flag): New method.
5192 (flag_chars_t::assignment_suppression_p): New method.
5193 (argument_parser::argument_parser): New ctor.
5194 (argument_parser::read_any_dollar): New method.
5195 (argument_parser::read_format_flags): New method.
5196 (argument_parser::read_any_format_width): New method.
5197 (argument_parser::read_any_format_left_precision): New method.
5198 (argument_parser::read_any_format_precision): New method.
5199 (argument_parser::handle_alloc_chars): New method.
5200 (argument_parser::read_any_length_modifier): New method.
5201 (argument_parser::read_any_other_modifier): New method.
5202 (argument_parser::find_format_char_info): New method.
5203 (argument_parser::validate_flag_pairs): New method.
5204 (argument_parser::give_y2k_warnings): New method.
5205 (argument_parser::parse_any_scan_set): New method.
5206 (argument_parser::handle_conversions): New method.
5207 (argument_parser::check_argument_type): New method.
5208 (check_format_info_main): Introduce classes argument_parser
5209 and flag_chars_t, moving the code within the loop into methods
5210 of these classes. Make various locals "const".
5211
88fa5555
DM
52122016-08-05 David Malcolm <dmalcolm@redhat.com>
5213
5214 * c-common.c: Include "substring-locations.h".
5215 (get_cpp_ttype_from_string_type): New function.
5216 (g_string_concat_db): New global.
5217 (substring_loc::get_range): New method.
5218 * c-common.h (g_string_concat_db): New declaration.
5219 (class substring_loc): New class.
5220 * c-lex.c (lex_string): When concatenating strings, capture the
5221 locations of all tokens using a new obstack, and record the
5222 concatenation locations within g_string_concat_db.
5223 * c-opts.c (c_common_init_options): Construct g_string_concat_db
5224 on the ggc-heap.
5225
78169471
MP
52262016-07-29 Marek Polacek <polacek@redhat.com>
5227
638fc14f
MP
5228 PR c/71926
5229 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
5230 parentheses warning.
5231
78169471
MP
5232 PR c/71574
5233 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
5234
1225d6b1
ML
52352016-07-28 Martin Liska <mliska@suse.cz>
5236
5237 PR gcov-profile/68025
5238 * c-common.c (handle_no_profile_instrument_function_attribute):
5239
ec1e2a40
BE
52402016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
5241
5242 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
5243 BITS_PER_UNIT_LOG.
5244
5ec2cd9f
JM
52452016-07-25 Jason Merrill <jason@redhat.com>
5246
5247 PR c++/65970
5248 * c.opt (fconstexpr-loop-limit): New.
5249
9dc5773f 52502016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
5251
5252 PR c++/71675
5253 * c-common.c (resolve_overloaded_builtin): Avoid converting
5254 __atomic_compare_exchange_n return type to that of what its
5255 first argument points to.
5256
e3fe09c1
UB
52572016-07-22 Uros Bizjak <ubizjak@gmail.com>
5258
5259 * c-common.c: Use HOST_WIDE_INT_M1U instead of
5260 ~(unsigned HOST_WIDE_INT) 0.
5261
bc91c436
ML
52622016-07-22 Martin Liska <mliska@suse.cz>
5263
5264 PR gcov-profile/69028
5265 PR gcov-profile/62047
5266 * cilk.c (create_cilk_helper_decl): Set location of a new decl
5267 to the current_function_decl.
5268
451dcc66
JM
52692016-07-21 Jason Merrill <jason@redhat.com>
5270
5271 PR c++/65168
5272 * c-common.c (c_common_truthvalue_conversion): Check
5273 c_inhibit_evaluation_warnings for warning about address of
5274 reference.
5275
de6a69ee
DM
52762016-07-20 David Malcolm <dmalcolm@redhat.com>
5277
5278 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
5279 const char *.
5280
d022c55a
JM
52812016-07-15 Jason Merrill <jason@redhat.com>
5282
5283 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
5284
ddbbcb19
JJ
52852016-07-15 Jakub Jelinek <jakub@redhat.com>
5286
5287 PR c/71858
5288 * c-common.h (enum lookup_name_fuzzy_kind): Add
5289 FUZZY_LOOKUP_FUNCTION_NAME.
5290
d0cf395a
JM
52912016-07-08 Jason Merrill <jason@redhat.com>
5292
5293 P0145: Refining Expression Order for C++.
5294 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
5295 * c-opts.c: Adjust.
5296
98d44e93
MT
52972016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
5298
5299 PR c++/71214
5300 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
5301
f9d8d994
TS
53022016-06-29 Thomas Schwinge <thomas@codesourcery.com>
5303
5304 * c-pragma.h (enum pragma_kind): Rename
5305 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
5306 users.
5307
4aa83879
RB
53082016-06-29 Richard Biener <rguenther@suse.de>
5309
5310 PR middle-end/71002
5311 * c-common.c (c_common_get_alias_set): Remove union type punning case.
5312
a25bd9e6
JM
53132016-06-24 Jason Merrill <jason@redhat.com>
5314
5315 P0145R2: Refining Expression Order for C++.
5316 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
5317 MODIFY_EXPR.
5318
a86451b9
JJ
53192016-06-24 Jakub Jelinek <jakub@redhat.com>
5320
5321 * c-common.c (check_builtin_function_arguments): Require last
5322 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
5323 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
5324 if the last argument is pointer to enumerated or boolean type.
5325
1a4f11c8
DM
53262016-06-22 David Malcolm <dmalcolm@redhat.com>
5327
5328 PR c/70339
5329 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
5330 (lookup_name_fuzzy): New prototype.
5331
fe55692c
JDA
53322016-06-21 John David Anglin <danglin@gcc.gnu.org>
5333
5334 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
5335
4eb24e01
JM
53362016-06-14 Jason Merrill <jason@redhat.com>
5337
5338 P0145R2: Refining Expression Order for C++.
5339 * c.opt (fargs-in-order): New.
5340 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
5341
ef7cf206
JJ
53422016-06-13 Jakub Jelinek <jakub@redhat.com>
5343
0dda258b
JJ
5344 PR sanitizer/71498
5345 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
5346 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
5347
ef7cf206
JJ
5348 PR preprocessor/71183
5349 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
5350 to cb_get_source_date_epoch.
5351
50b15873
JJ
53522016-06-10 Jakub Jelinek <jakub@redhat.com>
5353
5354 PR c/68657
5355 * c.opt (Wpsabi): Add Warning flag.
5356
4d926e34
MS
53572016-06-10 Martin Sebor <msebor@redhat.com>
5358
5359 PR c/71392
14ec014e 5360 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
5361 the nonnull attribute in type-generic builtins.
5362
e01b4e16
MS
53632016-06-09 Martin Sebor <msebor@redhat.com>
5364
5365 PR c/70883
5366 * c-common.c (builtin_function_validate_nargs): Make text of error
5367 message consistent with others like it.
5368
44a845ca
MS
53692016-06-08 Martin Sebor <msebor@redhat.com>
5370 Jakub Jelinek <jakub@redhat.com>
5371
5372 PR c++/70507
5373 PR c/68120
5374 * c-common.c (check_builtin_function_arguments): Handle
5375 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
5376
a80a7051
RB
53772016-06-08 Richard Biener <rguenther@suse.de>
5378
5379 * c-common.c (parse_optimize_options): Improve diagnostic messages.
5380
bfd67b47
RB
53812016-06-07 Richard Biener <rguenther@suse.de>
5382
5383 PR c/61564
5384 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
5385 options and warn about others.
5386
15c98b2e
ES
53872016-06-01 Eduard Sanou <dhole@openmailbox.org>
5388
5389 * c-common.c (get_source_date_epoch): Rename to
5390 cb_get_source_date_epoch.
5391 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
5392 message when the parsing fails. Use error_at instead of fatal_error.
5393 * c-common.h (get_source_date_epoch): Rename to
5394 cb_get_source_date_epoch.
5395 * c-common.h (cb_get_source_date_epoch): Prototype.
5396 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
5397 * c-common.h (c_omp_region_type): Remove trailing comma.
5398 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
5399 * c-lex.c (c_lex_with_flags): Remove initialization of
5400 pfile->source_date_epoch.
5401
00631022
JJ
54022016-05-30 Jakub Jelinek <jakub@redhat.com>
5403
5404 PR c++/71349
5405 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
5406 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
5407 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
5408 instead of C_OMP_CLAUSE_SPLIT_FOR.
5409
f17a223d
RB
54102016-05-24 Richard Biener <rguenther@suse.de>
5411
5412 PR middle-end/70434
5413 PR c/69504
5414 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
5415 (convert_vector_to_array_for_subscript): ... this.
5416 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
5417 VIEW_CONVERT_EXPR to an array type. Rename to ...
5418 (convert_vector_to_array_for_subscript): ... this.
5419
4f2e1536
MP
54202016-05-12 Marek Polacek <polacek@redhat.com>
5421
5422 PR c/70756
5423 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
5424 size_in_bytes and pass LOC to it.
5425
d6e83a8d
MM
54262016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5427
5428 PR c/43651
5429 * c.opt (Wduplicate-decl-specifier): New option.
5430
5c3a10fb
MP
54312016-05-11 Marek Polacek <polacek@redhat.com>
5432
5433 PR c++/71024
5434 * c-common.c (diagnose_mismatched_attributes): New function.
5435 * c-common.h (diagnose_mismatched_attributes): Declare.
5436
deef7113
MP
54372016-05-04 Marek Polacek <polacek@redhat.com>
5438
5439 * c.opt (Wdangling-else): New option.
5440
79ce98bc
MP
54412016-05-03 Marek Polacek <polacek@redhat.com>
5442
5443 PR c/70859
5444 * c-common.c (builtin_function_validate_nargs): Add location
5445 parameter. Use it.
5446 (check_builtin_function_arguments): Add location and arguments
5447 parameters. Use them.
5448 * c-common.h (check_builtin_function_arguments): Update declaration.
5449
381cdae4
RB
54502016-05-03 Richard Biener <rguenther@suse.de>
5451
5452 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
5453 allow call args to gimplify to SSA names.
5454
1d793c34
MP
54552016-05-03 Marek Polacek <polacek@redhat.com>
5456
5457 * c-common.h (enum c_omp_region_type): Remove stray comma.
5458
77886428
CP
54592016-05-02 Cesar Philippidis <cesar@codesourcery.com>
5460
5461 * c-common.h (enum c_omp_region_type): Define.
5462
697e0b28
RS
54632016-05-02 Richard Sandiford <richard.sandiford@arm.com>
5464
5465 * c-common.c (shorten_compare): Use wi::to_wide.
5466
e7ff0319
CP
54672016-04-29 Cesar Philippidis <cesar@codesourcery.com>
5468
5469 PR middle-end/70626
5470 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
5471 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
5472 reduction clauses in acc parallel loops.
5473
2fff3db8
MP
54742016-04-29 Marek Polacek <polacek@redhat.com>
5475
5476 PR c/70852
5477 * c-common.c (warn_for_memset): Check domain before accessing it.
5478
509063eb
DV
54792016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
5480
5481 PR/69089
5482 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
5483 "aligned" attribute.
5484
b632761d
JM
54852016-04-28 Jason Merrill <jason@redhat.com>
5486
5487 * c-lex.c (c_common_has_attribute): Handle nodiscard.
5488
174f6622
ES
54892016-04-28 Eduard Sanou <dhole@openmailbox.org>
5490 Matthias Klose <doko@debian.org>
5491
5492 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 5493 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
5494 handling.
5495 * c-common.h (get_source_date_epoch): Prototype.
5496 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
5497
6bc2bb18
RB
54982015-04-27 Ryan Burn <contact@rnburn.com>
5499
5500 PR c++/69024
5501 PR c++/68997
5502 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
5503 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
5504 external linkage.
5505 (cilk_detect_and_unwrap): Corresponding changes.
5506 (extract_free_variables): Don't extract free variables from
5507 AGGR_INIT_EXPR slot.
5508 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
5509 (cilk_recognize_spawn): Likewise.
5510
c1e1f433
BS
55112016-04-27 Bernd Schmidt <bschmidt@redhat.com>
5512
5513 * c.opt (Wmemset-elt-size): New option.
5514 * c-common.c (warn_for_memset): New function.
5515 * c-common.h (warn_for_memset): Declare.
5516
d067e05f
JM
55172016-04-25 Jason Merrill <jason@redhat.com>
5518
5519 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
5520 No longer static.
5521 * c-common.h: Declare it.
5522 * c-lex.c (c_common_has_attribute): Add maybe_unused.
5523
9aa36ae5
JM
55242016-04-22 Jason Merrill <jason@redhat.com>
5525
5526 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
5527
477d4906
IV
55282016-04-20 Ilya Verbin <ilya.verbin@intel.com>
5529
5530 PR c++/69363
5531 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
5532 * c-common.h (c_finish_cilk_clauses): Remove declaration.
5533
fe37c7af
MM
55342016-04-18 Michael Matz <matz@suse.de>
5535
5536 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
5537 and SET_DECL_ALIGN.
5538
23f2660f
EB
55392016-04-17 Eric Botcazou <ebotcazou@adacore.com>
5540
5541 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
5542 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
5543 to incomplete types.
5544 (dump_nested_type): Remove redundant tests and tidy up.
5545 (print_ada_declaration): Also set TREE_VISITED on the declaration of
5546 a type which is the typedef of an original type.
5547
1e77281b
MP
55482016-04-15 Marek Polacek <polacek@redhat.com>
5549
5550 PR c/70651
5551 * c-common.c (build_va_arg): Change two asserts into errors and return
5552 error_mark_node.
5553
b3a77f21
MP
55542016-04-13 Marek Polacek <polacek@redhat.com>
5555
5556 PR c++/70639
5557 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
5558 for switch statements, too.
5559
322b8466
JM
55602016-03-28 Jason Merrill <jason@redhat.com>
5561
5562 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
5563
fbdb6baf
MP
55642016-03-23 Marek Polacek <polacek@redhat.com>
5565
5566 PR c++/69884
5567 * c.opt (Wignored-attributes): New option.
5568
5c240f4d
DM
55692016-03-22 David Malcolm <dmalcolm@redhat.com>
5570
5571 PR c/69993
5572 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
5573 diagnostic text, reversing the order of the warning and note so
5574 that they appear in source order.
5575
14ba7b28
MP
55762016-03-17 Marek Polacek <polacek@redhat.com>
5577
5578 PR c/69407
5579 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
5580 operations.
5581
08a1cadc
JM
55822016-03-14 Jason Merrill <jason@redhat.com>
5583
2aaeea19
JM
5584 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
5585
08a1cadc
JM
5586 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
5587
c06d25bb
RB
55882016-03-09 Richard Biener <rguenther@suse.de>
5589
5590 PR c/70143
5591 * c-common.c (strict_aliasing_warning): Add back
5592 alias_sets_conflict_p check.
5593
80aac5c8
JM
55942016-03-08 Jason Merrill <jason@redhat.com>
5595
5596 * c-opts.c (set_std_cxx1z): Don't enable concepts.
5597
64b23c13
DM
55982016-03-04 David Malcolm <dmalcolm@redhat.com>
5599
5600 PR c/68187
5601 * c-indentation.c (get_visual_column): Move code to determine next
5602 tab stop to...
5603 (next_tab_stop): ...this new function.
5604 (line_contains_hash_if): Delete function.
5605 (detect_preprocessor_logic): Delete function.
5606 (get_first_nws_vis_column): New function.
5607 (detect_intervening_unindent): New function.
5608 (should_warn_for_misleading_indentation): Replace call to
5609 detect_preprocessor_logic with a call to
5610 detect_intervening_unindent.
5611
729526f5
DM
56122016-03-04 David Malcolm <dmalcolm@redhat.com>
5613
5614 PR c/68187
5615 * c-indentation.c (should_warn_for_misleading_indentation): When
5616 suppressing warnings about cases where the guard and body are on
5617 the same column, only use the first non-whitespace column in place
5618 of the guard token column when dealing with "else" clauses.
5619 When rejecting aligned BODY and NEXT, loosen the requirement
5620 from equality with the first non-whitespace of guard to simply
5621 that they not be indented relative to it.
5622
e9a35493
RB
56232016-03-04 Richard Biener <rguenther@suse.de>
5624
5625 PR c++/70054
5626 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
5627 instead of alias_sets_conflict_p.
5628
1be56bc5
MP
56292016-03-01 Marek Polacek <polacek@redhat.com>
5630
5631 PR c++/69795
5632 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
5633 any DECL.
5634
35886f0b
MS
56352016-02-22 Martin Sebor <msebor@redhat.com>
5636
5637 PR middle-end/69780
5638 * c-common.c (check_builtin_function_arguments): Validate and
5639 reject invalid arguments to __builtin_alloca_with_align.
5640
4246c8da
MW
56412016-02-20 Mark Wielaard <mjw@redhat.com>
5642
5643 PR c/28901
5644 * c.opt (Wunused-const-variable): Turn into Alias for...
5645 (Wunused-const-variable=): New option.
5646
268be88c
BE
56472016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5648
5649 PR c++/69865
5650 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
5651 here...
5652 (c_common_init_options): ...to here.
5653 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
5654
871b3f47
JJ
56552016-02-19 Jakub Jelinek <jakub@redhat.com>
5656
5657 PR c++/69826
5658 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
5659 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
5660 flag_preprocess_only.
5661
bf14eba2
JJ
56622016-02-16 Jakub Jelinek <jakub@redhat.com>
5663
5664 PR c/69835
5665 * c.opt (Wnonnull-compare): Enable for -Wall.
5666
ba6b3795
JJ
56672016-02-15 Jakub Jelinek <jakub@redhat.com>
5668
5669 PR c++/69797
5670 * c-common.c (sync_resolve_size): Diagnose too few arguments
5671 even when params is non-NULL empty vector.
5672
a011cd92
BS
56732016-02-08 Bernd Schmidt <bschmidt@redhat.com>
5674
5675 PR target/60410
5676 * c.opt (fshort-double): Remove.
5677
46cb9332
MS
56782016-02-05 Martin Sebor <msebor@redhat.com>
5679
5680 PR c++/69662
5681 * c.opt (Warning options): Update -Wplacement-new to take
5682 an optional argument.
5683
e1b81f2b
JJ
56842016-02-01 Jakub Jelinek <jakub@redhat.com>
5685
5686 PR preprocessor/69543
5687 PR c/69558
5688 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
5689 instead of loc to control_warning_option.
5690
b6adbb9f
NS
56912016-02-01 Nathan Sidwell <nathan@codesourcery.com>
5692
5693 * c.opt (fopenacc-dim=): New option.
5694
5d70666e
RB
56952016-01-27 Ryan Burn <contact@rnburn.com>
5696
5697 PR cilkplus/69267
5698 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
5699 gimplify_arg. Removed superfluous post_p argument.
5700 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
5701 superfluous post_p argument.
5702 * c-gimplify.c (c_gimplify_expr): Likewise.
5703
01e1dea3
DM
57042016-01-26 David Malcolm <dmalcolm@redhat.com>
5705
5706 PR other/69006
5707 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
5708 pp_newline_and_flush with pp_flush.
5709
9f04a53e
MS
57102016-01-20 Martin Sebor <msebor@redhat.com>
5711
5712 PR c/69405
5713 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
5714 an incompatible argument when the argument isn't a valid tree node.
5715
7f26f7df
JM
57162016-01-18 Jason Merrill <jason@redhat.com>
5717
5718 PR c++/68767
5719 * c-common.c (check_function_arguments_recurse): Fold the whole
5720 COND_EXPR, not just the condition.
5721
f62bf092
TV
57222016-01-18 Tom de Vries <tom@codesourcery.com>
5723
5724 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
5725 classify as loop clause.
5726
e0a575ff
JJ
57272016-01-15 Jakub Jelinek <jakub@redhat.com>
5728
5729 PR bootstrap/68271
5730 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
5731 C++ FE no longer has limit on number of pragmas.
5732
57332015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
5734
5735 PR c++/69048
5736 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 5737 to add missing cleanup point.
b6e3db06 5738
c7df95d8
DM
57392016-01-14 David Malcolm <dmalcolm@redhat.com>
5740
5741 PR c++/68819
5742 * c-indentation.c (get_visual_column): Add location_t param.
5743 Handle the column number being zero by effectively disabling the
5744 warning, with an "inform".
5745 (should_warn_for_misleading_indentation): Add location_t argument
5746 for all uses of get_visual_column.
5747
21efdd80
PP
57482016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
5749
5750 PR c++/69029
5751 * c-indentation.c (should_warn_for_misleading_indentation):
5752 Don't warn about do-while statements.
5753
7a127fa7
MS
57542016-01-07 Martin Sebor <msebor@redhat.com>
5755
5756 PR c/68966
5757 * c-common.c (sync_resolve_size): Reject first argument when it's
5758 a pointer to _Bool.
5759
c589e975
DM
57602016-01-05 David Malcolm <dmalcolm@redhat.com>
5761
5762 PR c/69122
5763 * c-indentation.c (get_visual_column): Remove default argument.
5764 (should_warn_for_misleading_indentation): For the multiline case,
5765 update call to get_visual_column for next_stmt_exploc so that it
5766 captures the location of the first non-whitespace character in the
5767 relevant line. Don't issue warnings if there is non-whitespace
5768 before the next statement.
5769
818ab71a
JJ
57702016-01-04 Jakub Jelinek <jakub@redhat.com>
5771
5772 Update copyright years.
5773
745e411d
DM
57742015-12-21 David Malcolm <dmalcolm@redhat.com>
5775
5776 * c-common.c (binary_op_error): Convert first param from
5777 location_t to rich_location * and use it when emitting an error.
5778 * c-common.h (binary_op_error): Convert first param from
5779 location_t to rich_location *.
5780
de67c4c3
DM
57812015-12-16 David Malcolm <dmalcolm@redhat.com>
5782
5783 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
5784 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
5785
4a38b02b
IV
57862015-12-15 Ilya Verbin <ilya.verbin@intel.com>
5787
5788 * c-common.c (c_common_attribute_table): Handle "omp declare target
5789 link" attribute.
5790
54d62f51
JJ
57912015-12-14 Jakub Jelinek <jakub@redhat.com>
5792
5793 PR c/68833
5794 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
5795
8d4227c8
TB
57962014-12-12 Tobias Burnus <burnus@net-b.de>
5797
5798 PR fortran/68815
5799 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
5800 specifiers (%d, %i,%u and %c).
5801
f6069ccc
DM
58022015-12-10 David Malcolm <dmalcolm@redhat.com>
5803
5804 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
5805
63bbf46d
JJ
58062015-12-08 Jakub Jelinek <jakub@redhat.com>
5807
5808 PR c/48088
5809 PR c/68657
5810 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
5811 * c-pragma.c (handle_pragma_diagnostic): Adjust
5812 control_warning_option caller.
5813
f79520bb
DM
58142015-12-07 David Malcolm <dmalcolm@redhat.com>
5815
5816 * c-common.c (c_cpp_error): Update for change to
5817 rich_location::set_range.
5818
b3d5bc62
JJ
58192015-12-04 Paolo Bonzini <bonzini@gnu.org>
5820
5821 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
5822 shifting 1 out of the sign bit.
5823
58242015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
5825
5826 * c-common.c (c_common_attribute_table[]): Update max arguments
5827 count for "simd" attribute.
5828 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
5829
6eb4a537
JJ
58302015-12-03 Jakub Jelinek <jakub@redhat.com>
5831
5832 PR preprocessor/57580
5833 * c-ppoutput.c (print): Change printed field to bool.
5834 Move src_file last for smaller padding.
5835 (init_pp_output): Set print.printed to false instead of 0.
5836 (scan_translation_unit): Fix up formatting. Set print.printed
5837 to true after printing something other than newline.
5838 (scan_translation_unit_trad): Set print.printed to true instead of 1.
5839 (maybe_print_line_1): Set print.printed to false instead of 0.
5840 (print_line_1): Likewise.
5841 (do_line_change): Set print.printed to true instead of 1.
5842 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
5843 dump_macro): Set print.printed to false after printing newline.
5844
4250754e
JM
58452015-12-02 Jason Merrill <jason@redhat.com>
5846
f479b43d
JM
5847 * c-common.c (fold_for_warn): New.
5848 (warn_logical_operator, warn_tautological_cmp)
5849 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
5850
4250754e
JM
5851 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
5852 (c_fully_fold_internal, decl_constant_value_for_optimization):
5853 Move to c/c-fold.c.
5854 * c-common.h: Don't declare decl_constant_value_for_optimization.
5855
e9e32ee6
JM
58562015-12-02 Joseph Myers <joseph@codesourcery.com>
5857
5858 PR c/68162
5859 * c-common.h (c_build_qualified_type): Add extra default
5860 arguments.
5861
37d5ad46
JB
58622015-12-01 Julian Brown <julian@codesourcery.com>
5863 Cesar Philippidis <cesar@codesourcery.com>
5864 James Norris <James_Norris@mentor.com>
5865
5866 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
5867 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
5868 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
5869
f07862c7
EB
58702015-11-30 Eric Botcazou <ebotcazou@adacore.com>
5871
5872 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
5873 (decl_sloc_common): Delete and move bulk of processing to...
5874 (decl_sloc): ...here.
5875 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
5876 (dump_ada_double_name): Remove S parameter and compute the suffix.
5877 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
5878 element type and deal with an anonymous one.
5879 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
5880 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
5881 and remove reference to QUAL_UNION_TYPE.
5882 (dump_nested_types): Make 2 passes on the fields and move bulk to...
5883 (dump_nested_type): ...here. New function extracted from above.
5884 Generate a full declaration for anonymous element type of arrays.
5885 (print_ada_declaration): Really skip anonymous declarations. Remove
5886 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
5887 Clean up processing of declarations of array types and objects.
5888 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
5889 Remove obsolete code and tidy up.
5890
75c8aac3
JH
58912015-11-29 Jan Hubicka <hubicka@ucw.cz>
5892
5893 PR c/67581
5894 * c-common.c (handle_transparent_union_attribute): Update
5895 also type variants.
5896
b58d3df2
ML
58972015-11-27 Martin Liska <mliska@suse.cz>
5898
5899 PR c++/68312
5900 * array-notation-common.c (cilkplus_extract_an_triplets):
5901 Release vector of vectors.
5902 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
5903
89a01fcf
EB
59042015-11-26 Eric Botcazou <ebotcazou@adacore.com>
5905
5906 PR c++/68527
5907 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
5908 (print_ada_struct_decl): Likewise.
5909
cc5c5226
IZ
59102015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
5911
5912 PR c++/68001
5913 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
5914 * cilk.c (recognize_spawn): Determine location in a more precise
5915 way.
5916
269adb9d
JM
59172015-11-19 Jason Merrill <jason@redhat.com>
5918
5919 * c-common.c (shorten_compare): But look through macros from
5920 system headers.
5921
d0eccfcd
JM
59222015-11-18 Jason Merrill <jason@redhat.com>
5923
5924 * c-common.c (shorten_compare): Don't -Wtype-limits if the
5925 non-constant operand comes from a macro.
5926
3e44547c
JM
59272015-11-17 Jason Merrill <jason@redhat.com>
5928
5929 PR bootstrap/68346
5930 * c-common.c (warn_tautological_cmp): Fold before checking for
5931 constants.
5932
0f62c7a0
MP
59332015-11-16 Marek Polacek <polacek@redhat.com>
5934
5935 PR c++/68362
5936 * c-common.c (check_case_bounds): Fold low and high cases.
5937
a868811e
MP
59382015-11-16 Marek Polacek <polacek@redhat.com>
5939
5940 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
5941 * c-common.c (c_common_get_alias_set): Likewise.
5942 (handle_visibility_attribute): Likewise.
5943
fff77217
KY
59442015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
5945
5946 * c-common.c (handle_simd_attribute): New.
5947 (struct attribute_spec): Add entry for "simd".
5948 (handle_simd_attribute): New.
5949
269e63b7
KT
59502015-11-13 Kai Tietz <ktietz70@googlemail.com>
5951
5952 * c-lex.c (interpret_float): Use fold_convert.
5953
ebedc9a3
DM
59542015-11-13 David Malcolm <dmalcolm@redhat.com>
5955
5956 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
5957 and store it on the result.
5958 * c-opts.c (c_common_init_options): Set
5959 global_dc->colorize_source_p.
5960
6e232ba4
JN
59612015-11-12 James Norris <jnorris@codesourcery.com>
5962 Joseph Myers <joseph@codesourcery.com>
5963
7365279f 5964 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
5965 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
5966 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
5967 PRAGMA_OACC_CLAUSE_LINK.
5968
e78bede6
MP
59692015-11-11 Marek Polacek <polacek@redhat.com>
5970
5971 PR c/68107
5972 PR c++/68266
5973 * c-common.c (valid_array_size_p): New function.
5974 * c-common.h (valid_array_size_p): Declare.
5975
3f8257db 59762015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
5977
5978 PR bootstrap/68271
5979 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
5980
69f293c9
AM
59812015-11-11 Andrew MacLeod <amacleod@redhat.com>
5982
5983 * array-notation-common.c: Remove unused header files.
5984 * c-ada-spec.c: Likewise.
5985 * c-cilkplus.c: Likewise.
5986 * c-common.c: Likewise.
5987 * c-cppbuiltin.c: Likewise.
5988 * c-dump.c: Likewise.
5989 * c-format.c: Likewise.
5990 * c-gimplify.c: Likewise.
5991 * c-indentation.c: Likewise.
5992 * c-lex.c: Likewise.
5993 * c-omp.c: Likewise.
5994 * c-opts.c: Likewise.
5995 * c-pch.c: Likewise.
5996 * c-ppoutput.c: Likewise.
5997 * c-pragma.c: Likewise.
5998 * c-pretty-print.c: Likewise.
5999 * c-semantics.c: Likewise.
6000 * c-ubsan.c: Likewise.
6001 * cilk.c: Likewise.
6002 * stub-objc.c: Likewise.
6003
3a40d81d
NS
60042015-11-09 Thomas Schwinge <thomas@codesourcery.com>
6005 Cesar Philippidis <cesar@codesourcery.com>
6006 James Norris <jnorris@codesourcery.com>
6007 Julian Brown <julian@codesourcery.com>
6008 Nathan Sidwell <nathan@codesourcery.com>
6009
6010 * c-pragma.c (oacc_pragmas): Add "routine".
6011 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
6012
ee45a32d
EB
60132015-11-08 Eric Botcazou <ebotcazou@adacore.com>
6014
6015 * c-common.c (c_common_attributes): Add scalar_storage_order.
6016 (handle_scalar_storage_order_attribute): New function.
6017 * c-pragma.c (global_sso): New variable.
6018 (maybe_apply_pragma_scalar_storage_order): New function.
6019 (handle_pragma_scalar_storage_order): Likewise.
6020 (init_pragma): Register scalar_storage_order.
6021 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
6022 * c.opt (Wscalar-storage-order): New warning.
6023 (fsso-struct=): New option.
6024
eb11eb15
MS
60252015-11-08 Martin Sebor <msebor@redhat.com>
6026
6027 * c.opt (Wplacement-new): Add a period to the end of a sentence.
6028
0aad0198
RS
60292015-11-07 Richard Sandiford <richard.sandiford@arm.com>
6030
6031 * c-common.c: Don't undef DEF_BUILTIN.
6032
8a645150
DM
60332015-11-06 David Malcolm <dmalcolm@redhat.com>
6034
6035 * c-common.c (c_cpp_error): Convert parameter from location_t to
6036 rich_location *. Eliminate the "column_override" parameter and
6037 the call to diagnostic_override_column.
6038 Update the "done_lexing" clause to set range 0
6039 on the rich_location, rather than overwriting a location_t.
6040 * c-common.h (c_cpp_error): Convert parameter from location_t to
6041 rich_location *. Eliminate the "column_override" parameter.
6042
7a5e4956
CP
60432015-11-05 Cesar Philippidis <cesar@codesourcery.com>
6044 Thomas Schwinge <thomas@codesourcery.com>
6045 James Norris <jnorris@codesourcery.com>
6046
6047 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
6048 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
6049 clauses with parallel and kernels and loops.
6050 * c-pragma.h (enum pragma_omp_clause): Add entries for
6051 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
6052 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
6053 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
6054 INDEPENDENT,SEQ}.
6055 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
6056
e2f5cc96
MS
60572015-11-05 Martin Sebor <msebor@redhat.com>
6058
6059 PR c++/67942
6060 * c.opt (-Wplacement-new): New option.
6061
e01d41e5
JJ
60622015-11-05 Jakub Jelinek <jakub@redhat.com>
6063
6064 * c-common.h (c_finish_omp_atomic): Add TEST argument.
6065 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
6066 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
6067 save_expr or create_tmp_var* if TEST is true.
6068 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
6069 Don't call add_stmt here.
6070 (struct c_omp_check_loop_iv_data): New type.
6071 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
6072 c_omp_check_loop_iv_exprs): New functions.
6073 (c_omp_split_clauses): Adjust for lastprivate being allowed on
6074 distribute.
6075 (c_omp_declare_simd_clauses_to_numbers): Change
6076 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
6077 (c_omp_declare_simd_clauses_to_decls): Similarly change those
6078 from numbers to PARM_DECLs.
6079
595278be
MM
60802015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
6081
6082 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
6083 flag_checking.
6084
3f8257db 60852015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
6086
6087 PR c++-common/67882
b3d5bc62
JJ
6088 * c-common.h (fold_offsetof_1): Add argument.
6089 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
6090 offsetof expressions that reference elements past the end of
6091 an array.
6092
4bf9e5a8
TS
60932015-11-03 Thomas Schwinge <thomas@codesourcery.com>
6094 Chung-Lin Tang <cltang@codesourcery.com>
6095
6096 * c-pragma.c (oacc_pragmas): Add "atomic".
6097 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
6098
3b1661a9
ES
60992015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
6100
6101 * c-common.c (handle_target_clones_attribute): New.
6102 (c_common_attribute_table): Add handle_target_clones_attribute.
6103 (handle_always_inline_attribute): Add check on target_clones attribute.
6104 (handle_target_attribute): Ditto.
6105
2adfab87
AM
61062015-10-29 Andrew MacLeod <amacleod@redhat.com>
6107
6108 * array-notation-common.c: Reorder #include's and remove duplicates.
6109 * c-ada-spec.c: Likewise.
6110 * c-cilkplus.c: Likewise.
6111 * c-common.c: Likewise.
6112 * c-cppbuiltin.c: Likewise.
6113 * c-dump.c: Likewise.
6114 * c-format.c: Likewise.
6115 * c-gimplify.c: Likewise.
6116 * c-indentation.c: Likewise.
6117 * c-lex.c: Likewise.
6118 * c-omp.c: Likewise.
6119 * c-opts.c: Likewise.
6120 * c-pch.c: Likewise.
6121 * c-ppoutput.c: Likewise.
6122 * c-pragma.c: Likewise.
6123 * c-pretty-print.c: Likewise.
6124 * c-semantics.c: Likewise.
6125 * c-ubsan.c: Likewise.
6126 * cilk.c: Likewise.
6127 * stub-objc.c: Likewise.
6128
d90ec4f2
JM
61292015-10-28 Jason Merrill <jason@redhat.com>
6130
6131 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
6132
88bae6f4
TS
61332015-10-27 Thomas Schwinge <thomas@codesourcery.com>
6134 James Norris <jnorris@codesourcery.com>
6135 Cesar Philippidis <cesar@codesourcery.com>
6136
6137 PR c/64765
6138 PR c/64880
6139 * c-common.h (c_oacc_split_loop_clauses): Declare function.
6140 * c-omp.c (c_oacc_split_loop_clauses): New function.
6141
b1726d6c
MS
61422015-10-21 Martin Sebor <msebor@redhat.com>
6143
6144 PR driver/68043
6145 * c.opt: End each sentence that describes an option with a period.
6146
fa60eeb9
MP
61472015-10-20 Marek Polacek <polacek@redhat.com>
6148
6149 * array-notation-common.c (is_cilkplus_vector_p): Define.
6150 * c-common.h (is_cilkplus_vector_p): Declare.
6151
95979049
MP
61522015-10-20 Marek Polacek <polacek@redhat.com>
6153
6154 * c.opt (std=gnu++11): Do not describe as experimental.
6155 (std=gnu++14): Likewise.
6156
2a9fb712
JM
61572015-10-19 Jason Merrill <jason@redhat.com>
6158
6159 * c-cppbuiltin.c (c_cpp_builtins): Define
6160 __cpp_nontype_template_args.
6161
13b380a3
JM
61622015-10-19 Jason Merrill <jason@redhat.com>
6163
6164 * c-cppbuiltin.c (c_cpp_builtins): Define
6165 __cpp_enumerator_attributes, __cpp_fold_expressions,
6166 __cpp_unicode_characters.
6167
d9a6bd32
JJ
61682015-10-13 Jakub Jelinek <jakub@redhat.com>
6169 Aldy Hernandez <aldyh@redhat.com>
6170
6171 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
6172 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
6173 (c_define_builtins): Likewise.
6174 * c-common.h (enum c_omp_clause_split): Add
6175 C_OMP_CLAUSE_SPLIT_TASKLOOP.
6176 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
6177 (c_finish_omp_for): Add ORIG_DECLV argument.
6178 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
6179 201511 instead of 201307.
6180 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
6181 OMP_CRITICAL_CLAUSES to it.
6182 (c_finish_omp_ordered): Add CLAUSES argument, set
6183 OMP_ORDERED_CLAUSES to it.
6184 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
6185 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
6186 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
6187 constructs and new OpenMP 4.5 clauses. Clear
6188 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
6189 verification code.
6190 * c-pragma.c (omp_pragmas_simd): Add taskloop.
6191 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
6192 (enum pragma_omp_clause): Add
6193 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
6194 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
6195
624d31fe
RS
61962015-10-05 Richard Sandiford <richard.sandiford@arm.com>
6197
6198 * c-lex.c (interpret_float): Use real_equal instead of
6199 REAL_VALUES_EQUAL.
6200
b8fd7909
JM
62012015-10-04 Jason Merrill <jason@redhat.com>
6202
6203 Implement N4514, C++ Extensions for Transactional Memory.
6204 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
6205 (c_common_attribute_table): Add transaction_safe_dynamic.
6206 transaction_safe now affects type identity.
6207 (handle_tm_attribute): Handle transaction_safe_dynamic.
6208 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
6209 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
6210 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
6211 (D_TRANSMEM): New.
6212 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
6213 * c-pretty-print.c (pp_c_attributes_display): Don't print
6214 transaction_safe in C++.
6215
12651878
MP
62162015-10-02 Marek Polacek <polacek@redhat.com>
6217
6218 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
6219
3e3b8d63
MP
62202015-10-02 Marek Polacek <polacek@redhat.com>
6221
6222 PR c/64249
6223 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
6224 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
6225 * c.opt (Wduplicated-cond): New option.
6226
0d1a8f75
JM
62272015-10-01 Joseph Myers <joseph@codesourcery.com>
6228
6229 * c.opt (std=c11): Do not describe as experimental.
6230 (std=gnu11): Likewise.
6231 (std=iso9899:2011): Likewise.
6232
3e32ee19
NS
62332015-09-28 Nathan Sidwell <nathan@codesourcery.com>
6234
6235 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
6236 (DEF_FUNCTION_TYPE_VAR_11): Delete.
6237
974348ee
MP
62382015-09-25 Marek Polacek <polacek@redhat.com>
6239
6240 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
6241 (ubsan_instrument_shift): Likewise.
6242
15dbc1a6
MP
62432015-09-25 Marek Polacek <polacek@redhat.com>
6244
6245 PR sanitizer/64906
6246 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
6247
6b95d7cc
PP
62482015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
6249
6250 * c-indentation.c (should_warn_for_misleading_indentation):
6251 Compare next_stmt_vis_column with guard_line_first_nws instead
6252 of with guard_line_vis_column.
6253
c1822f9c
MLI
62542015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
6255
6256 PR c/49654
6257 PR c/49655
6258 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
6259 options and options not valid for the current language.
6260
d5398058
PP
62612015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
6262
6263 * c-indentation.c (should_warn_for_misleading_indentation):
6264 Float out and consolidate the calls to get_visual_column that
6265 are passed guard_exploc as an argument. Compare
6266 next_stmt_vis_column with guard_line_first_nws instead of with
6267 body_line_first_nws.
6268
6b333269
NS
62692015-09-22 Nathan Sidwell <nathan@codesourcery.com>
6270
6271 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
6272 Wnamespaces): New C++ warnings.
6273
a75f1574
JM
62742015-09-22 Jason Merrill <jason@redhat.com>
6275
6276 * c-common.h (abi_compat_version_crosses): New.
6277 (warn_abi_version): Declare.
6278 * c-common.c: Define it.
6279 * c-opts.c (c_common_post_options): Handle it.
6280 flag_abi_compat_version defaults to 8.
6281
bdaaa8b7
VV
62822015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
6283
6284 Complete the implementation of N4230, Nested namespace definition.
6285 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
6286 __cpp_nested_namespace_definitions.
6287
eaa797e8
MLI
62882015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6289
6290 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
6291
c4914de6
MLI
62922015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6293
6294 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
6295 when warning.
6296 * c-pragma.h (pragma_lex): Add optional loc argument.
6297
fcb87c50
MM
62982015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
6299
6300 * c-format.c (check_format_arg): Adjust to use common block size in all
6301 object pools.
6302
31bdd08a
DM
63032015-09-15 David Malcolm <dmalcolm@redhat.com>
6304
6305 * c-format.c (location_from_offset): Update for change in
6306 signature of location_get_source_line.
6307 * c-indentation.c (get_visual_column): Likewise.
6308 (line_contains_hash_if): Likewise.
6309
aa9f4b4c
MP
63102015-09-14 Marek Polacek <polacek@redhat.com>
6311
6312 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
6313 setting various warnings.
6314
aa256c4a
MP
63152015-09-14 Marek Polacek <polacek@redhat.com>
6316
6317 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
6318 a negative value.
6319
0f876f22
MW
63202015-09-11 Mark Wielaard <mjw@redhat.com>
6321
6322 PR c/28901
6323 * c.opt (Wunused-variable): Option from common.opt.
6324 (Wunused-const-variable): New option.
6325
273aa49e
PC
63262015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
6327
6328 PR c++/53184
6329 * c.opt ([Wsubobject-linkage]): Add.
6330
1807ffc1
MS
63312015-09-03 Martin Sebor <msebor@redhat.com>
6332
6333 PR c/66516
6334 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
6335 functions.
6336 * c-common.c (reject_gcc_builtin): Define.
6337
38942840
BI
63382015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
6339
6340 PR middle-end/60586
6341 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
6342 prototype.
6343 * c-gimplify.c (c_gimplify_expr): Added a call to the function
6344 cilk_gimplify_call_params_in_spawned_fn.
6345 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
6346 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
6347 unwrapping.
6348
c316b5e4
MP
63492015-08-25 Marek Polacek <polacek@redhat.com>
6350
6351 PR middle-end/67330
6352 * c-common.c (handle_weak_attribute): Don't check whether the
6353 visibility can be changed here.
6354
584a7c46
MLI
63552015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
6356
6357 * c-lex.c (c_lex_with_flags): Use explicit locations.
6358
a79683d5
TS
63592015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
6360
6361 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
6362 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
6363
61717a45
FXC
63642015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
6365
6366 PR middle-end/36757
6367 * c-common.c (check_builtin_function_arguments): Add check
6368 for BUILT_IN_SIGNBIT argument.
6369
329524f5
PC
63702015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
6371
6372 PR c++/67160
6373 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
6374 in c++1z mode.
6375
4ee55665
MP
63762015-08-17 Marek Polacek <polacek@redhat.com>
6377
6378 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
6379 with whitespaces before qualifier names.
6380
b893e375
MP
63812015-08-12 Marek Polacek <polacek@redhat.com>
6382
6383 PR c++/55095
6384 * c-common.c (maybe_warn_shift_overflow): Properly handle
6385 left-shifting 1 into the sign bit.
6386
c2d89095
MLI
63872015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6388
6389 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
6390
971e17ff
AS
63912015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
6392 Braden Obrzut <admin@maniacsvault.net>
6393 Jason Merrill <jason@redhat.com>
6394
6395 Add C++ Concepts TS support.
6396 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
6397 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
6398 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
6399 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
6400 * c-opts.c (set_std_cxx1z): Set flag_concepts.
6401 * c.opt (fconcepts): New.
6402
b3d5bc62
JJ
64032015-08-02 Martin Sebor <msebor@redhat.com>
6404
6405 * c.opt (-Wframe-address): New warning option.
6406
8ebca419
PP
64072015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6408
6409 * c-indentation.c (should_warn_for_misleading_indentation):
6410 Improve heuristics.
6411
1a1e101f
PP
64122015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6413
6414 * c-indentation.c (get_visual_column): Add parameter first_nws,
6415 use it. Update comment documenting the function.
6416 (is_first_nonwhitespace_on_line): Remove.
6417 (should_warn_for_misleading_indentation): Replace usage of
6418 of is_first_nonwhitespace_on_line with get_visual_column.
6419
992118a1
PP
64202015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6421
6422 * c-indentation.h (struct token_indent_info): Define.
6423 (get_token_indent_info): Define.
6424 (warn_for_misleading_information): Declare.
6425 * c-common.h (warn_for_misleading_information): Remove.
6426 * c-identation.c (warn_for_misleading_indentation):
6427 Change declaration to take three token_indent_infos. Adjust
6428 accordingly.
6429 * c-identation.c (should_warn_for_misleading_indentation):
6430 Likewise. Bail out early if the body is a compound statement.
6431 (guard_tinfo_to_string): Define.
6432
e8fa3817
JM
64332015-07-30 Jason Merrill <jason@redhat.com>
6434
6435 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
6436 '*' for reference decay.
6437
173864e8
MP
64382015-07-30 Marek Polacek <polacek@redhat.com>
6439
6440 * c-common.c (warn_tautological_cmp): Bail for float types.
6441
f2afe6dd
MP
64422015-07-27 Marek Polacek <polacek@redhat.com>
6443
6444 PR bootstrap/67030
6445 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
6446
05b28fd6
MP
64472015-07-27 Marek Polacek <polacek@redhat.com>
6448
6449 PR c++/66555
6450 PR c/54979
6451 * c-common.c (find_array_ref_with_const_idx_r): New function.
6452 (warn_tautological_cmp): New function.
6453 * c-common.h (warn_tautological_cmp): Declare.
6454 * c.opt (Wtautological-compare): New option.
6455
5a5062b8
MP
64562015-07-23 Marek Polacek <polacek@redhat.com>
6457
6458 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
6459 (ubsan_instrument_shift): Likewise.
6460
dc891fe7
MP
64612015-07-23 Marek Polacek <polacek@redhat.com>
6462
6463 PR sanitizer/66908
6464 * c-ubsan.c: Include gimplify.h.
6465 (ubsan_instrument_division): Unshare OP0 and OP1.
6466 (ubsan_instrument_shift): Likewise.
6467
451b5e48
MP
64682015-07-20 Marek Polacek <polacek@redhat.com>
6469 Richard Sandiford <richard.sandiford@arm.com>
6470
6471 PR c++/55095
6472 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
6473 Use EXPR_LOC_OR_LOC.
6474 (maybe_warn_shift_overflow): New function.
6475 * c-common.h (maybe_warn_shift_overflow): Declare.
6476 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
6477 * c.opt (Wshift-overflow): New option.
6478
fb0b2914
ML
64792015-07-16 Martin Liska <mliska@suse.cz>
6480
6481 * c-format.c (static void check_format_info_main): Use
6482 object_allocator instead of pool_allocator.
6483 (check_format_arg): Likewise.
6484 (check_format_info_main): Likewise.
6485
903f5c23
AM
64862015-07-15 Andrew MacLeod <amacleod@redhat.com>
6487
6488 * c-opts.c: Remove multiline #include comment.
6489
026c3cfd
AH
64902015-07-12 Aldy Hernandez <aldyh@redhat.com>
6491
6492 * c-common.c: Fix double word typos.
6493
bb49ee66
EB
64942015-07-10 Eric Botcazou <ebotcazou@adacore.com>
6495
6496 * c-ada-spec.h (cpp_operation): Revert latest change.
6497 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
6498 constructors and destructors.
6499
1916bcb5
AM
65002015-07-09 Andrew MacLeod <amacleod@redhat.com>
6501
6502 * c-common.h: Adjust includes for flags.h changes.
6503 * stub-objc.c: Likewise.
026c3cfd 6504
a9dcd529
EB
65052015-07-08 Eric Botcazou <ebotcazou@adacore.com>
6506
6507 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
6508 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
6509
b03b462f
JJ
65102015-07-08 Jakub Jelinek <jakub@redhat.com>
6511
6512 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
6513 are to be removed, return NULL rather than original clauses list.
6514
c7131fb2
AM
65152015-07-07 Andrew MacLeod <amacleod@redhat.com>
6516
6517 * array-notation-common.c: Adjust includes.
6518 * c-ada-spec.c: Likewise.
6519 * c-cilkplus.c: Likewise.
6520 * c-common.h: Likewise.
6521 * c-cppbuiltin.c: Likewise.
6522 * c-dump.c: Likewise.
6523 * c-format.c: Likewise.
6524 * c-gimplify.c: Likewise.
6525 * c-indentation.c: Likewise.
6526 * c-lex.c: Likewise.
6527 * c-omp.c: Likewise.
6528 * c-opts.c: Likewise.
6529 * c-pch.c: Likewise.
6530 * c-ppoutput.c: Likewise.
6531 * c-pragma.c: Likewise.
6532 * c-pretty-print.c: Likewise.
6533 * c-semantics.c: Likewise.
6534 * c-ubsan.c: Likewise.
6535 * cilk.c: Likewise.
6536 * stub-objc.c: Likewise.
6537
2a7fb83f
EB
65382015-07-07 Eric Botcazou <ebotcazou@adacore.com>
6539
6540 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
6541 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
6542
a03c9bf1
JM
65432015-07-01 Jason Merrill <jason@redhat.com>
6544
36a85135
JM
6545 * c-common.h (D_CXX11): Rename from D_CXX0X.
6546 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
6547 * c-common.c: Adjust.
6548
e7fa68d5
JM
6549 * c-opts.c (c_common_post_options): Default to C++14.
6550
a03c9bf1
JM
6551 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
6552
fe95b036
ESR
65532015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
6554
6555 Implement N4197 - Adding u8 character literals
b3d5bc62 6556 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 6557 CPP_CHAR.
b3d5bc62 6558 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 6559 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 6560 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
6561 and CPP_UTF8CHAR tokens.
6562 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 6563
da2e71c9
MLI
65642015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6565
6566 PR fortran/66605
6567 * c-common.c (do_warn_unused_parameter): Move here.
6568 * c-common.h (do_warn_unused_parameter): Declare.
6569
b155cfd9
MP
65702015-06-29 Marek Polacek <polacek@redhat.com>
6571
6572 PR c/66322
6573 * c-common.c (check_case_bounds): Add bool * parameter. Set
6574 OUTSIDE_RANGE_P.
6575 (c_add_case_label): Add bool * parameter. Pass it down to
6576 check_case_bounds.
6577 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
6578 warning here.
6579 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
6580 declarations.
6581
31521951
MP
65822015-06-27 Marek Polacek <polacek@redhat.com>
6583
6584 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
6585 or VECTOR_INTEGER_TYPE_P throughout.
6586 * c-gimplify.c: Likewise.
6587
22d03525
MP
65882015-06-26 Marek Polacek <polacek@redhat.com>
6589
6590 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
6591 * c-common.c (c_fully_fold_internal): Likewise.
6592 (c_alignof_expr): Likewise.
6593 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
6594 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 6595 * cilk.c (create_parm_list): Likewise.
22d03525 6596
af05e6e5
MP
65972015-06-26 Marek Polacek <polacek@redhat.com>
6598
6599 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
6600
f0889939
AM
66012015-06-25 Andrew MacLeod <amacleod@redhat.com>
6602
6603 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
6604 * c-gimplify.c: Likewise.
6605 * c-pragma.c: Likewise.
6606 * c-ubsan.c: Likewise.
6607 * cilk.c: Likewise.
6608
ca752f39
RS
66092015-06-25 Richard Sandiford <richard.sandiford@arm.com>
6610
6611 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
6612 ggc_hasher.
6613
16a16ec7
AM
66142015-06-25 Andrew MacLeod <amacleod@redhat.com>
6615
6616 * cilk.c: Move calls.h after tm.h in the include chain.
6617
0ae9bd27
MP
66182015-06-25 Marek Polacek <polacek@redhat.com>
6619
6620 * array-notation-common.c: Use VAR_P throughout.
6621 * c-ada-spec.c: Likewise.
6622 * c-common.c: Likewise.
6623 * c-format.c: Likewise.
6624 * c-gimplify.c: Likewise.
6625 * c-omp.c: Likewise.
6626 * c-pragma.c: Likewise.
6627 * c-pretty-print.c: Likewise.
6628 * cilk.c: Likewise.
6629
62f9079a
MP
66302015-06-25 Marek Polacek <polacek@redhat.com>
6631
6632 * cilk.c (extract_free_variables): Use is_global_var.
6633
0fa16060
RS
66342015-06-23 Richard Sandiford <richard.sandiford@arm.com>
6635
6636 * c-common.c: Don't include target-def.h.
6637
a68ae2e1
MP
66382015-06-23 Marek Polacek <polacek@redhat.com>
6639
6640 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
6641 when comparing INTEGER_CSTs.
6642
c6a2f2d9
PMR
66432015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
6644
6645 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
6646 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
6647 (dump_ada_template): Skip partially specialized types.
6648
6b4db501
MM
66492015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
6650
6651 * c-common.c (scalar_to_vector): Use std::swap instead of manually
6652 swapping.
6653
abb226c9
AM
66542015-06-17 Andrew MacLeod <amacleod@redhat.com>
6655
6656 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
6657 * c-ada-spec.c: Likewise.
6658 * c-cilkplus.c: Likewise.
6659 * c-common.c: Likewise.
6660 * c-common.h: Likewise.
6661 * c-cppbuiltin.c: Likewise.
6662 * c-dump.c: Likewise.
6663 * c-format.c: Likewise.
6664 * c-gimplify.c: Likewise.
6665 * c-indentation.c: Likewise.
6666 * c-lex.c: Likewise.
6667 * c-omp.c: Likewise.
6668 * c-opts.c: Likewise.
6669 * c-pch.c: Likewise.
6670 * c-ppoutput.c: Likewise.
6671 * c-pragma.c: Likewise.
6672 * c-pretty-print.c: Likewise.
6673 * c-semantics.c: Likewise.
6674 * c-ubsan.c: Likewise.
6675 * cilk.c: Likewise.
6676 * stub-objc.c: Likewise.
6677
076fecad
PP
66782015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
6679
6680 PR c++/65168
6681 * c-common.c (c_common_truthvalue_conversion): Warn when
6682 converting an address of a reference to a truth value.
6683
13fdf2e2
AM
66842015-06-08 Andrew MacLeod <amacleod@redhat.com>
6685
6686 * array-notation-common.c : Adjust include files.
6687 * c-ada-spec.c : Likewise.
6688 * c-cilkplus.c : Likewise.
6689 * c-common.c : Likewise.
6690 * c-common.h : Likewise.
6691 * c-cppbuiltin.c : Likewise.
6692 * c-dump.c : Likewise.
6693 * c-format.c : Likewise.
6694 * c-gimplify.c : Likewise.
6695 * c-indentation.c : Likewise.
6696 * c-lex.c : Likewise.
6697 * c-omp.c : Likewise.
6698 * c-opts.c : Likewise.
6699 * c-pch.c : Likewise.
6700 * c-ppoutput.c : Likewise.
6701 * c-pragma.c : Likewise.
6702 * c-pretty-print.c : Likewise.
6703 * c-semantics.c : Likewise.
6704 * c-ubsan.c : Likewise.
6705 * cilk.c : Likewise.
6706 * stub-objc.c : Likewise.
6707
a1661b90
MP
67082015-06-08 Marek Polacek <polacek@redhat.com>
6709
6710 PR c/66415
6711 * c-format.c (location_from_offset): Return LOC if LINE is null.
6712
d7438551
AH
67132015-06-05 Aldy Hernandez <aldyh@redhat.com>
6714
6715 * c-common.h (c_parse_final_cleanups): New prototype.
6716 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
6717
b3d5bc62
JJ
67182015-06-04 Sriraman Tallam <tmsriram@google.com>
6719
6720 * c-common.c (noplt): New attribute.
6721 (handle_noplt_attribute): New handler.
6722
ecb9f223
AM
67232015-06-04 Andrew MacLeod <amacleod@redhat.com>
6724
6725 * array-notation-common.c: Adjust includes for restructured coretypes.h.
6726 * c-ada-spec.c: Likewise.
6727 * c-cilkplus.c: Likewise.
6728 * c-common.c: Likewise.
6729 * c-common.h: Likewise.
6730 * c-cppbuiltin.c: Likewise.
6731 * c-dump.c: Likewise.
6732 * c-format.c: Likewise.
6733 * c-gimplify.c: Likewise.
6734 * c-indentation.c: Likewise.
6735 * c-lex.c: Likewise.
6736 * c-omp.c: Likewise.
6737 * c-opts.c: Likewise.
6738 * c-pch.c: Likewise.
6739 * c-ppoutput.c: Likewise.
6740 * c-pragma.c: Likewise.
6741 * c-pretty-print.c: Likewise.
6742 * c-semantics.c: Likewise.
6743 * c-ubsan.c: Likewise.
6744 * cilk.c: Likewise.
6745 * stub-objc.c: Likewise.
6746
6ac48155
DM
67472015-06-02 David Malcolm <dmalcolm@redhat.com>
6748
6749 PR c/66220:
6750 * c-indentation.c (should_warn_for_misleading_indentation): Use
6751 expand_location rather than expand_location_to_spelling_point.
6752 Don't warn if the guarding statement is more indented than the
6753 next/body stmts.
6754
773ce42e
DM
67552015-06-02 David Malcolm <dmalcolm@redhat.com>
6756
6757 * c-indentation.c (warn_for_misleading_indentation): Bail out
6758 immediately if -Wmisleading-indentation isn't enabled.
6759
4fef8379
ML
67602015-06-01 Martin Liska <mliska@suse.cz>
6761
6762 * c-format.c (check_format_arg):Use new type-based pool allocator.
6763 (check_format_info_main) Likewise.
6764
1edfb384
EB
67652015-05-31 Eric Botcazou <ebotcazou@adacore.com>
6766
6767 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
6768 (has_nontrivial_methods): Likewise.
6769
9677ef52
MP
67702015-05-25 Marek Polacek <polacek@redhat.com>
6771
6772 * c-ubsan.c (ubsan_instrument_shift): Use type0.
6773
fd5c817a
MP
67742015-05-22 Marek Polacek <polacek@redhat.com>
6775
6776 PR c/47043
6777 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
6778
a2f45fe6 67792015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
6780
6781 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
6782 STACK_GROWS_DOWNWARD.
6783
a2f45fe6 67842015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
6785
6786 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
6787 STACK_GROWS_DOWNWARD rather than if it is defined.
6788
0fee2ac2 67892015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 6790
0fee2ac2
MLI
6791 PR c/52952
6792 * c-format.c (location_column_from_byte_offset): New.
6793 (location_from_offset): New.
6794 (struct format_wanted_type): Add offset_loc field.
6795 (check_format_info): Move handling of location for extra arguments
6796 closer to the point of warning.
6797 (check_format_info_main): Pass the result of location_from_offset
6798 to warning_at.
6799 (format_type_warning): Pass the result of location_from_offset
6800 to warning_at.
6801
cf4ef6f7
MP
68022015-05-20 Marek Polacek <polacek@redhat.com>
6803
6804 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
6805
3a65ee74
MP
68062015-05-20 Marek Polacek <polacek@redhat.com>
6807
6808 * c-ada-spec.c (dump_sloc): Use DECL_P.
6809
21b634ae
MP
68102015-05-20 Marek Polacek <polacek@redhat.com>
6811
6812 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
6813 * c-common.c: Likewise.
6814
0e50b624
DM
68152015-05-19 David Malcolm <dmalcolm@redhat.com>
6816
6817 * c-common.h (fe_file_change): Strengthen param from
6818 const line_map * to const line_map_ordinary *.
6819 (pp_file_change): Likewise.
6820 * c-lex.c (fe_file_change): Likewise.
6821 (cb_define): Use linemap_check_ordinary when invoking
6822 SOURCE_LINE.
6823 (cb_undef): Likewise.
6824 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
6825 invoking cb_file_change.
6826 (c_finish_options): Likewise.
6827 (push_command_line_include): Likewise.
6828 (cb_file_change): Strengthen param "new_map" from
6829 const line_map * to const line_map_ordinary *.
6830 * c-ppoutput.c (cb_define): Likewise for local "map".
6831 (pp_file_change): Likewise for param "map" and local "from".
6832
fab27f52
MM
68332015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
6834
6835 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
6836
2fe1d762
TV
68372015-05-18 Tom de Vries <tom@codesourcery.com>
6838
6839 * c-common.c (build_va_arg_1): New function.
6840 (build_va_arg): Add address operator to va_list operand if necessary.
6841
7a37fa90
MM
68422015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
6843
6844 PR c/48956
6845 * c-common.c (int_safely_convertible_to_real_p): Define.
6846 (unsafe_conversion_p): Check conversions involving complex types.
6847 (conversion_warning): Add new warning message for conversions which
6848 discard imaginary component.
6849 * c-common.h: (enum conversion_safety): Add new enumerator for such
6850 conversions.
6851
3aa3c9fc
MP
68522015-05-14 Marek Polacek <polacek@redhat.com>
6853
6854 PR c/66066
6855 PR c/66127
6856 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
6857 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
6858 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
6859 use it. If FOR_INT_CONST, require that all evaluated operands be
6860 INTEGER_CSTs.
6861
c3388e62
DM
68622015-05-12 David Malcolm <dmalcolm@redhat.com>
6863
6864 * c-common.h (warn_for_misleading_indentation): New prototype.
6865 * c-indentation.c: New file.
6866 * c.opt (Wmisleading-indentation): New option.
6867
c7b38fd5
TV
68682015-05-12 Tom de Vries <tom@codesourcery.com>
6869
6870 PR tree-optimization/66010
6871 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
6872
381bf11e
JM
68732015-05-09 Jason Merrill <jason@redhat.com>
6874
edff0c06
JM
6875 * c-opts.c (c_common_post_options): Also clear
6876 cpp_opts->cpp_warn_cxx11_compat.
6877
129211bc
JM
6878 * c-common.h (enum cxx_dialect): Add cxx_unset.
6879 * c-common.c (cxx_dialect): Initialize to cxx_unset.
6880 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
6881
381bf11e
JM
6882 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
6883 (std=gnu++0x): Mark as Undocumented.
6884 (std=gnu++1y): Add deprecated message.
6885
fe191308
JM
68862015-05-08 Jason Merrill <jason@redhat.com>
6887
765189ff
JM
6888 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
6889 * c-opts.c: Adjust.
6890
fe191308
JM
6891 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
6892
755e528f
MP
68932015-05-08 Marek Polacek <polacek@redhat.com>
6894
6895 PR c/64918
6896 * c.opt (Woverride-init-side-effects): New option.
6897
0173bd2a
MP
68982015-05-07 Marek Polacek <polacek@redhat.com>
6899
6900 PR c/65179
6901 * c-common.c (c_fully_fold_internal): Warn when left shifting a
6902 negative value.
6903 * c.opt (Wshift-negative-value): New option.
6904 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
6905 when -Wextra and C99/C++11 mode.
6906
e0f0d3b9
MP
69072015-05-07 Marek Polacek <polacek@redhat.com>
6908 Martin Uecker <uecker@eecs.berkeley.edu>
6909
6910 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
6911 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
6912
8243e2a9
JM
69132015-05-05 Jason Merrill <jason@redhat.com>
6914
6915 * c.opt (Wterminate): New.
6916
577cd070
MP
69172015-04-30 Marek Polacek <polacek@redhat.com>
6918
6919 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
6920 require that the non-constant be of a boolean type.
6921
0373796b
JT
69222015-04-29 Josh Triplett <josh@joshtriplett.org>
6923
e0f0d3b9
MP
6924 * c-common.c (handle_section_attribute): Refactor to reduce
6925 nesting and distinguish between error cases.
0373796b 6926
716c0ba6
MP
69272015-04-29 Marek Polacek <polacek@redhat.com>
6928
6929 PR c/64610
6930 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
6931 with 0/1.
6932
8848828b
JJ
69332015-04-29 Jakub Jelinek <jakub@redhat.com>
6934
6935 * c-common.h (omp_clause_mask): Unconditionally define as a class.
6936 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
6937 HOST_BITS_PER_WIDE_INT.
6938
ecd0e562
TV
69392015-04-28 Tom de Vries <tom@codesourcery.com>
6940
6941 PR tree-optimization/65887
6942 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
6943
2a877204 69442015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 6945 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
6946
6947 * c-ada-spec.c (in_function): Delete.
6948 (dump_generic_ada_node): Do not change in_function and remove the
6949 redundant code dealing with it.
6950 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
6951 (print_ada_methods): Output the static member functions in a nested
6952 package after the regular methods as well as associated renamings.
6953
4853031e
MP
69542015-04-24 Marek Polacek <polacek@redhat.com>
6955
6956 PR c/65830
6957 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
6958 and OPT_Wshift_count_overflow.
6959
8c2b7f79
MP
6960 PR c/63357
6961 * c-common.c (warn_logical_operator): Warn if the operands have the
6962 same expressions.
6963
b8787813
MP
69642015-04-24 Marek Polacek <polacek@redhat.com>
6965
6966 PR c/61534
6967 * c-common.c (warn_logical_operator): Bail if either operand comes
6968 from a macro expansion.
6969
8fba1830
BRF
69702015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
6971
6972 PR target/55143
6973 * c-common.c (c_default_pointer_mode): Add definition.
6974 * c-common.h (c_default_pointer_mode): Add declaration.
6975
17958621
JJ
69762015-03-11 Jakub Jelinek <jakub@redhat.com>
6977
6978 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
6979 on record_builtin_type argument.
6980
7ccb1a11
JJ
69812015-03-10 Jakub Jelinek <jakub@redhat.com>
6982
6983 PR c/65120
6984 * c-common.c (warn_logical_not_parentheses): Don't warn for
6985 !x == 0 or !x != 0.
6986
04fd785e
MP
69872015-03-07 Marek Polacek <polacek@redhat.com>
6988
6989 PR sanitizer/65280
6990 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
6991 before trying to figure out whether we have a flexible array member.
6992
a4e26206 69932015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 6994 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
6995
6996 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
6997
0d2489f4
EB
69982015-03-05 Eric Botcazou <ebotcazou@adacore.com>
6999
7000 PR ada/65319
7001 * c-ada-spec.c (print_destructor): Remove obsolete code.
7002
83ed54d7
EB
70032015-03-01 Eric Botcazou <ebotcazou@adacore.com>
7004
7005 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
7006 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
7007 DECL_TEMPLATE_RESULT emulations.
7008 (dump_ada_template)): Add guard for TYPE_METHODS.
7009
7631f0e2
MP
70102015-02-27 Marek Polacek <polacek@redhat.com>
7011
7012 PR c/65040
7013 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
7014
d1783ae5
KT
70152015-02-27 Kai Tietz <ktietz@redhat.com>
7016
7017 PR c/35330
7018 * c-pragma.c (handle_pragma_weak): Do not try to create
7019 weak/alias of declarations not being function, or variable
7020 declarations.
7021
56a9f6bc
TS
70222015-02-24 Thomas Schwinge <thomas@codesourcery.com>
7023
7024 PR libgomp/64625
7025 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
7026 Remove macros.
7027 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
7028
3d5cb23d
MP
70292015-02-16 Marek Polacek <polacek@redhat.com>
7030
7031 PR c/65066
7032 * c-format.c (check_format_types): Handle null param.
7033
fa008882
MP
70342015-02-13 Marek Polacek <polacek@redhat.com>
7035
7036 PR c/65040
7037 * c-format.c (check_format_types): Don't warn about different
7038 signedness if the original value is in the range of WANTED_TYPE.
7039
785f21af
JM
70402015-02-12 Jason Merrill <jason@redhat.com>
7041
7042 PR c++/64956
7043 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
7044 to the current highest version.
7045 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
7046
4886ec8e
JJ
70472015-02-04 Jakub Jelinek <jakub@redhat.com>
7048
7049 PR c/64824
7050 PR c/64868
7051 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
7052 instead of RDIV_EXPR. Use build_binary_op instead of
7053 build2_loc.
7054
40fecdd6
JM
70552015-01-30 Joseph Myers <joseph@codesourcery.com>
7056
7057 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
7058 to pass input_location as first argument.
7059
a0c88d06
TV
70602015-01-23 Tom de Vries <tom@codesourcery.com>
7061
7062 PR libgomp/64672
7063 * c.opt (fopenacc): Mark as LTO option.
7064
1506ae0e
TV
70652015-01-23 Tom de Vries <tom@codesourcery.com>
7066
7067 PR libgomp/64707
7068 * c.opt (fopenmp): Mark as LTO option.
7069
31be63ab
JJ
70702015-01-21 Jakub Jelinek <jakub@redhat.com>
7071
7072 PR c/63307
b1726d6c 7073 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
7074 (compare_decls): Fix up formatting.
7075
70762015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
7077
7078 PR c/63307
7079 * cilk.c: Include vec.h.
7080 (struct cilk_decls): New structure.
7081 (wrapper_parm_cb): Split this function to...
7082 (fill_decls_vec): ...this...
7083 (create_parm_list): ...and this.
7084 (compare_decls): New function.
7085 (for_local_cb): Remove.
7086 (wrapper_local_cb): Ditto.
7087 (build_wrapper_type): For now first traverse and fill vector of
7088 declarations then sort it and then deal with sorted vector.
7089 (cilk_outline): Ditto.
7090 (declare_one_free_variable): Ditto.
7091
6875457f
JM
70922015-01-21 Jason Merrill <jason@redhat.com>
7093
7094 PR c++/64629
7095 * c-format.c (check_format_arg): Call decl_constant_value.
7096
185c9e56
ML
70972015-01-19 Martin Liska <mliska@suse.cz>
7098
7099 * c-common.c (handle_noicf_attribute): New function.
7100
41dbbb37
TS
71012015-01-15 Thomas Schwinge <thomas@codesourcery.com>
7102 Bernd Schmidt <bernds@codesourcery.com>
7103 James Norris <jnorris@codesourcery.com>
7104 Cesar Philippidis <cesar@codesourcery.com>
7105 Ilmir Usmanov <i.usmanov@samsung.com>
7106 Jakub Jelinek <jakub@redhat.com>
7107
7108 * c.opt (fopenacc): New option.
7109 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
7110 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
7111 New macros.
7112 * c-common.h (c_finish_oacc_wait): New prototype.
7113 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
7114 (c_finish_oacc_wait): New function.
7115 * c-pragma.c (oacc_pragmas): New variable.
7116 (c_pp_lookup_pragma, init_pragma): Handle it.
7117 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
7118 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
7119 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
7120 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
7121 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
7122 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
7123 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
7124 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
7125 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
7126 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
7127 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
7128 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
7129 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
7130 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
7131 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
7132 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
7133 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
7134 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
7135 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
7136 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
7137 PRAGMA_OACC_CLAUSE_WORKER.
7138
3f8257db 71392015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
7140
7141 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
7142 for the new option fstack-protector_explicit.
7143 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
7144 (handle_stack_protect_attribute): New function.
7145
3f8257db 71462015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
7147
7148 * c.opt: New option -Warray-bounds=.
7149
adfac8df
JJ
71502015-01-09 Michael Collison <michael.collison@linaro.org>
7151
7152 * array-notation-common.c: Include hash-set.h, machmode.h,
7153 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7154 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
7155 * c-ada-spec.c: Ditto.
7156 * c-cilkplus.c: Ditto.
7157 * c-common.c: Include input.h due to flattening of tree.h.
7158 Define macro GCC_C_COMMON_C.
7159 * c-common.h: Flatten tree.h header files into c-common.h.
7160 Remove include of tree-core.h.
7161 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
7162 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7163 fold-const.h, wide-int.h, and inchash.h due to
7164 flattening of tree.h.
7165 * c-dump.c: Ditto.
7166 * c-format.c: Flatten tree.h header files into c-common.h.
7167 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
7168 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7169 fold-const.h, wide-int.h, and inchash.h due to
7170 flattening of tree.h.
7171 * c-dump.c: Include hash-set.h, machmode.h,
7172 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7173 fold-const.h, wide-int.h, and inchash.h due to
7174 flattening of tree.h.
7175 * c-format.c: Include hash-set.h, machmode.h,
7176 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7177 fold-const.h, wide-int.h, inchash.h and real.h due to
7178 flattening of tree.h.
7179 * c-gimplify.c: Include hash-set.h, machmode.h,
7180 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7181 fold-const.h, wide-int.h, and inchash.h due to
7182 flattening of tree.h.
7183 * cilk.c: Ditto.
7184 * c-lex.c: Ditto.
7185 * c-omp.c: Ditto.
7186 * c-opts.c: Ditto.
7187 * c-pch.c: Ditto.
7188 * c-ppoutput.c: Ditto.
7189 * c-pragma.c: Ditto.
7190 * c-pretty-print.c: Ditto.
7191 * c-semantics.c: Ditto.
7192 * c-ubsan.c: Ditto.
7193 * stub-objc.c: Ditto.
7194
f5481fc4
JM
71952015-01-08 Jason Merrill <jason@redhat.com>
7196
7197 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
7198 do_ubsan_in_current_function.
7199 (ubsan_maybe_instrument_reference_or_call): Likewise.
7200 * c-ubsan.h: Declare it.
7201
de35aa66
MS
72022015-01-08 Mike Stump <mikestump@comcast.net>
7203
7204 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
7205
4a9a42ab
MP
72062015-01-07 Marek Polacek <polacek@redhat.com>
7207
7208 PR c/64440
7209 * c-common.c (c_fully_fold_internal): Warn for division and modulo
7210 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
7211
2f42e5de
TS
72122015-01-05 Trevor Saunders <tsaunders@mozilla.com>
7213
7214 PR c++/31397
7215 * c.opt (Wsuggest-override): New option.
7216
5624e564
JJ
72172015-01-05 Jakub Jelinek <jakub@redhat.com>
7218
7219 Update copyright years.
7220
5bd012f8
MP
72212015-01-05 Marek Polacek <polacek@redhat.com>
7222
7223 PR c/64423
7224 * c-common.c (warn_array_subscript_with_type_char): Add location_t
7225 parameter. Use it.
7226 * c-common.h (warn_array_subscript_with_type_char): Update
7227 declaration.
7228
a7fa8d18
ESR
72292014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
7230
7231 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
7232 Control macro with flag_sized_deallocation.
7233
3f8257db 72342014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
7235
7236 * c.opt (Wdiscarded-array-qualifiers): New option.
7237
1f8d3e84
JJ
72382014-12-19 Jakub Jelinek <jakub@redhat.com>
7239
7240 PR preprocessor/63831
7241 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
7242 and __has_cpp_attribute here.
7243 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
7244 c_common_has_attribute.
7245 * c-common.h (c_common_has_attribute): New prototype.
7246 * c-lex.c (init_c_lex): Set cb->has_attribute to
7247 c_common_has_attribute instead of cb_has_attribute.
7248 (get_token_no_padding): New function.
7249 (cb_has_attribute): Renamed to ...
7250 (c_common_has_attribute): ... this. No longer static. Use
7251 get_token_no_padding, require ()s, don't build TREE_LIST
7252 unnecessarily, fix up formatting, adjust diagnostics, call
7253 init_attributes.
7254
20b06add
JM
72552014-12-15 Jason Merrill <jason@redhat.com>
7256
7257 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
7258 (-Wsized-deallocation): New.
7259 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
7260 to on in C++14 and up.
7261
94a073b2
JM
72622014-12-11 Jason Merrill <jason@redhat.com>
7263
acaa5911
JM
7264 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
7265
94a073b2
JM
7266 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
7267 we aren't complaining about VLAs.
7268
7fb66c15
MP
72692014-12-06 Marek Polacek <polacek@redhat.com>
7270
7271 PR tree-optimization/64183
7272 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
7273 shift-expression if it is integer_type_node. Use types_compatible_p.
7274
b731b390
JJ
72752014-11-29 Jakub Jelinek <jakub@redhat.com>
7276
7277 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
7278 last argument from create_tmp_var_raw and create_tmp_var calls.
7279 * cilk.c (gimplify_cilk_spawn): Likewise.
7280 * c-omp.c (c_finish_omp_atomic): Likewise.
7281
6a4da643
MP
72822014-11-28 Marek Polacek <polacek@redhat.com>
7283
7284 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
7285 instead of unsigned_type_node.
7286
541e35a6
MP
72872014-11-28 Marek Polacek <polacek@redhat.com>
7288
7289 PR c/63862
7290 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
7291 to op1_utype.
7292 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
7293 expression to unsigned_type_node.
7294
dcc97066
MW
72952014-11-20 Mark Wielaard <mjw@redhat.com>
7296
7297 PR debug/38757
7298 * c-opts.c (set_std_c89): Set lang_hooks.name.
7299 (set_std_c99): Likewise.
7300 (set_std_c11): Likewise.
7301 (set_std_cxx98): Likewise.
7302 (set_std_cxx11): Likewise.
7303 (set_std_cxx14): Likewise.
7304 (set_std_cxx1z): Likewise.
7305
aa7da51a
JJ
73062014-11-21 Jakub Jelinek <jakub@redhat.com>
7307
7308 PR target/63764
7309 * c-common.h (convert_vector_to_pointer_for_subscript): Change
7310 return type to bool.
009a3480 7311 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
7312 (convert_vector_to_pointer_for_subscript): Change return type to
7313 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
7314 and copy it into a TARGET_EXPR and use that instead of *vecp
7315 directly.
7316
538dd0b7
DM
73172014-11-19 David Malcolm <dmalcolm@redhat.com>
7318
7319 Merger of git branch "gimple-classes-v2-option-3".
7320 * ChangeLog.gimple-classes: New.
7321 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
7322 from being just a vec<gimple> to a vec<gbind *>.
7323
c39a5e99
JJ
73242014-11-18 Jakub Jelinek <jakub@redhat.com>
7325
7326 PR sanitizer/63813
7327 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
7328 argument to ptype, set type to TREE_TYPE (ptype). Don't call
7329 get_pointer_alignment for non-pointers. Use ptype, or if it is
7330 reference type, corresponding pointer type, as type of kind
7331 argument.
7332 (ubsan_maybe_instrument_reference,
7333 ubsan_maybe_instrument_member_call): Adjust callers.
7334
8537a4a9
MP
73352014-11-15 Marek Polacek <polacek@redhat.com>
7336
7337 PR middle-end/63884
7338 * array-notation-common.c (is_sec_implicit_index_fn): Return false
7339 for NULL fndecl.
7340 (extract_array_notation_exprs): Return for NULL node.
7341
2079956a
JM
73422014-11-12 Joseph Myers <joseph@codesourcery.com>
7343
7344 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
7345 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
7346
1304953e
JJ
73472014-11-12 Jakub Jelinek <jakub@redhat.com>
7348
7349 PR c/59708
7350 * c-common.c (check_builtin_function_arguments): Handle
7351 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
7352
e5e44252
AK
73532014-11-10 Andi Kleen <ak@linux.intel.com>
7354
7355 PR c/60804
7356 * c-common.h (check_no_cilk): Declare.
7357 * cilk.c (get_error_location): New function.
7358 (check_no_cilk): Dito.
7359
e64b984d
AK
73602014-11-10 Andi Kleen <ak@linux.intel.com>
7361
7362 * cilk.c (recognize_spawn): Use expression location
7363 for error message.
7364
13c21655
PC
73652014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
7366
7367 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
7368
42fd12b1
ESR
73692014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
7370
7371 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
7372 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
7373 (__cpp_range_based_for, __cpp_initializer_lists,
7374 __cpp_delegating_constructors, __cpp_nsdmi,
7375 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
7376 for C++11; (__cpp_attribute_deprecated): Remove in favor of
7377 __has_cpp_attribute.
7378 * c-lex.c (cb_has_attribute): New callback CPP function;
7379 (init_c_lex): Set has_attribute callback.
7380
6f450181
RB
73812014-11-04 Richard Biener <rguenther@suse.de>
7382
7383 * c-common.c (shorten_compare): Do not shorten mixed
7384 DFP and non-DFP compares.
7385
26f0e1d6
ESR
73862014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
7387
7388 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
7389 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
7390 Commentary and rearrangement of tests.
7391 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
7392 Commentary and rearrangement of tests.
ab20d992 7393 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
26f0e1d6
ESR
7394 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
7395
ef4bddc2
RS
73962014-10-29 Richard Sandiford <richard.sandiford@arm.com>
7397
7398 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
7399 enum from machine_mode.
7400
c582198b
AM
74012014-10-28 Andrew MacLeod <amacleod@redhat.com>
7402
adfac8df
JJ
7403 * c-common.c: Adjust include files.
7404 * c-gimplify.c: Ditto.
7405 * cilk.c: Ditto.
7406 * c-pragma.c: Ditto.
7407 * c-ubsan.c: Ditto.
c582198b 7408
60393bbc
AM
74092014-10-27 Andrew MacLeod <amacleod@redhat.com>
7410
7411 * c-gimplify.c: Adjust include files.
7412
d723bb7c
MLI
74132014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
7414
7415 PR c++/53061
7416 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
7417 c_common_initialize_diagnostics.
7418 * c-common.h: Likewise.
7419
90f3520e
MP
74202014-10-24 Marek Polacek <polacek@redhat.com>
7421
7422 PR c/56980
7423 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
7424 print "struct"/"union"/"enum" for typedefed names.
7425
59d7607a
MP
74262014-10-23 Marek Polacek <polacek@redhat.com>
7427
7428 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
7429 in unsigned type.
7430
d95a2703
JJ
74312014-10-22 Jakub Jelinek <jakub@redhat.com>
7432 Yury Gribov <y.gribov@samsung.com>
7433
7434 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
7435 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
7436 instead of flag_sanitize_recover as bool flag.
7437
8e6ef852
KY
74382014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
7439
7440 * cilk.c: Revert previous change.
7441
948cf550
IZ
74422014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
7443
7444 PR c/63307
7445 * cilk.c: Include vec.h.
7446 (struct cilk_decls): New structure.
7447 (wrapper_parm_cb): Split this function to...
7448 (fill_decls_vec): ...this...
7449 (create_parm_list): ...and this.
7450 (compare_decls): New function.
7451 (for_local_cb): Remove.
7452 (wrapper_local_cb): Ditto.
7453 (build_wrapper_type): For now first traverse and fill vector of
7454 declarations then sort it and then deal with sorted vector.
7455 (cilk_outline): Ditto.
7456 (declare_one_free_variable): Ditto.
7457
92574c7c
MP
74582014-10-17 Marek Polacek <polacek@redhat.com>
7459
7460 * c-opts.c (c_common_post_options): Set warn_implicit_int.
7461 * c.opt (Wimplicit-int): Initialize to -1.
7462
83685514
AM
74632014-10-16 Andrew MacLeod <amacleod@redhat.com>
7464
7465 * c-pragma.c: Adjust include files.
7466 * c-semantics.c: Likewise.
7467
5b8300ea
DD
74682014-10-16 DJ Delorie <dj@redhat.com>
7469
7470 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
7471 multiples of bytes.
7472
5f83e90b
JM
74732014-10-14 Jason Merrill <jason@redhat.com>
7474
7475 PR c++/63455
7476 * c-common.h (CPP_PREPARSED_EXPR): New.
7477 (N_CP_TTYPES): Adjust.
7478
d73326ca
MP
74792014-10-15 Marek Polacek <polacek@redhat.com>
7480
7481 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
7482
78a7c317
DD
74832014-10-14 DJ Delorie <dj@redhat.com>
7484
7485 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
7486 types, not just __int128.
7487 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
7488 types, not just __int128.
7489 (cpp_atomic_builtins): Round pointer sizes up.
7490 (type_suffix): Use type precision, not specific types.
7491 * c-common.c (c_common_reswords): Remove __int128 special case.
7492 (c_common_type_for_size): Check for all __intN types, not just
7493 __int128.
7494 (c_common_type_for_mode): Likewise.
7495 (c_common_signed_or_unsigned_type): Likewise.
7496 (c_build_bitfield_integer_type): Likewise.
7497 (c_common_nodes_and_builtins): Likewise.
7498 (keyword_begins_type_specifier): Likewise.
7499 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
7500 __intN variants.
7501
2a22f99c
TS
75022014-10-12 Trevor Saunders <tsaunders@mozilla.com>
7503
7504 * c-common.c: Use hash_table instead of hashtab.
7505
2a8ef767
ESR
75062014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
7507
adfac8df 7508 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
7509 C++11 section.
7510
3c9aabbd
MG
75112014-10-03 Marc Glisse <marc.glisse@inria.fr>
7512
7513 PR c++/54427
7514 PR c++/57198
7515 PR c++/58845
7516 * c-common.c (warn_logical_operator): Punt for vectors.
7517
a15f7cb8
ESR
75182014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
7519
7520 Implement SD-6: SG10 Feature Test Recommendations
7521 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
7522 macros and the __has_header macro.
7523
8d0cf15e
JM
75242014-09-30 Jason Merrill <jason@redhat.com>
7525
dd5d5481
JM
7526 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
7527 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
7528 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
7529
b752325e
JM
7530 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
7531 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
7532
8d0cf15e
JM
7533 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
7534 * c-common.c (c_common_reswords): Remove __is_convertible_to.
7535
083e891e
MP
75362014-09-24 Marek Polacek <polacek@redhat.com>
7537
7538 PR c/61405
7539 PR c/53874
7540 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
7541
7861b648
AK
75422014-09-23 Andi Kleen <ak@linux.intel.com>
7543
7544 * c-common.c (handle_no_reorder_attribute): New function.
7545 (c_common_attribute_table): Add no_reorder attribute.
7546
9a79452d
JM
75472014-09-22 Joseph Myers <joseph@codesourcery.com>
7548
7549 * c-cppbuiltin.c (c_cpp_builtins): Define
7550 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
7551 modes.
7552
dd69f047
JM
75532014-09-18 Joseph Myers <joseph@codesourcery.com>
7554
7555 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
7556 for supported floating-point modes.
7557
737a4826
MLI
75582014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
7559
7560 * c.opt (Wpsabi): Use LangEnabledBy.
7561 * c-opts.c (c_common_handle_option): Do not handle here.
7562
8cc4b7a2
JM
75632014-09-12 Joseph Myers <joseph@codesourcery.com>
7564
7565 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
7566 macros for floating-point modes.
7567
179b5a55
MG
75682014-09-11 Marc Glisse <marc.glisse@inria.fr>
7569
7570 PR target/58757
7571 * c-cppbuiltin.c (builtin_define_float_constants): Correct
7572 __*_DENORM_MIN__ without denormals.
7573
570a11fe
JJ
75742014-09-10 Jakub Jelinek <jakub@redhat.com>
7575
7576 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
7577 ubsan_instrument_vla, ubsan_instrument_return): Adjust
7578 ubsan_create_data callers.
7579 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
7580 index is constant or BIT_AND_EXPR with constant mask and is
7581 small enough for the bound.
7582 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
7583 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
7584
b559c810
MLI
75852014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7586
7587 * c.opt: Add CppReason to various flags.
7588 (Wdate-time): Re-sort.
7589 * c-common.c: Include c-common.h earlier.
7590 (struct reason_option_codes_t): Delete.
7591 (c_option_controlling_cpp_error): Prefix global type and struct
7592 with cpp_.
7593
1ef33fd4
MLI
75942014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7595
7596 * c.opt (Wnormalized): New.
7597 (Wnormalized=): Use Enum and Reject Negative.
7598 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
7599
66bb34c0
JM
76002014-09-08 Joseph Myers <joseph@codesourcery.com>
7601
7602 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
7603 digits of floating-point modes if -fbuilding-libgcc.
7604
53d68b9f
JM
76052014-09-05 Joseph Myers <joseph@codesourcery.com>
7606
7607 * c-cppbuiltin.c (c_cpp_builtins): Also define
7608 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
7609 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
7610 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
7611 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
7612 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
7613 __LIBGCC_STACK_GROWS_DOWNWARD__,
7614 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
7615 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
7616 __LIBGCC_DWARF_FRAME_REGISTERS__,
7617 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
7618 __LIBGCC_STACK_POINTER_REGNUM__ and
7619 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
7620 (builtin_define_with_value): Handle backslash-escaping in string
7621 macro values.
7622
f65586dc
RB
76232014-09-05 Richard Biener <rguenther@suse.de>
7624
7625 PR middle-end/63148
7626 * c-format.c (check_format_arg): Properly handle
7627 effectively signed POINTER_PLUS_EXPR offset.
7628
2b71f4a4
MLI
76292014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
7630
7631 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
7632 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
7633 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
7634 and Init.
7635 * c-opts.c (c_common_handle_option): Do not handle here.
7636 (sanitize_cpp_opts): Likewise.
7637 * c-common.c (struct reason_option_codes_t): Handle
7638 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
7639
d2e4feca
MP
76402014-09-03 Marek Polacek <polacek@redhat.com>
7641
7642 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
7643
9a771876
JJ
76442014-09-02 Jakub Jelinek <jakub@redhat.com>
7645 Balaji V. Iyer <balaji.v.iyer@intel.com>
7646 Igor Zamyatin <igor.zamyatin@intel.com>
7647
7648 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
7649 * c-common.c (c_common_reswords): Added _Cilk_for.
7650 * c-common.h (enum rid): Added RID_CILK_FOR.
7651 (cilk_for_number_of_iterations): Add declaration.
7652 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
7653 CILK_FOR.
7654 * c-pragma.c (init_pragma): Register "grainsize" pragma.
7655 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
7656
81b5d104
MLI
76572014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7658
7659 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
7660 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
7661 Wundef): Use CPP, Var and Init.
7662 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
7663
b753b37b
MLI
76642014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7665
7666 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
7667 * c-opts.c (c_common_handle_option): Do not handle here.
7668
028aee17
JM
76692014-08-25 Jason Merrill <jason@redhat.com>
7670
7671 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
7672 -std=c++14 and -std=gnu++14, rather than the reverse.
7673 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
7674 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
7675 * c-common.h (cxx_dialect): Remove cxx1y.
7676
e4276ba5
ESR
76772014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
7678
7679 * c-common.h (enum cxx_dialect): Add cxx14.
7680 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
7681 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
7682 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
7683
a545cacd
JM
76842014-08-22 Jason Merrill <jason@redhat.com>
7685
7686 * c.opt (std=gnu++17): Fix alias.
7687
59ea0364
MP
76882014-08-22 Marek Polacek <polacek@redhat.com>
7689
7690 PR c++/62199
7691 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
7692 check for vector types. Drop LHS argument.
7693 * c-common.h (warn_logical_not_parentheses): Adjust.
7694
596e808c
MLI
76952014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
7696
7697 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
7698 (Wmultichar): Likewise.
7699 (Wdate-time): Use C-family languages instead of Common. Use CPP
7700 and Var.
7701 * c-opts.c (c_common_handle_option): Do not handle the above
7702 options here.
7703 (sanitize_cpp_opts): Likewise.
7704
18767f65
MLI
77052014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
7706
7707 PR fortran/44054
7708 * c-opts.c: Include tree-diagnostics.h.
7709 (c_diagnostic_finalizer): New.
7710 (c_common_initialize_diagnostics): Use it.
7711
b4413594
MLI
77122014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
7713
7714 PR preprocessor/51303
7715 * c-common.c (struct reason_option_codes_t option_codes):
7716 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
7717
43f9a13c
MLI
77182014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
7719
7720 PR c/60975
7721 PR c/53063
7722 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
7723 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
7724 (c_common_post_options): Call init_global_opts_from_cpp.
7725 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
7726
04159acf
MP
77272014-08-19 Marek Polacek <polacek@redhat.com>
7728
7729 PR c++/62153
7730 * c-common.c (maybe_warn_bool_compare): New function.
7731 * c-common.h (maybe_warn_bool_compare): Declare.
7732 * c.opt (Wbool-compare): New option.
7733
35aff4fb
MP
77342014-08-19 Marek Polacek <polacek@redhat.com>
7735
7736 * c.opt (Wc99-c11-compat): New option.
7737
177cce46
MP
77382014-08-19 Marek Polacek <polacek@redhat.com>
7739
7740 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
7741 to warn_c90_c99_compat.
7742 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
7743 to -1.
7744
6ae9194f
MLI
77452014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
7746 Steven Bosscher <steven@gcc.gnu.org>
7747
7748 PR c/52952
7749 * c-format.c: Add extra_arg_loc and format_string_loc to struct
7750 format_check_results.
7751 (check_function_format): Use true and add comment for boolean
7752 argument.
7753 (finish_dollar_format_checking): Use explicit location when warning.
7754 (check_format_info): Likewise.
7755 (check_format_arg): Set extra_arg_loc and format_string_loc.
7756 (check_format_info_main): Use explicit location when warning.
7757 (check_format_types): Pass explicit location.
7758 (format_type_warning): Likewise.
7759
8e54f6d3
MLI
77602014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
7761
7762 PR fortran/44054
7763 * c-format.c: Handle Fortran flags.
7764
cd4e76fc
IZ
77652014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
7766
7767 PR other/61962
7768 * array-notation-common.c (find_rank): Added handling for other
7769 types of references.
7770
f3bede71
MP
77712014-08-10 Marek Polacek <polacek@redhat.com>
7772
7773 PR c/51849
7774 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
7775 * c.opt (Wc90-c99-compat): Add option.
7776
9f25a338
TS
77772014-08-07 Trevor Saunders <tsaunders@mozilla.com>
7778
7779 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
7780
62e4eb35
MP
77812014-08-03 Marek Polacek <polacek@redhat.com>
7782
ab20d992 7783 * c-common.c (check_case_value): Add location_t parameter. Use it.
62e4eb35
MP
7784 (c_add_case_label): Pass loc to check_case_value.
7785
b787e7a2
TS
77862014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7787
7788 * cilk.c: Use hash_map instead of pointer_map.
7789
6e2830c3
TS
77902014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7791
7792 * c-gimplify.c: Use hash_set instead of pointer_set.
7793
a7ee52fb
IZ
77942014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
7795
7796 PR middle-end/61455
7797 * array-notation-common.c (extract_array_notation_exprs): Handling
7798 of DECL_EXPR added.
7799
944fa280
JJ
78002014-08-01 Jakub Jelinek <jakub@redhat.com>
7801
7802 * c-common.h (min_align_of_type): Removed prototype.
7803 * c-common.c (min_align_of_type): Removed.
7804 * c-ubsan.h (ubsan_maybe_instrument_reference,
7805 ubsan_maybe_instrument_member_call): New prototypes.
7806 * c-ubsan.c: Include stor-layout.h and builtins.h.
7807 (ubsan_maybe_instrument_reference_or_call,
7808 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
7809 functions.
7810
b4dfdc11
MG
78112014-07-31 Marc Glisse <marc.glisse@inria.fr>
7812
7813 PR c++/60517
7814 * c.opt (-Wreturn-local-addr): Move to common.opt.
7815
a41844e5
JM
78162014-07-30 Jason Merrill <jason@redhat.com>
7817
7818 PR c++/61659
7819 PR c++/61687
7820 Revert:
7821 * c.opt (-fuse-all-virtuals): New.
7822
976d5a22
TT
78232014-07-30 Tom Tromey <tromey@redhat.com>
7824
7825 PR c/59855
7826 * c.opt (Wdesignated-init): New option.
7827 * c-common.c (c_common_attribute_table): Add "designated_init".
7828 (handle_designated_init): New function.
7829
cdc94aca
MP
78302014-07-24 Marek Polacek <polacek@redhat.com>
7831
7832 PR c/57653
7833 * c-opts.c (c_finish_options): If -imacros is in effect, return.
7834
f41373b6
DS
78352014-07-16 Dodji Seketeli <dodji@redhat.com>
7836
7837 PR preprocessor/60723 - missing system-ness marks for macro tokens
7838 * c-ppoutput.c (struct print::prev_was_system_token): New data
7839 member.
7840 (init_pp_output): Initialize it.
7841 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
7842 (do_line_change): Return a flag saying if a line marker was
7843 emitted or not.
7844 (scan_translation_unit): Detect if the system-ness of the token we
7845 are about to emit is different from the one of the previously
7846 emitted token. If so, emit a line marker. Avoid emitting useless
7847 adjacent line markers. Avoid emitting line markers for tokens
7848 originating from the expansion of built-in macros.
7849 (scan_translation_unit_directives_only): Adjust.
7850
4d661eaa
MP
78512014-07-15 Marek Polacek <polacek@redhat.com>
7852
7853 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
7854 TYPE_MAX_VALUE is NULL.
7855
b108f48f
JJ
78562014-07-14 Jakub Jelinek <jakub@redhat.com>
7857
7858 PR middle-end/61294
7859 * c.opt (Wmemset-transposed-args): New warning.
7860
c0221884
JM
78612014-07-10 Jason Merrill <jason@redhat.com>
7862
7863 PR c++/61659
7864 PR c++/61687
7865 * c.opt (-fuse-all-virtuals): New.
7866
63dfbb95
RB
78672014-07-09 Richard Biener <rguenther@suse.de>
7868
7869 PR c-family/61741
7870 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
7871 using unsigned arithmetic if overflow does not wrap instead of
7872 if overflow is undefined.
7873
773ec47f
MP
78742014-07-06 Marek Polacek <polacek@redhat.com>
7875
7876 PR c/6940
7877 * c.opt (Wsizeof-array-argument): New option.
7878
00a7ba58
JJ
78792014-07-03 Jakub Jelinek <jakub@redhat.com>
7880
b1726d6c 7881 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
7882 comments->count <= 1, as comments->entries might be NULL.
7883
52ec0ea3
MP
78842014-07-01 Marek Polacek <polacek@redhat.com>
7885
7886 * c.opt (Wint-conversion): New option.
7887
d5c3d343
MP
78882014-07-01 Marek Polacek <polacek@redhat.com>
7889
7890 PR c/58286
7891 * c.opt (Wincompatible-pointer-types): New option.
7892
6e7ceb17
PC
78932014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
7894
7895 PR c++/51400
7896 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
7897 Do not discard TYPE_QUALS of type.
7898
da73100b
JM
78992014-06-26 Jason Merrill <jason@redhat.com>
7900
7901 * c-common.h (enum cxx_dialect): Add cxx1z.
7902 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
7903 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
7904
08eedf75
TJ
79052014-06-26 Teresa Johnson <tejohnson@google.com>
7906
7907 * c-common.h (get_dump_info): Declare.
7908 * c-gimplify.c (c_genericize): Use saved dump files.
7909 * c-opts.c (c_common_parse_file): Begin and end dumps
7910 once around parsing invocation.
7911 (get_dump_info): New function.
7912
7b56b2f8
MP
79132014-06-23 Marek Polacek <polacek@redhat.com>
7914 Andrew MacLeod <amacleod@redhat.com>
7915
7916 PR c/61553
7917 * c-common.c (get_atomic_generic_size): Don't segfault if the
7918 type doesn't have a size.
7919
0e37a2f3
MP
79202014-06-20 Marek Polacek <polacek@redhat.com>
7921
7922 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
7923 (ubsan_walk_array_refs_r): New function.
7924 (c_genericize): Instrument array bounds.
7925 * c-ubsan.c: Include "internal-fn.h".
7926 (ubsan_instrument_division): Mark instrumented arrays as having
7927 side effects. Adjust ubsan_type_descriptor call.
7928 (ubsan_instrument_shift): Likewise.
7929 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
7930 (ubsan_instrument_bounds): New function.
7931 (ubsan_array_ref_instrumented_p): New function.
7932 (ubsan_maybe_instrument_array_ref): New function.
7933 * c-ubsan.h (ubsan_instrument_bounds): Declare.
7934 (ubsan_array_ref_instrumented_p): Declare.
7935 (ubsan_maybe_instrument_array_ref): Declare.
7936
79372014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
7938
7939 PR lto/61123
7940 * c.opt (fshort-enums): Add to LTO.
7941 * c.opt (fshort-wchar): Likewise.
7942
5c3d09f7
MP
79432014-06-16 Marek Polacek <polacek@redhat.com>
7944
7945 PR c/60439
7946 * c.opt (Wswitch-bool): Add Var.
7947
9cf32741
JJ
79482014-06-12 Jakub Jelinek <jakub@redhat.com>
7949
7950 PR middle-end/61486
7951 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
7952 #pragma omp target teams or
7953 #pragma omp {,target }teams distribute simd.
7954
62984918
JM
79552014-06-12 Jason Merrill <jason@redhat.com>
7956
7957 * c.opt (Wabi=, fabi-compat-version): New.
7958 * c-opts.c (c_common_handle_option): Handle -Wabi=.
7959 (c_common_post_options): Handle flag_abi_compat_version default.
7960 Disallow -fabi-compat-version=1.
7961 * c-common.h (abi_version_crosses): New.
7962
f961457f
JH
79632014-06-11 Jan Hubicka <hubicka@ucw.cz>
7964
adfac8df 7965 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
7966 section names that are no longer trees.
7967
92d28cbb
JJ
79682014-06-10 Jakub Jelinek <jakub@redhat.com>
7969
7970 PR fortran/60928
7971 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
7972 (omp_pragmas): ... back here.
7973
742938c9
MP
79742014-06-05 Marek Polacek <polacek@redhat.com>
7975
7976 PR c/49706
7977 * c-common.c (warn_logical_not_parentheses): New function.
7978 * c-common.h (warn_logical_not_parentheses): Declare.
7979 * c.opt (Wlogical-not-parentheses): New option.
7980
9d548dfb
MP
79812014-06-04 Marek Polacek <polacek@redhat.com>
7982
7983 PR c/30020
7984 * c-common.c (check_case_bounds): Add location parameter.
7985 Use it.
7986 (c_add_case_label): Pass loc to check_case_bounds.
7987
fedfecef
MP
79882014-06-03 Marek Polacek <polacek@redhat.com>
7989
7990 PR c/60439
7991 * c.opt (Wswitch-bool): New option.
7992
f6a7cffc
TS
79932014-05-22 Thomas Schwinge <thomas@codesourcery.com>
7994
040d18b6
TS
7995 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
7996 Remove prototypes.
7997 (record_types_used_by_current_var_decl): Move prototype to where
7998 it belongs.
7999
f6a7cffc
TS
8000 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
8001 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
8002 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
8003
632f2871
RS
80042014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
8005
8006 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
8007 * c-common.c (c_common_nodes_and_builtins): Don't initialize
8008 void_zero_node.
8009 * c-pretty-print.c (pp_c_void_constant): New function.
8010 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
8011 (c_pretty_printer::expression): Handle VOID_CST.
8012 * cilk.c (extract_free_variables): Likewise.
8013 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
8014 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
8015
766090c2
TS
80162014-05-17 Trevor Saunders <tsaunders@mozilla.com>
8017
8018 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
8019 * c-pragma.c (push_alignment): Adjust.
8020 (handle_pragma_push_options): Likewise.
8021
661a0813
MP
80222014-05-09 Marek Polacek <polacek@redhat.com>
8023
8024 PR c/50459
8025 * c-common.c (check_user_alignment): Return -1 if alignment is error
8026 node.
8027 (handle_aligned_attribute): Don't call default_conversion on
8028 FUNCTION_DECLs.
8029 (handle_vector_size_attribute): Likewise.
8030 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
8031 (handle_sentinel_attribute): Call default_conversion and allow even
8032 integral types as an argument.
8033
2793eeab
MP
80342014-05-08 Marek Polacek <polacek@redhat.com>
8035
8036 PR c/61053
8037 * c-common.c (min_align_of_type): New function factored out from...
8038 (c_sizeof_or_alignof_type): ...here.
8039 * c-common.h (min_align_of_type): Declare.
8040
f827930a
MP
80412014-05-08 Marek Polacek <polacek@redhat.com>
8042
8043 PR c/61077
8044 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
8045 parameter type of main.
8046
ca49b74e
DD
80472014-05-07 DJ Delorie <dj@redhat.com>
8048
8049 * c-cppbuiltin.c (print_bits_of_hex): New.
8050 (builtin_define_type_minmax): Print values using hex so as not to
8051 require a pre-computed list of string values.
8052
1d60af08
KZ
80532014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
8054 Mike Stump <mikestump@comcast.net>
8055 Richard Sandiford <rdsandiford@googlemail.com>
8056
8057 * c-ada-spec.c: Include wide-int.h.
8058 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
8059 (dump_generic_ada_node): Use wide-int interfaces.
8060 * c-common.c: Include wide-int-print.h.
8061 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
8062 (pointer_int_sum): Use wide-int interfaces.
8063 (c_common_nodes_and_builtins): Use make_int_cst.
8064 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
8065 (handle_alloc_size_attribute): Use wide-int interfaces.
8066 (get_nonnull_operand): Likewise.
8067 * c-format.c (get_constant): Use tree_fits_uhwi_p.
8068 * c-lex.c: Include wide-int.h.
8069 (narrowest_unsigned_type): Take a widest_int rather than two
8070 HOST_WIDE_INTs.
8071 (narrowest_signed_type): Likewise.
8072 (interpret_integer): Update accordingly. Use wide-int interfaces.
8073 (lex_charconst): Use wide-int interfaces.
8074 * c-pretty-print.c: Include wide-int.h.
8075 (pp_c_integer_constant): Use wide-int interfaces.
8076 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
8077 INT_CST_LT_UNSIGNED.
8078
b15458be
RB
80792014-05-06 Richard Biener <rguenther@suse.de>
8080
8081 * c-opts.c (c_common_post_options): For -freestanding,
8082 -fno-hosted and -fno-builtin disable pattern recognition
8083 if not enabled explicitely.
8084
6577374e
MP
80852014-05-02 Marek Polacek <polacek@redhat.com>
8086
8087 * c.opt (Wsizeof-pointer-memaccess): Describe option.
8088
d00887e8
MP
80892014-05-01 Marek Polacek <polacek@redhat.com>
8090
8091 PR c/43245
8092 * c.opt (Wdiscarded-qualifiers): Add.
8093
f8ed5150
MP
80942014-04-30 Marek Polacek <polacek@redhat.com>
8095
8096 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
8097 INT_MIN / -1 sanitization only for integer types.
8098
45484dcf
MP
80992014-04-25 Marek Polacek <polacek@redhat.com>
8100
8101 PR c/18079
8102 * c-common.c (handle_noinline_attribute): Warn if the attribute
8103 conflicts with always_inline attribute.
8104 (handle_always_inline_attribute): Warn if the attribute conflicts
8105 with noinline attribute.
8106
38e514c0
MP
81072014-04-25 Marek Polacek <polacek@redhat.com>
8108
8109 PR c/60156
8110 * c-common.c (check_main_parameter_types): Warn about variadic main.
8111
44875f92
MS
81122014-04-24 Mike Stump <mikestump@comcast.net>
8113
8114 * c.opt (Wshadow-ivar): Default to on.
8115
dcaaa5a0
DP
81162014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
8117
8118 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
8119
c07d7c02
MP
81202014-04-23 Marek Polacek <polacek@redhat.com>
8121
8122 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
8123
1c33c9b7
JJ
81242014-04-22 Jakub Jelinek <jakub@redhat.com>
8125
8126 PR sanitizer/60275
8127 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
8128 if flag_sanitize_undefined_trap_on_error.
8129 (ubsan_instrument_division, ubsan_instrument_shift,
8130 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
8131 if !flag_sanitize_recover.
8132
793c625f
MG
81332014-04-22 Marc Glisse <marc.glisse@inria.fr>
8134
8135 PR libstdc++/43622
8136 * c-common.c (registered_builtin_types): Make non-static.
8137 * c-common.h (registered_builtin_types): Declare.
8138
b0f1bf36 81392014-04-14 Richard Biener <rguenther@suse.de>
ab20d992 8140 Marc Glisse <marc.glisse@inria.fr>
b0f1bf36
RB
8141
8142 PR c/60819
8143 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
8144 apply may-alias the scalar pointer type when applicable.
8145
3b07fa4a
IZ
81462014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
8147
8148 PR middle-end/60467
8149 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
8150 as possible argument for Cilk_spawn.
8151
cbbd2b1c
TB
81522014-04-11 Tobias Burnus <burnus@net-b.de>
8153
8154 PR c/60194
8155 * c.opt (Wformat-signedness): Add
8156 * c-format.c(check_format_types): Use it.
8157
6415bd5d
JM
81582014-04-11 Jason Merrill <jason@redhat.com>
8159
8160 PR c++/57926
8161 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
8162 default_conversion for an array argument.
8163
6525783a
MP
81642014-04-08 Marek Polacek <polacek@redhat.com>
8165
8166 PR sanitizer/60745
8167 * c-ubsan.c: Include asan.h.
8168 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
8169
880a467b
NS
81702014-04-03 Nathan Sidwell <nathan@codesourcery.com>
8171
8172 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
8173
7b59ff2d
MP
81742014-04-02 Marek Polacek <polacek@redhat.com>
8175
8176 * c-common.h (c_expand_expr): Remove declaration.
8177
8edbfaa6
JJ
81782014-03-28 Jakub Jelinek <jakub@redhat.com>
8179
8180 PR c++/60689
8181 * c-common.c (add_atomic_size_parameter): When creating new
8182 params vector, push the size argument first.
8183
07d72e1d
JJ
81842014-03-26 Jakub Jelinek <jakub@redhat.com>
8185
8186 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8187 ubsan_instrument_vla, ubsan_instrument_return): Adjust
8188 ubsan_create_data callers.
8189
b35e0fa0
JJ
81902014-03-22 Jakub Jelinek <jakub@redhat.com>
8191
8192 PR debug/60603
8193 * c-opts.c (c_finish_options): Restore cb_file_change call to
8194 <built-in>.
8195
39a1ebb3
JJ
81962014-03-13 Jakub Jelinek <jakub@redhat.com>
8197
8198 PR middle-end/36282
8199 * c-pragma.c (apply_pragma_weak): Only look at
8200 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
8201 DECL_ASSEMBLER_NAME_SET_P (decl).
8202 (maybe_apply_pending_pragma_weaks): Exit early if
8203 vec_safe_is_empty (pending_weaks) rather than only when
8204 !pending_weaks.
8205 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
8206 set assembler name back to NULL afterwards.
8207
a07f6ed2
JM
82082014-03-11 Jason Merrill <jason@redhat.com>
8209
8210 * c.opt: Add -std=gnu++14.
8211
75b107f5
IB
82122014-03-11 Ian Bolton <ian.bolton@arm.com>
8213
8214 * c-opts.c (c_common_post_options): Don't override
8215 -ffp-contract=fast if unsafe-math-optimizations is on.
8216
f42c637e
PM
82172014-03-08 Paulo Matos <paulo@matos-sorge.com>
8218
22b15758 8219 * c.opt: Enable LTO FE for fshort-double.
f42c637e 8220
70e24808
JM
82212014-03-07 Jason Merrill <jason@redhat.com>
8222
8223 * c.opt: Add -std=c++14.
8224
3af9c5e9
MP
82252014-03-06 Marek Polacek <polacek@redhat.com>
8226
8227 PR c/60197
8228 * cilk.c (contains_cilk_spawn_stmt): New function.
8229 (contains_cilk_spawn_stmt_walker): Likewise.
8230 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
8231 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
8232
b3bdf019
JJ
82332014-03-03 Jakub Jelinek <jakub@redhat.com>
8234
8235 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
8236 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
8237 even when flag_preprocess_only.
8238
ca7e759d
JM
82392014-02-26 Jason Merrill <jason@redhat.com>
8240
8241 PR c++/59231
8242 PR c++/11586
8243 * c-common.c (shorten_compare): Don't check
8244 c_inhibit_evaluation_warnings.
8245
28e41874
JJ
82462014-02-19 Jakub Jelinek <jakub@redhat.com>
8247
cca615af
JJ
8248 PR c/37743
8249 * c-common.c (c_common_nodes_and_builtins): When initializing
8250 c_uint{16,32,64}_type_node, also set corresponding
8251 uint{16,32,64}_type_node to the same value.
8252
28e41874
JJ
8253 PR c++/60267
8254 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
8255 for PRAGMA_IVDEP if flag_preprocess_only.
8256
c2bf53a1
JJ
82572014-02-12 Jakub Jelinek <jakub@redhat.com>
8258
8259 PR c/60101
8260 * c-common.c (merge_tlist): If copy is true, call new_tlist,
8261 if false, add ADD itself, rather than vice versa.
8262 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
8263 copy. For SAVE_EXPR, only call merge_tlist once.
8264
8fcbce72
JJ
82652014-02-08 Jakub Jelinek <jakub@redhat.com>
8266
8267 PR middle-end/60092
8268 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
8269 and tree_to_uhwi.
8270 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
8271 functions.
8272 (c_common_attribute_table): Add alloc_align and assume_aligned
8273 attributes.
8274
0a756a3f
MP
82752014-02-06 Marek Polacek <polacek@redhat.com>
8276
8277 PR c/60087
8278 * c-common.c (warn_for_sign_compare): Call warning_at with location
8279 instead of warning.
8280
7ec4847a
MP
82812014-02-05 Marek Polacek <polacek@redhat.com>
8282
8283 PR c/53123
8284 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
8285 statement.
8286
66f20604
MP
82872014-02-04 Marek Polacek <polacek@redhat.com>
8288
8289 PR c/60036
8290 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
8291 SAVE_EXPR.
8292
5d77fb19
MG
82932014-02-03 Marc Glisse <marc.glisse@inria.fr>
8294
8295 PR c++/53017
8296 PR c++/59211
8297 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
8298 handle_vector_size_attribute, handle_nonnull_attribute): Call
8299 default_conversion on the attribute argument.
8300 (handle_nonnull_attribute): Increment the argument number.
8301
81e5eca8
MP
83022014-01-31 Marek Polacek <polacek@redhat.com>
8303
8304 PR c/59963
8305 * c-common.c (add_atomic_size_parameter): Pass vNULL to
8306 build_function_call_vec.
8307 (resolve_overloaded_builtin): Likewise.
8308 * c-common.h (build_function_call_vec): Adjust declaration.
8309
68fca595
MP
83102014-01-30 Marek Polacek <polacek@redhat.com>
8311
8312 PR c/59940
8313 * c-common.h (unsafe_conversion_p): Adjust declaration.
8314 (warnings_for_convert_and_check): Likewise.
8315 (convert_and_check): Likewise.
8316 * c-common.c (unsafe_conversion_p): Add location parameter. Call
8317 expansion_point_location_if_in_system_header on it.
8318 (warnings_for_convert_and_check): Add location parameter. Call
8319 expansion_point_location_if_in_system_header on it. Use it.
8320 (convert_and_check): Add location parameter. Use it.
8321 (conversion_warning): Likewise.
8322 (c_add_case_label): Adjust convert_and_check calls.
8323 (scalar_to_vector): Adjust unsafe_conversion_p calls.
8324
b72271b9
BI
83252014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
8326
8327 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
8328 flag_cilkplus.
8329 * c-pragma.c (init_pragma): Likewise.
8330 * c.opt: Likewise.
8331
393e8e8b
MP
83322014-01-23 Marek Polacek <polacek@redhat.com>
8333
8334 PR c/59846
8335 * c-common.c (shorten_compare): Add location_t parameter.
8336 * c-common.h (shorten_binary_op): Adjust declaration.
8337
f04dda30
MP
83382014-01-23 Marek Polacek <polacek@redhat.com>
8339
8340 PR c/58346
8341 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
8342 * c-common.h: Declare it.
8343
621955cb
EB
83442014-01-20 Eric Botcazou <ebotcazou@adacore.com>
8345
8346 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
8347 * c-ada-spec.c (dump_ads): Likewise.
8348 (cpp_check): Likewise.
8349 (dump_ada_specs): Likewise.
8350
83512014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
8352
8353 PR c++/49718
8354 * c-common.c (handle_no_instrument_function_attribute): Allow
8355 no_instrument_function attribute in class member
8356 definition/declaration.
8357
241f845a
JJ
83582014-01-15 Jakub Jelinek <jakub@redhat.com>
8359
8360 PR c/58943
8361 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
8362 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
8363 being COMPOUND_EXPR.
8364 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
8365 operand a SAVE_EXPR and second MODIFY_EXPR.
8366
e83b8e2e
JJ
83672014-01-09 Jakub Jelinek <jakub@redhat.com>
8368
8369 PR target/58115
8370 * c-pch.c (c_common_write_pch): Call
8371 prepare_target_option_nodes_for_pch.
8372
23a5b65a
RS
83732014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8374
8375 Update copyright years
8376
f9030485
RS
83772014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8378
8379 * array-notation-common.c, c-cilkplus.c: Use the standard form for
8380 the copyright notice.
8381
f2aa696b
EB
83822013-12-28 Eric Botcazou <ebotcazou@adacore.com>
8383
8384 * c-ada-spec.c (print_constructor): New function.
8385 (print_destructor): Retrieve the origin of the destructor.
8386 (print_ada_declaration): Revamp handling of constructors/destructors.
8387
3f8257db 83882013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
8389 Bill Maddox <maddox@google.com>
8390 Jason Merrill <jason@redhat.com>
8391
8392 * c.opt: Add -fdeclone-ctor-dtor.
8393 * c-opts.c (c_common_post_options): Default to on iff -Os.
8394
41958c28
BI
83952013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
8396
8397 * c-common.c (c_common_attribute_table): Added "cilk simd function"
8398 attribute.
8399 * c-pragma.h (enum pragma_cilk_clause): Remove.
ab20d992 8400 (enum pragma_omp_clause): Added the following fields:
41958c28
BI
8401 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
8402 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
8403 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
8404 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
8405 PRAGMA_CILK_CLAUSE_UNIFORM.
8406
b1726d6c 8407
12893402
BI
84082013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
8409
8410 * cilk.c (cilk_outline): Made this function non-static.
8411 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
8412 (create_cilk_wrapper): Added a new parameter: a function pointer.
8413 (c_install_body_w_frame_cleanup): Remove
8414 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
8415 * c-common.h (cilk_outline): New prototype.
8416 (gimplify_cilk_spawn): Removed two parameters.
8417 (cilk_install_body_with_frame_cleanup): New prototype.
8418 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
8419 CILK_SPAWN_STMT case.
8420
085b42ed
BS
84212013-12-11 Bernd Schmidt <bernds@codesourcery.com>
8422
2ce064c3
BS
8423 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
8424
085b42ed
BS
8425 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
8426 (int_array_type_node): Remove.
8427 * c-common.c (c_common_nodes_and_builtins): Don't build it.
8428
9e36c9ed
MP
84292013-12-05 Marek Polacek <polacek@redhat.com>
8430
8431 PR c/52023
8432 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
8433 [ADJUST_FIELD_ALIGN].
8434
296674db
JM
84352013-12-04 Joseph Myers <joseph@codesourcery.com>
8436
8437 PR c/52023
8438 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
8439 and check field alignment if set.
8440 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
8441 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
8442
b1726d6c 84432013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
8444 Marek Polacek <polacek@redhat.com>
8445
8446 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
8447 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
8448
d7947e19
L
84492013-11-29 H.J. Lu <hongjiu.lu@intel.com>
8450
8451 PR c/59309
8452 * cilk.c (gimplify_cilk_spawn): Properly handle function without
8453 arguments.
8454
fad7652e
JJ
84552013-11-29 Jakub Jelinek <jakub@redhat.com>
8456
8457 PR c/59280
8458 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
8459 goto invalid. If it is error_mark_node, don't issue further
8460 diagnostics.
8461
8b5e1202
SO
84622013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
8463
8464 * c.opt (Wopenmp-simd): New.
8465
0a508bb6
JJ
84662013-11-22 Jakub Jelinek <jakub@redhat.com>
8467
8468 * c-ubsan.h (ubsan_instrument_return): New prototype.
8469 * c-ubsan.c (ubsan_instrument_return): New function.
8470
2fb9a547
AM
84712013-11-22 Andrew MacLeod <amacleod@redhat.com>
8472
8473 * c-common.c: Add required include files from gimple.h.
ab20d992
JJ
8474 * c-gimplify.c: Likewise.
8475 * cilk.c: Likewise.
2fb9a547 8476
8400e75e
DM
84772013-11-22 David Malcolm <dmalcolm@redhat.com>
8478
8479 * c-common.c (unsafe_conversion_p): Remove use of
8480 EXPR_LOC_OR_HERE macro.
8481 (conversion_warning): Likewise.
8482 (warnings_for_convert_and_check): Likewise.
8483 (warn_for_collisions_1): Likewise.
8484 (shorten_compare): Likewise, and remove use of in_system_header
8485 macro, using the location from the former.
8486 * c-lex.c (dump_one_header): Remove use of input_filename macro.
8487 (cb_def_pragma): Remove use of in_system_header macro.
8488 (lex_string): Likewise.
8489 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
8490
eb1ce453
KZ
84912013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
8492 Mike Stump <mikestump@comcast.net>
8493 Richard Sandiford <rdsandiford@googlemail.com>
8494
8495 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
8496 instead of TREE_INT_CST_LOW, in cases where there is a protecting
8497 tree_fits_shwi_p or tree_fits_uhwi_p.
8498 (dump_generic_ada_node): Likewise.
8499 * c-format.c (check_format_arg): Likewise.
8500 * c-pretty-print.c (pp_c_integer_constant): Likewise.
8501
6b3b8c27
KZ
85022013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
8503
8504 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
8505
49b0aa18
JC
85062013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
8507
8508 PR c/53001
8509 * c-common.c (unsafe_conversion_p): Make this function
8510 return an enumeration with more detail.
8511 (conversion_warning): Use the new return type of
8512 unsafe_conversion_p to separately warn either about conversions
8513 that lower floating point number precision or about the other
8514 kinds of conversions.
8515 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
8516 (unsafe_conversion_p): switching return type to
8517 conversion_safety enumeration.
49b0aa18
JC
8518 * c.opt: Adding new warning -Wfloat-conversion and
8519 enabling it with -Wconversion.
8520
b826515a
BS
85212013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
8522
8e745a17
JJ
8523 * c-opts.c: Include plugin.h.
8524 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 8525
b9a55b13
MP
85262013-11-19 Marek Polacek <polacek@redhat.com>
8527
8528 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
8529 call.
8530 (ubsan_instrument_shift): Likewise.
8531 (ubsan_instrument_vla): Likewise.
8532
7d362f6c
RS
85332013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8534
8535 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
8536 cast to unsigned type.
8537
386b1f1f
RS
85382013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8539
8540 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
8541 tree_low_cst.
8542 (complete_array_type): Update comment to refer to tree_to_[su]hwi
8543 rather than tree_low_cst.
8544
ae7e9ddd
RS
85452013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8546
8547 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
8548 tree_to_uhwi throughout.
8549
9439e9a1
RS
85502013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8551
8552 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
8553 tree_low_cst (..., 0) with tree_to_shwi throughout.
8554
cc269bb6
RS
85552013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8556
8557 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
8558 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
8559
9541ffee
RS
85602013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8561
8562 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
8563 host_integerp (..., 0) with tree_fits_shwi_p throughout.
8564
c02065fc
AH
85652013-11-15 Aldy Hernandez <aldyh@redhat.com>
8566
8567 * c-cilkplus.c: New file.
8568 * c-common.c (readonly_error): Add location argument.
8569 * c-common.h (readonly_error): Same.
8570 (c_finish_cilk_clauses): Protoize.
8571 (c_check_cilk_loop): Same.
8572 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
8573 Do not fail on error_mark_node.
8574 Abstract increment canonicalization to here...
8575 (c_omp_for_incr_canonicalize_ptr): New.
8576 c-pragma.c (init_pragma): Register "simd" pragma.
8577 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
8578 (enum pragma_cilk_clause): New.
8579
9cc65f15
RS
85802013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
8581
8582 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
8583 wchar_type and host_integerp checks.
8584
18f429e2
AM
85852013-11-14 Andrew MacLeod <amacleod@redhat.com>
8586
8587 * c-common.c: Likewise.
8588 * c-gimplify.c: Likewise.
8589 * cilk.c: Likewise.
8590
d8a2d370
DN
85912013-11-14 Diego Novillo <dnovillo@google.com>
8592
8593 * c-common.c: Include fold-const.h.
8594 Include stor-layout.h.
8595 Include calls.h.
8596 Include stringpool.h.
8597 Include attribs.h.
8598 Include varasm.h.
8599 Include trans-mem.h.
8600 * c-cppbuiltin.c: Include stor-layout.h.
8601 Include stringpool.h.
8602 * c-format.c: Include stringpool.h.
8603 * c-lex.c: Include stringpool.h.
8604 Include stor-layout.h.
8605 * c-pragma.c: Include stringpool.h.
8606 Include attribs.h.
8607 Include varasm.h.
8608 Include gcc-symtab.h.
8609 * c-pretty-print.c: Include stor-layout.h.
8610 Include attribs.h.
8611 * cilk.c: Include stringpool.h.
8612 Include calls.h.
8613
38b7bc7f
JM
86142013-11-13 Joseph Myers <joseph@codesourcery.com>
8615
8616 * c-common.h (enum rid): Add RID_AUTO_TYPE.
8617 * c-common.c (c_common_reswords): Add __auto_type.
8618 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
8619
45b0be94
AM
86202013-11-12 Andrew MacLeod <amacleod@redhat.com>
8621
18f429e2
AM
8622 * c-common.c: Include gimplify.h.
8623 * c-gimplify.c: Likewise.
8624 * cilk.c: Likewise.
8625 * c-omp.c: Include gimple-expr.h instead of gimple.h.
8626 * c-ubsan.c: Don't include gimple.h.
45b0be94 8627
582d9b50
JM
86282013-11-12 Joseph Myers <joseph@codesourcery.com>
8629
8630 * c-common.c (c_common_reswords): Add _Thread_local.
8631
6b28e197
JM
86322013-11-09 Joseph Myers <joseph@codesourcery.com>
8633
8634 * c-common.c (atomic_size_supported_p): New function.
8635 (resolve_overloaded_atomic_exchange)
8636 (resolve_overloaded_atomic_compare_exchange)
8637 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
8638 Use it instead of comparing size with a local list of sizes.
8639
267bac10
JM
86402013-11-07 Andrew MacLeod <amacleod@redhat.com>
8641 Joseph Myers <joseph@codesourcery.com>
8642
8643 * c-common.h (enum rid): Add RID_ATOMIC.
8644 * c-common.c (c_common_reswords): Add _Atomic.
8645 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
8646 (keyword_is_type_qualifier): Accept RID_ATOMIC.
8647 * c-format.c (check_format_types): Check for extra _Atomic
8648 qualifiers in format argument.
8649 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
8650 (pp_c_type_qualifier_list): Mention _Atomic in comment.
8651
5157b91e
TB
86522013-11-06 Tobias Burnus <burnus@net-b.de>
8653
8654 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
8655
6dbe0958
JM
86562013-11-06 Joseph Myers <joseph@codesourcery.com>
8657
8658 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
8659 standards modes.
8660 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
8661 to mean lack of IEEE 754 support.
8662
e8ff5196
TB
86632013-11-05 Tobias Burnus <burnus@net-b.de>
8664
8665 * c.opt (-Wdate-time): New option
8666 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
8667
254a0760
JM
86682013-11-05 Joseph Myers <joseph@codesourcery.com>
8669
8670 * c-cppbuiltin.c (cpp_iec_559_value): Test
8671 flag_excess_precision_cmdline not flag_excess_precision.
8672
6d7f7e0a
TB
86732013-11-05 Tobias Burnus <burnus@net-b.de>
8674
8675 * c.opt (fopenmp-simd): New option.
8676 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
8677 (omp_pragmas): ... this new struct.
8678 (c_pp_lookup_pragma): Also walk omp_pragmas.
8679 (init_pragma): Init pragmas for -fopenmp-simd.
8680
55a7f02f
MP
86812013-11-04 Marek Polacek <polacek@redhat.com>
8682
8683 PR c++/58979
8684 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
8685
9193fb05
JM
86862013-11-04 Joseph Myers <joseph@codesourcery.com>
8687
8688 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
8689 New functions.
8690 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
8691
94159ecf
EB
86922013-11-04 Eric Botcazou <ebotcazou@adacore.com>
8693
8694 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
8695 (dump_ada_specs): Adjust prototype of second callback.
8696 * c-ada-spec.c (cpp_check): New global variable.
8697 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
8698 (print_generic_ada_decl): Likewise.
8699 (has_static_fields): Change return type to bool and add guard.
8700 (has_nontrivial_methods): New predicate.
8701 (is_tagged_type): Change return type to bool.
8702 (separate_class_package): Call has_nontrivial_methods.
8703 (pp_ada_tree_identifier): Minor tweaks.
8704 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
8705 (dump_ada_array_domains): Likewise.
8706 (dump_ada_array_type): Likewise.
8707 (dump_template_types): Remove cpp_check parameter and do not pass it to
8708 dump_generic_ada_node.
8709 (dump_ada_template): Likewise.
8710 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
8711 recursively.
8712 (print_ada_methods): Change return type to integer. Remove cpp_check
8713 parameter and do not pass it down.
8714 (dump_nested_types): Remove cpp_check parameter and do not pass it to
8715 dump_generic_ada_node.
8716 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
8717 accessing methods.
8718 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
8719 down. Use has_nontrivial_methods to recognize C++ classes. Use return
8720 value of print_ada_methods.
8721 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
8722 Set cpp_check to it before invoking dump_ada_nodes.
8723 (dump_ada_specs): Likewise.
8724
b906f4ca
MP
87252013-11-03 Marek Polacek <polacek@redhat.com>
8726
8727 * c-ubsan.c: Don't include hash-table.h.
8728 (ubsan_instrument_vla): New function.
8729 * c-ubsan.h: Declare it.
8730
5e20cdc9
DM
87312013-10-31 David Malcolm <dmalcolm@redhat.com>
8732
8733 Automated part of renaming of symtab_node_base to symtab_node.
8734
8735 Patch autogenerated by rename_symtab.py from
8736 https://github.com/davidmalcolm/gcc-refactoring-scripts
8737 revision 58bb219cc090b2f4516a9297d868c245495ee622
8738
8739 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
8740 symtab_node_base to symtab_node.
8741
7057e645
ESR
87422013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
8743
8e745a17 8744 Implement C++14 digit separators.
7057e645
ESR
8745 * c-lex.c (interpret_float): Remove digit separators from scratch string
8746 before building real literal.
8747
193ea7bc
JJ
87482013-10-30 Jakub Jelinek <jakub@redhat.com>
8749
8750 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
8751
939b37da
BI
87522013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
8753
8754 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
8755 fields.
8756 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
8757 enabled.
8758 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
8759 (insert_cilk_frame): New prototype.
8760 (cilk_init_builtins): Likewise.
8761 (gimplify_cilk_spawn): Likewise.
8762 (c_cilk_install_body_w_frame_cleanup): Likewise.
8763 (cilk_detect_spawn_and_unwrap): Likewise.
8764 (cilk_set_spawn_marker): Likewise.
8765 (build_cilk_sync): Likewise.
8766 (build_cilk_spawn): Likewise.
8767 * cilk.c: New file.
8768
67348ccc
DM
87692013-10-29 David Malcolm <dmalcolm@redhat.com>
8770
8771 Patch autogenerated by refactor_symtab.py from
8772 https://github.com/davidmalcolm/gcc-refactoring-scripts
8773 revision 58bb219cc090b2f4516a9297d868c245495ee622
8774
8775 * c-gimplify.c (c_genericize): Update for conversion of symtab types
8776 to a true class hierarchy.
8777 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
8778
d570872d
RS
87792013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
8780
8781 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
8782
98906124
JL
87832013-10-26 Jeff Law <law@redhat.com>
8784
adfac8df
JJ
8785 * c-common.c (c_define_builtins): Remove mudflap support.
8786 * c.opt: Ignore and warn for mudflap options.
98906124 8787
d73749df 87882013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
8789
8790 PR other/33426
8791 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
8792 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
8793
3f04b1bb
JM
87942013-10-23 Jason Merrill <jason@redhat.com>
8795
8796 * c-format.c (gcc_cxxdiag_char_table): Add %X.
8797
acf0174b
JJ
87982013-10-11 Jakub Jelinek <jakub@redhat.com>
8799
acd15a28
JJ
8800 * c-common.h (omp_clause_mask::operator !=): New method.
8801 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
8802 instead of if (mask & something) tests everywhere.
8803
acf0174b
JJ
8804 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
8805 201307 instead of 201107.
8806 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
8807 (c_common_attribute_table): Add "omp declare target" and
8808 "omp declare simd" attributes.
8809 (handle_omp_declare_target_attribute,
8810 handle_omp_declare_simd_attribute): New functions.
8811 * c-omp.c: Include c-pragma.h.
8812 (c_finish_omp_taskgroup): New function.
8813 (c_finish_omp_atomic): Add swapped argument, if true,
8814 build the operation first with rhs, lhs arguments and use NOP_EXPR
8815 build_modify_expr.
8816 (c_finish_omp_for): Add code argument, pass it down to make_code.
8817 (c_omp_split_clauses): New function.
8818 (c_split_parallel_clauses): Removed.
8819 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
8820 c_omp_declare_simd_clauses_to_decls): New functions.
8821 * c-common.h (omp_clause_mask): New type.
8822 (OMP_CLAUSE_MASK_1): Define.
8823 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
8824 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
8825 omp_clause_mask::operator |, omp_clause_mask::operator &,
8826 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
8827 omp_clause_mask::operator ==): New methods.
8828 (enum c_omp_clause_split): New.
8829 (c_finish_omp_taskgroup): New prototype.
8830 (c_finish_omp_atomic): Add swapped argument.
8831 (c_finish_omp_for): Add code argument.
8832 (c_omp_split_clauses): New prototype.
8833 (c_split_parallel_clauses): Removed.
8834 (c_omp_declare_simd_clauses_to_numbers,
8835 c_omp_declare_simd_clauses_to_decls): New prototypes.
8836 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
8837 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
8838 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
8839 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
8840 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
8841 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
8842 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
8843 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
8844 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
8845 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
8846 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
8847 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
8848 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
8849 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
8850 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
8851 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
8852 PRAGMA_OMP_CLAUSE_UNIFORM.
8853
826cacfe
MG
88542013-10-09 Marc Glisse <marc.glisse@inria.fr>
8855
8856 PR tree-optimization/20318
8857 * c-common.c (handle_returns_nonnull_attribute): New function.
8858 (c_common_attribute_table): Add returns_nonnull.
8859
2284b034
MG
88602013-10-03 Marc Glisse <marc.glisse@inria.fr>
8861
8862 PR c++/19476
8863 * c.opt (fcheck-new): Move to common.opt.
8864
b56e9788
MP
88652013-09-25 Marek Polacek <polacek@redhat.com>
8866 Jakub Jelinek <jakub@redhat.com>
8867
8868 PR sanitizer/58413
8869 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
8870 an expression if we can prove it is correct.
8871 (ubsan_instrument_division): Likewise. Remove unnecessary
8872 check.
8873
ce6923c5
MP
88742013-09-18 Marek Polacek <polacek@redhat.com>
8875
8876 PR sanitizer/58411
8877 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
8878 Declare it.
8879 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
8880
fb5610fb
IS
88812013-09-14 Iain Sandoe <iain@codesourcery.com>
8882
8883 PR target/48094
8884 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
8885 fobjc-gc, freplace-objc-classes): Accept for LTO.
8886
88b0e79e
JC
88872013-09-13 Jacek Caban <jacek@codeweavers.com>
8888
8889 * c-target.def: New hook
8890
c9b0866a
PC
88912013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
8892
8893 PR c++/43452
8894 * c.opt (Wdelete-incomplete): Add.
8895
0af94e6f
JR
88962013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
8897
8898 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
8899 (vector_types_compatible_elements_p): New function.
8900 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
8901 declaration.
8902 (vector_types_compatible_elements_p): Declare.
8903
7c26172c
GDR
89042013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8905
8906 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
8907 a virtual member function.
8908 (pp_simple_type_specifier): Remove.
8909 (pp_c_type_specifier): Likewise.
8910 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
8911 Rename from pp_c_type_specifier. Adjust.
8912 (c_pretty_printer::c_pretty_printer): Do not assign to
8913 simple_type_specifier.
8914
20059c8b
GDR
89152013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8916
8917 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
8918 member function.
8919 (c_pretty_printer::storage_class_specifier): Likewise.
8920 (c_pretty_printer::initializer): Likewise.
8921 (pp_declaration): Remove.
8922 (pp_declaration_specifiers): Likewise.
8923 (pp_abstract_declarator): Likewise.
8924 (pp_declarator): Likewise.
8925 (pp_type_id): Likewise.
8926 (pp_statement): Likewise.
8927 (pp_constant): Likewise.
8928 (pp_id_expression): Likewise.
8929 (pp_primary_expression): Likewise.
8930 (pp_unary_expression): Likewise.
8931 (pp_multiplicative_expression): Likewise.
8932 (pp_conditional_expression): Likewise.
8933 (pp_assignment_expression): Likewise.
8934 (pp_expression): Likewise.
8935 (pp_c_type_id): Likewise.
8936 (pp_c_storage_class_specifier): Likewise.
8937 * c-pretty-print.c (pp_c_type_cast): Tidy.
8938 (pp_c_pointer): Likewise.
8939 (pp_c_type_specifier): Likewise.
8940 (pp_c_parameter_type_list): Likewise.
8941 (pp_c_function_definition): Likewise.
8942 (pp_c_init_declarator): Likewise.
8943 (pp_c_initializer_list): Likewise.
8944 (pp_c_constructor_elts): Likewise.
8945 (c_pretty_printer::direct_abstract_declarator): Likewise.
8946 (c_pretty_printer::declaration_specifiers): Likewise.
8947 (c_pretty_printer::primary_expression): Likewise.
8948 (c_pretty_printer::postfix_expression): Likewise.
8949 (c_pretty_printer::type_id): Rename from pp_c_type_id.
8950 (c_pretty_printer::storage_class_specifier): Rename from
8951 pp_c_storage_class_specifier.
8952 (c_pretty_printer::initializer): Rename from pp_c_initializer.
8953 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
8954 storage_class_specifier, initializer, offset_list, flags.
8955
de5a5fa1
MP
89562013-08-30 Marek Polacek <polacek@redhat.com>
8957
8958 * c-ubsan.c: New file.
8959 * c-ubsan.h: New file.
8960
8f0e4d72
GDR
89612013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
8962
8963 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
8964 member function.
8965 (c_pretty_printer::declaration_specifiers): Likewise.
8966 (c_pretty_printer::declarator): Likewise.
8967 (c_pretty_printer::abstract_declarator): Likewise.
8968 (c_pretty_printer::direct_abstract_declarator): Likewise.
8969 (c_pretty_printer::direct_declarator): Likewise.
8970 (c_pretty_printer::function_specifier): Likewise.
8971 (pp_declaration): Adjust.
8972 (pp_declaration_specifiers): Likewise.
8973 (pp_abstract_declarator): Likewise.
8974 (pp_direct_declarator): Likewise.
8975 (pp_function_specifier): Likewise.
8976 (pp_direct_abstract_declarator): Remove as unused.
8977 (pp_c_declaration): Remove.
8978 (pp_c_declaration_specifiers): Likewise.
8979 (pp_c_declarator): Likewise.
8980 (pp_c_direct_declarator): Likewise.
8981 (pp_c_function_specifier): Likewise.
8982 (pp_c_direct_abstract_declarator): Likewise.
8983 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
8984 from pp_c_abstract_declarator. Adjust.
ab20d992 8985 (c_pretty_printer::direct_abstract_declarator): Rename from
8f0e4d72
GDR
8986 pp_c_direct_abstract_declarator. Adjust.
8987 (c_pretty_printer::function_specifier): Rename from
8988 pp_c_function_specifier. Adjust.
8989 (c_pretty_printer::declaration_specifiers): Rename from
8990 pp_c_declaration_specifiers. Adjust.
8991 (c_pretty_printer::direct_declarator): Rename from
8992 pp_c_direct_declarator. Adjust.
8993 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
8994 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
8995 (c_pretty_printer::c_pretty_printer): Do not assign to
8996 declaration, declaration_specifiers, declarator,
8997 direct_declarator, direct_abstract_declarator, function_specifier.
8998
00d34d3a
GDR
89992013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
9000
9001 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
9002 virtual member function.
9003 (c_pretty_printer::multiplicative_expression): Likewise.
9004 (c_pretty_printer::conditional_expression): Likewise.
9005 (c_pretty_printer::assignment_expression): Likewise.
9006 (c_pretty_printer::expression): Likewise.
9007 (pp_unary_expression): Adjust.
9008 (pp_multiplicative_expression): Likewise.
9009 (pp_assignment_expression): Likewise.
9010 (pp_conditional_expression): Likewise.
9011 (pp_expression): Likewise.
9012 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
9013 from pp_c_unary_expression. Adjust.
9014 (c_pretty_printer::multiplicative_expression): Rename from
9015 pp_c_multiplicative_expression. Adjust.
9016 (c_pretty_printer::conditional_expression): Rename from
9017 pp_c_conditional_expression. Adjust.
9018 (c_pretty_printer::assignment_expression): Rename from
9019 pp_c_assignment_expression. Adjust.
9020 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
9021 (c_pretty_printer::c_pretty_printer): Do not assign to
9022 unary_expression, multiplicative_expression,
9023 conditional_expression, expression.
9024
fb22178f
GDR
90252013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
9026
9027 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
9028 virtual member function.
9029 (pp_postfix_expression): Adjust.
9030 (pp_c_postfix_expression): Remove.
9031 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
9032 from pp_c_postfix_expression. Adjust.
9033 (c_pretty_printer::c_pretty_printer): Do not assign to
9034 postfix_expression.
9035
7ecc2600
GDR
90362013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
9037
9038 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
9039 virtua member function.
9040 (pp_primary_expression): Adjust.
9041 (pp_c_primary_expression): Remove.
9042 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
9043 from pp_c_primary_expression. Adjust.
9044 (pp_c_initializer_list): Use pp_primary_expression.
9045 (c_pretty_printer::c_pretty_printer): Do not assign to
9046 primary_expression.
9047
0691175f
GDR
90482013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
9049
9050 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
9051 * c-pretty-print.c (M_): Remove.
9052 (c_pretty_printer::translate_string): Define.
9053 (pp_c_type_specifier): Use it.
9054 (pp_c_primary_expression): Likewise.
9055 (pp_c_expression): Likewise.
9056
66dfe4c4
GDR
90572013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
9058
9059 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
9060 virtual function.
9061 (pp_c_id_expression): Remove.
9062 (pp_id_expression): Adjust.
9063 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
9064 pp_c_id_expression. Adjust.
9065 (pp_c_postfix_expression): Use pp_id_expression.
9066 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
9067
ca43e9d5
GDR
90682013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
9069
9070 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
9071 member function.
9072 (pp_constant): Adjust.
9073 (pp_c_constant): Remove.
9074 * c-pretty-print.c (c_pretty_printer::constant): Rename from
9075 pp_c_constant. Adjust.
9076 (pp_c_constant)
9077 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
9078 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
9079
da6ca2b5
GDR
90802013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
9081
9082 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
9083 (c_pretty_printer::c_pretty_printer): Declare.
9084 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
9085 c_pretty_printer_init. Adjust.
9086 (print_c_tree): Do not call c_pretty_printer_init.
9087 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
9088
65a372f4
AC
90892013-08-09 Arnaud Charlet <charlet@adacore.com>
9090
9091 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
9092
fd9b0f32
PC
90932013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
9094
9095 PR c++/58080
9096 * c-common.c (pointer_int_sum): Add bool parameter.
9097 * c-common.h (pointer_int_sum): Adjust declaration.
9098
e0aec1e9
GDR
90992013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
9100
9101 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
9102 c_pretty_printer variable.
9103
b066401f
GDR
91042013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
9105
9106 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
9107 (pp_base): Remove.
9108 (pp_c_base): Likewise. Adjust users.
9109 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
9110 (pp_c_whitespace): Do not call pp_base.
9111 (pp_c_left_paren): Likewise.
9112 (pp_c_right_paren): Likewise.
9113 (pp_c_left_brace): Likewise.
9114 (pp_c_right_brace): Likewise.
9115 (pp_c_left_bracket): Likewise.
9116 (pp_c_right_bracket): Likewise.
9117 (pp_c_dot): Likewise.
9118 (pp_c_ampersand): Likewise.
9119 (pp_c_star): Likewise.
9120 (pp_c_arrow): Likewise.
9121 (pp_c_semicolon): Likewise.
9122 (pp_c_complement): Likewise.
9123 (pp_c_exclamation): Likewise.
9124 (pp_c_direct_declarator): Likewise.
9125 (pp_c_ws_string): Likewise.
9126 (pp_c_identifier): Likewise.
9127 (pp_c_statement): Likewise.
9128 (print_c_tree): Likewise.
9129
65e5a578
ESR
91302013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
9131
9132 PR c++/58072
9133 * c-common.c (c_parse_error): Catch user-defined literal tokens and
9134 provide useful error strings.
9135
137a1a27
GDR
91362013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9137
9138 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
9139 printer functions instead of pp_string or operators and punctuators.
9140 (dump_generic_ada_node): Likewise.
9141 * c-pretty-print.c (pp_c_type_specifier): Likewise.
9142 (pp_c_relational_expression): Likewise.
9143 (pp_c_logical_or_expression): Likewise.
9144
07838b13
GDR
91452013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9146
9147 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
9148 functions instead of pp_character.
9149 (pp_ada_tree_identifier): Likewise.
9150 (dump_ada_double_name): Likewise.
9151 (dump_ada_function_declaration): Likewise.
9152 (dump_ada_array_domains): Likewise.
9153 (dump_template_types): Likewise.
9154 (dump_generic_ada_node): Likewise.
9155 (print_ada_declaration): Likewise.
9156 (print_ada_struct_decl): Likewise.
9157 * c-pretty-print.c (pp_c_integer_constant): Likewise.
9158
433cc7b0
TT
91592013-07-23 Tom Tromey <tromey@redhat.com>
9160
9161 * c-common.h (enum rid) <RID_GENERIC>: New constant.
9162 * c-common.c (c_common_reswords): Add _Generic.
9163
688010ba
OB
91642013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
9165
9166 * c-common.c: Fix typos.
9167 * c-common.h: Likewise.
9168
2a99e5e6
LL
91692013-07-13 Lubos Lunak <l.lunak@suse.cz>
9170
9171 PR c++/55203
9172 * c-common.c (c_common_attribute_table): Add warn_unused.
9173 (handle_warn_unused_attribute): New.
9174
c26302d5
JJ
91752013-07-10 Jakub Jelinek <jakub@redhat.com>
9176
9177 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
9178 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
9179
dfeadaa0
PC
91802013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
9181
9182 PR c++/57869
9183 * c.opt: Add Wconditionally-supported.
9184
6a2fa4b2
GS
91852013-07-08 Graham Stott <graham.stott@btinternet.com>
9186
adfac8df 9187 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
9188 unused variables l_length and l_node.
9189
ecdbd01a 91902013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
9191
9192 PR c/57821
9193 * c-common.c (complete_array_type): Delay folding first index
9194 like other indices. When folding, check for index overflow.
9195
bedc293e
MG
91962013-06-27 Marc Glisse <marc.glisse@inria.fr>
9197
9198 PR c++/57509
9199 * c-common.h (c_build_vec_perm_expr): New complain argument.
9200 * c-common.c (c_build_vec_perm_expr): Likewise.
9201 Use save_expr also in C++.
9202
604b2bfc
GDR
92032013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
9204
9205 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
9206 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
9207 * c-opts.c (c_common_post_options): Likewise.
9208
dfeadaa0 92092013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
9210
9211 * array-notation-common.c (length_mismatch_in_expr): Changed the
9212 parameter type's from a dynamic array to a vec_tree. Also removed
9213 the size parameters.
9214 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
9215 the change above.
9216
2ce86d2e
BI
92172013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
9218
9219 * c-common.h (struct cilkplus_an_parts): New structure.
9220 (struct cilkplus_an_loop_parts): Likewise.
9221 (cilkplus_extract_an_triplets): New prototype.
9222 (fix_sec_implicit_args): Likewise.
9223 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
9224 (fix_sec_implicit_args): Likewise.
604b2bfc 9225
07a6825b
BI
92262013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
9227
9228 * array-notation-common.c (find_inv_trees): Removed an unwanted
9229 typecasting.
9230 * c-common.h (struct inv_list::additional_tcodes): Changed type from
9231 enum rid to enum tree_code.
9232
08346abd
JH
92332013-06-11 Jan Hubicka <jh@suse.cz>
9234
9235 * c-common.c (handle_alias_ifunc_attribute): Do not set
9236 DECL_EXTERNAL for weakref variables.
9237 * c-pragma.c (handle_pragma_weak): Make sure aliases
9238 are not declared as external.
9239
d60f1706
BI
92402013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
9241
9242 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
9243 function from c/c-array-notation.c.
9244 (is_cilkplus_reduce_builtin): Likewise.
9245 (find_rank): Likewise.
9246 (extract_array_notation_exprs): Likewise.
9247 (replace_array_notations): Likewise.
9248 (find_inv_trees): Likewise.
9249 (replace_inv_trees): Likewise.
9250 (contains_array_notation_expr): Likewise.
9251 (find_correct_array_notation_type): Likewise.
9252 * c-common.h (struct inv_list): Moved this struct from the file
9253 c/c-array-notation.c and added a new field called additional tcodes.
9254 (length_mismatch_in_expr_p): New prototype.
9255 (is_cilkplus_reduce_builtin): Likewise.
9256 (find_rank): Likewise.
9257 (extract_array_notation_exprs): Likewise.
9258 (replace_array_notation): Likewise.
9259 (find_inv_trees): Likewise.
9260 (replace_inv_trees): Likewise.
9261 (find_correct_array_notation_type): Likewise.
dfeadaa0 9262
36536d79
BI
92632013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
9264
9265 * c-common.c (c_define_builtins): When cilkplus is enabled, the
9266 function array_notation_init_builtins is called.
9267 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
9268 * c-common.def (ARRAY_NOTATION_REF): New tree.
9269 * c-common.h (build_array_notation_expr): New function declaration.
9270 (build_array_notation_ref): Likewise.
9271 (extract_sec_implicit_index_arg): New extern declaration.
9272 (is_sec_implicit_index_fn): Likewise.
9273 (ARRAY_NOTATION_CHECK): New define.
9274 (ARRAY_NOTATION_ARRAY): Likewise.
9275 (ARRAY_NOTATION_START): Likewise.
9276 (ARRAY_NOTATION_LENGTH): Likewise.
9277 (ARRAY_NOTATION_STRIDE): Likewise.
9278 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
9279 ARRAY_NOTATION_REF.
9280 (pp_c_expression): Likewise.
9281 * c.opt (flag_enable_cilkplus): New flag.
9282 * array-notation-common.c: New file.
9283
f7716d57
JJ
92842013-05-14 Jakub Jelinek <jakub@redhat.com>
9285
9286 PR c++/57274
9287 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
9288
a5e0cd1d
MG
92892013-05-10 Marc Glisse <marc.glisse@inria.fr>
9290
9291 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
9292 vectors.
9293
f6bc1c4a
HS
92942013-05-07 Han Shen <shenhan@google.com>
9295
9296 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
9297
3f12f6e9
SKS
92982013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
9299
9300 * c-common.c (check_user_alignment): Emit error for negative values.
9301
61949153
PC
93022013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
9303
9304 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
9305
e93e18e9
PC
93062013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
9307
9308 * c-cppbuiltin.c (c_cpp_builtins): Do not define
9309 __GXX_EXPERIMENTAL_CXX1Y__.
9310
44d90fe1 93112013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 9312 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
9313
9314 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
9315 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
9316 to simply use OPT_Wpointer_arith.
9317 (c_sizeof_or_alignof_type): Likewise.
9318
13f39b2e
PC
93192013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
9320
9321 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
9322
4b84d650
JJ
93232013-04-12 Jakub Jelinek <jakub@redhat.com>
9324
9325 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
9326 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
9327 specifiers.
9328
fb037b5d
SB
93292013-04-07 Steven Bosscher <steven@gcc.gnu.org>
9330
9331 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
9332
4e856798
PC
93332013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
9334
9335 * c-common.c (pointer_int_sum): Remove dead code.
9336
4b1baac8
RS
93372013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
9338
9339 PR middle-end/56524
9340 * c-common.c (handle_optimize_attribute): Don't call
9341 save_optabs_if_changed.
9342
0b50e654
JJ
93432013-03-05 Jakub Jelinek <jakub@redhat.com>
9344
9345 PR middle-end/56461
9346 * c-pch.c (pch_init): Free target_validity at the end.
9347
48c41403
JJ
93482013-03-04 Jakub Jelinek <jakub@redhat.com>
9349
9350 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
9351
e664c61c
KS
93522013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
9353 Jakub Jelinek <jakub@redhat.com>
9354
9355 PR sanitizer/56454
9356 * c-common.c (handle_no_sanitize_address_attribute): New function.
9357 (c_common_attribute_table): Add no_sanitize_address attribute.
9358 (handle_no_address_safety_analysis_attribute): Add
9359 no_sanitize_address attribute, not no_address_safety_analysis
9360 attribute.
9361
a475fd3d 93622013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
9363
9364 PR target/52555
9365 * c-common.c (handle_optimize_attribute): Call
9366 save_optabs_if_changed.
9367
f6007d99
JJ
93682013-02-18 Jakub Jelinek <jakub@redhat.com>
9369 Steven Bosscher <steven@gcc.gnu.org>
9370
9371 PR pch/54117
9372 * c-opts.c (c_common_post_options): If debug info is enabled
9373 and non-dwarf*, refuse to load PCH files and when writing PCH
9374 file warn.
9375
cf35e2b1
JJ
93762013-02-05 Jakub Jelinek <jakub@redhat.com>
9377
9378 PR middle-end/56167
9379 * c-common.c (handle_error_attribute): Fix condition.
9380
32887460
JJ
93812013-01-30 Jakub Jelinek <jakub@redhat.com>
9382
9383 PR c++/55742
9384 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
9385
5af057d8
JM
93862013-01-18 Jason Merrill <jason@redhat.com>
9387
9388 PR target/54908
9389 * c.opt (-fextern-tls-init): New.
9390 * c-opts.c (c_common_post_options): Handle it.
9391
cc83c823
JJ
93922013-01-09 Jakub Jelinek <jakub@redhat.com>
9393
9394 PR c/48418
9395 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
9396 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
9397 and is either negative or bigger or equal to type precision
9398 of the first operand.
9399
a859517f
MP
94002012-12-03 Marek Polacek <polacek@redhat.com>
9401
9402 PR c/55570
9403 * c-common.c (check_user_alignment): Swap order of tests,
9404 check TREE_CODE first.
9405
2d7aa578
ESR
94062012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
9407
9408 PR c++/52654
9409 * c-common.h (overflow_type): New enum.
9410 (build_userdef_literal): Add overflow_type argument.
9411 (tree_userdef_literal): Add overflow_type.
9412 (USERDEF_LITERAL_OVERFLOW): New access macro.
9413 * c-common.c (build_userdef_literal): Add overflow_type
9414 argument.
9415 * c-lex.c (c_lex_with_flags): Add overflow_type to
9416 build_userdef_literal calls.
9417 (interpret_integer, interpret_float): Add overflow_type argument.
9418
cc3c4f62
RB
94192012-11-28 Richard Biener <rguenther@suse.de>
9420
9421 PR c/35634
9422 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
9423 here and use a type with proper overflow behavior for types that would
9424 need to be promoted for the arithmetic.
9425
77bc5132
JJ
94262012-11-23 Jakub Jelinek <jakub@redhat.com>
9427
9428 PR sanitizer/55435
9429 * c-common.c (handle_no_address_safety_analysis_attribute): New
9430 function.
9431 (c_common_attribute_table): Add no_address_safety_analysis.
9432
5dc99c46
SB
94332012-11-16 Simon Baldwin <simonb@google.com>
9434
9435 * c.opt: Add f[no-]canonical-system-headers.
9436 * c-opts.c (c_common_handle_option): Handle
9437 OPT_fcanonical_system_headers.
9438
a4a0016d
ESR
94392012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
9440
9441 PR c++/54413
9442 * c-opts.c (c_common_handle_option): Set new flags.
9443 * c.opt: Describe new flags.
9444
7dbb85a7
JM
94452012-11-09 Jason Merrill <jason@redhat.com>
9446
9447 * c.opt (Wabi-tag): New.
9448
ad7bac31
AK
94492012-11-09 Andi Kleen <ak@linux.intel.com>
9450
9451 PR 55139
9452 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 9453 MEMMODEL_MASK
ad7bac31 9454
7332899a
MLI
94552012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
9456
9457 PR c/53063
9458 * c.opt (Wformat): Make it Alias Wformat=1.
9459 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
9460 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
9461 LangEnabledBy.
9462 (Wformat=): RejectNegative. Use LangEnabledBy.
9463 (Wnonnull): Use LangEnabledBy.
9464 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
9465 * c-format.c (set_Wformat): Delete.
9466 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
ab20d992
JJ
9467 (maybe_read_dollar_number): Likewise.
9468 (avoid_dollar_number): Likewise.
9469 (finish_dollar_format_checking): Likewise.
9470 (check_format_info): Likewise.
9471 (check_format_info_main): Likewise.
9472 (check_format_types): Likewise.
9473 (format_type_warning): Likewise.
9474 * c-common.c (int): Likewise.
9475 (check_function_sentinel): Likewise.
8e745a17 9476 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 9477
34a180a6
MLI
94782012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
9479
9480 PR c/53063
9481 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
9482 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
9483 Use LangEnabledBy.
9484 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
9485 common.opt.
9486 (Wvariadic-macros): Init(1).
9487 * c-opts.c (c_common_handle_option): Do not handle them
9488 explicitly.
9489 (c_common_post_options): Likewise.
9490 (sanitize_cpp_opts): warn_unused_macros is now
9491 cpp_warn_unused_macros.
9492 (push_command_line_include): Likewise.
9493 * c-common.c (warn_unknown_pragmas): Do not define.
9494 * c-common.h (warn_unknown_pragmas): Do not declare.
9495
3f46d6a5
MLI
94962012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
9497
9498 PR c/51294
9499 * c-common.c (conversion_warning): Handle conditional expressions.
9500
880661a4
JW
95012012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
9502
9503 PR c++/54930
9504 * c.opt (Wreturn_local_addr): Define new option.
9505
4514a96b
JM
95062012-10-25 Jason Merrill <jason@redhat.com>
9507
f14edc1a
JM
9508 * c.opt (Wvirtual-move-assign): New.
9509
4514a96b
JM
9510 * c.opt (Winherited-variadic-ctor): New.
9511
93100c6b
MG
95122012-10-25 Marc Glisse <marc.glisse@inria.fr>
9513
9514 PR c++/54427
9515 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
9516
1efcb8c6
JM
95172012-10-23 Joseph Myers <joseph@codesourcery.com>
9518
9519 * c-common.h (pch_cpp_save_state): Declare.
9520 * c-target.def (c_preinclude): New hook.
9521 * c-opts.c (done_preinclude): New.
9522 (push_command_line_include): Handle default preincluded header.
9523 (cb_file_change): Call pch_cpp_save_state when calling
9524 push_command_line_include.
9525 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
9526 (pch_cpp_save_state): New.
9527 (pch_init): Call pch_cpp_save_state conditionally, instead of
9528 calling cpp_save_state.
9529
4a0ae68e
MLI
95302012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9531
9532 PR c/53063
9533 PR c/40989
9534 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
9535 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
9536 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
9537 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
9538 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
9539 * c-opts.c (c_common_handle_option): Remove explicit handling from
9540 here.
9541 (c_common_post_options): Likewise.
9542
67e4210b
EB
95432012-10-18 Eric Botcazou <ebotcazou@adacore.com>
9544
9545 * c-ada-spec.c (LOCATION_COL): Delete.
9546 (compare_location): New function.
9547 (compare_node): Use it.
9548 (compare_comment): Likewise.
9549
65d4f2cd
MLI
95502012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
9551
9552 PR c/53063
9553 PR c/40989
9554 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
9555 * c-opts.c (c_common_handle_option): Do not set them here. Add
9556 comment.
9557 (c_common_post_options): Likewise.
9558
909881cb
EB
95592012-10-16 Eric Botcazou <ebotcazou@adacore.com>
9560
9561 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
9562 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
9563 Remove POINTER_TYPE handling, add large unsigned handling and use
9564 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
9565
3a785c97
JJ
95662012-10-12 Jakub Jelinek <jakub@redhat.com>
9567
9568 PR c/54381
9569 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
9570 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
9571 locs and array of 3 trees instead of just single loc and single
9572 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
9573 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
9574 For *cmp* builtins that take two sources strings report warnings
9575 about first and second source, not about destination and source.
9576
5e54f81d
MG
95772012-10-12 Marc Glisse <marc.glisse@inria.fr>
9578
9579 PR c++/53055
9580 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
9581
f5b02f1e
EB
95822012-10-11 Eric Botcazou <ebotcazou@adacore.com>
9583
9584 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
9585 declaring something coming from another file.
9586
b46dbc6c
AC
95872012-10-10 Arnaud Charlet <charlet@adacore.com>
9588
f5b02f1e 9589 PR ada/54845
b46dbc6c
AC
9590 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
9591
5d9de0d0
PC
95922012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
9593
9594 PR c++/54194
9595 * c-common.c (warn_about_parentheses): Add location_t parameter;
9596 use EXPR_LOC_OR_LOC.
9597 * c-common.h: Update declaration.
9598
a212e43f
MG
95992012-10-09 Marc Glisse <marc.glisse@inria.fr>
9600
9601 PR c++/54427
9602 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
9603 more operations. Make error messages optional.
9604 * c-common.h (enum stv_conv): Moved from c-typeck.c.
9605 (scalar_to_vector): Declare.
9606
b1db7f91
JM
96072012-10-08 Jason Merrill <jason@redhat.com>
9608
9609 * c-common.c (c_common_reswords): Add thread_local.
9610
e28d52cf
DS
96112012-10-08 Dodji Seketeli <dodji@redhat.com>
9612
9613 PR c++/53528 C++11 attribute support
9614 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
9615 new functions.
9616 * c-common.c (check_cxx_fundamental_alignment_constraints): New
9617 static function.
9618 (handle_aligned_attribute): In choose strictest alignment
9619 among many. Use new check_cxx_fundamental_alignment_constraints.
9620 (handle_transparent_union_attribute): In c++11 attribute syntax,
9621 don't look through typedefs.
9622
3b78de56
AC
96232012-10-04 Arnaud Charlet <charlet@adacore.com>
9624
9625 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
9626 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
9627 out of dumpfile.h.
9628
6040bb5f
DC
96292012-09-25 Dehao Chen <dehao@google.com>
9630
9631 PR middle-end/54645
3b78de56 9632 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
9633 map when read in the pch.
9634
3f8257db 96352012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
9636
9637 * c-ada-spec.c: Style fixes.
9638
3f8257db 96392012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
9640
9641 * c.opt (-fada-spec-parent): Define new command line switch.
9642 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
9643 is specified, generate binding spec as a child of the specified unit.
9644
0ccb505d
PC
96452012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
9646 Manuel López-Ibáñez <manu@gcc.gnu.org>
9647
9648 PR c++/53210
9649 * c.opt ([Winit-self]): Enabled by -Wall in C++.
9650
c583af79
AC
96512012-08-23 Arnaud Charlet <charlet@adacore.com>
9652
9653 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
9654 for pointers, and add missing Convention C pragma.
9655 (print_ada_struct_decl): Add missing aliased keyword.
9656 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
9657
1a4049e7
JJ
96582012-08-17 Jakub Jelinek <jakub@redhat.com>
9659
9660 * c-common.c (sizeof_pointer_memaccess_warning): New function.
9661 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
9662 * c-opts.c (c_common_handle_option): Enable it for -Wall.
9663 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
9664 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
9665
70b5e7dc
RG
96662012-08-10 Richard Guenther <rguenther@suse.de>
9667
9668 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
9669
f8923f7e
SB
96702012-08-07 Steven Bosscher <steven@gcc.gnu.org>
9671
9672 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
9673 instead of separate pp_newline and pp_flush.
9674 (print_c_tree): Likewise.
9675
e45abe1f
RH
96762012-07-26 Richard Henderson <rth@redhat.com>
9677
9678 * c-common.c (handle_hot_attribute): Allow labels.
9679 (handle_cold_attribute): Likewise.
9680
332f1d24
JJ
96812012-07-20 Jakub Jelinek <jakub@redhat.com>
9682
9683 PR c++/28656
9684 * c-common.c (check_function_nonnull): Handle multiple nonnull
9685 attributes properly.
9686
7ee2468b
SB
96872012-07-16 Steven Bosscher <steven@gcc.gnu.org>
9688
9689 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
9690 * c-ada-spec.c: Likewise.
9691 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
9692
ee7b28eb
SB
96932012-07-14 Steven Bosscher <steven@gcc.gnu.org>
9694
9695 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
9696 Remove code conditional on it.
9697
6bdf3519
SB
96982012-07-11 Steven Bosscher <steven@gcc.gnu.org>
9699
9700 * c-gimplify.c: Do not include basic-block.h.
9701 * c-common.c: Do not include linfuncs.h.
9702
532aafad
SB
97032012-07-08 Steven Bosscher <steven@gcc.gnu.org>
9704
9705 * c-common.h: Include tree.h.
9706
8d0d1915
JM
97072012-07-02 Jason Merrill <jason@redhat.com>
9708
9709 PR c++/53524
9710 * c-common.c (get_priority): Call default_conversion.
9711
fbc873ad
UB
97122012-07-01 Uros Bizjak <ubizjak@gmail.com>
9713
9714 * c-pch.c (c_common_write_pch): Remove unused variables.
9715
d4a10d0a
SB
97162012-06-29 Steven Bosscher <steven@gcc.gnu.org>
9717
9718 * cppspec.c: Moved from gcc/ to here.
9719
6f3a2e23
KT
97202012-06-27 Kai Tietz <ktietz@redhat.com>
9721
9722 PR preprocessor/37215
9723 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
9724
8ca92d04
SB
97252012-06-21 Steven Bosscher <steven@gcc.gnu.org>
9726
9727 * c-common.h (c_common_print_pch_checksum): Remove.
9728 * c-pch.c: Do not include output.h.
9729 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
9730 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
9731 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
9732 (struct c_pch_header): Remove.
9733 (get_ident): Update gpch version.
9734 (pch_init): Do not print executable_checksum to asm_out_file.
9735 Do not fail if there is no asm_out_file to read back from. Set
9736 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
9737 (c_common_write_pch): Verify that nothing was written to asm_out_file
9738 since pch_init was called. Do not write a c_pch_header, and do not
9739 copy from asm_out_file to the PCH.
9740 (c_common_read_pch): Do not read a c_pch_header, and do not restore
9741 the content of asm_out_file from the PCH.
9742 (c_common_print_pch_checksum): Remove.
9743 * c-opts.c (c_common_init): Print out executable_checksum directly.
9744
70f42967
SB
97452012-06-19 Steven Bosscher <steven@gcc.gnu.org>
9746
9747 * c-target.def (objc_declare_unresolved_class_reference,
9748 objc_declare_class_definition): Add new hooks.
9749
a8781821
SB
97502012-06-19 Steven Bosscher <steven@gcc.gnu.org>
9751
9752 * c-lex.c: Do not include output.h.
9753 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
9754 Remove uses of ASM_OUTPUT_IDENT.
9755
9e1a8dd1
RR
97562012-06-15 Marc Glisse <marc.glisse@inria.fr>
9757
9758 PR c++/51033
9759 * c-common.h (c_build_vec_perm_expr): Move decl here.
9760 * c-common.c (c_build_vec_perm_expr): Move definition
9761 here.
9762
6f07a821
SB
97632012-06-06 Steven Bosscher <steven@gcc.gnu.org>
9764
9765 * c.opt (fconserve-space): Turn into a no-op.
9766
9faeb493 97672012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
9768
9769 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
9770 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
9771 both the start and end of the function.
9772
a4b7d13c
SB
97732012-06-04 Steven Bosscher <steven@gcc.gnu.org>
9774
9775 * c-common.c: Do not include output.h.
9776 * c-pragma.c: Likewise.
9777
c265f413
SA
97782012-06-04 Steven Bosscher <steven@gcc.gnu.org>
9779
9780 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
9781 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
9782 (lang_decl_name): Handle namespace decls.
9783
be7a421e
SB
97842012-05-31 Steven Bosscher <steven@gcc.gnu.org>
9785
9786 * c-ada-spec.c: Do not include output.h.
9787 * c-semantics.c: Likewise.
9788
65de6659
JM
97892012-05-29 Joseph Myers <joseph@codesourcery.com>
9790
9791 * c-common.c: Fix typo.
9792
ca5f4331
MM
97932012-05-29 Michael Matz <matz@suse.de>
9794
9795 * c-common.h (c_expand_decl): Remove prototype.
9796
4f7f7aca
MLI
97972012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9798
9799 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
9800 * c-opts.c (c_common_handle_option): Remove code handling
9801 warn_missing_braces.
9802
4a792f9b
PC
98032012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
9804
9805 PR c++/25137
9806 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
9807 -Wmissing_braces.
9808
650dc14a
DS
98092012-05-22 Dodji Seketeli <dodji@redhat.com>
9810
9811 PR c++/53322
9812 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
9813
9b095bf1
MLI
98142012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
9815
9816 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
9817 * c-opts.c (c_common_handle_option): Do not handle explicitly
9818 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
9819
0b2c4be5
DS
98202012-05-16 Dodji Seketeli <dodji@redhat.com>
9821
9822 PR preprocessor/7263
ab20d992 9823 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
0b2c4be5
DS
9824 to cpp_classify_number. For diagnostics, use the precise location
9825 instead of the global input_location.
9826
a1bde5af
PC
98272012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
9828
d02924ef 9829 PR c++/11856
a1bde5af
PC
9830 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
9831
d1ede5f4
BS
98322012-05-14 Bernd Schmidt <bernds@codesourcery.com>
9833
a1bde5af 9834 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 9835
f2bc201f
MLI
98362012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
9837
9838 PR 53063
9839 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
9840 Wreorder): Use LangEnabledBy.
9841 * c-opts.c (c_common_handle_option): Do not enable them
9842 explicitly. Call lang-specific generated functions.
9843 (c_common_post_options): Do not set them here.
9844
95744782
MLI
98452012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
9846
9847 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
9848 Wmissing-field-initializers,Wmissing-parameter-type,
9849 Wold-style-declaration,Woverride-init): Use EnabledBy.
9850 * c-opts.c (c_common_post_options): Do not set here explicitly.
9851
7d5a5747
MLI
98522012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
9853
9854 PR 53063
9855 * c-opts.c (c_common_handle_option): Use handle_generated_option
9856 to enable sub-options.
9857
5a3c9cf2
PC
98582012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
9859
9860 PR c++/53158
9861 * c-common.c (warnings_for_convert_and_check): Use warning_at.
9862
3ac8781c
RG
98632012-05-10 Richard Guenther <rguenther@suse.de>
9864
9865 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
9866 adjust commentary about TYPE_IS_SIZETYPE types.
9867
1e537948
MLI
98682012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9869
9870 PR c++/53261
9871 * c-common.c (warn_logical_operator): Check that argument of
9872 integer_zerop is not NULL.
9873
f2c4a785
MLI
98742012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
9875
9876 PR c/43772
9877 * c-common.c (warn_logical_operator): Do not warn if either side
9878 is already true or false.
9879
50f305ca
MLI
98802012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
9881
9882 PR c/51712
9883 * c-common.c (expr_original_type): New.
9884 (shorten_compare): Do not warn for enumeration types.
9885
0c3641b0
MLI
98862012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
9887
9888 * c.opt (fpermissive): Add Var(flag_permissive).
9889
7edaa4d2
MG
98902012-04-30 Marc Glisse <marc.glisse@inria.fr>
9891
9892 PR c++/51033
9893 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
9894 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
9895
b9c8da34
DS
98962012-04-30 Dodji Seketeli <dodji@redhat.com>
9897
9898 Add -Wvarargs option
ab20d992 9899 * c.opt (Wvarargs): Define new option.
b9c8da34 9900
e6c69da0
MLI
99012012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9902
9903 * c-common.c (check_function_arguments): Replace
9904 Wmissing-format-attribute with Wsuggest-attribute=format.
9905
90137d8f
MLI
99062012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9907
9908 * c.opt (Wsuggest-attribute=format): New. Alias of
9909 Wmissing-format-attribute.
9910 * c-format.c (decode_format_type): Replace
9911 Wmissing-format-attribute with Wsuggest-attribute=format.
9912 (check_function_format): Likewise.
9913
9faeb493 99142012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
9915
9916 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
9917 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
9918 * c.opt: Add Wliteral-suffix.
9919
c1771a20
MLI
99202012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
9921
9922 PR c/44774
9923 * c.opt (Wpedantic): New.
9924 (pedantic): Alias Wpedantic.
9925 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
9926 (c_common_post_options): Likewise.
9927 (sanitize_cpp_opts): Likewise.
9928 * c-lex.c (interpret_float): Likewise.
9929 * c-format.c (check_format_types): Likewise.
9930 * c-common.c (pointer_int_sum): Likewise.
9931 (c_sizeof_or_alignof_type): Likewise.
9932 (c_add_case_label): Likewise.
9933 (c_do_switch_warnings): Likewise.
9934 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
9935
04b391c1
JM
99362012-04-15 Jason Merrill <jason@redhat.com>
9937
9938 PR c++/52818
9939 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
9940 (C_STD_NAME): Distinguish between C++98 and C++11.
9941
ac868f29
EB
99422012-04-11 Eric Botcazou <ebotcazou@adacore.com>
9943
9944 PR target/52624
9945 * c-common.h (uint16_type_node): Rename into...
9946 (c_uint16_type_node): ...this.
9947 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
9948 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
9949
fd4116f4
MLI
99502012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
9951
9952 * c-common.c (warn_if_unused_value): Move definition to here.
9953 * c-common.h (warn_if_unused_value): Move declaration to here.
9954
573ac65e
WB
99552012-03-23 William Bader <williambader@hotmail.com>
9956
9957 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
9958
552b8185
JM
99592012-03-20 Jason Merrill <jason@redhat.com>
9960
9961 * c-common.h (enum cxx_dialect): Add cxx1y.
9962 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
9963 test.
9964 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
9965 * c-opts.c (c_common_post_options): Likewise.
9966 (set_std_cxx1y): New.
9967 (c_common_handle_option): Call it.
9968 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
9969
04398fa8
PC
99702012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
9971
9972 PR c++/14710
9973 * c.opt ([Wuseless-cast]): Add.
9974
d2a12ae7
RG
99752012-03-16 Richard Guenther <rguenther@suse.de>
9976
9977 * c-pretty-print.c (pp_c_initializer_list): Adjust.
9978
a12bf402
MLI
99792012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9980
9981 PR c++/44783
9982 * c.opt (ftemplate-backtrace-limit) Add.
9983
5c30094f
RO
99842012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9985
9986 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
9987 handling.
9988 * c-pragma.c (handle_pragma_extern_prefix): Remove.
9989 (init_pragma): Don't register extern_prefix.
9990
21fa2faf
RG
99912012-03-12 Richard Guenther <rguenther@suse.de>
9992
9993 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
9994 (builtin_type_for_size): Likewise.
9995
e3793c6f
JJ
99962012-02-13 Jakub Jelinek <jakub@redhat.com>
9997
9998 PR c++/52215
9999 * c-common.c (sync_resolve_params): Don't decide whether to convert
10000 or not based on TYPE_SIZE comparison, convert whenever arg_type
10001 is unsigned INTEGER_TYPE.
10002
93286335
PC
100032012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
10004
10005 PR c/52118
10006 * c.opt ([Wunused-local-typedefs]): Fix description.
10007
7a421706
MS
100082012-01-24 Mike Stump <mikestump@comcast.net>
10009
10010 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
10011 exactly.
10012
ba9b1f11
RG
100132012-01-18 Richard Guenther <rguenther@suse.de>
10014
10015 * c-opts.c (c_common_post_options): Reset LTO flags if
10016 we are about to generate a PCH.
10017
465406be
PC
100182012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
10019
10020 PR c++/51777
10021 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
10022 use pp_unsigned_wide_integer.
10023
aee15221
RG
100242012-01-10 Richard Guenther <rguenther@suse.de>
10025
10026 PR middle-end/51806
10027 * c-opts.c (c_common_handle_option): Move -Werror handling
10028 to language independent code.
10029
5720c0dc
RG
100302012-01-05 Richard Guenther <rguenther@suse.de>
10031
10032 PR middle-end/51764
10033 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
10034 from common.opt.
10035
73ac190a
PC
100362011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
10037
10038 PR c++/51316
10039 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
10040 of array types with an unknown bound.
10041
48b0b196
JM
100422011-12-20 Joseph Myers <joseph@codesourcery.com>
10043
10044 * c-common.c (flag_isoc99): Update comment to refer to C11.
10045 (flag_isoc1x): Change to flag_isoc11.
10046 * c-common.h (flag_isoc99): Update comment to refer to C11.
10047 (flag_isoc1x): Change to flag_isoc11.
10048 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
10049 C11.
10050 * c-opts.c (set_std_c1x): Change to set_std_c11.
10051 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
10052 Call set_std_c11.
10053 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
10054 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
10055 * c.opt (std=c1x): Change to std=c11. Document as non-draft
10056 standard.
10057 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
10058 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
10059 (std=gnu1x): Make alias of std=gnu11.
10060
d58d6eb5
JM
100612011-12-19 Jason Merrill <jason@redhat.com>
10062
10063 PR c++/51228
10064 * c-common.c (handle_transparent_union_attribute): Check the first
10065 field if the type is complete.
10066
b3908fcc
JW
100672011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
10068
10069 PR libstdc++/51365
10070 * c-common.c (RID_IS_FINAL): Add.
10071 * c-common.h (RID_IS_FINAL): Add.
10072
fea3ca91
IS
100732011-11-30 Iain Sandoe <iains@gcc.gnu.org>
10074
10075 * c.opt (fgnu-runtime): Provide full description.
10076 (fnext-runtime): Likewise.
10077 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
10078
62bad7cd
AM
100792011-11-28 Andrew MacLeod <amacleod@redhat.com>
10080
10081 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
10082 predefines in one place. Add LOCK_FREE predefines.
10083 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
10084 new func.
10085
c466c4ff
AM
100862011-11-24 Andrew MacLeod <amacleod@redhat.com>
10087
10088 PR c/51256
9faeb493 10089 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 10090 conditions
9faeb493
UB
10091 (resolve_overloaded_atomic_exchange,
10092 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
10093 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
10094 error_mark_node for error conditions.
9faeb493 10095
a5952633
RG
100962011-11-08 Richard Guenther <rguenther@suse.de>
10097
10098 PR middle-end/51010
ab20d992 10099 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
a5952633 10100
0a35513e
AH
101012011-11-07 Richard Henderson <rth@redhat.com>
10102 Aldy Hernandez <aldyh@redhat.com>
10103 Torvald Riegel <triegel@redhat.com>
10104
10105 Merged from transactional-memory.
10106
10107 * c-common.c (handle_tm_wrap_attribute,
10108 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
10109 (struct c_common_reswords): Added __transaction* keywords.
10110 (struct c_common_attribute_table): Added transaction* and tm_regparm
10111 attributes.
10112 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
10113 masks.
10114 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
10115 find_tm_attribute): Declare.
10116
6d87092d
JM
101172011-11-07 Jason Merrill <jason@redhat.com>
10118
10119 PR c++/35688
10120 * c-common.c, c-common.h: Revert yesterday's changes.
10121
8e7860a1
JM
101222011-11-06 Jason Merrill <jason@redhat.com>
10123
10124 PR c++/35688
10125 * c-common.c (decl_has_visibility_attr): Split out from...
10126 (c_determine_visibility): ...here.
10127 * c-common.h: Declare it.
10128
d19fa6b5
JM
101292011-11-06 Joseph Myers <joseph@codesourcery.com>
10130
10131 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
10132 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
10133 type.
10134 (check_user_alignment): New. Split out of
10135 handle_aligned_attribute. Disallow integer constants with
10136 noninteger types. Conditionally allow zero.
10137 (handle_aligned_attribute): Use check_user_alignment.
10138 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
10139
86951993
AM
101402011-11-06 Andrew MacLeod <amacleod@redhat.com>
10141 Richard Henderson <rth@redhat.com>
10142
10143 Merged from cxx-mem-model.
10144
10145 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 10146 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
10147 parameters that are the same type size.
10148 (get_atomic_generic_size): New. Find size of generic
10149 atomic function parameters and do typechecking.
10150 (add_atomic_size_parameter): New. Insert size into parameter list.
10151 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
10152 either __atomic_exchange_n or external library call.
9faeb493 10153 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 10154 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 10155 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
10156 __atomic_load_n or an external library call.
10157 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
10158 __atomic_store_n or an external library call.
10159 (resolve_overloaded_builtin): Handle new __atomic builtins.
10160
cf9e9959
EB
101612011-11-04 Eric Botcazou <ebotcazou@adacore.com>
10162
10163 PR c++/50608
10164 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
10165 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
10166 <INDIRECT_REF>: Return the argument.
10167 <ARRAY_REF>: Remove special code for negative offset.
10168 Call fold_build_pointer_plus instead of size_binop.
10169 (fold_offsetof): Remove STOP_REF argument and adjust.
10170 * c-common.h (fold_offsetof_1): Declare.
10171 (fold_offsetof): Remove STOP_REF argument.
10172
25339f10
JM
101732011-11-02 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
89401152
PC
101812011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
10182
10183 PR c++/44277
10184 * c.opt: Add Wzero-as-null-pointer-constant.
10185
97e3ad20
JM
101862011-10-31 Jason Merrill <jason@redhat.com>
10187
15694fdd
JM
10188 * c.opt (-fdeduce-init-list): Off by default.
10189
97e3ad20
JM
10190 PR c++/50920
10191 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
10192 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
10193 and -Wc++11-compat.
10194 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
10195
fb9120e3
RAV
101962011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
10197
10198 PR c++/30066
10199 * c.opt (fvisibility-inlines-hidden): Description change.
10200
3ce4f9e4
ESR
102012011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
10202
10203 Implement C++11 user-defined literals.
10204 * c-common.c (build_userdef_literal): New.
10205 * c-common.def: New tree code.
10206 * c-common.h (tree_userdef_literal): New tree struct and accessors.
10207 * c-lex.c (interpret_float): Add suffix parm.
10208 (c_lex_with_flags): Build literal tokens.
10209
5f53c243
PC
102102011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
10211
10212 PR c++/50841
10213 Revert:
10214 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
10215
10216 PR c++/50810
10217 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
10218 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
10219 Wnarrowing for C++0x and C++98.
10220 * c.opt ([Wnarrowing]): Update.
10221
263734e1
PC
102222011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
10223
10224 PR c++/50810
10225 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
10226 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
10227 Wnarrowing for C++0x and C++98.
10228 * c.opt ([Wnarrowing]): Update.
10229
d2e312d7
PC
102302011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
10231
10232 PR c++/45385
10233 * c-common.c (conversion_warning): Remove code looking for
10234 artificial operands.
10235
d17687f6
DS
102362011-10-18 Dodji Seketeli <dodji@redhat.com>
10237
10238 PR bootstrap/50760
10239 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 10240 !NO_IMPLICIT_EXTERN_C.
d17687f6 10241
fc8396e9
PC
102422011-10-17 Michael Spertus <mike_spertus@symantec.com>
10243
10244 * c-common.c (c_common_reswords): Add __bases,
10245 __direct_bases.
10246 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
10247
102482011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
10249
10250 PR c++/50757
10251 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
10252
847e697a
TT
102532011-10-15 Tom Tromey <tromey@redhat.com>
10254 Dodji Seketeli <dodji@redhat.com>
10255
10256 * c.opt (fdebug-cpp): New option.
10257 * c-opts.c (c_common_handle_option): Handle the option.
10258 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
10259 output stream in parameter. Factorized from ...
10260 (maybe_print_line): ... this. Dump location debug information when
10261 -fdebug-cpp is in effect.
10262 (print_line_1): New static function. Takes an output stream in
10263 parameter. Factorized from ...
10264 (print_line): ... here. Dump location information when -fdebug-cpp
10265 is in effect.
10266 (scan_translation_unit): Dump location information when
10267 -fdebug-cpp is in effect.
10268
92582b75
TT
102692011-10-15 Tom Tromey <tromey@redhat.com>
10270 Dodji Seketeli <dodji@redhat.com>
10271
10272 * c.opt (ftrack-macro-expansion): New option. Handle it with and
10273 without argument.
10274 * c-opts.c (c_common_handle_option)<case
10275 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
10276 cases. Handle -ftrack-macro-expansion with and without argument.
10277
46427374
TT
102782011-10-15 Tom Tromey <tromey@redhat.com>
10279 Dodji Seketeli <dodji@redhat.com>
10280
10281 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
10282 (print_line, cb_define, do_line_change): Adjust to avoid touching
10283 the internals of struct line_map. Use the public API instead.
10284 * c-pch.c (c_common_read_pch): Likewise.
10285 * c-lex.c (fe_file_change): Likewise.
10286
fc8396e9
PC
102872011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
10288
10289 PR c++/17212
10290 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
10291
102922011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
10293
10294 PR c++/33067
10295 * c-pretty-print.c (pp_c_floating_constant): Output
10296 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
10297
e79983f4
MM
102982011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
10299
10300 * c-common.c (def_builtin_1): Delete old interface with two
10301 parallel arrays to hold standard builtin declarations, and replace
10302 it with a function based interface that can support creating
10303 builtins on the fly in the future. Change all uses, and poison
10304 the old names. Make sure 0 is not a legitimate builtin index.
10305 * c-omp.c (c_finish_omp_barrier): Ditto.
10306 (c_finish_omp_taskwait): Ditto.
10307 (c_finish_omp_flush): Ditto.
10308
6637388f
TG
103092011-10-11 Tristan Gingold <gingold@adacore.com>
10310
10311 * c.opt: (fallow-parameterless-variadic-functions): New.
10312
3797cb21
DS
103132011-09-08 Dodji Seketeli <dodji@redhat.com>
10314
10315 PR c++/33255 - Support -Wunused-local-typedefs warning
10316 * c-common.h (struct c_language_function::local_typedefs): New
10317 field.
9faeb493
UB
10318 (record_locally_defined_typedef, maybe_record_typedef_use)
10319 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 10320 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
10321 (maybe_record_typedef_use)
10322 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
10323 * c.opt: Declare new -Wunused-local-typedefs flag.
10324
693ddb1b
EB
103252011-09-06 Eric Botcazou <ebotcazou@adacore.com>
10326
10327 PR middle-end/50266
10328 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
10329 computations.
10330
830c740f
RG
103312011-09-05 Richard Guenther <rguenther@suse.de>
10332
10333 * c-common.c (complete_array_type): Use ssize_int (-1) instead
10334 of integer_minus_one_node for empty array upper bounds.
10335
892a371f
DS
103362011-08-28 Dodji Seketeli <dodji@redhat.com>
10337
10338 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
10339 it's the first time it's being called on this main TU.
10340
0e3fdb48
RB
103412011-08-24 Richard Guenther <rguenther@suse.de>
10342
10343 PR c/49396
10344 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
10345
103462011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
10347
10348 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
10349 defined in cpp_init_builtins and c_cpp_builtins.
10350
d4a83c10
JM
103512011-08-19 Joseph Myers <joseph@codesourcery.com>
10352
10353 * c-common.c (c_common_reswords): Add __builtin_complex.
10354 * c-common.h (RID_BUILTIN_COMPLEX): New.
10355
bbceee64
JM
103562011-08-18 Joseph Myers <joseph@codesourcery.com>
10357
10358 * c-common.c (c_common_reswords): Add _Noreturn.
10359 (keyword_is_function_specifier): Handle RID_NORETURN.
10360 * c-common.h (RID_NORETURN): New.
10361
3f8257db 103622011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
10363
10364 * c-common.c (unsafe_conversion_p): New function. Check if it is
10365 unsafe to convert an expression to the type.
10366 (conversion_warning): Adjust, use unsafe_conversion_p.
10367 * c-common.h (unsafe_conversion_p): New function declaration.
10368
20906c66
JJ
103692011-08-02 Jakub Jelinek <jakub@redhat.com>
10370
10371 * c-common.h (c_finish_omp_atomic): Adjust prototype.
10372 (c_finish_omp_taskyield): New prototype.
10373 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
10374 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
10375 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
10376 or RHS1 have side-effects, evaluate those too in the right spot,
10377 if it is a decl and LHS is also a decl, error out if they
10378 aren't the same.
10379 (c_finish_omp_taskyield): New function.
10380 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
10381 * c-pragma.c (omp_pragmas): Add taskyield.
10382 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
10383 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
10384 PRAGMA_OMP_CLAUSE_MERGEABLE.
10385
770e5a2e
DS
103862011-07-25 Dodji Seketeli <dodji@redhat.com>
10387
10388 * c-common.h (set_underlying_type): Remove parm name from
10389 declaration.
10390
1baae426
RG
103912011-07-25 Romain Geissler <romain.geissler@gmail.com>
10392
10393 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 10394
fcb21722
JM
103952011-07-22 Jason Merrill <jason@redhat.com>
10396
76f86d00
JM
10397 PR c++/49793
10398 * c.opt (Wnarrowing): New.
10399
3a636414
JM
10400 PR c++/30112
10401 * c-common.h: Declare c_linkage_bindings.
10402 * c-pragma.c (handle_pragma_redefine_extname): Use it.
10403
fcb21722
JM
10404 PR c++/49813
10405 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
10406 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
10407 as flag_isoc99 for 'restrict'.
10408 (pp_c_specifier_qualifier_list): Likewise for _Complex.
10409
02614448
ILT
104102011-07-21 Ian Lance Taylor <iant@google.com>
10411
10412 PR middle-end/49705
10413 * c-common.c (c_disable_warnings): New static function.
10414 (c_enable_warnings): New static function.
10415 (c_fully_fold_internal): Change local unused_p to bool. Call
10416 c_disable_warnings and c_enable_warnings rather than change
10417 c_inhibit_evaluation_warnings.
10418
34429675
JM
104192011-07-20 Jason Merrill <jason@redhat.com>
10420
10421 PR c++/6709 (DR 743)
10422 PR c++/42603 (DR 950)
10423 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
10424 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
10425 (CPP_DECLTYPE): New.
10426 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
10427
5d49b6a7
RG
104282011-07-19 Richard Guenther <rguenther@suse.de>
10429
10430 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
10431 * c-omp.c (c_finish_omp_for): Likewise.
10432
e84a58ff
EB
104332011-07-12 Eric Botcazou <ebotcazou@adacore.com>
10434
10435 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
10436 body on the next line.
10437
329af3c7
JM
104382011-07-08 Jason Merrill <jason@redhat.com>
10439
4063e61b
JM
10440 PR c++/45437
10441 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
10442
329af3c7
JM
10443 PR c++/49673
10444 * c-common.c (c_apply_type_quals_to_decl): Don't check
10445 TYPE_NEEDS_CONSTRUCTING.
10446
1a072294
RG
104472011-07-06 Richard Guenther <rguenther@suse.de>
10448
10449 * c-common.c (c_common_nodes_and_builtins):
10450 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
10451
fce5dddd
RG
104522011-07-05 Richard Guenther <rguenther@suse.de>
10453
10454 * c-common.c (c_common_nodes_and_builtins): Build all common
10455 tree nodes first.
10456
45d439ac
JJ
104572011-06-27 Jakub Jelinek <jakub@redhat.com>
10458
56300785
JJ
10459 * c-common.h (c_tree_chain_next): New static inline function.
10460
45d439ac
JJ
10461 * c-common.c (check_builtin_function_arguments): Handle
10462 BUILT_IN_ASSUME_ALIGNED.
10463
e0a8ecf2
AM
104642011-06-21 Andrew MacLeod <amacleod@redhat.com>
10465
10466 * c-common.c: Add sync_ or SYNC__ to builtin names.
10467 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
10468
104692011-06-20 Pierre Vittet <piervit@pvittet.com>
10470
10471 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
10472 handler.
10473 (gen_pragma_handler): New union.
10474 (internal_pragma_handler): New type.
10475 (c_register_pragma_with_data)
10476 (c_register_pragma_with_expansion_and_data): New functions.
10477
10478 * c-pragma.c (registered_pragmas, c_register_pragma_1)
10479 (c_register_pragma, c_register_pragma_with_expansion)
10480 (c_invoke_pragma_handler): Changed to work with
10481 internal_pragma_handler.
10482 (c_register_pragma_with_data)
10483 (c_register_pragma_with_expansion_and_data): New functions.
10484
677f3fa8
JM
104852011-06-14 Joseph Myers <joseph@codesourcery.com>
10486
10487 * c-common.c: Include common/common-target.h.
10488 (handle_section_attribute): Use
10489 targetm_common.have_named_sections.
10490 * c-cppbuiltin.c: Include common/common-target.h.
10491 (c_cpp_builtins): Use targetm_common.except_unwind_info.
10492
d7fc8c14
RG
104932011-06-10 Richard Guenther <rguenther@suse.de>
10494
10495 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
10496 to print a IDENTIFIER_NODE.
10497
10e48e39
RO
104982011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10499 Joseph Myers <joseph@codesourcery.com>
10500
10501 * c.opt (fbuilding-libgcc): New option.
10502 * c-cppbuiltin.c (c_cpp_builtins): Define
10503 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
10504
6976ae51
JM
105052011-06-07 Jason Merrill <jason@redhat.com>
10506
3ff60975
JM
10507 * c-common.c (max_tinst_depth): Lower default to 900.
10508
6976ae51
JM
10509 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
10510
009db074
RG
105112011-06-07 Richard Guenther <rguenther@suse.de>
10512
10513 * c-common.c (c_common_nodes_and_builtins): Do not set
10514 size_type_node or call set_sizetype.
10515
b4592b92
DS
105162011-06-07 Dodji Seketeli <dodji@redhat.com>
10517
10518 PR debug/49130
10519 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 10520 type when using pointer comparison to compare types.
b4592b92 10521
014ab419
JW
105222011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
10523
10524 * c.opt: Add -Wdelete-non-virtual-dtor.
10525 * c-opts.c (c_common_handle_option): Include it in -Wall.
10526
4f60111f
NF
105272011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
10528
10529 PR bootstrap/49190
10530
10531 Revert:
10532 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
10533
10534 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
10535 not tree_common.
10536
4cc4f2f4
JJ
105372011-05-27 Jakub Jelinek <jakub@redhat.com>
10538
10539 PR c++/49165
10540 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
10541 C++ don't call c_common_truthvalue_conversion on void type arms.
10542
38e01f9e
NF
105432011-05-27 Nathan Froyd <froydnj@codesourcery.com>
10544
10545 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
10546 (stmt_list_stack): Define.
10547 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
10548 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
10549
92e948a8
NF
105502011-05-26 Nathan Froyd <froydnj@codesourcery.com>
10551
10552 * c-common.c (warning_candidate_p): Check for BLOCKs.
10553
a2fc3e63
NF
105542011-05-26 Nathan Froyd <froydnj@codesourcery.com>
10555
10556 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
10557 not tree_common.
10558
0957c029
JJ
105592011-05-25 Jakub Jelinek <jakub@redhat.com>
10560
10561 * c-common.c (def_fn_type): Remove extra va_end.
10562
828fb3ba
JM
105632011-05-23 Jason Merrill <jason@redhat.com>
10564
10565 PR c++/48106
10566 * c-common.c (c_common_get_narrower): New.
10567 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
10568
dde05067
NF
105692011-05-23 Nathan Froyd <froydnj@codesourcery.com>
10570
10571 * c-common.h (check_function_arguments): Tweak prototype of
10572 check_function_arguments.
10573 * c-common.c (check_function_arguments): Likewise. Adjust
10574 calls to check_function_nonnull, check_function_format, and
10575 check_function_sentinel.
10576 (check_function_sentinel): Take a FUNCTION_TYPE rather than
10577 separate attributes and typelist arguments. Use
10578 FOREACH_FUNCTION_ARGS to iterate over argument types.
10579
3c0d13bf
PC
105802011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
10581
10582 * c-common.c (c_common_reswords): Reorder.
10583 * c-common.h (rid): Likewise.
10584
8242dd04
NF
105852011-05-10 Nathan Froyd <froydnj@codesourcery.com>
10586
10587 * c-common.c (def_fn_type): Don't call build_function_type, call
10588 build_function_type_array or build_varargs_function_type_array
10589 instead.
10590 (c_common_nodes_and_builtins): Likewise.
10591
3d528853
NF
105922011-05-05 Nathan Froyd <froydnj@codesourcery.com>
10593
10594 * c-common.c (c_add_case_label): Omit the loc argument to
10595 build_case_label.
10596 * c-common.h (build_case_label): Remove.
10597 * c-semantics.c (build_case_label): Remove.
10598
a04a722b
JM
105992011-05-05 Joseph Myers <joseph@codesourcery.com>
10600
10601 * c-objc.h (objc_start_method_definition): Update prototype.
10602 * stub-objc.c (objc_start_method_definition): Add extra parameter.
10603
e19a18d4
NF
106042011-05-04 Nathan Froyd <froydnj@codesourcery.com>
10605
10606 * c-common.c (check_main_parameter_types): Reindent. Don't use
10607 TYPE_ARG_TYPES directly.
10608 (handle_nonnull_attribute): Likewise.
10609 (sync_resolve_params): Likewise.
10610 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
10611 to check_format_string.
10612 (handle_format_attribute): Likewise.
10613 (check_format_string): Take a function type to examine instead of
10614 a type list. Use a function_arg_iterator to step through argument
10615 types.
10616
c62c040f
RG
106172011-05-04 Richard Guenther <rguenther@suse.de>
10618
10619 * c-common.c (fix_string_type): Use size_int for index type bounds.
10620 (start_fname_decls): Do not pass NULL to build_int_cst.
10621 (c_init_attributes): Likewise.
10622 * c-lex.c (c_lex_with_flags): Likewise.
10623
c12ff9d8
JM
106242011-04-27 Jason Merrill <jason@redhat.com>
10625
10626 * c-common.c (make_tree_vector_from_list): New.
10627 * c-common.h: Declare it.
10628
304dfbe3
RG
106292011-04-26 Richard Guenther <rguenther@suse.de>
10630
10631 PR preprocessor/48248
10632 * c-ppoutput.c (maybe_print_line): Always optimize newlines
10633 for output size with -P.
10634
3c0d13bf
PC
106352011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
10636
10637 * c-common.c (struct c_common_resword): Add __underlying_type.
10638 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
10639
04695783
JM
106402011-04-20 Jim Meyering <meyering@redhat.com>
10641
10642 * c-format.c (init_dollar_format_checking): Remove useless
10643 if-before-free.
10644
0dc33c3c
NP
106452011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
10646
10647 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 10648 (objc_detect_field_duplicates): New.
0dc33c3c 10649 * stub-objc.c: Likewise.
3c0d13bf 10650
c59633d9
NP
106512011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
10652
10653 * stub-objc.c (objc_declare_protocols): Renamed to
10654 objc_declare_protocol.
10655 * c-objc.h: Likewise.
3c0d13bf 10656
32dabdaf
NP
106572011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
10658
10659 * stub-objc.c (objc_declare_class): Updated argument name.
10660
81f653d6
NF
106612011-04-12 Nathan Froyd <froydnj@codesourcery.com>
10662
10663 * c-common.h (c_common_init_ts): Declare.
10664 * c-common.c (c_common_init_ts): Define.
10665
eb345401
NP
106662011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
10667
10668 * c-objc.h (objc_build_message_expr): Updated prototype.
10669 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 10670
a358e188
MJ
106712011-04-12 Martin Jambor <mjambor@suse.cz>
10672
10673 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
10674 of cgraph_node.
10675
e6313a78
RG
106762011-04-11 Richard Guenther <rguenther@suse.de>
10677
10678 * c-common.c (complete_array_type): Build a range type of
10679 proper type.
10680
dcf0c47e
NF
106812011-04-08 Nathan Froyd <froydnj@codesourcery.com>
10682
10683 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
10684 (handle_type_generic_attribute): Likewise.
10685
1ee44b26
JM
106862011-04-07 Jason Merrill <jason@redhat.com>
10687
10688 PR c++/48450
10689 * c-common.c (c_common_truthvalue_conversion): Don't ignore
10690 conversion from C++0x scoped enum.
10691
acce4e77
JM
106922011-04-06 Joseph Myers <joseph@codesourcery.com>
10693
10694 * c-target-def.h: New file.
10695 * c-target.def: New file.
10696 * c-target.h: New file.
10697 * c-common.c (targetcm): Don't define here.
10698 * c-common.h (default_handle_c_option): Declare.
10699 * c-format.c: Include c-target.h instead of target.h.
10700 * c-opts.c: Include c-target.h instead of target.h. Explicitly
10701 include tm.h.
10702 (default_handle_c_option): Move from targhooks.c.
10703
e2eefb55
JJ
107042011-03-29 Jakub Jelinek <jakub@redhat.com>
10705
10706 PR preprocessor/48248
10707 * c-ppoutput.c (print): Add src_file field.
10708 (init_pp_output): Initialize it.
10709 (maybe_print_line): Don't optimize by adding up to 8 newlines
10710 if map->to_file and print.src_file are different file.
10711 (print_line): Update print.src_file.
10712
ba78087b
KT
107132011-03-25 Kai Tietz <ktietz@redhat.com>
10714
10715 * c-ada-spec.c (compare_comment): Use filename_cmp
10716 instead of strcmp for filename.
10717
0edf1bb2
JL
107182011-03-25 Jeff Law <law@redhat.com>
10719
adfac8df 10720 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 10721
c7dc8804
JM
107222011-03-25 Jason Merrill <jason@redhat.com>
10723
10724 * c.opt: Add -std=c++03.
10725
d1d879b1
EB
107262011-03-22 Eric Botcazou <ebotcazou@adacore.com>
10727
10728 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
10729
3f8257db 107302011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
10731
10732 PR target/12171
5050afdf
KT
10733 * c-pretty-print.c (pp_c_specifier_qualifier_list):
10734 Display allowed attributes for function pointer types.
10735 (pp_c_attributes_display): New function to display
10736 attributes having affects_type_identity flag set to true.
10737 * c-pretty-print.h (pp_c_attributes_display): New prototype.
10738
62d784f7
KT
10739 * c-common.c (c_common_attribute_table):
10740 Add new element.
10741 (c_common_format_attribute_table): Likewise.
10742
82d37118
JM
107432011-03-18 Jason Merrill <jason@redhat.com>
10744
49a000c3
JM
10745 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
10746 * c-common.h: Don't declare it here.
10747 * c-common.c: Or define it here.
10748 * c-opts.c (c_common_handle_option): Or set it here.
10749
82d37118
JM
10750 PR c++/35315
10751 * c-common.c (handle_transparent_union_attribute): Don't
10752 make a duplicate type in C++.
10753
17bc631c
JM
107542011-03-15 Jason Merrill <jason@redhat.com>
10755
10756 * c-common.c (max_constexpr_depth): New.
10757 * c-common.h: Declare it.
10758 * c-opts.c (c_common_handle_option): Set it.
10759 * c.opt (fconstexpr-depth): New option.
10760
1b9b91a6
JM
107612011-03-11 Jason Merrill <jason@redhat.com>
10762
f231b5ff
JM
10763 * c-common.c (attribute_takes_identifier_p): Add missing const.
10764
1b9b91a6
JM
10765 PR c++/46803
10766 * c-common.c (attribute_takes_identifier_p): Assume that an
10767 unknown attribute takes an identifier.
10768
a19e4d44
NF
107692011-03-07 Nathan Froyd <froydnj@codesourcery.com>
10770
10771 PR c/47786
10772 * c-common.c (c_type_hash): Call list_length instead of iterating
10773 through DECL_CHAIN. Rename 'i' to 'n_elements'.
10774
982d62f6
JJ
107752011-02-19 Jakub Jelinek <jakub@redhat.com>
10776
10777 PR c/47809
10778 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
10779
0a256240
NP
107802011-02-17 Iain Sandoe <iains@gcc.gnu.org>
10781
10782 * c.opt (fobjc-abi-version=) New.
10783 (fobjc-nilcheck): New.
10784
ba9e6dd5
NF
107852011-02-03 Nathan Froyd <froydnj@codesourcery.com>
10786
10787 PR c++/46890
10788 * c-common.h (keyword_is_decl_specifier): Declare.
10789 * c-common.c (keyword_is_decl_specifier): Define.
10790 (keyword_is_function_specifier): New function.
10791
7273813a
JJ
107922011-01-26 Jakub Jelinek <jakub@redhat.com>
10793
10794 PR c/47473
10795 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
10796 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
10797 REAL_TYPE.
10798
908ef79b
AC
107992011-01-26 Arnaud Charlet <charlet@adacore.com>
10800
10801 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
10802
237e9384
JJ
108032011-01-26 Jakub Jelinek <jakub@redhat.com>
10804
10805 PR pch/47430
10806 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
10807 after init_c_lex if pch_file is set.
10808
47ea1edf
DK
108092011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
10810
d4dba752 10811 PR c++/43601
47ea1edf
DK
10812 * c.opt (-fkeep-inline-dllexport): New switch.
10813
2aa9c6ae
RG
108142011-01-12 Richard Guenther <rguenther@suse.de>
10815
10816 PR middle-end/32511
10817 * c-common.c (handle_weak_attribute): Warn instead of error
10818 on declaring an inline function weak.
10819
7bd11157
TT
108202011-01-05 Tom Tromey <tromey@redhat.com>
10821
10822 * c-common.h (lvalue_error): Update.
10823 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
10824 not error.
10825
0e66e494 108262010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 10827
b4f588c4
NP
10828 PR objc/47075
10829 * c-objc.h (objc_finish_message_expr): Added argument to
10830 prototype.
10831
f4da8dce
NF
108322010-12-22 Nathan Froyd <froydnj@codesourcery.com>
10833
10834 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
10835 Use prototype_p.
10836
46270f14
NP
108372010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
10838
10839 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 10840 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 10841
4816c593
NF
108422010-12-10 Nathan Froyd <froydnj@codesourcery.com>
10843
10844 * c-common.h (readonly_error): Declare.
10845 * c-common.c (readonly_error): Define.
10846
7a6daeb0
NF
108472010-12-09 Nathan Froyd <froydnj@codesourcery.com>
10848
10849 * c-common.h (invalid_indirection_error): Declare.
10850 * c-common.c (invalid_indirection_error): Define.
10851
892f6119
RG
108522010-12-03 Richard Guenther <rguenther@suse.de>
10853
10854 PR c/46745
10855 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
10856 (pp_c_unary_expression): Likewise.
10857 (pp_c_expression): Likewise.
10858
6c39e757
NP
108592010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
10860
10861 * c-common.h (objc_finish_function): New.
10862 (objc_non_volatilized_type): Removed.
10863 (objc_type_quals_match): Removed.
10864 * stub-objc.c (objc_finish_function): New.
10865 (objc_non_volatilized_type): Removed.
10866 (objc_type_quals_match): Removed.
9faeb493 10867
7c475d11
JM
108682010-11-30 Joseph Myers <joseph@codesourcery.com>
10869
10870 * c-common.h (parse_optimize_options): Declare.
10871 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
10872 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
10873
71f3e391
JM
108742010-11-29 Joseph Myers <joseph@codesourcery.com>
10875
10876 * c-opts.c (check_deps_environment_vars): Use getenv instead of
10877 GET_ENVIRONMENT.
10878 * c-pch.c (O_BINARY): Don't define here.
10879 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
10880
d5fabb58
JM
108812010-11-25 Joseph Myers <joseph@codesourcery.com>
10882
10883 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
10884 targetm.except_unwind_info.
10885
299404a1
JM
108862010-11-23 Joseph Myers <joseph@codesourcery.com>
10887
10888 * c-opts.c (c_common_handle_option): Pass location to
10889 set_struct_debug_option.
10890
c98cd5bf
JM
108912010-11-23 Joseph Myers <joseph@codesourcery.com>
10892
10893 * c-common.c (visibility_options): Move from ../opts.c.
10894 * c-common.h (struct visibility_flags, visibility_options):
10895 Declare here.
10896 * c-opts.c (finish_options): Rename to c_finish_options.
10897 (c_common_init): Update call to finish_options.
10898
a9546771
NP
108992010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
10900
10901 PR objc/34033
10902 * c-lex.c (lex_string): Check that each string in an Objective-C
10903 string concat sequence starts with either one or zero '@', and
10904 that there are no spurious '@' signs at the end.
10905
24a57808
JM
109062010-11-20 Joseph Myers <joseph@codesourcery.com>
10907
10908 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
10909 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
10910 HANDLE_PRAGMA_VISIBILITY.
10911 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
10912 HANDLE_PRAGMA_VISIBILITY): Don't define.
10913 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
10914
a9aa2c3a
NF
109152010-11-20 Nathan Froyd <froydnj@codesourcery.com>
10916
10917 PR c++/16189
10918 PR c++/36888
10919 PR c++/45331
10920 * c-common.h (keyword_begins_type_specifier): Declare.
10921 (keyword_is_storage_class_specifier): Declare.
10922 (keyword_is_type_qualifier): Declare.
10923 * c-common.c (keyword_begins_type_specifier): New function.
10924 (keyword_is_storage_class_specifier): New function.
10925 (keyword_is_type_qualifier): Declare.
10926
5386338c
JM
109272010-11-19 Joseph Myers <joseph@codesourcery.com>
10928
10929 PR c/46547
10930 * c-common.c (in_late_binary_op): Define.
10931 (c_common_truthvalue_conversion): Check in_late_binary_op before
10932 calling c_save_expr.
10933 * c-common.h (in_late_binary_op): Declare.
10934
69ccdddb
JM
109352010-11-19 Joseph Myers <joseph@codesourcery.com>
10936
10937 * c-opts.c (c_common_handle_option): Update calls to
10938 set_struct_debug_option.
10939
6b192a09
NP
109402010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
10941
10942 * c-common.h (objc_declare_protocols): Added additional argument.
10943 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 10944
fb52b50a
NF
109452010-11-18 Nathan Froyd <froydnj@codesourcery.com>
10946
10947 PR c/33193
10948 * c-common.h (build_real_imag_expr): Declare.
10949 * c-semantics.c (build_real_imag_expr): Define.
10950
b37421c6
JM
109512010-11-17 Joseph Myers <joseph@codesourcery.com>
10952
10953 * c-opts.c (c_common_parse_file): Take no arguments.
10954 * c-common.h (c_common_parse_file): Update prototype.
10955
07078664
JJ
109562010-11-16 Jakub Jelinek <jakub@redhat.com>
10957
10958 PR c++/46401
10959 * c-common.c (warning_candidate_p): Don't track non-const calls
10960 or STRING_CSTs.
10961
c6a13190
ILT
109622010-11-15 Ian Lance Taylor <iant@google.com>
10963
10964 * c-lex.c (init_c_lex): Set macro debug callbacks if
10965 flag_dump_go_spec is set.
10966
925e8657
NP
109672010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
10968
10969 * c-common.h (objc_build_incr_expr_for_property_ref): New.
10970 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
10971
bb0a9581
NF
109722010-11-15 Nathan Froyd <froydnj@codesourcery.com>
10973
10974 PR preprocessor/45038
10975 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
10976 dialects.
10977
c5fa0890
JM
109782010-11-12 Joseph Myers <joseph@codesourcery.com>
10979
10980 * c-common.h (c_family_lang_mask): Declare.
10981 * c-opts.c (c_family_lang_mask): Make extern.
10982 * c-pragma.c (handle_pragma_diagnostic): Use
10983 control_warning_option.
10984
a4d8c676
JM
109852010-11-12 Joseph Myers <joseph@codesourcery.com>
10986
10987 * c-common.c (parse_optimize_options): Update call to
10988 decode_options.
10989 * c-common.h (c_common_handle_option): Update prototype.
10990 * c-opts.c (c_common_handle_option): Take location_t parameter and
10991 pass it to other functions.
10992
f954bd2c
JM
109932010-11-11 Joseph Myers <joseph@codesourcery.com>
10994
10995 * c-opts.c (warning_as_error_callback): Remove.
10996 (c_common_initialize_diagnostics): Don't call
10997 register_warning_as_error_callback.
10998 (c_common_handle_option): Handle -Werror=normalized= here.
10999
d8a07487
JM
110002010-11-10 Joseph Myers <joseph@codesourcery.com>
11001
11002 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
11003 in diagnostic.
11004 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
11005 letter.
11006 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
11007 Remove trailing '.' from diagnostics.
11008 * c.opt (Wwrite-strings_: Avoid '`' in help text.
11009
d5478783
JM
110102010-11-10 Joseph Myers <joseph@codesourcery.com>
11011
11012 * c-common.c (parse_optimize_options): Pass global_dc to
11013 decode_options.
11014 * c-opts.c (c_common_handle_option): Pass &global_options to
11015 set_Wstrict_aliasing.
11016 * c.opt (v): Don't mark Common or document here.
11017
91ebb981
IS
110182010-11-06 Iain Sandoe <iains@gcc.gnu.org>
11019
11020 PR target/44981
11021 * c-format.c (format_type): New type gcc_objc_string_format_type.
11022 (valid_stringptr_type_p): New.
11023 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 11024 (check_format_string): Pass expected type, use
91ebb981
IS
11025 valid_stringptr_type_p (), check that the format string types are
11026 consistent with the format specification.
11027 (decode_format_attr): Warn if NSString is used outside objective-c.
11028 (format_types_orig): Add NSString.
11029 (format_name): New.
11030 (format_flags): New.
11031 (check_format_arg): Handle format strings requiring an external parser.
11032 first_target_format_type: New variable.
11033 (handle_format_attribute): Set up first_target_format_type, pass the
11034 expected format arg string type to check_format_string().
ab20d992 11035 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
91ebb981
IS
11036 * stub-objc.c (objc_string_ref_type_p): New.
11037 (objc_check_format_arg): New.
11038
bede2adc
NP
110392010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
11040
9faeb493 11041 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
11042 * c-common.h (objc_build_class_component_ref): New.
11043 * stub-objc.c (objc_build_class_component_ref): New.
11044
9a179d01
NP
110452010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
11046
11047 * c.opt (Wproperty-assign-default): New option.
11048
22d8d616
NP
110492010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
11050
11051 Implemented -fobjc-std=objc1 flag.
11052 * c.opt (fobjc-std=objc1): New option.
11053
2debdb4f
NP
110542010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
11055
11056 Implemented format and noreturn attributes for Objective-C methods.
11057 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
11058 attribute for Objective-C methods.
11059
ec52b111
JM
110602010-10-31 Jason Merrill <jason@redhat.com>
11061
11062 * c-common.c (conversion_warning, warn_for_collisions_1): Use
11063 EXPR_LOC_OR_HERE.
11064
46a88c12
NP
110652010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
11066
11067 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
11068 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
11069 (objc_add_property_declaration): Removed arguments for copies and
11070 ivar.
11071 (objc_build_getter_call): Renamed to
11072 objc_maybe_build_component_ref.
11073 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
11074 (objc_is_property_ref): New.
11075 * c-common.c (c_common_reswords): Removed copies and ivar.
11076 * stub-objc.c (objc_add_property_declaration): Removed arguments
11077 for copies and ivar.
11078 (objc_build_getter_call): Renamed to
11079 objc_maybe_build_component_ref.
11080 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
11081 (objc_is_property_ref): New.
9faeb493 11082
1e4bf85b
AC
110832010-10-29 Arnaud Charlet <charlet@adacore.com>
11084 Matthew Gingell <gingell@adacore.com>
11085
11086 * c-ada-spec.c (separate_class_package): New function.
11087 (pp_ada_tree_identifier): Prefix references to C++ classes with the
11088 name of their enclosing package.
11089 (print_ada_declaration): Use separate_class_package.
11090
81f0bab2
JM
110912010-10-27 Jason Merrill <jason@redhat.com>
11092
2b08f2c5
JM
11093 * c-common.c (c_common_reswords): Add __is_literal_type.
11094 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
11095
81f0bab2
JM
11096 * c-common.c (check_case_value): Remove special C++ code.
11097
200290f2
NP
110982010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
11099
11100 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
11101 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
11102 and RID_LAST_PATTR.
11103 (objc_add_property_declaration): Added additional arguments.
11104 (objc_property_attribute_kind): Removed.
11105 (objc_set_property_attr): Removed.
11106 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
11107 copy and nonatomic.
11108 * stub-objc.c (objc_add_property_declaration): Added additional
11109 arguments.
11110 (objc_set_property_attr): Removed.
9faeb493 11111
f614132b
NP
111122010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
11113
11114 * c-common.h (objc_add_property_variable): Renamed to
11115 objc_add_property_declaration. Added location argument.
11116 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 11117
b8a18805
NP
111182010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
11119
11120 * c-common.h (objc_maybe_printable_name): New.
11121 * stub-objc.c (objc_maybe_printable_name): New.
11122
3f8257db
JJ
111232010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
11124 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
11125
11126 * c-common.h (c_common_mark_addressable_vec): Declare.
11127 * c-common.c (c_common_mark_addressable_vec): New function.
11128
249a82c4
NP
111292010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
11130
11131 * c-common.h (objc_set_method_type): Removed.
11132 (objc_add_method_declaration): Added boolean argument.
11133 (objc_start_method_definition): Same change.
11134 (objc_build_method_signature): Same change.
11135 * stub-objc.c (objc_set_method_type): Removed.
11136 (objc_add_method_declaration): Added boolean argument.
11137 (objc_start_method_definition): Same change.
11138 (objc_build_method_signature): Same change.
11139
977e30bc
NP
111402010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
11141
11142 * c-common.h (finish_file): Removed.
11143 (objc_write_global_declarations): New.
11144 * c-opts.c (c_common_parse_file): Do not call finish_file.
11145 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 11146
da57d1b9
NP
111472010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
11148
11149 Implemented parsing @synthesize and @dynamic for
11150 Objective-C/Objective-C++.
11151 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
11152 (objc_add_synthesize_declaration): New.
11153 (objc_add_dynamic_declaration): New.
11154 * c-common.c (c_common_reswords): Add synthesize and dynamic.
11155 * stub-objc.c (objc_add_synthesize_declaration): New.
11156 (objc_add_dynamic_declaration): New.
9faeb493 11157
0069111f
MM
111582010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
11159
11160 PR target/46041
11161 * c-cppbuiltin.c (mode_has_fma): Move function here from
11162 builtins.c. Don't use the fma optab, instead just use the
11163 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
11164 using -save-temps.
11165
e426b47b
NP
111662010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
11167
11168 Merge from 'apple/trunk' branch on FSF servers.
0069111f 11169
3f8257db 11170 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 11171
9faeb493 11172 Radar 4330422
e426b47b
NP
11173 * c-common.h (objc_non_volatilized_type): New declaration
11174 * stub-objc.c (objc_non_volatilized_type): New stub.
11175
90fbfdc3
NP
111762010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
11177
e426b47b 11178 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 11179
ab20d992 11180 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 11181
9faeb493 11182 Radar 4133425
90fbfdc3 11183 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 11184 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 11185
c37d8c30
IS
111862010-10-17 Iain Sandoe <iains@gcc.gnu.org>
11187
11188 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
11189 * c-common.h (enum rid): Add RID_AT_PACKAGE.
11190 (objc_ivar_visibility_kind): New enum.
11191 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 11192 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
11193 visibility enum.
11194
1b1562a5
MM
111952010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
11196
11197 * c-cppbuiltin.c (builtin_define_float_constants): Emit
11198 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
11199 has the appropriate fma builtins.
11200 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
11201
668ea4b1
IS
112022010-10-14 Iain Sandoe <iains@gcc.gnu.org>
11203
1b1562a5 11204 merge from FSF apple 'trunk' branch.
3f8257db 11205 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 11206
668ea4b1
IS
11207 Radars 4436866, 4505126, 4506903, 4517826
11208 * c-common.c (c_common_resword): Define @property and its attributes.
11209 * c-common.h: Define property attribute enum entries.
11210 (OBJC_IS_PATTR_KEYWORD): New.
11211 (objc_property_attribute_kind): New enum.
11212 Declare objc_set_property_attr (), objc_add_property_variable (),
11213 objc_build_getter_call () and objc_build_setter_call ().
11214 * stub-objc.c (objc_set_property_attr): New stub.
11215 (objc_add_property_variable): Likewise.
11216 (objc_build_getter_call): Likewise.
11217 (objc_build_setter_call) Likewise.
1b1562a5 11218
a1178b30
IS
112192010-10-13 Iain Sandoe <iains@gcc.gnu.org>
11220
1b1562a5 11221 merge from FSF apple 'trunk' branch.
ab20d992 11222 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
11223
11224 Radar 3803157 (method attributes)
11225 * c-common.c (handle_deprecated_attribute): Recognize
11226 objc methods as valid declarations.
11227 * c-common.h: Declare objc_method_decl ().
1b1562a5 11228 * stub-objc.c (objc_method_decl): New stub.
a1178b30 11229
a75bfaa6
JM
112302010-10-08 Joseph Myers <joseph@codesourcery.com>
11231
11232 * c-common.c (parse_optimize_options): Call
11233 decode_cmdline_options_to_array_default_mask before
11234 decode_options. Update arguments to decode_options.
11235 * c-common.h (c_common_init_options_struct): Declare.
11236 * c-opts.c (c_common_init_options_struct): New. Split out from
11237 c_common_init_options.
11238
f05b9d93
NP
112392010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
11240
11241 Implemented fast enumeration for Objective-C.
11242 * c-common.h (objc_finish_foreach_loop): New.
11243 * stub-objc.c (objc_finish_foreach_loop): New.
11244
1ebe4b4f
JM
112452010-10-05 Joseph Myers <joseph@codesourcery.com>
11246
11247 * c-common.h (struct diagnostic_context): Don't declare here.
11248 (c_common_initialize_diagnostics): Declare using
11249 diagnostic_context typedef.
11250 * c-opts.c (c_common_handle_option): Pass global_dc to
11251 handle_generated_option.
11252
d4d24ba4
JM
112532010-10-04 Joseph Myers <joseph@codesourcery.com>
11254
11255 * c-opts.c (c_common_handle_option): Pass &global_options_set to
11256 handle_generated_option.
11257
478a1c5b
ILT
112582010-10-03 Ian Lance Taylor <iant@google.com>
11259
11260 * c.opt (-fplan9-extensions): New option.
11261
82a1c2fe
FXC
112622010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
11263
11264 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
11265 Remove.
11266 (c_cpp_builtins): Call functions from cppbuiltin.c instead
11267 of duplicating code.
11268
92902b1b
IS
112692010-09-30 Iain Sandoe <iains@gcc.gnu.org>
11270
11271 * c-common.c: Add two new entries for @optional
11272 and @required keywords.
11273
11274 merge from FSF 'apple/trunk' branch.
3f8257db 11275 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
11276
11277 Radar 4386773
11278 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
11279 objective-c keywords.
11280 (objc_set_method_opt): New declaration.
11281 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 11282
46625112
JM
112832010-09-30 Joseph Myers <joseph@codesourcery.com>
11284
11285 * c-common.c (handle_optimize_attribute): Pass &global_options to
11286 cl_optimization_save and cl_optimization_restore.
11287 * c-opts.c (c_common_handle_option): Pass &global_options to
11288 handle_generated_option.
11289 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
11290 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
11291 &global_options to cl_optimization_restore.
11292
49b91f05
NP
112932010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
11294
11295 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
11296 Objective-C/Objective-C++ keywords.
11297
13ed556f 112982010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 11299
9faeb493
UB
11300 Merge from 'apple/trunk' branch on FSF servers.
11301
3f8257db 11302 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
11303
11304 Radar 4281748
11305 * c-common.h (objc_check_global_decl): New declaration.
11306 * stub-objc.c (objc_check_global_decl): New stub.
11307
f0036cca
JM
113082010-09-29 Joseph Myers <joseph@codesourcery.com>
11309
11310 * c.opt: Don't use VarExists.
11311
e3339d0f
JM
113122010-09-29 Joseph Myers <joseph@codesourcery.com>
11313
11314 * c-common.c (c_cpp_error): Update names of diagnostic_context
11315 members.
11316 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
11317 cl_optimization members.
11318 * c-opts.c (warning_as_error_callback, c_common_handle_option,
11319 sanitize_cpp_opts, finish_options): Update names of cpp_options
11320 members.
11321
1973201f
NP
113222010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
11323
11324 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
11325 (objc_is_reserved_word): Removed.
11326 * c-common.c: Updated comments.
11327 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
11328 objc_is_reserved_word.
11329 * stub-objc.c (objc_is_reserved_word): Removed.
11330
f7e71da5
IS
113312010-09-28 Iain Sandoe <iains@gcc.gnu.org>
11332
9faeb493 11333 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
11334 include attributes.
11335 (objc_start_method_definition): Likewise.
11336 (objc_build_keyword_decl): Likewise.
11337 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
11338 (objc_start_method_definition): Likewise.
11339 (objc_build_keyword_decl): Likewise.
11340
c165dca7
IS
113412010-09-28 Iain Sandoe <iains@gcc.gnu.org>
11342
11343 * c-common.h (objc_start_class_interface): Adjust prototype.
11344 (objc_start_category_interface): Likewise.
11345 (objc_start_protocol): Likewise.
11346 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
11347 (objc_start_class_interface): Likewise.
11348 (objc_start_category_interface): Likewise.
11349
7458026b
ILT
113502010-09-27 Ian Lance Taylor <iant@google.com>
11351
11352 * c-common.c (c_common_attribute_table): Add no_split_stack.
11353 (handle_no_split_stack_attribute): New static function.
11354
b581b85b
NP
113552010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
11356
9faeb493 11357 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 11358
3f8257db 11359 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 11360
9faeb493 11361 Radar 4229905
b581b85b
NP
11362 * c-common.h (objc_have_common_type): New declaration.
11363 * stub-objc.c (objc_have_common_type): New stub.
11364
11365 2005-06-22 Ziemowit Laski <zlaski@apple.com>
11366
11367 Radar 4154928
11368 * c-common.h (objc_common_type): New prototype.
9faeb493 11369 * stub-objc.c (objc_common_type): New stub.
b581b85b 11370
46a4da10
JH
113712010-09-24 Jan Hubicka <jh@suse.cz>
11372
11373 * c-common.c (handle_leaf_attribute): New function.
11374 (struct attribute_spec c_common_att): Add leaf.
11375
e200444e
JM
113762010-09-22 Joseph Myers <joseph@codesourcery.com>
11377
11378 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
11379 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
11380 -dump, -dump=, -imacros, -imacros=, -include, -include=,
11381 -include-barrier, -include-directory, -include-directory=,
11382 -include-directory-after, -include-directory-after=,
11383 -include-prefix, -include-prefix=, -include-with-prefix,
11384 -include-with-prefix=, -include-with-prefix-after,
11385 -include-with-prefix-after=, -include-with-prefix-before,
11386 -include-with-prefix-before=, -no-integrated-cpp,
11387 -no-line-commands, -no-standard-includes, -no-warnings, -output,
11388 -output=, -pedantic, -pedantic-errors, -preprocess,
11389 -print-missing-file-dependencies, -trace-includes, -traditional,
11390 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
11391 -user-dependencies, -verbose, -write-dependencies,
11392 -write-user-dependencies, no-integrated-cpp, traditional): New.
11393
29a80ea6
NP
113942010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
11395
11396 PR objc/23710
ac1fc2fc
NP
11397 * c-common.h (objc_start_method_definition): Return bool instead
11398 of void.
11399 * stub-objc.c (objc_start_method_definition): Return bool instead
11400 of void.
11401
114022010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
11403
11404 PR objc/25965
11405 * c-common.h (objc_get_interface_ivars): New declaration.
11406 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 11407
de621752
ILT
114082010-09-15 Ian Lance Taylor <iant@google.com>
11409
11410 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 11411 messages. Remove period at end of warning message.
de621752 11412
ba885ec5
NS
114132010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11414
11415 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
11416 (handle_alias_attribute): ... here.
11417 (handle_ifunc_attribute): New.
11418
c5ee1358
MM
114192010-09-06 Mark Mitchell <mark@codesourcery.com>
11420
11421 * c-common.h (do_warn_double_promotion): Declare.
11422 * c-common.c (do_warn_double_promotion): Define.
11423
0a0b3574
MM
114242010-09-05 Mark Mitchell <mark@codesourcery.com>
11425
11426 * c.opt (Wdouble-promotion): New.
11427
d1779886
JM
114282010-09-02 Joseph Myers <joseph@codesourcery.com>
11429
11430 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
11431 fvtable-thunks, fxref): Mark no longer supported in help text.
11432
2d2bd949
JM
114332010-09-02 Joseph Myers <joseph@codesourcery.com>
11434
11435 * c.opt (Wimport, fall-virtual, falt-external-templates,
11436 fdefault-inline, fenum-int-equiv, fexternal-templates,
11437 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
11438 fname-mangling-version-, fnew-abi, fnonnull-objects,
11439 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
11440 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
11441 applicable.
11442 (fhandle-exceptions): Mark with Alias and Warn.
11443 * c-opts.c (c_common_handle_option): Don't handle options marked
11444 as ignored.
11445
5de8299c
JM
114462010-09-02 Joseph Myers <joseph@codesourcery.com>
11447
11448 * c.opt (Wcomments, Werror-implicit-function-declaration,
11449 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
11450 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
11451 aliases.
11452 * c-common.c (option_codes): Use OPT_Wcomment instead of
11453 OPT_Wcomments.
11454 * c-opts.c (warning_as_error_callback, c_common_handle_option):
11455 Don't handle options marked as aliases.
11456
0ceb0201
RG
114572010-08-25 Richard Guenther <rguenther@suse.de>
11458
11459 * c-common.c (c_common_get_alias_set): Remove special
11460 handling for pointers.
11461
ac47786e
NF
114622010-08-20 Nathan Froyd <froydnj@codesourcery.com>
11463
11464 * c-common.c: Use FOR_EACH_VEC_ELT.
11465 * c-gimplify.c: Likewise.
11466 * c-pragma.c: Likewise.
11467
c878765b
JM
114682010-08-16 Joseph Myers <joseph@codesourcery.com>
11469
11470 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
11471 RejectDriver.
11472 (MMDX): Change back to MMD. Mark NoDriverArg instead of
11473 RejectDriver.
11474 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
11475 instead of OPT_MDX and OPT_MMDX.
11476
603349bf
JM
114772010-08-16 Joseph Myers <joseph@codesourcery.com>
11478
11479 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
11480
644fa7ac
JM
114812010-08-12 Joseph Myers <joseph@codesourcery.com>
11482
11483 * c.opt (MD, MMD): Change to MDX and MMDX.
11484 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
11485
481e1176
JM
114862010-08-11 Joseph Myers <joseph@codesourcery.com>
11487
11488 * c-opts.c (c_common_handle_option): Call handle_generated_option
11489 instead of handle_option.
11490
ac8dc9f7
NF
114912010-08-08 Nathan Froyd <froydnj@codesourcery.com>
11492
11493 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
11494 (maybe_apply_renaming_pragma): Delete unneeded declarations.
11495
4f8c876d
NF
114962010-08-08 Nathan Froyd <froydnj@codesourcery.com>
11497
11498 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
11499 (pending_redefine_extname): Change type to a VEC.
11500 (add_to_renaming_pragma_list): Update for new type of
11501 pending_redefine_extname.
ac8dc9f7 11502 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 11503
3b0c690e
AC
115042010-08-04 Arnaud Charlet <charlet@adacore.com>
11505
11506 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
11507 visited.
11508 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
11509 decide whether a type has already been declared/seen.
11510 Do not go to the original type.
11511 (dump_nested_types): New parameter forward.
11512 Generate forward declaration if needed and mark type as visited.
11513 (print_ada_declaration): Call dump_nested_types if not already done.
11514 Mark types as visited.
11515
1890bccc
JM
115162010-08-03 Joseph Myers <joseph@codesourcery.com>
11517
11518 * c.opt (-print-pch-checksum): Remove option.
11519 * c-opts.c (c_common_handle_option): Don't handle
11520 OPT_print_pch_checksum.
11521
5f20c657
JM
115222010-07-27 Joseph Myers <joseph@codesourcery.com>
11523
11524 * c-common.h (c_common_handle_option): Update prototype and return
11525 value type.
11526 * c-opts.c (c_common_handle_option): Update prototype and return
11527 value type. Update calls to handle_option and
11528 enable_warning_as_error.
11529
f551f80c
JJ
115302010-07-27 Jakub Jelinek <jakub@redhat.com>
11531
11532 PR c/45079
11533 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
11534
61ff2bdc
JM
115352010-07-27 Joseph Myers <joseph@codesourcery.com>
11536
11537 * c-common.h (c_common_missing_argument): Remove.
11538 * c-opts.c (c_common_missing_argument): Remove.
11539 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
11540 idirafter, imacros, include, isysroot, isystem, iquote): Add
11541 MissingArgError.
11542 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
11543
7a9bf9a4
JM
115442010-07-27 Joseph Myers <joseph@codesourcery.com>
11545
11546 * c-common.h (c_common_option_lang_mask,
11547 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
11548 New.
11549 (c_common_init_options): Update prototype.
11550 * c-opts.c (c_common_option_lang_mask): New.
11551 (c_common_initialize_diagnostics): Split out of
11552 c_common_init_options.
11553 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
11554 New.
11555 (c_common_init_options): Update prototype. Use decoded options in
11556 search for -lang-asm.
11557
910ad8de
NF
115582010-07-15 Nathan Froyd <froydnj@codesourcery.com>
11559
11560 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
11561 * c-format.c: Likewise.
11562
718f9c0f
MLI
115632010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
11564
11565 * c-common.h: Include diagnostic-core.h. Error if already
11566 included.
11567 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
11568
4d451982
MLI
115692010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
11570
adfac8df 11571 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
11572 Do not include expr.h
11573 (vector_mode_valid_p): Move here.
11574
119fe915
SB
115752010-06-21 DJ Delorie <dj@redhat.com>
11576
11577 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
11578 allow these pragmas anywhere.
11579
115802010-06-14 Jakub Jelinek <jakub@redhat.com>
11581
11582 PR bootstrap/44509
11583 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
11584 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
11585 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
11586 ggc_strdup instead of xstrdup.
11587
115882010-06-10 Jakub Jelinek <jakub@redhat.com>
11589
11590 * c-cppbuiltin.c: Include cpp-id-data.h.
11591 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
11592 (lazy_hex_fp_value): New function.
11593 (builtin_define_with_hex_fp_value): Provide definitions lazily.
11594
6662d794
MLI
115952010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11596
11597 * c-gimplify.c: Do not include tree-flow.h
11598
38f8b050
JR
115992010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
11600
11601 PR other/44034
11602 * c-common.c: Rename targetm member:
11603 targetm.enum_va_list -> targetm.enum_va_list_p
11604
9589f23e
AS
116052010-06-28 Anatoly Sokolov <aesok@post.ru>
11606
11607 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
11608
3b06d379
SB
116092010-06-28 Steven Bosscher <steven@gcc.gnu.org>
11610
11611 * c-cppbuiltin.c: Do not include except.h.
11612
d166d4c3
AK
116132010-06-24 Andi Kleen <ak@linux.intel.com>
11614
9faeb493
UB
11615 * c-common.c (warn_for_omitted_condop): New.
11616 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 11617
70cb8be6
JM
116182010-06-21 Joseph Myers <joseph@codesourcery.com>
11619
11620 * c.opt (lang-objc): Remove.
11621 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
11622
a4c97feb
JR
116232010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
11624
11625 * c-opts.c: Include "tm_p.h".
11626
6e2f1956
JM
116272010-06-20 Joseph Myers <joseph@codesourcery.com>
11628
11629 * c-common.c (parse_optimize_options): Update call to
11630 decode_options.
11631
bc87224e
NF
116322010-06-18 Nathan Froyd <froydnj@codesourcery.com>
11633
11634 * c-common.c (record_types_used_by_current_var_decl): Adjust for
11635 new type of types_used_by_cur_var_decl.
11636
b49cf425
JR
116372010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
11638
11639 PR bootstrap/44512
11640 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
11641 for C++ standard compliance.
11642
59f9c2ed
JM
116432010-06-16 Jason Merrill <jason@redhat.com>
11644
11645 * c.opt: Add -Wnoexcept.
11646
33766b66
RG
116472010-06-16 Richard Guenther <rguenther@suse.de>
11648
11649 PR c/44555
11650 * c-common.c (c_common_truthvalue_conversion): Remove
11651 premature and wrong optimization concering ADDR_EXPRs.
11652
eff7e30c
AC
116532010-06-15 Arnaud Charlet <charlet@adacore.com>
11654
11655 * c-ada-spec.c (dump_sloc): Remove column info.
11656 (is_simple_enum): New function.
11657 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
11658 enum types when relevant.
11659
6312e84d
MLI
116602010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
11661
9faeb493 11662 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
11663 location.
11664
1cb42611
JM
116652010-06-10 Joseph Myers <joseph@codesourcery.com>
11666
11667 * c-opts.c (c_common_handle_option): Don't handle
11668 OPT_fshow_column.
11669
a9429e29
LB
116702010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
11671
11672 * c-pragma.c (push_alignment): Use typed GC allocation.
11673 (handle_pragma_push_options): Likewise.
11674
11675 * c-common.c (parse_optimize_options): Likewise.
11676
11677 * c-common.h (struct sorted_fields_type): Add variable_size GTY
11678 option.
11679
5498f011
JM
116802010-06-07 Joseph Myers <joseph@codesourcery.com>
11681
11682 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
11683 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
11684 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
11685 flag_signed_bitfields, warn_strict_null_sentinel,
11686 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
11687 flag_gen_declaration, flag_no_gnu_keywords,
11688 flag_implement_inlines, flag_implicit_templates,
11689 flag_implicit_inline_templates, flag_optional_diags,
11690 flag_elide_constructors, flag_default_inline, flag_rtti,
11691 flag_conserve_space, flag_access_control, flag_check_new,
11692 flag_new_for_scope, flag_weak, flag_working_directory,
11693 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
11694 flag_enforce_eh_specs, flag_threadsafe_statics,
11695 flag_pretty_templates): Remove.
11696 * c-common.h (flag_preprocess_only, flag_nil_receivers,
11697 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
11698 flag_replace_objc_classes, flag_undef, flag_no_builtin,
11699 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
11700 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
11701 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
11702 flag_no_gnu_keywords, flag_implement_inlines,
11703 flag_implicit_templates, flag_implicit_inline_templates,
11704 flag_optional_diags, flag_elide_constructors, flag_default_inline,
11705 flag_rtti, flag_conserve_space, flag_access_control,
11706 flag_check_new, flag_new_for_scope, flag_weak,
11707 flag_working_directory, flag_use_cxa_atexit,
11708 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
11709 flag_threadsafe_statics, flag_pretty_templates,
11710 warn_strict_null_sentinel): Remove.
11711 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
11712 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
11713 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
11714 fimplicit-inline-templates, fimplicit-templates,
11715 flax-vector-conversions, fms-extensions, fnil-receivers,
11716 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
11717 frtti, fshort-double, fshort-enums, fshort-wchar,
11718 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
11719 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
11720 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
11721 gen-decls, undef): Use Var.
11722 (fdefault-inline, foptional-diags): Document as doing nothing.
11723 * c-opts.c (c_common_handle_option): Remove cases for options now
11724 using Var. Mark ignored options as such.
11725
39dabefd
SB
117262010-06-05 Steven Bosscher <steven@gcc.gnu.org>
11727
9faeb493 11728 * c-common.c: Moved to here from parent directory.
39dabefd
SB
11729 * c-common.def: Likewise.
11730 * c-common.h: Likewise.
11731 * c-cppbuiltin.c: Likewise.
11732 * c-dump.c: Likewise.
11733 * c-format.c: Likewise.
11734 * c-format.h : Likewise.
11735 * c-gimplify.c: Likewise.
11736 * c-lex.c: Likewise.
11737 * c-omp.c: Likewise.
11738 * c.opt: Likewise.
11739 * c-opts.c: Likewise.
11740 * c-pch.c: Likewise.
11741 * c-ppoutput.c: Likewise.
11742 * c-pragma.c: Likewise.
11743 * c-pragma.h: Likewise.
11744 * c-pretty-print.c: Likewise.
11745 * c-pretty-print.h: Likewise.
11746 * c-semantics.c: Likewise.
11747 * stub-objc.c: Likewise.
11748
11749 * c-common.c: Include gt-c-family-c-common.h.
11750 * c-pragma.c: Include gt-c-family-c-pragma.h.
11751\f
8d9254fc 11752Copyright (C) 2010-2020 Free Software Foundation, Inc.
39dabefd
SB
11753
11754Copying and distribution of this file, with or without modification,
11755are permitted in any medium without royalty provided the copyright
11756notice and this notice are preserved.