]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
syscall: ensure openat uses variadic libc wrapper
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
7d187e4f
GA
12021-01-07 Martin Sebor <msebor@redhat.com>
2
3 PR middle-end/98578
4 * c-pretty-print.c (print_mem_ref): Strip array from access type.
5 Avoid assuming acces type's size is constant. Correct condition
6 guarding the printing of a parenthesis.
7
942ae5be
GA
82021-01-06 Martin Sebor <msebor@redhat.com>
9
10 PR c++/95768
11 * c-pretty-print.c (c_pretty_printer::primary_expression): For
12 SSA_NAMEs print VLA names and GIMPLE defining statements.
13 (print_mem_ref): New function.
14 (c_pretty_printer::unary_expression): Call it.
15
162021-01-06 Richard Biener <rguenther@suse.de>
17
18 PR tree-optimization/95582
19 * c-attribs.c (c_common_attribute_table): Add entry for
20 signed_bool_precision.
21 (handle_signed_bool_precision_attribute): New.
22
8daa719b
GA
232020-12-24 Iain Sandoe <iain@sandoe.co.uk>
24
25 * c.opt: Add -stdlib= option and enumerations for
26 libstdc++ and libc++.
27
eefe499f
GA
282020-12-16 Martin Liska <mliska@suse.cz>
29
30 * c.opt: Remove usage of Report.
31
d52945ce
GA
322020-12-14 Martin Sebor <msebor@redhat.com>
33
34 PR middle-end/98166
35 PR c++/57111
36 PR middle-end/98160
37 * c-attribs.c (maybe_add_noinline): New function.
38 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
39 Implicitly add attribute noinline to functions not declared inline
40 and warn on those.
41
ca2bd949
GA
422020-12-09 Tobias Burnus <tobias@codesourcery.com>
43
44 * c-pragma.c (omp_pragmas): Add 'allocate'.
45 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
46
f6e8e279
GA
472020-12-08 Jakub Jelinek <jakub@redhat.com>
48
49 PR c++/98187
50 * c-pragma.c (omp_pragmas): Remove "master".
51 (omp_pragmas_simd): Add "master".
52
bc8a7013
GA
532020-12-07 Marek Polacek <polacek@redhat.com>
54
55 PR c++/98126
56 * c-common.c (verify_tree_lim_r): New function.
57 (verify_sequence_points): Use it. Use nullptr instead of 0.
58
b8dd0ef7
GA
592020-12-03 Martin Sebor <msebor@redhat.com>
60
61 PR c++/90629
62 PR middle-end/94527
63 * c-attribs.c (handle_dealloc_attribute): New function.
64 (handle_malloc_attribute): Handle argument forms of attribute.
65 * c.opt (-Wmismatched-dealloc): New option.
66 (-Wmismatched-new-delete): New option.
67
682020-12-03 Jakub Jelinek <jakub@redhat.com>
69
70 PR libstdc++/93121
71 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
72 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
73
e0f5e792
GA
742020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
75
76 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
77 {__GNUC_EXECUTION_CHARSET_NAME} and
78 _WIDE_EXECUTION_CHARSET_NAME} macros.
79
802020-12-01 Nathan Sidwell <nathan@acm.org>
81
82 * c-common.c (module, import, export): New internal tokens (with
83 trailing space).
84 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
85 them.
86 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
87 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
88
892020-12-01 Nathan Sidwell <nathan@acm.org>
90
91 * c-opts.c (c_common_init_options): Ask for module dependencies.
92 (c_common_handle_option): Handle -Mmodules -Mno-modules.
93 * c-pch.c (c_common_valid_pch): ... does not play with C++
94 modules.
95 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
96 options.
97 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
98 (fmodule-only, fmodule-mapper, fmodule-lazy)
99 (fmodule-version-ignore, Winvalid-imported-macros)
100 (flang-info-include-translate, flang-info-include-translate-not):
101 New options
102
5fbf0ecb
GA
1032020-11-28 Eric Botcazou <ebotcazou@adacore.com>
104
105 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
106 (dump_ada_structure): Also deal with convention, unchecked union and
107 bit-field for nested types. In the latter case, print an Alignment
108 aspect along with the Pack aspect.
109
360258da
GA
1102020-11-25 Martin Sebor <msebor@redhat.com>
111
112 PR bootstrap/94982
113 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
114 -Wformat-diag.
115
1e2c9a27
GA
1162020-11-24 Martin Sebor <msebor@redhat.com>
117
118 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
119
8e6198d0
GA
1202020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
121
122 * c-attribs.c (handle_special_var_sec_attribute): New.
123 (handle_noinit_attribute): Remove.
124 (attr_noinit_exclusions): Rename to...
125 (attr_section_exclusions): ...this, and add "persistent" attribute
126 exclusion.
127 (c_common_attribute_table): Add "persistent" attribute.
128
7a97e2fc
GA
1292020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
130
131 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
132 Treat opaque types like other types.
133 (c_pretty_printer::direct_abstract_declarator): Opaque types are
134 supported types.
135
82e5048e
GA
1362020-11-20 Martin Sebor <msebor@redhat.com>
137
138 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
139 with fewer arguments.
140
1412020-11-20 Martin Sebor <msebor@redhat.com>
142
143 PR middle-end/97879
144 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
145 Error out on invalid modes.
146
1472020-11-20 Jakub Jelinek <jakub@redhat.com>
148
149 PR libstdc++/88101
150 * c-common.c (check_builtin_function_arguments): Handle
151 BUILT_IN_CLEAR_PADDING.
152
25bb75f8
GA
1532020-11-18 Nathan Sidwell <nathan@acm.org>
154
155 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
156
4dabb037
GA
1572020-11-17 Nathan Sidwell <nathan@acm.org>
158
159 * c-common.h (enum c_tree_index): Reorder to place lazy fields
160 after newly-added CTI_MODULE_HWM.
161
1622020-11-17 Joseph Myers <joseph@codesourcery.com>
163
164 * c-cppbuiltin.c (builtin_define_float_constants): Define
165 "*_IS_IEC_60559__" macros.
166
1672020-11-17 Nathan Sidwell <nathan@acm.org>
168
169 * c-lex.c: #include "langhooks.h".
170 (cb_undef): Maybe call preprocess_undef lang hook.
171 * c-opts.c (c_common_post_options): Maybe call preprocess_options
172 lang hook.
173 (push_command_line_include): Maybe call preprocess_main_file lang
174 hook.
175 (cb_file_change): Likewise.
176 * c-ppoutput.c: #include "langhooks.h.
177 (scan_translation_unit): Maybe call preprocess_token lang hook.
178 (class do_streamer): New, derive from token_streamer.
179 (directives_only_cb): Data pointer is do_streamer, call
180 preprocess_token lang hook.
181 (scan_translation_unit_directives_only): Use do_streamer.
182 (print_line_1): Move src_line recording to after string output.
183 (cb_undef): Maybe call preprocess_undef lang hook.
184
1852020-11-17 Nathan Sidwell <nathan@acm.org>
186
187 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
188 code duplicating that functionality.
189
1902020-11-17 Jakub Jelinek <jakub@redhat.com>
191
192 PR c/90628
193 * c-common.c (check_builtin_function_arguments)
194 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
195 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
196 for more builtins and argument positions.
197
29c5d9ce
GA
1982020-11-16 Iain Sandoe <iain@sandoe.co.uk>
199
200 PR objc/97854
201 * stub-objc.c: Include c-common.h to declare enum rid.
202
77f67db2
GA
2032020-11-13 Jakub Jelinek <jakub@redhat.com>
204
205 PR c++/63287
206 * c-cppbuiltin.c: Include configargs.h.
207 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
208 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
209 "single".
210
2112020-11-13 Gergö Barany <gergo@codesourcery.com>
212 Thomas Schwinge <thomas@codesourcery.com>
213
214 * c.opt (fopenacc-kernels): Add.
215
2162020-11-13 Jason Merrill <jason@redhat.com>
217
218 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
219
2202020-11-13 Piotr H. Dabrowski <phd@phd.re>
221
222 PR c++/91318
223 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
224
2252020-11-13 Martin Liska <mliska@suse.cz>
226
227 * c-attribs.c (build_attr_access_from_parms): Format properly.
228
2292020-11-13 Iain Sandoe <iain@sandoe.co.uk>
230
231 PR objc/90707
232 * c-common.c (c_common_reswords): null_unspecified, nullable,
233 nonnull, null_resettable: New keywords.
234 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
235 RID_NONNULL, RID_NULL_RESETTABLE: New.
236 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
237 ranges accepted for property attributes.
238 * c-attribs.c (handle_objc_nullability_attribute): New.
239 * c-objc.h (enum objc_property_attribute_group): Add
240 OBJC_PROPATTR_GROUP_NULLABLE.
241 (enum objc_property_attribute_kind):Add
242 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
243 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
244
2452020-11-13 Iain Sandoe <iain@sandoe.co.uk>
246
247 PR objc/77404
248 * c-attribs.c (handle_objc_root_class_attribute): New
249 * c-objc.h (objc_start_class_interface): Add a location
250 value for the position of the class name.
251 * c.opt: Add Wobjc-root-class.
252 * stub-objc.c (objc_start_class_interface): Add a location
253 value for the position of the class name.
254
a5a11525
GA
2552020-11-12 Joseph Myers <joseph@codesourcery.com>
256
257 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
258 Allow scope for C. Handle standard attributes for C. Do not
259 accept unscoped attributes if std_syntax and not handled as
260 standard attributes.
261 * c-common.h (c_common_has_attribute): Update prototype.
262
2632020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
264
265 PR pch/86674
266 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
267 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
268
0f5f9ed5
GA
2692020-11-11 Patrick Palka <ppalka@redhat.com>
270
271 PR c++/88115
272 * c-opts.c (c_common_post_options): Update latest_abi_version.
273
bb622641
GA
2742020-11-10 Jakub Jelinek <jakub@redhat.com>
275
276 PR c/97748
277 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
278 to false.
279 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
280 recursively and just return true instead of warning if it is true.
281 Handle COMPLEX_EXPR.
282
2832020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
284
285 * c-common.h (c_omp_adjust_map_clauses): New declaration.
286 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
287 (c_omp_adjust_map_clauses): New function.
288
2bee28dd
GA
2892020-11-09 Marek Polacek <polacek@redhat.com>
290
291 DR 1914
292 * c-common.c (attribute_fallthrough_p): Tweak the warning
293 message.
294
2952020-11-09 Patrick Palka <ppalka@redhat.com>
296
297 * c-pragma.c (handle_pragma_diagnostic): Split the
298 unknown-option -Wpragmas diagnostic into a warning and a
299 subsequent note containing a spelling suggestion. Avoid
300 computing the suggestion if -Wpragmas warnings are being
301 suppressed.
302
3032020-11-09 Patrick Palka <ppalka@redhat.com>
304
305 PR testsuite/97117
306 * c-indentation.c (get_visual_column): Remove location_t
307 parameter. Move the column-tracking diagnostic code from here
308 to ...
309 (should_warn_for_misleading_indentation): ... here, before the
310 early exit for when the loci are not all distinct. Don't pass a
311 location_t argument to get_visual_column.
312 (assert_get_visual_column_succeeds): Don't pass a location_t
313 argument to get_visual_column.
314 (assert_get_visual_column_fails): Likewise.
315
fb95de7a
GA
3162020-11-08 Iain Sandoe <iain@sandoe.co.uk>
317
318 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
319 of keywords accepted in @property attribute contexts.
320 * c-objc.h (enum objc_property_attribute_group): Add
321 OBJC_PROPATTR_GROUP_CLASS.
322 (enum objc_property_attribute_kind): Add
323 OBJC_PROPERTY_ATTR_CLASS.
324
2da7ee05
GA
3252020-11-07 Iain Sandoe <iain@sandoe.co.uk>
326
327 * c-common.c (c_common_reswords): Add 'atomic' property
328 attribute.
329 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
330 property attributes.
331
3322020-11-07 Iain Sandoe <iain@sandoe.co.uk>
333
334 * c-attribs.c (handle_nsobject_attribute): New.
335 * c.opt: Add WNSObject-attribute.
336
44cab2d8
GA
3372020-11-06 Iain Sandoe <iain@sandoe.co.uk>
338
339 * c-objc.h (enum objc_property_attribute_group): New
340 (enum objc_property_attribute_kind): New.
341 (OBJC_PROPATTR_GROUP_MASK): New.
342 (struct property_attribute_info): Small class encapsulating
343 parser output from property attributes.
344 (objc_prop_attr_kind_for_rid): New
345 (objc_add_property_declaration): Simplify interface.
346 * stub-objc.c (enum rid): Dummy type.
347 (objc_add_property_declaration): Simplify interface.
348 (objc_prop_attr_kind_for_rid): New.
349
3502020-11-06 Nathan Sidwell <nathan@acm.org>
351
352 * c-ada-spec.c (collect_ada_nodes): Rename
353 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
354 (collect_ada_node): Likewise.
355 (dump_forward_type): Likewise.
356 * c-common.c (set_underlying_type): Rename
357 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
358 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
359
3602020-11-06 Jakub Jelinek <jakub@redhat.com>
361
362 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
363
0cfd9109
GA
3642020-11-05 Marek Polacek <polacek@redhat.com>
365
366 PR c++/97675
367 * c.opt (Wexceptions): New option.
368
3692020-11-05 Marek Polacek <polacek@redhat.com>
370
371 PR c++/25814
372 * c.opt (Wvexing-parse): New option.
373
35c125cb
GA
3742020-11-04 Jakub Jelinek <jakub@redhat.com>
375
376 PR c++/97670
377 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
378 underlying decl to clear in the allocate_head bitmap.
379
3802020-11-04 Iain Sandoe <iain@sandoe.co.uk>
381
382 * c-objc.h (objc_non_constant_expr_p): New.
383 * stub-objc.c (objc_non_constant_expr_p): New.
384
fd2325ea
GA
3852020-11-03 Nathan Sidwell <nathan@acm.org>
386
387 * c.opt (MQ,MT): Reword description to be make-agnostic.
388
88ce3d5f
GA
3892020-11-02 Nathan Sidwell <nathan@acm.org>
390
391 * c-opts.c (c_common_post_options): Move var decl to its
392 initialization point.
393
3942020-11-01 Iain Sandoe <iain@sandoe.co.uk>
395
396 * c-lex.c (c_lex_with_flags): When combining '@' with a
397 keyword for Objective-C, combine the location ranges too.
398
3992020-10-30 Qing Zhao <qing.zhao@oracle.com>
400 H.J.Lu <hjl.tools@gmail.com>
401
402 * c-attribs.c (c_common_attribute_table): Add new attribute
403 zero_call_used_regs.
404 (handle_zero_call_used_regs_attribute): New function.
405
e93aae4a
GA
4062020-10-28 Marek Polacek <polacek@redhat.com>
407
408 PR c++/97573
409 * c-opts.c (c_common_post_options): In C++20, turn on
410 -Wdeprecated-enum-enum-conversion and
411 -Wdeprecated-enum-float-conversion.
412 * c.opt (Wdeprecated-enum-enum-conversion,
413 Wdeprecated-enum-float-conversion): New options.
414 (Wenum-conversion): Allow for C++ too.
415
4162020-10-28 Jakub Jelinek <jakub@redhat.com>
417
418 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
419 * c-omp.c: Include bitmap.h.
420 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
421
f19e7c8d
GA
4222020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
423
424 * c-common.c (__is_nothrow_assignable): New.
425 (__is_nothrow_constructible): Likewise.
426 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
427 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
428
efe71fcc
GA
4292020-10-23 Jan Hubicka <hubicka@ucw.cz>
430
431 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
432
4332020-10-23 Marek Polacek <polacek@redhat.com>
434
435 PR c++/91741
436 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
437 (c_common_init_ts): Likewise.
438 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
439 * c-common.h (maybe_warn_sizeof_array_div): Declare.
440 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
441 (maybe_warn_sizeof_array_div): New function.
442 * c.opt (Wsizeof-array-div): New option.
443
4442020-10-23 Martin Sebor <msebor@redhat.com>
445
446 PR c/97463
447 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
448
56ddd5e2
GA
4492020-10-22 Martin Liska <mliska@suse.cz>
450
451 PR c/94722
452 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
453 (handle_stack_protect_attribute): Add error message for a
454 no_stack_protector function.
455
4562020-10-22 Martin Liska <mliska@suse.cz>
457
458 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
459
4602020-10-22 Jan Hubicka <hubicka@ucw.cz>
461
462 * c-gimplify.c: Include tree-nested.h
463 (c_genericize): Update for new nested function info.
464
b2698c21
GA
4652020-10-14 Martin Sebor <msebor@redhat.com>
466
467 PR c/97413
468 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
469 bounds in an extra list.
470
7e9282ae
GA
4712020-10-05 Richard Biener <rguenther@suse.de>
472 Jakub Jelinek <jakub@redhat.com>
473
474 PR c++/97197
475 * c-pretty-print.c: Include langhooks.h.
476 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
477 expression.
478 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
479 unary_expression.
480 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
481
660bfe61
GA
4822020-09-30 Martin Sebor <msebor@redhat.com>
483
484 PR middle-end/97189
485 * c-attribs.c (append_access_attr): Use the function declaration
486 location for a warning about an attribute access argument.
487
93bca37c
GA
4882020-09-29 Marek Polacek <polacek@redhat.com>
489
490 PR c++/94695
491 * c.opt (Wrange-loop-construct): New option.
492
82b77dee
GA
4932020-09-23 Martin Sebor <msebor@redhat.com>
494
495 PR c/97131
496 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
497
4982020-09-23 Marek Polacek <polacek@redhat.com>
499
500 PR c/97125
501 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
502 after loops and other structured control constructs have been lowered.
503
521d2711
GA
5042020-09-22 Jakub Jelinek <jakub@redhat.com>
505
506 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
507 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
508
44135373
GA
5092020-09-21 Marek Polacek <polacek@redhat.com>
510
511 * c.opt (Wctad-maybe-unsupported): New option.
512
2fe5b7d1
GA
5132020-09-19 Martin Sebor <msebor@redhat.com>
514
515 PR c/50584
516 * c-common.h (warn_parm_array_mismatch): Declare new function.
517 (has_attribute): Move declaration of an existing function.
518 (build_attr_access_from_parms): Declare new function.
519 * c-warn.c (parm_array_as_string): Define new function.
520 (plus_one): Define new function.
521 (warn_parm_ptrarray_mismatch): Define new function.
522 (warn_parm_array_mismatch): Define new function.
523 (vla_bound_parm_decl): New function.
524 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
525 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
526 qualifiers here...
527 (c_pretty_printer::direct_abstract_declarator): ...but instead print
528 them in brackets here. Also print [static]. Strip extraneous
529 expressions from VLA bounds.
530
5312020-09-19 Martin Sebor <msebor@redhat.com>
532
533 PR c/50584
534 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
535 (handle_argspec_attribute): New function.
536 (get_argument, get_argument_type): New functions.
537 (append_access_attrs): Add overload. Handle internal attribute
538 representation in addition to external.
539 (handle_access_attribute): Handle internal attribute representation
540 in addition to external.
541 (build_attr_access_from_parms): New function.
542
5432020-09-19 Sandra Loosemore <sandra@codesourcery.com>
544
545 * c-gimplify.c (genericize_c_loop): Rewrite to match
546 c_finish_loop in c-typeck.c.
547
5482020-09-19 Sandra Loosemore <sandra@codesourcery.com>
549
550 * c-common.c (c_block_may_fallthrough): New, split from
551 cxx_block_may_fallthrough in the cp front end.
552 (c_common_init_ts): Move handling of loop and switch-related
553 statements here from the cp front end.
554 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
555 cp front end.
556 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
557 * c-common.h (c_block_may_fallthru): Declare.
558 (bc_state_t): Move here from cp front end.
559 (save_bc_state, restore_bc_state): Declare.
560 (c_genericize_control_stmt): Declare.
561 (WHILE_COND, WHILE_BODY): Likewise.
562 (DO_COND, DO_BODY): Likewise.
563 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
564 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
565 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
566 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
567 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
568 * c-dump.c (dump_stmt): Copy from cp front end.
569 (c_dump_tree): Move code to handle structured loop and switch
570 tree nodes here from cp front end.
571 * c-gimplify.c: Adjust includes.
572 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
573 cp front end.
574 (save_bc_state, restore_bc_state): New functions using old code
575 from cp front end.
576 (get_bc_label, expr_loc_or_loc): Move from cp front end.
577 (genericize_c_loop): Move from cp front end.
578 (genericize_for_stmt, genericize_while_stmt): Likewise.
579 (genericize_do_stmt, genericize_switch_stmt): Likewise.
580 (genericize_continue_stmt, genericize_break_stmt): Likewise.
581 (genericize_omp_for_stmt): Likewise.
582 (c_genericize_control_stmt): New function using code split from
583 cp front end.
584 (c_genericize_control_r): New.
585 (c_genericize): Call walk_tree with c_genericize_control_r.
586 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
587 structured loop and switch tree nodes here from cp front end.
588
2aad20c0
GA
5892020-09-17 Patrick Palka <ppalka@redhat.com>
590
591 PR c/80076
592 * c-indentation.c (should_warn_for_misleading_indentation): Move
593 declarations of local variables closer to their first use.
594 Handle virtual token locations by resolving them to their
595 respective macro expansion points. If all three tokens are
596 produced from the same macro expansion, then instead use their
597 loci within the macro definition.
598
ecde1b0a
GA
5992020-09-16 Martin Sebor <msebor@redhat.com>
600
601 PR c/78666
602 PR c/96126
603 * c-attribs.c (validate_attr_args): New function.
604 (validate_attr_arg): Same.
605 (handle_section_attribute): Call it. Introduce a local variable.
606 (handle_alloc_size_attribute): Same.
607 (handle_alloc_align_attribute): Same.
608
50a71cd0
GA
6092020-09-14 Jakub Jelinek <jakub@redhat.com>
610
611 * c-attribs.c (handle_optimize_attribute): Adjust
612 cl_optimization_save, cl_optimization_restore and
613 build_optimization_node callers.
614 * c-pragma.c (handle_pragma_optimize): Adjust
615 build_optimization_node caller.
616 (handle_pragma_push_options): Adjust
617 build_optimization_node and build_target_option_node callers.
618 (handle_pragma_pop_options, handle_pragma_reset_options):
619 Adjust cl_optimization_restore callers.
620
8f7ea26a
GA
6212020-08-28 Martin Sebor <msebor@redhat.com>
622
623 * c.opt (Wstringop-overread): New option.
624
a6493809
GA
6252020-08-11 Jakub Jelinek <jakub@redhat.com>
626
627 PR c/96545
628 * c-common.c (get_atomic_generic_size): Require that first argument's
629 type points to a complete type and use tree_fits_uhwi_p instead of
630 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
631
48cc2e46
GA
6322020-07-31 Martin Sebor <msebor@redhat.com>
633
634 PR c++/96003
635 * c-common.c (check_function_arguments_recurse): Return early when
636 no-warning bit is set.
637
6382020-07-31 Richard Biener <rguenther@suse.de>
639
640 PR debug/96383
641 * c-common.h (c_common_finalize_early_debug): Declare.
642 * c-common.c: Include debug.h.
643 (c_common_finalize_early_debug): finalize_early_debug langhook
644 implementation generating debug for extern declarations.
645
e71dab87
GA
6462020-07-27 Nathan Sidwell <nathan@acm.org>
647
648 * c-common.c (try_to_locate_new_include_insertion_point): Use
649 strcmp, not pointer equality.
650
ae2e0bc1
GA
6512020-07-25 Martin Sebor <msebor@redhat.com>
652
653 PR c++/96310
654 * c-common.c (check_nonnull_arg): Print note only when warning was
655 issued.
656
3ea9abca
GA
6572020-07-22 Tobias Burnus <tobias@codesourcery.com>
658
659 * c-omp.c (c_finish_omp_critical): Check for no name but
660 nonzero hint provided.
661
0933f508
GA
6622020-07-20 Jason Merrill <jason@redhat.com>
663
664 * c-cppbuiltin.c (c_cpp_builtins): Update
665 __cpp_nontype_template_args for C++20.
666
6672020-07-20 Martin Sebor <msebor@redhat.com>
668
669 PR c/96249
670 * c.opt: Remove stray text.
671
8ca07a30
GA
6722020-07-14 Lewis Hyatt <lhyatt@gmail.com>
673
674 PR other/86904
675 * c-indentation.c (should_warn_for_misleading_indentation): Get
676 global tabstop from the new source.
677 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
678 is now a common option.
679 * c.opt: Likewise.
680
a82c4c4c 6812020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
682
683 * c.opt (Wscalar-storage-order): Add explicit variable.
684
f60ee68d
GA
6852020-07-07 Nathan Sidwell <nathan@acm.org>
686
687 * c-opts.c (c_common_post_options): Add 'injecting' arg to
688 cpp_read_main_file.
689 (c_finish_options): Add linemap_line_start calls for builtin and cmd
690 maps. Force token position to line_table's highest line.
691 * c-ppoutput.c (print_line_1): Refactor, print line zero.
692 (cb_define): Always increment source line.
693
4077d74c
GA
6942020-07-06 Martin Sebor <msebor@redhat.com>
695
696 PR c++/95984
697 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
698 to stub lambda objects with null this pointer.
699 (check_nonnull_arg): Handle C++ nullptr.
700
b5f24739
GA
7012020-07-02 Jason Merrill <jason@redhat.com>
702 Jakub Jelinek <jakub@redhat.com>
703
704 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
705
46fbb6c6
GA
7062020-06-30 Jakub Jelinek <jakub@redhat.com>
707
708 PR c++/95963
709 * c-common.c (check_function_arguments_recurse): Don't crash on
710 calls to internal functions.
711
69273534
GA
7122020-06-28 Martin Sebor <msebor@redhat.com>
713
714 PR c++/86568
715 * c-common.c (struct nonnull_arg_ctx): Add members.
716 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
717 C++ member functions specially. Consider the this pointer implicitly
718 nonnull.
719 (check_nonnull_arg): Use location of argument when available.
720 (check_function_arguments): Use nonnull_arg_ctx as argument.
721
9a33c41f
GA
7222020-06-27 Jakub Jelinek <jakub@redhat.com>
723
724 PR middle-end/95903
725 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
726 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
727 smaller precision intop operands separately.
728
c9c05f73
GA
7292020-06-26 Marek Polacek <polacek@redhat.com>
730
731 * c-opts.c (c_common_init_options): Default to gnu++17.
732
aff95ee7
GA
7332020-06-17 Jonathan Wakely <jwakely@redhat.com>
734
bd0a89dc 735 PR c/95378
aff95ee7
GA
736 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
737 pointer arguments.
738
56638b9b
GA
7392020-06-16 Jakub Jelinek <jakub@redhat.com>
740
741 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
742 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
743 idx members.
744 (c_omp_is_loop_iterator): New function.
745 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
746 if outer loop iterator is present. Perform duplicate checking through
747 hash_set in the function rather than expecting caller to do that.
748 Pass NULL instead of d->ppset to walk_tree_1.
749 (c_omp_check_nonrect_loop_iv): New function.
750 (c_omp_check_loop_iv): Use it. Fill in new members, allow
751 non-rectangular loop forms, diagnose multiple associated loops with
752 the same iterator. Pass NULL instead of &pset to walk_tree_1.
753 (c_omp_check_loop_iv_exprs): Likewise.
754
ec6ffbb9
GA
7552020-06-10 Martin Liska <mliska@suse.cz>
756
757 PR tree-optimization/92860
758 * c-attribs.c (handle_optimize_attribute):
759 Save global options and compare it after parsing of function
760 attribute.
761 * c-pragma.c (opt_stack::saved_global_options): New field.
762 (handle_pragma_push_options): Save global_options.
763 (handle_pragma_pop_options): Compare them after pop.
764
b952c2cf
GA
7652020-06-09 Jakub Jelinek <jakub@redhat.com>
766
767 PR c/95580
768 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
769 case when MEM_REF's first argument has type pointer to incomplete type.
770
1a59f3db
GA
7712020-06-05 Jason Merrill <jason@redhat.com>
772
773 * c-pretty-print.c (pp_c_additive_expression): Handle negative
774 operand to POINTER_PLUS_EXPR.
775
3add3425
GA
7762020-06-04 Martin Sebor <msebor@redhat.com>
777
778 PR middle-end/10138
779 PR middle-end/95136
780 * c-attribs.c (append_access_attrs): Handle attr_access::none.
781 (handle_access_attribute): Same.
782
9a5b7438
GA
7832020-06-03 Mark Wielaard <mark@klomp.org>
784
785 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
786 New function.
787 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
788 New function declaration.
789
7902020-06-03 Mark Wielaard <mark@klomp.org>
791
792 * known-headers.cc (get_string_macro_hint): New function.
793 (get_stdlib_header_for_name): Use get_string_macro_hint.
794 (get_c_stdlib_header_for_string_macro_name): New function.
795 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
796 New function declaration.
797
7982020-06-03 Tobias Burnus <tobias@codesourcery.com>
799
800 * c-common.h (c_omp_predetermined_mapping): Declare.
801 * c-omp.c (c_omp_predetermined_mapping): New.
802
af114c38
MW
8032020-05-22 Mark Wielaard <mark@klomp.org>
804
805 * known-headers.cc (get_stdlib_header_for_name): Add a new
806 stdlib_hint array for stdbool and stdint.
807
45c50b6a
MW
8082020-05-22 Mark Wielaard <mark@klomp.org>
809
810 * known-headers.cc (get_stdlib_header_for_name): Return
811 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
812 flag_isoc99.
813
c22027a0
NS
8142020-05-20 Nathan Sidwell <nathan@acm.org>
815
38a4db21
NS
816 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
817
c22027a0
NS
818 * c-common.c (try_to_locate_new_include_insertion_point): Use
819 strcmp to compare filenames.
820 * c-lex.c (init_c_lex): Move declaration to initialization.
821 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
822 deferred count loop.
823
29f0e90d
JM
8242020-05-15 Jason Merrill <jason@redhat.com>
825
826 * c-opts.c (set_std_cxx20): Set flag_coroutines.
827
b04445d4
JM
8282020-05-13 Jason Merrill <jason@redhat.com>
829
830 * c.opt (std=c++20): Make c++2a the alias.
831 (std=gnu++20): Likewise.
832 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
833 * c-opts.c: Adjust.
834 * c-cppbuiltin.c: Adjust.
835 * c-ubsan.c: Adjust.
836 * c-warn.c: Adjust.
837
11dd3be5
EB
8382020-05-12 Eric Botcazou <ebotcazou@adacore.com>
839
840 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
841
b224c376
NS
8422020-05-08 Nathan Sidwell <nathan@acm.org>
843
844 Reimplement directives only processing.
845 * c-ppoutput.c (token_streamer): Ne.
846 (directives_only_cb): New. Swallow ...
847 (print_lines_directives_only): ... this.
848 (scan_translation_unit_directives_only): Reimplment using the
849 published interface.
850
f1d94677
MP
8512020-05-07 Marek Polacek <polacek@redhat.com>
852
853 * c-format.c (badwords): Add "nonstatic".
854
9b95bb52
JJ
855202-05-07 Jakub Jelinek <jakub@redhat.com>
856
857 PR c/94968
858 * c-common.c (speculation_safe_value_resolve_params): Return false if
859 error_operand_p (val2).
860 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
861 Remove extraneous semicolon.
862
530b4409 8632020-05-06 qing zhao <qing.zhao@oracle.com>
864
865 PR c/94230
866 * c-indentation.c (get_visual_column): Add a hint to use the new
867 -flarge-source-files option.
868
b776bdca
SSF
8692020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
870
871 * c-attribs.c (handle_vector_size_attribute): Add attribute
872 nonnull for argument args in order to silence warning of
873 uninitialized variable usage. Since this is local to the
874 compilation unit and thus cannot be checked at call sides by the
875 compiler, added an assert statement in order to verify this.
876
6607bdd9
L
8772020-05-01 H.J. Lu <hongjiu.lu@intel.com>
878
879 PR target/93492
880 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
881 value to USHRT_MAX (65535).
882
691eeb65
JJ
8832020-04-29 Jakub Jelinek <jakub@redhat.com>
884
885 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
886
26d76be7
JJ
8872020-04-27 Jakub Jelinek <jakub@redhat.com>
888
889 PR c/94755
890 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
891 fncode == BUILT_IN_NONE before initialization of first_param.
892
7291b2ed
MP
8932020-04-23 Marek Polacek <polacek@redhat.com>
894
895 PR c++/94733
896 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
897 TREE_PURPOSE.
898
58a29af8
PP
8992020-04-14 Patrick Palka <ppalka@redhat.com>
900
901 PR c++/85278
902 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
903 ampersand if it's an rvalue reference type.
904
09f04139
MS
9052020-04-13 Martin Sebor <msebor@redhat.com>
906
907 PR c/92326
908 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
909 printing array bound for flexible array members.
910
ee26baf4
IS
9112020-04-13 Iain Sandoe <iain@sandoe.co.uk>
912
913 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
914 define, per n4861.
915
75efe9cb
RB
9162020-04-02 Richard Biener <rguenther@suse.de>
917
918 PR c/94392
919 * c-opts.c (c_common_post_options): Enable -ffinite-loops
920 for -O2 and C++11 or newer.
921
75defde9
PP
9222020-03-28 Patrick Palka <ppalka@redhat.com>
923
924 * c.opt: Add -fconcepts-diagnostics-depth.
925
52f24a9e
MS
9262020-03-27 Martin Sebor <msebor@redhat.com>
927
928 PR c++/94346
929 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
930 to decl_attributes. Make handling of different kinds of entities
931 more robust.
932
ccacf77b
MS
9332020-03-27 Martin Sebor <msebor@redhat.com>
934
935 PR c++/94098
936 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
937 here.
938
ca6c7225
JJ
9392020-03-23 Jakub Jelinek <jakub@redhat.com>
940
941 PR c++/91993
942 * c-warn.c (warnings_for_convert_and_check): For expr and/or
943 result being COMPOUND_EXPRs, skip to ultimate rhs.
944
1aa22b19
RS
9452020-03-20 Richard Sandiford <richard.sandiford@arm.com>
946
947 PR middle-end/94072
948 * c-common.c (c_common_type_for_mode): Before using a registered
949 built-in type, check that the vectorness of the type matches
950 the vectorness of the mode.
951
700d4cb0
JJ
9522020-03-17 Jakub Jelinek <jakub@redhat.com>
953
954 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
955 issue in a diagnostic message.
956
b408e010
LH
9572020-03-15 Lewis Hyatt <lhyatt@gmail.com>
958
959 * c.opt: Avoid redundancy in the help text.
960
e78e50d5
MP
9612020-03-02 Marek Polacek <polacek@redhat.com>
962
963 PR c++/93958 - add missing -std=gnu++20.
964 * c.opt: Add -std=gnu++20.
965
649e1741
MS
9662020-03-01 Martin Sebor <msebor@redhat.com>
967
968 PR c++/92721
969 * c-attribs.c (append_access_attrs): Correctly handle attribute.
970 (handle_access_attribute): Same.
971
7b60f3ba
JJ
9722020-02-25 Jakub Jelinek <jakub@redhat.com>
973
974 PR c/93858
975 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
976 "did you mean" hint in diagnostics.
977
fb260504
JM
9782020-02-15 Jason Merrill <jason@redhat.com>
979
980 * c.opt: Add -std=c++20.
981
1d757b09
EB
9822020-02-14 Eric Botcazou <ebotcazou@adacore.com>
983
984 * c-ada-spec.c: Include bitmap.h.
985 (dump_ada_double_name): Rename into...
986 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
987 (dump_ada_array_type): Adjust to above renaming. Robustify.
988 (dump_nested_types_1): New function copied from... Add dumped_types
989 parameter and pass it down to dump_nested_type.
990 (dump_nested_types): ...this. Remove parent parameter. Just call
991 dump_nested_types_1 on an automatic bitmap.
992 (dump_nested_type): Add dumped_types parameter.
993 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
994 Adjust recursive calls and adjust to above renaming.
995 (dump_ada_declaration): Adjust call to dump_nested_types.
996 Tidy up and adjust to above renaming.
997 (dump_ada_specs): Initialize and release bitmap obstack.
998
0cc575e4
MS
9992020-02-10 Martin Sebor <msebor@redhat.com>
1000
1001 PR c/93640
1002 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
1003
a59aa302
JJ
10042020-02-10 Jakub Jelinek <jakub@redhat.com>
1005
1006 PR other/93641
1007 * c-format.c (check_plain): Fix up last argument of strncasecmp.
1008 Remove useless extra test.
1009
e464fc90
TB
10102020-02-03 Julian Brown <julian@codesourcery.com>
1011 Tobias Burnus <tobias@codesourcery.com>
1012
1013 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
1014
e3b6c052
JM
10152020-01-29 Jason Merrill <jason@redhat.com>
1016
1017 PR c++/89357
1018 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
1019
6d00f052
JM
10202020-01-23 Jason Merrill <jason@redhat.com>
1021
1022 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
1023
8a990ffa
MS
10242020-01-23 Martin Sebor <msebor@redhat.com>
1025
1026 PR c/84919
1027 * c-common.c (check_function_arguments): Avoid overlap checking
1028 of sprintf functions.
1029
55b7df8b
JM
10302020-01-22 Jason Merrill <jason@redhat.com>
1031
1032 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
1033 PR c++/40752
1034 * c-warn.c (conversion_warning): Check operands only after checking
1035 the whole expression. Don't check second operand of + for sign.
1036
c77074d0
JM
10372020-01-21 Jason Merrill <jason@redhat.com>
1038 Manuel López-Ibáñez <manu@gcc.gnu.org>
1039
1040 PR c++/40752 - useless -Wconversion with short +=.
1041 * c.opt (-Warith-conversion): New.
1042 * c-warn.c (conversion_warning): Recurse for operands of
1043 operators. Only warn about the whole expression with
1044 -Warith-conversion.
1045
731dbfc3
JM
10462020-01-21 Jason Merrill <jason@redhat.com>
1047
1048 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
1049 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
1050
ad1a3914
NS
10512020-01-20 Nathan Sidwell <nathan@acm.org>
1052
1053 PR preprocessor/80005
1054 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
1055
49789fd0
IS
10562020-01-18 Iain Sandoe <iain@sandoe.co.uk>
1057
1058 * c-common.c (co_await, co_yield, co_return): New.
1059 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
1060 RID_CO_RETURN): New enumeration values.
1061 (D_CXX_COROUTINES): Bit to identify coroutines are active.
1062 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
1063 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
1064 * c.opt (fcoroutines): New command-line switch.
1065
4bc1899b
DM
10662020-01-10 David Malcolm <dmalcolm@redhat.com>
1067
1068 * c-format.c (local_event_ptr_node): New.
1069 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
1070 (init_dynamic_diag_info): Initialize local_event_ptr_node.
1071 * c-format.h (T_EVENT_PTR): New define.
1072
f25e33fa
MS
10732020-01-10 Martin Sebor <msebor@redhat.com>
1074
1075 PR c/93132
1076 * c-attribs.c (append_access_attrs): Validate against the translated
1077 access string rather than the human-readable representation.
1078
8d9254fc
JJ
10792020-01-01 Jakub Jelinek <jakub@redhat.com>
1080
1081 Update copyright years.
1082
39292e25
EB
10832019-12-20 Eric Botcazou <ebotcazou@adacore.com>
1084
1085 * c-ada-spec.h (decl_sloc): Delete.
1086 * c-ada-spec.c (decl_sloc): Make static.
1087
519d7496
JB
10882019-12-19 Julian Brown <julian@codesourcery.com>
1089
1090 * c-common.h (c_omp_map_clause_name): Add prototype.
1091 * c-omp.c (c_omp_map_clause_name): New function.
1092 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
1093 PRAGMA_OACC_CLAUSE_DETACH.
1094
a6163563
JB
10952019-12-19 Julian Brown <julian@codesourcery.com>
1096 Maciej W. Rozycki <macro@codesourcery.com>
1097 Tobias Burnus <tobias@codesourcery.com>
1098 Thomas Schwinge <thomas@codesourcery.com>
1099
1100 * c-pragma.h (pragma_omp_clause): Add
1101 PRAGMA_OACC_CLAUSE_NO_CREATE.
1102
e8f1ade2
MS
11032019-12-17 Martin Sebor <msebor@redhat.com>
1104
1105 PR c++/61339
1106 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
1107
368877a1
DM
11082019-12-11 David Malcolm <dmalcolm@redhat.com>
1109
1110 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
1111 implementation.
1112 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
1113
d68f5d45
DM
11142019-12-09 David Malcolm <dmalcolm@redhat.com>
1115
1116 * c-format.c (range_label_for_format_type_mismatch::get_text):
1117 Replace label_text ctor called with true with label_text::take.
1118
d3e28653
DM
11192019-12-09 David Malcolm <dmalcolm@redhat.com>
1120
1121 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
1122 initial newline from expected outputs.
1123 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
1124 call to diagnostic_show_locus.
1125
abd6d8cc
JJ
11262019-12-06 Jakub Jelinek <jakub@redhat.com>
1127
1128 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
1129 now.
1130
7906797e
MP
11312019-12-05 Marek Polacek <polacek@redhat.com>
1132 Jakub Jelinek <jakub@redhat.com>
1133
1134 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
1135 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
1136
5c04da88
MP
11372019-12-05 Marek Polacek <polacek@redhat.com>
1138
1139 PR c++/92271 - make __is_same alias for __is_same_as.
1140 * c-common.c: Add __is_same, an alias for __is_same_as.
1141
43aae289
MP
11422019-12-03 Marek Polacek <polacek@redhat.com>
1143
1144 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
1145 * c-cppbuiltin.c (c_cpp_builtins): Predefine
1146 __cpp_aggregate_paren_init=201902 for -std=c++2a.
1147
d7ddfbcb
JH
11482019-11-30 Jan Hubicka <hubicka@ucw.cz>
1149
1150 * c-attribs.c (handle_symver_attribute): New function
1151 (c_common_attributes): Add symver.
1152
65ef05d0
RS
11532019-11-30 Richard Sandiford <richard.sandiford@arm.com>
1154
1155 * c-common.c (pointer_int_sum): Use verify_type_context to check
1156 whether the target allows pointer arithmetic for the types involved.
1157 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
1158 to check whether the target allows sizeof and alignof operations
1159 for the types involved.
1160
1a291106
JM
11612019-11-27 Jason Merrill <jason@redhat.com>
1162
1163 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
1164
05d6cb1a
JJ
11652019-11-26 Jakub Jelinek <jakub@redhat.com>
1166
1167 PR c++/61414
1168 * c-attribs.c (handle_mode_attribute): Add mode attribute to
1169 ENUMERAL_TYPEs.
1170
5b8d9367
JM
11712019-11-25 Joseph Myers <joseph@codesourcery.com>
1172
1173 PR c/91985
1174 * c-common.c (c_common_type_for_mode): Handle decimal
1175 floating-point types being NULL_TREE.
1176 * c-format.c (get_format_for_type_1): Handle specified types being
1177 NULL_TREE.
1178 * c-lex.c (interpret_float): Give an error for decimal
1179 floating-point constants when decimal floating-point not
1180 supported.
1181
1fbf51cb
JJ
11822019-11-23 Jakub Jelinek <jakub@redhat.com>
1183
1184 PR middle-end/83859
1185 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
1186 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
1187 group warning with inform together.
1188 (handle_access_attribute): Formatting fix.
1189
761df906
JJ
11902019-11-22 Jakub Jelinek <jakub@redhat.com>
1191
bdaf8be1
JJ
1192 PR c/90677
1193 * c-common.h (identifier_global_tag): Declare.
1194 * c-format.c (get_pointer_to_named_type): Renamed to ...
1195 (get_named_type): ... this. Use identifier_global_tag instead of
1196 identifier_global_value, handle the return value being a TYPE_P.
1197 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
1198 to call get_named_type instead. Formatting fixes.
1199
c2ecce6d 1200 Implement P1902R1, Missing feature-test macros 2017-2019.
761df906
JJ
1201 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
1202 and __cpp_generic_lambdas for -std=c++2a. Define
1203 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
1204 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
1205 __cpp_concepts for -std=c++2a.
1206
54aa6b58
MS
12072019-11-22 Martin Sebor <msebor@redhat.com>
1208
1209 PR middle-end/83859
1210 * c-attribs.c (handle_access_attribute): New function.
1211 (c_common_attribute_table): Add new attribute.
1212 (get_argument_type): New function.
1213 (append_access_attrs): New function.
1214 (get_nonnull_operand): Rename...
1215 (get_attribute_operand): ...to this.
1216 * c-common.c (get_nonnull_operand): Rename...
1217 (get_attribute_operand): ...to this.
1218
6c80b1b5
JM
12192019-11-21 Joseph Myers <joseph@codesourcery.com>
1220
1221 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
1222 of warning.
1223
192961ff
JM
12242019-11-19 Joseph Myers <joseph@codesourcery.com>
1225
1226 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
1227 warning for standard attributes mixed with fallthrough attributes.
1228
f8aea5e3
JM
12292019-11-15 Joseph Myers <joseph@codesourcery.com>
1230
1231 * c-attribs.c (handle_fallthrough_attribute): Remove static.
1232 * c-common.h (handle_fallthrough_attribute): Declare.
1233
2cc94aa8
JM
12342019-11-15 Joseph Myers <joseph@codesourcery.com>
1235
1236 * c-attribs.c (handle_deprecated_attribute): Remove static.
1237 * c-common.h (handle_deprecated_attribute): Declare.
1238
7c5890cc
JM
12392019-11-14 Joseph Myers <joseph@codesourcery.com>
1240
1241 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
1242 char for C.
1243
b2417b59
JJ
12442019-11-14 Jakub Jelinek <jakub@redhat.com>
1245
d0ec7c93
JJ
1246 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
1247 valid vendors.
1248
b2417b59
JJ
1249 * c-omp.c (c_omp_check_context_selector): Handle name lists
1250 containing string literals. Don't diagnose atomic_default_mem_order
1251 with multiple props.
1252
00be2a5f
JM
12532019-11-13 Joseph Myers <joseph@codesourcery.com>
1254
1255 * c-cppbuiltin.c (builtin_define_float_constants): Also define
1256 NORM_MAX constants. Update call to get_max_float.
1257 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
1258 constants.
1259
2dbad62d
EB
12602019-11-13 Eric Botcazou <ebotcazou@adacore.com>
1261
1262 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
1263 (dump_forward_type): Do not generate a declaration for function types.
1264 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
1265 of the component type if it is declared in another file.
1266
6ed76044
ML
12672019-11-12 Martin Liska <mliska@suse.cz>
1268
1269 * c-opts.c (c_common_post_options):
1270 Use SET_OPTION_IF_UNSET.
1271
62aee289
MR
12722019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
1273 Frederik Harwath <frederik@codesourcery.com>
1274
1275 gcc/c-family/
1276 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
1277 constant.
1278 * c-pragma.c (oacc_pragmas): Add "serial" entry.
1279
f486280c
RS
12802019-11-08 Richard Sandiford <richard.sandiford@arm.com>
1281
1282 * c-common.h (gnu_vector_type_p): New function.
1283 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
1284 vectors to satisfy gnu_vector_type_p.
1285 (c_build_vec_convert): Likewise __builtin_convertvector.
1286 (convert_vector_to_array_for_subscript): Likewise when applying
1287 implicit vector to array conversion.
1288 (scalar_to_vector): Likewise when converting vector-scalar
1289 operations to vector-vector operations.
1290
017c6491
JM
12912019-11-08 Joseph Myers <joseph@codesourcery.com>
1292
1293 * c.opt (Wold-style-definition): Initialize to -1.
1294 * c-opts.c (c_common_post_options): Set warn_old_style_definition
1295 to flag_isoc2x if not set explicitly.
1296
c01bd174
JM
12972019-11-07 Joseph Myers <joseph@codesourcery.com>
1298
1299 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
1300
0df65305
JM
13012019-11-05 Jason Merrill <jason@redhat.com>
1302
1303 * c-opts.c (c_common_post_options): -fconcepts-ts implies
1304 -fconcepts.
1305
e0c866dd
KK
13062019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
1307
1308 * c-opts.c (c_common_post_options): Update
1309 latest_abi_version.
1310
f968ef9b
JJ
13112019-11-02 Jakub Jelinek <jakub@redhat.com>
1312
d0c464d2
JJ
1313 * c-common.h (c_omp_get_context_selector): Remove.
1314 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
1315 and renamed to omp_get_context_selector.
1316
917dd789
JJ
1317 * c-omp.c (c_omp_mark_declare_variant): Use
1318 omp_context_selector_set_compare.
1319
f968ef9b
JJ
1320 PR c++/88335 - Implement P1073R3: Immediate functions
1321 * c-common.h (enum rid): Add RID_CONSTEVAL.
1322 * c-common.c (c_common_reswords): Add consteval.
1323
5f6705b7
JJ
13242019-11-01 Martin Sebor <msebor@redhat.com>
1325
1326 PR middle-end/91679
1327 PR middle-end/91647
1328 PR middle-end/91463
1329 PR middle-end/92312
1330 * c-pretty-print.c (direct_abstract_declarator): Print
1331 bound in zero-length arrays.
1332 * c.opt (-Wzero-length-bounds): New option.
1333
43f1814c
NS
13342019-10-30 Nathan Sidwell <nathan@acm.org>
1335
1336 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
1337 macros.
1338
ad1539d5
MS
13392019-10-28 Martin Sebor <msebor@redhat.com>
1340
1341 PR c/66970
1342 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
1343 even when only preprocessing.
1344 * c-common.h (names_builtin_p): Declare new function.
1345 * c-lex.c (init_c_lex): Set has_builtin.
1346 (c_common_has_builtin): Define a new function.
1347 * c-ppoutput.c (init_pp_output): Set has_builtin.
1348
135df52c
JJ
13492019-10-24 Jakub Jelinek <jakub@redhat.com>
1350
1351 * c-common.h (c_omp_context_selector_matches): Remove.
1352 * c-omp.c (c_omp_context_selector_matches): Remove.
1353 * c-attribs.c (c_common_attribute_table): Add
1354 "omp declare target {host,nohost,block}" attributes.
1355
8ad0c477
JM
13562019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
1357
1358 * c-lex.c (c_common_has_attribute): Update nodiscard value.
1359
56898e43
RS
13602019-10-14 Richard Sandiford <richard.sandiford@arm.com>
1361
1362 * c-common.h (user_facing_original_type_p): Declare.
1363 * c-common.c: Include c-spellcheck.h.
1364 (user_facing_original_type_p): New function.
1365
20de9568
JJ
13662019-10-12 Jakub Jelinek <jakub@redhat.com>
1367
1368 * c-common.h (c_omp_mark_declare_variant,
1369 c_omp_context_selector_matches): Declare.
1370 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
1371 and hsa-common.h.
1372 (c_omp_get_context_selector): Support second argument NULL.
1373 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
1374 functions.
1375 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
1376 attribute, add "omp declare variant base" and
1377 "omp declare variant variant" attributes.
1378
175a85b2
JM
13792019-10-11 Joseph Myers <joseph@codesourcery.com>
1380
1381 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
1382 CppReason(CPP_W_C11_C2X_COMPAT).
1383
fe2bc27c
JM
13842019-10-11 Joseph Myers <joseph@codesourcery.com>
1385
1386 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
1387 _Decimal64 and _Decimal128.
1388
27dfdc0f
JM
13892019-10-10 Joseph Myers <joseph@codesourcery.com>
1390
1391 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
1392 types if DFP not supported.
1393
94e7f906
JJ
13942019-10-10 Jakub Jelinek <jakub@redhat.com>
1395
1396 * c-common.h (c_omp_check_context_selector,
1397 c_omp_get_context_selector): Declare.
1398 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
1399 in diagnostic message.
1400 (c_omp_check_context_selector, c_omp_get_context_selector): New
1401 functions.
1402 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
1403 attribute.
1404 (handle_omp_declare_variant_attribute): New function.
1405
a7160771
MS
14062019-10-09 Martin Sebor <msebor@redhat.com>
1407
1408 PR tree-optimization/90879
1409 * c.opt (-Wstring-compare): New option.
1410
cb57504a
JM
14112019-10-08 Andrew Sutton <asutton@lock3software.com>
1412 Jason Merrill <jason@redhat.com>
1413
1414 Update the concepts implementation to conform to the C++20
1415 specification, improve compile times, and generally clean up
1416 the implementation.
1417
1418 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
1419 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
1420 * c.opt: Add -Wconcepts-ts.
1421 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
1422 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
1423 (set_std_cxx2a): Enable concepts by default.
1424
fbb2a6dc
JM
14252019-10-08 Joseph Myers <joseph@codesourcery.com>
1426
1427 * c-opts.c (c_common_post_options): Set
1428 -fno-fp-int-builtin-inexact for C2X.
1429
8e007055
JJ
14302019-10-05 Jakub Jelinek <jakub@redhat.com>
1431
1432 PR c++/91369 - Implement P0784R7: constexpr new
1433 * c-cppbuiltin.c (c_cpp_builtins): Predefine
1434 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
1435
843f104d
JM
14362019-10-04 Joseph Myers <joseph@codesourcery.com>
1437
1438 PR c/82752
1439 * c-format.c (C_STD_VER): Handle C2x.
1440 (C_STD_NAME): Likewise.
1441 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
1442 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
1443 modifier allowed and 'p' flag.
1444 * c-format.h (enum format_std_version): Add STD_C2X.
1445 (struct format_char_info): Mention 'p' in comment on flags2.
1446
e9c9a142
DM
14472019-10-01 David Malcolm <dmalcolm@redhat.com>
1448
1449 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
1450 calling diagnostic_show_locus, rather than destroying it afterwards.
1451
7552c36a
JJ
14522019-10-01 Jakub Jelinek <jakub@redhat.com>
1453
1454 PR c++/91925
1455 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
1456 with NULL DECL_FIELD_OFFSET.
1457
8209db25
RS
14582019-10-01 Richard Sandiford <richard.sandiford@arm.com>
1459
1460 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
1461 has a type name, use it in preference to the __vector syntax.
1462
9343bf99
RS
14632019-09-30 Richard Sandiford <richard.sandiford@arm.com>
1464
1465 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
1466 two spaces between a comma and "...".
1467
59bc434a
JJ
14682019-09-27 Jakub Jelinek <jakub@redhat.com>
1469
1470 PR c++/88203
1471 * c-common.h (c_omp_predefined_variable): Declare.
1472 * c-omp.c (c_omp_predefined_variable): New function.
1473 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
1474 for predefined variables.
1475
c6447c20
RS
14762019-09-27 Richard Sandiford <richard.sandiford@arm.com>
1477
1478 * c-common.h (build_function_call_vec): Take the original
1479 function decl as an optional final parameter.
1480 (check_builtin_function_arguments): Take the original function decl.
1481 * c-common.c (check_builtin_function_arguments): Likewise.
1482 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
1483 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
1484
c4438114
JM
14852019-09-15 Jason Merrill <jason@redhat.com>
1486
1487 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
1488 fold_for_warn in "|| mask" warning.
1489
68a57628
ML
14902019-09-10 Martin Liska <mliska@suse.cz>
1491
1492 * c.opt: Use newly added WarnRemoved.
1493
f48ef52e
ML
14942019-09-09 Martin Liska <mliska@suse.cz>
1495
1496 * c.opt: Update comment of removed
1497 options that are preserved only for backward
1498 compatibility.
1499
67f6e649
ML
15002019-09-06 Martin Liska <mliska@suse.cz>
1501
1502 PR c++/91125
1503 * c-common.c: Remove definition of flag_use_repository.
1504 * c-common.h: Likewise.
1505 * c-opts.c (c_common_handle_option):
1506 Do not handle OPT_frepo option.
1507 * c.opt: Mark the option with Deprecated.
1508
db9d2274
MP
15092019-09-04 Marek Polacek <polacek@redhat.com>
1510
1511 * c.opt (fdeduce-init-list): Ignored.
1512
68e2c199
PK
15132019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1514
1515 PR c/78736
1516 * c.opt (Wenum-conversion): New option.
1517
7a4418a5
JL
15182019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1519
1520 * c-attribs.c (handle_section_attribute): Call the
1521 handle_generic_attribute target hook after performing target
1522 independent processing.
1523 (handle_noinit_attribute): Likewise.
1524
5f76ab15
ILT
15252019-09-03 Ian Lance Taylor <iant@golang.org>
1526
1527 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
1528 when using -fgo-dump-spec.
1529
ae0d3f6a
ML
15302019-09-02 Martin Liska <mliska@suse.cz>
1531
1532 PR c++/91155
1533 * c-common.c (fname_as_string): Use cxx_printable_name for
1534 __PRETTY_FUNCTION__ same as was used before r265711.
1535
8a902edb
MP
15362019-08-28 Marek Polacek <polacek@redhat.com>
1537
1538 Implement P1152R4: Deprecating some uses of volatile.
1539 PR c++/91361
1540 * c-opts.c (c_common_post_options): Enable -Wvolatile by
1541 default for C++2a, unless -Wno-deprecated.
1542 * c.opt (Wvolatile): New warning.
1543
4742dbe7
MP
15442019-08-28 Marek Polacek <polacek@redhat.com>
1545
1546 PR c++/91360 - Implement C++20 P1143R2: constinit.
1547 * c-common.c (c_common_reswords): Add constinit and __constinit.
1548 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
1549 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
1550 RID_LAST_CXX20.
1551 (D_CXX20): Define.
1552 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
1553 * c-format.c (cxx_keywords): Add "constinit".
1554 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
1555
6a074892
JJ
15562019-08-27 Jakub Jelinek <jakub@redhat.com>
1557
1558 PR c++/91415
1559 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
1560 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
1561 like COMPOUND_EXPR rather than normal expression.
1562
22f8849d
IS
15632019-08-23 Iain Sandoe <iain@sandoe.co.uk>
1564
1565 PR pch/61250
1566 * c-lex.c (c_lex_with_flags): Don't call
1567 c_common_no_more_pch () from here.
1568
df375b03
JJ
15692019-08-23 Jakub Jelinek <jakub@redhat.com>
1570
1571 PR middle-end/91283
1572 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
1573 instead of flag_excess_precision_cmdline.
1574 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
1575 * c-opts.c (c_common_post_options): Likewise.
1576
14b7950f
MS
15772019-08-22 Martin Sebor <msebor@redhat.com>
1578
1579 PR middle-end/91490
1580 * c-common.c (braced_list_to_string): Add argument and overload.
1581 Handle flexible length arrays and unions.
1582
8bb2ee59
EB
15832019-08-21 Eric Botcazou <ebotcazou@adacore.com>
1584
1585 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
1586 function declarations where arguments are missing. Rename variables.
1587
21c1e205
RB
15882019-08-15 Richard Biener <rguenther@suse.de>
1589
1590 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
1591 enabled, define __SIZETYPE__.
1592
f0033821
CL
15932019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
1594
1595 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
1596 exclusion with "section" attribute.
1597 (attr_noinit_exclusions): New table.
1598 (handle_noinit_attribute): New function.
1599
4d732405
RS
16002019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1601
1602 PR middle-end/91421
1603 * c-common.c (resolve_overloaded_builtin): Use
1604 copy_decl_built_in_function.
1605
51ad8481
MS
16062019-08-13 Martin Sebor <msebor@redhat.com>
1607
1608 PR c/80619
1609 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
1610 (asm_fprintf_length_spec): Same.
1611 * c-format.h (format_lengths): Add FMT_LEN_w.
1612
77eb117f
JJ
16132019-08-10 Jakub Jelinek <jakub@redhat.com>
1614
1615 * c-pragma.h (enum pragma_omp_clause): Add
1616 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1617
398e3feb
JJ
16182019-08-07 Jakub Jelinek <jakub@redhat.com>
1619
1620 * c-pragma.h (enum pragma_omp_clause): Add
1621 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
1622 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
1623 enumeration value.
1624
ab574db6
MP
16252019-08-05 Marek Polacek <polacek@redhat.com>
1626
1627 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
1628 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
1629 default for C++2a, unless -Wno-deprecated.
1630 * c.opt (Wcomma-subscript): New warning.
1631
554a530f
JJ
16322019-07-20 Jakub Jelinek <jakub@redhat.com>
1633
1634 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
1635 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
1636 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
1637 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
1638 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
1639 constructs with the loop construct.
1640
1a888209
JJ
16412019-07-13 Jakub Jelinek <jakub@redhat.com>
1642
1643 PR c/91149
1644 * c-omp.c (c_omp_split_clauses): Fix a pasto in
1645 OMP_CLAUSE_REDUCTION_TASK handling.
1646
1fdd6f04
JJ
16472019-07-12 Jakub Jelinek <jakub@redhat.com>
1648
1649 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
1650 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
1651
99b1c316
MS
16522019-07-09 Martin Sebor <msebor@redhat.com>
1653
1654 PR c++/61339
1fdd6f04 1655 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
1656 and others to class.
1657 * c-pretty-print.h: Same.
1658
6c1dae73
MS
16592019-07-09 Martin Sebor <msebor@redhat.com>
1660
1661 PR c++/61339
1662 * c-format.c (check_argument_type): Change class-key from class to
1663 struct and vice versa to match convention and avoid -Wclass-is-pod
1664 and -Wstruct-no-pod.
1665 * c-pretty-print.h: Same.
1666
8ba6ea87
ML
16672019-07-03 Martin Liska <mliska@suse.cz>
1668
1669 * c-common.c (try_to_locate_new_include_insertion_point): Remove
1670 dead assignemts.
1671
83eb9522
JJ
16722019-07-03 Jakub Jelinek <jakub@redhat.com>
1673
1674 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
1675 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
1676 with OMP_PARALLEL.
1677
1c6ffbab
QZ
16782019-07-02 qing zhao <qing.zhao@oracle.com>
1679
1680 PR preprocessor/90581
1681 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
1682 * c.opt: Add new option -fmax-include-depth.
1683
7ffc7de5
JM
16842019-06-26 Jason Merrill <jason@redhat.com>
1685
1686 PR c++/55442 - memory-hog with highly recursive constexpr.
1687 * c.opt (fconstexpr-loop-limit): New.
1688
361af3e4
JJ
16892019-06-25 Jakub Jelinek <jakub@redhat.com>
1690
1691 PR sanitizer/90954
1692 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
1693 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
1694
ab20d992
JJ
16952019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1696
1697 * c-common.c (c_common_nodes_and_builtins): Define
1698 alternate "__intN__" name for "__intN" types.
1699
f4af4019
JH
17002019-06-24 Jan Hubicka <jh@suse.cz>
1701
1702 * c-common.c (braced_lists_to_strings): Check that
1703 type is array or integer prior checking string flag.
1704
da9e9b57
MB
17052019-06-21 Matthew Beliveau <mbelivea@redhat.com>
1706
1707 PR c++/90875 - added -Wswitch-outside-range option
1708 * c.opt (Wswitch-outside-range): Added new option.
1709 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
1710
3f3d6a6f
MP
17112019-06-21 Marek Polacek <polacek@redhat.com>
1712
1713 PR c++/90953 - ICE with -Wmissing-format-attribute.
1714 * c-common.c (check_function_arguments_recurse): Use
1715 get_attribute_name.
1716 (check_missing_format_attribute): Likewise.
1717
1bf32c11
MP
17182019-06-19 Marek Polacek <polacek@redhat.com>
1719
1720 PR c++/60364 - noreturn after first decl not diagnosed.
1721 * c-attribs.c (handle_noreturn_attribute): No longer static.
1722 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
1723 Declare.
1724 * c-format.c (check_function_format): Use get_attribute_name.
1725
a04c0734
MS
17262019-06-19 Martin Sebor <msebor@redhat.com>
1727
1728 PR translation/90156
1729 * c-format.c (function_format_info::format_type): Adjust type.
1730 (function_format_info::is_raw): New member.
1731 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
1732 (decode_format_attr): Adjust call to decode_format_type.
1733 Avoid a redundant call to convert_format_name_to_system_name.
1734 Avoid abbreviating the word "arguments" in a diagnostic.
1735 (format_warning_substr): New function.
1736 (avoid_dollar_number): Quote dollar sign in a diagnostic.
1737 (finish_dollar_format_checking): Same.
1738 (check_format_info): Same.
1739 (struct baltoks_t): New.
1740 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
1741 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
1742 functions.
1743 (check_format_info_main): Call check_plain. Use baltoks_t. Call
1744 maybe_diag_unbalanced_tokens.
1745 (handle_format_attribute): Spell out the word "arguments" in
1746 a diagnostic.
1747
d3786ebb
MB
17482019-06-11 Matthew Beliveau <mbelivea@redhat.com>
1749
1750 PR c++/90449 - add -Winaccessible-base option.
1751 * c.opt (Winaccessible-base): New option.
1752
bf38f7e9
JJ
17532019-06-10 Jakub Jelinek <jakub@redhat.com>
1754
1755 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
1756 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
1757 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
1758 combined/composite constructs where it is not allowed. Copy over
1759 OMP_CLAUSE_REDUCTION_INSCAN.
1760
0ecf545c
MS
17612019-06-05 Martin Sebor <msebor@redhat.com>
1762
1763 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
1764 (handle_alias_ifunc_attribute): Same.
1765 (handle_copy_attribute): Same.
1766 (handle_weakref_attribute): Same.
1767 (handle_nonnull_attribute): Same.
1768 * c-warn.c (warn_for_sign_compare): Same.
1769 (warn_for_restrict): Same.
1770 * c.opt: Same.
1771
36b34127
MS
17722019-06-05 Martin Sebor <msebor@redhat.com>
1773
1774 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
1775 * c.opt (-Wformat-diag): Remove a spurious period.
1776
357a352f
JJ
17772019-05-29 Jakub Jelinek <jakub@redhat.com>
1778
1779 PR c/90628
1780 * c-common.c (check_builtin_function_arguments)
1781 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
1782 as last argument.
1783
2b8235ea
EB
17842019-05-23 Eric Botcazou <ebotcazou@adacore.com>
1785
1786 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
1787
6d86ddc4
ML
17882019-05-22 Martin Liska <mliska@suse.cz>
1789
1790 PR lto/90500
1791 * c-attribs.c (handle_copy_attribute): Do not copy
1792 target_clones attribute.
1793
419ba5b9
EB
17942019-05-21 Eric Botcazou <ebotcazou@adacore.com>
1795
1796 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
1797 * c-ada-spec.c (print_assignment_operator): New function.
1798 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
1799 assignment operators declared as methods and filter out the others.
1800
e03436e7
TS
18012019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1802
1803 PR c/89433
1804 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
1805 "omp declare target".
1806
a9c697b8
MS
18072019-05-16 Martin Sebor <msebor@redhat.com>
1808
ab20d992
JJ
1809 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
1810 keywords, operators, and types in diagnostics.
1811 (handle_scalar_storage_order_attribute): Same.
1812 (handle_mode_attribute): Same.
1813 (handle_visibility_attribute): Same.
1814 (handle_assume_aligned_attribute): Same.
1815 (handle_no_split_stack_attribute): Same.
1816 * c-common.c (shorten_compare): Same.
1817 (c_common_truthvalue_conversion): Same.
1818 (cb_get_source_date_epoch): Same.
1819 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
1820 in diagnostics.
1821 (interpret_float): Same.
1822 * c-omp.c (c_finish_omp_for): Same.
1823 * c-opts.c (c_common_post_options): Same.
1824 * c-pch.c (c_common_pch_pragma): Same.
1825 * c-pragma.c (pop_alignment): Same.
1826 (handle_pragma_pack): Same.
1827 (apply_pragma_weak): Same.
1828 (handle_pragma_weak): Same.
1829 (handle_pragma_scalar_storage_order): Same.
1830 (handle_pragma_redefine_extname): Same.
1831 (add_to_renaming_pragma_list): Same.
1832 (maybe_apply_renaming_pragma): Same.
1833 (push_visibility): Same.
1834 (handle_pragma_visibility): Same.
1835 (handle_pragma_optimize): Same.
1836 (handle_pragma_message): Same.
1837 * c-warn.c (warn_for_omitted_condop): Same.
1838 (lvalue_error): Same.
a9c697b8 1839
6b943512
RB
18402019-05-15 Richard Biener <rguenther@suse.de>
1841
1842 PR c/90474
1843 * c-common.c (c_common_mark_addressable_vec): Also mark
1844 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
1845 c_mark_addressable.
ab20d992 1846
b744fc85
NS
18472019-05-06 Nathan Sidwell <nathan@acm.org>
1848
1849 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
1850
598f50d7
NS
18512019-04-30 Nathan Sidwell <nathan@acm.org>
1852
1853 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
1854
5bcc5a3b
ML
18552019-04-30 Martin Liska <mliska@suse.cz>
1856
1857 * c-pragma.c (handle_pragma_diagnostic): Provide hints
1858 for unknown options.
1859
e78a87f7
RS
18602019-04-26 Richard Sandiford <richard.sandiford@arm.com>
1861
1862 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
1863 the pointer target rather than the pointer itself.
1864
c280b7ee
JJ
18652019-04-19 Jakub Jelinek <jakub@redhat.com>
1866
1867 PR c/89888
1868 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
1869 arguments.
1870 (c_do_switch_warnings): Remove outside_range_p argument.
1871 * c-common.c (check_case_bounds): Removed.
1872 (c_add_case_label): Remove orig_type and outside_range_p arguments.
1873 Don't call check_case_bounds. Fold low_value as well as high_value.
1874 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
1875 Check for case labels outside of range of original type here and
1876 adjust them.
1877
8e8225e6
JJ
18782019-04-12 Jakub Jelinek <jakub@redhat.com>
1879
63b8a166
JJ
1880 PR translation/90041
1881 * c.opt (-fhandle-exceptions): Use %< and %> around option names
1882 in the Warn diagnostics.
1883
8e8225e6
JJ
1884 PR c/89946
1885 * c-attribs.c (handle_patchable_function_entry_attribute): Add
1886 function comment. Warn if arguments of the attribute are not positive
1887 integer constants.
1888
53a3f614
EB
18892019-04-09 Eric Botcazou <ebotcazou@adacore.com>
1890
1891 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
1892 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
1893
22be5873
EB
18942019-04-07 Eric Botcazou <ebotcazou@adacore.com>
1895
1896 * c-ada-spec.c (is_float128): New predicate extracted from...
1897 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
1898 <REAL_TYPE>: ...here. Call it.
1899
34facf20
DM
19002019-04-05 David Malcolm <dmalcolm@redhat.com>
1901
1902 PR c/89985
1903 * c-warn.c (check_address_or_pointer_of_packed_member): Add
1904 auto_diagnostic_group. Guard inform calls by result of
1905 warning_at call.
1906
05564120
MP
19072019-04-05 Marek Polacek <polacek@redhat.com>
1908
ab20d992 1909 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
05564120
MP
1910 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
1911 of RHS.
1912
7a506c3c
JM
19132019-04-03 Jason Merrill <jason@redhat.com>
1914
1915 PR c++/86586 - -fcompare-debug=-Wsign-compare.
1916 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
1917
ddeae8c8
MS
19182019-04-01 Martin Sebor <msebor@redhat.com>
1919
1920 PR c/89685
1921 * c-attribs.c (handle_copy_attribute): Handle references and
1922 non-constant expressions.
1923
a15ffa22
JJ
19242019-03-22 Jakub Jelinek <jakub@redhat.com>
1925
1926 PR c++/87481
1927 * c.opt (-fconstexpr-ops-limit=): New option.
1928
36a3a7a3
JJ
19292019-03-21 Jakub Jelinek <jakub@redhat.com>
1930
1931 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
1932 template param.
1933
bec1da64
MS
19342019-03-19 Martin Sebor <msebor@redhat.com>
1935
1936 PR tree-optimization/89688
1937 * c-common.c (braced_list_to_string): Make static.
1938 (braced_lists_to_strings): Define new function.
1939 * c-common.h (braced_list_to_string): Remove.
1940 (braced_lists_to_strings): Declare.
1941
1fe61adf
ML
19422019-03-12 Martin Liska <mliska@suse.cz>
1943
1944 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
1945
93964ebd
ML
19462019-03-11 Martin Liska <mliska@suse.cz>
1947
1948 * c-opts.c (c_common_post_options): Wrap apostrophes
1949 in gcc internal format with %'.
1950
a3f9f006
ML
19512019-03-11 Martin Liska <mliska@suse.cz>
1952
1953 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
1954 in a string format message and fix GNU coding style.
1955 * c-common.c (vector_types_convertible_p): Likewise.
1956 (c_build_vec_perm_expr): Likewise.
1957 * c-indentation.c (get_visual_column): Likewise.
1958 * c-opts.c (c_common_handle_option): Likewise.
1959 (c_common_post_options): Likewise.
1960 (sanitize_cpp_opts): Likewise.
1961 * c-pch.c (c_common_pch_pragma): Likewise.
1962 * c-pragma.c (handle_pragma_pack): Likewise.
1963
1db01ff9
JJ
19642019-03-08 Jakub Jelinek <jakub@redhat.com>
1965
1966 PR tree-optimization/89550
1967 * c-common.c (c_common_truthvalue_conversion): Only set
1968 TREE_NO_WARNING if warning_at returned true.
1969 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
1970
ba790e6f
JJ
19712019-02-25 Sandra Loosemore <sandra@codesourcery.com>
1972 Martin Sebor <msebor@gmail.com>
1973
1974 * c.opt (Wmissing-attributes): Clean up doc string.
1975
7da73ba7
JJ
19762019-02-25 Jakub Jelinek <jakub@redhat.com>
1977
1978 PR c/89495
1979 * c-format.c (maybe_read_dollar_number): Compute nargnum in
1980 HOST_WIDE_INT type to avoid overflows and change overflow_flag
1981 checking.
1982
921bb9d1
RB
19832019-02-22 Richard Biener <rguenther@suse.de>
1984
1985 * c-pch.c (no_checksum): Remove.
1986 (pch_init): Remove assertion that executable_checksum is not
1987 all zero.
1988 (c_common_valid_pch): Likewise.
1989
e2ebb05c
MS
19902019-02-18 Martin Sebor <msebor@redhat.com>
1991
1992 PR middle-end/89294
1993 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
1994
3fe53000
DM
19952019-02-16 David Malcolm <dmalcolm@redhat.com>
1996
1997 PR c++/88680
1998 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
1999 implementing -Wtype-limits.
2000
28a8cef1
MS
20012019-02-11 Martin Sebor <msebor@redhat.com>
2002
2003 PR c++/87996
2004 * c-common.c (invalid_array_size_error): New function.
2005 (valid_array_size_p): Call it. Handle size as well as type.
2006 * c-common.h (valid_constant_size_p): New function.
2007 (enum cst_size_error): New type.
2008
ec2be203
DM
20092019-01-31 David Malcolm <dmalcolm@redhat.com>
2010
2011 PR c/89122
2012 * known-headers.cc (get_stdlib_header_for_name): Add
2013 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
2014
8936f047
JJ
20152019-01-31 Jakub Jelinek <jakub@redhat.com>
2016
2017 PR libstdc++/88170
2018 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
2019 a C cast in pp_c_flag_gnu_v3 mode.
2020
6a335b96
JJ
20212019-01-29 Jakub Jelinek <jakub@redhat.com>
2022
2023 PR c/86125
2024 * c-common.c (c_common_nodes_and_builtins): Build type variants for
2025 builtin_structptr_types types even for C.
2026
2a06eba5
BE
20272019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
2028
2029 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
2030 when rhs is of array type correctly. Fix handling of nested structures.
2031 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
2032 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
2033 type casts within nested compound expressions.
2034
18a23298
JJ
20352019-01-22 Jakub Jelinek <jakub@redhat.com>
2036
2037 PR middle-end/88968
2038 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
2039 variable after using BIT_FIELD_REF.
2040
420183d9
L
20412019-01-18 H.J. Lu <hongjiu.lu@intel.com>
2042
2043 PR c/51628
2044 PR c/88664
2045 * c-common.h (warn_for_address_or_pointer_of_packed_member):
2046 Remove the boolean argument.
2047 * c-warn.c (check_address_of_packed_member): Renamed to ...
2048 (check_address_or_pointer_of_packed_member): This. Also
2049 warn pointer conversion.
2050 (check_and_warn_address_of_packed_member): Renamed to ...
2051 (check_and_warn_address_or_pointer_of_packed_member): This.
2052 Also warn pointer conversion.
2053 (warn_for_address_or_pointer_of_packed_member): Remove the
2054 boolean argument. Don't check pointer conversion here.
2055
99063eee
RS
20562019-01-15 Richard Sandiford <richard.sandiford@arm.com>
2057
2058 PR inline-asm/52813
2059 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
2060
a30d0196
JJ
20612019-01-14 Jakub Jelinek <jakub@redhat.com>
2062
2063 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
2064 and __cpp_nontype_template_parameter_auto. Add a comment that
2065 __cpp_template_auto is deprecated.
2066
2d91f79d
TH
20672019-01-14 Tom Honermann <tom@honermann.net>
2068
2069 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
2070 * c-common.c (c_common_reswords): Add char8_t.
2071 (fix_string_type): Use char8_t for the type of u8 string literals.
2072 (c_common_get_alias_set): char8_t doesn't alias.
2073 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
2074 C++.
2075 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
2076 (keyword_begins_type_specifier): Add RID_CHAR8.
2077 * c-common.h (rid): Add RID_CHAR8.
2078 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
2079 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
2080 Define char8_type_node and char8_array_type_node.
2081 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
2082 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
2083 (c_cpp_builtins): Predefine __cpp_char8_t.
2084 * c-lex.c (lex_string): Use char8_array_type_node as the type of
2085 CPP_UTF8STRING.
2086 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
2087 * c-opts.c: If not otherwise specified, enable -fchar8_t when
2088 targeting C++2a.
2089 * c.opt: Add the -fchar8_t command line option.
2090
23db6ced
MS
20912019-01-14 Martin Sebor <msebor@redhat.com>
2092
2093 PR target/88638
2094 * c-attribs.c (positional_argument): Call valid_format_string_type_p
2095 and issue errors if it fails.
2096 * c-common.h (valid_format_string_type_p): Declare.
2097 * c-format.c (valid_stringptr_type_p): Rename...
2098 (valid_format_string_type_p): ...to this and make extern.
2099 (handle_format_arg_attribute): Adjust to new name.
2100 (check_format_string): Same.
2101
234c3818
L
21022019-01-13 H.J. Lu <hongjiu.lu@intel.com>
2103
2104 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
2105 Replace "may may" with "may" in warning message.
2106
d8fcab68
JJ
21072019-01-07 Jakub Jelinek <jakub@redhat.com>
2108
2109 PR c++/85052
2110 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
2111 (c_build_vec_convert): Declare.
2112 * c-common.c (c_build_vec_convert): New function.
2113
29d24852
MS
21142019-01-04 Martin Sebor <msebor@redhat.com>
2115
2116 PR c/88546
2117 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
2118 Handle C++ empty throw specification and C11 _Noreturn.
2119 (has_attribute): Also handle C11 _Noreturn.
2120
9069a4c9
MS
21212019-01-04 Martin Sebor <msebor@redhat.com>
2122
2123 PR c/88363
2124 * c-attribs.c (positional_argument): Also accept enumerated types.
2125
a5544970
JJ
21262019-01-01 Jakub Jelinek <jakub@redhat.com>
2127
2128 Update copyright years.
2129
da77eace
L
21302018-12-20 H.J. Lu <hongjiu.lu@intel.com>
2131
2132 PR c/51628
2133 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
2134 * c-warn.c (check_alignment_of_packed_member): New function.
2135 (check_address_of_packed_member): Likewise.
2136 (check_and_warn_address_of_packed_member): Likewise.
2137 (warn_for_address_or_pointer_of_packed_member): Likewise.
2138 * c.opt: Add -Wno-address-of-packed-member.
2139
573767d4
DM
21402018-12-20 David Malcolm <dmalcolm@redhat.com>
2141
2142 PR c++/87504
2143 * c-warn.c (get_outermost_macro_expansion): New function.
2144 (spelled_the_same_p): Use it to unwind the macro expansions, and
2145 compare the outermost macro in each nested expansion, rather than
2146 the innermost.
2147
a14feb3c
DM
21482018-12-19 David Malcolm <dmalcolm@redhat.com>
2149
2150 PR c++/87504
2151 * c-common.h (warn_tautological_cmp): Convert 1st param from
2152 location_t to const op_location_t &.
2153 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
2154 when testing for INTEGER_CST.
2155 (warn_tautological_bitwise_comparison): Convert 1st param from
2156 location_t to const op_location_t &; use it to build a
2157 binary_op_rich_location, and use this.
2158 (spelled_the_same_p): New function.
2159 (warn_tautological_cmp): Convert 1st param from location_t to
2160 const op_location_t &. Warn for macro expansions if
2161 spelled_the_same_p. Use binary_op_rich_location.
2162
dfd7fdca
DM
21632018-12-19 David Malcolm <dmalcolm@redhat.com>
2164
2165 PR c++/43064
2166 PR c++/43486
2167 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
2168 (verify_tree): Handle location wrappers.
2169 (c_common_truthvalue_conversion): Strip any location wrapper.
2170 Handle CONST_DECL.
2171 (fold_offsetof): Strip any location wrapper.
2172 (complete_array_type): Likewise for initial_value.
2173 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
2174 index before checking for INTEGER_CST.
2175 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
2176 print parentheses around location wrappers.
2177 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
2178 before checking for INTEGER_CST.
2179 (warn_tautological_bitwise_comparison): Call
2180 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
2181 before checking for INTEGER_CST.
2182 (readonly_error): Strip any location wrapper.
2183 (warn_array_subscript_with_type_char): Strip location wrappers
2184 before checking for INTEGER_CST. Use the location of the index if
2185 available.
2186
5c8b3702
JM
21872018-12-06 Jason Merrill <jason@redhat.com>
2188
2189 PR c++/88136 - -Wdeprecated-copy false positives
2190 * c.opt (Wdeprecated-copy-dtor): New.
2191 (Wdeprecated-copy): Move to -Wextra.
2192
673670da
MS
21932018-11-29 Martin Sebor <msebor@redhat.com>
2194
2195 PR c/88172
2196 PR testsuite/88208
2197 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
2198 alignments to values less than the target requires.
2199 (has_attribute): For attribute aligned consider both the attribute
2200 and the alignment bits.
2201 * c-common.c (c_init_attributes): Optionally issue a warning for
2202 zero alignment.
2203
04864ec8
MS
22042018-11-28 Martin Sebor <msebor@redhat.com>
2205
2206 PR c/88065
2207 PR c/87297
2208 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
2209 or destination is an error.
2210
ace83db0
JJ
22112018-11-28 Jakub Jelinek <jakub@redhat.com>
2212
2213 PR c++/88215
2214 * c-ubsan.c: Include langhooks.h.
2215 (ubsan_instrument_division): Change gcc_assert that main variants
2216 of op0 and op1 types are equal to gcc_checking_assert that the
2217 main variants are compatible types.
2218
da193a27
EB
22192018-11-27 Eric Botcazou <ebotcazou@adacore.com>
2220
2221 * c-ada-spec.c: Include stringpool.h.
2222 (has_static_fields): Return false for incomplete types.
2223 (is_tagged_type): Likewise.
2224 (has_nontrivial_methods): Likewise.
2225 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
2226 (struct overloaded_name_hash): New structure.
2227 (struct overloaded_name_hasher): Likewise.
2228 (overloaded_names): New global variable.
2229 (init_overloaded_names): New static function.
2230 (overloaded_name_p): New predicate.
2231 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
2232 on the TYPE_STUB_DECL of the original type of a typedef, if any.
2233 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
2234 Remove always-true condition and dump forward types.
2235 (dump_ada_specs): Delete overloaded_names.
2236
98f08eb8
MS
22372018-11-20 Martin Sebor <msebor@redhat.com>
2238
2239 * c-attribs.c (type_for_vector_size): New function.
2240 (type_valid_for_vector_size): Same.
2241 (handle_vector_size_attribute): Move code to the functions above
2242 and call them.
2243 (validate_attribute, has_attribute): New functions.
2244 * c-common.h (has_attribute): Declare.
2245 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
2246 * c-common.c (c_common_resword): Same.
2247
2674fa47
JM
22482018-11-16 Jason Merrill <jason@redhat.com>
2249
2250 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
2251 * c-attribs.c (attr_cold_hot_exclusions): Make public.
2252
258b3854
JJ
22532018-11-16 Jakub Jelinek <jakub@redhat.com>
2254
2255 PR middle-end/87854
2256 * c-common.c (fix_string_type): Reject string literals larger than
2257 TYPE_MAX_VALUE (ssizetype) bytes.
2258
1d249509
MS
22592018-11-15 Martin Sebor <msebor@redhat.com>
2260
2261 PR c++/87541
2262 PR c++/87542
2263 * c-attribs.c (positional_argument): New function.
2264 (handle_alloc_size_attribute): Use it and simplify.
2265 (handle_alloc_align_attribute): Same.
2266 (handle_assume_aligned_attribute): Same.
2267 (handle_nonnull_attribute): Same.
2268 * c-common.c (check_function_arguments): Pass fntype to
2269 check_function_format.
2270 * c-common.h (check_function_format): Add an argument.
2271 (PosArgFlags, positional_argument): Declare new type and function.
2272 * c-format.c (decode_format_attr): Add arguments.
2273 (check_format_string, get_constant): Same.
2274 (convert_format_name_to_system_name): Adjust.
2275
478dd60d
DM
22762018-11-15 David Malcolm <dmalcolm@redhat.com>
2277
2278 PR other/19165
2279 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
2280
8cca0163
JJ
22812018-11-14 Jakub Jelinek <jakub@redhat.com>
2282
8ee09943
JJ
2283 P1236R1 - Signed integers are two's complement
2284 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
2285 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
2286 with in-range second operand well defined for -std=c++2a.
2287
8cca0163
JJ
2288 PR other/88007
2289 * c-common.c (parse_optimize_options): Allocate option string from
2290 opts_obstack rather than as GC memory. Move the allocation after
2291 warning for invalid option.
2292
620e594b
DM
22932018-11-13 David Malcolm <dmalcolm@redhat.com>
2294
2295 * c-common.c (c_get_substring_location): Update for renaming of
2296 get_source_location_for_substring to get_location_within_string.
2297 * c-lex.c: Replace "source_location" with "location_t".
2298 * c-opts.c: Likewise.
2299 * c-ppoutput.c: Likewise.
2300
f9731de3
MS
23012018-11-13 Martin Sebor <msebor@redhat.com>
2302
2303 PR middle-end/81824
2304 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
2305 (handle_tls_model_attribute): Improve diagnostics.
2306
e4bd6d5e
JM
23072018-11-12 Jason Merrill <jason@redhat.com>
2308
a6bb6b07
JM
2309 * c-cppbuiltin.c (c_cpp_builtins): Define
2310 __cpp_impl_destroying_delete.
2311
e4bd6d5e
JM
2312 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
2313 __cpp_conditional_explicit.
2314
79a2c428
MS
23152018-11-09 Martin Sebor <msebor@redhat.com>
2316
2317 PR middle-end/81824
2318 * c-attribs.c (handle_copy_attribute): New function.
2319
4c7bd361
MS
23202018-11-09 Martin Sebor <msebor@redhat.com>
2321
2322 PR c/87795
2323 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
2324
28567c40
JJ
23252018-11-08 Jakub Jelinek <jakub@redhat.com>
2326
2327 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
2328 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
2329 enum omp_memory_order MEMORY_ORDER.
2330 (c_finish_omp_flush): Add MO argument.
2331 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
2332 (c_finish_omp_for): Add FINAL_P argument.
2333 * c-omp.c: Include memmodel.h.
2334 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
2335 OMP_TASKGROUP_CLAUSES to it.
2336 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
2337 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
2338 instead of OMP_ATOMIC_SEQ_CST.
2339 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
2340 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
2341 __atomic_thread_fence call with the given value.
2342 (check_omp_for_incr_expr): Formatting fixes.
2343 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
2344 even in OpenMP loops, diagnose if NE_EXPR and incr expression
2345 is not constant expression 1 or -1. Transform NE_EXPR loops
2346 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
2347 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
2348 loops too.
2349 (c_omp_split_clauses): Add support for combined
2350 #pragma omp parallel master and
2351 #pragma omp {,parallel }master taskloop{, simd} constructs.
2352 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
2353 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
2354 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
2355 (c_omp_predetermined_sharing): Don't return
2356 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
2357 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
2358 PRAGMA_OMP_REQUIRES.
2359 * c-pragma.h (enum pragma_kind): Likewise.
2360 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
2361 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
2362
204839e7
DM
23632018-11-08 David Malcolm <dmalcolm@redhat.com>
2364
2365 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
2366
d8010ee4
DM
23672018-11-08 David Malcolm <dmalcolm@redhat.com>
2368
2369 * c-format.c (local_cgraph_node_ptr_node): New variable.
2370 (gcc_dump_printf_char_table): Add entry for %C.
2371 (get_pointer_to_named_type): New function, taken from the handling
2372 code for "gimple *" from...
2373 (init_dynamic_diag_info): ...here. Add handling for
2374 "cgraph_node *".
2375 * c-format.h (T_CGRAPH_NODE): New.
2376
4be5c72c
JM
23772018-10-19 Jason Merrill <jason@redhat.com>
2378
2379 * c-cppbuiltin.c (c_cpp_builtins): Add
2380 __cpp_nontype_template_parameter_class.
2381
f3f6029d
NS
23822018-10-31 Nathan Sidwell <nathan@acm.org>
2383
ab5324fb
NS
2384 * c-opts.c (c_finish_options): Force command line macro
2385 location. Refactor to avoid repeating main debug hook.
2386 (push_command_line_include): Clarify comment.
2387
f3f6029d
NS
2388 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
2389
91e3ec29
MS
23902018-10-30 Martin Sebor <msebor@redhat.com>
2391
2392 PR middle-end/87041
2393 * c-format.c (check_format_types): Avoid diagnosing null pointer
2394 arguments to printf-family of functions.
2395
b5ff4f5c
MP
23962018-10-30 Marek Polacek <polacek@redhat.com>
2397
2398 Implement P0892R2, explicit(bool).
2399 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
2400
7e2de6df
DM
24012018-10-29 David Malcolm <dmalcolm@redhat.com>
2402
2403 * name-hint.h (name_hint::take_deferred): New member function.
2404
b2bf438c
DM
24052018-10-29 David Malcolm <dmalcolm@redhat.com>
2406
2407 PR c++/56856
2408 * c-common.c (check_function_sentinel): Call fold_for_warn on the
2409 argument.
2410 (check_function_restrict): Rename param "argarray" to
2411 "unfolded_argarray", and make a copy named "argarray", calling
2412 fold_for_warn on each argument.
2413 (check_function_arguments): Add note about responsibility for
2414 folding the arguments.
2415
9f936c86
JM
24162018-10-17 Joseph Myers <joseph@codesourcery.com>
2417
2418 * c-common.c (flag_isoc2x): New variable.
2419 * c-common.h (clk_c): Update comment to reference C2X.
2420 (flag_isoc99, flag_isoc11): Update comments to reference future
2421 standard versions in general.
2422 (flag_isoc2x): Declare.
2423 * c-opts.c (set_std_c2x): New function.
2424 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
2425 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
2426 flag_isoc2x to 0.
2427 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
2428
7a8a92c4
JM
24292018-10-17 Joseph Myers <joseph@codesourcery.com>
2430
2431 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
2432 (std=iso9899:2018): Document C17 as published in 2018.
2433
4dc003ff
CL
24342018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
2435
2436 PR c++/87364
2437 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
2438
79371671
WW
24392018-10-11 Will Wray <wjwray@gmail.com>
2440
2441 PR c++/87364
2442 * c-pretty-print.h (pp_c_type_cast): Prototype.
2443 (pp_c_integer_constant): Likewise.
2444 * c-pretty-print.c (pp_c_type_cast): No longer static.
2445 (pp_c_integer_constant): Likewise.
2446 (pp_c_enumeration_constant): Fix loop termination when finding
2447 name of constant. No longer returns a value. Call
2448 pp_c_integer_constant.
2449 (c_pretty_printer::constant): Update for changes to
2450 pp_c_enumeration_constant.
2451
46c62690
JJ
24522018-10-11 Jakub Jelinek <jakub@redhat.com>
2453
2454 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
2455 for no_unique_address.
2456
c24300ba
DM
24572018-10-09 David Malcolm <dmalcolm@redhat.com>
2458
2459 * c-common.c (c_option_controlling_cpp_error): Rename to...
2460 (c_option_controlling_cpp_diagnostic): ...this, and convert
2461 "reason" from int to enum.
2462 (c_cpp_error): Rename to...
2463 (c_cpp_diagnostic): ...this, converting level and reason to enums.
2464 * c-common.h (c_cpp_error): Rename to...
2465 (c_cpp_diagnostic): ...this, converting level and reason to enums.
2466 * c-opts.c (c_common_init_options): Update for renaming.
2467
8656dafa
RS
24682018-10-08 Richard Sandiford <richard.sandiford@arm.com>
2469
2470 PR c/87286
2471 * c-common.c (vector_types_compatible_elements_p): Use
2472 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
2473
8cff0652
VK
24742018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
2475
2476 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
2477 to generate constructor destructor priority warning.
2478 * c.opt (-Wprio-ctor-dtor): New option.
2479
bedf03a2
JM
24802018-10-01 Jason Merrill <jason@redhat.com>
2481
2482 * c-lex.c (c_common_has_attribute): Add no_unique_address.
2483
6cc430c1
EB
24842018-10-01 Eric Botcazou <ebotcazou@adacore.com>
2485
2486 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
2487 (dump_ada_node): Add const keyword.
2488
87677ac7
ML
24892018-09-25 Martin Liska <mliska@suse.cz>
2490
2491 * c-common.c (c_common_truthvalue_conversion):
2492 Remove Pascal from documentation.
2493
518196cb
EB
24942018-09-21 Eric Botcazou <ebotcazou@adacore.com>
2495
2496 * c-ada-spec.c: Include diagnostic.h.
2497 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
2498
a599af84
MP
24992018-09-19 Marek Polacek <polacek@redhat.com>
2500
2501 * c.opt (Wclass-conversion): New.
2502
9c4a4b3c
DM
25032018-09-17 David Malcolm <dmalcolm@redhat.com>
2504
2505 * c-format.c (range_label_for_format_type_mismatch::get_text):
2506 Update for new param.
2507
c896ecfe
DM
25082018-09-17 David Malcolm <dmalcolm@redhat.com>
2509
2510 * c-format.c (format_warning_at_char): Update for introduction of
2511 format_string_diagnostic_t.
2512 (format_type_warning): Likewise.
2513
80c6d1f4
MJ
25142018-09-17 Martin Jambor <mjambor@suse.cz>
2515
2516 PR c/63886
2517 * c.opt (Wabsolute-value): New.
2518
6d900107
BE
25192018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2520
2521 * c-common.c (complete_flexible_array_elts): New helper function.
2522 * c-common.h (complete_flexible_array_elts): Declare.
2523
b5764229
BE
25242018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2525
2526 * c-common.c (braced_list_to_string): Remove eval parameter.
2527 Add some more checks. Always create zero-terminated STRING_CST.
2528 * c-common.h (braced_list_to_string): Adjust prototype.
2529
85204e23
DM
25302018-08-27 David Malcolm <dmalcolm@redhat.com>
2531
2532 PR 87091
2533 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
2534 to a tri-state.
2535 (maybe_suggest_missing_token_insertion): Likewise.
2536 (maybe_add_include_fixit): Add param "override_location". If set,
2537 and source-printing is enabled, then override the rich_location's
2538 primary location with that of the insertion point for the fix-it
2539 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
2540 * c-common.h (extern void maybe_add_include_fixit): Add bool
2541 param.
2542 * c-format.c (selftest::test_type_mismatch_range_labels): Update
2543 for conversion of show_caret_p to a tri-state.
2544 * c-warn.c (warn_for_restrict): Likewise.
2545 * known-headers.cc
2546 (suggest_missing_header::~suggest_missing_header): Update call to
2547 maybe_add_include_fixit to suggest overriding the location, as it
2548 is for a note.
2549
3d78e008
ML
25502018-08-27 Martin Liska <mliska@suse.cz>
2551
2552 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
2553 fndecl_built_in_p and remove check for FUNCTION_DECL if
2554 possible.
3d78e008
ML
2555 (check_builtin_function_arguments): Likewise.
2556 (reject_gcc_builtin): Likewise.
2557 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
2558
b5be6d0c
MP
25592018-08-26 Marek Polacek <polacek@redhat.com>
2560
2561 PR c++/87029, Implement -Wredundant-move.
2562 * c.opt (Wredundant-move): New option.
2563
79ca9c35
MP
25642018-08-21 Marek Polacek <polacek@redhat.com>
2565
2566 PR c++/86981, Implement -Wpessimizing-move.
2567 * c.opt (Wpessimizing-move): New option.
2568
097f82ec
DM
25692018-08-20 David Malcolm <dmalcolm@redhat.com>
2570
2571 PR other/84889
2572 * c-attribs.c (common_handle_aligned_attribute): Add
2573 auto_diagnostic_group instance.
2574 * c-indentation.c (warn_for_misleading_indentation): Likewise.
2575 * c-opts.c (c_common_post_options): Likewise.
2576 * c-warn.c (warn_logical_not_parentheses): Likewise.
2577 (warn_duplicated_cond_add_or_warn): Likewise.
2578 (warn_for_multistatement_macros): Likewise.
2579
3fb558b1
NS
25802018-08-20 Nathan Sidwell <nathan@acm.org>
2581
2582 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
2583 access.
2584
800c0e98
NS
25852018-08-17 Nathan Sidwell <nathan@acm.org>
2586
2587 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
2588 field.
2589 (laxy_hex_fp_value_count): Make unsigned.
2590 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
2591 manipulate the macro.
2592 (builtin_defin_with_hex_fp_value): Adjust callback name, use
2593 cpp_define_lazily.
2594
6f795a92
DM
25952018-08-17 David Malcolm <dmalcolm@redhat.com>
2596
2597 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
2598 (gcc_dump_printf_length_specs): New.
2599 (gcc_dump_printf_flag_pairs): New.
2600 (gcc_dump_printf_flag_specs): New.
2601 (gcc_dump_printf_char_table): New.
2602 (format_types_orig): Add entry for "gcc_dump_printf".
2603 (init_dynamic_diag_info): Set up length_char_specs and
2604 conversion_specs for gcc_dump_printf_format_type.
2605 (handle_format_attribute): Handle gcc_dump_printf_format_type.
2606
c5d725c0
NS
26072018-08-17 Nathan Sidwell <nathan@acm.org>
2608
10f04917
NS
2609 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
2610
c5d725c0
NS
2611 * c-ada-spec.c: Don't #include "cpp-id-data.h"
2612 * c-cppbuiltin.c: Likewise.
2613
c0c12356
ML
26142018-08-17 Martin Liska <mliska@suse.cz>
2615
2616 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
2617 Ignore/Deprecated flag. Warning is done automatically for
2618 Deprecated flags.
c0c12356 2619
10fcc142
DM
26202018-08-16 David Malcolm <dmalcolm@redhat.com>
2621
2622 PR c++/70693
2623 * c-common.c (selftest::c_family_tests): Call
2624 selftest::c_indentation_c_tests.
2625 * c-common.h (selftest::c_indentation_c_tests): New decl.
2626 * c-indentation.c: Include "selftest.h".
2627 (next_tab_stop): Add "tab_width" param, rather than accessing
2628 cpp_opts.
2629 (get_visual_column): Likewise. Clarify comment. Bulletproof
2630 against reading past the end of the line.
2631 (get_first_nws_vis_column): Add "tab_width" param.
2632 (detect_intervening_unindent): Likewise.
2633 (should_warn_for_misleading_indentation): Read tab width from
2634 cpp_opts and pass around.
2635 (selftest::test_next_tab_stop): New test.
2636 (selftest::assert_get_visual_column_succeeds): New function.
2637 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
2638 (selftest::assert_get_visual_column_fails): New function.
2639 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
2640 (selftest::test_get_visual_column): New test.
2641 (selftest::c_indentation_c_tests): New function.
2642
3f6677f4
NS
26432018-08-16 Nathan Sidwell <nathan@acm.org>
2644
2645 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
2646 (store_ada_macro): Likewise.
2647 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
2648 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
2649
96e6ae57
DM
26502018-08-15 David Malcolm <dmalcolm@redhat.com>
2651
2652 * c-format.c: Include "selftest-diagnostic.h" and
2653 "gcc-rich-location.h".
2654 (format_warning_at_char): Pass NULL for new label params of
2655 format_warning_va.
2656 (class indirection_suffix): New class.
2657 (class range_label_for_format_type_mismatch): New class.
2658 (format_type_warning): Move logic for generating "*" suffix to
2659 class indirection_suffix. Create "fmt_label" and "param_label"
2660 to show their types, and pass them to the
2661 format_warning_at_substring calls.
2662 (selftest::test_type_mismatch_range_labels): New test.
2663 (selftest::c_format_c_tests): Call it.
2664
23aa9f7c
MS
26652018-08-13 Martin Sebor <msebor@redhat.com>
2666
2667 PR tree-optimization/71625
2668 * c-common.c (braced_list_to_string): New function.
2669 * c-common.h (braced_list_to_string): Declare it.
2670
f10a9135
NS
26712018-08-08 Nathan Sidwell <nathan@acm.org>
2672
2673 * c-common.c (try_to_locate_new_include_inertion_point): Use
2674 linemap_included_from_linemap.
2675 * c-lex.c (fe_file_change): Use linemap_included_from.
2676 * c-ppoutput.c (pp_file_change): Likewise.
2677
8a45b051
MS
26782018-08-01 Martin Sebor <msebor@redhat.com>
2679
2680 PR tree-optimization/86650
ab20d992 2681 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
8a45b051
MS
2682 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
2683 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
2684 * c-format.h (T89_G): Update to be "gimple *" rather than
2685 "gcall *".
2686 (local_gcall_ptr_node): Rename...
2687 (local_gimple_ptr_node): ...to this.
2688
e540ccc0
DM
26892018-07-31 David Malcolm <dmalcolm@redhat.com>
2690
2691 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
2692 table entries for gcc_diag_char_table, and the 'Z' entry from
2693 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
2694 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
2695 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
2696 adding missing "Z" for this table. Remove erroneous "G" and "K"
2697 entries.
2698 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
2699 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
2700 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
2701
425fc685
RE
27022018-07-31 Richard Earnshaw <rearnsha@arm.com>
2703
2704 * c-common.c (speculation_safe_resolve_call): New function.
2705 (speculation_safe_resolve_params): New function.
2706 (speculation_safe_resolve_return): New function.
2707 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
2708 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
2709 __HAVE_SPECULATION_SAFE_VALUE.
2710
181463c2
DM
27112018-07-20 David Malcolm <dmalcolm@redhat.com>
2712
2713 * c-common.c (c_cpp_error): Remove redundant "line_table"
2714 parameter from call to rich_location::set_range.
2715 (maybe_suggest_missing_token_insertion): Likewise.
2716
0d7f9065
MS
27172018-07-20 Martin Sebor <msebor@redhat.com>
2718
2719 PR middle-end/82063
ab20d992 2720 * c.opt (-Warray-bounds): Remove redundant -Wall.
0d7f9065 2721
00abf86c
MS
27222018-07-20 Martin Sebor <msebor@redhat.com>
2723
2724 PR middle-end/82063
2725 * c-common.h (c_common_handle_option): Change function argument
2726 to HOST_WIDE_INT.
2727 * c-opts.c (c_common_init_options): Same.
2728 (c_common_handle_option): Same. Remove special handling of
2729 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
2730 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
2731 options to take a HOST_WIDE_INT argument and accept a byte-size
2732 suffix. Initialize.
2733 (-Wvla-larger-than): Same.
2734 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
2735 (-Wno-vla-larger-than): Same.
2736
9b452033
JJ
27372018-07-12 Jakub Jelinek <jakub@redhat.com>
2738
2739 * c-attribs.c (c_common_attribute_table): Add
2740 "omp declare target implicit" attribute.
2741
cd0762f3
RB
27422018-07-12 Richard Biener <rguenther@suse.de>
2743
2744 PR c/86453
2745 * c-attribs.c (handle_packed_attribute): Do not build a variant
2746 type with TYPE_PACKED, instead ignore the attribute if we may
2747 not apply to the original type.
2748
0b27c3ed
JJ
27492018-07-10 Jakub Jelinek <jakub@redhat.com>
2750
2751 PR c++/86443
2752 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
2753 to contain TREE_LIST for both the original class iterator and the
2754 "last" helper var.
2755
e730a0ef
EB
27562018-07-07 Eric Botcazou <ebotcazou@adacore.com>
2757
2758 * c-ada-spec.c (to_ada_name): Remove index parameter.
2759 (pp_ada_tree_identifier): Likewise.
2760 (dump_ada_macros): Adjust call to to_ada_name.
2761 (struct overloaded_name_hash): Delete.
2762 (struct overloaded_name_hasher): Likewise.
2763 (overloaded_names): Likewise.
2764 (compute_overloading_index): Likewise.
2765 (dump_ada_decl_name): Do not call compute_overloading_index and
2766 adjust calls to pp_ada_tree_identifier.
2767 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
2768 (dump_ada_import): Add spc parameter and switch to aspect syntax.
2769 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
2770 (dump_ada_enum_type): Remove type and display_convention parameters.
2771 Adjust calls to pp_ada_tree_identifier.
2772 (dump_ada_node): Likewise and for dump_ada_structure.
2773 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
2774 and tidy up.
2775 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
2776 syntax.
2777 (print_constructor): Adjust call to pp_ada_tree_identifier.
2778 (print_destructor): Likewise.
2779 (dump_ada_declaration): Switch to aspect syntax.
2780 (dump_ada_structure): Likewise and tidy up. Replace display_convention
2781 parameter with nested parameter.
2782 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
2783 (dump_ada_specs): Do not delete overloaded_names table.
2784
8de583fc
PB
27852018-07-06 Peter Bergner <bergner@linux.ibm.com>
2786
2787 PR target/86324
e730a0ef 2788 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
2789 target hook.
2790
09cff37b
NS
27912018-07-05 Nathan Sidwell <nathan@acm.org>
2792
2793 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
2794 NO_IMPLICIT_EXTERN_C.
2795
98086b2b
ML
27962018-06-28 Martin Liska <mliska@suse.cz>
2797
2798 * cppspec.c: Include opt-suggestions.h.
2799
ab20d992
JJ
28002018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2801 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
2802 Cesar Philippidis <cesar@codesourcery.com>
2803
2804 * c-pragma.h (enum pragma_omp_clause): Add
2805 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
2806 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
2807
f41b7612
JJ
28082018-06-20 Jakub Jelinek <jakub@redhat.com>
2809
2810 PR c++/86210
2811 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
2812 comment.
2813
4252ccd7
MS
28142018-06-18 Martin Sebor <msebor@redhat.com>
2815
2816 PR middle-end/85602
2817 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
2818 nonstring.
2819
e197e64e
KV
28202018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2821
2822 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
2823
34a7a230
JM
28242018-06-13 Jason Merrill <jason@redhat.com>
2825
5cef3733
JM
2826 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
2827 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
2828 handling.
2829
34a7a230
JM
2830 PR c++/86094 - wrong code with defaulted move ctor.
2831 * c-opts.c (c_common_post_options): Bump the current ABI version to
2832 13. Set warn_abi_version and flag_abi_compat_version to the current
2833 version rather than 0. Fix defaulting flag_abi_compat_version from
2834 warn_abi_version.
2835
bb0f14ae
MS
28362018-06-12 Martin Sebor <msebor@redhat.com>
2837
2838 PR c/85931
2839 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
2840 sizeof source and destination yields the same value.
2841
3713f2e2
ML
28422018-06-12 Martin Liska <mliska@suse.cz>
2843
2844 * c.opt: Make MPX-related options as Deprecated.
2845
4af78ef8
DM
28462018-06-08 David Malcolm <dmalcolm@redhat.com>
2847
2848 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
2849 rather than 0.
2850
31db0fe0
ML
28512018-06-08 Martin Liska <mliska@suse.cz>
2852
2853 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
2854 for MPX (macros, related functions, fields in cgraph_node, ...).
2855 (handle_bnd_legacy): Likewise.
2856 (handle_bnd_instrument): Likewise.
2857 * c.opt: Likewise.
2858
fe16acf2
JJ
28592018-06-06 Jakub Jelinek <jakub@redhat.com>
2860
2861 PR c++/86068
2862 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
2863 __cpp_transactional_memory to 201500 instead of 210500.
2864
4dbdb49b
JM
28652018-06-06 Jason Merrill <jason@redhat.com>
2866
2867 PR c++/85710 - ICE with -Wmemset-elt-size.
2868 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
2869
f8ad043f
JM
28702018-06-01 Jason Merrill <jason@redhat.com>
2871
2872 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
2873 201703.
2874
abc24d93
EB
28752018-06-01 Eric Botcazou <ebotcazou@adacore.com>
2876
2877 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
2878 declaration for a typedef independently of whether the declaration of
2879 the subtype is generated.
2880
d258f4aa
MS
28812018-05-31 Martin Sebor <msebor@redhat.com>
2882
2883 PR c/82063
2884 * c.opt (-Wno-alloc-size-larger-than): New option.
2885
b67b9225
DP
28862018-04-22 David Pagan <dave.pagan@oracle.com>
2887
2888 PR c/55976
2889 * c-opts.c (c_common_post_options): Set default for warn_return_type
ab20d992 2890 for C++/C++ with ObjC extensions only. For C, makes it possible to
b67b9225
DP
2891 differentiate between default (no option), -Wreturn-type, and
2892 -Wno-return-type.
2893
04eb9c55
JM
28942018-05-29 Jason Merrill <jason@redhat.com>
2895
2896 * c.opt (Winit-list-lifetime): New flag.
2897
b0c31bc6
BE
28982018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
2899
2900 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
2901 splay_tree_delete_pointers.
2902
44284983
JJ
29032018-05-26 Jakub Jelinek <jakub@redhat.com>
2904
2905 PR bootstrap/85921
2906 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
2907 noinline variable to workaround broken kernel headers.
2908
b46b715d
JM
29092018-05-18 Jason Merrill <jason@redhat.com>
2910
2911 * c.opt (Wdeprecated-copy): New flag.
2912
40659769
ML
29132018-05-17 Martin Liska <mliska@suse.cz>
2914
2915 * c-warn.c (overflow_warning): Do not use
2916 space in between 'G_' and '('.
2917
403962ea
JM
29182018-05-09 Jason Merrill <jason@redhat.com>
2919
2920 * c-common.c (valid_array_size_p): Add complain parameter.
2921 * c-common.h: ...which defaults to true.
2922
1c9ee609
JJ
29232018-05-11 Jakub Jelinek <jakub@redhat.com>
2924
2925 PR c/85696
2926 * c-omp.c (c_omp_predetermined_sharing): Return
2927 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
2928
19916065
ML
29292018-05-11 Martin Liska <mliska@suse.cz>
2930
92a285c1 2931 PR sanitizer/85556
19916065
ML
2932 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
2933 TREE_LIST values.
2934
79e7b1fe
JJ
29352018-05-10 Jakub Jelinek <jakub@redhat.com>
2936
2937 PR c++/85662
2938 * c-common.h (fold_offsetof_1): Removed.
2939 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
2940 CTX argument defaulted to ERROR_MARK.
2941 * c-common.c (fold_offsetof_1): Renamed to ...
2942 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
2943 argument, convert the pointer constant to TYPE and use size_binop
2944 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
2945 a pointer type. Adjust recursive calls.
2946
86c12f76
EB
29472018-05-10 Eric Botcazou <ebotcazou@adacore.com>
2948
2949 PR c++/85400
2950 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
2951
ee336e84
NS
29522018-05-07 Nathan Sidwell <nathan@acm.org>
2953
2954 * c.opt (ffor-scope): Remove functionality, issue warning.
2955
6c072e21
NS
29562018-05-03 Nathan Sidwell <nathan@acm.org>
2957
2958 * c.opt (ffriend-injection): Remove functionality, issue warning.
2959
2cc7d3a7
DM
29602018-05-01 David Malcolm <dmalcolm@redhat.com>
2961
2962 PR c/84258
2963 * c-format.c (struct format_check_results): Add field
2964 "number_non_char".
2965 (check_format_info): Initialize it, and warn if encountered.
2966 (check_format_arg): Distinguish between wide char and
2967 everything else when detecting arrays of non-char.
2968
7761dfbe
DM
29692018-04-30 David Malcolm <dmalcolm@redhat.com>
2970
2971 * c-format.c (get_corrected_substring): Update for
2972 location_get_source_line returning a char_span. Use a char_span
2973 when handling the prefix of the correction.
2974 * c-indentation.c (get_visual_column): Update for
2975 location_get_source_line returning a char_span.
2976 (get_first_nws_vis_column): Likewise.
2977
62e98ef1
DM
29782018-03-29 David Malcolm <dmalcolm@redhat.com>
2979
2980 PR c++/84269
2981 * known-headers.cc (get_stdlib_header_for_name): Add various names
2982 from <assert.h>, <string.h>, and <memory.h>; add more names from
2983 <stdio.h>.
2984
a7dea617
JJ
29852018-03-27 Jakub Jelinek <jakub@redhat.com>
2986
2987 PR c++/85061
2988 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
2989 get_base_address of the second operand is a VAR_P, rather than the
2990 operand itself, and use gcc_checking_assert instead of gcc_assert.
2991
889a3a30
MP
29922018-03-23 Marek Polacek <polacek@redhat.com>
2993
2994 PR c++/85045
2995 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
2996 <case RDIV_EXPR>: Tweak condition.
2997
452154b9
EB
29982018-03-20 Eric Botcazou <ebotcazou@adacore.com>
2999
3000 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
3001
63ecb626
JJ
30022018-03-16 Jakub Jelinek <jakub@redhat.com>
3003
ce811fc4
JJ
3004 PR c/84909
3005 * c-warn.c (conversion_warning): Replace "to to" with "to" in
3006 diagnostics.
3007
63ecb626
JJ
3008 PR c/84910
3009 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
3010 diagnostics.
3011
a1295eec
RB
30122018-03-16 Richard Biener <rguenther@suse.de>
3013
3014 PR c/84873
3015 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
3016 unshare the possibly folded expression.
3017
919674fb
RB
30182018-03-15 Richard Biener <rguenther@suse.de>
3019
3020 PR c/84873
3021 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
3022
f99309b2
MS
30232018-03-13 Martin Sebor <msebor@redhat.com>
3024
3025 PR tree-optimization/84725
3026 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
3027 with all three narrow character types, including their qualified forms.
3028
e9b9fa4c
MS
30292018-03-12 Martin Sebor <msebor@redhat.com>
3030
3031 PR tree-optimization/83456
ab20d992 3032 * c-common.c (check_function_restrict): Return bool.
e9b9fa4c
MS
3033 Restore checking of bounded built-in functions.
3034 (check_function_arguments): Also return the result
3035 of warn_for_restrict.
ab20d992
JJ
3036 * c-common.c (check_function_restrict): Return bool.
3037 * c-warn.c (warn_for_restrict): Return bool.
e9b9fa4c 3038
0805d020
MP
30392018-03-02 Marek Polacek <polacek@redhat.com>
3040
3041 PR c++/84171
3042 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
3043 is erroneous.
3044
ed2a2f08
TS
30452018-03-02 Thomas Schwinge <thomas@codesourcery.com>
3046
3047 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
3048 function".
3049
90abdde0
MP
30502018-03-01 Marek Polacek <polacek@redhat.com>
3051
3052 PR c++/84639
3053 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
3054 alignment in computation.
3055
c6db43fa
EB
30562018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3057
3058 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
3059 <REAL_TYPE>: Deal specifically with _Float128/__float128.
3060
9e25c7ed
EB
30612018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3062
3063 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
3064 (is_char_array): Take a type instead of a declaration.
3065 (dump_ada_array_type): Likewise.
3066 (is_simple_enum): Minor tweak.
3067 (dump_ada_enum_type): New function extracted from...
3068 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
3069 <INTEGER_TYPE>: Remove unreachable code.
3070 <RECORD_TYPE>: Likewise. Minor tweaks.
3071 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
3072 <ENUMERAL_TYPE>: New case.
3073 <RECORD_TYPE>: Factor out common code.
3074 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
3075 Minor tweaks. Deal with enumeral types.
3076 (dump_ada_structure): Minor tweaks.
3077
09de3550
EB
30782018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3079
3080 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
3081 address for incomplete structures.
3082 (dump_forward_type): Do not bail out for incomplete structures.
3083 (dump_ada_declaration): Do not special-case incomplete structures
3084 for subtypes. Dump them as null records for types.
3085
095d8d4b
EB
30862018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3087
3088 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
3089 (is_char_array): Fix formatting.
3090 (dump_template_types): Likewise.
3091 (dump_generic_ada_node): Rename into...
3092 (dump_ada_node): ...this.
3093 <POINTER_TYPE>: Remove superfluous space. Use generic address for
3094 incomplete structures and not for empty structures. Do not use it
3095 when forward declarations are needed.
3096 (dump_forward_type): New function.
3097 (dump_nested_types): Remove FORWARD parameter. Do not consider
3098 TREE_VISITED and do not generate a forward declaration. Only dump
3099 original nested types for nested declaration.
3100 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
3101 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
3102 <RECORD_TYPE>: Do not consider TREE_VISITED.
3103 (dump_ada_declaration): Use booleans and fix formatting throughout.
3104 <TYPE_DECL>: Skip incomplete structures and not empty structures.
3105 Call dump_forward_type instead of dump_nested_types for a typedef.
3106 Remove superfluous check and adjust call to dump_nested_types.
3107 <POINTER_TYPE>: Call dump_forward_type and fall through.
3108 (dump_ada_struct_decl): Rename into...
3109 (dump_ada_structure): ...this. Do not special-case empty structures.
3110
d4cfd486
MS
31112018-02-27 Martin Sebor <msebor@redhat.com>
3112
3113 PR c++/83871
3114 * c.opt (-Wmissing-attributes): New option.
3115
b22dbd03
ML
31162018-02-21 Martin Liska <mliska@suse.cz>
3117
3118 * c.opt (Wcatch-value=): Add IntegerRange.
3119
883dfe2a
JM
31202018-02-15 Jason Merrill <jason@redhat.com>
3121
3122 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
3123
0444aa9c
NS
31242018-02-09 Nathan Sidwell <nathan@acm.org>
3125
3126 PR c/84293
3127 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
3128 arg.
3129 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
3130 arg. Adjust.
3131
cea71f0a
MS
31322018-02-09 Martin Sebor <msebor@redhat.com>
3133
3134 PR lto/84212
3135 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
3136 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
3137 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
3138 (-Wstrict-overflow, -Wsuggest-attribute): Same.
3139 (-Wuninitialized): Same.
3140
8c8b7be5
EB
31412018-02-09 Eric Botcazou <ebotcazou@adacore.com>
3142
3143 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
3144 keyword for components.
3145
7c30b12a
PC
31462018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
3147
3148 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
3149
eece7fe5
JK
31502018-02-02 Julia Koval <julia.koval@intel.com>
3151
3152 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
3153
7d07a93a
MP
31542018-01-29 Marek Polacek <polacek@redhat.com>
3155
3156 PR c/83966
3157 * c-format.c (check_function_format): Check current_function_decl.
3158
53723269
JJ
31592018-01-27 Jakub Jelinek <jakub@redhat.com>
3160
3161 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
3162 argument.
3163 (LAZY_HEX_FP_VALUES_CNT): Define.
3164 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
3165 values rather than just 12.
3166 (builtin_define_with_hex_fp_value): Likewise.
3167
7365279f
BK
31682018-01-18 Boris Kolpackov <boris@codesynthesis.com>
3169
92a285c1
ML
3170 PR other/70268
3171 * c.opt (-fmacro-prefix-map): New option.
3172 * c-opts.c (c_common_handle_option): Handle it.
3173 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
3174 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 3175
bb9869d5
DM
31762018-01-17 David Malcolm <dmalcolm@redhat.com>
3177
3178 PR c++/83814
3179 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
3180
68dc87c3
EB
31812018-01-10 Eric Botcazou <ebotcazou@adacore.com>
3182
3183 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
3184 Skip 'f' and 'F' characters if it is true.
3185 (store_ada_macro): Minor tweak.
3186 (dump_ada_macros) <CPP_COMMENT>: Likewise.
3187 <CPP_WSTRING>: Likewise.
3188 <CPP_STRING>: Output '&' in the buffer if not the first string.
3189 <CPP_NUMBER>: Adjust calls to dump_number.
3190
9a004410
DM
31912018-01-10 David Malcolm <dmalcolm@redhat.com>
3192
3193 PR c++/43486
3194 * c-common.c: Include "selftest.h".
3195 (get_atomic_generic_size): Perform the test for integral type
3196 before the range test for any integer constant, fixing indentation
3197 of braces. Call fold_for_warn before testing for an INTEGER_CST.
3198 (reject_gcc_builtin): Strip any location wrapper from EXPR.
3199 (selftest::test_fold_for_warn): New function.
3200 (selftest::c_common_c_tests): New function.
3201 (selftest::c_family_tests): Call it, and
3202 selftest::c_pretty_print_c_tests.
3203 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
3204 * c-format.c (check_format_arg): Convert VAR_P check to a
3205 fold_for_warn.
3206 * c-pretty-print.c: Include "selftest.h".
3207 (pp_c_cast_expression): Don't print casts for location wrappers.
3208 (selftest::assert_c_pretty_printer_output): New function.
3209 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
3210 (selftest::test_location_wrappers): New function.
3211 (selftest::c_pretty_print_c_tests): New function.
3212 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
3213
5c0caeb3
RS
32142018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3215 Alan Hayward <alan.hayward@arm.com>
3216 David Sherwood <david.sherwood@arm.com>
3217
3218 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
3219
73a699ae
RS
32202018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3221 Alan Hayward <alan.hayward@arm.com>
3222 David Sherwood <david.sherwood@arm.com>
3223
3224 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
3225 as polynomial.
3226
928686b1
RS
32272018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3228 Alan Hayward <alan.hayward@arm.com>
3229 David Sherwood <david.sherwood@arm.com>
3230
3231 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
3232 (convert_vector_to_array_for_subscript): Handle polynomial
3233 TYPE_VECTOR_SUBPARTS.
3234 (c_common_type_for_mode): Check valid_vector_subparts_p.
3235 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
3236 VECTOR_CST_NELTS.
3237
85ec4feb
JJ
32382018-01-03 Jakub Jelinek <jakub@redhat.com>
3239
3240 Update copyright years.
3241
170a8bd6 32422017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 3243 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
3244
3245 * c-pragma.c (init_pragma): Register pragma GCC unroll.
3246 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
3247
ab20d992 32482017-12-22 Alexandre Oliva <aoliva@redhat.com>
18408e96
AO
3249
3250 PR debug/83527
3251 PR debug/83419
3252 * c-semantics.c (only_debug_stmts_after_p): New.
3253 (pop_stmt_list): Clear side effects in debug-only stmt list.
3254 Check for single nondebug stmt followed by debug stmts only.
3255
c12d20d4
AO
32562017-12-21 Alexandre Oliva <aoliva@redhat.com>
3257
3258 PR debug/83419
3259 * c-semantics.c (pop_stmt_list): Propagate side effects from
3260 single nondebug stmt to container list.
3261
01512446
JJ
32622017-12-19 Jakub Jelinek <jakub@redhat.com>
3263
3264 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
3265 conditions with typical order conditions.
3266
82cfbd01
MP
32672017-12-18 Marek Polacek <polacek@redhat.com>
3268
3269 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
3270 not in effect.
3271
99da11ec
MS
32722017-12-17 Martin Sebor <msebor@redhat.com>
3273
3274 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
3275 an error for attribute warn_if_not_aligned.
3276
cc8bea0a
MS
32772017-12-16 Martin Sebor <msebor@redhat.com>
3278
3279 PR tree-optimization/78918
3280 * c-common.c (check_function_restrict): Avoid checking built-ins.
3281 * c.opt (-Wrestrict): Include in -Wall.
3282
4849deb1
JJ
32832017-12-15 Jakub Jelinek <jakub@redhat.com>
3284
3285 * c-attribs.c (c_common_attribute_table,
3286 c_common_format_attribute_table): Swap affects_type_identity
3287 and handler fields, adjust comments.
3288
c65e18d3
BE
32892017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3290
3291 * c.opt (Wcast-function-type): New warning option.
3292 * c-lex.c (get_fileinfo): Avoid warning.
3293 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
3294
2004617a
QZ
32952017-12-14 Qing Zhao <qing.zhao@oracle.com>
3296
7365279f 3297 PR middle_end/79538
2004617a
QZ
3298 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
3299 Adjust the size of buf1 and buf2, add a new buf to avoid
3300 format-overflow warning.
3301
ab20d992 33022017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
3303
3304 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
3305 subsequent statement list.
3306
5d9ae53d
MS
33072017-12-07 Martin Sebor <msebor@redhat.com>
3308
3309 PR c/81544
3310 PR c/81566
3311 * c-attribs.c (attr_aligned_exclusions): New array.
3312 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
3313 (attr_common_exclusions, attr_const_pure_exclusions): Same.
3314 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
3315 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
3316 (attr_warn_unused_result_exclusions): Same.
3317 (handle_hot_attribute, handle_cold_attribute): Simplify.
3318 (handle_const_attribute): Warn on function returning void.
3319 (handle_pure_attribute): Same.
3320 (handle_aligned_attribute): Diagnose conflicting attribute
3321 specifications.
3322 * c-warn.c (diagnose_mismatched_attributes): Simplify.
3323
c79144f8
DM
33242017-12-06 David Malcolm <dmalcolm@redhat.com>
3325
3326 PR c/83236
3327 * c-common.c (selftest::c_family_tests): Call
3328 selftest::c_spellcheck_cc_tests.
3329 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
3330 * c-spellcheck.cc: Include "selftest.h".
3331 (name_reserved_for_implementation_p): New function.
3332 (should_suggest_as_macro_p): New function.
3333 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
3334 should_suggest_as_macro_p and call it.
3335 (selftest::test_name_reserved_for_implementation_p): New function.
3336 (selftest::c_spellcheck_cc_tests): New function.
3337 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
3338
613bc14f
DM
33392017-12-06 David Malcolm <dmalcolm@redhat.com>
3340
3341 * c-spellcheck.cc: New file, taken from macro-handling code in
3342 spellcheck-tree.c.
3343 * c-spellcheck.h: New file, taken from macro-handling code in
3344 spellcheck-tree.h.
3345
e76c7157
JJ
33462017-12-01 Jakub Jelinek <jakub@redhat.com>
3347
3348 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
3349 attribute.
3350 (handle_simd_attribute): Don't check for "cilk simd function"
3351 attribute. Reindent, formatting changes.
3352
b0da4034
JK
33532017-11-30 Julia Koval <julia.koval@intel.com>
3354
3355 * c-common.h (inv_list): Remove.
3356
058f0b9e
JJ
33572017-11-28 Jakub Jelinek <jakub@redhat.com>
3358
3359 PR sanitizer/81275
3360 * c-common.c (c_switch_covers_all_cases_p_1,
3361 c_switch_covers_all_cases_p): New functions.
3362 * c-common.h (c_switch_covers_all_cases_p): Declare.
3363
5e9d6aa4 33642017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 3365 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
3366
3367 * array-notation-common.c: Delete.
3368 * c-cilkplus.c: Ditto.
3369 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
3370 * c-common.def (ARRAY_NOTATION_REF): Remove.
3371 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
3372 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
3373 c_validate_cilk_plus_loop, cilkplus_an_parts,
3374 cilk_ignorable_spawn_rhs_op,
3375 cilk_recognize_spawn): Remove.
3376 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
3377 * c-omp.c: Remove CILK_SIMD check.
3378 * c-pragma.c: Ditto.
3379 * c-pragma.h: Remove CILK related pragmas.
3380 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
3381 ARRAY_NOTATION_REF condition.
3382 (c_pretty_printer::expression): Ditto.
3383 * c.opt (fcilkplus): Remove.
3384 * cilk.c: Delete.
3385
1af4ebf5
MG
33862017-11-21 Marc Glisse <marc.glisse@inria.fr>
3387
3388 * c-pretty-print.c (pp_c_additive_expression,
3389 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
3390
d44ed508
JJ
33912017-11-21 Jakub Jelinek <jakub@redhat.com>
3392
7d2f0f9b
JJ
3393 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
3394
d44ed508
JJ
3395 PR c++/83059
3396 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
3397 instead of tree_to_uhwi, formatting fix.
3398
26edace6
DM
33992017-11-20 David Malcolm <dmalcolm@redhat.com>
3400
3401 PR c/81404
3402 * known-headers.cc: New file, based on material from c/c-decl.c.
3403 (suggest_missing_header): Copied as-is.
3404 (get_stdlib_header_for_name): New, based on get_c_name_hint but
3405 heavily edited to add C++ support. Add some knowledge about
3406 <limits.h>, <stdint.h>, and <wchar.h>.
3407 * known-headers.h: Likewise.
3408
6c7a259b
DM
34092017-11-20 David Malcolm <dmalcolm@redhat.com>
3410
3411 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
3412 (lookup_name_fuzzy): Likewise. Convert return type from
3413 const char * to name_hint. Add location_t param.
3414 * name-hint.h: New header.
3415
f9c59f7e
JJ
34162017-11-19 Jakub Jelinek <jakub@redhat.com>
3417
3418 PR c/66618
3419 PR c/69960
3420 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
3421
1e39313a
JM
34222017-11-16 Joseph Myers <joseph@codesourcery.com>
3423
3424 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
3425 expected publication date of C17.
3426 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
3427
3ca0dc60
JM
34282017-11-15 Joseph Myers <joseph@codesourcery.com>
3429
3430 PR c/81156
3431 * c-common.c (c_common_reswords): Add __builtin_tgmath.
3432 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
3433
025d57f0
MS
34342017-11-10 Martin Sebor <msebor@redhat.com>
3435
3436 PR c/81117
3437 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
3438 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
3439 * c.opt (-Wstringop-truncation): New option.
3440
1b6fa695
ML
34412017-11-06 Martin Liska <mliska@suse.cz>
3442
3443 PR middle-end/82404
3444 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
3445 FE.
3446 * c.opt: Set default value of warn_return_type.
3447
64a5912c
DM
34482017-10-31 David Malcolm <dmalcolm@redhat.com>
3449
3450 * c-common.c (binary_op_error): Update for renaming of
3451 error_at_rich_loc.
3452 (c_parse_error): Likewise.
3453 * c-warn.c (warn_logical_not_parentheses): Likewise for
3454 renaming of inform_at_rich_loc.
3455 (warn_for_restrict): Likewise for renaming of
3456 warning_at_rich_loc_n.
3457
c76dc9c3
JM
34582017-10-30 Joseph Myers <joseph@codesourcery.com>
3459
3460 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
3461 * c-opts.c (set_std_c17): New function.
3462 (c_common_init_options): Use gnu17 as default C version.
3463 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
3464
ee5fd23a
MM
34652017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
3466
3467 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
3468 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
3469 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
3470 __FP_FAST_FMA<N>X.
3471
d1047465
MP
34722017-10-23 Marek Polacek <polacek@redhat.com>
3473
3474 PR c/82681
3475 * c-warn.c (warnings_for_convert_and_check): Fix typos.
3476
9e878cf1
EB
34772017-10-19 Eric Botcazou <ebotcazou@adacore.com>
3478
3479 * c-common.c (check_builtin_function_arguments): Also check arguments
3480 of __builtin_alloca_with_align_and_max.
3481
89b6abbb
DM
34822017-10-17 David Malcolm <dmalcolm@redhat.com>
3483
3484 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
3485 rather than NULL to format_warning_va.
3486 (check_format_types): Likewise when calling format_type_warning.
3487 Remove code to extract source_ranges and source_range * in favor
3488 of just a location_t.
3489 (format_type_warning): Convert source_range * param to a
3490 location_t.
3491
39382c09
JJ
34922017-10-13 Jakub Jelinek <jakub@redhat.com>
3493
3494 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
3495 [LR]SHIFT_EXPR.
3496
62e1c678
DM
34972017-10-12 David Malcolm <dmalcolm@redhat.com>
3498
3499 * c-common.c (enum missing_token_insertion_kind): New enum.
3500 (get_missing_token_insertion_kind): New function.
3501 (maybe_suggest_missing_token_insertion): New function.
3502 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
3503
b90c9338
NS
35042017-10-11 Nathan Sidwell <nathan@acm.org>
3505
3506 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
3507 (c_common_handle_option): Update incpath_kind names.
3508
3a266bcd
ML
35092017-10-11 Martin Liska <mliska@suse.cz>
3510
3511 PR sanitizer/82490
3512 * c-attribs.c (handle_no_sanitize_attribute): Report directly
3513 Wattributes warning.
3514
8e6cdc90
RS
35152017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
3516
3517 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
3518 operating on trees as wide_ints.
3519 * c-common.c (pointer_int_sum): Likewise.
3520 * c-pretty-print.c (pp_c_integer_constant): Likewise.
3521 * c-warn.c (match_case_to_enum_1): Likewise.
3522 (c_do_switch_warnings): Likewise.
3523 (maybe_warn_shift_overflow): Likewise.
3524
802b38c9
JJ
35252017-10-10 Jakub Jelinek <jakub@redhat.com>
3526
3527 PR c/82437
3528 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
3529 instead of wide_int::from.
3530
4e34b338
JJ
35312017-10-06 Jakub Jelinek <jakub@redhat.com>
3532
3533 PR c/82437
3534 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
3535 using to_widest use wide_int with the larger of the two precisions.
3536
4bc4b2b4
BE
35372017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
3538
3539 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
3540 functions.
3541
a1488398
RS
35422017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
3543
3544 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
3545 when combining the original unconverted comparison operands.
3546
01c9fb68
JJ
35472017-09-29 Jakub Jelinek <jakub@redhat.com>
3548
3549 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
3550 attribute.
3551
6e3e8419
EB
35522017-09-29 Eric Botcazou <ebotcazou@adacore.com>
3553
3554 * c-ada-spec.c (to_ada_name): Add index parameter.
3555 (pp_ada_tree_identifier): Likewise.
3556 (dump_ada_macros): Adjust call to to_ada_name.
3557 (struct overloaded_name_hash): New type.
3558 (struct overloaded_name_hasher): Likewise.
3559 (overloaded_names): New hash table.
3560 (compute_overloading_index): New function.
3561 (dump_ada_decl_name): Call it and pass the result to
3562 pp_ada_tree_identifier.
3563 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
3564 (dump_ada_function_declaration): Likewise.
3565 (dump_generic_ada_node): Likewise.
3566 (print_constructor): Likewise.
3567 (print_destructor): Likewise.
3568 (dump_ada_specs): Delete overloaded_names table.
3569
79310774
EB
35702017-09-29 Eric Botcazou <ebotcazou@adacore.com>
3571
3572 * c-ada-spec.c (max_ada_macros): Move around.
3573 (store_ada_macro_index): Likewise.
3574 (source_file): Rename into...
3575 (macro_source_file): ...this.
3576 (count_ada_macro): Move around.
3577 (store_ada_macro): Likewise.
3578 (compare_macro): Likewise.
3579 (print_ada_macros): Merge in...
3580 (dump_ada_macros): ...this.
3581 (source_file_base): Rename into...
3582 (current_source_file): ...this.
3583 (print_comment): Move around.
3584 (dump_ada_nodes): Call dump_ada_declaration directly.
3585 (struct with): Change type of limited field to bool.
3586 (append_withs): Change type of limited_access parameter to bool.
3587 (pp_ada_tree_identifie): Likewise.
3588 (dump_ada_decl_nam): Likewise.
3589 (dump_generic_ada_node): Likewise. Do not print the return type.
3590 (to_ada_name): Change type of space_found parameter to bool.
3591 (dump_ada_function_declaration): Return void and change type of
3592 parameters to bool. Also print the return type for a function.
3593 (print_ada_methods): Rename into...
3594 (dump_ada_methods): ...this.
3595 (print_ada_declaration): Rename into ...
3596 (dump_ada_declaration): ...this. Do not print the return type.
3597 (print_ada_struct_decl): Rename into...
3598 (dump_ada_struct_decl): ...this.
3599
7d386d45
JJ
36002017-09-29 Jakub Jelinek <jakub@redhat.com>
3601
3602 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
3603 rather than DECL_INITIAL.
3604 (common_handle_aligned_attribute): Likewise.
3605
ab20d992 36062017-09-20 Alexandre Oliva <aoliva@redhat.com>
9ed32e27
AO
3607
3608 * c.opt (gen-decls): Add RejectNegative.
3609
026a79f7
AS
36102017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
3611 Jakub Jelinek <jakub@redhat.com>
3612
3613 Add support for -std=c++2a.
3614 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
3615 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
3616 * c-opts.c (set_std_cxx2a): New.
3617 (c_common_handle_option): Set options when -std=c++2a is enabled.
3618 (c_common_post_options): Adjust comments.
3619 (set_std_cxx14, set_std_cxx17): Likewise.
3620
4a8ca690
EB
36212017-09-15 Eric Botcazou <ebotcazou@adacore.com>
3622
3623 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
3624 message for non-uniform endianness and issue a warning in C++.
3625
7b936140
JJ
36262017-09-15 Jakub Jelinek <jakub@redhat.com>
3627
3628 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
3629 (Wc++17-compat): Change from undocumented alias to option.
3630 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
3631 change C++1z to C++17 in description.
3632 (std=c++1z, std=gnu++1z): Change from option to undocumented
3633 deprecated alias.
3634 (std=c++17, std=gnu++17): Change from undocumented alias to option.
3635 Adjust description.
3636 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
3637 * c-opts.c (set_std_cxx1z): Rename to ...
3638 (set_std_cxx17): ... this.
3639 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
3640 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 3641 caller.
7b936140
JJ
3642 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
3643 comments.
3644
12263f13
L
36452017-09-12 H.J. Lu <hongjiu.lu@intel.com>
3646
3647 * c-attribs.c (common_handle_aligned_attribute): Don't warn
3648 function alignment if warn_if_not_aligned_p is true.
3649
6836632e
NS
36502017-09-12 Nathan Sidwell <nathan@acm.org>
3651
3652 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
3653 resort_sorted_fields): Move to c/c-decl.c.
3654 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
3655 (struct sorted_fields_type): Move to c/c-lang.h.
3656
019bf9ad
JW
36572017-09-09 Jonathan Wakely <jwakely@redhat.com>
3658
3659 PR c++/81852
3660 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
3661
bc7fe952
MP
36622017-09-04 Marek Polacek <polacek@redhat.com>
3663
3664 PR c/81783
3665 * c-warn.c (warn_tautological_bitwise_comparison): New function.
3666 (warn_tautological_cmp): Call it.
3667
ab20d992 36682017-09-01 Boris Kolpackov <boris@codesynthesis.com>
de7c2c6a
BK
3669
3670 * c-opts.c (c_common_finish): Write dependency information even if
3671 there are errors.
3672
d2e05fcb
JJ
36732017-09-01 Jakub Jelinek <jakub@redhat.com>
3674
3675 PR c/81887
3676 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
3677 (omp_pragmas_simd): ... here.
3678 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
3679 create new clauses list containing just simd clause.
3680
18e2a8b8
RS
36812017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3682 Alan Hayward <alan.hayward@arm.com>
3683 David Sherwood <david.sherwood@arm.com>
3684
3685 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
3686 into scalar_mode_supported_p call.
3687 (handle_mode_attribute): Update call to scalar_mode_supported_p.
3688
16d22000
RS
36892017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3690 Alan Hayward <alan.hayward@arm.com>
3691 David Sherwood <david.sherwood@arm.com>
3692
3693 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
3694 for the mode iterator.
3695
b397965c
RS
36962017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3697 Alan Hayward <alan.hayward@arm.com>
3698 David Sherwood <david.sherwood@arm.com>
3699
3700 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
3701 * c-common.c (c_build_vec_perm_expr): Likewise.
3702
357b7604
RS
37032017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3704 Alan Hayward <alan.hayward@arm.com>
3705 David Sherwood <david.sherwood@arm.com>
3706
3707 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
3708
e05c94ba
RS
37092017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3710 Alan Hayward <alan.hayward@arm.com>
3711 David Sherwood <david.sherwood@arm.com>
3712
3713 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
3714 before calling targetm.addr_space.valid_pointer_mode.
3715
5c20c4af
RS
37162017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3717 Alan Hayward <alan.hayward@arm.com>
3718 David Sherwood <david.sherwood@arm.com>
3719
3720 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
3721
c94843d2 37222017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
3723 Alan Hayward <alan.hayward@arm.com>
3724 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
3725
3726 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
3727 iterators.
3728 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
3729
4e10a5a7
RS
37302017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3731 Alan Hayward <alan.hayward@arm.com>
3732 David Sherwood <david.sherwood@arm.com>
3733
3734 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
3735 case statements.
3736
130fcab0
ML
37372017-08-29 Martin Liska <mliska@suse.cz>
3738
3739 PR other/39851
3740 * c-common.c (parse_optimize_options): Add argument to function
3741 call.
3742 * c-pragma.c (handle_pragma_diagnostic): Likewise.
3743
14e18d71
DM
37442017-08-24 David Malcolm <dmalcolm@redhat.com>
3745
3746 * c-lex.c (interpret_float): Use token location
3747 when building an EXCESS_PRECISION_EXPR.
3748
2f687306
DM
37492017-08-21 David Malcolm <dmalcolm@redhat.com>
3750
3751 * c-common.c (check_function_arguments): Add "arglogs" param; pass
3752 it to check_function_format.
3753 * c-common.h (check_function_arguments): Add vec<location_t> *
3754 param.
3755 (check_function_format): Likewise.
3756 * c-format.c (struct format_check_context): Add field "arglocs".
3757 (check_function_format): Add param "arglocs"; pass it to
3758 check_format_info.
ab20d992 3759 (check_format_info): Add param "arglocs"; use it to initialize
2f687306
DM
3760 new field of format_ctx.
3761 (check_format_arg): Pass format_ctx->arglocs to new param of
3762 check_format_info_main.
3763 (class argument_parser): New field "arglocs".
3764 (argument_parser::argument_parser): Add "arglocs_" param and use
3765 it to initialize new field.
3766 (argument_parser::check_argument_type): Pass new arglocs field to
3767 check_format_types.
3768 (check_format_info_main): Add param "arglocs", and use it when
3769 constructing arg_parser.
3770 (check_format_types): Add param "arglocs"; use it if non-NULL when
3771 !EXPR_HAS_LOCATION (cur_param) to get at location information.
3772
00aa1fa2
L
37732017-08-18 H.J. Lu <hongjiu.lu@intel.com>
3774
3775 PR c/53037
3776 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
3777 (c_common_attribute_table): Add warn_if_not_aligned.
3778 (handle_aligned_attribute): Renamed to ...
3779 (common_handle_aligned_attribute): Remove argument, name, and add
3780 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
3781 (handle_aligned_attribute): New.
3782 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
3783
27be025d
MS
37842017-08-14 Martin Sebor <msebor@redhat.com>
3785
3786 PR c/81117
3787 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
3788 (handle_nonstring_attribute): New function.
3789
da67acb9
MS
37902017-08-14 Martin Sebor <msebor@redhat.com>
3791
3792 PR c/81117
3793 * c-format.h (T89_G): New macro.
3794 * c-format.c (local_gcall_ptr_node): New variable.
3795 (init_dynamic_diag_info): Initialize it.
3796
a8b522b4
ML
37972017-08-11 Martin Liska <mliska@suse.cz>
3798
3799 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
3800 TARGET_SUPPORTS_ALIASES.
3801
32129a17
DM
38022017-08-10 David Malcolm <dmalcolm@redhat.com>
3803
3804 * c-common.c (c_parse_error): Add rich_location * param, using it
3805 rather implicitly using input_location.
3806 * c-common.h (c_parse_error): Add rich_location * param.
3807
30af3a2b
MP
38082017-08-09 Marek Polacek <polacek@redhat.com>
3809
3810 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
3811 (c_common_truthvalue_conversion): Likewise.
3812 * c-omp.c (c_finish_omp_atomic): Likewise.
3813 * c-common.h (build_binary_op): Update declaration.
3814
314e6352
ML
38152017-08-08 Martin Liska <mliska@suse.cz>
3816
3817 * c-ada-spec.c: Include header files.
3818 * c-ubsan.c: Likewise.
3819 * c-warn.c: Likewise.
3820
56b5041c
JJ
38212017-08-07 Jakub Jelinek <jakub@redhat.com>
3822
3823 PR c/69389
3824 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
3825
db440138
EB
38262017-08-07 Eric Botcazou <ebotcazou@adacore.com>
3827
3828 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
3829 (print_ada_methods): Likewise.
3830 (print_ada_declaration): Likewise.
3831
577eec56
ML
38322017-08-07 Martin Liska <mliska@suse.cz>
3833
3834 * array-notation-common.c: Add new includes.
3835 * c-format.c( handle_format_attribute): Canonicalize a format
3836 function name.
3837 * c-lex.c (c_common_has_attribute): Canonicalize name of an
3838 attribute.
3839 * c-pretty-print.c: Add new include.
3840
b854df3c
EB
38412017-08-05 Eric Botcazou <ebotcazou@adacore.com>
3842
3843 * c-ada-spec.c (has_static_fields): Look only into variables.
3844 (print_constructor): Add TYPE parameter and use it for the name.
3845 (print_destructor): Likewise.
3846 (print_ada_declaration): Adjust to new constructor/destructor names.
3847 Adjust calls to print_constructor and print_destructor.
3848 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
3849 Look only into variables in the final loop.
3850
9f2cb25e
EB
38512017-08-01 Eric Botcazou <ebotcazou@adacore.com>
3852
3853 * c-ada-spec.c (has_static_fields): Look only into fields.
3854 (dump_generic_ada_node): Small tweak.
3855 (dump_nested_types): Look only into fields.
3856 (print_ada_declaration): Look only into methods. Small tweak.
3857 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
3858
f4bcd9eb
EB
38592017-08-01 Eric Botcazou <ebotcazou@adacore.com>
3860
3861 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
3862 (dump_ada_function_declaration): Likewise.
3863 (dump_generic_ada_node): Likewise.
3864 (print_ada_declaration): Add support for const-qualified variables.
3865
f34ebeb2
ML
38662017-07-31 Martin Liska <mliska@suse.cz>
3867
3868 PR sanitize/81530
3869 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
3870 Guard condition with flag_sanitize_p also with current_function_decl
3871 non-null equality.
3872 (ubsan_maybe_instrument_reference_or_call): Likewise.
3873
218e5d04
UB
38742017-07-30 Uros Bizjak <ubizjak@gmail.com>
3875
3876 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
3877
942047f2
EB
38782017-07-29 Eric Botcazou <ebotcazou@adacore.com>
3879
3880 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
3881 for enumeral types.
3882 (print_ada_declaration): Add missing guard for record types.
3883
a40ff0ae
JJ
38842017-07-27 Jakub Jelinek <jakub@redhat.com>
3885
3886 PR c/45784
3887 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
3888 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
3889 new COMPOUND_EXPRs around the rhs of the comparison.
3890
06bd22f6
MP
38912017-07-27 Marek Polacek <polacek@redhat.com>
3892
3893 PR c/81417
3894 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
3895 the types.
3896
036ea399
JJ
38972017-07-27 Jakub Jelinek <jakub@redhat.com>
3898
3899 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
3900 (handle_noipa_attribute): New function.
3901
417ca011
TD
39022017-07-07 Torsten Duwe <duwe@suse.de>
3903
3904 * c-attribs.c (c_common_attribute_table): Add entry for
3905 "patchable_function_entry".
3906
5aaa8fb4
NS
39072017-07-20 Nathan Sidwell <nathan@acm.org>
3908
3909 Remove TYPE_METHODS.
3910 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
3911 dump_ada_template, print_ada_methods,
3912 print_ada_declaration): Member fns are on TYPE_FIELDS.
3913
ff22eb12
NS
39142017-07-18 Nathan Sidwell <nathan@acm.org>
3915
3916 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
3917
eea77d1f
DM
39182017-07-14 David Malcolm <dmalcolm@redhat.com>
3919
3920 * c-common.c (try_to_locate_new_include_insertion_point): New
3921 function.
3922 (per_file_includes_t): New typedef.
3923 (added_includes_t): New typedef.
3924 (added_includes): New variable.
3925 (maybe_add_include_fixit): New function.
3926 * c-common.h (maybe_add_include_fixit): New decl.
3927
281ac396
MS
39282017-07-10 Martin Sebor <msebor@redhat.com>
3929
3930 PR other/81345
3931 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
3932
b6f43128
DM
39332017-07-06 David Malcolm <dmalcolm@redhat.com>
3934
3935 * c-common.c (selftest::c_family_tests): New.
3936 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
3937 (selftest::c_family_tests): New decl.
3938
efbf55b0
MP
39392017-07-04 Marek Polacek <polacek@redhat.com>
3940
3941 PR c/81231
3942 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
3943 types.
3944
6c86bd88
MP
39452017-07-04 Marek Polacek <polacek@redhat.com>
3946
3947 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
3948
17a7218b
ML
39492017-06-28 Martin Liska <mliska@suse.cz>
3950
3951 PR ipa/81128
3952 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
3953 to a function declaration.
3954
63010089
ML
39552017-06-28 Martin Liska <mliska@suse.cz>
3956
3957 PR driver/79659
3958 * c.opt: Add IntegerRange to various options.
3959
3e2becc4
MP
39602017-06-26 Marek Polacek <polacek@redhat.com>
3961
3962 PR c/80116
3963 * c-common.h (warn_for_multistatement_macros): Declare.
3964 * c-warn.c: Include "c-family/c-indentation.h".
3965 (warn_for_multistatement_macros): New function.
3966 * c.opt (Wmultistatement-macros): New option.
3967 * c-indentation.c (guard_tinfo_to_string): No longer static.
3968 Change the parameter type to "enum rid". Handle RID_SWITCH.
3969 * c-indentation.h (guard_tinfo_to_string): Declare.
3970
2db9b7cd
MG
39712017-06-23 Marc Glisse <marc.glisse@inria.fr>
3972
3973 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
3974
c3684b7b
MS
39752017-06-15 Martin Sebor <msebor@redhat.com>
3976
3977 PR c++/80560
3978 * c.opt (-Wclass-memaccess): New option.
3979
e72c4afd
BK
39802017-06-14 Boris Kolpackov <boris@codesynthesis.com>
3981
3982 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
3983
8a516588
MP
39842017-06-13 Marek Polacek <polacek@redhat.com>
3985
3986 PR objc/80949
3987 * c-warn.c (do_warn_duplicated_branches): Return if any of the
3988 branches is null.
3989
45b2222a
ML
39902017-06-13 Martin Liska <mliska@suse.cz>
3991
3992 PR sanitize/78204
3993 * c-attribs.c (add_no_sanitize_value): New function.
3994 (handle_no_sanitize_attribute): Likewise.
3995 (handle_no_sanitize_address_attribute): Use the function.
3996 (handle_no_sanitize_thread_attribute): New function.
3997 (handle_no_address_safety_analysis_attribute): Use
3998 add_no_sanitize_value.
3999 (handle_no_sanitize_undefined_attribute): Likewise.
4000 * c-common.h: Declare new functions.
4001 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
4002 (ubsan_instrument_shift): Likewise.
4003 (ubsan_instrument_bounds): Likewise.
4004 (ubsan_maybe_instrument_array_ref): Likewise.
4005 (ubsan_maybe_instrument_reference_or_call): Likewise.
4006
a01f151f
JM
40072017-06-11 Jason Merrill <jason@redhat.com>
4008
4009 * c-ada-spec.c, c-pragma.c: Use id_equal.
4010
3de4ac6d
MP
40112017-06-04 Marek Polacek <polacek@redhat.com>
4012
4013 PR c/80919
4014 * c-format.c (matching_type_p): Return false if any of the types
4015 requires structural equality.
4016
2474f48f
MS
40172017-06-02 Martin Sebor <msebor@redhat.com>
4018
4019 PR c/80892
4020 * c-warn.c (conversion_warning): Use -Wconversion for integer
4021 conversion and -Wfloat-conversion for floating one.
4022
40ffd95f
BE
40232017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4024
4025 * c.opt (Wsizeof-pointer-div): New warning option.
4026
3fa4634c
VR
40272017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
4028
4029 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
4030 (Wcatch-value=1): Enable by -Wall.
4031
f012c8ef
DM
40322017-05-30 David Malcolm <dmalcolm@redhat.com>
4033
4034 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
4035 format_chars.
4036 * c.opt (fdiagnostics-show-template-tree): New option.
4037 (felide-type): New option.
4038
63dbcd13
VR
40392017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
4040
4041 * c.opt (Wcatch-value=): New C++ warning flag.
4042
be136b5c
NS
40432017-05-24 Nathan Sidwell <nathan@acm.org>
4044
4045 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
4046 const casts to avoid warning.
4047
3cd211af
MS
40482017-05-24 Martin Sebor <msebor@redhat.com>
4049
4050 PR c/80731
4051 * c-common.h (unsafe_conversion_p): Add a function argument.
4052 * c-common.c (unsafe_conversion_p): Same.
4053 Add type names and values to diagnostics.
4054 (scalar_to_vector): Adjust.
4055 * c-warn.c (constant_expression_error): Add a function argument.
4056 Add type names and values to diagnostics.
4057 (conversion_warning): Add a function argument.
4058 Add type names and values to diagnostics.
4059 (warnings_for_convert_and_check): Same.
4060
1ff7be5a
JM
40612017-05-19 Jason Merrill <jason@redhat.com>
4062
4063 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
4064 enumerators.
4065
ff502317
BE
40662017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4067
4068 * c-format.c (locus): Move out of function scope,
4069 add GTY attribute.
4070
2a8a8d7b
NS
40712017-05-19 Nathan Sidwell <nathan@acm.org>
4072
4073 * c-opts.c (class_dump_file, class_dump_flags): Delete.
4074 (c_common_parse_file): Remove class dump handling.
4075 (get_dump_info): Likewise.
4076
39aac208
RB
40772017-05-19 Richard Biener <rguenther@suse.de>
4078
4079 PR c++/80593
4080 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
4081 to alias-set zero memory.
4082
6ecd2339
BE
40832017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
4084
4085 * c-format.c (local_tree_type_node): Add GTY attribute.
4086
6574d78e
MP
40872017-05-18 Marek Polacek <polacek@redhat.com>
4088
4089 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
4090 (c_common_fixed_point_type_for_size): Likewise.
4091 (c_common_type_for_mode): Likewise.
4092 (shorten_compare): Likewise.
4093 (c_promoting_integer_type_p): Use false/true instead of 0/1.
4094 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
4095
e3455240
MP
40962017-05-18 Marek Polacek <polacek@redhat.com>
4097
4098 * c-common.c (self_promoting_args_p): Change the return type to bool.
4099 Use false/true instead of 0/1.
4100 * c-common.h (self_promoting_args_p): Update.
4101
3fa8871b
MP
41022017-05-17 Marek Polacek <polacek@redhat.com>
4103
4104 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
4105 * c-warn.c: Likewise.
4106
b42cc3ca
VV
41072017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
4108
4109 Implement new C++ intrinsics __is_assignable and __is_constructible.
4110 * c-common.c (__is_assignable, __is_constructible): New.
4111 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
4112
1a817418
ML
41132017-05-17 Martin Liska <mliska@suse.cz>
4114
4115 * c-common.h: Introduce dump_flags_t type and
4116 use it instead of int type.
4117 * c-gimplify.c (c_genericize): Likewise.
4118 * c-opts.c: Likewise.
4119
b2fa0a8b
MP
41202017-05-17 Marek Polacek <polacek@redhat.com>
4121
4122 * c-common.c (c_save_expr): Remove.
4123 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
4124 * c-common.h (c_save_expr): Remove declaration.
4125
31c2d57d
VR
41262017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
4127
4128 PR c/35441
4129 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
4130 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
4131 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
4132 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
4133 RDIV_EXPR.
4134 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
4135
684f84de
MP
41362017-05-09 Marek Polacek <polacek@redhat.com>
4137
4138 PR c/80525
4139 * c-warn.c (unwrap_c_maybe_const): New.
4140 (warn_logical_operator): Call it.
4141
641da50a
NS
41422017-05-09 Nathan Sidwell <nathan@acm.org>
4143
4144 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
4145 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
4146
631238ac
MS
41472017-05-08 Martin Sebor <msebor@redhat.com>
4148
4149 PR translation/80280
4150 * c-format.h (struct format_flag_spec): Add new member.
4151 (T89_T): New macro.
4152 * c-format.c (local_tree_type_node): New global.
4153 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
4154 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
4155 (strfmon_flag_specs): Likewise.
4156 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
4157 with distinct quoting properties.
4158 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
4159 (flag_chars_t::validate): Add argument and handle bad quoting.
4160 (check_format_info_main): Handle quoting problems.
4161 (init_dynamic_diag_info): Simplify.
4162
49f0c04c
JM
41632017-05-08 Jason Merrill <jason@redhat.com>
4164
4165 * c-opts.c (c_common_post_options): Update defaults for
4166 flag_abi_version and flag_abi_compat_version.
4167
56d35585
DM
41682017-05-05 David Malcolm <dmalcolm@redhat.com>
4169
4170 * c-common.c (c_cpp_error): Replace report_diagnostic
4171 with diagnostic_report_diagnostic.
4172
0f2c4a8f
MS
41732017-05-04 Martin Sebor <msebor@redhat.com>
4174
4175 PR translation/80280
4176 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
4177 (handle_weakref_attribute): Same.
4178
6fe63fb4
NS
41792017-05-03 Nathan Sidwell <nathan@acm.org>
4180
4181 Canonicalize canonical type hashing
4182 * c-common.c (complete_array_type): Use type_hash_canon.
4183
815d9cc6
XR
41842017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
4185
92a285c1 4186 PR c++/80038
815d9cc6
XR
4187 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
4188 prototype.
4189 (cilk_install_body_pedigree_operations): Likewise.
4190 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
4191 detatched.
4192 (cilk_gimplify_call_params_in_spawned_fn): Remove.
4193 (cilk_install_body_pedigree_operations): Likewise.
4194 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
4195 unwrapping.
4196
f8a36447
JJ
41972017-04-27 Jakub Jelinek <jakub@redhat.com>
4198
4199 PR c++/80534
4200 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
4201 flag on non-aggregate element types.
4202
7c145456
BE
42032017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
4204
4205 * c-common.c (c_type_hasher, type_hash_table): Remove.
4206 (c_common_get_alias_set): Remove unreachable code.
4207 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
4208
c3cbcd45
VR
42092017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
4210
4211 * c.opt (Wextra-semi): New C++ warning flag.
4212
8a59d466
JJ
42132017-04-20 Jakub Jelinek <jakub@redhat.com>
4214
4215 PR middle-end/80423
4216 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
4217
8487c9a5
JJ
42182017-04-18 Jakub Jelinek <jakub@redhat.com>
4219
4220 PR middle-end/79788
4221 PR middle-end/80375
4222 * c-common.c (c_common_type_for_mode): Don't handle
4223 widest_*_literal_type_node here.
4224 c_common_signed_or_unsigned_type): Likewise.
4225 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
4226 to *intTI_type_node or *intDI_type_node depending on whether
4227 TImode is supported by the target or not.
4228
3ee0fb02
ML
42292017-04-10 Martin Liska <mliska@suse.cz>
4230
4231 PR sanitizer/80350
4232 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
4233 doing an UBSAN check.
4234
5764ee3c
JW
42352017-04-03 Jonathan Wakely <jwakely@redhat.com>
4236
4237 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
4238
6f3af356
JJ
42392017-03-31 Jakub Jelinek <jakub@redhat.com>
4240
4241 PR c++/79572
4242 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
4243 tree *.
4244 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
4245 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
4246 REFERENCE_TYPE.
4247
f6a7a9d5
DM
42482017-03-31 David Malcolm <dmalcolm@redhat.com>
4249
4250 PR documentation/78732
4251 * c.opt (Wendif-labels): Fix description to refer to
4252 #else rather than #elif.
4253
af88f557
JJ
42542017-03-31 Jakub Jelinek <jakub@redhat.com>
4255
4256 PR libstdc++/80251
4257 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
4258 * c-common.c (c_common_reswords): Add __is_aggregate trait.
4259
a9e4a1a5
JJ
42602017-03-27 Jakub Jelinek <jakub@redhat.com>
4261
4262 PR middle-end/80162
4263 * c-common.c (c_common_mark_addressable_vec): Don't set
4264 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
4265
3f01b620
MS
42662017-03-21 Martin Sebor <msebor@redhat.com>
4267
4268 PR c++/79548
4269 * c-common.c (set_underlying_type): Mark type used only when
4270 original del is declared unused.
4271
2f6f187a
DM
42722017-03-10 David Malcolm <dmalcolm@redhat.com>
4273
4274 PR translation/79848
4275 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
4276 "%qs".
4277
a02fa805
DM
42782017-03-10 David Malcolm <dmalcolm@redhat.com>
4279
4280 PR c/79921
4281 * c-indentation.c (warn_for_misleading_indentation): Remove parens
4282 from inform's message, so that xgettext can locate it.
4283
822a132c
MP
42842017-03-09 Marek Polacek <polacek@redhat.com>
4285
4286 PR c++/79962
4287 PR c++/79984
4288 * c-attribs.c (handle_nonnull_attribute): Save the result of default
4289 conversion to the attribute list.
4290
bba81f1c
ML
42912017-03-09 Martin Liska <mliska@suse.cz>
4292
4293 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
4294
108154ff
JM
42952017-03-03 Jason Merrill <jason@redhat.com>
4296
4297 * c.opt (Wnoexcept-type): New.
4298
eb0e7c34
RB
42992017-03-02 Richard Biener <rguenther@suse.de>
4300
4301 PR c/79756
4302 * c-common.c (c_common_mark_addressable_vec): Look through
4303 C_MAYBE_CONST_EXPR.
4304
9453ba0a
ML
43052017-02-28 Martin Liska <mliska@suse.cz>
4306
4307 * c.opt: Replace space with tabular for options of <number>
4308 type.
4309
6a825afe
ML
43102017-02-28 Martin Liska <mliska@suse.cz>
4311
4312 * c.opt: Fix --help=option -Q for options which are of
4313 an enum type.
4314
4227c9ad
JJ
43152017-02-24 Jakub Jelinek <jakub@redhat.com>
4316
4317 PR c++/79588
4318 * c-common.c (check_function_restrict): New function.
4319 (check_function_arguments): Add FNDECL argument. Call
4320 check_function_restrict if -Wrestrict.
4321 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
4322 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
4323 * c-common.h (check_function_arguments): Add FNDECL argument.
4324 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
4325
59909673
EB
43262017-02-24 Eric Botcazou <ebotcazou@adacore.com>
4327
4328 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
4329 treatment of parameters with pointer-to-tagged type and tidy up.
4330 (print_ada_methods): Remove the special treatment of C++ static member
4331 functions.
4332
54dcd526
ML
43332017-02-22 Martin Liska <mliska@suse.cz>
4334
4335 * c.opt: Replace inequality signs with square brackets
4336 for -Wnornalized.
4337
00bc9de3
JJ
43382017-02-21 Jakub Jelinek <jakub@redhat.com>
4339
4340 PR c++/79641
4341 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
4342 preserve quals.
4343
97fcf744
JM
43442017-02-17 Joseph Myers <joseph@codesourcery.com>
4345
4346 * c-cppbuiltin.c (builtin_define_float_constants): Define
4347 __DECIMAL_DIG__ to the value for long double.
4348
c7545f1c
MP
43492017-02-15 Marek Polacek <polacek@redhat.com>
4350
4351 PR c/79515
4352 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
4353 conversion has occured.
4354
c2e84327
DM
43552017-01-24 David Malcolm <dmalcolm@redhat.com>
4356
4357 * c-common.c (c_common_reswords): Add "__RTL".
4358 * c-common.h (enum rid): Add RID_RTL.
4359
2ebd93e1
MP
43602017-01-20 Marek Polacek <polacek@redhat.com>
4361
4362 PR c/64279
4363 * c-common.h (do_warn_duplicated_branches_r): Declare.
4364 * c-gimplify.c (c_genericize): Walk the function tree calling
4365 do_warn_duplicated_branches_r.
4366 * c-warn.c (expr_from_macro_expansion_r): New.
4367 (do_warn_duplicated_branches): New.
4368 (do_warn_duplicated_branches_r): New.
4369 * c.opt (Wduplicated-branches): New option.
4370
0d80ab91
DM
43712017-01-17 David Malcolm <dmalcolm@redhat.com>
4372
4373 PR c++/71497
4374 * c-indentation.c (warn_for_misleading_indentation): Use the past
4375 subjunctive in the note.
4376
7f991c36
AH
43772017-01-17 Aldy Hernandez <aldyh@redhat.com>
4378
4379 PR c/79116
4380 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
4381 start type to integer_type.
4382
1c70261c
JJ
43832017-01-16 Jakub Jelinek <jakub@redhat.com>
4384
4385 PR driver/49726
4386 * c.opt (gen-decls): Add Driver flag.
4387
1ddca3f3
PC
43882017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
4389
4390 Revert:
4391 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
4392
4393 PR c++/71737
4394 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
4395
7d2f3f1d
PC
43962017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
4397
4398 PR c++/71737
4399 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
4400
bce6f760
MS
44012017-01-12 Martin Sebor <msebor@redhat.com>
4402
4403 (-Wformat-overflow): ...to this.
4404
bf5fbf46
MS
44052017-01-11 Martin Sebor <msebor@redhat.com>
4406
4407 PR c/78768
4408 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
4409 Also enable for LTO.
4410
e363df3f
JM
44112017-01-10 Jason Merrill <jason@redhat.com>
4412
4413 Implement P0195R2, C++17 variadic using.
4414 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
4415
bd2c6270
JJ
44162017-01-09 Jakub Jelinek <jakub@redhat.com>
4417
4418 PR translation/79019
4419 PR translation/79020
4420 * c.opt (Wnormalized=): Fix typo in description.
4421
efcc8d38
MS
44222017-01-08 Martin Sebor <msebor@redhat.com>
4423
4424 PR middle-end/77708
4425 * c.opt (-Wformat-truncation): New option.
4426
ab20d992 44272017-01-06 Alexandre Oliva <aoliva@redhat.com>
435f3f7a
AO
4428
4429 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
4430 value to unsigned short to fit in 4 hex digits without
4431 warnings.
4432
4e89adf9
EB
44332017-01-05 Eric Botcazou <ebotcazou@adacore.com>
4434
4435 * c.opt (fsso-struct): Add 'native' value.
4436
cd445b54
ML
44372017-01-05 Martin Liska <mliska@suse.cz>
4438
4439 PR pch/78970
4440 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
4441 header.
4442
a9342885
MP
44432017-01-04 Marek Polacek <polacek@redhat.com>
4444
4445 PR c++/64767
4446 * c.opt (Wpointer-compare): New option.
4447
fc73e60c
JJ
44482017-01-04 Jakub Jelinek <jakub@redhat.com>
4449
4450 PR driver/78957
4451 * c.opt (fsso-struct=): Add RejectNegative.
4452
cbe34bb5
JJ
44532017-01-01 Jakub Jelinek <jakub@redhat.com>
4454
4455 Update copyright years.
4456
d4a6c0ea
ML
44572016-12-29 Martin Liska <mliska@suse.cz>
4458
4459 PR c/78933
4460 * c.opt (strong-eval-order): Add RejectNegative keyword.
4461
67a5ad7c
JM
44622016-12-22 Jason Merrill <jason@redhat.com>
4463
4464 Implement P0522R0, matching of template template arguments.
4465 * c-cppbuiltin.c (c_cpp_builtins): Define
4466 __cpp_template_template_args.
4467
0dba7960
JJ
44682016-12-21 Jakub Jelinek <jakub@redhat.com>
4469
4470 PR bootstrap/78817
4471 * c-common.c (struct nonnull_arg_ctx): New type.
4472 (check_function_nonnull): Return bool instead of void. Use
4473 nonnull_arg_ctx as context rather than just location_t.
4474 (check_nonnull_arg): Adjust for the new context type, set
4475 warned_p to true if a warning has been diagnosed.
4476 (check_function_arguments): Return bool instead of void.
4477 * c-common.h (check_function_arguments): Adjust prototype.
4478
31bfc9b9
JM
44792016-12-21 Jason Merrill <jason@redhat.com>
4480
4481 * c.opt (-fnew-ttp-matching): New flag.
4482 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
4483
629b3d75
MJ
44842016-12-14 Martin Jambor <mjambor@suse.cz>
4485
4486 * c-omp.c: Include omp-general.h instead of omp-low.h.
4487 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
4488 name.
4489
474da67e
MS
44902016-12-14 Martin Sebor <msebor@redhat.com>
4491
4492 PR c/17308
4493 * c-common.c (check_nonnull_arg): Disable when optimization
4494 is enabled.
4495
fe366b87
MP
44962016-12-12 Marek Polacek <polacek@redhat.com>
4497
4498 PR c++/78647
4499 * c-common.c (attribute_fallthrough_p): Return false for
4500 error_mark_node.
4501
8bd9f164
MS
45022016-12-08 Martin Sebor <msebor@redhat.com>
4503
4504 PR c/78284
4505 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
4506
060162e0
MS
45072016-12-08 Martin Sebor <msebor@redhat.com>
4508
4509 PR c/78165
92a285c1
ML
4510 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
4511 suffix.
060162e0 4512
ee92e7ba
MS
45132016-12-07 Martin Sebor <msebor@redhat.com>
4514
4515 PR c/53562
4516 PR middle-end/77784
4517 PR middle-end/78149
4518 PR middle-end/78138
4519 * c.opt (-Wstringop-overflow): New option.
4520
84b0769e
MO
45212016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
4522
4523 * c-attribs.c (asan odr indicator): New attribute.
4524 (handle_asan_odr_indicator_attribute): New function.
4525
7fa6a965
PK
45262016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4527
4528 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
4529 ptrdiff_type_node;
4530
56d8ffc1
JG
45312016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
4532
4533 * c-common.c (excess_precision_mode_join): New.
4534 (c_ts18661_flt_eval_method): New.
4535 (c_c11_flt_eval_method): Likewise.
4536 (c_flt_eval_method): Likewise.
4537 * c-common.h (excess_precision_mode_join): New.
4538 (c_flt_eval_method): Likewise.
4539 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
4540 (cpp_iec_559_value): Call it.
4541 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
4542 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
4543 __FLT_EVAL_METHOD_TS_18661_3__.
4544
04f0fcf7
JG
45452016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
4546
4547 * c-opts.c (c_common_post_options): Add logic to handle the default
4548 case for -fpermitted-flt-eval-methods.
4549
fb2675cb
PB
45502016-11-23 Paolo Bonzini <bonzini@gnu.org>
4551
4552 * c.opt (Wexpansion-to-defined): New.
4553
ec1c5694
JJ
45542016-11-23 Jakub Jelinek <jakub@redhat.com>
4555
4556 PR target/78451
4557 * c-pragma.c (handle_pragma_target): Don't replace
4558 current_target_pragma, but chainon the new args to the current one.
4559
730c9e75
NS
45602016-11-22 Nathan Sidwell <nathan@acm.org>
4561
4562 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 4563 indentation and formatting.
730c9e75 4564
89990732
MS
45652016-11-21 Martin Sebor <msebor@redhat.com>
4566
4567 * c.opt (-fprintf-return-value): Enable by default.
4568
48330c93
BE
45692016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4570
4571 PR c++/71973
4572 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
4573 * c-common.c (c_common_nodes_and_builtins): Initialize
4574 const_tm_ptr_type_node.
4575
0d939c95
MP
45762016-11-16 Marek Polacek <polacek@redhat.com>
4577
4578 PR c/78285
4579 * c-common.c (c_add_case_label): Turn error_at calls into inform.
4580
8e745a17
JJ
45812016-11-14 Jakub Jelinek <jakub@redhat.com>
4582
4583 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
4584
1ee62b92 45852016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
4586 Richard Biener <rguenther@suse.de>
4587
4588 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
4589 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
4590 * c.opt (fgimple): New option.
1ee62b92 4591
22b15758
UB
45922016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4593
4594 PR c/35503
4595 * c-common.h (warn_for_restrict): Declare.
4596 * c-warn.c: Include gcc-rich-location.h.
4597 (warn_for_restrict): New function.
4598 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
4599 (gcc_cdiag_char_table): Likewise.
4600 (gcc_cxxdiag_char_table): Likewise.
4601 * c.opt (Wrestrict): New option.
4602
4be719cd
EB
46032016-11-13 Eric Botcazou <ebotcazou@adacore.com>
4604
4605 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
4606 for nested types only if the type is a record or union and dump SLOC.
4607
4a826ca6
JM
46082016-11-09 Jason Merrill <jason@redhat.com>
4609
4610 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
4611
2e955d50
JJ
46122016-11-09 Jakub Jelinek <jakub@redhat.com>
4613
4614 * c-ubsan.c (ubsan_instrument_shift): Handle split
4615 -fsanitize=shift-base and -fsanitize=shift-exponent.
4616
51dc6603
JM
46172016-11-07 Jason Merrill <jason@redhat.com>
4618
4619 * c.opt (Wc++1z-compat): New.
4620 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
4621
6dc4a604
ML
46222016-11-07 Martin Liska <mliska@suse.cz>
4623
4624 * c-warn.c (warn_for_unused_label): Save all labels used
4625 in goto or in &label.
4626
b302001e
JM
46272016-11-03 Jason Merrill <jason@redhat.com>
4628
4629 * c-cppbuiltin.c (c_cpp_builtins): Correct
4630 __cpp_inheriting_constructors.
4631
31f7f784
JM
46322016-11-01 Jason Merrill <jason@redhat.com>
4633
2bc78e3c
JM
4634 * c-cppbuiltin.c (c_cpp_builtins): Update
4635 __cpp_inheriting_constructors.
4636
31f7f784
JM
4637 * c.opt (-fnew-inheriting-ctors): New.
4638 * c-opts.c: Default to on for ABI 11+.
4639
dcb466ec
JJ
46402016-10-31 Jakub Jelinek <jakub@redhat.com>
4641
4642 PR c++/77948
4643 * c.opt (fext-numeric-literals): Add Var and Init.
4644 * c-opts.c (c_common_handle_option): Don't clear
4645 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
4646 (c_common_post_options): Clear it here if not set
4647 explicitly.
4648
52e1b91e
AH
46492016-10-28 Aldy Hernandez <aldyh@redhat.com>
4650
4651 PR debug/77773
4652 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
4653 if NULL.
4654
e16f1cc7
JJ
46552016-10-25 Jakub Jelinek <jakub@redhat.com>
4656
4657 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
4658 * c-common.c (c_common_reswords): Add __builtin_launder.
4659
f8348061
BE
46602016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
4661
4662 * c-common.c (c_common_truthvalue_conversion): Warn for
4663 multiplications in boolean context. Fix the quoting of '<<' and '<'
4664 in the shift warning.
4665
eff89e01
BE
46662016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
4667
4668 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
4669
24bc7bf4
JM
46702016-10-20 Jason Merrill <jason@redhat.com>
4671
4672 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
4673
4c712374
BE
46742016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4675
4676 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
4677 integer shift ops in boolean context.
4678
46792016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
4680
4681 * c.opt (Walloca): New.
4682 (Walloca-larger-than=): New.
4683 (Wvla-larger-than=): New.
4684
8fa18c06
MP
46852016-10-17 Marek Polacek <polacek@redhat.com>
4686
4687 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
4688 Return immediately when finding a match.
4689 (warn_tautological_cmp): Remove a boolean variable that is no longer
4690 needed.
4691
b12b1915
MP
46922016-10-17 Marek Polacek <polacek@redhat.com>
4693
4694 * c-attribs.c: New file.
4695 * c-common.c: Move attributes handling to c-attribs.c.
4696 (get_nonnull_operand): No longer static.
4697 * c-common.h: Move the declarations from c-attribs.c to its own section.
4698
2045acd9
JM
46992016-10-14 Jason Merrill <jason@redhat.com>
4700
4701 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
4702 and __cpp_deduction_guides.
4703
14a2c9aa
JM
47042016-10-13 Jason Merrill <jason@redhat.com>
4705
4706 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
4707
4d0cdd0c
TP
47082016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
4709
4710 * c-cppbuiltin.c: Include memmodel.h.
4711 * c-opts.c: Likewise.
4712 * c-pragma.c: Likewise.
4713 * c-warn.c: Likewise.
4714
70f6d5e1
JJ
47152016-10-12 Jakub Jelinek <jakub@redhat.com>
4716
4717 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
4718 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
4719 * c-opts.c (sanitize_cpp_opts): Initialize
4720 cpp_opts->cpp_warn_implicit_fallthrough.
4721
78f61294
MP
47222016-10-11 Marek Polacek <polacek@redhat.com>
4723
4724 * c-common.c (warning_candidate_p): Change the return type to bool
4725 and return true/false instead of 1/0.
4726 (vector_mode_valid_p): Likewise.
4727
038b5cc0
MP
47282016-10-11 Marek Polacek <polacek@redhat.com>
4729
4730 * c-common.c (fold_for_warn): No longer static.
4731 (bool_promoted_to_int_p): Likewise.
4732 (c_common_get_narrower): Likewise.
4733 (constant_expression_warning): Move to c-warn.c.
4734 (constant_expression_error): Likewise.
4735 (overflow_warning): Likewise.
4736 (warn_logical_operator): Likewise.
4737 (find_array_ref_with_const_idx_r): Likewise.
4738 (warn_tautological_cmp): Likewise.
4739 (expr_has_boolean_operands_p): Likewise.
4740 (warn_logical_not_parentheses): Likewise.
4741 (warn_if_unused_value): Likewise.
4742 (strict_aliasing_warning): Likewise.
4743 (sizeof_pointer_memaccess_warning): Likewise.
4744 (check_main_parameter_types): Likewise.
4745 (conversion_warning): Likewise.
4746 (warnings_for_convert_and_check): Likewise.
4747 (match_case_to_enum_1): Likewise.
4748 (match_case_to_enum): Likewise.
4749 (c_do_switch_warnings): Likewise.
4750 (warn_for_omitted_condop): Likewise.
4751 (readonly_error): Likewise.
4752 (lvalue_error): Likewise.
4753 (invalid_indirection_error): Likewise.
4754 (warn_array_subscript_with_type_char): Likewise.
4755 (warn_about_parentheses): Likewise.
4756 (warn_for_unused_label): Likewise.
4757 (warn_for_div_by_zero): Likewise.
4758 (warn_for_memset): Likewise.
4759 (warn_for_sign_compare): Likewise.
4760 (do_warn_double_promotion): Likewise.
4761 (do_warn_unused_parameter): Likewise.
4762 (record_locally_defined_typedef): Likewise.
4763 (maybe_record_typedef_use): Likewise.
4764 (maybe_warn_unused_local_typedefs): Likewise.
4765 (maybe_warn_bool_compare): Likewise.
4766 (maybe_warn_shift_overflow): Likewise.
4767 (warn_duplicated_cond_add_or_warn): Likewise.
4768 (diagnose_mismatched_attributes): Likewise.
4769 * c-common.h: Move the declarations from c-warn.c to its own section.
4770 * c-warn.c: New file.
4771
627be19f
JM
47722016-10-08 Jason Merrill <jason@redhat.com>
4773
4774 * c-common.c (c_common_truthvalue_conversion): Don't distribute
4775 into COND_EXPR in C++.
4776
7bad794a
JJ
47772016-10-08 Jakub Jelinek <jakub@redhat.com>
4778
4779 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
4780 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
4781 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
4782
be845b04
JJ
47832016-10-07 Jakub Jelinek <jakub@redhat.com>
4784
4785 Implement LWG2296 helper intrinsic
4786 * c-common.h (enum rid): Add RID_ADDRESSOF.
4787 * c-common.c (c_common_reswords): Add __builtin_addressof.
4788
c09c4992
BE
47892016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
4790
4791 PR c++/77700
4792 * c-common.c (c_common_truthvalue_conversion): Warn also for
4793 suspicious enum values in boolean context.
4794
342cfb3e
JJ
47952016-10-06 Jakub Jelinek <jakub@redhat.com>
4796
4797 Implement P0258R2 - helper for C++17
4798 std::has_unique_object_representations trait
4799 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
4800 * c-common.c (c_common_reswords): Add
4801 __has_unique_object_representations.
4802
2e69f143
JJ
48032016-10-05 Jakub Jelinek <jakub@redhat.com>
4804
4805 PR sanitizer/66343
4806 * c-ubsan.c (ubsan_instrument_return): Don't call
4807 initialize_sanitizer_builtins here.
4808
700fff34
BE
48092016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
4810
4811 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
4812 conditional expression in boolean context when only one arm is
4813 non-boolean.
4814
9563bfcd
JJ
48152016-10-05 Jakub Jelinek <jakub@redhat.com>
4816
04a32443
JJ
4817 PR sanitizer/77823
4818 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
4819 is not integral.
4820
9563bfcd
JJ
4821 * c-common.c (c_common_reswords): Update comment for C++11.
4822
f1644724
JM
48232016-10-04 Jason Merrill <jason@redhat.com>
4824
4825 * c-common.c (make_tree_vector_from_ctor): New.
4826 * c-common.h: Declare it.
4827
5a79befb
JJ
48282016-10-04 Jakub Jelinek <jakub@redhat.com>
4829
4830 * c-cppbuiltin.c (c_cpp_builtins): Don't define
4831 __LIBGCC_JCR_SECTION_NAME__.
4832
1633d3b9
BE
48332016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
4834
4835 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
4836 left shift in boolean context.
4837
a2c6e7f2
JJ
48382016-09-29 Jakub Jelinek <jakub@redhat.com>
4839
4840 Implement P0001R1 - C++17 removal of register storage class specifier
4841 * c.opt (Wregister): New warning.
4842 * c-opts.c (c_common_post_options): Enable -Wregister by
4843 default for C++17.
4844
75304c87
JG
48452016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
4846
4847 * c-opts.c (c_common_post_options): Remove special case for
4848 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
4849 in C++.
4850
bbfac6da
JJ
48512016-09-27 Jakub Jelinek <jakub@redhat.com>
4852
6e39060a
JJ
4853 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
4854 -std=c++1z.
4855
bbfac6da
JJ
4856 * c-ada-spec.c (print_ada_declaration): Remove break after return.
4857
e73cf9a2
TP
48582016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
4859
4860 * c-common.c: Include memmodel.h.
4861
c6147dc4
MP
48622016-09-26 Marek Polacek <polacek@redhat.com>
4863
4864 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
4865
81fea426
MP
48662016-09-26 Marek Polacek <polacek@redhat.com>
4867
4868 PR c/7652
4869 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
4870 (handle_fallthrough_attribute): New function.
4871 (attribute_fallthrough_p): New function.
4872 * c-common.h (attribute_fallthrough_p): Declare.
4873
9a2300e9
MP
48742016-09-24 Marek Polacek <polacek@redhat.com>
4875
4876 PR c/77490
4877 * c.opt (Wbool-operation): New.
4878
a09e9e35
BE
48792016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4880
4881 * c-common.c (c_common_truthvalue_conversion): Inhibit
4882 Wint-in-bool-context warning with from_macro_definition_at.
4883 Mention the expression will always evaluate to true.
4884
d43b4ccc
MS
48852016-09-21 Martin Sebor <msebor@redhat.com>
4886
4887 PR bootstrap/77676
4888 * c.opt (fprintf-return-value): Temporarily initialize to zero
4889 to unblock bootstrap failures.
4890
2e1c20b1
JJ
48912016-09-21 Jakub Jelinek <jakub@redhat.com>
4892
4893 PR c++/77651
4894 * c.opt (Waligned-new=): Add RejectNegative.
4895 (faligned-new=): Likewise. Spelling fix - change
4896 aligned_new_threshhold to aligned_new_threshold.
4897 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
4898 to aligned_new_threshold.
4899
88d0c3f0
MS
49002016-09-20 Martin Sebor <msebor@redhat.com>
4901
4902 PR middle-end/49905
4903 * c.opt: Add -Wformat-length and -fprintf-return-value.
4904
144a96e4
BE
49052016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4906
4907 PR c++/77434
4908 * c.opt (Wint-in-bool-context): New warning.
4909 * c-common.c (c_common_truthvalue_conversion): Warn on integer
4910 constants in boolean context.
4911
63012d9a
JM
49122016-09-19 Joseph Myers <joseph@codesourcery.com>
4913
4914 * c-common.c (max_align_t_align): Also consider alignment of
4915 float128_type_node.
4916
931388ce
JM
49172016-09-15 Jason Merrill <jason@redhat.com>
4918
4919 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
4920 DECL_EXTERNAL.
4921
38711381
JM
49222016-09-14 Jason Merrill <jason@redhat.com>
4923
4924 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
4925 limit FIELD_DECL, either.
4926
e51fbec3
MP
49272016-09-14 Marek Polacek <polacek@redhat.com>
4928
4929 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
4930 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
4931 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
4932
254830ba
DM
49332016-09-13 David Malcolm <dmalcolm@redhat.com>
4934
4935 * c-common.c (warn_logical_not_parentheses): Replace
4936 rich_location::add_fixit_insert calls with add_fixit_insert_before
4937 and add_fixit_insert_after, eliminating the "next_loc" calculation.
4938
42763690
JM
49392016-09-13 Jason Merrill <jason@redhat.com>
4940 Tom de Vries <tom@codesourcery.com>
4941
4942 PR c++/77427
4943 * c-common.c (set_underlying_type): Don't treat array as builtin type.
4944
9453eee9
JM
49452016-09-13 Jason Merrill <jason@redhat.com>
4946
4947 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
4948 limit types at all.
4949
e96809e3
JM
49502016-09-12 Jason Merrill <jason@redhat.com>
4951
4952 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
4953 bit/byte confusion, allow large alignment for types.
4954
54dcdb88
BE
49552016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
4956
4957 PR c++/77496
4958 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
4959
d1463eb9
DM
49602016-09-12 David Malcolm <dmalcolm@redhat.com>
4961
4962 PR c/72858
4963 * c-format.c (argument_parser::check_argument_type): Add params
4964 "type_start" and "conversion_char". Use the former to generate
4965 offset_to_type_start and pass it and conversion_char to
4966 check_format_types.
4967 (check_format_info_main): Capture the start of the type
4968 information as "type_start", and pass it an format_char
4969 to arg_parser.check_argument_type.
4970 (check_format_types): Provide an example in the leading comment.
4971 Add params "offset_to_type_start" and "conversion_char"; pass
4972 them to format_type_warning calls.
4973 (test_get_modifier_for_format_len): Likewise.
4974 (matching_type_p): New function.
4975 (get_format_for_type): Add param "conversion_char" and move
4976 implementation into...
4977 (get_format_for_type_1): ...new function, called twice.
4978 Use new function matching_type_p rather than checking for
4979 TYPE_CANONICAL equality.
4980 (get_corrected_substring): New function.
4981 (format_type_warning): Provide an example in the leading comment.
4982 Add params "offset_to_type_start" and "conversion_char". Replace
4983 call to get_format_for_type with call to get_corrected_substring
4984 and move rejection of hints for widths/precisions there.
4985 (assert_format_for_type_streq): Add param "conversion_char".
4986 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
4987 (test_get_format_for_type_printf): Add conversion chars to the
4988 tests, adding coverage for various combinations of integer
4989 vs double conversions, and for preserving octal and hexadecimal
4990 conversions.
4991 (test_get_format_for_type_scanf): Add conversion chars to the
4992 tests.
4993
5b28efbb
TV
49942016-09-10 Tom de Vries <tom@codesourcery.com>
4995
4996 PR C/71602
4997 * c-common.c (build_va_arg): Handle more strict
4998 targetm.canonical_va_list_type. Replace first argument type error with
4999 assert.
5000
3f0177e7
MS
50012016-09-09 Martin Sebor <msebor@redhat.com>
5002
5003 PR c/77520
5004 PR c/77521
5005 * c-format.c (argument_parser::find_format_char_info): Use %qc
5006 format directive unconditionally.
5007
af63ba4b
JM
50082016-09-09 Jason Merrill <jason@redhat.com>
5009
5010 Implement C++17 new of over-aligned types.
5011 * c.opt: Add -faligned-new and -Waligned-new.
5012 * c-common.c (max_align_t_align): Split out from...
5013 (cxx_fundamental_alignment_p): ...here.
5014 * c-common.h: Declare it.
5015 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
5016
c65248cb
JM
50172016-09-09 Joseph Myers <joseph@codesourcery.com>
5018
5019 * c-cppbuiltin.c (builtin_define_type_width): New function.
5020 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
5021 macros.
5022
e5106e27
DM
50232016-09-07 David Malcolm <dmalcolm@redhat.com>
5024
5025 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
5026 a POINTER_TYPE.
5027 (substring_loc::get_location): Move to substring-locations.c,
5028 keeping implementation as...
5029 (c_get_substring_location): New function, from the above, reworked
5030 to use accessors rather than member lookup.
5031 * c-common.h (class substring_loc): Move to substring-locations.h,
5032 replacing with a forward decl.
5033 (c_get_substring_location): New decl.
5034 * c-format.c: Include "substring-locations.h".
5035 (format_warning_va): Move to substring-locations.c.
5036 (format_warning_at_substring): Likewise.
5037
ab20d992 50382016-09-06 Martin Sebor <msebor@redhat.com>
a42e7952
MS
5039
5040 PR c/77336
5041 * c-format.c (check_function_format): Avoid issuing warnings for
5042 functions unless they call format functions with non-constant
5043 format strings.
5044
b772a565
RB
50452016-09-06 Richard Biener <rguenther@suse.de>
5046
5047 PR c/77450
5048 * c-common.c (c_common_mark_addressable_vec): Handle
5049 COMPOUND_LITERAL_EXPR.
5050
25ff5dd3
MP
50512016-09-05 Marek Polacek <polacek@redhat.com>
5052
5053 PR c/77423
5054 * c-common.c (bool_promoted_to_int_p): New function.
5055 (expr_has_boolean_operands_p): New function.
5056 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
5057 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
5058
21234eb5
TV
50592016-09-04 Tom de Vries <tom@codesourcery.com>
5060
5061 revert:
5062 2016-08-29 Tom de Vries <tom@codesourcery.com>
5063
5064 * c-common.c (build_va_arg): Replace first argument type error
5065 with assert.
5066
9dc5773f
JJ
50672016-09-02 Jakub Jelinek <jakub@redhat.com>
5068
5069 PR c/65467
5070 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
5071 (c_finish_omp_for): Reject _Atomic qualified iterators.
5072
50732016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
5074
5075 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
5076 size to guarantee it fits the output of the formatted function
5077 regardless of its arguments.
5078
295844f6
MP
50792016-09-01 Marek Polacek <polacek@redhat.com>
5080
5081 PR c/7652
5082 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
5083 FALLTHRU comments.
5084
3d06b6f2
MP
50852016-08-29 Marek Polacek <polacek@redhat.com>
5086
5087 PR c/77292
5088 * c-common.c (warn_logical_not_parentheses): Don't warn for
5089 a comparison or a logical operator.
5090
34cedad5
TV
50912016-08-29 Tom de Vries <tom@codesourcery.com>
5092
5093 * c-common.c (build_va_arg): Fix type comparison assert.
5094
f162d717
TV
50952016-08-29 Tom de Vries <tom@codesourcery.com>
5096
5097 * c-common.c (build_va_arg): Replace first argument type error
5098 with assert.
5099
ba9bbd6f
TV
51002016-08-29 Tom de Vries <tom@codesourcery.com>
5101
5102 PR c/77398
5103 * c-common.c (build_va_arg): Add first argument error. Build va_arg
5104 with error_mark_node as va_list instead of with illegal va_list.
5105
ebef225f
MP
51062016-08-25 Marek Polacek <polacek@redhat.com>
5107 David Malcolm <dmalcolm@redhat.com>
5108
5109 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
5110 * c-common.h (warn_logical_not_parentheses): Update declaration.
5111
b00e6e75
MP
51122016-08-22 Marek Polacek <polacek@redhat.com>
5113
5114 PR c++/77321
5115 * c-common.c (warn_for_memset): Check type for null.
5116
6dc198e3
JM
51172016-08-22 Joseph Myers <joseph@codesourcery.com>
5118
14ec014e 5119 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
5120 _FloatNx types for suffixes for built-in functions.
5121
c65699ef
JM
51222016-08-19 Joseph Myers <joseph@codesourcery.com>
5123
5124 PR c/32187
5125 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
5126 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
5127 (RID_FLOAT128X): New enum rid values.
5128 (CASE_RID_FLOATN_NX): New macro.
5129 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
5130 keywords.
5131 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
5132 corresponding complex types.
5133 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
5134 _FloatNx and corresponding complex types.
5135 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
5136 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
5137 and _FloatNx types for the widest type for determining
5138 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
5139 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
5140 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
5141 and _FloatNx types.
5142 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
5143 constants.
5144 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
5145 _FloatNx types.
5146
cc015f3a
DM
51472016-08-18 David Malcolm <dmalcolm@redhat.com>
5148
5149 * c-opts.c (c_diagnostic_finalizer): Update for change to
5150 diagnostic_show_locus.
5151
cb18fd07
DM
51522016-08-18 David Malcolm <dmalcolm@redhat.com>
5153
5154 * c-common.c: Include "spellcheck.h".
5155 (cb_get_suggestion): New function.
5156 * c-common.h (cb_get_suggestion): New decl.
5157 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
5158 cb_get_suggestion.
5159
a76989dc
MP
51602016-08-18 Marek Polacek <polacek@redhat.com>
5161
5162 PR c/71514
5163 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
5164 and pointer-to-VLA.
5165
65e736c0
DM
51662016-08-16 David Malcolm <dmalcolm@redhat.com>
5167
5168 PR c/72857
5169 * c-common.c (substring_loc::get_range): Rename to...
5170 (substring_loc::get_location): ...this, converting param from a
5171 source_range * to a location_t *. Call
5172 get_source_location_for_substring rather than
5173 get_source_range_for_substring, and pass in m_caret_idx.
5174 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
5175 (substring_loc::get_range): Replace with...
5176 (substring_loc::get_location): ...this.
5177 (substring_loc::set_caret_index): New method.
5178 (substring_loc): Add field m_caret_idx.
5179 * c-format.c (format_warning_va): Update for above changes.
5180 Rename local "substring_loc" to "fmt_substring_loc" to avoid
5181 clashing with type name.
5182 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
5183 (check_argument_type): Likewise.
5184 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
5185 Use a copy when emitting warnings, setting the caret index from TYPE.
5186
7e1dde14 51872016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 5188 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
5189
5190 * c-ada-spec.c (dump_number): New function.
5191 (handle_escape_character): Likewise.
5192 (print_ada_macros): Add handling of constant integers and strings.
5193
191816a3
MP
51942016-08-12 Marek Polacek <polacek@redhat.com>
5195
5196 PR c/7652
5197 * c-common.c (scalar_to_vector): Adjust fall through comment.
5198 * c-opts.c (c_common_handle_option): Likewise.
5199 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
5200 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
5201 fall through comment.
5202 * cilk.c (extract_free_variables): Add FALLTHRU.
5203
452df4a4
JM
52042016-08-10 Jason Merrill <jason@redhat.com>
5205
5206 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
5207
f3365c12
JM
52082016-08-09 Jason Merrill <jason@redhat.com>
5209
5210 * c-common.c (c_common_attribute_table): vector_size affects type
5211 identity.
5212
f0bc3323
MP
52132016-08-09 Marek Polacek <polacek@redhat.com>
5214
5215 PR c/7652
5216 * c-ada-spec.c (dump_generic_ada_node): Add return.
5217
98e5a19a
JM
52182016-08-09 Jason Merrill <jason@redhat.com>
5219
5220 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
5221 C++17 constexpr lambdas.
5222
895aa8e1
DM
52232016-08-08 David Malcolm <dmalcolm@redhat.com>
5224
5225 PR c/64955
5226 * c-common.h (selftest::c_format_c_tests): New declaration.
5227 (selftest::run_c_tests): New declaration.
5228 * c-format.c: Include "selftest.h.
5229 (format_warning_va): Add param "corrected_substring" and use
5230 it to add a replacement fix-it hint.
5231 (format_warning_at_substring): Likewise.
5232 (format_warning_at_char): Update for new param of
5233 format_warning_va.
5234 (argument_parser::check_argument_type): Pass "fki" to
5235 check_format_types.
5236 (check_format_types): Add param "fki" and pass it to
5237 format_type_warning.
5238 (deref_n_times): New function.
5239 (get_modifier_for_format_len): New function.
5240 (selftest::test_get_modifier_for_format_len): New function.
5241 (get_format_for_type): New function.
5242 (format_type_warning): Add param "fki" and use it to attempt
5243 to provide hints for argument types when calling
5244 format_warning_at_substring.
5245 (selftest::get_info): New function.
5246 (selftest::assert_format_for_type_streq): New function.
5247 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
5248 (selftest::test_get_format_for_type_printf): New function.
5249 (selftest::test_get_format_for_type_scanf): New function.
5250 (selftest::c_format_c_tests): New function.
5251
e52ed3fe
DM
52522016-08-08 David Malcolm <dmalcolm@redhat.com>
5253
5254 PR c/52952
5255 * c-format.c: Include "diagnostic.h".
5256 (location_column_from_byte_offset): Delete.
5257 (location_from_offset): Delete.
5258 (format_warning_va): New function.
5259 (format_warning_at_substring): New function.
5260 (format_warning_at_char): New function.
5261 (check_format_arg): Capture location of format_tree and pass to
5262 check_format_info_main.
5263 (argument_parser): Add fields "start_of_this_format" and
5264 "format_string_cst".
5265 (flag_chars_t::validate): Add param "format_string_cst". Convert
5266 warning_at call using location_from_offset to call to
5267 format_warning_at_char.
5268 (argument_parser::argument_parser): Add param "format_string_cst_"
5269 and use use it to initialize field "format_string_cst".
5270 Initialize new field "start_of_this_format".
5271 (argument_parser::read_format_flags): Convert warning_at call
5272 using location_from_offset to a call to format_warning_at_char.
5273 (argument_parser::read_any_format_left_precision): Likewise.
5274 (argument_parser::read_any_format_precision): Likewise.
5275 (argument_parser::read_any_other_modifier): Likewise.
5276 (argument_parser::find_format_char_info): Likewise, in three places.
5277 (argument_parser::parse_any_scan_set): Likewise, in one place.
5278 (argument_parser::handle_conversions): Likewise, in two places.
5279 (argument_parser::check_argument_type): Add param "fmt_param_loc"
5280 and use it to make a substring_loc. Pass the latter to
5281 check_format_types.
5282 (check_format_info_main): Add params "fmt_param_loc" and
5283 "format_string_cst". Convert warning_at calls using
5284 location_from_offset to calls to format_warning_at_char. Pass the
5285 new params to the arg_parser ctor. Pass "format_string_cst" to
5286 flag_chars.validate. Pass "fmt_param_loc" to
5287 arg_parser.check_argument_type.
5288 (check_format_types): Convert first param from a location_t
5289 to a const substring_loc & and rename to "fmt_loc". Attempt
5290 to extract the range of the relevant parameter and pass it
5291 to format_type_warning.
5292 (format_type_warning): Convert first param from a location_t
5293 to a const substring_loc & and rename to "fmt_loc". Add
5294 params "param_range" and "type". Replace calls to warning_at
5295 with calls to format_warning_at_substring.
5296
1c4d457e
DM
52972016-08-08 David Malcolm <dmalcolm@redhat.com>
5298
5299 * c-format.c (class flag_chars_t): New class.
5300 (struct length_modifier): New struct.
5301 (class argument_parser): New class.
5302 (flag_chars_t::flag_chars_t): New ctor.
5303 (flag_chars_t::has_char_p): New method.
5304 (flag_chars_t::add_char): New method.
5305 (flag_chars_t::validate): New method.
5306 (flag_chars_t::get_alloc_flag): New method.
5307 (flag_chars_t::assignment_suppression_p): New method.
5308 (argument_parser::argument_parser): New ctor.
5309 (argument_parser::read_any_dollar): New method.
5310 (argument_parser::read_format_flags): New method.
5311 (argument_parser::read_any_format_width): New method.
5312 (argument_parser::read_any_format_left_precision): New method.
5313 (argument_parser::read_any_format_precision): New method.
5314 (argument_parser::handle_alloc_chars): New method.
5315 (argument_parser::read_any_length_modifier): New method.
5316 (argument_parser::read_any_other_modifier): New method.
5317 (argument_parser::find_format_char_info): New method.
5318 (argument_parser::validate_flag_pairs): New method.
5319 (argument_parser::give_y2k_warnings): New method.
5320 (argument_parser::parse_any_scan_set): New method.
5321 (argument_parser::handle_conversions): New method.
5322 (argument_parser::check_argument_type): New method.
5323 (check_format_info_main): Introduce classes argument_parser
5324 and flag_chars_t, moving the code within the loop into methods
5325 of these classes. Make various locals "const".
5326
88fa5555
DM
53272016-08-05 David Malcolm <dmalcolm@redhat.com>
5328
5329 * c-common.c: Include "substring-locations.h".
5330 (get_cpp_ttype_from_string_type): New function.
5331 (g_string_concat_db): New global.
5332 (substring_loc::get_range): New method.
5333 * c-common.h (g_string_concat_db): New declaration.
5334 (class substring_loc): New class.
5335 * c-lex.c (lex_string): When concatenating strings, capture the
5336 locations of all tokens using a new obstack, and record the
5337 concatenation locations within g_string_concat_db.
5338 * c-opts.c (c_common_init_options): Construct g_string_concat_db
5339 on the ggc-heap.
5340
78169471
MP
53412016-07-29 Marek Polacek <polacek@redhat.com>
5342
638fc14f
MP
5343 PR c/71926
5344 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
5345 parentheses warning.
5346
78169471
MP
5347 PR c/71574
5348 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
5349
1225d6b1
ML
53502016-07-28 Martin Liska <mliska@suse.cz>
5351
5352 PR gcov-profile/68025
5353 * c-common.c (handle_no_profile_instrument_function_attribute):
5354
ec1e2a40
BE
53552016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
5356
5357 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
5358 BITS_PER_UNIT_LOG.
5359
5ec2cd9f
JM
53602016-07-25 Jason Merrill <jason@redhat.com>
5361
5362 PR c++/65970
5363 * c.opt (fconstexpr-loop-limit): New.
5364
9dc5773f 53652016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
5366
5367 PR c++/71675
5368 * c-common.c (resolve_overloaded_builtin): Avoid converting
5369 __atomic_compare_exchange_n return type to that of what its
5370 first argument points to.
5371
e3fe09c1
UB
53722016-07-22 Uros Bizjak <ubizjak@gmail.com>
5373
5374 * c-common.c: Use HOST_WIDE_INT_M1U instead of
5375 ~(unsigned HOST_WIDE_INT) 0.
5376
bc91c436
ML
53772016-07-22 Martin Liska <mliska@suse.cz>
5378
5379 PR gcov-profile/69028
5380 PR gcov-profile/62047
5381 * cilk.c (create_cilk_helper_decl): Set location of a new decl
5382 to the current_function_decl.
5383
451dcc66
JM
53842016-07-21 Jason Merrill <jason@redhat.com>
5385
5386 PR c++/65168
5387 * c-common.c (c_common_truthvalue_conversion): Check
5388 c_inhibit_evaluation_warnings for warning about address of
5389 reference.
5390
de6a69ee
DM
53912016-07-20 David Malcolm <dmalcolm@redhat.com>
5392
5393 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
5394 const char *.
5395
d022c55a
JM
53962016-07-15 Jason Merrill <jason@redhat.com>
5397
5398 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
5399
ddbbcb19
JJ
54002016-07-15 Jakub Jelinek <jakub@redhat.com>
5401
5402 PR c/71858
5403 * c-common.h (enum lookup_name_fuzzy_kind): Add
5404 FUZZY_LOOKUP_FUNCTION_NAME.
5405
d0cf395a
JM
54062016-07-08 Jason Merrill <jason@redhat.com>
5407
5408 P0145: Refining Expression Order for C++.
5409 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
5410 * c-opts.c: Adjust.
5411
98d44e93
MT
54122016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
5413
5414 PR c++/71214
5415 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
5416
f9d8d994
TS
54172016-06-29 Thomas Schwinge <thomas@codesourcery.com>
5418
5419 * c-pragma.h (enum pragma_kind): Rename
5420 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
5421 users.
5422
4aa83879
RB
54232016-06-29 Richard Biener <rguenther@suse.de>
5424
5425 PR middle-end/71002
5426 * c-common.c (c_common_get_alias_set): Remove union type punning case.
5427
a25bd9e6
JM
54282016-06-24 Jason Merrill <jason@redhat.com>
5429
5430 P0145R2: Refining Expression Order for C++.
5431 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
5432 MODIFY_EXPR.
5433
a86451b9
JJ
54342016-06-24 Jakub Jelinek <jakub@redhat.com>
5435
5436 * c-common.c (check_builtin_function_arguments): Require last
5437 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
5438 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
5439 if the last argument is pointer to enumerated or boolean type.
5440
1a4f11c8
DM
54412016-06-22 David Malcolm <dmalcolm@redhat.com>
5442
5443 PR c/70339
5444 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
5445 (lookup_name_fuzzy): New prototype.
5446
fe55692c
JDA
54472016-06-21 John David Anglin <danglin@gcc.gnu.org>
5448
5449 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
5450
4eb24e01
JM
54512016-06-14 Jason Merrill <jason@redhat.com>
5452
5453 P0145R2: Refining Expression Order for C++.
5454 * c.opt (fargs-in-order): New.
5455 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
5456
ef7cf206
JJ
54572016-06-13 Jakub Jelinek <jakub@redhat.com>
5458
0dda258b
JJ
5459 PR sanitizer/71498
5460 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
5461 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
5462
ef7cf206
JJ
5463 PR preprocessor/71183
5464 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
5465 to cb_get_source_date_epoch.
5466
50b15873
JJ
54672016-06-10 Jakub Jelinek <jakub@redhat.com>
5468
5469 PR c/68657
5470 * c.opt (Wpsabi): Add Warning flag.
5471
4d926e34
MS
54722016-06-10 Martin Sebor <msebor@redhat.com>
5473
5474 PR c/71392
14ec014e 5475 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
5476 the nonnull attribute in type-generic builtins.
5477
e01b4e16
MS
54782016-06-09 Martin Sebor <msebor@redhat.com>
5479
5480 PR c/70883
5481 * c-common.c (builtin_function_validate_nargs): Make text of error
5482 message consistent with others like it.
5483
44a845ca
MS
54842016-06-08 Martin Sebor <msebor@redhat.com>
5485 Jakub Jelinek <jakub@redhat.com>
5486
5487 PR c++/70507
5488 PR c/68120
5489 * c-common.c (check_builtin_function_arguments): Handle
5490 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
5491
a80a7051
RB
54922016-06-08 Richard Biener <rguenther@suse.de>
5493
5494 * c-common.c (parse_optimize_options): Improve diagnostic messages.
5495
bfd67b47
RB
54962016-06-07 Richard Biener <rguenther@suse.de>
5497
5498 PR c/61564
5499 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
5500 options and warn about others.
5501
15c98b2e
ES
55022016-06-01 Eduard Sanou <dhole@openmailbox.org>
5503
5504 * c-common.c (get_source_date_epoch): Rename to
5505 cb_get_source_date_epoch.
5506 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
5507 message when the parsing fails. Use error_at instead of fatal_error.
5508 * c-common.h (get_source_date_epoch): Rename to
5509 cb_get_source_date_epoch.
5510 * c-common.h (cb_get_source_date_epoch): Prototype.
5511 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
5512 * c-common.h (c_omp_region_type): Remove trailing comma.
5513 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
5514 * c-lex.c (c_lex_with_flags): Remove initialization of
5515 pfile->source_date_epoch.
5516
00631022
JJ
55172016-05-30 Jakub Jelinek <jakub@redhat.com>
5518
5519 PR c++/71349
5520 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
5521 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
5522 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
5523 instead of C_OMP_CLAUSE_SPLIT_FOR.
5524
f17a223d
RB
55252016-05-24 Richard Biener <rguenther@suse.de>
5526
5527 PR middle-end/70434
5528 PR c/69504
5529 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
5530 (convert_vector_to_array_for_subscript): ... this.
5531 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
5532 VIEW_CONVERT_EXPR to an array type. Rename to ...
5533 (convert_vector_to_array_for_subscript): ... this.
5534
4f2e1536
MP
55352016-05-12 Marek Polacek <polacek@redhat.com>
5536
5537 PR c/70756
5538 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
5539 size_in_bytes and pass LOC to it.
5540
d6e83a8d
MM
55412016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5542
5543 PR c/43651
5544 * c.opt (Wduplicate-decl-specifier): New option.
5545
5c3a10fb
MP
55462016-05-11 Marek Polacek <polacek@redhat.com>
5547
5548 PR c++/71024
5549 * c-common.c (diagnose_mismatched_attributes): New function.
5550 * c-common.h (diagnose_mismatched_attributes): Declare.
5551
deef7113
MP
55522016-05-04 Marek Polacek <polacek@redhat.com>
5553
5554 * c.opt (Wdangling-else): New option.
5555
79ce98bc
MP
55562016-05-03 Marek Polacek <polacek@redhat.com>
5557
5558 PR c/70859
5559 * c-common.c (builtin_function_validate_nargs): Add location
5560 parameter. Use it.
5561 (check_builtin_function_arguments): Add location and arguments
5562 parameters. Use them.
5563 * c-common.h (check_builtin_function_arguments): Update declaration.
5564
381cdae4
RB
55652016-05-03 Richard Biener <rguenther@suse.de>
5566
5567 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
5568 allow call args to gimplify to SSA names.
5569
1d793c34
MP
55702016-05-03 Marek Polacek <polacek@redhat.com>
5571
5572 * c-common.h (enum c_omp_region_type): Remove stray comma.
5573
77886428
CP
55742016-05-02 Cesar Philippidis <cesar@codesourcery.com>
5575
5576 * c-common.h (enum c_omp_region_type): Define.
5577
697e0b28
RS
55782016-05-02 Richard Sandiford <richard.sandiford@arm.com>
5579
5580 * c-common.c (shorten_compare): Use wi::to_wide.
5581
e7ff0319
CP
55822016-04-29 Cesar Philippidis <cesar@codesourcery.com>
5583
5584 PR middle-end/70626
5585 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
5586 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
5587 reduction clauses in acc parallel loops.
5588
2fff3db8
MP
55892016-04-29 Marek Polacek <polacek@redhat.com>
5590
5591 PR c/70852
5592 * c-common.c (warn_for_memset): Check domain before accessing it.
5593
509063eb
DV
55942016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
5595
5596 PR/69089
5597 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
5598 "aligned" attribute.
5599
b632761d
JM
56002016-04-28 Jason Merrill <jason@redhat.com>
5601
5602 * c-lex.c (c_common_has_attribute): Handle nodiscard.
5603
174f6622
ES
56042016-04-28 Eduard Sanou <dhole@openmailbox.org>
5605 Matthias Klose <doko@debian.org>
5606
5607 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 5608 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
5609 handling.
5610 * c-common.h (get_source_date_epoch): Prototype.
5611 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
5612
6bc2bb18
RB
56132015-04-27 Ryan Burn <contact@rnburn.com>
5614
5615 PR c++/69024
5616 PR c++/68997
5617 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
5618 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
5619 external linkage.
5620 (cilk_detect_and_unwrap): Corresponding changes.
5621 (extract_free_variables): Don't extract free variables from
5622 AGGR_INIT_EXPR slot.
5623 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
5624 (cilk_recognize_spawn): Likewise.
5625
c1e1f433
BS
56262016-04-27 Bernd Schmidt <bschmidt@redhat.com>
5627
5628 * c.opt (Wmemset-elt-size): New option.
5629 * c-common.c (warn_for_memset): New function.
5630 * c-common.h (warn_for_memset): Declare.
5631
d067e05f
JM
56322016-04-25 Jason Merrill <jason@redhat.com>
5633
5634 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
5635 No longer static.
5636 * c-common.h: Declare it.
5637 * c-lex.c (c_common_has_attribute): Add maybe_unused.
5638
9aa36ae5
JM
56392016-04-22 Jason Merrill <jason@redhat.com>
5640
5641 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
5642
477d4906
IV
56432016-04-20 Ilya Verbin <ilya.verbin@intel.com>
5644
5645 PR c++/69363
5646 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
5647 * c-common.h (c_finish_cilk_clauses): Remove declaration.
5648
fe37c7af
MM
56492016-04-18 Michael Matz <matz@suse.de>
5650
5651 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
5652 and SET_DECL_ALIGN.
5653
23f2660f
EB
56542016-04-17 Eric Botcazou <ebotcazou@adacore.com>
5655
5656 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
5657 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
5658 to incomplete types.
5659 (dump_nested_type): Remove redundant tests and tidy up.
5660 (print_ada_declaration): Also set TREE_VISITED on the declaration of
5661 a type which is the typedef of an original type.
5662
1e77281b
MP
56632016-04-15 Marek Polacek <polacek@redhat.com>
5664
5665 PR c/70651
5666 * c-common.c (build_va_arg): Change two asserts into errors and return
5667 error_mark_node.
5668
b3a77f21
MP
56692016-04-13 Marek Polacek <polacek@redhat.com>
5670
5671 PR c++/70639
5672 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
5673 for switch statements, too.
5674
322b8466
JM
56752016-03-28 Jason Merrill <jason@redhat.com>
5676
5677 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
5678
fbdb6baf
MP
56792016-03-23 Marek Polacek <polacek@redhat.com>
5680
5681 PR c++/69884
5682 * c.opt (Wignored-attributes): New option.
5683
5c240f4d
DM
56842016-03-22 David Malcolm <dmalcolm@redhat.com>
5685
5686 PR c/69993
5687 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
5688 diagnostic text, reversing the order of the warning and note so
5689 that they appear in source order.
5690
14ba7b28
MP
56912016-03-17 Marek Polacek <polacek@redhat.com>
5692
5693 PR c/69407
5694 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
5695 operations.
5696
08a1cadc
JM
56972016-03-14 Jason Merrill <jason@redhat.com>
5698
2aaeea19
JM
5699 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
5700
08a1cadc
JM
5701 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
5702
c06d25bb
RB
57032016-03-09 Richard Biener <rguenther@suse.de>
5704
5705 PR c/70143
5706 * c-common.c (strict_aliasing_warning): Add back
5707 alias_sets_conflict_p check.
5708
80aac5c8
JM
57092016-03-08 Jason Merrill <jason@redhat.com>
5710
5711 * c-opts.c (set_std_cxx1z): Don't enable concepts.
5712
64b23c13
DM
57132016-03-04 David Malcolm <dmalcolm@redhat.com>
5714
5715 PR c/68187
5716 * c-indentation.c (get_visual_column): Move code to determine next
5717 tab stop to...
5718 (next_tab_stop): ...this new function.
5719 (line_contains_hash_if): Delete function.
5720 (detect_preprocessor_logic): Delete function.
5721 (get_first_nws_vis_column): New function.
5722 (detect_intervening_unindent): New function.
5723 (should_warn_for_misleading_indentation): Replace call to
5724 detect_preprocessor_logic with a call to
5725 detect_intervening_unindent.
5726
729526f5
DM
57272016-03-04 David Malcolm <dmalcolm@redhat.com>
5728
5729 PR c/68187
5730 * c-indentation.c (should_warn_for_misleading_indentation): When
5731 suppressing warnings about cases where the guard and body are on
5732 the same column, only use the first non-whitespace column in place
5733 of the guard token column when dealing with "else" clauses.
5734 When rejecting aligned BODY and NEXT, loosen the requirement
5735 from equality with the first non-whitespace of guard to simply
5736 that they not be indented relative to it.
5737
e9a35493
RB
57382016-03-04 Richard Biener <rguenther@suse.de>
5739
5740 PR c++/70054
5741 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
5742 instead of alias_sets_conflict_p.
5743
1be56bc5
MP
57442016-03-01 Marek Polacek <polacek@redhat.com>
5745
5746 PR c++/69795
5747 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
5748 any DECL.
5749
35886f0b
MS
57502016-02-22 Martin Sebor <msebor@redhat.com>
5751
5752 PR middle-end/69780
5753 * c-common.c (check_builtin_function_arguments): Validate and
5754 reject invalid arguments to __builtin_alloca_with_align.
5755
4246c8da
MW
57562016-02-20 Mark Wielaard <mjw@redhat.com>
5757
5758 PR c/28901
5759 * c.opt (Wunused-const-variable): Turn into Alias for...
5760 (Wunused-const-variable=): New option.
5761
268be88c
BE
57622016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5763
5764 PR c++/69865
5765 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
5766 here...
5767 (c_common_init_options): ...to here.
5768 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
5769
871b3f47
JJ
57702016-02-19 Jakub Jelinek <jakub@redhat.com>
5771
5772 PR c++/69826
5773 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
5774 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
5775 flag_preprocess_only.
5776
bf14eba2
JJ
57772016-02-16 Jakub Jelinek <jakub@redhat.com>
5778
5779 PR c/69835
5780 * c.opt (Wnonnull-compare): Enable for -Wall.
5781
ba6b3795
JJ
57822016-02-15 Jakub Jelinek <jakub@redhat.com>
5783
5784 PR c++/69797
5785 * c-common.c (sync_resolve_size): Diagnose too few arguments
5786 even when params is non-NULL empty vector.
5787
a011cd92
BS
57882016-02-08 Bernd Schmidt <bschmidt@redhat.com>
5789
5790 PR target/60410
5791 * c.opt (fshort-double): Remove.
5792
46cb9332
MS
57932016-02-05 Martin Sebor <msebor@redhat.com>
5794
5795 PR c++/69662
5796 * c.opt (Warning options): Update -Wplacement-new to take
5797 an optional argument.
5798
e1b81f2b
JJ
57992016-02-01 Jakub Jelinek <jakub@redhat.com>
5800
5801 PR preprocessor/69543
5802 PR c/69558
5803 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
5804 instead of loc to control_warning_option.
5805
b6adbb9f
NS
58062016-02-01 Nathan Sidwell <nathan@codesourcery.com>
5807
5808 * c.opt (fopenacc-dim=): New option.
5809
5d70666e
RB
58102016-01-27 Ryan Burn <contact@rnburn.com>
5811
5812 PR cilkplus/69267
5813 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
5814 gimplify_arg. Removed superfluous post_p argument.
5815 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
5816 superfluous post_p argument.
5817 * c-gimplify.c (c_gimplify_expr): Likewise.
5818
01e1dea3
DM
58192016-01-26 David Malcolm <dmalcolm@redhat.com>
5820
5821 PR other/69006
5822 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
5823 pp_newline_and_flush with pp_flush.
5824
9f04a53e
MS
58252016-01-20 Martin Sebor <msebor@redhat.com>
5826
5827 PR c/69405
5828 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
5829 an incompatible argument when the argument isn't a valid tree node.
5830
7f26f7df
JM
58312016-01-18 Jason Merrill <jason@redhat.com>
5832
5833 PR c++/68767
5834 * c-common.c (check_function_arguments_recurse): Fold the whole
5835 COND_EXPR, not just the condition.
5836
f62bf092
TV
58372016-01-18 Tom de Vries <tom@codesourcery.com>
5838
5839 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
5840 classify as loop clause.
5841
e0a575ff
JJ
58422016-01-15 Jakub Jelinek <jakub@redhat.com>
5843
5844 PR bootstrap/68271
5845 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
5846 C++ FE no longer has limit on number of pragmas.
5847
58482015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
5849
5850 PR c++/69048
5851 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 5852 to add missing cleanup point.
b6e3db06 5853
c7df95d8
DM
58542016-01-14 David Malcolm <dmalcolm@redhat.com>
5855
5856 PR c++/68819
5857 * c-indentation.c (get_visual_column): Add location_t param.
5858 Handle the column number being zero by effectively disabling the
5859 warning, with an "inform".
5860 (should_warn_for_misleading_indentation): Add location_t argument
5861 for all uses of get_visual_column.
5862
21efdd80
PP
58632016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
5864
5865 PR c++/69029
5866 * c-indentation.c (should_warn_for_misleading_indentation):
5867 Don't warn about do-while statements.
5868
7a127fa7
MS
58692016-01-07 Martin Sebor <msebor@redhat.com>
5870
5871 PR c/68966
5872 * c-common.c (sync_resolve_size): Reject first argument when it's
5873 a pointer to _Bool.
5874
c589e975
DM
58752016-01-05 David Malcolm <dmalcolm@redhat.com>
5876
5877 PR c/69122
5878 * c-indentation.c (get_visual_column): Remove default argument.
5879 (should_warn_for_misleading_indentation): For the multiline case,
5880 update call to get_visual_column for next_stmt_exploc so that it
5881 captures the location of the first non-whitespace character in the
5882 relevant line. Don't issue warnings if there is non-whitespace
5883 before the next statement.
5884
818ab71a
JJ
58852016-01-04 Jakub Jelinek <jakub@redhat.com>
5886
5887 Update copyright years.
5888
745e411d
DM
58892015-12-21 David Malcolm <dmalcolm@redhat.com>
5890
5891 * c-common.c (binary_op_error): Convert first param from
5892 location_t to rich_location * and use it when emitting an error.
5893 * c-common.h (binary_op_error): Convert first param from
5894 location_t to rich_location *.
5895
de67c4c3
DM
58962015-12-16 David Malcolm <dmalcolm@redhat.com>
5897
5898 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
5899 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
5900
4a38b02b
IV
59012015-12-15 Ilya Verbin <ilya.verbin@intel.com>
5902
5903 * c-common.c (c_common_attribute_table): Handle "omp declare target
5904 link" attribute.
5905
54d62f51
JJ
59062015-12-14 Jakub Jelinek <jakub@redhat.com>
5907
5908 PR c/68833
5909 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
5910
8d4227c8
TB
59112014-12-12 Tobias Burnus <burnus@net-b.de>
5912
5913 PR fortran/68815
5914 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
5915 specifiers (%d, %i,%u and %c).
5916
f6069ccc
DM
59172015-12-10 David Malcolm <dmalcolm@redhat.com>
5918
5919 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
5920
63bbf46d
JJ
59212015-12-08 Jakub Jelinek <jakub@redhat.com>
5922
5923 PR c/48088
5924 PR c/68657
5925 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
5926 * c-pragma.c (handle_pragma_diagnostic): Adjust
5927 control_warning_option caller.
5928
f79520bb
DM
59292015-12-07 David Malcolm <dmalcolm@redhat.com>
5930
5931 * c-common.c (c_cpp_error): Update for change to
5932 rich_location::set_range.
5933
b3d5bc62
JJ
59342015-12-04 Paolo Bonzini <bonzini@gnu.org>
5935
5936 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
5937 shifting 1 out of the sign bit.
5938
59392015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
5940
5941 * c-common.c (c_common_attribute_table[]): Update max arguments
5942 count for "simd" attribute.
5943 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
5944
6eb4a537
JJ
59452015-12-03 Jakub Jelinek <jakub@redhat.com>
5946
5947 PR preprocessor/57580
5948 * c-ppoutput.c (print): Change printed field to bool.
5949 Move src_file last for smaller padding.
5950 (init_pp_output): Set print.printed to false instead of 0.
5951 (scan_translation_unit): Fix up formatting. Set print.printed
5952 to true after printing something other than newline.
5953 (scan_translation_unit_trad): Set print.printed to true instead of 1.
5954 (maybe_print_line_1): Set print.printed to false instead of 0.
5955 (print_line_1): Likewise.
5956 (do_line_change): Set print.printed to true instead of 1.
5957 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
5958 dump_macro): Set print.printed to false after printing newline.
5959
4250754e
JM
59602015-12-02 Jason Merrill <jason@redhat.com>
5961
f479b43d
JM
5962 * c-common.c (fold_for_warn): New.
5963 (warn_logical_operator, warn_tautological_cmp)
5964 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
5965
4250754e
JM
5966 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
5967 (c_fully_fold_internal, decl_constant_value_for_optimization):
5968 Move to c/c-fold.c.
5969 * c-common.h: Don't declare decl_constant_value_for_optimization.
5970
e9e32ee6
JM
59712015-12-02 Joseph Myers <joseph@codesourcery.com>
5972
5973 PR c/68162
5974 * c-common.h (c_build_qualified_type): Add extra default
5975 arguments.
5976
37d5ad46
JB
59772015-12-01 Julian Brown <julian@codesourcery.com>
5978 Cesar Philippidis <cesar@codesourcery.com>
5979 James Norris <James_Norris@mentor.com>
5980
5981 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
5982 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
5983 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
5984
f07862c7
EB
59852015-11-30 Eric Botcazou <ebotcazou@adacore.com>
5986
5987 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
5988 (decl_sloc_common): Delete and move bulk of processing to...
5989 (decl_sloc): ...here.
5990 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
5991 (dump_ada_double_name): Remove S parameter and compute the suffix.
5992 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
5993 element type and deal with an anonymous one.
5994 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
5995 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
5996 and remove reference to QUAL_UNION_TYPE.
5997 (dump_nested_types): Make 2 passes on the fields and move bulk to...
5998 (dump_nested_type): ...here. New function extracted from above.
5999 Generate a full declaration for anonymous element type of arrays.
6000 (print_ada_declaration): Really skip anonymous declarations. Remove
6001 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
6002 Clean up processing of declarations of array types and objects.
6003 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
6004 Remove obsolete code and tidy up.
6005
75c8aac3
JH
60062015-11-29 Jan Hubicka <hubicka@ucw.cz>
6007
6008 PR c/67581
6009 * c-common.c (handle_transparent_union_attribute): Update
6010 also type variants.
6011
b58d3df2
ML
60122015-11-27 Martin Liska <mliska@suse.cz>
6013
6014 PR c++/68312
6015 * array-notation-common.c (cilkplus_extract_an_triplets):
6016 Release vector of vectors.
6017 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
6018
89a01fcf
EB
60192015-11-26 Eric Botcazou <ebotcazou@adacore.com>
6020
6021 PR c++/68527
6022 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
6023 (print_ada_struct_decl): Likewise.
6024
cc5c5226
IZ
60252015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
6026
6027 PR c++/68001
6028 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
6029 * cilk.c (recognize_spawn): Determine location in a more precise
6030 way.
6031
269adb9d
JM
60322015-11-19 Jason Merrill <jason@redhat.com>
6033
6034 * c-common.c (shorten_compare): But look through macros from
6035 system headers.
6036
d0eccfcd
JM
60372015-11-18 Jason Merrill <jason@redhat.com>
6038
6039 * c-common.c (shorten_compare): Don't -Wtype-limits if the
6040 non-constant operand comes from a macro.
6041
3e44547c
JM
60422015-11-17 Jason Merrill <jason@redhat.com>
6043
6044 PR bootstrap/68346
6045 * c-common.c (warn_tautological_cmp): Fold before checking for
6046 constants.
6047
0f62c7a0
MP
60482015-11-16 Marek Polacek <polacek@redhat.com>
6049
6050 PR c++/68362
6051 * c-common.c (check_case_bounds): Fold low and high cases.
6052
a868811e
MP
60532015-11-16 Marek Polacek <polacek@redhat.com>
6054
6055 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
6056 * c-common.c (c_common_get_alias_set): Likewise.
6057 (handle_visibility_attribute): Likewise.
6058
fff77217
KY
60592015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
6060
6061 * c-common.c (handle_simd_attribute): New.
6062 (struct attribute_spec): Add entry for "simd".
6063 (handle_simd_attribute): New.
6064
269e63b7
KT
60652015-11-13 Kai Tietz <ktietz70@googlemail.com>
6066
6067 * c-lex.c (interpret_float): Use fold_convert.
6068
ebedc9a3
DM
60692015-11-13 David Malcolm <dmalcolm@redhat.com>
6070
6071 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
6072 and store it on the result.
6073 * c-opts.c (c_common_init_options): Set
6074 global_dc->colorize_source_p.
6075
6e232ba4
JN
60762015-11-12 James Norris <jnorris@codesourcery.com>
6077 Joseph Myers <joseph@codesourcery.com>
6078
7365279f 6079 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
6080 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
6081 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
6082 PRAGMA_OACC_CLAUSE_LINK.
6083
e78bede6
MP
60842015-11-11 Marek Polacek <polacek@redhat.com>
6085
6086 PR c/68107
6087 PR c++/68266
6088 * c-common.c (valid_array_size_p): New function.
6089 * c-common.h (valid_array_size_p): Declare.
6090
3f8257db 60912015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
6092
6093 PR bootstrap/68271
6094 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
6095
69f293c9
AM
60962015-11-11 Andrew MacLeod <amacleod@redhat.com>
6097
6098 * array-notation-common.c: Remove unused header files.
6099 * c-ada-spec.c: Likewise.
6100 * c-cilkplus.c: Likewise.
6101 * c-common.c: Likewise.
6102 * c-cppbuiltin.c: Likewise.
6103 * c-dump.c: Likewise.
6104 * c-format.c: Likewise.
6105 * c-gimplify.c: Likewise.
6106 * c-indentation.c: Likewise.
6107 * c-lex.c: Likewise.
6108 * c-omp.c: Likewise.
6109 * c-opts.c: Likewise.
6110 * c-pch.c: Likewise.
6111 * c-ppoutput.c: Likewise.
6112 * c-pragma.c: Likewise.
6113 * c-pretty-print.c: Likewise.
6114 * c-semantics.c: Likewise.
6115 * c-ubsan.c: Likewise.
6116 * cilk.c: Likewise.
6117 * stub-objc.c: Likewise.
6118
3a40d81d
NS
61192015-11-09 Thomas Schwinge <thomas@codesourcery.com>
6120 Cesar Philippidis <cesar@codesourcery.com>
6121 James Norris <jnorris@codesourcery.com>
6122 Julian Brown <julian@codesourcery.com>
6123 Nathan Sidwell <nathan@codesourcery.com>
6124
6125 * c-pragma.c (oacc_pragmas): Add "routine".
6126 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
6127
ee45a32d
EB
61282015-11-08 Eric Botcazou <ebotcazou@adacore.com>
6129
6130 * c-common.c (c_common_attributes): Add scalar_storage_order.
6131 (handle_scalar_storage_order_attribute): New function.
6132 * c-pragma.c (global_sso): New variable.
6133 (maybe_apply_pragma_scalar_storage_order): New function.
6134 (handle_pragma_scalar_storage_order): Likewise.
6135 (init_pragma): Register scalar_storage_order.
6136 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
6137 * c.opt (Wscalar-storage-order): New warning.
6138 (fsso-struct=): New option.
6139
eb11eb15
MS
61402015-11-08 Martin Sebor <msebor@redhat.com>
6141
6142 * c.opt (Wplacement-new): Add a period to the end of a sentence.
6143
0aad0198
RS
61442015-11-07 Richard Sandiford <richard.sandiford@arm.com>
6145
6146 * c-common.c: Don't undef DEF_BUILTIN.
6147
8a645150
DM
61482015-11-06 David Malcolm <dmalcolm@redhat.com>
6149
6150 * c-common.c (c_cpp_error): Convert parameter from location_t to
6151 rich_location *. Eliminate the "column_override" parameter and
6152 the call to diagnostic_override_column.
6153 Update the "done_lexing" clause to set range 0
6154 on the rich_location, rather than overwriting a location_t.
6155 * c-common.h (c_cpp_error): Convert parameter from location_t to
6156 rich_location *. Eliminate the "column_override" parameter.
6157
7a5e4956
CP
61582015-11-05 Cesar Philippidis <cesar@codesourcery.com>
6159 Thomas Schwinge <thomas@codesourcery.com>
6160 James Norris <jnorris@codesourcery.com>
6161
6162 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
6163 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
6164 clauses with parallel and kernels and loops.
6165 * c-pragma.h (enum pragma_omp_clause): Add entries for
6166 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
6167 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
6168 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
6169 INDEPENDENT,SEQ}.
6170 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
6171
e2f5cc96
MS
61722015-11-05 Martin Sebor <msebor@redhat.com>
6173
6174 PR c++/67942
6175 * c.opt (-Wplacement-new): New option.
6176
e01d41e5
JJ
61772015-11-05 Jakub Jelinek <jakub@redhat.com>
6178
6179 * c-common.h (c_finish_omp_atomic): Add TEST argument.
6180 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
6181 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
6182 save_expr or create_tmp_var* if TEST is true.
6183 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
6184 Don't call add_stmt here.
6185 (struct c_omp_check_loop_iv_data): New type.
6186 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
6187 c_omp_check_loop_iv_exprs): New functions.
6188 (c_omp_split_clauses): Adjust for lastprivate being allowed on
6189 distribute.
6190 (c_omp_declare_simd_clauses_to_numbers): Change
6191 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
6192 (c_omp_declare_simd_clauses_to_decls): Similarly change those
6193 from numbers to PARM_DECLs.
6194
595278be
MM
61952015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
6196
6197 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
6198 flag_checking.
6199
3f8257db 62002015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
6201
6202 PR c++-common/67882
b3d5bc62
JJ
6203 * c-common.h (fold_offsetof_1): Add argument.
6204 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
6205 offsetof expressions that reference elements past the end of
6206 an array.
6207
4bf9e5a8
TS
62082015-11-03 Thomas Schwinge <thomas@codesourcery.com>
6209 Chung-Lin Tang <cltang@codesourcery.com>
6210
6211 * c-pragma.c (oacc_pragmas): Add "atomic".
6212 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
6213
3b1661a9
ES
62142015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
6215
6216 * c-common.c (handle_target_clones_attribute): New.
6217 (c_common_attribute_table): Add handle_target_clones_attribute.
6218 (handle_always_inline_attribute): Add check on target_clones attribute.
6219 (handle_target_attribute): Ditto.
6220
2adfab87
AM
62212015-10-29 Andrew MacLeod <amacleod@redhat.com>
6222
6223 * array-notation-common.c: Reorder #include's and remove duplicates.
6224 * c-ada-spec.c: Likewise.
6225 * c-cilkplus.c: Likewise.
6226 * c-common.c: Likewise.
6227 * c-cppbuiltin.c: Likewise.
6228 * c-dump.c: Likewise.
6229 * c-format.c: Likewise.
6230 * c-gimplify.c: Likewise.
6231 * c-indentation.c: Likewise.
6232 * c-lex.c: Likewise.
6233 * c-omp.c: Likewise.
6234 * c-opts.c: Likewise.
6235 * c-pch.c: Likewise.
6236 * c-ppoutput.c: Likewise.
6237 * c-pragma.c: Likewise.
6238 * c-pretty-print.c: Likewise.
6239 * c-semantics.c: Likewise.
6240 * c-ubsan.c: Likewise.
6241 * cilk.c: Likewise.
6242 * stub-objc.c: Likewise.
6243
d90ec4f2
JM
62442015-10-28 Jason Merrill <jason@redhat.com>
6245
6246 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
6247
88bae6f4
TS
62482015-10-27 Thomas Schwinge <thomas@codesourcery.com>
6249 James Norris <jnorris@codesourcery.com>
6250 Cesar Philippidis <cesar@codesourcery.com>
6251
6252 PR c/64765
6253 PR c/64880
6254 * c-common.h (c_oacc_split_loop_clauses): Declare function.
6255 * c-omp.c (c_oacc_split_loop_clauses): New function.
6256
b1726d6c
MS
62572015-10-21 Martin Sebor <msebor@redhat.com>
6258
6259 PR driver/68043
6260 * c.opt: End each sentence that describes an option with a period.
6261
fa60eeb9
MP
62622015-10-20 Marek Polacek <polacek@redhat.com>
6263
6264 * array-notation-common.c (is_cilkplus_vector_p): Define.
6265 * c-common.h (is_cilkplus_vector_p): Declare.
6266
95979049
MP
62672015-10-20 Marek Polacek <polacek@redhat.com>
6268
6269 * c.opt (std=gnu++11): Do not describe as experimental.
6270 (std=gnu++14): Likewise.
6271
2a9fb712
JM
62722015-10-19 Jason Merrill <jason@redhat.com>
6273
6274 * c-cppbuiltin.c (c_cpp_builtins): Define
6275 __cpp_nontype_template_args.
6276
13b380a3
JM
62772015-10-19 Jason Merrill <jason@redhat.com>
6278
6279 * c-cppbuiltin.c (c_cpp_builtins): Define
6280 __cpp_enumerator_attributes, __cpp_fold_expressions,
6281 __cpp_unicode_characters.
6282
d9a6bd32
JJ
62832015-10-13 Jakub Jelinek <jakub@redhat.com>
6284 Aldy Hernandez <aldyh@redhat.com>
6285
6286 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
6287 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
6288 (c_define_builtins): Likewise.
6289 * c-common.h (enum c_omp_clause_split): Add
6290 C_OMP_CLAUSE_SPLIT_TASKLOOP.
6291 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
6292 (c_finish_omp_for): Add ORIG_DECLV argument.
6293 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
6294 201511 instead of 201307.
6295 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
6296 OMP_CRITICAL_CLAUSES to it.
6297 (c_finish_omp_ordered): Add CLAUSES argument, set
6298 OMP_ORDERED_CLAUSES to it.
6299 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
6300 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
6301 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
6302 constructs and new OpenMP 4.5 clauses. Clear
6303 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
6304 verification code.
6305 * c-pragma.c (omp_pragmas_simd): Add taskloop.
6306 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
6307 (enum pragma_omp_clause): Add
6308 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
6309 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
6310
624d31fe
RS
63112015-10-05 Richard Sandiford <richard.sandiford@arm.com>
6312
6313 * c-lex.c (interpret_float): Use real_equal instead of
6314 REAL_VALUES_EQUAL.
6315
b8fd7909
JM
63162015-10-04 Jason Merrill <jason@redhat.com>
6317
6318 Implement N4514, C++ Extensions for Transactional Memory.
6319 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
6320 (c_common_attribute_table): Add transaction_safe_dynamic.
6321 transaction_safe now affects type identity.
6322 (handle_tm_attribute): Handle transaction_safe_dynamic.
6323 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
6324 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
6325 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
6326 (D_TRANSMEM): New.
6327 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
6328 * c-pretty-print.c (pp_c_attributes_display): Don't print
6329 transaction_safe in C++.
6330
12651878
MP
63312015-10-02 Marek Polacek <polacek@redhat.com>
6332
6333 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
6334
3e3b8d63
MP
63352015-10-02 Marek Polacek <polacek@redhat.com>
6336
6337 PR c/64249
6338 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
6339 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
6340 * c.opt (Wduplicated-cond): New option.
6341
0d1a8f75
JM
63422015-10-01 Joseph Myers <joseph@codesourcery.com>
6343
6344 * c.opt (std=c11): Do not describe as experimental.
6345 (std=gnu11): Likewise.
6346 (std=iso9899:2011): Likewise.
6347
3e32ee19
NS
63482015-09-28 Nathan Sidwell <nathan@codesourcery.com>
6349
6350 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
6351 (DEF_FUNCTION_TYPE_VAR_11): Delete.
6352
974348ee
MP
63532015-09-25 Marek Polacek <polacek@redhat.com>
6354
6355 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
6356 (ubsan_instrument_shift): Likewise.
6357
15dbc1a6
MP
63582015-09-25 Marek Polacek <polacek@redhat.com>
6359
6360 PR sanitizer/64906
6361 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
6362
6b95d7cc
PP
63632015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
6364
6365 * c-indentation.c (should_warn_for_misleading_indentation):
6366 Compare next_stmt_vis_column with guard_line_first_nws instead
6367 of with guard_line_vis_column.
6368
c1822f9c
MLI
63692015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
6370
6371 PR c/49654
6372 PR c/49655
6373 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
6374 options and options not valid for the current language.
6375
d5398058
PP
63762015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
6377
6378 * c-indentation.c (should_warn_for_misleading_indentation):
6379 Float out and consolidate the calls to get_visual_column that
6380 are passed guard_exploc as an argument. Compare
6381 next_stmt_vis_column with guard_line_first_nws instead of with
6382 body_line_first_nws.
6383
6b333269
NS
63842015-09-22 Nathan Sidwell <nathan@codesourcery.com>
6385
6386 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
6387 Wnamespaces): New C++ warnings.
6388
a75f1574
JM
63892015-09-22 Jason Merrill <jason@redhat.com>
6390
6391 * c-common.h (abi_compat_version_crosses): New.
6392 (warn_abi_version): Declare.
6393 * c-common.c: Define it.
6394 * c-opts.c (c_common_post_options): Handle it.
6395 flag_abi_compat_version defaults to 8.
6396
bdaaa8b7
VV
63972015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
6398
6399 Complete the implementation of N4230, Nested namespace definition.
6400 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
6401 __cpp_nested_namespace_definitions.
6402
eaa797e8
MLI
64032015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6404
6405 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
6406
c4914de6
MLI
64072015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6408
6409 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
6410 when warning.
6411 * c-pragma.h (pragma_lex): Add optional loc argument.
6412
fcb87c50
MM
64132015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
6414
6415 * c-format.c (check_format_arg): Adjust to use common block size in all
6416 object pools.
6417
31bdd08a
DM
64182015-09-15 David Malcolm <dmalcolm@redhat.com>
6419
6420 * c-format.c (location_from_offset): Update for change in
6421 signature of location_get_source_line.
6422 * c-indentation.c (get_visual_column): Likewise.
6423 (line_contains_hash_if): Likewise.
6424
aa9f4b4c
MP
64252015-09-14 Marek Polacek <polacek@redhat.com>
6426
6427 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
6428 setting various warnings.
6429
aa256c4a
MP
64302015-09-14 Marek Polacek <polacek@redhat.com>
6431
6432 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
6433 a negative value.
6434
0f876f22
MW
64352015-09-11 Mark Wielaard <mjw@redhat.com>
6436
6437 PR c/28901
6438 * c.opt (Wunused-variable): Option from common.opt.
6439 (Wunused-const-variable): New option.
6440
273aa49e
PC
64412015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
6442
6443 PR c++/53184
6444 * c.opt ([Wsubobject-linkage]): Add.
6445
1807ffc1
MS
64462015-09-03 Martin Sebor <msebor@redhat.com>
6447
6448 PR c/66516
6449 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
6450 functions.
6451 * c-common.c (reject_gcc_builtin): Define.
6452
38942840
BI
64532015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
6454
6455 PR middle-end/60586
6456 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
6457 prototype.
6458 * c-gimplify.c (c_gimplify_expr): Added a call to the function
6459 cilk_gimplify_call_params_in_spawned_fn.
6460 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
6461 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
6462 unwrapping.
6463
c316b5e4
MP
64642015-08-25 Marek Polacek <polacek@redhat.com>
6465
6466 PR middle-end/67330
6467 * c-common.c (handle_weak_attribute): Don't check whether the
6468 visibility can be changed here.
6469
584a7c46
MLI
64702015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
6471
6472 * c-lex.c (c_lex_with_flags): Use explicit locations.
6473
a79683d5
TS
64742015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
6475
6476 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
6477 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
6478
61717a45
FXC
64792015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
6480
6481 PR middle-end/36757
6482 * c-common.c (check_builtin_function_arguments): Add check
6483 for BUILT_IN_SIGNBIT argument.
6484
329524f5
PC
64852015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
6486
6487 PR c++/67160
6488 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
6489 in c++1z mode.
6490
4ee55665
MP
64912015-08-17 Marek Polacek <polacek@redhat.com>
6492
6493 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
6494 with whitespaces before qualifier names.
6495
b893e375
MP
64962015-08-12 Marek Polacek <polacek@redhat.com>
6497
6498 PR c++/55095
6499 * c-common.c (maybe_warn_shift_overflow): Properly handle
6500 left-shifting 1 into the sign bit.
6501
c2d89095
MLI
65022015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6503
6504 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
6505
971e17ff
AS
65062015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
6507 Braden Obrzut <admin@maniacsvault.net>
6508 Jason Merrill <jason@redhat.com>
6509
6510 Add C++ Concepts TS support.
6511 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
6512 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
6513 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
6514 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
6515 * c-opts.c (set_std_cxx1z): Set flag_concepts.
6516 * c.opt (fconcepts): New.
6517
b3d5bc62
JJ
65182015-08-02 Martin Sebor <msebor@redhat.com>
6519
6520 * c.opt (-Wframe-address): New warning option.
6521
8ebca419
PP
65222015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6523
6524 * c-indentation.c (should_warn_for_misleading_indentation):
6525 Improve heuristics.
6526
1a1e101f
PP
65272015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6528
6529 * c-indentation.c (get_visual_column): Add parameter first_nws,
6530 use it. Update comment documenting the function.
6531 (is_first_nonwhitespace_on_line): Remove.
6532 (should_warn_for_misleading_indentation): Replace usage of
6533 of is_first_nonwhitespace_on_line with get_visual_column.
6534
992118a1
PP
65352015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6536
6537 * c-indentation.h (struct token_indent_info): Define.
6538 (get_token_indent_info): Define.
6539 (warn_for_misleading_information): Declare.
6540 * c-common.h (warn_for_misleading_information): Remove.
6541 * c-identation.c (warn_for_misleading_indentation):
6542 Change declaration to take three token_indent_infos. Adjust
6543 accordingly.
6544 * c-identation.c (should_warn_for_misleading_indentation):
6545 Likewise. Bail out early if the body is a compound statement.
6546 (guard_tinfo_to_string): Define.
6547
e8fa3817
JM
65482015-07-30 Jason Merrill <jason@redhat.com>
6549
6550 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
6551 '*' for reference decay.
6552
173864e8
MP
65532015-07-30 Marek Polacek <polacek@redhat.com>
6554
6555 * c-common.c (warn_tautological_cmp): Bail for float types.
6556
f2afe6dd
MP
65572015-07-27 Marek Polacek <polacek@redhat.com>
6558
6559 PR bootstrap/67030
6560 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
6561
05b28fd6
MP
65622015-07-27 Marek Polacek <polacek@redhat.com>
6563
6564 PR c++/66555
6565 PR c/54979
6566 * c-common.c (find_array_ref_with_const_idx_r): New function.
6567 (warn_tautological_cmp): New function.
6568 * c-common.h (warn_tautological_cmp): Declare.
6569 * c.opt (Wtautological-compare): New option.
6570
5a5062b8
MP
65712015-07-23 Marek Polacek <polacek@redhat.com>
6572
6573 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
6574 (ubsan_instrument_shift): Likewise.
6575
dc891fe7
MP
65762015-07-23 Marek Polacek <polacek@redhat.com>
6577
6578 PR sanitizer/66908
6579 * c-ubsan.c: Include gimplify.h.
6580 (ubsan_instrument_division): Unshare OP0 and OP1.
6581 (ubsan_instrument_shift): Likewise.
6582
451b5e48
MP
65832015-07-20 Marek Polacek <polacek@redhat.com>
6584 Richard Sandiford <richard.sandiford@arm.com>
6585
6586 PR c++/55095
6587 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
6588 Use EXPR_LOC_OR_LOC.
6589 (maybe_warn_shift_overflow): New function.
6590 * c-common.h (maybe_warn_shift_overflow): Declare.
6591 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
6592 * c.opt (Wshift-overflow): New option.
6593
fb0b2914
ML
65942015-07-16 Martin Liska <mliska@suse.cz>
6595
6596 * c-format.c (static void check_format_info_main): Use
6597 object_allocator instead of pool_allocator.
6598 (check_format_arg): Likewise.
6599 (check_format_info_main): Likewise.
6600
903f5c23
AM
66012015-07-15 Andrew MacLeod <amacleod@redhat.com>
6602
6603 * c-opts.c: Remove multiline #include comment.
6604
026c3cfd
AH
66052015-07-12 Aldy Hernandez <aldyh@redhat.com>
6606
6607 * c-common.c: Fix double word typos.
6608
bb49ee66
EB
66092015-07-10 Eric Botcazou <ebotcazou@adacore.com>
6610
6611 * c-ada-spec.h (cpp_operation): Revert latest change.
6612 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
6613 constructors and destructors.
6614
1916bcb5
AM
66152015-07-09 Andrew MacLeod <amacleod@redhat.com>
6616
6617 * c-common.h: Adjust includes for flags.h changes.
6618 * stub-objc.c: Likewise.
026c3cfd 6619
a9dcd529
EB
66202015-07-08 Eric Botcazou <ebotcazou@adacore.com>
6621
6622 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
6623 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
6624
b03b462f
JJ
66252015-07-08 Jakub Jelinek <jakub@redhat.com>
6626
6627 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
6628 are to be removed, return NULL rather than original clauses list.
6629
c7131fb2
AM
66302015-07-07 Andrew MacLeod <amacleod@redhat.com>
6631
6632 * array-notation-common.c: Adjust includes.
6633 * c-ada-spec.c: Likewise.
6634 * c-cilkplus.c: Likewise.
6635 * c-common.h: Likewise.
6636 * c-cppbuiltin.c: Likewise.
6637 * c-dump.c: Likewise.
6638 * c-format.c: Likewise.
6639 * c-gimplify.c: Likewise.
6640 * c-indentation.c: Likewise.
6641 * c-lex.c: Likewise.
6642 * c-omp.c: Likewise.
6643 * c-opts.c: Likewise.
6644 * c-pch.c: Likewise.
6645 * c-ppoutput.c: Likewise.
6646 * c-pragma.c: Likewise.
6647 * c-pretty-print.c: Likewise.
6648 * c-semantics.c: Likewise.
6649 * c-ubsan.c: Likewise.
6650 * cilk.c: Likewise.
6651 * stub-objc.c: Likewise.
6652
2a7fb83f
EB
66532015-07-07 Eric Botcazou <ebotcazou@adacore.com>
6654
6655 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
6656 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
6657
a03c9bf1
JM
66582015-07-01 Jason Merrill <jason@redhat.com>
6659
36a85135
JM
6660 * c-common.h (D_CXX11): Rename from D_CXX0X.
6661 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
6662 * c-common.c: Adjust.
6663
e7fa68d5
JM
6664 * c-opts.c (c_common_post_options): Default to C++14.
6665
a03c9bf1
JM
6666 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
6667
fe95b036
ESR
66682015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
6669
6670 Implement N4197 - Adding u8 character literals
b3d5bc62 6671 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 6672 CPP_CHAR.
b3d5bc62 6673 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 6674 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 6675 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
6676 and CPP_UTF8CHAR tokens.
6677 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 6678
da2e71c9
MLI
66792015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6680
6681 PR fortran/66605
6682 * c-common.c (do_warn_unused_parameter): Move here.
6683 * c-common.h (do_warn_unused_parameter): Declare.
6684
b155cfd9
MP
66852015-06-29 Marek Polacek <polacek@redhat.com>
6686
6687 PR c/66322
6688 * c-common.c (check_case_bounds): Add bool * parameter. Set
6689 OUTSIDE_RANGE_P.
6690 (c_add_case_label): Add bool * parameter. Pass it down to
6691 check_case_bounds.
6692 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
6693 warning here.
6694 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
6695 declarations.
6696
31521951
MP
66972015-06-27 Marek Polacek <polacek@redhat.com>
6698
6699 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
6700 or VECTOR_INTEGER_TYPE_P throughout.
6701 * c-gimplify.c: Likewise.
6702
22d03525
MP
67032015-06-26 Marek Polacek <polacek@redhat.com>
6704
6705 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
6706 * c-common.c (c_fully_fold_internal): Likewise.
6707 (c_alignof_expr): Likewise.
6708 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
6709 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 6710 * cilk.c (create_parm_list): Likewise.
22d03525 6711
af05e6e5
MP
67122015-06-26 Marek Polacek <polacek@redhat.com>
6713
6714 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
6715
f0889939
AM
67162015-06-25 Andrew MacLeod <amacleod@redhat.com>
6717
6718 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
6719 * c-gimplify.c: Likewise.
6720 * c-pragma.c: Likewise.
6721 * c-ubsan.c: Likewise.
6722 * cilk.c: Likewise.
6723
ca752f39
RS
67242015-06-25 Richard Sandiford <richard.sandiford@arm.com>
6725
6726 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
6727 ggc_hasher.
6728
16a16ec7
AM
67292015-06-25 Andrew MacLeod <amacleod@redhat.com>
6730
6731 * cilk.c: Move calls.h after tm.h in the include chain.
6732
0ae9bd27
MP
67332015-06-25 Marek Polacek <polacek@redhat.com>
6734
6735 * array-notation-common.c: Use VAR_P throughout.
6736 * c-ada-spec.c: Likewise.
6737 * c-common.c: Likewise.
6738 * c-format.c: Likewise.
6739 * c-gimplify.c: Likewise.
6740 * c-omp.c: Likewise.
6741 * c-pragma.c: Likewise.
6742 * c-pretty-print.c: Likewise.
6743 * cilk.c: Likewise.
6744
62f9079a
MP
67452015-06-25 Marek Polacek <polacek@redhat.com>
6746
6747 * cilk.c (extract_free_variables): Use is_global_var.
6748
0fa16060
RS
67492015-06-23 Richard Sandiford <richard.sandiford@arm.com>
6750
6751 * c-common.c: Don't include target-def.h.
6752
a68ae2e1
MP
67532015-06-23 Marek Polacek <polacek@redhat.com>
6754
6755 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
6756 when comparing INTEGER_CSTs.
6757
c6a2f2d9
PMR
67582015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
6759
6760 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
6761 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
6762 (dump_ada_template): Skip partially specialized types.
6763
6b4db501
MM
67642015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
6765
6766 * c-common.c (scalar_to_vector): Use std::swap instead of manually
6767 swapping.
6768
abb226c9
AM
67692015-06-17 Andrew MacLeod <amacleod@redhat.com>
6770
6771 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
6772 * c-ada-spec.c: Likewise.
6773 * c-cilkplus.c: Likewise.
6774 * c-common.c: Likewise.
6775 * c-common.h: Likewise.
6776 * c-cppbuiltin.c: Likewise.
6777 * c-dump.c: Likewise.
6778 * c-format.c: Likewise.
6779 * c-gimplify.c: Likewise.
6780 * c-indentation.c: Likewise.
6781 * c-lex.c: Likewise.
6782 * c-omp.c: Likewise.
6783 * c-opts.c: Likewise.
6784 * c-pch.c: Likewise.
6785 * c-ppoutput.c: Likewise.
6786 * c-pragma.c: Likewise.
6787 * c-pretty-print.c: Likewise.
6788 * c-semantics.c: Likewise.
6789 * c-ubsan.c: Likewise.
6790 * cilk.c: Likewise.
6791 * stub-objc.c: Likewise.
6792
076fecad
PP
67932015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
6794
6795 PR c++/65168
6796 * c-common.c (c_common_truthvalue_conversion): Warn when
6797 converting an address of a reference to a truth value.
6798
13fdf2e2
AM
67992015-06-08 Andrew MacLeod <amacleod@redhat.com>
6800
6801 * array-notation-common.c : Adjust include files.
6802 * c-ada-spec.c : Likewise.
6803 * c-cilkplus.c : Likewise.
6804 * c-common.c : Likewise.
6805 * c-common.h : Likewise.
6806 * c-cppbuiltin.c : Likewise.
6807 * c-dump.c : Likewise.
6808 * c-format.c : Likewise.
6809 * c-gimplify.c : Likewise.
6810 * c-indentation.c : Likewise.
6811 * c-lex.c : Likewise.
6812 * c-omp.c : Likewise.
6813 * c-opts.c : Likewise.
6814 * c-pch.c : Likewise.
6815 * c-ppoutput.c : Likewise.
6816 * c-pragma.c : Likewise.
6817 * c-pretty-print.c : Likewise.
6818 * c-semantics.c : Likewise.
6819 * c-ubsan.c : Likewise.
6820 * cilk.c : Likewise.
6821 * stub-objc.c : Likewise.
6822
a1661b90
MP
68232015-06-08 Marek Polacek <polacek@redhat.com>
6824
6825 PR c/66415
6826 * c-format.c (location_from_offset): Return LOC if LINE is null.
6827
d7438551
AH
68282015-06-05 Aldy Hernandez <aldyh@redhat.com>
6829
6830 * c-common.h (c_parse_final_cleanups): New prototype.
6831 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
6832
b3d5bc62
JJ
68332015-06-04 Sriraman Tallam <tmsriram@google.com>
6834
6835 * c-common.c (noplt): New attribute.
6836 (handle_noplt_attribute): New handler.
6837
ecb9f223
AM
68382015-06-04 Andrew MacLeod <amacleod@redhat.com>
6839
6840 * array-notation-common.c: Adjust includes for restructured coretypes.h.
6841 * c-ada-spec.c: Likewise.
6842 * c-cilkplus.c: Likewise.
6843 * c-common.c: Likewise.
6844 * c-common.h: Likewise.
6845 * c-cppbuiltin.c: Likewise.
6846 * c-dump.c: Likewise.
6847 * c-format.c: Likewise.
6848 * c-gimplify.c: Likewise.
6849 * c-indentation.c: Likewise.
6850 * c-lex.c: Likewise.
6851 * c-omp.c: Likewise.
6852 * c-opts.c: Likewise.
6853 * c-pch.c: Likewise.
6854 * c-ppoutput.c: Likewise.
6855 * c-pragma.c: Likewise.
6856 * c-pretty-print.c: Likewise.
6857 * c-semantics.c: Likewise.
6858 * c-ubsan.c: Likewise.
6859 * cilk.c: Likewise.
6860 * stub-objc.c: Likewise.
6861
6ac48155
DM
68622015-06-02 David Malcolm <dmalcolm@redhat.com>
6863
6864 PR c/66220:
6865 * c-indentation.c (should_warn_for_misleading_indentation): Use
6866 expand_location rather than expand_location_to_spelling_point.
6867 Don't warn if the guarding statement is more indented than the
6868 next/body stmts.
6869
773ce42e
DM
68702015-06-02 David Malcolm <dmalcolm@redhat.com>
6871
6872 * c-indentation.c (warn_for_misleading_indentation): Bail out
6873 immediately if -Wmisleading-indentation isn't enabled.
6874
4fef8379
ML
68752015-06-01 Martin Liska <mliska@suse.cz>
6876
6877 * c-format.c (check_format_arg):Use new type-based pool allocator.
6878 (check_format_info_main) Likewise.
6879
1edfb384
EB
68802015-05-31 Eric Botcazou <ebotcazou@adacore.com>
6881
6882 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
6883 (has_nontrivial_methods): Likewise.
6884
9677ef52
MP
68852015-05-25 Marek Polacek <polacek@redhat.com>
6886
6887 * c-ubsan.c (ubsan_instrument_shift): Use type0.
6888
fd5c817a
MP
68892015-05-22 Marek Polacek <polacek@redhat.com>
6890
6891 PR c/47043
6892 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
6893
a2f45fe6 68942015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
6895
6896 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
6897 STACK_GROWS_DOWNWARD.
6898
a2f45fe6 68992015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
6900
6901 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
6902 STACK_GROWS_DOWNWARD rather than if it is defined.
6903
0fee2ac2 69042015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 6905
0fee2ac2
MLI
6906 PR c/52952
6907 * c-format.c (location_column_from_byte_offset): New.
6908 (location_from_offset): New.
6909 (struct format_wanted_type): Add offset_loc field.
6910 (check_format_info): Move handling of location for extra arguments
6911 closer to the point of warning.
6912 (check_format_info_main): Pass the result of location_from_offset
6913 to warning_at.
6914 (format_type_warning): Pass the result of location_from_offset
6915 to warning_at.
6916
cf4ef6f7
MP
69172015-05-20 Marek Polacek <polacek@redhat.com>
6918
6919 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
6920
3a65ee74
MP
69212015-05-20 Marek Polacek <polacek@redhat.com>
6922
6923 * c-ada-spec.c (dump_sloc): Use DECL_P.
6924
21b634ae
MP
69252015-05-20 Marek Polacek <polacek@redhat.com>
6926
6927 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
6928 * c-common.c: Likewise.
6929
0e50b624
DM
69302015-05-19 David Malcolm <dmalcolm@redhat.com>
6931
6932 * c-common.h (fe_file_change): Strengthen param from
6933 const line_map * to const line_map_ordinary *.
6934 (pp_file_change): Likewise.
6935 * c-lex.c (fe_file_change): Likewise.
6936 (cb_define): Use linemap_check_ordinary when invoking
6937 SOURCE_LINE.
6938 (cb_undef): Likewise.
6939 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
6940 invoking cb_file_change.
6941 (c_finish_options): Likewise.
6942 (push_command_line_include): Likewise.
6943 (cb_file_change): Strengthen param "new_map" from
6944 const line_map * to const line_map_ordinary *.
6945 * c-ppoutput.c (cb_define): Likewise for local "map".
6946 (pp_file_change): Likewise for param "map" and local "from".
6947
fab27f52
MM
69482015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
6949
6950 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
6951
2fe1d762
TV
69522015-05-18 Tom de Vries <tom@codesourcery.com>
6953
6954 * c-common.c (build_va_arg_1): New function.
6955 (build_va_arg): Add address operator to va_list operand if necessary.
6956
7a37fa90
MM
69572015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
6958
6959 PR c/48956
6960 * c-common.c (int_safely_convertible_to_real_p): Define.
6961 (unsafe_conversion_p): Check conversions involving complex types.
6962 (conversion_warning): Add new warning message for conversions which
6963 discard imaginary component.
6964 * c-common.h: (enum conversion_safety): Add new enumerator for such
6965 conversions.
6966
3aa3c9fc
MP
69672015-05-14 Marek Polacek <polacek@redhat.com>
6968
6969 PR c/66066
6970 PR c/66127
6971 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
6972 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
6973 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
6974 use it. If FOR_INT_CONST, require that all evaluated operands be
6975 INTEGER_CSTs.
6976
c3388e62
DM
69772015-05-12 David Malcolm <dmalcolm@redhat.com>
6978
6979 * c-common.h (warn_for_misleading_indentation): New prototype.
6980 * c-indentation.c: New file.
6981 * c.opt (Wmisleading-indentation): New option.
6982
c7b38fd5
TV
69832015-05-12 Tom de Vries <tom@codesourcery.com>
6984
6985 PR tree-optimization/66010
6986 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
6987
381bf11e
JM
69882015-05-09 Jason Merrill <jason@redhat.com>
6989
edff0c06
JM
6990 * c-opts.c (c_common_post_options): Also clear
6991 cpp_opts->cpp_warn_cxx11_compat.
6992
129211bc
JM
6993 * c-common.h (enum cxx_dialect): Add cxx_unset.
6994 * c-common.c (cxx_dialect): Initialize to cxx_unset.
6995 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
6996
381bf11e
JM
6997 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
6998 (std=gnu++0x): Mark as Undocumented.
6999 (std=gnu++1y): Add deprecated message.
7000
fe191308
JM
70012015-05-08 Jason Merrill <jason@redhat.com>
7002
765189ff
JM
7003 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
7004 * c-opts.c: Adjust.
7005
fe191308
JM
7006 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
7007
755e528f
MP
70082015-05-08 Marek Polacek <polacek@redhat.com>
7009
7010 PR c/64918
7011 * c.opt (Woverride-init-side-effects): New option.
7012
0173bd2a
MP
70132015-05-07 Marek Polacek <polacek@redhat.com>
7014
7015 PR c/65179
7016 * c-common.c (c_fully_fold_internal): Warn when left shifting a
7017 negative value.
7018 * c.opt (Wshift-negative-value): New option.
7019 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
7020 when -Wextra and C99/C++11 mode.
7021
e0f0d3b9
MP
70222015-05-07 Marek Polacek <polacek@redhat.com>
7023 Martin Uecker <uecker@eecs.berkeley.edu>
7024
7025 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
7026 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
7027
8243e2a9
JM
70282015-05-05 Jason Merrill <jason@redhat.com>
7029
7030 * c.opt (Wterminate): New.
7031
577cd070
MP
70322015-04-30 Marek Polacek <polacek@redhat.com>
7033
7034 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
7035 require that the non-constant be of a boolean type.
7036
0373796b
JT
70372015-04-29 Josh Triplett <josh@joshtriplett.org>
7038
e0f0d3b9
MP
7039 * c-common.c (handle_section_attribute): Refactor to reduce
7040 nesting and distinguish between error cases.
0373796b 7041
716c0ba6
MP
70422015-04-29 Marek Polacek <polacek@redhat.com>
7043
7044 PR c/64610
7045 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
7046 with 0/1.
7047
8848828b
JJ
70482015-04-29 Jakub Jelinek <jakub@redhat.com>
7049
7050 * c-common.h (omp_clause_mask): Unconditionally define as a class.
7051 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
7052 HOST_BITS_PER_WIDE_INT.
7053
ecd0e562
TV
70542015-04-28 Tom de Vries <tom@codesourcery.com>
7055
7056 PR tree-optimization/65887
7057 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
7058
2a877204 70592015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 7060 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
7061
7062 * c-ada-spec.c (in_function): Delete.
7063 (dump_generic_ada_node): Do not change in_function and remove the
7064 redundant code dealing with it.
7065 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
7066 (print_ada_methods): Output the static member functions in a nested
7067 package after the regular methods as well as associated renamings.
7068
4853031e
MP
70692015-04-24 Marek Polacek <polacek@redhat.com>
7070
7071 PR c/65830
7072 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
7073 and OPT_Wshift_count_overflow.
7074
8c2b7f79
MP
7075 PR c/63357
7076 * c-common.c (warn_logical_operator): Warn if the operands have the
7077 same expressions.
7078
b8787813
MP
70792015-04-24 Marek Polacek <polacek@redhat.com>
7080
7081 PR c/61534
7082 * c-common.c (warn_logical_operator): Bail if either operand comes
7083 from a macro expansion.
7084
8fba1830
BRF
70852015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
7086
7087 PR target/55143
7088 * c-common.c (c_default_pointer_mode): Add definition.
7089 * c-common.h (c_default_pointer_mode): Add declaration.
7090
17958621
JJ
70912015-03-11 Jakub Jelinek <jakub@redhat.com>
7092
7093 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
7094 on record_builtin_type argument.
7095
7ccb1a11
JJ
70962015-03-10 Jakub Jelinek <jakub@redhat.com>
7097
7098 PR c/65120
7099 * c-common.c (warn_logical_not_parentheses): Don't warn for
7100 !x == 0 or !x != 0.
7101
04fd785e
MP
71022015-03-07 Marek Polacek <polacek@redhat.com>
7103
7104 PR sanitizer/65280
7105 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
7106 before trying to figure out whether we have a flexible array member.
7107
a4e26206 71082015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 7109 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
7110
7111 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
7112
0d2489f4
EB
71132015-03-05 Eric Botcazou <ebotcazou@adacore.com>
7114
7115 PR ada/65319
7116 * c-ada-spec.c (print_destructor): Remove obsolete code.
7117
83ed54d7
EB
71182015-03-01 Eric Botcazou <ebotcazou@adacore.com>
7119
7120 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
7121 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
7122 DECL_TEMPLATE_RESULT emulations.
7123 (dump_ada_template)): Add guard for TYPE_METHODS.
7124
7631f0e2
MP
71252015-02-27 Marek Polacek <polacek@redhat.com>
7126
7127 PR c/65040
7128 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
7129
d1783ae5
KT
71302015-02-27 Kai Tietz <ktietz@redhat.com>
7131
7132 PR c/35330
7133 * c-pragma.c (handle_pragma_weak): Do not try to create
7134 weak/alias of declarations not being function, or variable
7135 declarations.
7136
56a9f6bc
TS
71372015-02-24 Thomas Schwinge <thomas@codesourcery.com>
7138
7139 PR libgomp/64625
7140 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
7141 Remove macros.
7142 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
7143
3d5cb23d
MP
71442015-02-16 Marek Polacek <polacek@redhat.com>
7145
7146 PR c/65066
7147 * c-format.c (check_format_types): Handle null param.
7148
fa008882
MP
71492015-02-13 Marek Polacek <polacek@redhat.com>
7150
7151 PR c/65040
7152 * c-format.c (check_format_types): Don't warn about different
7153 signedness if the original value is in the range of WANTED_TYPE.
7154
785f21af
JM
71552015-02-12 Jason Merrill <jason@redhat.com>
7156
7157 PR c++/64956
7158 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
7159 to the current highest version.
7160 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
7161
4886ec8e
JJ
71622015-02-04 Jakub Jelinek <jakub@redhat.com>
7163
7164 PR c/64824
7165 PR c/64868
7166 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
7167 instead of RDIV_EXPR. Use build_binary_op instead of
7168 build2_loc.
7169
40fecdd6
JM
71702015-01-30 Joseph Myers <joseph@codesourcery.com>
7171
7172 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
7173 to pass input_location as first argument.
7174
a0c88d06
TV
71752015-01-23 Tom de Vries <tom@codesourcery.com>
7176
7177 PR libgomp/64672
7178 * c.opt (fopenacc): Mark as LTO option.
7179
1506ae0e
TV
71802015-01-23 Tom de Vries <tom@codesourcery.com>
7181
7182 PR libgomp/64707
7183 * c.opt (fopenmp): Mark as LTO option.
7184
31be63ab
JJ
71852015-01-21 Jakub Jelinek <jakub@redhat.com>
7186
7187 PR c/63307
b1726d6c 7188 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
7189 (compare_decls): Fix up formatting.
7190
71912015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
7192
7193 PR c/63307
7194 * cilk.c: Include vec.h.
7195 (struct cilk_decls): New structure.
7196 (wrapper_parm_cb): Split this function to...
7197 (fill_decls_vec): ...this...
7198 (create_parm_list): ...and this.
7199 (compare_decls): New function.
7200 (for_local_cb): Remove.
7201 (wrapper_local_cb): Ditto.
7202 (build_wrapper_type): For now first traverse and fill vector of
7203 declarations then sort it and then deal with sorted vector.
7204 (cilk_outline): Ditto.
7205 (declare_one_free_variable): Ditto.
7206
6875457f
JM
72072015-01-21 Jason Merrill <jason@redhat.com>
7208
7209 PR c++/64629
7210 * c-format.c (check_format_arg): Call decl_constant_value.
7211
185c9e56
ML
72122015-01-19 Martin Liska <mliska@suse.cz>
7213
7214 * c-common.c (handle_noicf_attribute): New function.
7215
41dbbb37
TS
72162015-01-15 Thomas Schwinge <thomas@codesourcery.com>
7217 Bernd Schmidt <bernds@codesourcery.com>
7218 James Norris <jnorris@codesourcery.com>
7219 Cesar Philippidis <cesar@codesourcery.com>
7220 Ilmir Usmanov <i.usmanov@samsung.com>
7221 Jakub Jelinek <jakub@redhat.com>
7222
7223 * c.opt (fopenacc): New option.
7224 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
7225 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
7226 New macros.
7227 * c-common.h (c_finish_oacc_wait): New prototype.
7228 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
7229 (c_finish_oacc_wait): New function.
7230 * c-pragma.c (oacc_pragmas): New variable.
7231 (c_pp_lookup_pragma, init_pragma): Handle it.
7232 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
7233 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
7234 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
7235 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
7236 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
7237 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
7238 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
7239 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
7240 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
7241 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
7242 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
7243 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
7244 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
7245 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
7246 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
7247 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
7248 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
7249 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
7250 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
7251 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
7252 PRAGMA_OACC_CLAUSE_WORKER.
7253
3f8257db 72542015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
7255
7256 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
7257 for the new option fstack-protector_explicit.
7258 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
7259 (handle_stack_protect_attribute): New function.
7260
3f8257db 72612015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
7262
7263 * c.opt: New option -Warray-bounds=.
7264
adfac8df
JJ
72652015-01-09 Michael Collison <michael.collison@linaro.org>
7266
7267 * array-notation-common.c: Include hash-set.h, machmode.h,
7268 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7269 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
7270 * c-ada-spec.c: Ditto.
7271 * c-cilkplus.c: Ditto.
7272 * c-common.c: Include input.h due to flattening of tree.h.
7273 Define macro GCC_C_COMMON_C.
7274 * c-common.h: Flatten tree.h header files into c-common.h.
7275 Remove include of tree-core.h.
7276 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
7277 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7278 fold-const.h, wide-int.h, and inchash.h due to
7279 flattening of tree.h.
7280 * c-dump.c: Ditto.
7281 * c-format.c: Flatten tree.h header files into c-common.h.
7282 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
7283 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7284 fold-const.h, wide-int.h, and inchash.h due to
7285 flattening of tree.h.
7286 * c-dump.c: Include hash-set.h, machmode.h,
7287 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7288 fold-const.h, wide-int.h, and inchash.h due to
7289 flattening of tree.h.
7290 * c-format.c: Include hash-set.h, machmode.h,
7291 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7292 fold-const.h, wide-int.h, inchash.h and real.h due to
7293 flattening of tree.h.
7294 * c-gimplify.c: Include hash-set.h, machmode.h,
7295 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7296 fold-const.h, wide-int.h, and inchash.h due to
7297 flattening of tree.h.
7298 * cilk.c: Ditto.
7299 * c-lex.c: Ditto.
7300 * c-omp.c: Ditto.
7301 * c-opts.c: Ditto.
7302 * c-pch.c: Ditto.
7303 * c-ppoutput.c: Ditto.
7304 * c-pragma.c: Ditto.
7305 * c-pretty-print.c: Ditto.
7306 * c-semantics.c: Ditto.
7307 * c-ubsan.c: Ditto.
7308 * stub-objc.c: Ditto.
7309
f5481fc4
JM
73102015-01-08 Jason Merrill <jason@redhat.com>
7311
7312 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
7313 do_ubsan_in_current_function.
7314 (ubsan_maybe_instrument_reference_or_call): Likewise.
7315 * c-ubsan.h: Declare it.
7316
de35aa66
MS
73172015-01-08 Mike Stump <mikestump@comcast.net>
7318
7319 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
7320
4a9a42ab
MP
73212015-01-07 Marek Polacek <polacek@redhat.com>
7322
7323 PR c/64440
7324 * c-common.c (c_fully_fold_internal): Warn for division and modulo
7325 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
7326
2f42e5de
TS
73272015-01-05 Trevor Saunders <tsaunders@mozilla.com>
7328
7329 PR c++/31397
7330 * c.opt (Wsuggest-override): New option.
7331
5624e564
JJ
73322015-01-05 Jakub Jelinek <jakub@redhat.com>
7333
7334 Update copyright years.
7335
5bd012f8
MP
73362015-01-05 Marek Polacek <polacek@redhat.com>
7337
7338 PR c/64423
7339 * c-common.c (warn_array_subscript_with_type_char): Add location_t
7340 parameter. Use it.
7341 * c-common.h (warn_array_subscript_with_type_char): Update
7342 declaration.
7343
a7fa8d18
ESR
73442014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
7345
7346 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
7347 Control macro with flag_sized_deallocation.
7348
3f8257db 73492014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
7350
7351 * c.opt (Wdiscarded-array-qualifiers): New option.
7352
1f8d3e84
JJ
73532014-12-19 Jakub Jelinek <jakub@redhat.com>
7354
7355 PR preprocessor/63831
7356 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
7357 and __has_cpp_attribute here.
7358 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
7359 c_common_has_attribute.
7360 * c-common.h (c_common_has_attribute): New prototype.
7361 * c-lex.c (init_c_lex): Set cb->has_attribute to
7362 c_common_has_attribute instead of cb_has_attribute.
7363 (get_token_no_padding): New function.
7364 (cb_has_attribute): Renamed to ...
7365 (c_common_has_attribute): ... this. No longer static. Use
7366 get_token_no_padding, require ()s, don't build TREE_LIST
7367 unnecessarily, fix up formatting, adjust diagnostics, call
7368 init_attributes.
7369
20b06add
JM
73702014-12-15 Jason Merrill <jason@redhat.com>
7371
7372 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
7373 (-Wsized-deallocation): New.
7374 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
7375 to on in C++14 and up.
7376
94a073b2
JM
73772014-12-11 Jason Merrill <jason@redhat.com>
7378
acaa5911
JM
7379 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
7380
94a073b2
JM
7381 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
7382 we aren't complaining about VLAs.
7383
7fb66c15
MP
73842014-12-06 Marek Polacek <polacek@redhat.com>
7385
7386 PR tree-optimization/64183
7387 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
7388 shift-expression if it is integer_type_node. Use types_compatible_p.
7389
b731b390
JJ
73902014-11-29 Jakub Jelinek <jakub@redhat.com>
7391
7392 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
7393 last argument from create_tmp_var_raw and create_tmp_var calls.
7394 * cilk.c (gimplify_cilk_spawn): Likewise.
7395 * c-omp.c (c_finish_omp_atomic): Likewise.
7396
6a4da643
MP
73972014-11-28 Marek Polacek <polacek@redhat.com>
7398
7399 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
7400 instead of unsigned_type_node.
7401
541e35a6
MP
74022014-11-28 Marek Polacek <polacek@redhat.com>
7403
7404 PR c/63862
7405 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
7406 to op1_utype.
7407 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
7408 expression to unsigned_type_node.
7409
dcc97066
MW
74102014-11-20 Mark Wielaard <mjw@redhat.com>
7411
7412 PR debug/38757
7413 * c-opts.c (set_std_c89): Set lang_hooks.name.
7414 (set_std_c99): Likewise.
7415 (set_std_c11): Likewise.
7416 (set_std_cxx98): Likewise.
7417 (set_std_cxx11): Likewise.
7418 (set_std_cxx14): Likewise.
7419 (set_std_cxx1z): Likewise.
7420
aa7da51a
JJ
74212014-11-21 Jakub Jelinek <jakub@redhat.com>
7422
7423 PR target/63764
7424 * c-common.h (convert_vector_to_pointer_for_subscript): Change
7425 return type to bool.
009a3480 7426 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
7427 (convert_vector_to_pointer_for_subscript): Change return type to
7428 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
7429 and copy it into a TARGET_EXPR and use that instead of *vecp
7430 directly.
7431
538dd0b7
DM
74322014-11-19 David Malcolm <dmalcolm@redhat.com>
7433
7434 Merger of git branch "gimple-classes-v2-option-3".
7435 * ChangeLog.gimple-classes: New.
7436 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
7437 from being just a vec<gimple> to a vec<gbind *>.
7438
c39a5e99
JJ
74392014-11-18 Jakub Jelinek <jakub@redhat.com>
7440
7441 PR sanitizer/63813
7442 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
7443 argument to ptype, set type to TREE_TYPE (ptype). Don't call
7444 get_pointer_alignment for non-pointers. Use ptype, or if it is
7445 reference type, corresponding pointer type, as type of kind
7446 argument.
7447 (ubsan_maybe_instrument_reference,
7448 ubsan_maybe_instrument_member_call): Adjust callers.
7449
8537a4a9
MP
74502014-11-15 Marek Polacek <polacek@redhat.com>
7451
7452 PR middle-end/63884
7453 * array-notation-common.c (is_sec_implicit_index_fn): Return false
7454 for NULL fndecl.
7455 (extract_array_notation_exprs): Return for NULL node.
7456
2079956a
JM
74572014-11-12 Joseph Myers <joseph@codesourcery.com>
7458
7459 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
7460 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
7461
1304953e
JJ
74622014-11-12 Jakub Jelinek <jakub@redhat.com>
7463
7464 PR c/59708
7465 * c-common.c (check_builtin_function_arguments): Handle
7466 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
7467
e5e44252
AK
74682014-11-10 Andi Kleen <ak@linux.intel.com>
7469
7470 PR c/60804
7471 * c-common.h (check_no_cilk): Declare.
7472 * cilk.c (get_error_location): New function.
7473 (check_no_cilk): Dito.
7474
e64b984d
AK
74752014-11-10 Andi Kleen <ak@linux.intel.com>
7476
7477 * cilk.c (recognize_spawn): Use expression location
7478 for error message.
7479
13c21655
PC
74802014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
7481
7482 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
7483
42fd12b1
ESR
74842014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
7485
7486 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
7487 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
7488 (__cpp_range_based_for, __cpp_initializer_lists,
7489 __cpp_delegating_constructors, __cpp_nsdmi,
7490 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
7491 for C++11; (__cpp_attribute_deprecated): Remove in favor of
7492 __has_cpp_attribute.
7493 * c-lex.c (cb_has_attribute): New callback CPP function;
7494 (init_c_lex): Set has_attribute callback.
7495
6f450181
RB
74962014-11-04 Richard Biener <rguenther@suse.de>
7497
7498 * c-common.c (shorten_compare): Do not shorten mixed
7499 DFP and non-DFP compares.
7500
26f0e1d6
ESR
75012014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
7502
7503 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
7504 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
7505 Commentary and rearrangement of tests.
7506 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
7507 Commentary and rearrangement of tests.
ab20d992 7508 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
26f0e1d6
ESR
7509 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
7510
ef4bddc2
RS
75112014-10-29 Richard Sandiford <richard.sandiford@arm.com>
7512
7513 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
7514 enum from machine_mode.
7515
c582198b
AM
75162014-10-28 Andrew MacLeod <amacleod@redhat.com>
7517
adfac8df
JJ
7518 * c-common.c: Adjust include files.
7519 * c-gimplify.c: Ditto.
7520 * cilk.c: Ditto.
7521 * c-pragma.c: Ditto.
7522 * c-ubsan.c: Ditto.
c582198b 7523
60393bbc
AM
75242014-10-27 Andrew MacLeod <amacleod@redhat.com>
7525
7526 * c-gimplify.c: Adjust include files.
7527
d723bb7c
MLI
75282014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
7529
7530 PR c++/53061
7531 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
7532 c_common_initialize_diagnostics.
7533 * c-common.h: Likewise.
7534
90f3520e
MP
75352014-10-24 Marek Polacek <polacek@redhat.com>
7536
7537 PR c/56980
7538 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
7539 print "struct"/"union"/"enum" for typedefed names.
7540
59d7607a
MP
75412014-10-23 Marek Polacek <polacek@redhat.com>
7542
7543 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
7544 in unsigned type.
7545
d95a2703
JJ
75462014-10-22 Jakub Jelinek <jakub@redhat.com>
7547 Yury Gribov <y.gribov@samsung.com>
7548
7549 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
7550 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
7551 instead of flag_sanitize_recover as bool flag.
7552
8e6ef852
KY
75532014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
7554
7555 * cilk.c: Revert previous change.
7556
948cf550
IZ
75572014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
7558
7559 PR c/63307
7560 * cilk.c: Include vec.h.
7561 (struct cilk_decls): New structure.
7562 (wrapper_parm_cb): Split this function to...
7563 (fill_decls_vec): ...this...
7564 (create_parm_list): ...and this.
7565 (compare_decls): New function.
7566 (for_local_cb): Remove.
7567 (wrapper_local_cb): Ditto.
7568 (build_wrapper_type): For now first traverse and fill vector of
7569 declarations then sort it and then deal with sorted vector.
7570 (cilk_outline): Ditto.
7571 (declare_one_free_variable): Ditto.
7572
92574c7c
MP
75732014-10-17 Marek Polacek <polacek@redhat.com>
7574
7575 * c-opts.c (c_common_post_options): Set warn_implicit_int.
7576 * c.opt (Wimplicit-int): Initialize to -1.
7577
83685514
AM
75782014-10-16 Andrew MacLeod <amacleod@redhat.com>
7579
7580 * c-pragma.c: Adjust include files.
7581 * c-semantics.c: Likewise.
7582
5b8300ea
DD
75832014-10-16 DJ Delorie <dj@redhat.com>
7584
7585 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
7586 multiples of bytes.
7587
5f83e90b
JM
75882014-10-14 Jason Merrill <jason@redhat.com>
7589
7590 PR c++/63455
7591 * c-common.h (CPP_PREPARSED_EXPR): New.
7592 (N_CP_TTYPES): Adjust.
7593
d73326ca
MP
75942014-10-15 Marek Polacek <polacek@redhat.com>
7595
7596 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
7597
78a7c317
DD
75982014-10-14 DJ Delorie <dj@redhat.com>
7599
7600 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
7601 types, not just __int128.
7602 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
7603 types, not just __int128.
7604 (cpp_atomic_builtins): Round pointer sizes up.
7605 (type_suffix): Use type precision, not specific types.
7606 * c-common.c (c_common_reswords): Remove __int128 special case.
7607 (c_common_type_for_size): Check for all __intN types, not just
7608 __int128.
7609 (c_common_type_for_mode): Likewise.
7610 (c_common_signed_or_unsigned_type): Likewise.
7611 (c_build_bitfield_integer_type): Likewise.
7612 (c_common_nodes_and_builtins): Likewise.
7613 (keyword_begins_type_specifier): Likewise.
7614 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
7615 __intN variants.
7616
2a22f99c
TS
76172014-10-12 Trevor Saunders <tsaunders@mozilla.com>
7618
7619 * c-common.c: Use hash_table instead of hashtab.
7620
2a8ef767
ESR
76212014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
7622
adfac8df 7623 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
7624 C++11 section.
7625
3c9aabbd
MG
76262014-10-03 Marc Glisse <marc.glisse@inria.fr>
7627
7628 PR c++/54427
7629 PR c++/57198
7630 PR c++/58845
7631 * c-common.c (warn_logical_operator): Punt for vectors.
7632
a15f7cb8
ESR
76332014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
7634
7635 Implement SD-6: SG10 Feature Test Recommendations
7636 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
7637 macros and the __has_header macro.
7638
8d0cf15e
JM
76392014-09-30 Jason Merrill <jason@redhat.com>
7640
dd5d5481
JM
7641 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
7642 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
7643 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
7644
b752325e
JM
7645 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
7646 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
7647
8d0cf15e
JM
7648 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
7649 * c-common.c (c_common_reswords): Remove __is_convertible_to.
7650
083e891e
MP
76512014-09-24 Marek Polacek <polacek@redhat.com>
7652
7653 PR c/61405
7654 PR c/53874
7655 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
7656
7861b648
AK
76572014-09-23 Andi Kleen <ak@linux.intel.com>
7658
7659 * c-common.c (handle_no_reorder_attribute): New function.
7660 (c_common_attribute_table): Add no_reorder attribute.
7661
9a79452d
JM
76622014-09-22 Joseph Myers <joseph@codesourcery.com>
7663
7664 * c-cppbuiltin.c (c_cpp_builtins): Define
7665 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
7666 modes.
7667
dd69f047
JM
76682014-09-18 Joseph Myers <joseph@codesourcery.com>
7669
7670 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
7671 for supported floating-point modes.
7672
737a4826
MLI
76732014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
7674
7675 * c.opt (Wpsabi): Use LangEnabledBy.
7676 * c-opts.c (c_common_handle_option): Do not handle here.
7677
8cc4b7a2
JM
76782014-09-12 Joseph Myers <joseph@codesourcery.com>
7679
7680 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
7681 macros for floating-point modes.
7682
179b5a55
MG
76832014-09-11 Marc Glisse <marc.glisse@inria.fr>
7684
7685 PR target/58757
7686 * c-cppbuiltin.c (builtin_define_float_constants): Correct
7687 __*_DENORM_MIN__ without denormals.
7688
570a11fe
JJ
76892014-09-10 Jakub Jelinek <jakub@redhat.com>
7690
7691 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
7692 ubsan_instrument_vla, ubsan_instrument_return): Adjust
7693 ubsan_create_data callers.
7694 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
7695 index is constant or BIT_AND_EXPR with constant mask and is
7696 small enough for the bound.
7697 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
7698 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
7699
b559c810
MLI
77002014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7701
7702 * c.opt: Add CppReason to various flags.
7703 (Wdate-time): Re-sort.
7704 * c-common.c: Include c-common.h earlier.
7705 (struct reason_option_codes_t): Delete.
7706 (c_option_controlling_cpp_error): Prefix global type and struct
7707 with cpp_.
7708
1ef33fd4
MLI
77092014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7710
7711 * c.opt (Wnormalized): New.
7712 (Wnormalized=): Use Enum and Reject Negative.
7713 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
7714
66bb34c0
JM
77152014-09-08 Joseph Myers <joseph@codesourcery.com>
7716
7717 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
7718 digits of floating-point modes if -fbuilding-libgcc.
7719
53d68b9f
JM
77202014-09-05 Joseph Myers <joseph@codesourcery.com>
7721
7722 * c-cppbuiltin.c (c_cpp_builtins): Also define
7723 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
7724 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
7725 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
7726 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
7727 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
7728 __LIBGCC_STACK_GROWS_DOWNWARD__,
7729 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
7730 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
7731 __LIBGCC_DWARF_FRAME_REGISTERS__,
7732 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
7733 __LIBGCC_STACK_POINTER_REGNUM__ and
7734 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
7735 (builtin_define_with_value): Handle backslash-escaping in string
7736 macro values.
7737
f65586dc
RB
77382014-09-05 Richard Biener <rguenther@suse.de>
7739
7740 PR middle-end/63148
7741 * c-format.c (check_format_arg): Properly handle
7742 effectively signed POINTER_PLUS_EXPR offset.
7743
2b71f4a4
MLI
77442014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
7745
7746 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
7747 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
7748 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
7749 and Init.
7750 * c-opts.c (c_common_handle_option): Do not handle here.
7751 (sanitize_cpp_opts): Likewise.
7752 * c-common.c (struct reason_option_codes_t): Handle
7753 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
7754
d2e4feca
MP
77552014-09-03 Marek Polacek <polacek@redhat.com>
7756
7757 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
7758
9a771876
JJ
77592014-09-02 Jakub Jelinek <jakub@redhat.com>
7760 Balaji V. Iyer <balaji.v.iyer@intel.com>
7761 Igor Zamyatin <igor.zamyatin@intel.com>
7762
7763 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
7764 * c-common.c (c_common_reswords): Added _Cilk_for.
7765 * c-common.h (enum rid): Added RID_CILK_FOR.
7766 (cilk_for_number_of_iterations): Add declaration.
7767 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
7768 CILK_FOR.
7769 * c-pragma.c (init_pragma): Register "grainsize" pragma.
7770 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
7771
81b5d104
MLI
77722014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7773
7774 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
7775 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
7776 Wundef): Use CPP, Var and Init.
7777 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
7778
b753b37b
MLI
77792014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7780
7781 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
7782 * c-opts.c (c_common_handle_option): Do not handle here.
7783
028aee17
JM
77842014-08-25 Jason Merrill <jason@redhat.com>
7785
7786 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
7787 -std=c++14 and -std=gnu++14, rather than the reverse.
7788 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
7789 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
7790 * c-common.h (cxx_dialect): Remove cxx1y.
7791
e4276ba5
ESR
77922014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
7793
7794 * c-common.h (enum cxx_dialect): Add cxx14.
7795 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
7796 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
7797 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
7798
a545cacd
JM
77992014-08-22 Jason Merrill <jason@redhat.com>
7800
7801 * c.opt (std=gnu++17): Fix alias.
7802
59ea0364
MP
78032014-08-22 Marek Polacek <polacek@redhat.com>
7804
7805 PR c++/62199
7806 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
7807 check for vector types. Drop LHS argument.
7808 * c-common.h (warn_logical_not_parentheses): Adjust.
7809
596e808c
MLI
78102014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
7811
7812 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
7813 (Wmultichar): Likewise.
7814 (Wdate-time): Use C-family languages instead of Common. Use CPP
7815 and Var.
7816 * c-opts.c (c_common_handle_option): Do not handle the above
7817 options here.
7818 (sanitize_cpp_opts): Likewise.
7819
18767f65
MLI
78202014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
7821
7822 PR fortran/44054
7823 * c-opts.c: Include tree-diagnostics.h.
7824 (c_diagnostic_finalizer): New.
7825 (c_common_initialize_diagnostics): Use it.
7826
b4413594
MLI
78272014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
7828
7829 PR preprocessor/51303
7830 * c-common.c (struct reason_option_codes_t option_codes):
7831 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
7832
43f9a13c
MLI
78332014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
7834
7835 PR c/60975
7836 PR c/53063
7837 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
7838 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
7839 (c_common_post_options): Call init_global_opts_from_cpp.
7840 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
7841
04159acf
MP
78422014-08-19 Marek Polacek <polacek@redhat.com>
7843
7844 PR c++/62153
7845 * c-common.c (maybe_warn_bool_compare): New function.
7846 * c-common.h (maybe_warn_bool_compare): Declare.
7847 * c.opt (Wbool-compare): New option.
7848
35aff4fb
MP
78492014-08-19 Marek Polacek <polacek@redhat.com>
7850
7851 * c.opt (Wc99-c11-compat): New option.
7852
177cce46
MP
78532014-08-19 Marek Polacek <polacek@redhat.com>
7854
7855 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
7856 to warn_c90_c99_compat.
7857 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
7858 to -1.
7859
6ae9194f
MLI
78602014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
7861 Steven Bosscher <steven@gcc.gnu.org>
7862
7863 PR c/52952
7864 * c-format.c: Add extra_arg_loc and format_string_loc to struct
7865 format_check_results.
7866 (check_function_format): Use true and add comment for boolean
7867 argument.
7868 (finish_dollar_format_checking): Use explicit location when warning.
7869 (check_format_info): Likewise.
7870 (check_format_arg): Set extra_arg_loc and format_string_loc.
7871 (check_format_info_main): Use explicit location when warning.
7872 (check_format_types): Pass explicit location.
7873 (format_type_warning): Likewise.
7874
8e54f6d3
MLI
78752014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
7876
7877 PR fortran/44054
7878 * c-format.c: Handle Fortran flags.
7879
cd4e76fc
IZ
78802014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
7881
7882 PR other/61962
7883 * array-notation-common.c (find_rank): Added handling for other
7884 types of references.
7885
f3bede71
MP
78862014-08-10 Marek Polacek <polacek@redhat.com>
7887
7888 PR c/51849
7889 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
7890 * c.opt (Wc90-c99-compat): Add option.
7891
9f25a338
TS
78922014-08-07 Trevor Saunders <tsaunders@mozilla.com>
7893
7894 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
7895
62e4eb35
MP
78962014-08-03 Marek Polacek <polacek@redhat.com>
7897
ab20d992 7898 * c-common.c (check_case_value): Add location_t parameter. Use it.
62e4eb35
MP
7899 (c_add_case_label): Pass loc to check_case_value.
7900
b787e7a2
TS
79012014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7902
7903 * cilk.c: Use hash_map instead of pointer_map.
7904
6e2830c3
TS
79052014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7906
7907 * c-gimplify.c: Use hash_set instead of pointer_set.
7908
a7ee52fb
IZ
79092014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
7910
7911 PR middle-end/61455
7912 * array-notation-common.c (extract_array_notation_exprs): Handling
7913 of DECL_EXPR added.
7914
944fa280
JJ
79152014-08-01 Jakub Jelinek <jakub@redhat.com>
7916
7917 * c-common.h (min_align_of_type): Removed prototype.
7918 * c-common.c (min_align_of_type): Removed.
7919 * c-ubsan.h (ubsan_maybe_instrument_reference,
7920 ubsan_maybe_instrument_member_call): New prototypes.
7921 * c-ubsan.c: Include stor-layout.h and builtins.h.
7922 (ubsan_maybe_instrument_reference_or_call,
7923 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
7924 functions.
7925
b4dfdc11
MG
79262014-07-31 Marc Glisse <marc.glisse@inria.fr>
7927
7928 PR c++/60517
7929 * c.opt (-Wreturn-local-addr): Move to common.opt.
7930
a41844e5
JM
79312014-07-30 Jason Merrill <jason@redhat.com>
7932
7933 PR c++/61659
7934 PR c++/61687
7935 Revert:
7936 * c.opt (-fuse-all-virtuals): New.
7937
976d5a22
TT
79382014-07-30 Tom Tromey <tromey@redhat.com>
7939
7940 PR c/59855
7941 * c.opt (Wdesignated-init): New option.
7942 * c-common.c (c_common_attribute_table): Add "designated_init".
7943 (handle_designated_init): New function.
7944
cdc94aca
MP
79452014-07-24 Marek Polacek <polacek@redhat.com>
7946
7947 PR c/57653
7948 * c-opts.c (c_finish_options): If -imacros is in effect, return.
7949
f41373b6
DS
79502014-07-16 Dodji Seketeli <dodji@redhat.com>
7951
7952 PR preprocessor/60723 - missing system-ness marks for macro tokens
7953 * c-ppoutput.c (struct print::prev_was_system_token): New data
7954 member.
7955 (init_pp_output): Initialize it.
7956 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
7957 (do_line_change): Return a flag saying if a line marker was
7958 emitted or not.
7959 (scan_translation_unit): Detect if the system-ness of the token we
7960 are about to emit is different from the one of the previously
7961 emitted token. If so, emit a line marker. Avoid emitting useless
7962 adjacent line markers. Avoid emitting line markers for tokens
7963 originating from the expansion of built-in macros.
7964 (scan_translation_unit_directives_only): Adjust.
7965
4d661eaa
MP
79662014-07-15 Marek Polacek <polacek@redhat.com>
7967
7968 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
7969 TYPE_MAX_VALUE is NULL.
7970
b108f48f
JJ
79712014-07-14 Jakub Jelinek <jakub@redhat.com>
7972
7973 PR middle-end/61294
7974 * c.opt (Wmemset-transposed-args): New warning.
7975
c0221884
JM
79762014-07-10 Jason Merrill <jason@redhat.com>
7977
7978 PR c++/61659
7979 PR c++/61687
7980 * c.opt (-fuse-all-virtuals): New.
7981
63dfbb95
RB
79822014-07-09 Richard Biener <rguenther@suse.de>
7983
7984 PR c-family/61741
7985 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
7986 using unsigned arithmetic if overflow does not wrap instead of
7987 if overflow is undefined.
7988
773ec47f
MP
79892014-07-06 Marek Polacek <polacek@redhat.com>
7990
7991 PR c/6940
7992 * c.opt (Wsizeof-array-argument): New option.
7993
00a7ba58
JJ
79942014-07-03 Jakub Jelinek <jakub@redhat.com>
7995
b1726d6c 7996 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
7997 comments->count <= 1, as comments->entries might be NULL.
7998
52ec0ea3
MP
79992014-07-01 Marek Polacek <polacek@redhat.com>
8000
8001 * c.opt (Wint-conversion): New option.
8002
d5c3d343
MP
80032014-07-01 Marek Polacek <polacek@redhat.com>
8004
8005 PR c/58286
8006 * c.opt (Wincompatible-pointer-types): New option.
8007
6e7ceb17
PC
80082014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
8009
8010 PR c++/51400
8011 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
8012 Do not discard TYPE_QUALS of type.
8013
da73100b
JM
80142014-06-26 Jason Merrill <jason@redhat.com>
8015
8016 * c-common.h (enum cxx_dialect): Add cxx1z.
8017 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
8018 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
8019
08eedf75
TJ
80202014-06-26 Teresa Johnson <tejohnson@google.com>
8021
8022 * c-common.h (get_dump_info): Declare.
8023 * c-gimplify.c (c_genericize): Use saved dump files.
8024 * c-opts.c (c_common_parse_file): Begin and end dumps
8025 once around parsing invocation.
8026 (get_dump_info): New function.
8027
7b56b2f8
MP
80282014-06-23 Marek Polacek <polacek@redhat.com>
8029 Andrew MacLeod <amacleod@redhat.com>
8030
8031 PR c/61553
8032 * c-common.c (get_atomic_generic_size): Don't segfault if the
8033 type doesn't have a size.
8034
0e37a2f3
MP
80352014-06-20 Marek Polacek <polacek@redhat.com>
8036
8037 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
8038 (ubsan_walk_array_refs_r): New function.
8039 (c_genericize): Instrument array bounds.
8040 * c-ubsan.c: Include "internal-fn.h".
8041 (ubsan_instrument_division): Mark instrumented arrays as having
8042 side effects. Adjust ubsan_type_descriptor call.
8043 (ubsan_instrument_shift): Likewise.
8044 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
8045 (ubsan_instrument_bounds): New function.
8046 (ubsan_array_ref_instrumented_p): New function.
8047 (ubsan_maybe_instrument_array_ref): New function.
8048 * c-ubsan.h (ubsan_instrument_bounds): Declare.
8049 (ubsan_array_ref_instrumented_p): Declare.
8050 (ubsan_maybe_instrument_array_ref): Declare.
8051
80522014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
8053
8054 PR lto/61123
8055 * c.opt (fshort-enums): Add to LTO.
8056 * c.opt (fshort-wchar): Likewise.
8057
5c3d09f7
MP
80582014-06-16 Marek Polacek <polacek@redhat.com>
8059
8060 PR c/60439
8061 * c.opt (Wswitch-bool): Add Var.
8062
9cf32741
JJ
80632014-06-12 Jakub Jelinek <jakub@redhat.com>
8064
8065 PR middle-end/61486
8066 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
8067 #pragma omp target teams or
8068 #pragma omp {,target }teams distribute simd.
8069
62984918
JM
80702014-06-12 Jason Merrill <jason@redhat.com>
8071
8072 * c.opt (Wabi=, fabi-compat-version): New.
8073 * c-opts.c (c_common_handle_option): Handle -Wabi=.
8074 (c_common_post_options): Handle flag_abi_compat_version default.
8075 Disallow -fabi-compat-version=1.
8076 * c-common.h (abi_version_crosses): New.
8077
f961457f
JH
80782014-06-11 Jan Hubicka <hubicka@ucw.cz>
8079
adfac8df 8080 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
8081 section names that are no longer trees.
8082
92d28cbb
JJ
80832014-06-10 Jakub Jelinek <jakub@redhat.com>
8084
8085 PR fortran/60928
8086 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
8087 (omp_pragmas): ... back here.
8088
742938c9
MP
80892014-06-05 Marek Polacek <polacek@redhat.com>
8090
8091 PR c/49706
8092 * c-common.c (warn_logical_not_parentheses): New function.
8093 * c-common.h (warn_logical_not_parentheses): Declare.
8094 * c.opt (Wlogical-not-parentheses): New option.
8095
9d548dfb
MP
80962014-06-04 Marek Polacek <polacek@redhat.com>
8097
8098 PR c/30020
8099 * c-common.c (check_case_bounds): Add location parameter.
8100 Use it.
8101 (c_add_case_label): Pass loc to check_case_bounds.
8102
fedfecef
MP
81032014-06-03 Marek Polacek <polacek@redhat.com>
8104
8105 PR c/60439
8106 * c.opt (Wswitch-bool): New option.
8107
f6a7cffc
TS
81082014-05-22 Thomas Schwinge <thomas@codesourcery.com>
8109
040d18b6
TS
8110 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
8111 Remove prototypes.
8112 (record_types_used_by_current_var_decl): Move prototype to where
8113 it belongs.
8114
f6a7cffc
TS
8115 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
8116 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
8117 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
8118
632f2871
RS
81192014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
8120
8121 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
8122 * c-common.c (c_common_nodes_and_builtins): Don't initialize
8123 void_zero_node.
8124 * c-pretty-print.c (pp_c_void_constant): New function.
8125 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
8126 (c_pretty_printer::expression): Handle VOID_CST.
8127 * cilk.c (extract_free_variables): Likewise.
8128 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
8129 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
8130
766090c2
TS
81312014-05-17 Trevor Saunders <tsaunders@mozilla.com>
8132
8133 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
8134 * c-pragma.c (push_alignment): Adjust.
8135 (handle_pragma_push_options): Likewise.
8136
661a0813
MP
81372014-05-09 Marek Polacek <polacek@redhat.com>
8138
8139 PR c/50459
8140 * c-common.c (check_user_alignment): Return -1 if alignment is error
8141 node.
8142 (handle_aligned_attribute): Don't call default_conversion on
8143 FUNCTION_DECLs.
8144 (handle_vector_size_attribute): Likewise.
8145 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
8146 (handle_sentinel_attribute): Call default_conversion and allow even
8147 integral types as an argument.
8148
2793eeab
MP
81492014-05-08 Marek Polacek <polacek@redhat.com>
8150
8151 PR c/61053
8152 * c-common.c (min_align_of_type): New function factored out from...
8153 (c_sizeof_or_alignof_type): ...here.
8154 * c-common.h (min_align_of_type): Declare.
8155
f827930a
MP
81562014-05-08 Marek Polacek <polacek@redhat.com>
8157
8158 PR c/61077
8159 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
8160 parameter type of main.
8161
ca49b74e
DD
81622014-05-07 DJ Delorie <dj@redhat.com>
8163
8164 * c-cppbuiltin.c (print_bits_of_hex): New.
8165 (builtin_define_type_minmax): Print values using hex so as not to
8166 require a pre-computed list of string values.
8167
1d60af08
KZ
81682014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
8169 Mike Stump <mikestump@comcast.net>
8170 Richard Sandiford <rdsandiford@googlemail.com>
8171
8172 * c-ada-spec.c: Include wide-int.h.
8173 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
8174 (dump_generic_ada_node): Use wide-int interfaces.
8175 * c-common.c: Include wide-int-print.h.
8176 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
8177 (pointer_int_sum): Use wide-int interfaces.
8178 (c_common_nodes_and_builtins): Use make_int_cst.
8179 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
8180 (handle_alloc_size_attribute): Use wide-int interfaces.
8181 (get_nonnull_operand): Likewise.
8182 * c-format.c (get_constant): Use tree_fits_uhwi_p.
8183 * c-lex.c: Include wide-int.h.
8184 (narrowest_unsigned_type): Take a widest_int rather than two
8185 HOST_WIDE_INTs.
8186 (narrowest_signed_type): Likewise.
8187 (interpret_integer): Update accordingly. Use wide-int interfaces.
8188 (lex_charconst): Use wide-int interfaces.
8189 * c-pretty-print.c: Include wide-int.h.
8190 (pp_c_integer_constant): Use wide-int interfaces.
8191 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
8192 INT_CST_LT_UNSIGNED.
8193
b15458be
RB
81942014-05-06 Richard Biener <rguenther@suse.de>
8195
8196 * c-opts.c (c_common_post_options): For -freestanding,
8197 -fno-hosted and -fno-builtin disable pattern recognition
8198 if not enabled explicitely.
8199
6577374e
MP
82002014-05-02 Marek Polacek <polacek@redhat.com>
8201
8202 * c.opt (Wsizeof-pointer-memaccess): Describe option.
8203
d00887e8
MP
82042014-05-01 Marek Polacek <polacek@redhat.com>
8205
8206 PR c/43245
8207 * c.opt (Wdiscarded-qualifiers): Add.
8208
f8ed5150
MP
82092014-04-30 Marek Polacek <polacek@redhat.com>
8210
8211 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
8212 INT_MIN / -1 sanitization only for integer types.
8213
45484dcf
MP
82142014-04-25 Marek Polacek <polacek@redhat.com>
8215
8216 PR c/18079
8217 * c-common.c (handle_noinline_attribute): Warn if the attribute
8218 conflicts with always_inline attribute.
8219 (handle_always_inline_attribute): Warn if the attribute conflicts
8220 with noinline attribute.
8221
38e514c0
MP
82222014-04-25 Marek Polacek <polacek@redhat.com>
8223
8224 PR c/60156
8225 * c-common.c (check_main_parameter_types): Warn about variadic main.
8226
44875f92
MS
82272014-04-24 Mike Stump <mikestump@comcast.net>
8228
8229 * c.opt (Wshadow-ivar): Default to on.
8230
dcaaa5a0
DP
82312014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
8232
8233 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
8234
c07d7c02
MP
82352014-04-23 Marek Polacek <polacek@redhat.com>
8236
8237 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
8238
1c33c9b7
JJ
82392014-04-22 Jakub Jelinek <jakub@redhat.com>
8240
8241 PR sanitizer/60275
8242 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
8243 if flag_sanitize_undefined_trap_on_error.
8244 (ubsan_instrument_division, ubsan_instrument_shift,
8245 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
8246 if !flag_sanitize_recover.
8247
793c625f
MG
82482014-04-22 Marc Glisse <marc.glisse@inria.fr>
8249
8250 PR libstdc++/43622
8251 * c-common.c (registered_builtin_types): Make non-static.
8252 * c-common.h (registered_builtin_types): Declare.
8253
b0f1bf36 82542014-04-14 Richard Biener <rguenther@suse.de>
ab20d992 8255 Marc Glisse <marc.glisse@inria.fr>
b0f1bf36
RB
8256
8257 PR c/60819
8258 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
8259 apply may-alias the scalar pointer type when applicable.
8260
3b07fa4a
IZ
82612014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
8262
8263 PR middle-end/60467
8264 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
8265 as possible argument for Cilk_spawn.
8266
cbbd2b1c
TB
82672014-04-11 Tobias Burnus <burnus@net-b.de>
8268
8269 PR c/60194
8270 * c.opt (Wformat-signedness): Add
8271 * c-format.c(check_format_types): Use it.
8272
6415bd5d
JM
82732014-04-11 Jason Merrill <jason@redhat.com>
8274
8275 PR c++/57926
8276 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
8277 default_conversion for an array argument.
8278
6525783a
MP
82792014-04-08 Marek Polacek <polacek@redhat.com>
8280
8281 PR sanitizer/60745
8282 * c-ubsan.c: Include asan.h.
8283 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
8284
880a467b
NS
82852014-04-03 Nathan Sidwell <nathan@codesourcery.com>
8286
8287 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
8288
7b59ff2d
MP
82892014-04-02 Marek Polacek <polacek@redhat.com>
8290
8291 * c-common.h (c_expand_expr): Remove declaration.
8292
8edbfaa6
JJ
82932014-03-28 Jakub Jelinek <jakub@redhat.com>
8294
8295 PR c++/60689
8296 * c-common.c (add_atomic_size_parameter): When creating new
8297 params vector, push the size argument first.
8298
07d72e1d
JJ
82992014-03-26 Jakub Jelinek <jakub@redhat.com>
8300
8301 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8302 ubsan_instrument_vla, ubsan_instrument_return): Adjust
8303 ubsan_create_data callers.
8304
b35e0fa0
JJ
83052014-03-22 Jakub Jelinek <jakub@redhat.com>
8306
8307 PR debug/60603
8308 * c-opts.c (c_finish_options): Restore cb_file_change call to
8309 <built-in>.
8310
39a1ebb3
JJ
83112014-03-13 Jakub Jelinek <jakub@redhat.com>
8312
8313 PR middle-end/36282
8314 * c-pragma.c (apply_pragma_weak): Only look at
8315 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
8316 DECL_ASSEMBLER_NAME_SET_P (decl).
8317 (maybe_apply_pending_pragma_weaks): Exit early if
8318 vec_safe_is_empty (pending_weaks) rather than only when
8319 !pending_weaks.
8320 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
8321 set assembler name back to NULL afterwards.
8322
a07f6ed2
JM
83232014-03-11 Jason Merrill <jason@redhat.com>
8324
8325 * c.opt: Add -std=gnu++14.
8326
75b107f5
IB
83272014-03-11 Ian Bolton <ian.bolton@arm.com>
8328
8329 * c-opts.c (c_common_post_options): Don't override
8330 -ffp-contract=fast if unsafe-math-optimizations is on.
8331
f42c637e
PM
83322014-03-08 Paulo Matos <paulo@matos-sorge.com>
8333
22b15758 8334 * c.opt: Enable LTO FE for fshort-double.
f42c637e 8335
70e24808
JM
83362014-03-07 Jason Merrill <jason@redhat.com>
8337
8338 * c.opt: Add -std=c++14.
8339
3af9c5e9
MP
83402014-03-06 Marek Polacek <polacek@redhat.com>
8341
8342 PR c/60197
8343 * cilk.c (contains_cilk_spawn_stmt): New function.
8344 (contains_cilk_spawn_stmt_walker): Likewise.
8345 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
8346 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
8347
b3bdf019
JJ
83482014-03-03 Jakub Jelinek <jakub@redhat.com>
8349
8350 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
8351 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
8352 even when flag_preprocess_only.
8353
ca7e759d
JM
83542014-02-26 Jason Merrill <jason@redhat.com>
8355
8356 PR c++/59231
8357 PR c++/11586
8358 * c-common.c (shorten_compare): Don't check
8359 c_inhibit_evaluation_warnings.
8360
28e41874
JJ
83612014-02-19 Jakub Jelinek <jakub@redhat.com>
8362
cca615af
JJ
8363 PR c/37743
8364 * c-common.c (c_common_nodes_and_builtins): When initializing
8365 c_uint{16,32,64}_type_node, also set corresponding
8366 uint{16,32,64}_type_node to the same value.
8367
28e41874
JJ
8368 PR c++/60267
8369 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
8370 for PRAGMA_IVDEP if flag_preprocess_only.
8371
c2bf53a1
JJ
83722014-02-12 Jakub Jelinek <jakub@redhat.com>
8373
8374 PR c/60101
8375 * c-common.c (merge_tlist): If copy is true, call new_tlist,
8376 if false, add ADD itself, rather than vice versa.
8377 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
8378 copy. For SAVE_EXPR, only call merge_tlist once.
8379
8fcbce72
JJ
83802014-02-08 Jakub Jelinek <jakub@redhat.com>
8381
8382 PR middle-end/60092
8383 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
8384 and tree_to_uhwi.
8385 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
8386 functions.
8387 (c_common_attribute_table): Add alloc_align and assume_aligned
8388 attributes.
8389
0a756a3f
MP
83902014-02-06 Marek Polacek <polacek@redhat.com>
8391
8392 PR c/60087
8393 * c-common.c (warn_for_sign_compare): Call warning_at with location
8394 instead of warning.
8395
7ec4847a
MP
83962014-02-05 Marek Polacek <polacek@redhat.com>
8397
8398 PR c/53123
8399 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
8400 statement.
8401
66f20604
MP
84022014-02-04 Marek Polacek <polacek@redhat.com>
8403
8404 PR c/60036
8405 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
8406 SAVE_EXPR.
8407
5d77fb19
MG
84082014-02-03 Marc Glisse <marc.glisse@inria.fr>
8409
8410 PR c++/53017
8411 PR c++/59211
8412 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
8413 handle_vector_size_attribute, handle_nonnull_attribute): Call
8414 default_conversion on the attribute argument.
8415 (handle_nonnull_attribute): Increment the argument number.
8416
81e5eca8
MP
84172014-01-31 Marek Polacek <polacek@redhat.com>
8418
8419 PR c/59963
8420 * c-common.c (add_atomic_size_parameter): Pass vNULL to
8421 build_function_call_vec.
8422 (resolve_overloaded_builtin): Likewise.
8423 * c-common.h (build_function_call_vec): Adjust declaration.
8424
68fca595
MP
84252014-01-30 Marek Polacek <polacek@redhat.com>
8426
8427 PR c/59940
8428 * c-common.h (unsafe_conversion_p): Adjust declaration.
8429 (warnings_for_convert_and_check): Likewise.
8430 (convert_and_check): Likewise.
8431 * c-common.c (unsafe_conversion_p): Add location parameter. Call
8432 expansion_point_location_if_in_system_header on it.
8433 (warnings_for_convert_and_check): Add location parameter. Call
8434 expansion_point_location_if_in_system_header on it. Use it.
8435 (convert_and_check): Add location parameter. Use it.
8436 (conversion_warning): Likewise.
8437 (c_add_case_label): Adjust convert_and_check calls.
8438 (scalar_to_vector): Adjust unsafe_conversion_p calls.
8439
b72271b9
BI
84402014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
8441
8442 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
8443 flag_cilkplus.
8444 * c-pragma.c (init_pragma): Likewise.
8445 * c.opt: Likewise.
8446
393e8e8b
MP
84472014-01-23 Marek Polacek <polacek@redhat.com>
8448
8449 PR c/59846
8450 * c-common.c (shorten_compare): Add location_t parameter.
8451 * c-common.h (shorten_binary_op): Adjust declaration.
8452
f04dda30
MP
84532014-01-23 Marek Polacek <polacek@redhat.com>
8454
8455 PR c/58346
8456 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
8457 * c-common.h: Declare it.
8458
621955cb
EB
84592014-01-20 Eric Botcazou <ebotcazou@adacore.com>
8460
8461 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
8462 * c-ada-spec.c (dump_ads): Likewise.
8463 (cpp_check): Likewise.
8464 (dump_ada_specs): Likewise.
8465
84662014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
8467
8468 PR c++/49718
8469 * c-common.c (handle_no_instrument_function_attribute): Allow
8470 no_instrument_function attribute in class member
8471 definition/declaration.
8472
241f845a
JJ
84732014-01-15 Jakub Jelinek <jakub@redhat.com>
8474
8475 PR c/58943
8476 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
8477 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
8478 being COMPOUND_EXPR.
8479 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
8480 operand a SAVE_EXPR and second MODIFY_EXPR.
8481
e83b8e2e
JJ
84822014-01-09 Jakub Jelinek <jakub@redhat.com>
8483
8484 PR target/58115
8485 * c-pch.c (c_common_write_pch): Call
8486 prepare_target_option_nodes_for_pch.
8487
23a5b65a
RS
84882014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8489
8490 Update copyright years
8491
f9030485
RS
84922014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8493
8494 * array-notation-common.c, c-cilkplus.c: Use the standard form for
8495 the copyright notice.
8496
f2aa696b
EB
84972013-12-28 Eric Botcazou <ebotcazou@adacore.com>
8498
8499 * c-ada-spec.c (print_constructor): New function.
8500 (print_destructor): Retrieve the origin of the destructor.
8501 (print_ada_declaration): Revamp handling of constructors/destructors.
8502
3f8257db 85032013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
8504 Bill Maddox <maddox@google.com>
8505 Jason Merrill <jason@redhat.com>
8506
8507 * c.opt: Add -fdeclone-ctor-dtor.
8508 * c-opts.c (c_common_post_options): Default to on iff -Os.
8509
41958c28
BI
85102013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
8511
8512 * c-common.c (c_common_attribute_table): Added "cilk simd function"
8513 attribute.
8514 * c-pragma.h (enum pragma_cilk_clause): Remove.
ab20d992 8515 (enum pragma_omp_clause): Added the following fields:
41958c28
BI
8516 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
8517 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
8518 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
8519 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
8520 PRAGMA_CILK_CLAUSE_UNIFORM.
8521
b1726d6c 8522
12893402
BI
85232013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
8524
8525 * cilk.c (cilk_outline): Made this function non-static.
8526 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
8527 (create_cilk_wrapper): Added a new parameter: a function pointer.
8528 (c_install_body_w_frame_cleanup): Remove
8529 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
8530 * c-common.h (cilk_outline): New prototype.
8531 (gimplify_cilk_spawn): Removed two parameters.
8532 (cilk_install_body_with_frame_cleanup): New prototype.
8533 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
8534 CILK_SPAWN_STMT case.
8535
085b42ed
BS
85362013-12-11 Bernd Schmidt <bernds@codesourcery.com>
8537
2ce064c3
BS
8538 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
8539
085b42ed
BS
8540 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
8541 (int_array_type_node): Remove.
8542 * c-common.c (c_common_nodes_and_builtins): Don't build it.
8543
9e36c9ed
MP
85442013-12-05 Marek Polacek <polacek@redhat.com>
8545
8546 PR c/52023
8547 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
8548 [ADJUST_FIELD_ALIGN].
8549
296674db
JM
85502013-12-04 Joseph Myers <joseph@codesourcery.com>
8551
8552 PR c/52023
8553 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
8554 and check field alignment if set.
8555 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
8556 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
8557
b1726d6c 85582013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
8559 Marek Polacek <polacek@redhat.com>
8560
8561 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
8562 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
8563
d7947e19
L
85642013-11-29 H.J. Lu <hongjiu.lu@intel.com>
8565
8566 PR c/59309
8567 * cilk.c (gimplify_cilk_spawn): Properly handle function without
8568 arguments.
8569
fad7652e
JJ
85702013-11-29 Jakub Jelinek <jakub@redhat.com>
8571
8572 PR c/59280
8573 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
8574 goto invalid. If it is error_mark_node, don't issue further
8575 diagnostics.
8576
8b5e1202
SO
85772013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
8578
8579 * c.opt (Wopenmp-simd): New.
8580
0a508bb6
JJ
85812013-11-22 Jakub Jelinek <jakub@redhat.com>
8582
8583 * c-ubsan.h (ubsan_instrument_return): New prototype.
8584 * c-ubsan.c (ubsan_instrument_return): New function.
8585
2fb9a547
AM
85862013-11-22 Andrew MacLeod <amacleod@redhat.com>
8587
8588 * c-common.c: Add required include files from gimple.h.
ab20d992
JJ
8589 * c-gimplify.c: Likewise.
8590 * cilk.c: Likewise.
2fb9a547 8591
8400e75e
DM
85922013-11-22 David Malcolm <dmalcolm@redhat.com>
8593
8594 * c-common.c (unsafe_conversion_p): Remove use of
8595 EXPR_LOC_OR_HERE macro.
8596 (conversion_warning): Likewise.
8597 (warnings_for_convert_and_check): Likewise.
8598 (warn_for_collisions_1): Likewise.
8599 (shorten_compare): Likewise, and remove use of in_system_header
8600 macro, using the location from the former.
8601 * c-lex.c (dump_one_header): Remove use of input_filename macro.
8602 (cb_def_pragma): Remove use of in_system_header macro.
8603 (lex_string): Likewise.
8604 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
8605
eb1ce453
KZ
86062013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
8607 Mike Stump <mikestump@comcast.net>
8608 Richard Sandiford <rdsandiford@googlemail.com>
8609
8610 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
8611 instead of TREE_INT_CST_LOW, in cases where there is a protecting
8612 tree_fits_shwi_p or tree_fits_uhwi_p.
8613 (dump_generic_ada_node): Likewise.
8614 * c-format.c (check_format_arg): Likewise.
8615 * c-pretty-print.c (pp_c_integer_constant): Likewise.
8616
6b3b8c27
KZ
86172013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
8618
8619 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
8620
49b0aa18
JC
86212013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
8622
8623 PR c/53001
8624 * c-common.c (unsafe_conversion_p): Make this function
8625 return an enumeration with more detail.
8626 (conversion_warning): Use the new return type of
8627 unsafe_conversion_p to separately warn either about conversions
8628 that lower floating point number precision or about the other
8629 kinds of conversions.
8630 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
8631 (unsafe_conversion_p): switching return type to
8632 conversion_safety enumeration.
49b0aa18
JC
8633 * c.opt: Adding new warning -Wfloat-conversion and
8634 enabling it with -Wconversion.
8635
b826515a
BS
86362013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
8637
8e745a17
JJ
8638 * c-opts.c: Include plugin.h.
8639 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 8640
b9a55b13
MP
86412013-11-19 Marek Polacek <polacek@redhat.com>
8642
8643 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
8644 call.
8645 (ubsan_instrument_shift): Likewise.
8646 (ubsan_instrument_vla): Likewise.
8647
7d362f6c
RS
86482013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8649
8650 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
8651 cast to unsigned type.
8652
386b1f1f
RS
86532013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8654
8655 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
8656 tree_low_cst.
8657 (complete_array_type): Update comment to refer to tree_to_[su]hwi
8658 rather than tree_low_cst.
8659
ae7e9ddd
RS
86602013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8661
8662 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
8663 tree_to_uhwi throughout.
8664
9439e9a1
RS
86652013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8666
8667 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
8668 tree_low_cst (..., 0) with tree_to_shwi throughout.
8669
cc269bb6
RS
86702013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8671
8672 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
8673 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
8674
9541ffee
RS
86752013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8676
8677 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
8678 host_integerp (..., 0) with tree_fits_shwi_p throughout.
8679
c02065fc
AH
86802013-11-15 Aldy Hernandez <aldyh@redhat.com>
8681
8682 * c-cilkplus.c: New file.
8683 * c-common.c (readonly_error): Add location argument.
8684 * c-common.h (readonly_error): Same.
8685 (c_finish_cilk_clauses): Protoize.
8686 (c_check_cilk_loop): Same.
8687 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
8688 Do not fail on error_mark_node.
8689 Abstract increment canonicalization to here...
8690 (c_omp_for_incr_canonicalize_ptr): New.
8691 c-pragma.c (init_pragma): Register "simd" pragma.
8692 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
8693 (enum pragma_cilk_clause): New.
8694
9cc65f15
RS
86952013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
8696
8697 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
8698 wchar_type and host_integerp checks.
8699
18f429e2
AM
87002013-11-14 Andrew MacLeod <amacleod@redhat.com>
8701
8702 * c-common.c: Likewise.
8703 * c-gimplify.c: Likewise.
8704 * cilk.c: Likewise.
8705
d8a2d370
DN
87062013-11-14 Diego Novillo <dnovillo@google.com>
8707
8708 * c-common.c: Include fold-const.h.
8709 Include stor-layout.h.
8710 Include calls.h.
8711 Include stringpool.h.
8712 Include attribs.h.
8713 Include varasm.h.
8714 Include trans-mem.h.
8715 * c-cppbuiltin.c: Include stor-layout.h.
8716 Include stringpool.h.
8717 * c-format.c: Include stringpool.h.
8718 * c-lex.c: Include stringpool.h.
8719 Include stor-layout.h.
8720 * c-pragma.c: Include stringpool.h.
8721 Include attribs.h.
8722 Include varasm.h.
8723 Include gcc-symtab.h.
8724 * c-pretty-print.c: Include stor-layout.h.
8725 Include attribs.h.
8726 * cilk.c: Include stringpool.h.
8727 Include calls.h.
8728
38b7bc7f
JM
87292013-11-13 Joseph Myers <joseph@codesourcery.com>
8730
8731 * c-common.h (enum rid): Add RID_AUTO_TYPE.
8732 * c-common.c (c_common_reswords): Add __auto_type.
8733 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
8734
45b0be94
AM
87352013-11-12 Andrew MacLeod <amacleod@redhat.com>
8736
18f429e2
AM
8737 * c-common.c: Include gimplify.h.
8738 * c-gimplify.c: Likewise.
8739 * cilk.c: Likewise.
8740 * c-omp.c: Include gimple-expr.h instead of gimple.h.
8741 * c-ubsan.c: Don't include gimple.h.
45b0be94 8742
582d9b50
JM
87432013-11-12 Joseph Myers <joseph@codesourcery.com>
8744
8745 * c-common.c (c_common_reswords): Add _Thread_local.
8746
6b28e197
JM
87472013-11-09 Joseph Myers <joseph@codesourcery.com>
8748
8749 * c-common.c (atomic_size_supported_p): New function.
8750 (resolve_overloaded_atomic_exchange)
8751 (resolve_overloaded_atomic_compare_exchange)
8752 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
8753 Use it instead of comparing size with a local list of sizes.
8754
267bac10
JM
87552013-11-07 Andrew MacLeod <amacleod@redhat.com>
8756 Joseph Myers <joseph@codesourcery.com>
8757
8758 * c-common.h (enum rid): Add RID_ATOMIC.
8759 * c-common.c (c_common_reswords): Add _Atomic.
8760 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
8761 (keyword_is_type_qualifier): Accept RID_ATOMIC.
8762 * c-format.c (check_format_types): Check for extra _Atomic
8763 qualifiers in format argument.
8764 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
8765 (pp_c_type_qualifier_list): Mention _Atomic in comment.
8766
5157b91e
TB
87672013-11-06 Tobias Burnus <burnus@net-b.de>
8768
8769 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
8770
6dbe0958
JM
87712013-11-06 Joseph Myers <joseph@codesourcery.com>
8772
8773 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
8774 standards modes.
8775 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
8776 to mean lack of IEEE 754 support.
8777
e8ff5196
TB
87782013-11-05 Tobias Burnus <burnus@net-b.de>
8779
8780 * c.opt (-Wdate-time): New option
8781 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
8782
254a0760
JM
87832013-11-05 Joseph Myers <joseph@codesourcery.com>
8784
8785 * c-cppbuiltin.c (cpp_iec_559_value): Test
8786 flag_excess_precision_cmdline not flag_excess_precision.
8787
6d7f7e0a
TB
87882013-11-05 Tobias Burnus <burnus@net-b.de>
8789
8790 * c.opt (fopenmp-simd): New option.
8791 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
8792 (omp_pragmas): ... this new struct.
8793 (c_pp_lookup_pragma): Also walk omp_pragmas.
8794 (init_pragma): Init pragmas for -fopenmp-simd.
8795
55a7f02f
MP
87962013-11-04 Marek Polacek <polacek@redhat.com>
8797
8798 PR c++/58979
8799 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
8800
9193fb05
JM
88012013-11-04 Joseph Myers <joseph@codesourcery.com>
8802
8803 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
8804 New functions.
8805 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
8806
94159ecf
EB
88072013-11-04 Eric Botcazou <ebotcazou@adacore.com>
8808
8809 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
8810 (dump_ada_specs): Adjust prototype of second callback.
8811 * c-ada-spec.c (cpp_check): New global variable.
8812 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
8813 (print_generic_ada_decl): Likewise.
8814 (has_static_fields): Change return type to bool and add guard.
8815 (has_nontrivial_methods): New predicate.
8816 (is_tagged_type): Change return type to bool.
8817 (separate_class_package): Call has_nontrivial_methods.
8818 (pp_ada_tree_identifier): Minor tweaks.
8819 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
8820 (dump_ada_array_domains): Likewise.
8821 (dump_ada_array_type): Likewise.
8822 (dump_template_types): Remove cpp_check parameter and do not pass it to
8823 dump_generic_ada_node.
8824 (dump_ada_template): Likewise.
8825 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
8826 recursively.
8827 (print_ada_methods): Change return type to integer. Remove cpp_check
8828 parameter and do not pass it down.
8829 (dump_nested_types): Remove cpp_check parameter and do not pass it to
8830 dump_generic_ada_node.
8831 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
8832 accessing methods.
8833 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
8834 down. Use has_nontrivial_methods to recognize C++ classes. Use return
8835 value of print_ada_methods.
8836 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
8837 Set cpp_check to it before invoking dump_ada_nodes.
8838 (dump_ada_specs): Likewise.
8839
b906f4ca
MP
88402013-11-03 Marek Polacek <polacek@redhat.com>
8841
8842 * c-ubsan.c: Don't include hash-table.h.
8843 (ubsan_instrument_vla): New function.
8844 * c-ubsan.h: Declare it.
8845
5e20cdc9
DM
88462013-10-31 David Malcolm <dmalcolm@redhat.com>
8847
8848 Automated part of renaming of symtab_node_base to symtab_node.
8849
8850 Patch autogenerated by rename_symtab.py from
8851 https://github.com/davidmalcolm/gcc-refactoring-scripts
8852 revision 58bb219cc090b2f4516a9297d868c245495ee622
8853
8854 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
8855 symtab_node_base to symtab_node.
8856
7057e645
ESR
88572013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
8858
8e745a17 8859 Implement C++14 digit separators.
7057e645
ESR
8860 * c-lex.c (interpret_float): Remove digit separators from scratch string
8861 before building real literal.
8862
193ea7bc
JJ
88632013-10-30 Jakub Jelinek <jakub@redhat.com>
8864
8865 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
8866
939b37da
BI
88672013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
8868
8869 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
8870 fields.
8871 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
8872 enabled.
8873 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
8874 (insert_cilk_frame): New prototype.
8875 (cilk_init_builtins): Likewise.
8876 (gimplify_cilk_spawn): Likewise.
8877 (c_cilk_install_body_w_frame_cleanup): Likewise.
8878 (cilk_detect_spawn_and_unwrap): Likewise.
8879 (cilk_set_spawn_marker): Likewise.
8880 (build_cilk_sync): Likewise.
8881 (build_cilk_spawn): Likewise.
8882 * cilk.c: New file.
8883
67348ccc
DM
88842013-10-29 David Malcolm <dmalcolm@redhat.com>
8885
8886 Patch autogenerated by refactor_symtab.py from
8887 https://github.com/davidmalcolm/gcc-refactoring-scripts
8888 revision 58bb219cc090b2f4516a9297d868c245495ee622
8889
8890 * c-gimplify.c (c_genericize): Update for conversion of symtab types
8891 to a true class hierarchy.
8892 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
8893
d570872d
RS
88942013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
8895
8896 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
8897
98906124
JL
88982013-10-26 Jeff Law <law@redhat.com>
8899
adfac8df
JJ
8900 * c-common.c (c_define_builtins): Remove mudflap support.
8901 * c.opt: Ignore and warn for mudflap options.
98906124 8902
d73749df 89032013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
8904
8905 PR other/33426
8906 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
8907 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
8908
3f04b1bb
JM
89092013-10-23 Jason Merrill <jason@redhat.com>
8910
8911 * c-format.c (gcc_cxxdiag_char_table): Add %X.
8912
acf0174b
JJ
89132013-10-11 Jakub Jelinek <jakub@redhat.com>
8914
acd15a28
JJ
8915 * c-common.h (omp_clause_mask::operator !=): New method.
8916 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
8917 instead of if (mask & something) tests everywhere.
8918
acf0174b
JJ
8919 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
8920 201307 instead of 201107.
8921 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
8922 (c_common_attribute_table): Add "omp declare target" and
8923 "omp declare simd" attributes.
8924 (handle_omp_declare_target_attribute,
8925 handle_omp_declare_simd_attribute): New functions.
8926 * c-omp.c: Include c-pragma.h.
8927 (c_finish_omp_taskgroup): New function.
8928 (c_finish_omp_atomic): Add swapped argument, if true,
8929 build the operation first with rhs, lhs arguments and use NOP_EXPR
8930 build_modify_expr.
8931 (c_finish_omp_for): Add code argument, pass it down to make_code.
8932 (c_omp_split_clauses): New function.
8933 (c_split_parallel_clauses): Removed.
8934 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
8935 c_omp_declare_simd_clauses_to_decls): New functions.
8936 * c-common.h (omp_clause_mask): New type.
8937 (OMP_CLAUSE_MASK_1): Define.
8938 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
8939 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
8940 omp_clause_mask::operator |, omp_clause_mask::operator &,
8941 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
8942 omp_clause_mask::operator ==): New methods.
8943 (enum c_omp_clause_split): New.
8944 (c_finish_omp_taskgroup): New prototype.
8945 (c_finish_omp_atomic): Add swapped argument.
8946 (c_finish_omp_for): Add code argument.
8947 (c_omp_split_clauses): New prototype.
8948 (c_split_parallel_clauses): Removed.
8949 (c_omp_declare_simd_clauses_to_numbers,
8950 c_omp_declare_simd_clauses_to_decls): New prototypes.
8951 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
8952 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
8953 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
8954 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
8955 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
8956 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
8957 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
8958 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
8959 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
8960 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
8961 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
8962 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
8963 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
8964 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
8965 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
8966 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
8967 PRAGMA_OMP_CLAUSE_UNIFORM.
8968
826cacfe
MG
89692013-10-09 Marc Glisse <marc.glisse@inria.fr>
8970
8971 PR tree-optimization/20318
8972 * c-common.c (handle_returns_nonnull_attribute): New function.
8973 (c_common_attribute_table): Add returns_nonnull.
8974
2284b034
MG
89752013-10-03 Marc Glisse <marc.glisse@inria.fr>
8976
8977 PR c++/19476
8978 * c.opt (fcheck-new): Move to common.opt.
8979
b56e9788
MP
89802013-09-25 Marek Polacek <polacek@redhat.com>
8981 Jakub Jelinek <jakub@redhat.com>
8982
8983 PR sanitizer/58413
8984 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
8985 an expression if we can prove it is correct.
8986 (ubsan_instrument_division): Likewise. Remove unnecessary
8987 check.
8988
ce6923c5
MP
89892013-09-18 Marek Polacek <polacek@redhat.com>
8990
8991 PR sanitizer/58411
8992 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
8993 Declare it.
8994 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
8995
fb5610fb
IS
89962013-09-14 Iain Sandoe <iain@codesourcery.com>
8997
8998 PR target/48094
8999 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
9000 fobjc-gc, freplace-objc-classes): Accept for LTO.
9001
88b0e79e
JC
90022013-09-13 Jacek Caban <jacek@codeweavers.com>
9003
9004 * c-target.def: New hook
9005
c9b0866a
PC
90062013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
9007
9008 PR c++/43452
9009 * c.opt (Wdelete-incomplete): Add.
9010
0af94e6f
JR
90112013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
9012
9013 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
9014 (vector_types_compatible_elements_p): New function.
9015 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
9016 declaration.
9017 (vector_types_compatible_elements_p): Declare.
9018
7c26172c
GDR
90192013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
9020
9021 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
9022 a virtual member function.
9023 (pp_simple_type_specifier): Remove.
9024 (pp_c_type_specifier): Likewise.
9025 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
9026 Rename from pp_c_type_specifier. Adjust.
9027 (c_pretty_printer::c_pretty_printer): Do not assign to
9028 simple_type_specifier.
9029
20059c8b
GDR
90302013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9031
9032 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
9033 member function.
9034 (c_pretty_printer::storage_class_specifier): Likewise.
9035 (c_pretty_printer::initializer): Likewise.
9036 (pp_declaration): Remove.
9037 (pp_declaration_specifiers): Likewise.
9038 (pp_abstract_declarator): Likewise.
9039 (pp_declarator): Likewise.
9040 (pp_type_id): Likewise.
9041 (pp_statement): Likewise.
9042 (pp_constant): Likewise.
9043 (pp_id_expression): Likewise.
9044 (pp_primary_expression): Likewise.
9045 (pp_unary_expression): Likewise.
9046 (pp_multiplicative_expression): Likewise.
9047 (pp_conditional_expression): Likewise.
9048 (pp_assignment_expression): Likewise.
9049 (pp_expression): Likewise.
9050 (pp_c_type_id): Likewise.
9051 (pp_c_storage_class_specifier): Likewise.
9052 * c-pretty-print.c (pp_c_type_cast): Tidy.
9053 (pp_c_pointer): Likewise.
9054 (pp_c_type_specifier): Likewise.
9055 (pp_c_parameter_type_list): Likewise.
9056 (pp_c_function_definition): Likewise.
9057 (pp_c_init_declarator): Likewise.
9058 (pp_c_initializer_list): Likewise.
9059 (pp_c_constructor_elts): Likewise.
9060 (c_pretty_printer::direct_abstract_declarator): Likewise.
9061 (c_pretty_printer::declaration_specifiers): Likewise.
9062 (c_pretty_printer::primary_expression): Likewise.
9063 (c_pretty_printer::postfix_expression): Likewise.
9064 (c_pretty_printer::type_id): Rename from pp_c_type_id.
9065 (c_pretty_printer::storage_class_specifier): Rename from
9066 pp_c_storage_class_specifier.
9067 (c_pretty_printer::initializer): Rename from pp_c_initializer.
9068 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
9069 storage_class_specifier, initializer, offset_list, flags.
9070
de5a5fa1
MP
90712013-08-30 Marek Polacek <polacek@redhat.com>
9072
9073 * c-ubsan.c: New file.
9074 * c-ubsan.h: New file.
9075
8f0e4d72
GDR
90762013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
9077
9078 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
9079 member function.
9080 (c_pretty_printer::declaration_specifiers): Likewise.
9081 (c_pretty_printer::declarator): Likewise.
9082 (c_pretty_printer::abstract_declarator): Likewise.
9083 (c_pretty_printer::direct_abstract_declarator): Likewise.
9084 (c_pretty_printer::direct_declarator): Likewise.
9085 (c_pretty_printer::function_specifier): Likewise.
9086 (pp_declaration): Adjust.
9087 (pp_declaration_specifiers): Likewise.
9088 (pp_abstract_declarator): Likewise.
9089 (pp_direct_declarator): Likewise.
9090 (pp_function_specifier): Likewise.
9091 (pp_direct_abstract_declarator): Remove as unused.
9092 (pp_c_declaration): Remove.
9093 (pp_c_declaration_specifiers): Likewise.
9094 (pp_c_declarator): Likewise.
9095 (pp_c_direct_declarator): Likewise.
9096 (pp_c_function_specifier): Likewise.
9097 (pp_c_direct_abstract_declarator): Likewise.
9098 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
9099 from pp_c_abstract_declarator. Adjust.
ab20d992 9100 (c_pretty_printer::direct_abstract_declarator): Rename from
8f0e4d72
GDR
9101 pp_c_direct_abstract_declarator. Adjust.
9102 (c_pretty_printer::function_specifier): Rename from
9103 pp_c_function_specifier. Adjust.
9104 (c_pretty_printer::declaration_specifiers): Rename from
9105 pp_c_declaration_specifiers. Adjust.
9106 (c_pretty_printer::direct_declarator): Rename from
9107 pp_c_direct_declarator. Adjust.
9108 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
9109 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
9110 (c_pretty_printer::c_pretty_printer): Do not assign to
9111 declaration, declaration_specifiers, declarator,
9112 direct_declarator, direct_abstract_declarator, function_specifier.
9113
00d34d3a
GDR
91142013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
9115
9116 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
9117 virtual member function.
9118 (c_pretty_printer::multiplicative_expression): Likewise.
9119 (c_pretty_printer::conditional_expression): Likewise.
9120 (c_pretty_printer::assignment_expression): Likewise.
9121 (c_pretty_printer::expression): Likewise.
9122 (pp_unary_expression): Adjust.
9123 (pp_multiplicative_expression): Likewise.
9124 (pp_assignment_expression): Likewise.
9125 (pp_conditional_expression): Likewise.
9126 (pp_expression): Likewise.
9127 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
9128 from pp_c_unary_expression. Adjust.
9129 (c_pretty_printer::multiplicative_expression): Rename from
9130 pp_c_multiplicative_expression. Adjust.
9131 (c_pretty_printer::conditional_expression): Rename from
9132 pp_c_conditional_expression. Adjust.
9133 (c_pretty_printer::assignment_expression): Rename from
9134 pp_c_assignment_expression. Adjust.
9135 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
9136 (c_pretty_printer::c_pretty_printer): Do not assign to
9137 unary_expression, multiplicative_expression,
9138 conditional_expression, expression.
9139
fb22178f
GDR
91402013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
9141
9142 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
9143 virtual member function.
9144 (pp_postfix_expression): Adjust.
9145 (pp_c_postfix_expression): Remove.
9146 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
9147 from pp_c_postfix_expression. Adjust.
9148 (c_pretty_printer::c_pretty_printer): Do not assign to
9149 postfix_expression.
9150
7ecc2600
GDR
91512013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
9152
9153 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
9154 virtua member function.
9155 (pp_primary_expression): Adjust.
9156 (pp_c_primary_expression): Remove.
9157 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
9158 from pp_c_primary_expression. Adjust.
9159 (pp_c_initializer_list): Use pp_primary_expression.
9160 (c_pretty_printer::c_pretty_printer): Do not assign to
9161 primary_expression.
9162
0691175f
GDR
91632013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
9164
9165 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
9166 * c-pretty-print.c (M_): Remove.
9167 (c_pretty_printer::translate_string): Define.
9168 (pp_c_type_specifier): Use it.
9169 (pp_c_primary_expression): Likewise.
9170 (pp_c_expression): Likewise.
9171
66dfe4c4
GDR
91722013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
9173
9174 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
9175 virtual function.
9176 (pp_c_id_expression): Remove.
9177 (pp_id_expression): Adjust.
9178 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
9179 pp_c_id_expression. Adjust.
9180 (pp_c_postfix_expression): Use pp_id_expression.
9181 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
9182
ca43e9d5
GDR
91832013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
9184
9185 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
9186 member function.
9187 (pp_constant): Adjust.
9188 (pp_c_constant): Remove.
9189 * c-pretty-print.c (c_pretty_printer::constant): Rename from
9190 pp_c_constant. Adjust.
9191 (pp_c_constant)
9192 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
9193 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
9194
da6ca2b5
GDR
91952013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
9196
9197 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
9198 (c_pretty_printer::c_pretty_printer): Declare.
9199 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
9200 c_pretty_printer_init. Adjust.
9201 (print_c_tree): Do not call c_pretty_printer_init.
9202 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
9203
65a372f4
AC
92042013-08-09 Arnaud Charlet <charlet@adacore.com>
9205
9206 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
9207
fd9b0f32
PC
92082013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
9209
9210 PR c++/58080
9211 * c-common.c (pointer_int_sum): Add bool parameter.
9212 * c-common.h (pointer_int_sum): Adjust declaration.
9213
e0aec1e9
GDR
92142013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
9215
9216 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
9217 c_pretty_printer variable.
9218
b066401f
GDR
92192013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
9220
9221 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
9222 (pp_base): Remove.
9223 (pp_c_base): Likewise. Adjust users.
9224 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
9225 (pp_c_whitespace): Do not call pp_base.
9226 (pp_c_left_paren): Likewise.
9227 (pp_c_right_paren): Likewise.
9228 (pp_c_left_brace): Likewise.
9229 (pp_c_right_brace): Likewise.
9230 (pp_c_left_bracket): Likewise.
9231 (pp_c_right_bracket): Likewise.
9232 (pp_c_dot): Likewise.
9233 (pp_c_ampersand): Likewise.
9234 (pp_c_star): Likewise.
9235 (pp_c_arrow): Likewise.
9236 (pp_c_semicolon): Likewise.
9237 (pp_c_complement): Likewise.
9238 (pp_c_exclamation): Likewise.
9239 (pp_c_direct_declarator): Likewise.
9240 (pp_c_ws_string): Likewise.
9241 (pp_c_identifier): Likewise.
9242 (pp_c_statement): Likewise.
9243 (print_c_tree): Likewise.
9244
65e5a578
ESR
92452013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
9246
9247 PR c++/58072
9248 * c-common.c (c_parse_error): Catch user-defined literal tokens and
9249 provide useful error strings.
9250
137a1a27
GDR
92512013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9252
9253 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
9254 printer functions instead of pp_string or operators and punctuators.
9255 (dump_generic_ada_node): Likewise.
9256 * c-pretty-print.c (pp_c_type_specifier): Likewise.
9257 (pp_c_relational_expression): Likewise.
9258 (pp_c_logical_or_expression): Likewise.
9259
07838b13
GDR
92602013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9261
9262 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
9263 functions instead of pp_character.
9264 (pp_ada_tree_identifier): Likewise.
9265 (dump_ada_double_name): Likewise.
9266 (dump_ada_function_declaration): Likewise.
9267 (dump_ada_array_domains): Likewise.
9268 (dump_template_types): Likewise.
9269 (dump_generic_ada_node): Likewise.
9270 (print_ada_declaration): Likewise.
9271 (print_ada_struct_decl): Likewise.
9272 * c-pretty-print.c (pp_c_integer_constant): Likewise.
9273
433cc7b0
TT
92742013-07-23 Tom Tromey <tromey@redhat.com>
9275
9276 * c-common.h (enum rid) <RID_GENERIC>: New constant.
9277 * c-common.c (c_common_reswords): Add _Generic.
9278
688010ba
OB
92792013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
9280
9281 * c-common.c: Fix typos.
9282 * c-common.h: Likewise.
9283
2a99e5e6
LL
92842013-07-13 Lubos Lunak <l.lunak@suse.cz>
9285
9286 PR c++/55203
9287 * c-common.c (c_common_attribute_table): Add warn_unused.
9288 (handle_warn_unused_attribute): New.
9289
c26302d5
JJ
92902013-07-10 Jakub Jelinek <jakub@redhat.com>
9291
9292 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
9293 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
9294
dfeadaa0
PC
92952013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
9296
9297 PR c++/57869
9298 * c.opt: Add Wconditionally-supported.
9299
6a2fa4b2
GS
93002013-07-08 Graham Stott <graham.stott@btinternet.com>
9301
adfac8df 9302 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
9303 unused variables l_length and l_node.
9304
ecdbd01a 93052013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
9306
9307 PR c/57821
9308 * c-common.c (complete_array_type): Delay folding first index
9309 like other indices. When folding, check for index overflow.
9310
bedc293e
MG
93112013-06-27 Marc Glisse <marc.glisse@inria.fr>
9312
9313 PR c++/57509
9314 * c-common.h (c_build_vec_perm_expr): New complain argument.
9315 * c-common.c (c_build_vec_perm_expr): Likewise.
9316 Use save_expr also in C++.
9317
604b2bfc
GDR
93182013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
9319
9320 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
9321 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
9322 * c-opts.c (c_common_post_options): Likewise.
9323
dfeadaa0 93242013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
9325
9326 * array-notation-common.c (length_mismatch_in_expr): Changed the
9327 parameter type's from a dynamic array to a vec_tree. Also removed
9328 the size parameters.
9329 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
9330 the change above.
9331
2ce86d2e
BI
93322013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
9333
9334 * c-common.h (struct cilkplus_an_parts): New structure.
9335 (struct cilkplus_an_loop_parts): Likewise.
9336 (cilkplus_extract_an_triplets): New prototype.
9337 (fix_sec_implicit_args): Likewise.
9338 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
9339 (fix_sec_implicit_args): Likewise.
604b2bfc 9340
07a6825b
BI
93412013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
9342
9343 * array-notation-common.c (find_inv_trees): Removed an unwanted
9344 typecasting.
9345 * c-common.h (struct inv_list::additional_tcodes): Changed type from
9346 enum rid to enum tree_code.
9347
08346abd
JH
93482013-06-11 Jan Hubicka <jh@suse.cz>
9349
9350 * c-common.c (handle_alias_ifunc_attribute): Do not set
9351 DECL_EXTERNAL for weakref variables.
9352 * c-pragma.c (handle_pragma_weak): Make sure aliases
9353 are not declared as external.
9354
d60f1706
BI
93552013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
9356
9357 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
9358 function from c/c-array-notation.c.
9359 (is_cilkplus_reduce_builtin): Likewise.
9360 (find_rank): Likewise.
9361 (extract_array_notation_exprs): Likewise.
9362 (replace_array_notations): Likewise.
9363 (find_inv_trees): Likewise.
9364 (replace_inv_trees): Likewise.
9365 (contains_array_notation_expr): Likewise.
9366 (find_correct_array_notation_type): Likewise.
9367 * c-common.h (struct inv_list): Moved this struct from the file
9368 c/c-array-notation.c and added a new field called additional tcodes.
9369 (length_mismatch_in_expr_p): New prototype.
9370 (is_cilkplus_reduce_builtin): Likewise.
9371 (find_rank): Likewise.
9372 (extract_array_notation_exprs): Likewise.
9373 (replace_array_notation): Likewise.
9374 (find_inv_trees): Likewise.
9375 (replace_inv_trees): Likewise.
9376 (find_correct_array_notation_type): Likewise.
dfeadaa0 9377
36536d79
BI
93782013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
9379
9380 * c-common.c (c_define_builtins): When cilkplus is enabled, the
9381 function array_notation_init_builtins is called.
9382 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
9383 * c-common.def (ARRAY_NOTATION_REF): New tree.
9384 * c-common.h (build_array_notation_expr): New function declaration.
9385 (build_array_notation_ref): Likewise.
9386 (extract_sec_implicit_index_arg): New extern declaration.
9387 (is_sec_implicit_index_fn): Likewise.
9388 (ARRAY_NOTATION_CHECK): New define.
9389 (ARRAY_NOTATION_ARRAY): Likewise.
9390 (ARRAY_NOTATION_START): Likewise.
9391 (ARRAY_NOTATION_LENGTH): Likewise.
9392 (ARRAY_NOTATION_STRIDE): Likewise.
9393 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
9394 ARRAY_NOTATION_REF.
9395 (pp_c_expression): Likewise.
9396 * c.opt (flag_enable_cilkplus): New flag.
9397 * array-notation-common.c: New file.
9398
f7716d57
JJ
93992013-05-14 Jakub Jelinek <jakub@redhat.com>
9400
9401 PR c++/57274
9402 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
9403
a5e0cd1d
MG
94042013-05-10 Marc Glisse <marc.glisse@inria.fr>
9405
9406 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
9407 vectors.
9408
f6bc1c4a
HS
94092013-05-07 Han Shen <shenhan@google.com>
9410
9411 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
9412
3f12f6e9
SKS
94132013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
9414
9415 * c-common.c (check_user_alignment): Emit error for negative values.
9416
61949153
PC
94172013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
9418
9419 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
9420
e93e18e9
PC
94212013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
9422
9423 * c-cppbuiltin.c (c_cpp_builtins): Do not define
9424 __GXX_EXPERIMENTAL_CXX1Y__.
9425
44d90fe1 94262013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 9427 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
9428
9429 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
9430 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
9431 to simply use OPT_Wpointer_arith.
9432 (c_sizeof_or_alignof_type): Likewise.
9433
13f39b2e
PC
94342013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
9435
9436 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
9437
4b84d650
JJ
94382013-04-12 Jakub Jelinek <jakub@redhat.com>
9439
9440 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
9441 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
9442 specifiers.
9443
fb037b5d
SB
94442013-04-07 Steven Bosscher <steven@gcc.gnu.org>
9445
9446 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
9447
4e856798
PC
94482013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
9449
9450 * c-common.c (pointer_int_sum): Remove dead code.
9451
4b1baac8
RS
94522013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
9453
9454 PR middle-end/56524
9455 * c-common.c (handle_optimize_attribute): Don't call
9456 save_optabs_if_changed.
9457
0b50e654
JJ
94582013-03-05 Jakub Jelinek <jakub@redhat.com>
9459
9460 PR middle-end/56461
9461 * c-pch.c (pch_init): Free target_validity at the end.
9462
48c41403
JJ
94632013-03-04 Jakub Jelinek <jakub@redhat.com>
9464
9465 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
9466
e664c61c
KS
94672013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
9468 Jakub Jelinek <jakub@redhat.com>
9469
9470 PR sanitizer/56454
9471 * c-common.c (handle_no_sanitize_address_attribute): New function.
9472 (c_common_attribute_table): Add no_sanitize_address attribute.
9473 (handle_no_address_safety_analysis_attribute): Add
9474 no_sanitize_address attribute, not no_address_safety_analysis
9475 attribute.
9476
a475fd3d 94772013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
9478
9479 PR target/52555
9480 * c-common.c (handle_optimize_attribute): Call
9481 save_optabs_if_changed.
9482
f6007d99
JJ
94832013-02-18 Jakub Jelinek <jakub@redhat.com>
9484 Steven Bosscher <steven@gcc.gnu.org>
9485
9486 PR pch/54117
9487 * c-opts.c (c_common_post_options): If debug info is enabled
9488 and non-dwarf*, refuse to load PCH files and when writing PCH
9489 file warn.
9490
cf35e2b1
JJ
94912013-02-05 Jakub Jelinek <jakub@redhat.com>
9492
9493 PR middle-end/56167
9494 * c-common.c (handle_error_attribute): Fix condition.
9495
32887460
JJ
94962013-01-30 Jakub Jelinek <jakub@redhat.com>
9497
9498 PR c++/55742
9499 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
9500
5af057d8
JM
95012013-01-18 Jason Merrill <jason@redhat.com>
9502
9503 PR target/54908
9504 * c.opt (-fextern-tls-init): New.
9505 * c-opts.c (c_common_post_options): Handle it.
9506
cc83c823
JJ
95072013-01-09 Jakub Jelinek <jakub@redhat.com>
9508
9509 PR c/48418
9510 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
9511 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
9512 and is either negative or bigger or equal to type precision
9513 of the first operand.
9514
a859517f
MP
95152012-12-03 Marek Polacek <polacek@redhat.com>
9516
9517 PR c/55570
9518 * c-common.c (check_user_alignment): Swap order of tests,
9519 check TREE_CODE first.
9520
2d7aa578
ESR
95212012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
9522
9523 PR c++/52654
9524 * c-common.h (overflow_type): New enum.
9525 (build_userdef_literal): Add overflow_type argument.
9526 (tree_userdef_literal): Add overflow_type.
9527 (USERDEF_LITERAL_OVERFLOW): New access macro.
9528 * c-common.c (build_userdef_literal): Add overflow_type
9529 argument.
9530 * c-lex.c (c_lex_with_flags): Add overflow_type to
9531 build_userdef_literal calls.
9532 (interpret_integer, interpret_float): Add overflow_type argument.
9533
cc3c4f62
RB
95342012-11-28 Richard Biener <rguenther@suse.de>
9535
9536 PR c/35634
9537 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
9538 here and use a type with proper overflow behavior for types that would
9539 need to be promoted for the arithmetic.
9540
77bc5132
JJ
95412012-11-23 Jakub Jelinek <jakub@redhat.com>
9542
9543 PR sanitizer/55435
9544 * c-common.c (handle_no_address_safety_analysis_attribute): New
9545 function.
9546 (c_common_attribute_table): Add no_address_safety_analysis.
9547
5dc99c46
SB
95482012-11-16 Simon Baldwin <simonb@google.com>
9549
9550 * c.opt: Add f[no-]canonical-system-headers.
9551 * c-opts.c (c_common_handle_option): Handle
9552 OPT_fcanonical_system_headers.
9553
a4a0016d
ESR
95542012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
9555
9556 PR c++/54413
9557 * c-opts.c (c_common_handle_option): Set new flags.
9558 * c.opt: Describe new flags.
9559
7dbb85a7
JM
95602012-11-09 Jason Merrill <jason@redhat.com>
9561
9562 * c.opt (Wabi-tag): New.
9563
ad7bac31
AK
95642012-11-09 Andi Kleen <ak@linux.intel.com>
9565
9566 PR 55139
9567 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 9568 MEMMODEL_MASK
ad7bac31 9569
7332899a
MLI
95702012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
9571
9572 PR c/53063
9573 * c.opt (Wformat): Make it Alias Wformat=1.
9574 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
9575 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
9576 LangEnabledBy.
9577 (Wformat=): RejectNegative. Use LangEnabledBy.
9578 (Wnonnull): Use LangEnabledBy.
9579 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
9580 * c-format.c (set_Wformat): Delete.
9581 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
ab20d992
JJ
9582 (maybe_read_dollar_number): Likewise.
9583 (avoid_dollar_number): Likewise.
9584 (finish_dollar_format_checking): Likewise.
9585 (check_format_info): Likewise.
9586 (check_format_info_main): Likewise.
9587 (check_format_types): Likewise.
9588 (format_type_warning): Likewise.
9589 * c-common.c (int): Likewise.
9590 (check_function_sentinel): Likewise.
8e745a17 9591 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 9592
34a180a6
MLI
95932012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
9594
9595 PR c/53063
9596 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
9597 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
9598 Use LangEnabledBy.
9599 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
9600 common.opt.
9601 (Wvariadic-macros): Init(1).
9602 * c-opts.c (c_common_handle_option): Do not handle them
9603 explicitly.
9604 (c_common_post_options): Likewise.
9605 (sanitize_cpp_opts): warn_unused_macros is now
9606 cpp_warn_unused_macros.
9607 (push_command_line_include): Likewise.
9608 * c-common.c (warn_unknown_pragmas): Do not define.
9609 * c-common.h (warn_unknown_pragmas): Do not declare.
9610
3f46d6a5
MLI
96112012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
9612
9613 PR c/51294
9614 * c-common.c (conversion_warning): Handle conditional expressions.
9615
880661a4
JW
96162012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
9617
9618 PR c++/54930
9619 * c.opt (Wreturn_local_addr): Define new option.
9620
4514a96b
JM
96212012-10-25 Jason Merrill <jason@redhat.com>
9622
f14edc1a
JM
9623 * c.opt (Wvirtual-move-assign): New.
9624
4514a96b
JM
9625 * c.opt (Winherited-variadic-ctor): New.
9626
93100c6b
MG
96272012-10-25 Marc Glisse <marc.glisse@inria.fr>
9628
9629 PR c++/54427
9630 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
9631
1efcb8c6
JM
96322012-10-23 Joseph Myers <joseph@codesourcery.com>
9633
9634 * c-common.h (pch_cpp_save_state): Declare.
9635 * c-target.def (c_preinclude): New hook.
9636 * c-opts.c (done_preinclude): New.
9637 (push_command_line_include): Handle default preincluded header.
9638 (cb_file_change): Call pch_cpp_save_state when calling
9639 push_command_line_include.
9640 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
9641 (pch_cpp_save_state): New.
9642 (pch_init): Call pch_cpp_save_state conditionally, instead of
9643 calling cpp_save_state.
9644
4a0ae68e
MLI
96452012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9646
9647 PR c/53063
9648 PR c/40989
9649 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
9650 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
9651 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
9652 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
9653 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
9654 * c-opts.c (c_common_handle_option): Remove explicit handling from
9655 here.
9656 (c_common_post_options): Likewise.
9657
67e4210b
EB
96582012-10-18 Eric Botcazou <ebotcazou@adacore.com>
9659
9660 * c-ada-spec.c (LOCATION_COL): Delete.
9661 (compare_location): New function.
9662 (compare_node): Use it.
9663 (compare_comment): Likewise.
9664
65d4f2cd
MLI
96652012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
9666
9667 PR c/53063
9668 PR c/40989
9669 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
9670 * c-opts.c (c_common_handle_option): Do not set them here. Add
9671 comment.
9672 (c_common_post_options): Likewise.
9673
909881cb
EB
96742012-10-16 Eric Botcazou <ebotcazou@adacore.com>
9675
9676 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
9677 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
9678 Remove POINTER_TYPE handling, add large unsigned handling and use
9679 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
9680
3a785c97
JJ
96812012-10-12 Jakub Jelinek <jakub@redhat.com>
9682
9683 PR c/54381
9684 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
9685 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
9686 locs and array of 3 trees instead of just single loc and single
9687 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
9688 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
9689 For *cmp* builtins that take two sources strings report warnings
9690 about first and second source, not about destination and source.
9691
5e54f81d
MG
96922012-10-12 Marc Glisse <marc.glisse@inria.fr>
9693
9694 PR c++/53055
9695 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
9696
f5b02f1e
EB
96972012-10-11 Eric Botcazou <ebotcazou@adacore.com>
9698
9699 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
9700 declaring something coming from another file.
9701
b46dbc6c
AC
97022012-10-10 Arnaud Charlet <charlet@adacore.com>
9703
f5b02f1e 9704 PR ada/54845
b46dbc6c
AC
9705 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
9706
5d9de0d0
PC
97072012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
9708
9709 PR c++/54194
9710 * c-common.c (warn_about_parentheses): Add location_t parameter;
9711 use EXPR_LOC_OR_LOC.
9712 * c-common.h: Update declaration.
9713
a212e43f
MG
97142012-10-09 Marc Glisse <marc.glisse@inria.fr>
9715
9716 PR c++/54427
9717 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
9718 more operations. Make error messages optional.
9719 * c-common.h (enum stv_conv): Moved from c-typeck.c.
9720 (scalar_to_vector): Declare.
9721
b1db7f91
JM
97222012-10-08 Jason Merrill <jason@redhat.com>
9723
9724 * c-common.c (c_common_reswords): Add thread_local.
9725
e28d52cf
DS
97262012-10-08 Dodji Seketeli <dodji@redhat.com>
9727
9728 PR c++/53528 C++11 attribute support
9729 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
9730 new functions.
9731 * c-common.c (check_cxx_fundamental_alignment_constraints): New
9732 static function.
9733 (handle_aligned_attribute): In choose strictest alignment
9734 among many. Use new check_cxx_fundamental_alignment_constraints.
9735 (handle_transparent_union_attribute): In c++11 attribute syntax,
9736 don't look through typedefs.
9737
3b78de56
AC
97382012-10-04 Arnaud Charlet <charlet@adacore.com>
9739
9740 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
9741 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
9742 out of dumpfile.h.
9743
6040bb5f
DC
97442012-09-25 Dehao Chen <dehao@google.com>
9745
9746 PR middle-end/54645
3b78de56 9747 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
9748 map when read in the pch.
9749
3f8257db 97502012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
9751
9752 * c-ada-spec.c: Style fixes.
9753
3f8257db 97542012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
9755
9756 * c.opt (-fada-spec-parent): Define new command line switch.
9757 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
9758 is specified, generate binding spec as a child of the specified unit.
9759
0ccb505d
PC
97602012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
9761 Manuel López-Ibáñez <manu@gcc.gnu.org>
9762
9763 PR c++/53210
9764 * c.opt ([Winit-self]): Enabled by -Wall in C++.
9765
c583af79
AC
97662012-08-23 Arnaud Charlet <charlet@adacore.com>
9767
9768 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
9769 for pointers, and add missing Convention C pragma.
9770 (print_ada_struct_decl): Add missing aliased keyword.
9771 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
9772
1a4049e7
JJ
97732012-08-17 Jakub Jelinek <jakub@redhat.com>
9774
9775 * c-common.c (sizeof_pointer_memaccess_warning): New function.
9776 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
9777 * c-opts.c (c_common_handle_option): Enable it for -Wall.
9778 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
9779 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
9780
70b5e7dc
RG
97812012-08-10 Richard Guenther <rguenther@suse.de>
9782
9783 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
9784
f8923f7e
SB
97852012-08-07 Steven Bosscher <steven@gcc.gnu.org>
9786
9787 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
9788 instead of separate pp_newline and pp_flush.
9789 (print_c_tree): Likewise.
9790
e45abe1f
RH
97912012-07-26 Richard Henderson <rth@redhat.com>
9792
9793 * c-common.c (handle_hot_attribute): Allow labels.
9794 (handle_cold_attribute): Likewise.
9795
332f1d24
JJ
97962012-07-20 Jakub Jelinek <jakub@redhat.com>
9797
9798 PR c++/28656
9799 * c-common.c (check_function_nonnull): Handle multiple nonnull
9800 attributes properly.
9801
7ee2468b
SB
98022012-07-16 Steven Bosscher <steven@gcc.gnu.org>
9803
9804 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
9805 * c-ada-spec.c: Likewise.
9806 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
9807
ee7b28eb
SB
98082012-07-14 Steven Bosscher <steven@gcc.gnu.org>
9809
9810 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
9811 Remove code conditional on it.
9812
6bdf3519
SB
98132012-07-11 Steven Bosscher <steven@gcc.gnu.org>
9814
9815 * c-gimplify.c: Do not include basic-block.h.
9816 * c-common.c: Do not include linfuncs.h.
9817
532aafad
SB
98182012-07-08 Steven Bosscher <steven@gcc.gnu.org>
9819
9820 * c-common.h: Include tree.h.
9821
8d0d1915
JM
98222012-07-02 Jason Merrill <jason@redhat.com>
9823
9824 PR c++/53524
9825 * c-common.c (get_priority): Call default_conversion.
9826
fbc873ad
UB
98272012-07-01 Uros Bizjak <ubizjak@gmail.com>
9828
9829 * c-pch.c (c_common_write_pch): Remove unused variables.
9830
d4a10d0a
SB
98312012-06-29 Steven Bosscher <steven@gcc.gnu.org>
9832
9833 * cppspec.c: Moved from gcc/ to here.
9834
6f3a2e23
KT
98352012-06-27 Kai Tietz <ktietz@redhat.com>
9836
9837 PR preprocessor/37215
9838 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
9839
8ca92d04
SB
98402012-06-21 Steven Bosscher <steven@gcc.gnu.org>
9841
9842 * c-common.h (c_common_print_pch_checksum): Remove.
9843 * c-pch.c: Do not include output.h.
9844 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
9845 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
9846 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
9847 (struct c_pch_header): Remove.
9848 (get_ident): Update gpch version.
9849 (pch_init): Do not print executable_checksum to asm_out_file.
9850 Do not fail if there is no asm_out_file to read back from. Set
9851 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
9852 (c_common_write_pch): Verify that nothing was written to asm_out_file
9853 since pch_init was called. Do not write a c_pch_header, and do not
9854 copy from asm_out_file to the PCH.
9855 (c_common_read_pch): Do not read a c_pch_header, and do not restore
9856 the content of asm_out_file from the PCH.
9857 (c_common_print_pch_checksum): Remove.
9858 * c-opts.c (c_common_init): Print out executable_checksum directly.
9859
70f42967
SB
98602012-06-19 Steven Bosscher <steven@gcc.gnu.org>
9861
9862 * c-target.def (objc_declare_unresolved_class_reference,
9863 objc_declare_class_definition): Add new hooks.
9864
a8781821
SB
98652012-06-19 Steven Bosscher <steven@gcc.gnu.org>
9866
9867 * c-lex.c: Do not include output.h.
9868 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
9869 Remove uses of ASM_OUTPUT_IDENT.
9870
9e1a8dd1
RR
98712012-06-15 Marc Glisse <marc.glisse@inria.fr>
9872
9873 PR c++/51033
9874 * c-common.h (c_build_vec_perm_expr): Move decl here.
9875 * c-common.c (c_build_vec_perm_expr): Move definition
9876 here.
9877
6f07a821
SB
98782012-06-06 Steven Bosscher <steven@gcc.gnu.org>
9879
9880 * c.opt (fconserve-space): Turn into a no-op.
9881
9faeb493 98822012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
9883
9884 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
9885 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
9886 both the start and end of the function.
9887
a4b7d13c
SB
98882012-06-04 Steven Bosscher <steven@gcc.gnu.org>
9889
9890 * c-common.c: Do not include output.h.
9891 * c-pragma.c: Likewise.
9892
c265f413
SA
98932012-06-04 Steven Bosscher <steven@gcc.gnu.org>
9894
9895 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
9896 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
9897 (lang_decl_name): Handle namespace decls.
9898
be7a421e
SB
98992012-05-31 Steven Bosscher <steven@gcc.gnu.org>
9900
9901 * c-ada-spec.c: Do not include output.h.
9902 * c-semantics.c: Likewise.
9903
65de6659
JM
99042012-05-29 Joseph Myers <joseph@codesourcery.com>
9905
9906 * c-common.c: Fix typo.
9907
ca5f4331
MM
99082012-05-29 Michael Matz <matz@suse.de>
9909
9910 * c-common.h (c_expand_decl): Remove prototype.
9911
4f7f7aca
MLI
99122012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9913
9914 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
9915 * c-opts.c (c_common_handle_option): Remove code handling
9916 warn_missing_braces.
9917
4a792f9b
PC
99182012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
9919
9920 PR c++/25137
9921 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
9922 -Wmissing_braces.
9923
650dc14a
DS
99242012-05-22 Dodji Seketeli <dodji@redhat.com>
9925
9926 PR c++/53322
9927 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
9928
9b095bf1
MLI
99292012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
9930
9931 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
9932 * c-opts.c (c_common_handle_option): Do not handle explicitly
9933 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
9934
0b2c4be5
DS
99352012-05-16 Dodji Seketeli <dodji@redhat.com>
9936
9937 PR preprocessor/7263
ab20d992 9938 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
0b2c4be5
DS
9939 to cpp_classify_number. For diagnostics, use the precise location
9940 instead of the global input_location.
9941
a1bde5af
PC
99422012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
9943
d02924ef 9944 PR c++/11856
a1bde5af
PC
9945 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
9946
d1ede5f4
BS
99472012-05-14 Bernd Schmidt <bernds@codesourcery.com>
9948
a1bde5af 9949 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 9950
f2bc201f
MLI
99512012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
9952
9953 PR 53063
9954 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
9955 Wreorder): Use LangEnabledBy.
9956 * c-opts.c (c_common_handle_option): Do not enable them
9957 explicitly. Call lang-specific generated functions.
9958 (c_common_post_options): Do not set them here.
9959
95744782
MLI
99602012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
9961
9962 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
9963 Wmissing-field-initializers,Wmissing-parameter-type,
9964 Wold-style-declaration,Woverride-init): Use EnabledBy.
9965 * c-opts.c (c_common_post_options): Do not set here explicitly.
9966
7d5a5747
MLI
99672012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
9968
9969 PR 53063
9970 * c-opts.c (c_common_handle_option): Use handle_generated_option
9971 to enable sub-options.
9972
5a3c9cf2
PC
99732012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
9974
9975 PR c++/53158
9976 * c-common.c (warnings_for_convert_and_check): Use warning_at.
9977
3ac8781c
RG
99782012-05-10 Richard Guenther <rguenther@suse.de>
9979
9980 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
9981 adjust commentary about TYPE_IS_SIZETYPE types.
9982
1e537948
MLI
99832012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9984
9985 PR c++/53261
9986 * c-common.c (warn_logical_operator): Check that argument of
9987 integer_zerop is not NULL.
9988
f2c4a785
MLI
99892012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
9990
9991 PR c/43772
9992 * c-common.c (warn_logical_operator): Do not warn if either side
9993 is already true or false.
9994
50f305ca
MLI
99952012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
9996
9997 PR c/51712
9998 * c-common.c (expr_original_type): New.
9999 (shorten_compare): Do not warn for enumeration types.
10000
0c3641b0
MLI
100012012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
10002
10003 * c.opt (fpermissive): Add Var(flag_permissive).
10004
7edaa4d2
MG
100052012-04-30 Marc Glisse <marc.glisse@inria.fr>
10006
10007 PR c++/51033
10008 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
10009 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
10010
b9c8da34
DS
100112012-04-30 Dodji Seketeli <dodji@redhat.com>
10012
10013 Add -Wvarargs option
ab20d992 10014 * c.opt (Wvarargs): Define new option.
b9c8da34 10015
e6c69da0
MLI
100162012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
10017
10018 * c-common.c (check_function_arguments): Replace
10019 Wmissing-format-attribute with Wsuggest-attribute=format.
10020
90137d8f
MLI
100212012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
10022
10023 * c.opt (Wsuggest-attribute=format): New. Alias of
10024 Wmissing-format-attribute.
10025 * c-format.c (decode_format_type): Replace
10026 Wmissing-format-attribute with Wsuggest-attribute=format.
10027 (check_function_format): Likewise.
10028
9faeb493 100292012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
10030
10031 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
10032 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
10033 * c.opt: Add Wliteral-suffix.
10034
c1771a20
MLI
100352012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
10036
10037 PR c/44774
10038 * c.opt (Wpedantic): New.
10039 (pedantic): Alias Wpedantic.
10040 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
10041 (c_common_post_options): Likewise.
10042 (sanitize_cpp_opts): Likewise.
10043 * c-lex.c (interpret_float): Likewise.
10044 * c-format.c (check_format_types): Likewise.
10045 * c-common.c (pointer_int_sum): Likewise.
10046 (c_sizeof_or_alignof_type): Likewise.
10047 (c_add_case_label): Likewise.
10048 (c_do_switch_warnings): Likewise.
10049 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
10050
04b391c1
JM
100512012-04-15 Jason Merrill <jason@redhat.com>
10052
10053 PR c++/52818
10054 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
10055 (C_STD_NAME): Distinguish between C++98 and C++11.
10056
ac868f29
EB
100572012-04-11 Eric Botcazou <ebotcazou@adacore.com>
10058
10059 PR target/52624
10060 * c-common.h (uint16_type_node): Rename into...
10061 (c_uint16_type_node): ...this.
10062 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
10063 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
10064
fd4116f4
MLI
100652012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
10066
10067 * c-common.c (warn_if_unused_value): Move definition to here.
10068 * c-common.h (warn_if_unused_value): Move declaration to here.
10069
573ac65e
WB
100702012-03-23 William Bader <williambader@hotmail.com>
10071
10072 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
10073
552b8185
JM
100742012-03-20 Jason Merrill <jason@redhat.com>
10075
10076 * c-common.h (enum cxx_dialect): Add cxx1y.
10077 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
10078 test.
10079 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
10080 * c-opts.c (c_common_post_options): Likewise.
10081 (set_std_cxx1y): New.
10082 (c_common_handle_option): Call it.
10083 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
10084
04398fa8
PC
100852012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
10086
10087 PR c++/14710
10088 * c.opt ([Wuseless-cast]): Add.
10089
d2a12ae7
RG
100902012-03-16 Richard Guenther <rguenther@suse.de>
10091
10092 * c-pretty-print.c (pp_c_initializer_list): Adjust.
10093
a12bf402
MLI
100942012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
10095
10096 PR c++/44783
10097 * c.opt (ftemplate-backtrace-limit) Add.
10098
5c30094f
RO
100992012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10100
10101 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
10102 handling.
10103 * c-pragma.c (handle_pragma_extern_prefix): Remove.
10104 (init_pragma): Don't register extern_prefix.
10105
21fa2faf
RG
101062012-03-12 Richard Guenther <rguenther@suse.de>
10107
10108 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
10109 (builtin_type_for_size): Likewise.
10110
e3793c6f
JJ
101112012-02-13 Jakub Jelinek <jakub@redhat.com>
10112
10113 PR c++/52215
10114 * c-common.c (sync_resolve_params): Don't decide whether to convert
10115 or not based on TYPE_SIZE comparison, convert whenever arg_type
10116 is unsigned INTEGER_TYPE.
10117
93286335
PC
101182012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
10119
10120 PR c/52118
10121 * c.opt ([Wunused-local-typedefs]): Fix description.
10122
7a421706
MS
101232012-01-24 Mike Stump <mikestump@comcast.net>
10124
10125 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
10126 exactly.
10127
ba9b1f11
RG
101282012-01-18 Richard Guenther <rguenther@suse.de>
10129
10130 * c-opts.c (c_common_post_options): Reset LTO flags if
10131 we are about to generate a PCH.
10132
465406be
PC
101332012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
10134
10135 PR c++/51777
10136 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
10137 use pp_unsigned_wide_integer.
10138
aee15221
RG
101392012-01-10 Richard Guenther <rguenther@suse.de>
10140
10141 PR middle-end/51806
10142 * c-opts.c (c_common_handle_option): Move -Werror handling
10143 to language independent code.
10144
5720c0dc
RG
101452012-01-05 Richard Guenther <rguenther@suse.de>
10146
10147 PR middle-end/51764
10148 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
10149 from common.opt.
10150
73ac190a
PC
101512011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
10152
10153 PR c++/51316
10154 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
10155 of array types with an unknown bound.
10156
48b0b196
JM
101572011-12-20 Joseph Myers <joseph@codesourcery.com>
10158
10159 * c-common.c (flag_isoc99): Update comment to refer to C11.
10160 (flag_isoc1x): Change to flag_isoc11.
10161 * c-common.h (flag_isoc99): Update comment to refer to C11.
10162 (flag_isoc1x): Change to flag_isoc11.
10163 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
10164 C11.
10165 * c-opts.c (set_std_c1x): Change to set_std_c11.
10166 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
10167 Call set_std_c11.
10168 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
10169 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
10170 * c.opt (std=c1x): Change to std=c11. Document as non-draft
10171 standard.
10172 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
10173 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
10174 (std=gnu1x): Make alias of std=gnu11.
10175
d58d6eb5
JM
101762011-12-19 Jason Merrill <jason@redhat.com>
10177
10178 PR c++/51228
10179 * c-common.c (handle_transparent_union_attribute): Check the first
10180 field if the type is complete.
10181
b3908fcc
JW
101822011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
10183
10184 PR libstdc++/51365
10185 * c-common.c (RID_IS_FINAL): Add.
10186 * c-common.h (RID_IS_FINAL): Add.
10187
fea3ca91
IS
101882011-11-30 Iain Sandoe <iains@gcc.gnu.org>
10189
10190 * c.opt (fgnu-runtime): Provide full description.
10191 (fnext-runtime): Likewise.
10192 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
10193
62bad7cd
AM
101942011-11-28 Andrew MacLeod <amacleod@redhat.com>
10195
10196 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
10197 predefines in one place. Add LOCK_FREE predefines.
10198 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
10199 new func.
10200
c466c4ff
AM
102012011-11-24 Andrew MacLeod <amacleod@redhat.com>
10202
10203 PR c/51256
9faeb493 10204 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 10205 conditions
9faeb493
UB
10206 (resolve_overloaded_atomic_exchange,
10207 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
10208 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
10209 error_mark_node for error conditions.
9faeb493 10210
a5952633
RG
102112011-11-08 Richard Guenther <rguenther@suse.de>
10212
10213 PR middle-end/51010
ab20d992 10214 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
a5952633 10215
0a35513e
AH
102162011-11-07 Richard Henderson <rth@redhat.com>
10217 Aldy Hernandez <aldyh@redhat.com>
10218 Torvald Riegel <triegel@redhat.com>
10219
10220 Merged from transactional-memory.
10221
10222 * c-common.c (handle_tm_wrap_attribute,
10223 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
10224 (struct c_common_reswords): Added __transaction* keywords.
10225 (struct c_common_attribute_table): Added transaction* and tm_regparm
10226 attributes.
10227 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
10228 masks.
10229 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
10230 find_tm_attribute): Declare.
10231
6d87092d
JM
102322011-11-07 Jason Merrill <jason@redhat.com>
10233
10234 PR c++/35688
10235 * c-common.c, c-common.h: Revert yesterday's changes.
10236
8e7860a1
JM
102372011-11-06 Jason Merrill <jason@redhat.com>
10238
10239 PR c++/35688
10240 * c-common.c (decl_has_visibility_attr): Split out from...
10241 (c_determine_visibility): ...here.
10242 * c-common.h: Declare it.
10243
d19fa6b5
JM
102442011-11-06 Joseph Myers <joseph@codesourcery.com>
10245
10246 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
10247 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
10248 type.
10249 (check_user_alignment): New. Split out of
10250 handle_aligned_attribute. Disallow integer constants with
10251 noninteger types. Conditionally allow zero.
10252 (handle_aligned_attribute): Use check_user_alignment.
10253 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
10254
86951993
AM
102552011-11-06 Andrew MacLeod <amacleod@redhat.com>
10256 Richard Henderson <rth@redhat.com>
10257
10258 Merged from cxx-mem-model.
10259
10260 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 10261 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
10262 parameters that are the same type size.
10263 (get_atomic_generic_size): New. Find size of generic
10264 atomic function parameters and do typechecking.
10265 (add_atomic_size_parameter): New. Insert size into parameter list.
10266 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
10267 either __atomic_exchange_n or external library call.
9faeb493 10268 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 10269 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 10270 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
10271 __atomic_load_n or an external library call.
10272 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
10273 __atomic_store_n or an external library call.
10274 (resolve_overloaded_builtin): Handle new __atomic builtins.
10275
cf9e9959
EB
102762011-11-04 Eric Botcazou <ebotcazou@adacore.com>
10277
10278 PR c++/50608
10279 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
10280 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
10281 <INDIRECT_REF>: Return the argument.
10282 <ARRAY_REF>: Remove special code for negative offset.
10283 Call fold_build_pointer_plus instead of size_binop.
10284 (fold_offsetof): Remove STOP_REF argument and adjust.
10285 * c-common.h (fold_offsetof_1): Declare.
10286 (fold_offsetof): Remove STOP_REF argument.
10287
25339f10
JM
102882011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
10289
10290 PR c++/50810
10291 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
10292 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
10293 Wnarrowing for C++0x and C++98.
10294 * c.opt ([Wnarrowing]): Update.
10295
89401152
PC
102962011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
10297
10298 PR c++/44277
10299 * c.opt: Add Wzero-as-null-pointer-constant.
10300
97e3ad20
JM
103012011-10-31 Jason Merrill <jason@redhat.com>
10302
15694fdd
JM
10303 * c.opt (-fdeduce-init-list): Off by default.
10304
97e3ad20
JM
10305 PR c++/50920
10306 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
10307 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
10308 and -Wc++11-compat.
10309 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
10310
fb9120e3
RAV
103112011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
10312
10313 PR c++/30066
10314 * c.opt (fvisibility-inlines-hidden): Description change.
10315
3ce4f9e4
ESR
103162011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
10317
10318 Implement C++11 user-defined literals.
10319 * c-common.c (build_userdef_literal): New.
10320 * c-common.def: New tree code.
10321 * c-common.h (tree_userdef_literal): New tree struct and accessors.
10322 * c-lex.c (interpret_float): Add suffix parm.
10323 (c_lex_with_flags): Build literal tokens.
10324
5f53c243
PC
103252011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
10326
10327 PR c++/50841
10328 Revert:
10329 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
10330
10331 PR c++/50810
10332 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
10333 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
10334 Wnarrowing for C++0x and C++98.
10335 * c.opt ([Wnarrowing]): Update.
10336
263734e1
PC
103372011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
10338
10339 PR c++/50810
10340 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
10341 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
10342 Wnarrowing for C++0x and C++98.
10343 * c.opt ([Wnarrowing]): Update.
10344
d2e312d7
PC
103452011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
10346
10347 PR c++/45385
10348 * c-common.c (conversion_warning): Remove code looking for
10349 artificial operands.
10350
d17687f6
DS
103512011-10-18 Dodji Seketeli <dodji@redhat.com>
10352
10353 PR bootstrap/50760
10354 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 10355 !NO_IMPLICIT_EXTERN_C.
d17687f6 10356
fc8396e9
PC
103572011-10-17 Michael Spertus <mike_spertus@symantec.com>
10358
10359 * c-common.c (c_common_reswords): Add __bases,
10360 __direct_bases.
10361 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
10362
103632011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
10364
10365 PR c++/50757
10366 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
10367
847e697a
TT
103682011-10-15 Tom Tromey <tromey@redhat.com>
10369 Dodji Seketeli <dodji@redhat.com>
10370
10371 * c.opt (fdebug-cpp): New option.
10372 * c-opts.c (c_common_handle_option): Handle the option.
10373 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
10374 output stream in parameter. Factorized from ...
10375 (maybe_print_line): ... this. Dump location debug information when
10376 -fdebug-cpp is in effect.
10377 (print_line_1): New static function. Takes an output stream in
10378 parameter. Factorized from ...
10379 (print_line): ... here. Dump location information when -fdebug-cpp
10380 is in effect.
10381 (scan_translation_unit): Dump location information when
10382 -fdebug-cpp is in effect.
10383
92582b75
TT
103842011-10-15 Tom Tromey <tromey@redhat.com>
10385 Dodji Seketeli <dodji@redhat.com>
10386
10387 * c.opt (ftrack-macro-expansion): New option. Handle it with and
10388 without argument.
10389 * c-opts.c (c_common_handle_option)<case
10390 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
10391 cases. Handle -ftrack-macro-expansion with and without argument.
10392
46427374
TT
103932011-10-15 Tom Tromey <tromey@redhat.com>
10394 Dodji Seketeli <dodji@redhat.com>
10395
10396 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
10397 (print_line, cb_define, do_line_change): Adjust to avoid touching
10398 the internals of struct line_map. Use the public API instead.
10399 * c-pch.c (c_common_read_pch): Likewise.
10400 * c-lex.c (fe_file_change): Likewise.
10401
fc8396e9
PC
104022011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
10403
10404 PR c++/17212
10405 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
10406
104072011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
10408
10409 PR c++/33067
10410 * c-pretty-print.c (pp_c_floating_constant): Output
10411 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
10412
e79983f4
MM
104132011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
10414
10415 * c-common.c (def_builtin_1): Delete old interface with two
10416 parallel arrays to hold standard builtin declarations, and replace
10417 it with a function based interface that can support creating
10418 builtins on the fly in the future. Change all uses, and poison
10419 the old names. Make sure 0 is not a legitimate builtin index.
10420 * c-omp.c (c_finish_omp_barrier): Ditto.
10421 (c_finish_omp_taskwait): Ditto.
10422 (c_finish_omp_flush): Ditto.
10423
6637388f
TG
104242011-10-11 Tristan Gingold <gingold@adacore.com>
10425
10426 * c.opt: (fallow-parameterless-variadic-functions): New.
10427
3797cb21
DS
104282011-09-08 Dodji Seketeli <dodji@redhat.com>
10429
10430 PR c++/33255 - Support -Wunused-local-typedefs warning
10431 * c-common.h (struct c_language_function::local_typedefs): New
10432 field.
9faeb493
UB
10433 (record_locally_defined_typedef, maybe_record_typedef_use)
10434 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 10435 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
10436 (maybe_record_typedef_use)
10437 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
10438 * c.opt: Declare new -Wunused-local-typedefs flag.
10439
693ddb1b
EB
104402011-09-06 Eric Botcazou <ebotcazou@adacore.com>
10441
10442 PR middle-end/50266
10443 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
10444 computations.
10445
830c740f
RG
104462011-09-05 Richard Guenther <rguenther@suse.de>
10447
10448 * c-common.c (complete_array_type): Use ssize_int (-1) instead
10449 of integer_minus_one_node for empty array upper bounds.
10450
892a371f
DS
104512011-08-28 Dodji Seketeli <dodji@redhat.com>
10452
10453 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
10454 it's the first time it's being called on this main TU.
10455
0e3fdb48
RB
104562011-08-24 Richard Guenther <rguenther@suse.de>
10457
10458 PR c/49396
10459 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
10460
104612011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
10462
10463 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
10464 defined in cpp_init_builtins and c_cpp_builtins.
10465
d4a83c10
JM
104662011-08-19 Joseph Myers <joseph@codesourcery.com>
10467
10468 * c-common.c (c_common_reswords): Add __builtin_complex.
10469 * c-common.h (RID_BUILTIN_COMPLEX): New.
10470
bbceee64
JM
104712011-08-18 Joseph Myers <joseph@codesourcery.com>
10472
10473 * c-common.c (c_common_reswords): Add _Noreturn.
10474 (keyword_is_function_specifier): Handle RID_NORETURN.
10475 * c-common.h (RID_NORETURN): New.
10476
3f8257db 104772011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
10478
10479 * c-common.c (unsafe_conversion_p): New function. Check if it is
10480 unsafe to convert an expression to the type.
10481 (conversion_warning): Adjust, use unsafe_conversion_p.
10482 * c-common.h (unsafe_conversion_p): New function declaration.
10483
20906c66
JJ
104842011-08-02 Jakub Jelinek <jakub@redhat.com>
10485
10486 * c-common.h (c_finish_omp_atomic): Adjust prototype.
10487 (c_finish_omp_taskyield): New prototype.
10488 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
10489 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
10490 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
10491 or RHS1 have side-effects, evaluate those too in the right spot,
10492 if it is a decl and LHS is also a decl, error out if they
10493 aren't the same.
10494 (c_finish_omp_taskyield): New function.
10495 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
10496 * c-pragma.c (omp_pragmas): Add taskyield.
10497 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
10498 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
10499 PRAGMA_OMP_CLAUSE_MERGEABLE.
10500
770e5a2e
DS
105012011-07-25 Dodji Seketeli <dodji@redhat.com>
10502
10503 * c-common.h (set_underlying_type): Remove parm name from
10504 declaration.
10505
1baae426
RG
105062011-07-25 Romain Geissler <romain.geissler@gmail.com>
10507
10508 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 10509
fcb21722
JM
105102011-07-22 Jason Merrill <jason@redhat.com>
10511
76f86d00
JM
10512 PR c++/49793
10513 * c.opt (Wnarrowing): New.
10514
3a636414
JM
10515 PR c++/30112
10516 * c-common.h: Declare c_linkage_bindings.
10517 * c-pragma.c (handle_pragma_redefine_extname): Use it.
10518
fcb21722
JM
10519 PR c++/49813
10520 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
10521 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
10522 as flag_isoc99 for 'restrict'.
10523 (pp_c_specifier_qualifier_list): Likewise for _Complex.
10524
02614448
ILT
105252011-07-21 Ian Lance Taylor <iant@google.com>
10526
10527 PR middle-end/49705
10528 * c-common.c (c_disable_warnings): New static function.
10529 (c_enable_warnings): New static function.
10530 (c_fully_fold_internal): Change local unused_p to bool. Call
10531 c_disable_warnings and c_enable_warnings rather than change
10532 c_inhibit_evaluation_warnings.
10533
34429675
JM
105342011-07-20 Jason Merrill <jason@redhat.com>
10535
10536 PR c++/6709 (DR 743)
10537 PR c++/42603 (DR 950)
10538 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
10539 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
10540 (CPP_DECLTYPE): New.
10541 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
10542
5d49b6a7
RG
105432011-07-19 Richard Guenther <rguenther@suse.de>
10544
10545 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
10546 * c-omp.c (c_finish_omp_for): Likewise.
10547
e84a58ff
EB
105482011-07-12 Eric Botcazou <ebotcazou@adacore.com>
10549
10550 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
10551 body on the next line.
10552
329af3c7
JM
105532011-07-08 Jason Merrill <jason@redhat.com>
10554
4063e61b
JM
10555 PR c++/45437
10556 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
10557
329af3c7
JM
10558 PR c++/49673
10559 * c-common.c (c_apply_type_quals_to_decl): Don't check
10560 TYPE_NEEDS_CONSTRUCTING.
10561
1a072294
RG
105622011-07-06 Richard Guenther <rguenther@suse.de>
10563
10564 * c-common.c (c_common_nodes_and_builtins):
10565 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
10566
fce5dddd
RG
105672011-07-05 Richard Guenther <rguenther@suse.de>
10568
10569 * c-common.c (c_common_nodes_and_builtins): Build all common
10570 tree nodes first.
10571
45d439ac
JJ
105722011-06-27 Jakub Jelinek <jakub@redhat.com>
10573
56300785
JJ
10574 * c-common.h (c_tree_chain_next): New static inline function.
10575
45d439ac
JJ
10576 * c-common.c (check_builtin_function_arguments): Handle
10577 BUILT_IN_ASSUME_ALIGNED.
10578
e0a8ecf2
AM
105792011-06-21 Andrew MacLeod <amacleod@redhat.com>
10580
10581 * c-common.c: Add sync_ or SYNC__ to builtin names.
10582 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
10583
105842011-06-20 Pierre Vittet <piervit@pvittet.com>
10585
10586 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
10587 handler.
10588 (gen_pragma_handler): New union.
10589 (internal_pragma_handler): New type.
10590 (c_register_pragma_with_data)
10591 (c_register_pragma_with_expansion_and_data): New functions.
10592
10593 * c-pragma.c (registered_pragmas, c_register_pragma_1)
10594 (c_register_pragma, c_register_pragma_with_expansion)
10595 (c_invoke_pragma_handler): Changed to work with
10596 internal_pragma_handler.
10597 (c_register_pragma_with_data)
10598 (c_register_pragma_with_expansion_and_data): New functions.
10599
677f3fa8
JM
106002011-06-14 Joseph Myers <joseph@codesourcery.com>
10601
10602 * c-common.c: Include common/common-target.h.
10603 (handle_section_attribute): Use
10604 targetm_common.have_named_sections.
10605 * c-cppbuiltin.c: Include common/common-target.h.
10606 (c_cpp_builtins): Use targetm_common.except_unwind_info.
10607
d7fc8c14
RG
106082011-06-10 Richard Guenther <rguenther@suse.de>
10609
10610 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
10611 to print a IDENTIFIER_NODE.
10612
10e48e39
RO
106132011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10614 Joseph Myers <joseph@codesourcery.com>
10615
10616 * c.opt (fbuilding-libgcc): New option.
10617 * c-cppbuiltin.c (c_cpp_builtins): Define
10618 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
10619
6976ae51
JM
106202011-06-07 Jason Merrill <jason@redhat.com>
10621
3ff60975
JM
10622 * c-common.c (max_tinst_depth): Lower default to 900.
10623
6976ae51
JM
10624 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
10625
009db074
RG
106262011-06-07 Richard Guenther <rguenther@suse.de>
10627
10628 * c-common.c (c_common_nodes_and_builtins): Do not set
10629 size_type_node or call set_sizetype.
10630
b4592b92
DS
106312011-06-07 Dodji Seketeli <dodji@redhat.com>
10632
10633 PR debug/49130
10634 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 10635 type when using pointer comparison to compare types.
b4592b92 10636
014ab419
JW
106372011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
10638
10639 * c.opt: Add -Wdelete-non-virtual-dtor.
10640 * c-opts.c (c_common_handle_option): Include it in -Wall.
10641
4f60111f
NF
106422011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
10643
10644 PR bootstrap/49190
10645
10646 Revert:
10647 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
10648
10649 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
10650 not tree_common.
10651
4cc4f2f4
JJ
106522011-05-27 Jakub Jelinek <jakub@redhat.com>
10653
10654 PR c++/49165
10655 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
10656 C++ don't call c_common_truthvalue_conversion on void type arms.
10657
38e01f9e
NF
106582011-05-27 Nathan Froyd <froydnj@codesourcery.com>
10659
10660 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
10661 (stmt_list_stack): Define.
10662 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
10663 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
10664
92e948a8
NF
106652011-05-26 Nathan Froyd <froydnj@codesourcery.com>
10666
10667 * c-common.c (warning_candidate_p): Check for BLOCKs.
10668
a2fc3e63
NF
106692011-05-26 Nathan Froyd <froydnj@codesourcery.com>
10670
10671 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
10672 not tree_common.
10673
0957c029
JJ
106742011-05-25 Jakub Jelinek <jakub@redhat.com>
10675
10676 * c-common.c (def_fn_type): Remove extra va_end.
10677
828fb3ba
JM
106782011-05-23 Jason Merrill <jason@redhat.com>
10679
10680 PR c++/48106
10681 * c-common.c (c_common_get_narrower): New.
10682 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
10683
dde05067
NF
106842011-05-23 Nathan Froyd <froydnj@codesourcery.com>
10685
10686 * c-common.h (check_function_arguments): Tweak prototype of
10687 check_function_arguments.
10688 * c-common.c (check_function_arguments): Likewise. Adjust
10689 calls to check_function_nonnull, check_function_format, and
10690 check_function_sentinel.
10691 (check_function_sentinel): Take a FUNCTION_TYPE rather than
10692 separate attributes and typelist arguments. Use
10693 FOREACH_FUNCTION_ARGS to iterate over argument types.
10694
3c0d13bf
PC
106952011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
10696
10697 * c-common.c (c_common_reswords): Reorder.
10698 * c-common.h (rid): Likewise.
10699
8242dd04
NF
107002011-05-10 Nathan Froyd <froydnj@codesourcery.com>
10701
10702 * c-common.c (def_fn_type): Don't call build_function_type, call
10703 build_function_type_array or build_varargs_function_type_array
10704 instead.
10705 (c_common_nodes_and_builtins): Likewise.
10706
3d528853
NF
107072011-05-05 Nathan Froyd <froydnj@codesourcery.com>
10708
10709 * c-common.c (c_add_case_label): Omit the loc argument to
10710 build_case_label.
10711 * c-common.h (build_case_label): Remove.
10712 * c-semantics.c (build_case_label): Remove.
10713
a04a722b
JM
107142011-05-05 Joseph Myers <joseph@codesourcery.com>
10715
10716 * c-objc.h (objc_start_method_definition): Update prototype.
10717 * stub-objc.c (objc_start_method_definition): Add extra parameter.
10718
e19a18d4
NF
107192011-05-04 Nathan Froyd <froydnj@codesourcery.com>
10720
10721 * c-common.c (check_main_parameter_types): Reindent. Don't use
10722 TYPE_ARG_TYPES directly.
10723 (handle_nonnull_attribute): Likewise.
10724 (sync_resolve_params): Likewise.
10725 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
10726 to check_format_string.
10727 (handle_format_attribute): Likewise.
10728 (check_format_string): Take a function type to examine instead of
10729 a type list. Use a function_arg_iterator to step through argument
10730 types.
10731
c62c040f
RG
107322011-05-04 Richard Guenther <rguenther@suse.de>
10733
10734 * c-common.c (fix_string_type): Use size_int for index type bounds.
10735 (start_fname_decls): Do not pass NULL to build_int_cst.
10736 (c_init_attributes): Likewise.
10737 * c-lex.c (c_lex_with_flags): Likewise.
10738
c12ff9d8
JM
107392011-04-27 Jason Merrill <jason@redhat.com>
10740
10741 * c-common.c (make_tree_vector_from_list): New.
10742 * c-common.h: Declare it.
10743
304dfbe3
RG
107442011-04-26 Richard Guenther <rguenther@suse.de>
10745
10746 PR preprocessor/48248
10747 * c-ppoutput.c (maybe_print_line): Always optimize newlines
10748 for output size with -P.
10749
3c0d13bf
PC
107502011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
10751
10752 * c-common.c (struct c_common_resword): Add __underlying_type.
10753 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
10754
04695783
JM
107552011-04-20 Jim Meyering <meyering@redhat.com>
10756
10757 * c-format.c (init_dollar_format_checking): Remove useless
10758 if-before-free.
10759
0dc33c3c
NP
107602011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
10761
10762 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 10763 (objc_detect_field_duplicates): New.
0dc33c3c 10764 * stub-objc.c: Likewise.
3c0d13bf 10765
c59633d9
NP
107662011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
10767
10768 * stub-objc.c (objc_declare_protocols): Renamed to
10769 objc_declare_protocol.
10770 * c-objc.h: Likewise.
3c0d13bf 10771
32dabdaf
NP
107722011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
10773
10774 * stub-objc.c (objc_declare_class): Updated argument name.
10775
81f653d6
NF
107762011-04-12 Nathan Froyd <froydnj@codesourcery.com>
10777
10778 * c-common.h (c_common_init_ts): Declare.
10779 * c-common.c (c_common_init_ts): Define.
10780
eb345401
NP
107812011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
10782
10783 * c-objc.h (objc_build_message_expr): Updated prototype.
10784 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 10785
a358e188
MJ
107862011-04-12 Martin Jambor <mjambor@suse.cz>
10787
10788 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
10789 of cgraph_node.
10790
e6313a78
RG
107912011-04-11 Richard Guenther <rguenther@suse.de>
10792
10793 * c-common.c (complete_array_type): Build a range type of
10794 proper type.
10795
dcf0c47e
NF
107962011-04-08 Nathan Froyd <froydnj@codesourcery.com>
10797
10798 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
10799 (handle_type_generic_attribute): Likewise.
10800
1ee44b26
JM
108012011-04-07 Jason Merrill <jason@redhat.com>
10802
10803 PR c++/48450
10804 * c-common.c (c_common_truthvalue_conversion): Don't ignore
10805 conversion from C++0x scoped enum.
10806
acce4e77
JM
108072011-04-06 Joseph Myers <joseph@codesourcery.com>
10808
10809 * c-target-def.h: New file.
10810 * c-target.def: New file.
10811 * c-target.h: New file.
10812 * c-common.c (targetcm): Don't define here.
10813 * c-common.h (default_handle_c_option): Declare.
10814 * c-format.c: Include c-target.h instead of target.h.
10815 * c-opts.c: Include c-target.h instead of target.h. Explicitly
10816 include tm.h.
10817 (default_handle_c_option): Move from targhooks.c.
10818
e2eefb55
JJ
108192011-03-29 Jakub Jelinek <jakub@redhat.com>
10820
10821 PR preprocessor/48248
10822 * c-ppoutput.c (print): Add src_file field.
10823 (init_pp_output): Initialize it.
10824 (maybe_print_line): Don't optimize by adding up to 8 newlines
10825 if map->to_file and print.src_file are different file.
10826 (print_line): Update print.src_file.
10827
ba78087b
KT
108282011-03-25 Kai Tietz <ktietz@redhat.com>
10829
10830 * c-ada-spec.c (compare_comment): Use filename_cmp
10831 instead of strcmp for filename.
10832
0edf1bb2
JL
108332011-03-25 Jeff Law <law@redhat.com>
10834
adfac8df 10835 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 10836
c7dc8804
JM
108372011-03-25 Jason Merrill <jason@redhat.com>
10838
10839 * c.opt: Add -std=c++03.
10840
d1d879b1
EB
108412011-03-22 Eric Botcazou <ebotcazou@adacore.com>
10842
10843 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
10844
3f8257db 108452011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
10846
10847 PR target/12171
5050afdf
KT
10848 * c-pretty-print.c (pp_c_specifier_qualifier_list):
10849 Display allowed attributes for function pointer types.
10850 (pp_c_attributes_display): New function to display
10851 attributes having affects_type_identity flag set to true.
10852 * c-pretty-print.h (pp_c_attributes_display): New prototype.
10853
62d784f7
KT
10854 * c-common.c (c_common_attribute_table):
10855 Add new element.
10856 (c_common_format_attribute_table): Likewise.
10857
82d37118
JM
108582011-03-18 Jason Merrill <jason@redhat.com>
10859
49a000c3
JM
10860 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
10861 * c-common.h: Don't declare it here.
10862 * c-common.c: Or define it here.
10863 * c-opts.c (c_common_handle_option): Or set it here.
10864
82d37118
JM
10865 PR c++/35315
10866 * c-common.c (handle_transparent_union_attribute): Don't
10867 make a duplicate type in C++.
10868
17bc631c
JM
108692011-03-15 Jason Merrill <jason@redhat.com>
10870
10871 * c-common.c (max_constexpr_depth): New.
10872 * c-common.h: Declare it.
10873 * c-opts.c (c_common_handle_option): Set it.
10874 * c.opt (fconstexpr-depth): New option.
10875
1b9b91a6
JM
108762011-03-11 Jason Merrill <jason@redhat.com>
10877
f231b5ff
JM
10878 * c-common.c (attribute_takes_identifier_p): Add missing const.
10879
1b9b91a6
JM
10880 PR c++/46803
10881 * c-common.c (attribute_takes_identifier_p): Assume that an
10882 unknown attribute takes an identifier.
10883
a19e4d44
NF
108842011-03-07 Nathan Froyd <froydnj@codesourcery.com>
10885
10886 PR c/47786
10887 * c-common.c (c_type_hash): Call list_length instead of iterating
10888 through DECL_CHAIN. Rename 'i' to 'n_elements'.
10889
982d62f6
JJ
108902011-02-19 Jakub Jelinek <jakub@redhat.com>
10891
10892 PR c/47809
10893 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
10894
0a256240
NP
108952011-02-17 Iain Sandoe <iains@gcc.gnu.org>
10896
10897 * c.opt (fobjc-abi-version=) New.
10898 (fobjc-nilcheck): New.
10899
ba9e6dd5
NF
109002011-02-03 Nathan Froyd <froydnj@codesourcery.com>
10901
10902 PR c++/46890
10903 * c-common.h (keyword_is_decl_specifier): Declare.
10904 * c-common.c (keyword_is_decl_specifier): Define.
10905 (keyword_is_function_specifier): New function.
10906
7273813a
JJ
109072011-01-26 Jakub Jelinek <jakub@redhat.com>
10908
10909 PR c/47473
10910 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
10911 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
10912 REAL_TYPE.
10913
908ef79b
AC
109142011-01-26 Arnaud Charlet <charlet@adacore.com>
10915
10916 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
10917
237e9384
JJ
109182011-01-26 Jakub Jelinek <jakub@redhat.com>
10919
10920 PR pch/47430
10921 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
10922 after init_c_lex if pch_file is set.
10923
47ea1edf
DK
109242011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
10925
d4dba752 10926 PR c++/43601
47ea1edf
DK
10927 * c.opt (-fkeep-inline-dllexport): New switch.
10928
2aa9c6ae
RG
109292011-01-12 Richard Guenther <rguenther@suse.de>
10930
10931 PR middle-end/32511
10932 * c-common.c (handle_weak_attribute): Warn instead of error
10933 on declaring an inline function weak.
10934
7bd11157
TT
109352011-01-05 Tom Tromey <tromey@redhat.com>
10936
10937 * c-common.h (lvalue_error): Update.
10938 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
10939 not error.
10940
0e66e494 109412010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 10942
b4f588c4
NP
10943 PR objc/47075
10944 * c-objc.h (objc_finish_message_expr): Added argument to
10945 prototype.
10946
f4da8dce
NF
109472010-12-22 Nathan Froyd <froydnj@codesourcery.com>
10948
10949 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
10950 Use prototype_p.
10951
46270f14
NP
109522010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
10953
10954 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 10955 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 10956
4816c593
NF
109572010-12-10 Nathan Froyd <froydnj@codesourcery.com>
10958
10959 * c-common.h (readonly_error): Declare.
10960 * c-common.c (readonly_error): Define.
10961
7a6daeb0
NF
109622010-12-09 Nathan Froyd <froydnj@codesourcery.com>
10963
10964 * c-common.h (invalid_indirection_error): Declare.
10965 * c-common.c (invalid_indirection_error): Define.
10966
892f6119
RG
109672010-12-03 Richard Guenther <rguenther@suse.de>
10968
10969 PR c/46745
10970 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
10971 (pp_c_unary_expression): Likewise.
10972 (pp_c_expression): Likewise.
10973
6c39e757
NP
109742010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
10975
10976 * c-common.h (objc_finish_function): New.
10977 (objc_non_volatilized_type): Removed.
10978 (objc_type_quals_match): Removed.
10979 * stub-objc.c (objc_finish_function): New.
10980 (objc_non_volatilized_type): Removed.
10981 (objc_type_quals_match): Removed.
9faeb493 10982
7c475d11
JM
109832010-11-30 Joseph Myers <joseph@codesourcery.com>
10984
10985 * c-common.h (parse_optimize_options): Declare.
10986 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
10987 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
10988
71f3e391
JM
109892010-11-29 Joseph Myers <joseph@codesourcery.com>
10990
10991 * c-opts.c (check_deps_environment_vars): Use getenv instead of
10992 GET_ENVIRONMENT.
10993 * c-pch.c (O_BINARY): Don't define here.
10994 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
10995
d5fabb58
JM
109962010-11-25 Joseph Myers <joseph@codesourcery.com>
10997
10998 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
10999 targetm.except_unwind_info.
11000
299404a1
JM
110012010-11-23 Joseph Myers <joseph@codesourcery.com>
11002
11003 * c-opts.c (c_common_handle_option): Pass location to
11004 set_struct_debug_option.
11005
c98cd5bf
JM
110062010-11-23 Joseph Myers <joseph@codesourcery.com>
11007
11008 * c-common.c (visibility_options): Move from ../opts.c.
11009 * c-common.h (struct visibility_flags, visibility_options):
11010 Declare here.
11011 * c-opts.c (finish_options): Rename to c_finish_options.
11012 (c_common_init): Update call to finish_options.
11013
a9546771
NP
110142010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
11015
11016 PR objc/34033
11017 * c-lex.c (lex_string): Check that each string in an Objective-C
11018 string concat sequence starts with either one or zero '@', and
11019 that there are no spurious '@' signs at the end.
11020
24a57808
JM
110212010-11-20 Joseph Myers <joseph@codesourcery.com>
11022
11023 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
11024 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
11025 HANDLE_PRAGMA_VISIBILITY.
11026 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
11027 HANDLE_PRAGMA_VISIBILITY): Don't define.
11028 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
11029
a9aa2c3a
NF
110302010-11-20 Nathan Froyd <froydnj@codesourcery.com>
11031
11032 PR c++/16189
11033 PR c++/36888
11034 PR c++/45331
11035 * c-common.h (keyword_begins_type_specifier): Declare.
11036 (keyword_is_storage_class_specifier): Declare.
11037 (keyword_is_type_qualifier): Declare.
11038 * c-common.c (keyword_begins_type_specifier): New function.
11039 (keyword_is_storage_class_specifier): New function.
11040 (keyword_is_type_qualifier): Declare.
11041
5386338c
JM
110422010-11-19 Joseph Myers <joseph@codesourcery.com>
11043
11044 PR c/46547
11045 * c-common.c (in_late_binary_op): Define.
11046 (c_common_truthvalue_conversion): Check in_late_binary_op before
11047 calling c_save_expr.
11048 * c-common.h (in_late_binary_op): Declare.
11049
69ccdddb
JM
110502010-11-19 Joseph Myers <joseph@codesourcery.com>
11051
11052 * c-opts.c (c_common_handle_option): Update calls to
11053 set_struct_debug_option.
11054
6b192a09
NP
110552010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
11056
11057 * c-common.h (objc_declare_protocols): Added additional argument.
11058 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 11059
fb52b50a
NF
110602010-11-18 Nathan Froyd <froydnj@codesourcery.com>
11061
11062 PR c/33193
11063 * c-common.h (build_real_imag_expr): Declare.
11064 * c-semantics.c (build_real_imag_expr): Define.
11065
b37421c6
JM
110662010-11-17 Joseph Myers <joseph@codesourcery.com>
11067
11068 * c-opts.c (c_common_parse_file): Take no arguments.
11069 * c-common.h (c_common_parse_file): Update prototype.
11070
07078664
JJ
110712010-11-16 Jakub Jelinek <jakub@redhat.com>
11072
11073 PR c++/46401
11074 * c-common.c (warning_candidate_p): Don't track non-const calls
11075 or STRING_CSTs.
11076
c6a13190
ILT
110772010-11-15 Ian Lance Taylor <iant@google.com>
11078
11079 * c-lex.c (init_c_lex): Set macro debug callbacks if
11080 flag_dump_go_spec is set.
11081
925e8657
NP
110822010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
11083
11084 * c-common.h (objc_build_incr_expr_for_property_ref): New.
11085 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
11086
bb0a9581
NF
110872010-11-15 Nathan Froyd <froydnj@codesourcery.com>
11088
11089 PR preprocessor/45038
11090 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
11091 dialects.
11092
c5fa0890
JM
110932010-11-12 Joseph Myers <joseph@codesourcery.com>
11094
11095 * c-common.h (c_family_lang_mask): Declare.
11096 * c-opts.c (c_family_lang_mask): Make extern.
11097 * c-pragma.c (handle_pragma_diagnostic): Use
11098 control_warning_option.
11099
a4d8c676
JM
111002010-11-12 Joseph Myers <joseph@codesourcery.com>
11101
11102 * c-common.c (parse_optimize_options): Update call to
11103 decode_options.
11104 * c-common.h (c_common_handle_option): Update prototype.
11105 * c-opts.c (c_common_handle_option): Take location_t parameter and
11106 pass it to other functions.
11107
f954bd2c
JM
111082010-11-11 Joseph Myers <joseph@codesourcery.com>
11109
11110 * c-opts.c (warning_as_error_callback): Remove.
11111 (c_common_initialize_diagnostics): Don't call
11112 register_warning_as_error_callback.
11113 (c_common_handle_option): Handle -Werror=normalized= here.
11114
d8a07487
JM
111152010-11-10 Joseph Myers <joseph@codesourcery.com>
11116
11117 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
11118 in diagnostic.
11119 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
11120 letter.
11121 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
11122 Remove trailing '.' from diagnostics.
11123 * c.opt (Wwrite-strings_: Avoid '`' in help text.
11124
d5478783
JM
111252010-11-10 Joseph Myers <joseph@codesourcery.com>
11126
11127 * c-common.c (parse_optimize_options): Pass global_dc to
11128 decode_options.
11129 * c-opts.c (c_common_handle_option): Pass &global_options to
11130 set_Wstrict_aliasing.
11131 * c.opt (v): Don't mark Common or document here.
11132
91ebb981
IS
111332010-11-06 Iain Sandoe <iains@gcc.gnu.org>
11134
11135 PR target/44981
11136 * c-format.c (format_type): New type gcc_objc_string_format_type.
11137 (valid_stringptr_type_p): New.
11138 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 11139 (check_format_string): Pass expected type, use
91ebb981
IS
11140 valid_stringptr_type_p (), check that the format string types are
11141 consistent with the format specification.
11142 (decode_format_attr): Warn if NSString is used outside objective-c.
11143 (format_types_orig): Add NSString.
11144 (format_name): New.
11145 (format_flags): New.
11146 (check_format_arg): Handle format strings requiring an external parser.
11147 first_target_format_type: New variable.
11148 (handle_format_attribute): Set up first_target_format_type, pass the
11149 expected format arg string type to check_format_string().
ab20d992 11150 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
91ebb981
IS
11151 * stub-objc.c (objc_string_ref_type_p): New.
11152 (objc_check_format_arg): New.
11153
bede2adc
NP
111542010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
11155
9faeb493 11156 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
11157 * c-common.h (objc_build_class_component_ref): New.
11158 * stub-objc.c (objc_build_class_component_ref): New.
11159
9a179d01
NP
111602010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
11161
11162 * c.opt (Wproperty-assign-default): New option.
11163
22d8d616
NP
111642010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
11165
11166 Implemented -fobjc-std=objc1 flag.
11167 * c.opt (fobjc-std=objc1): New option.
11168
2debdb4f
NP
111692010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
11170
11171 Implemented format and noreturn attributes for Objective-C methods.
11172 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
11173 attribute for Objective-C methods.
11174
ec52b111
JM
111752010-10-31 Jason Merrill <jason@redhat.com>
11176
11177 * c-common.c (conversion_warning, warn_for_collisions_1): Use
11178 EXPR_LOC_OR_HERE.
11179
46a88c12
NP
111802010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
11181
11182 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
11183 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
11184 (objc_add_property_declaration): Removed arguments for copies and
11185 ivar.
11186 (objc_build_getter_call): Renamed to
11187 objc_maybe_build_component_ref.
11188 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
11189 (objc_is_property_ref): New.
11190 * c-common.c (c_common_reswords): Removed copies and ivar.
11191 * stub-objc.c (objc_add_property_declaration): Removed arguments
11192 for copies and ivar.
11193 (objc_build_getter_call): Renamed to
11194 objc_maybe_build_component_ref.
11195 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
11196 (objc_is_property_ref): New.
9faeb493 11197
1e4bf85b
AC
111982010-10-29 Arnaud Charlet <charlet@adacore.com>
11199 Matthew Gingell <gingell@adacore.com>
11200
11201 * c-ada-spec.c (separate_class_package): New function.
11202 (pp_ada_tree_identifier): Prefix references to C++ classes with the
11203 name of their enclosing package.
11204 (print_ada_declaration): Use separate_class_package.
11205
81f0bab2
JM
112062010-10-27 Jason Merrill <jason@redhat.com>
11207
2b08f2c5
JM
11208 * c-common.c (c_common_reswords): Add __is_literal_type.
11209 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
11210
81f0bab2
JM
11211 * c-common.c (check_case_value): Remove special C++ code.
11212
200290f2
NP
112132010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
11214
11215 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
11216 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
11217 and RID_LAST_PATTR.
11218 (objc_add_property_declaration): Added additional arguments.
11219 (objc_property_attribute_kind): Removed.
11220 (objc_set_property_attr): Removed.
11221 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
11222 copy and nonatomic.
11223 * stub-objc.c (objc_add_property_declaration): Added additional
11224 arguments.
11225 (objc_set_property_attr): Removed.
9faeb493 11226
f614132b
NP
112272010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
11228
11229 * c-common.h (objc_add_property_variable): Renamed to
11230 objc_add_property_declaration. Added location argument.
11231 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 11232
b8a18805
NP
112332010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
11234
11235 * c-common.h (objc_maybe_printable_name): New.
11236 * stub-objc.c (objc_maybe_printable_name): New.
11237
3f8257db
JJ
112382010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
11239 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
11240
11241 * c-common.h (c_common_mark_addressable_vec): Declare.
11242 * c-common.c (c_common_mark_addressable_vec): New function.
11243
249a82c4
NP
112442010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
11245
11246 * c-common.h (objc_set_method_type): Removed.
11247 (objc_add_method_declaration): Added boolean argument.
11248 (objc_start_method_definition): Same change.
11249 (objc_build_method_signature): Same change.
11250 * stub-objc.c (objc_set_method_type): Removed.
11251 (objc_add_method_declaration): Added boolean argument.
11252 (objc_start_method_definition): Same change.
11253 (objc_build_method_signature): Same change.
11254
977e30bc
NP
112552010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
11256
11257 * c-common.h (finish_file): Removed.
11258 (objc_write_global_declarations): New.
11259 * c-opts.c (c_common_parse_file): Do not call finish_file.
11260 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 11261
da57d1b9
NP
112622010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
11263
11264 Implemented parsing @synthesize and @dynamic for
11265 Objective-C/Objective-C++.
11266 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
11267 (objc_add_synthesize_declaration): New.
11268 (objc_add_dynamic_declaration): New.
11269 * c-common.c (c_common_reswords): Add synthesize and dynamic.
11270 * stub-objc.c (objc_add_synthesize_declaration): New.
11271 (objc_add_dynamic_declaration): New.
9faeb493 11272
0069111f
MM
112732010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
11274
11275 PR target/46041
11276 * c-cppbuiltin.c (mode_has_fma): Move function here from
11277 builtins.c. Don't use the fma optab, instead just use the
11278 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
11279 using -save-temps.
11280
e426b47b
NP
112812010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
11282
11283 Merge from 'apple/trunk' branch on FSF servers.
0069111f 11284
3f8257db 11285 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 11286
9faeb493 11287 Radar 4330422
e426b47b
NP
11288 * c-common.h (objc_non_volatilized_type): New declaration
11289 * stub-objc.c (objc_non_volatilized_type): New stub.
11290
90fbfdc3
NP
112912010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
11292
e426b47b 11293 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 11294
ab20d992 11295 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 11296
9faeb493 11297 Radar 4133425
90fbfdc3 11298 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 11299 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 11300
c37d8c30
IS
113012010-10-17 Iain Sandoe <iains@gcc.gnu.org>
11302
11303 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
11304 * c-common.h (enum rid): Add RID_AT_PACKAGE.
11305 (objc_ivar_visibility_kind): New enum.
11306 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 11307 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
11308 visibility enum.
11309
1b1562a5
MM
113102010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
11311
11312 * c-cppbuiltin.c (builtin_define_float_constants): Emit
11313 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
11314 has the appropriate fma builtins.
11315 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
11316
668ea4b1
IS
113172010-10-14 Iain Sandoe <iains@gcc.gnu.org>
11318
1b1562a5 11319 merge from FSF apple 'trunk' branch.
3f8257db 11320 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 11321
668ea4b1
IS
11322 Radars 4436866, 4505126, 4506903, 4517826
11323 * c-common.c (c_common_resword): Define @property and its attributes.
11324 * c-common.h: Define property attribute enum entries.
11325 (OBJC_IS_PATTR_KEYWORD): New.
11326 (objc_property_attribute_kind): New enum.
11327 Declare objc_set_property_attr (), objc_add_property_variable (),
11328 objc_build_getter_call () and objc_build_setter_call ().
11329 * stub-objc.c (objc_set_property_attr): New stub.
11330 (objc_add_property_variable): Likewise.
11331 (objc_build_getter_call): Likewise.
11332 (objc_build_setter_call) Likewise.
1b1562a5 11333
a1178b30
IS
113342010-10-13 Iain Sandoe <iains@gcc.gnu.org>
11335
1b1562a5 11336 merge from FSF apple 'trunk' branch.
ab20d992 11337 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
11338
11339 Radar 3803157 (method attributes)
11340 * c-common.c (handle_deprecated_attribute): Recognize
11341 objc methods as valid declarations.
11342 * c-common.h: Declare objc_method_decl ().
1b1562a5 11343 * stub-objc.c (objc_method_decl): New stub.
a1178b30 11344
a75bfaa6
JM
113452010-10-08 Joseph Myers <joseph@codesourcery.com>
11346
11347 * c-common.c (parse_optimize_options): Call
11348 decode_cmdline_options_to_array_default_mask before
11349 decode_options. Update arguments to decode_options.
11350 * c-common.h (c_common_init_options_struct): Declare.
11351 * c-opts.c (c_common_init_options_struct): New. Split out from
11352 c_common_init_options.
11353
f05b9d93
NP
113542010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
11355
11356 Implemented fast enumeration for Objective-C.
11357 * c-common.h (objc_finish_foreach_loop): New.
11358 * stub-objc.c (objc_finish_foreach_loop): New.
11359
1ebe4b4f
JM
113602010-10-05 Joseph Myers <joseph@codesourcery.com>
11361
11362 * c-common.h (struct diagnostic_context): Don't declare here.
11363 (c_common_initialize_diagnostics): Declare using
11364 diagnostic_context typedef.
11365 * c-opts.c (c_common_handle_option): Pass global_dc to
11366 handle_generated_option.
11367
d4d24ba4
JM
113682010-10-04 Joseph Myers <joseph@codesourcery.com>
11369
11370 * c-opts.c (c_common_handle_option): Pass &global_options_set to
11371 handle_generated_option.
11372
478a1c5b
ILT
113732010-10-03 Ian Lance Taylor <iant@google.com>
11374
11375 * c.opt (-fplan9-extensions): New option.
11376
82a1c2fe
FXC
113772010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
11378
11379 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
11380 Remove.
11381 (c_cpp_builtins): Call functions from cppbuiltin.c instead
11382 of duplicating code.
11383
92902b1b
IS
113842010-09-30 Iain Sandoe <iains@gcc.gnu.org>
11385
11386 * c-common.c: Add two new entries for @optional
11387 and @required keywords.
11388
11389 merge from FSF 'apple/trunk' branch.
3f8257db 11390 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
11391
11392 Radar 4386773
11393 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
11394 objective-c keywords.
11395 (objc_set_method_opt): New declaration.
11396 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 11397
46625112
JM
113982010-09-30 Joseph Myers <joseph@codesourcery.com>
11399
11400 * c-common.c (handle_optimize_attribute): Pass &global_options to
11401 cl_optimization_save and cl_optimization_restore.
11402 * c-opts.c (c_common_handle_option): Pass &global_options to
11403 handle_generated_option.
11404 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
11405 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
11406 &global_options to cl_optimization_restore.
11407
49b91f05
NP
114082010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
11409
11410 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
11411 Objective-C/Objective-C++ keywords.
11412
13ed556f 114132010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 11414
9faeb493
UB
11415 Merge from 'apple/trunk' branch on FSF servers.
11416
3f8257db 11417 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
11418
11419 Radar 4281748
11420 * c-common.h (objc_check_global_decl): New declaration.
11421 * stub-objc.c (objc_check_global_decl): New stub.
11422
f0036cca
JM
114232010-09-29 Joseph Myers <joseph@codesourcery.com>
11424
11425 * c.opt: Don't use VarExists.
11426
e3339d0f
JM
114272010-09-29 Joseph Myers <joseph@codesourcery.com>
11428
11429 * c-common.c (c_cpp_error): Update names of diagnostic_context
11430 members.
11431 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
11432 cl_optimization members.
11433 * c-opts.c (warning_as_error_callback, c_common_handle_option,
11434 sanitize_cpp_opts, finish_options): Update names of cpp_options
11435 members.
11436
1973201f
NP
114372010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
11438
11439 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
11440 (objc_is_reserved_word): Removed.
11441 * c-common.c: Updated comments.
11442 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
11443 objc_is_reserved_word.
11444 * stub-objc.c (objc_is_reserved_word): Removed.
11445
f7e71da5
IS
114462010-09-28 Iain Sandoe <iains@gcc.gnu.org>
11447
9faeb493 11448 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
11449 include attributes.
11450 (objc_start_method_definition): Likewise.
11451 (objc_build_keyword_decl): Likewise.
11452 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
11453 (objc_start_method_definition): Likewise.
11454 (objc_build_keyword_decl): Likewise.
11455
c165dca7
IS
114562010-09-28 Iain Sandoe <iains@gcc.gnu.org>
11457
11458 * c-common.h (objc_start_class_interface): Adjust prototype.
11459 (objc_start_category_interface): Likewise.
11460 (objc_start_protocol): Likewise.
11461 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
11462 (objc_start_class_interface): Likewise.
11463 (objc_start_category_interface): Likewise.
11464
7458026b
ILT
114652010-09-27 Ian Lance Taylor <iant@google.com>
11466
11467 * c-common.c (c_common_attribute_table): Add no_split_stack.
11468 (handle_no_split_stack_attribute): New static function.
11469
b581b85b
NP
114702010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
11471
9faeb493 11472 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 11473
3f8257db 11474 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 11475
9faeb493 11476 Radar 4229905
b581b85b
NP
11477 * c-common.h (objc_have_common_type): New declaration.
11478 * stub-objc.c (objc_have_common_type): New stub.
11479
11480 2005-06-22 Ziemowit Laski <zlaski@apple.com>
11481
11482 Radar 4154928
11483 * c-common.h (objc_common_type): New prototype.
9faeb493 11484 * stub-objc.c (objc_common_type): New stub.
b581b85b 11485
46a4da10
JH
114862010-09-24 Jan Hubicka <jh@suse.cz>
11487
11488 * c-common.c (handle_leaf_attribute): New function.
11489 (struct attribute_spec c_common_att): Add leaf.
11490
e200444e
JM
114912010-09-22 Joseph Myers <joseph@codesourcery.com>
11492
11493 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
11494 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
11495 -dump, -dump=, -imacros, -imacros=, -include, -include=,
11496 -include-barrier, -include-directory, -include-directory=,
11497 -include-directory-after, -include-directory-after=,
11498 -include-prefix, -include-prefix=, -include-with-prefix,
11499 -include-with-prefix=, -include-with-prefix-after,
11500 -include-with-prefix-after=, -include-with-prefix-before,
11501 -include-with-prefix-before=, -no-integrated-cpp,
11502 -no-line-commands, -no-standard-includes, -no-warnings, -output,
11503 -output=, -pedantic, -pedantic-errors, -preprocess,
11504 -print-missing-file-dependencies, -trace-includes, -traditional,
11505 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
11506 -user-dependencies, -verbose, -write-dependencies,
11507 -write-user-dependencies, no-integrated-cpp, traditional): New.
11508
29a80ea6
NP
115092010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
11510
11511 PR objc/23710
ac1fc2fc
NP
11512 * c-common.h (objc_start_method_definition): Return bool instead
11513 of void.
11514 * stub-objc.c (objc_start_method_definition): Return bool instead
11515 of void.
11516
115172010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
11518
11519 PR objc/25965
11520 * c-common.h (objc_get_interface_ivars): New declaration.
11521 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 11522
de621752
ILT
115232010-09-15 Ian Lance Taylor <iant@google.com>
11524
11525 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 11526 messages. Remove period at end of warning message.
de621752 11527
ba885ec5
NS
115282010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11529
11530 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
11531 (handle_alias_attribute): ... here.
11532 (handle_ifunc_attribute): New.
11533
c5ee1358
MM
115342010-09-06 Mark Mitchell <mark@codesourcery.com>
11535
11536 * c-common.h (do_warn_double_promotion): Declare.
11537 * c-common.c (do_warn_double_promotion): Define.
11538
0a0b3574
MM
115392010-09-05 Mark Mitchell <mark@codesourcery.com>
11540
11541 * c.opt (Wdouble-promotion): New.
11542
d1779886
JM
115432010-09-02 Joseph Myers <joseph@codesourcery.com>
11544
11545 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
11546 fvtable-thunks, fxref): Mark no longer supported in help text.
11547
2d2bd949
JM
115482010-09-02 Joseph Myers <joseph@codesourcery.com>
11549
11550 * c.opt (Wimport, fall-virtual, falt-external-templates,
11551 fdefault-inline, fenum-int-equiv, fexternal-templates,
11552 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
11553 fname-mangling-version-, fnew-abi, fnonnull-objects,
11554 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
11555 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
11556 applicable.
11557 (fhandle-exceptions): Mark with Alias and Warn.
11558 * c-opts.c (c_common_handle_option): Don't handle options marked
11559 as ignored.
11560
5de8299c
JM
115612010-09-02 Joseph Myers <joseph@codesourcery.com>
11562
11563 * c.opt (Wcomments, Werror-implicit-function-declaration,
11564 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
11565 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
11566 aliases.
11567 * c-common.c (option_codes): Use OPT_Wcomment instead of
11568 OPT_Wcomments.
11569 * c-opts.c (warning_as_error_callback, c_common_handle_option):
11570 Don't handle options marked as aliases.
11571
0ceb0201
RG
115722010-08-25 Richard Guenther <rguenther@suse.de>
11573
11574 * c-common.c (c_common_get_alias_set): Remove special
11575 handling for pointers.
11576
ac47786e
NF
115772010-08-20 Nathan Froyd <froydnj@codesourcery.com>
11578
11579 * c-common.c: Use FOR_EACH_VEC_ELT.
11580 * c-gimplify.c: Likewise.
11581 * c-pragma.c: Likewise.
11582
c878765b
JM
115832010-08-16 Joseph Myers <joseph@codesourcery.com>
11584
11585 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
11586 RejectDriver.
11587 (MMDX): Change back to MMD. Mark NoDriverArg instead of
11588 RejectDriver.
11589 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
11590 instead of OPT_MDX and OPT_MMDX.
11591
603349bf
JM
115922010-08-16 Joseph Myers <joseph@codesourcery.com>
11593
11594 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
11595
644fa7ac
JM
115962010-08-12 Joseph Myers <joseph@codesourcery.com>
11597
11598 * c.opt (MD, MMD): Change to MDX and MMDX.
11599 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
11600
481e1176
JM
116012010-08-11 Joseph Myers <joseph@codesourcery.com>
11602
11603 * c-opts.c (c_common_handle_option): Call handle_generated_option
11604 instead of handle_option.
11605
ac8dc9f7
NF
116062010-08-08 Nathan Froyd <froydnj@codesourcery.com>
11607
11608 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
11609 (maybe_apply_renaming_pragma): Delete unneeded declarations.
11610
4f8c876d
NF
116112010-08-08 Nathan Froyd <froydnj@codesourcery.com>
11612
11613 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
11614 (pending_redefine_extname): Change type to a VEC.
11615 (add_to_renaming_pragma_list): Update for new type of
11616 pending_redefine_extname.
ac8dc9f7 11617 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 11618
3b0c690e
AC
116192010-08-04 Arnaud Charlet <charlet@adacore.com>
11620
11621 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
11622 visited.
11623 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
11624 decide whether a type has already been declared/seen.
11625 Do not go to the original type.
11626 (dump_nested_types): New parameter forward.
11627 Generate forward declaration if needed and mark type as visited.
11628 (print_ada_declaration): Call dump_nested_types if not already done.
11629 Mark types as visited.
11630
1890bccc
JM
116312010-08-03 Joseph Myers <joseph@codesourcery.com>
11632
11633 * c.opt (-print-pch-checksum): Remove option.
11634 * c-opts.c (c_common_handle_option): Don't handle
11635 OPT_print_pch_checksum.
11636
5f20c657
JM
116372010-07-27 Joseph Myers <joseph@codesourcery.com>
11638
11639 * c-common.h (c_common_handle_option): Update prototype and return
11640 value type.
11641 * c-opts.c (c_common_handle_option): Update prototype and return
11642 value type. Update calls to handle_option and
11643 enable_warning_as_error.
11644
f551f80c
JJ
116452010-07-27 Jakub Jelinek <jakub@redhat.com>
11646
11647 PR c/45079
11648 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
11649
61ff2bdc
JM
116502010-07-27 Joseph Myers <joseph@codesourcery.com>
11651
11652 * c-common.h (c_common_missing_argument): Remove.
11653 * c-opts.c (c_common_missing_argument): Remove.
11654 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
11655 idirafter, imacros, include, isysroot, isystem, iquote): Add
11656 MissingArgError.
11657 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
11658
7a9bf9a4
JM
116592010-07-27 Joseph Myers <joseph@codesourcery.com>
11660
11661 * c-common.h (c_common_option_lang_mask,
11662 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
11663 New.
11664 (c_common_init_options): Update prototype.
11665 * c-opts.c (c_common_option_lang_mask): New.
11666 (c_common_initialize_diagnostics): Split out of
11667 c_common_init_options.
11668 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
11669 New.
11670 (c_common_init_options): Update prototype. Use decoded options in
11671 search for -lang-asm.
11672
910ad8de
NF
116732010-07-15 Nathan Froyd <froydnj@codesourcery.com>
11674
11675 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
11676 * c-format.c: Likewise.
11677
718f9c0f
MLI
116782010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
11679
11680 * c-common.h: Include diagnostic-core.h. Error if already
11681 included.
11682 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
11683
4d451982
MLI
116842010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
11685
adfac8df 11686 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
11687 Do not include expr.h
11688 (vector_mode_valid_p): Move here.
11689
119fe915
SB
116902010-06-21 DJ Delorie <dj@redhat.com>
11691
11692 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
11693 allow these pragmas anywhere.
11694
116952010-06-14 Jakub Jelinek <jakub@redhat.com>
11696
11697 PR bootstrap/44509
11698 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
11699 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
11700 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
11701 ggc_strdup instead of xstrdup.
11702
117032010-06-10 Jakub Jelinek <jakub@redhat.com>
11704
11705 * c-cppbuiltin.c: Include cpp-id-data.h.
11706 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
11707 (lazy_hex_fp_value): New function.
11708 (builtin_define_with_hex_fp_value): Provide definitions lazily.
11709
6662d794
MLI
117102010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11711
11712 * c-gimplify.c: Do not include tree-flow.h
11713
38f8b050
JR
117142010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
11715
11716 PR other/44034
11717 * c-common.c: Rename targetm member:
11718 targetm.enum_va_list -> targetm.enum_va_list_p
11719
9589f23e
AS
117202010-06-28 Anatoly Sokolov <aesok@post.ru>
11721
11722 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
11723
3b06d379
SB
117242010-06-28 Steven Bosscher <steven@gcc.gnu.org>
11725
11726 * c-cppbuiltin.c: Do not include except.h.
11727
d166d4c3
AK
117282010-06-24 Andi Kleen <ak@linux.intel.com>
11729
9faeb493
UB
11730 * c-common.c (warn_for_omitted_condop): New.
11731 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 11732
70cb8be6
JM
117332010-06-21 Joseph Myers <joseph@codesourcery.com>
11734
11735 * c.opt (lang-objc): Remove.
11736 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
11737
a4c97feb
JR
117382010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
11739
11740 * c-opts.c: Include "tm_p.h".
11741
6e2f1956
JM
117422010-06-20 Joseph Myers <joseph@codesourcery.com>
11743
11744 * c-common.c (parse_optimize_options): Update call to
11745 decode_options.
11746
bc87224e
NF
117472010-06-18 Nathan Froyd <froydnj@codesourcery.com>
11748
11749 * c-common.c (record_types_used_by_current_var_decl): Adjust for
11750 new type of types_used_by_cur_var_decl.
11751
b49cf425
JR
117522010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
11753
11754 PR bootstrap/44512
11755 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
11756 for C++ standard compliance.
11757
59f9c2ed
JM
117582010-06-16 Jason Merrill <jason@redhat.com>
11759
11760 * c.opt: Add -Wnoexcept.
11761
33766b66
RG
117622010-06-16 Richard Guenther <rguenther@suse.de>
11763
11764 PR c/44555
11765 * c-common.c (c_common_truthvalue_conversion): Remove
11766 premature and wrong optimization concering ADDR_EXPRs.
11767
eff7e30c
AC
117682010-06-15 Arnaud Charlet <charlet@adacore.com>
11769
11770 * c-ada-spec.c (dump_sloc): Remove column info.
11771 (is_simple_enum): New function.
11772 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
11773 enum types when relevant.
11774
6312e84d
MLI
117752010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
11776
9faeb493 11777 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
11778 location.
11779
1cb42611
JM
117802010-06-10 Joseph Myers <joseph@codesourcery.com>
11781
11782 * c-opts.c (c_common_handle_option): Don't handle
11783 OPT_fshow_column.
11784
a9429e29
LB
117852010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
11786
11787 * c-pragma.c (push_alignment): Use typed GC allocation.
11788 (handle_pragma_push_options): Likewise.
11789
11790 * c-common.c (parse_optimize_options): Likewise.
11791
11792 * c-common.h (struct sorted_fields_type): Add variable_size GTY
11793 option.
11794
5498f011
JM
117952010-06-07 Joseph Myers <joseph@codesourcery.com>
11796
11797 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
11798 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
11799 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
11800 flag_signed_bitfields, warn_strict_null_sentinel,
11801 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
11802 flag_gen_declaration, flag_no_gnu_keywords,
11803 flag_implement_inlines, flag_implicit_templates,
11804 flag_implicit_inline_templates, flag_optional_diags,
11805 flag_elide_constructors, flag_default_inline, flag_rtti,
11806 flag_conserve_space, flag_access_control, flag_check_new,
11807 flag_new_for_scope, flag_weak, flag_working_directory,
11808 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
11809 flag_enforce_eh_specs, flag_threadsafe_statics,
11810 flag_pretty_templates): Remove.
11811 * c-common.h (flag_preprocess_only, flag_nil_receivers,
11812 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
11813 flag_replace_objc_classes, flag_undef, flag_no_builtin,
11814 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
11815 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
11816 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
11817 flag_no_gnu_keywords, flag_implement_inlines,
11818 flag_implicit_templates, flag_implicit_inline_templates,
11819 flag_optional_diags, flag_elide_constructors, flag_default_inline,
11820 flag_rtti, flag_conserve_space, flag_access_control,
11821 flag_check_new, flag_new_for_scope, flag_weak,
11822 flag_working_directory, flag_use_cxa_atexit,
11823 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
11824 flag_threadsafe_statics, flag_pretty_templates,
11825 warn_strict_null_sentinel): Remove.
11826 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
11827 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
11828 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
11829 fimplicit-inline-templates, fimplicit-templates,
11830 flax-vector-conversions, fms-extensions, fnil-receivers,
11831 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
11832 frtti, fshort-double, fshort-enums, fshort-wchar,
11833 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
11834 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
11835 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
11836 gen-decls, undef): Use Var.
11837 (fdefault-inline, foptional-diags): Document as doing nothing.
11838 * c-opts.c (c_common_handle_option): Remove cases for options now
11839 using Var. Mark ignored options as such.
11840
39dabefd
SB
118412010-06-05 Steven Bosscher <steven@gcc.gnu.org>
11842
9faeb493 11843 * c-common.c: Moved to here from parent directory.
39dabefd
SB
11844 * c-common.def: Likewise.
11845 * c-common.h: Likewise.
11846 * c-cppbuiltin.c: Likewise.
11847 * c-dump.c: Likewise.
11848 * c-format.c: Likewise.
11849 * c-format.h : Likewise.
11850 * c-gimplify.c: Likewise.
11851 * c-lex.c: Likewise.
11852 * c-omp.c: Likewise.
11853 * c.opt: Likewise.
11854 * c-opts.c: Likewise.
11855 * c-pch.c: Likewise.
11856 * c-ppoutput.c: Likewise.
11857 * c-pragma.c: Likewise.
11858 * c-pragma.h: Likewise.
11859 * c-pretty-print.c: Likewise.
11860 * c-pretty-print.h: Likewise.
11861 * c-semantics.c: Likewise.
11862 * stub-objc.c: Likewise.
11863
11864 * c-common.c: Include gt-c-family-c-common.h.
11865 * c-pragma.c: Include gt-c-family-c-pragma.h.
11866\f
c48514be 11867Copyright (C) 2010-2021 Free Software Foundation, Inc.
39dabefd
SB
11868
11869Copying and distribution of this file, with or without modification,
11870are permitted in any medium without royalty provided the copyright
11871notice and this notice are preserved.