]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
testsuite: Fix up a testcase to find the right ISO_Fortran_binding.h.
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
2f7f0d32
GA
12021-01-15 Jakub Jelinek <jakub@redhat.com>
2
3 PR tree-optimization/98597
4 * c-pretty-print.c: Include options.h.
5 (c_fold_indirect_ref_for_warn): New function.
6 (print_mem_ref): Use it. If it returns something that has compatible
7 type and is TBAA compatible with zero offset, print it and return,
8 otherwise print it using offsetof syntax or array ref syntax. Fix up
9 printing if MEM_REFs first operand is ADDR_EXPR, or when the first
10 argument has pointer to array type. Print pointers using the standard
11 formatting.
12
6851dda2
GA
132021-01-12 Martin Sebor <msebor@redhat.com>
14
15 PR c/98597
16 PR c/98592
17 * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
18 has pointer type. Remove redundant code. Avoid calling
19 gimple_canonical_types_compatible_p.
20
7d187e4f
GA
212021-01-07 Martin Sebor <msebor@redhat.com>
22
23 PR middle-end/98578
24 * c-pretty-print.c (print_mem_ref): Strip array from access type.
25 Avoid assuming acces type's size is constant. Correct condition
26 guarding the printing of a parenthesis.
27
942ae5be
GA
282021-01-06 Martin Sebor <msebor@redhat.com>
29
30 PR c++/95768
31 * c-pretty-print.c (c_pretty_printer::primary_expression): For
32 SSA_NAMEs print VLA names and GIMPLE defining statements.
33 (print_mem_ref): New function.
34 (c_pretty_printer::unary_expression): Call it.
35
362021-01-06 Richard Biener <rguenther@suse.de>
37
38 PR tree-optimization/95582
39 * c-attribs.c (c_common_attribute_table): Add entry for
40 signed_bool_precision.
41 (handle_signed_bool_precision_attribute): New.
42
8daa719b
GA
432020-12-24 Iain Sandoe <iain@sandoe.co.uk>
44
45 * c.opt: Add -stdlib= option and enumerations for
46 libstdc++ and libc++.
47
eefe499f
GA
482020-12-16 Martin Liska <mliska@suse.cz>
49
50 * c.opt: Remove usage of Report.
51
d52945ce
GA
522020-12-14 Martin Sebor <msebor@redhat.com>
53
54 PR middle-end/98166
55 PR c++/57111
56 PR middle-end/98160
57 * c-attribs.c (maybe_add_noinline): New function.
58 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
59 Implicitly add attribute noinline to functions not declared inline
60 and warn on those.
61
ca2bd949
GA
622020-12-09 Tobias Burnus <tobias@codesourcery.com>
63
64 * c-pragma.c (omp_pragmas): Add 'allocate'.
65 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
66
f6e8e279
GA
672020-12-08 Jakub Jelinek <jakub@redhat.com>
68
69 PR c++/98187
70 * c-pragma.c (omp_pragmas): Remove "master".
71 (omp_pragmas_simd): Add "master".
72
bc8a7013
GA
732020-12-07 Marek Polacek <polacek@redhat.com>
74
75 PR c++/98126
76 * c-common.c (verify_tree_lim_r): New function.
77 (verify_sequence_points): Use it. Use nullptr instead of 0.
78
b8dd0ef7
GA
792020-12-03 Martin Sebor <msebor@redhat.com>
80
81 PR c++/90629
82 PR middle-end/94527
83 * c-attribs.c (handle_dealloc_attribute): New function.
84 (handle_malloc_attribute): Handle argument forms of attribute.
85 * c.opt (-Wmismatched-dealloc): New option.
86 (-Wmismatched-new-delete): New option.
87
882020-12-03 Jakub Jelinek <jakub@redhat.com>
89
90 PR libstdc++/93121
91 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
92 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
93
e0f5e792
GA
942020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
95
96 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
97 {__GNUC_EXECUTION_CHARSET_NAME} and
98 _WIDE_EXECUTION_CHARSET_NAME} macros.
99
1002020-12-01 Nathan Sidwell <nathan@acm.org>
101
102 * c-common.c (module, import, export): New internal tokens (with
103 trailing space).
104 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
105 them.
106 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
107 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
108
1092020-12-01 Nathan Sidwell <nathan@acm.org>
110
111 * c-opts.c (c_common_init_options): Ask for module dependencies.
112 (c_common_handle_option): Handle -Mmodules -Mno-modules.
113 * c-pch.c (c_common_valid_pch): ... does not play with C++
114 modules.
115 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
116 options.
117 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
118 (fmodule-only, fmodule-mapper, fmodule-lazy)
119 (fmodule-version-ignore, Winvalid-imported-macros)
120 (flang-info-include-translate, flang-info-include-translate-not):
121 New options
122
5fbf0ecb
GA
1232020-11-28 Eric Botcazou <ebotcazou@adacore.com>
124
125 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
126 (dump_ada_structure): Also deal with convention, unchecked union and
127 bit-field for nested types. In the latter case, print an Alignment
128 aspect along with the Pack aspect.
129
360258da
GA
1302020-11-25 Martin Sebor <msebor@redhat.com>
131
132 PR bootstrap/94982
133 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
134 -Wformat-diag.
135
1e2c9a27
GA
1362020-11-24 Martin Sebor <msebor@redhat.com>
137
138 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
139
8e6198d0
GA
1402020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
141
142 * c-attribs.c (handle_special_var_sec_attribute): New.
143 (handle_noinit_attribute): Remove.
144 (attr_noinit_exclusions): Rename to...
145 (attr_section_exclusions): ...this, and add "persistent" attribute
146 exclusion.
147 (c_common_attribute_table): Add "persistent" attribute.
148
7a97e2fc
GA
1492020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
150
151 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
152 Treat opaque types like other types.
153 (c_pretty_printer::direct_abstract_declarator): Opaque types are
154 supported types.
155
82e5048e
GA
1562020-11-20 Martin Sebor <msebor@redhat.com>
157
158 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
159 with fewer arguments.
160
1612020-11-20 Martin Sebor <msebor@redhat.com>
162
163 PR middle-end/97879
164 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
165 Error out on invalid modes.
166
1672020-11-20 Jakub Jelinek <jakub@redhat.com>
168
169 PR libstdc++/88101
170 * c-common.c (check_builtin_function_arguments): Handle
171 BUILT_IN_CLEAR_PADDING.
172
25bb75f8
GA
1732020-11-18 Nathan Sidwell <nathan@acm.org>
174
175 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
176
4dabb037
GA
1772020-11-17 Nathan Sidwell <nathan@acm.org>
178
179 * c-common.h (enum c_tree_index): Reorder to place lazy fields
180 after newly-added CTI_MODULE_HWM.
181
1822020-11-17 Joseph Myers <joseph@codesourcery.com>
183
184 * c-cppbuiltin.c (builtin_define_float_constants): Define
185 "*_IS_IEC_60559__" macros.
186
1872020-11-17 Nathan Sidwell <nathan@acm.org>
188
189 * c-lex.c: #include "langhooks.h".
190 (cb_undef): Maybe call preprocess_undef lang hook.
191 * c-opts.c (c_common_post_options): Maybe call preprocess_options
192 lang hook.
193 (push_command_line_include): Maybe call preprocess_main_file lang
194 hook.
195 (cb_file_change): Likewise.
196 * c-ppoutput.c: #include "langhooks.h.
197 (scan_translation_unit): Maybe call preprocess_token lang hook.
198 (class do_streamer): New, derive from token_streamer.
199 (directives_only_cb): Data pointer is do_streamer, call
200 preprocess_token lang hook.
201 (scan_translation_unit_directives_only): Use do_streamer.
202 (print_line_1): Move src_line recording to after string output.
203 (cb_undef): Maybe call preprocess_undef lang hook.
204
2052020-11-17 Nathan Sidwell <nathan@acm.org>
206
207 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
208 code duplicating that functionality.
209
2102020-11-17 Jakub Jelinek <jakub@redhat.com>
211
212 PR c/90628
213 * c-common.c (check_builtin_function_arguments)
214 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
215 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
216 for more builtins and argument positions.
217
29c5d9ce
GA
2182020-11-16 Iain Sandoe <iain@sandoe.co.uk>
219
220 PR objc/97854
221 * stub-objc.c: Include c-common.h to declare enum rid.
222
77f67db2
GA
2232020-11-13 Jakub Jelinek <jakub@redhat.com>
224
225 PR c++/63287
226 * c-cppbuiltin.c: Include configargs.h.
227 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
228 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
229 "single".
230
2312020-11-13 Gergö Barany <gergo@codesourcery.com>
232 Thomas Schwinge <thomas@codesourcery.com>
233
234 * c.opt (fopenacc-kernels): Add.
235
2362020-11-13 Jason Merrill <jason@redhat.com>
237
238 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
239
2402020-11-13 Piotr H. Dabrowski <phd@phd.re>
241
242 PR c++/91318
243 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
244
2452020-11-13 Martin Liska <mliska@suse.cz>
246
247 * c-attribs.c (build_attr_access_from_parms): Format properly.
248
2492020-11-13 Iain Sandoe <iain@sandoe.co.uk>
250
251 PR objc/90707
252 * c-common.c (c_common_reswords): null_unspecified, nullable,
253 nonnull, null_resettable: New keywords.
254 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
255 RID_NONNULL, RID_NULL_RESETTABLE: New.
256 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
257 ranges accepted for property attributes.
258 * c-attribs.c (handle_objc_nullability_attribute): New.
259 * c-objc.h (enum objc_property_attribute_group): Add
260 OBJC_PROPATTR_GROUP_NULLABLE.
261 (enum objc_property_attribute_kind):Add
262 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
263 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
264
2652020-11-13 Iain Sandoe <iain@sandoe.co.uk>
266
267 PR objc/77404
268 * c-attribs.c (handle_objc_root_class_attribute): New
269 * c-objc.h (objc_start_class_interface): Add a location
270 value for the position of the class name.
271 * c.opt: Add Wobjc-root-class.
272 * stub-objc.c (objc_start_class_interface): Add a location
273 value for the position of the class name.
274
a5a11525
GA
2752020-11-12 Joseph Myers <joseph@codesourcery.com>
276
277 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
278 Allow scope for C. Handle standard attributes for C. Do not
279 accept unscoped attributes if std_syntax and not handled as
280 standard attributes.
281 * c-common.h (c_common_has_attribute): Update prototype.
282
2832020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
284
285 PR pch/86674
286 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
287 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
288
0f5f9ed5
GA
2892020-11-11 Patrick Palka <ppalka@redhat.com>
290
291 PR c++/88115
292 * c-opts.c (c_common_post_options): Update latest_abi_version.
293
bb622641
GA
2942020-11-10 Jakub Jelinek <jakub@redhat.com>
295
296 PR c/97748
297 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
298 to false.
299 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
300 recursively and just return true instead of warning if it is true.
301 Handle COMPLEX_EXPR.
302
3032020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
304
305 * c-common.h (c_omp_adjust_map_clauses): New declaration.
306 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
307 (c_omp_adjust_map_clauses): New function.
308
2bee28dd
GA
3092020-11-09 Marek Polacek <polacek@redhat.com>
310
311 DR 1914
312 * c-common.c (attribute_fallthrough_p): Tweak the warning
313 message.
314
3152020-11-09 Patrick Palka <ppalka@redhat.com>
316
317 * c-pragma.c (handle_pragma_diagnostic): Split the
318 unknown-option -Wpragmas diagnostic into a warning and a
319 subsequent note containing a spelling suggestion. Avoid
320 computing the suggestion if -Wpragmas warnings are being
321 suppressed.
322
3232020-11-09 Patrick Palka <ppalka@redhat.com>
324
325 PR testsuite/97117
326 * c-indentation.c (get_visual_column): Remove location_t
327 parameter. Move the column-tracking diagnostic code from here
328 to ...
329 (should_warn_for_misleading_indentation): ... here, before the
330 early exit for when the loci are not all distinct. Don't pass a
331 location_t argument to get_visual_column.
332 (assert_get_visual_column_succeeds): Don't pass a location_t
333 argument to get_visual_column.
334 (assert_get_visual_column_fails): Likewise.
335
fb95de7a
GA
3362020-11-08 Iain Sandoe <iain@sandoe.co.uk>
337
338 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
339 of keywords accepted in @property attribute contexts.
340 * c-objc.h (enum objc_property_attribute_group): Add
341 OBJC_PROPATTR_GROUP_CLASS.
342 (enum objc_property_attribute_kind): Add
343 OBJC_PROPERTY_ATTR_CLASS.
344
2da7ee05
GA
3452020-11-07 Iain Sandoe <iain@sandoe.co.uk>
346
347 * c-common.c (c_common_reswords): Add 'atomic' property
348 attribute.
349 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
350 property attributes.
351
3522020-11-07 Iain Sandoe <iain@sandoe.co.uk>
353
354 * c-attribs.c (handle_nsobject_attribute): New.
355 * c.opt: Add WNSObject-attribute.
356
44cab2d8
GA
3572020-11-06 Iain Sandoe <iain@sandoe.co.uk>
358
359 * c-objc.h (enum objc_property_attribute_group): New
360 (enum objc_property_attribute_kind): New.
361 (OBJC_PROPATTR_GROUP_MASK): New.
362 (struct property_attribute_info): Small class encapsulating
363 parser output from property attributes.
364 (objc_prop_attr_kind_for_rid): New
365 (objc_add_property_declaration): Simplify interface.
366 * stub-objc.c (enum rid): Dummy type.
367 (objc_add_property_declaration): Simplify interface.
368 (objc_prop_attr_kind_for_rid): New.
369
3702020-11-06 Nathan Sidwell <nathan@acm.org>
371
372 * c-ada-spec.c (collect_ada_nodes): Rename
373 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
374 (collect_ada_node): Likewise.
375 (dump_forward_type): Likewise.
376 * c-common.c (set_underlying_type): Rename
377 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
378 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
379
3802020-11-06 Jakub Jelinek <jakub@redhat.com>
381
382 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
383
0cfd9109
GA
3842020-11-05 Marek Polacek <polacek@redhat.com>
385
386 PR c++/97675
387 * c.opt (Wexceptions): New option.
388
3892020-11-05 Marek Polacek <polacek@redhat.com>
390
391 PR c++/25814
392 * c.opt (Wvexing-parse): New option.
393
35c125cb
GA
3942020-11-04 Jakub Jelinek <jakub@redhat.com>
395
396 PR c++/97670
397 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
398 underlying decl to clear in the allocate_head bitmap.
399
4002020-11-04 Iain Sandoe <iain@sandoe.co.uk>
401
402 * c-objc.h (objc_non_constant_expr_p): New.
403 * stub-objc.c (objc_non_constant_expr_p): New.
404
fd2325ea
GA
4052020-11-03 Nathan Sidwell <nathan@acm.org>
406
407 * c.opt (MQ,MT): Reword description to be make-agnostic.
408
88ce3d5f
GA
4092020-11-02 Nathan Sidwell <nathan@acm.org>
410
411 * c-opts.c (c_common_post_options): Move var decl to its
412 initialization point.
413
4142020-11-01 Iain Sandoe <iain@sandoe.co.uk>
415
416 * c-lex.c (c_lex_with_flags): When combining '@' with a
417 keyword for Objective-C, combine the location ranges too.
418
4192020-10-30 Qing Zhao <qing.zhao@oracle.com>
420 H.J.Lu <hjl.tools@gmail.com>
421
422 * c-attribs.c (c_common_attribute_table): Add new attribute
423 zero_call_used_regs.
424 (handle_zero_call_used_regs_attribute): New function.
425
e93aae4a
GA
4262020-10-28 Marek Polacek <polacek@redhat.com>
427
428 PR c++/97573
429 * c-opts.c (c_common_post_options): In C++20, turn on
430 -Wdeprecated-enum-enum-conversion and
431 -Wdeprecated-enum-float-conversion.
432 * c.opt (Wdeprecated-enum-enum-conversion,
433 Wdeprecated-enum-float-conversion): New options.
434 (Wenum-conversion): Allow for C++ too.
435
4362020-10-28 Jakub Jelinek <jakub@redhat.com>
437
438 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
439 * c-omp.c: Include bitmap.h.
440 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
441
f19e7c8d
GA
4422020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
443
444 * c-common.c (__is_nothrow_assignable): New.
445 (__is_nothrow_constructible): Likewise.
446 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
447 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
448
efe71fcc
GA
4492020-10-23 Jan Hubicka <hubicka@ucw.cz>
450
451 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
452
4532020-10-23 Marek Polacek <polacek@redhat.com>
454
455 PR c++/91741
456 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
457 (c_common_init_ts): Likewise.
458 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
459 * c-common.h (maybe_warn_sizeof_array_div): Declare.
460 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
461 (maybe_warn_sizeof_array_div): New function.
462 * c.opt (Wsizeof-array-div): New option.
463
4642020-10-23 Martin Sebor <msebor@redhat.com>
465
466 PR c/97463
467 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
468
56ddd5e2
GA
4692020-10-22 Martin Liska <mliska@suse.cz>
470
471 PR c/94722
472 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
473 (handle_stack_protect_attribute): Add error message for a
474 no_stack_protector function.
475
4762020-10-22 Martin Liska <mliska@suse.cz>
477
478 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
479
4802020-10-22 Jan Hubicka <hubicka@ucw.cz>
481
482 * c-gimplify.c: Include tree-nested.h
483 (c_genericize): Update for new nested function info.
484
b2698c21
GA
4852020-10-14 Martin Sebor <msebor@redhat.com>
486
487 PR c/97413
488 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
489 bounds in an extra list.
490
7e9282ae
GA
4912020-10-05 Richard Biener <rguenther@suse.de>
492 Jakub Jelinek <jakub@redhat.com>
493
494 PR c++/97197
495 * c-pretty-print.c: Include langhooks.h.
496 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
497 expression.
498 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
499 unary_expression.
500 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
501
660bfe61
GA
5022020-09-30 Martin Sebor <msebor@redhat.com>
503
504 PR middle-end/97189
505 * c-attribs.c (append_access_attr): Use the function declaration
506 location for a warning about an attribute access argument.
507
93bca37c
GA
5082020-09-29 Marek Polacek <polacek@redhat.com>
509
510 PR c++/94695
511 * c.opt (Wrange-loop-construct): New option.
512
82b77dee
GA
5132020-09-23 Martin Sebor <msebor@redhat.com>
514
515 PR c/97131
516 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
517
5182020-09-23 Marek Polacek <polacek@redhat.com>
519
520 PR c/97125
521 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
522 after loops and other structured control constructs have been lowered.
523
521d2711
GA
5242020-09-22 Jakub Jelinek <jakub@redhat.com>
525
526 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
527 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
528
44135373
GA
5292020-09-21 Marek Polacek <polacek@redhat.com>
530
531 * c.opt (Wctad-maybe-unsupported): New option.
532
2fe5b7d1
GA
5332020-09-19 Martin Sebor <msebor@redhat.com>
534
535 PR c/50584
536 * c-common.h (warn_parm_array_mismatch): Declare new function.
537 (has_attribute): Move declaration of an existing function.
538 (build_attr_access_from_parms): Declare new function.
539 * c-warn.c (parm_array_as_string): Define new function.
540 (plus_one): Define new function.
541 (warn_parm_ptrarray_mismatch): Define new function.
542 (warn_parm_array_mismatch): Define new function.
543 (vla_bound_parm_decl): New function.
544 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
545 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
546 qualifiers here...
547 (c_pretty_printer::direct_abstract_declarator): ...but instead print
548 them in brackets here. Also print [static]. Strip extraneous
549 expressions from VLA bounds.
550
5512020-09-19 Martin Sebor <msebor@redhat.com>
552
553 PR c/50584
554 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
555 (handle_argspec_attribute): New function.
556 (get_argument, get_argument_type): New functions.
557 (append_access_attrs): Add overload. Handle internal attribute
558 representation in addition to external.
559 (handle_access_attribute): Handle internal attribute representation
560 in addition to external.
561 (build_attr_access_from_parms): New function.
562
5632020-09-19 Sandra Loosemore <sandra@codesourcery.com>
564
565 * c-gimplify.c (genericize_c_loop): Rewrite to match
566 c_finish_loop in c-typeck.c.
567
5682020-09-19 Sandra Loosemore <sandra@codesourcery.com>
569
570 * c-common.c (c_block_may_fallthrough): New, split from
571 cxx_block_may_fallthrough in the cp front end.
572 (c_common_init_ts): Move handling of loop and switch-related
573 statements here from the cp front end.
574 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
575 cp front end.
576 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
577 * c-common.h (c_block_may_fallthru): Declare.
578 (bc_state_t): Move here from cp front end.
579 (save_bc_state, restore_bc_state): Declare.
580 (c_genericize_control_stmt): Declare.
581 (WHILE_COND, WHILE_BODY): Likewise.
582 (DO_COND, DO_BODY): Likewise.
583 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
584 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
585 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
586 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
587 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
588 * c-dump.c (dump_stmt): Copy from cp front end.
589 (c_dump_tree): Move code to handle structured loop and switch
590 tree nodes here from cp front end.
591 * c-gimplify.c: Adjust includes.
592 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
593 cp front end.
594 (save_bc_state, restore_bc_state): New functions using old code
595 from cp front end.
596 (get_bc_label, expr_loc_or_loc): Move from cp front end.
597 (genericize_c_loop): Move from cp front end.
598 (genericize_for_stmt, genericize_while_stmt): Likewise.
599 (genericize_do_stmt, genericize_switch_stmt): Likewise.
600 (genericize_continue_stmt, genericize_break_stmt): Likewise.
601 (genericize_omp_for_stmt): Likewise.
602 (c_genericize_control_stmt): New function using code split from
603 cp front end.
604 (c_genericize_control_r): New.
605 (c_genericize): Call walk_tree with c_genericize_control_r.
606 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
607 structured loop and switch tree nodes here from cp front end.
608
2aad20c0
GA
6092020-09-17 Patrick Palka <ppalka@redhat.com>
610
611 PR c/80076
612 * c-indentation.c (should_warn_for_misleading_indentation): Move
613 declarations of local variables closer to their first use.
614 Handle virtual token locations by resolving them to their
615 respective macro expansion points. If all three tokens are
616 produced from the same macro expansion, then instead use their
617 loci within the macro definition.
618
ecde1b0a
GA
6192020-09-16 Martin Sebor <msebor@redhat.com>
620
621 PR c/78666
622 PR c/96126
623 * c-attribs.c (validate_attr_args): New function.
624 (validate_attr_arg): Same.
625 (handle_section_attribute): Call it. Introduce a local variable.
626 (handle_alloc_size_attribute): Same.
627 (handle_alloc_align_attribute): Same.
628
50a71cd0
GA
6292020-09-14 Jakub Jelinek <jakub@redhat.com>
630
631 * c-attribs.c (handle_optimize_attribute): Adjust
632 cl_optimization_save, cl_optimization_restore and
633 build_optimization_node callers.
634 * c-pragma.c (handle_pragma_optimize): Adjust
635 build_optimization_node caller.
636 (handle_pragma_push_options): Adjust
637 build_optimization_node and build_target_option_node callers.
638 (handle_pragma_pop_options, handle_pragma_reset_options):
639 Adjust cl_optimization_restore callers.
640
8f7ea26a
GA
6412020-08-28 Martin Sebor <msebor@redhat.com>
642
643 * c.opt (Wstringop-overread): New option.
644
a6493809
GA
6452020-08-11 Jakub Jelinek <jakub@redhat.com>
646
647 PR c/96545
648 * c-common.c (get_atomic_generic_size): Require that first argument's
649 type points to a complete type and use tree_fits_uhwi_p instead of
650 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
651
48cc2e46
GA
6522020-07-31 Martin Sebor <msebor@redhat.com>
653
654 PR c++/96003
655 * c-common.c (check_function_arguments_recurse): Return early when
656 no-warning bit is set.
657
6582020-07-31 Richard Biener <rguenther@suse.de>
659
660 PR debug/96383
661 * c-common.h (c_common_finalize_early_debug): Declare.
662 * c-common.c: Include debug.h.
663 (c_common_finalize_early_debug): finalize_early_debug langhook
664 implementation generating debug for extern declarations.
665
e71dab87
GA
6662020-07-27 Nathan Sidwell <nathan@acm.org>
667
668 * c-common.c (try_to_locate_new_include_insertion_point): Use
669 strcmp, not pointer equality.
670
ae2e0bc1
GA
6712020-07-25 Martin Sebor <msebor@redhat.com>
672
673 PR c++/96310
674 * c-common.c (check_nonnull_arg): Print note only when warning was
675 issued.
676
3ea9abca
GA
6772020-07-22 Tobias Burnus <tobias@codesourcery.com>
678
679 * c-omp.c (c_finish_omp_critical): Check for no name but
680 nonzero hint provided.
681
0933f508
GA
6822020-07-20 Jason Merrill <jason@redhat.com>
683
684 * c-cppbuiltin.c (c_cpp_builtins): Update
685 __cpp_nontype_template_args for C++20.
686
6872020-07-20 Martin Sebor <msebor@redhat.com>
688
689 PR c/96249
690 * c.opt: Remove stray text.
691
8ca07a30
GA
6922020-07-14 Lewis Hyatt <lhyatt@gmail.com>
693
694 PR other/86904
695 * c-indentation.c (should_warn_for_misleading_indentation): Get
696 global tabstop from the new source.
697 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
698 is now a common option.
699 * c.opt: Likewise.
700
a82c4c4c 7012020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
702
703 * c.opt (Wscalar-storage-order): Add explicit variable.
704
f60ee68d
GA
7052020-07-07 Nathan Sidwell <nathan@acm.org>
706
707 * c-opts.c (c_common_post_options): Add 'injecting' arg to
708 cpp_read_main_file.
709 (c_finish_options): Add linemap_line_start calls for builtin and cmd
710 maps. Force token position to line_table's highest line.
711 * c-ppoutput.c (print_line_1): Refactor, print line zero.
712 (cb_define): Always increment source line.
713
4077d74c
GA
7142020-07-06 Martin Sebor <msebor@redhat.com>
715
716 PR c++/95984
717 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
718 to stub lambda objects with null this pointer.
719 (check_nonnull_arg): Handle C++ nullptr.
720
b5f24739
GA
7212020-07-02 Jason Merrill <jason@redhat.com>
722 Jakub Jelinek <jakub@redhat.com>
723
724 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
725
46fbb6c6
GA
7262020-06-30 Jakub Jelinek <jakub@redhat.com>
727
728 PR c++/95963
729 * c-common.c (check_function_arguments_recurse): Don't crash on
730 calls to internal functions.
731
69273534
GA
7322020-06-28 Martin Sebor <msebor@redhat.com>
733
734 PR c++/86568
735 * c-common.c (struct nonnull_arg_ctx): Add members.
736 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
737 C++ member functions specially. Consider the this pointer implicitly
738 nonnull.
739 (check_nonnull_arg): Use location of argument when available.
740 (check_function_arguments): Use nonnull_arg_ctx as argument.
741
9a33c41f
GA
7422020-06-27 Jakub Jelinek <jakub@redhat.com>
743
744 PR middle-end/95903
745 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
746 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
747 smaller precision intop operands separately.
748
c9c05f73
GA
7492020-06-26 Marek Polacek <polacek@redhat.com>
750
751 * c-opts.c (c_common_init_options): Default to gnu++17.
752
aff95ee7
GA
7532020-06-17 Jonathan Wakely <jwakely@redhat.com>
754
bd0a89dc 755 PR c/95378
aff95ee7
GA
756 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
757 pointer arguments.
758
56638b9b
GA
7592020-06-16 Jakub Jelinek <jakub@redhat.com>
760
761 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
762 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
763 idx members.
764 (c_omp_is_loop_iterator): New function.
765 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
766 if outer loop iterator is present. Perform duplicate checking through
767 hash_set in the function rather than expecting caller to do that.
768 Pass NULL instead of d->ppset to walk_tree_1.
769 (c_omp_check_nonrect_loop_iv): New function.
770 (c_omp_check_loop_iv): Use it. Fill in new members, allow
771 non-rectangular loop forms, diagnose multiple associated loops with
772 the same iterator. Pass NULL instead of &pset to walk_tree_1.
773 (c_omp_check_loop_iv_exprs): Likewise.
774
ec6ffbb9
GA
7752020-06-10 Martin Liska <mliska@suse.cz>
776
777 PR tree-optimization/92860
778 * c-attribs.c (handle_optimize_attribute):
779 Save global options and compare it after parsing of function
780 attribute.
781 * c-pragma.c (opt_stack::saved_global_options): New field.
782 (handle_pragma_push_options): Save global_options.
783 (handle_pragma_pop_options): Compare them after pop.
784
b952c2cf
GA
7852020-06-09 Jakub Jelinek <jakub@redhat.com>
786
787 PR c/95580
788 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
789 case when MEM_REF's first argument has type pointer to incomplete type.
790
1a59f3db
GA
7912020-06-05 Jason Merrill <jason@redhat.com>
792
793 * c-pretty-print.c (pp_c_additive_expression): Handle negative
794 operand to POINTER_PLUS_EXPR.
795
3add3425
GA
7962020-06-04 Martin Sebor <msebor@redhat.com>
797
798 PR middle-end/10138
799 PR middle-end/95136
800 * c-attribs.c (append_access_attrs): Handle attr_access::none.
801 (handle_access_attribute): Same.
802
9a5b7438
GA
8032020-06-03 Mark Wielaard <mark@klomp.org>
804
805 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
806 New function.
807 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
808 New function declaration.
809
8102020-06-03 Mark Wielaard <mark@klomp.org>
811
812 * known-headers.cc (get_string_macro_hint): New function.
813 (get_stdlib_header_for_name): Use get_string_macro_hint.
814 (get_c_stdlib_header_for_string_macro_name): New function.
815 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
816 New function declaration.
817
8182020-06-03 Tobias Burnus <tobias@codesourcery.com>
819
820 * c-common.h (c_omp_predetermined_mapping): Declare.
821 * c-omp.c (c_omp_predetermined_mapping): New.
822
af114c38
MW
8232020-05-22 Mark Wielaard <mark@klomp.org>
824
825 * known-headers.cc (get_stdlib_header_for_name): Add a new
826 stdlib_hint array for stdbool and stdint.
827
45c50b6a
MW
8282020-05-22 Mark Wielaard <mark@klomp.org>
829
830 * known-headers.cc (get_stdlib_header_for_name): Return
831 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
832 flag_isoc99.
833
c22027a0
NS
8342020-05-20 Nathan Sidwell <nathan@acm.org>
835
38a4db21
NS
836 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
837
c22027a0
NS
838 * c-common.c (try_to_locate_new_include_insertion_point): Use
839 strcmp to compare filenames.
840 * c-lex.c (init_c_lex): Move declaration to initialization.
841 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
842 deferred count loop.
843
29f0e90d
JM
8442020-05-15 Jason Merrill <jason@redhat.com>
845
846 * c-opts.c (set_std_cxx20): Set flag_coroutines.
847
b04445d4
JM
8482020-05-13 Jason Merrill <jason@redhat.com>
849
850 * c.opt (std=c++20): Make c++2a the alias.
851 (std=gnu++20): Likewise.
852 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
853 * c-opts.c: Adjust.
854 * c-cppbuiltin.c: Adjust.
855 * c-ubsan.c: Adjust.
856 * c-warn.c: Adjust.
857
11dd3be5
EB
8582020-05-12 Eric Botcazou <ebotcazou@adacore.com>
859
860 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
861
b224c376
NS
8622020-05-08 Nathan Sidwell <nathan@acm.org>
863
864 Reimplement directives only processing.
865 * c-ppoutput.c (token_streamer): Ne.
866 (directives_only_cb): New. Swallow ...
867 (print_lines_directives_only): ... this.
868 (scan_translation_unit_directives_only): Reimplment using the
869 published interface.
870
f1d94677
MP
8712020-05-07 Marek Polacek <polacek@redhat.com>
872
873 * c-format.c (badwords): Add "nonstatic".
874
9b95bb52
JJ
875202-05-07 Jakub Jelinek <jakub@redhat.com>
876
877 PR c/94968
878 * c-common.c (speculation_safe_value_resolve_params): Return false if
879 error_operand_p (val2).
880 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
881 Remove extraneous semicolon.
882
530b4409 8832020-05-06 qing zhao <qing.zhao@oracle.com>
884
885 PR c/94230
886 * c-indentation.c (get_visual_column): Add a hint to use the new
887 -flarge-source-files option.
888
b776bdca
SSF
8892020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
890
891 * c-attribs.c (handle_vector_size_attribute): Add attribute
892 nonnull for argument args in order to silence warning of
893 uninitialized variable usage. Since this is local to the
894 compilation unit and thus cannot be checked at call sides by the
895 compiler, added an assert statement in order to verify this.
896
6607bdd9
L
8972020-05-01 H.J. Lu <hongjiu.lu@intel.com>
898
899 PR target/93492
900 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
901 value to USHRT_MAX (65535).
902
691eeb65
JJ
9032020-04-29 Jakub Jelinek <jakub@redhat.com>
904
905 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
906
26d76be7
JJ
9072020-04-27 Jakub Jelinek <jakub@redhat.com>
908
909 PR c/94755
910 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
911 fncode == BUILT_IN_NONE before initialization of first_param.
912
7291b2ed
MP
9132020-04-23 Marek Polacek <polacek@redhat.com>
914
915 PR c++/94733
916 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
917 TREE_PURPOSE.
918
58a29af8
PP
9192020-04-14 Patrick Palka <ppalka@redhat.com>
920
921 PR c++/85278
922 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
923 ampersand if it's an rvalue reference type.
924
09f04139
MS
9252020-04-13 Martin Sebor <msebor@redhat.com>
926
927 PR c/92326
928 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
929 printing array bound for flexible array members.
930
ee26baf4
IS
9312020-04-13 Iain Sandoe <iain@sandoe.co.uk>
932
933 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
934 define, per n4861.
935
75efe9cb
RB
9362020-04-02 Richard Biener <rguenther@suse.de>
937
938 PR c/94392
939 * c-opts.c (c_common_post_options): Enable -ffinite-loops
940 for -O2 and C++11 or newer.
941
75defde9
PP
9422020-03-28 Patrick Palka <ppalka@redhat.com>
943
944 * c.opt: Add -fconcepts-diagnostics-depth.
945
52f24a9e
MS
9462020-03-27 Martin Sebor <msebor@redhat.com>
947
948 PR c++/94346
949 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
950 to decl_attributes. Make handling of different kinds of entities
951 more robust.
952
ccacf77b
MS
9532020-03-27 Martin Sebor <msebor@redhat.com>
954
955 PR c++/94098
956 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
957 here.
958
ca6c7225
JJ
9592020-03-23 Jakub Jelinek <jakub@redhat.com>
960
961 PR c++/91993
962 * c-warn.c (warnings_for_convert_and_check): For expr and/or
963 result being COMPOUND_EXPRs, skip to ultimate rhs.
964
1aa22b19
RS
9652020-03-20 Richard Sandiford <richard.sandiford@arm.com>
966
967 PR middle-end/94072
968 * c-common.c (c_common_type_for_mode): Before using a registered
969 built-in type, check that the vectorness of the type matches
970 the vectorness of the mode.
971
700d4cb0
JJ
9722020-03-17 Jakub Jelinek <jakub@redhat.com>
973
974 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
975 issue in a diagnostic message.
976
b408e010
LH
9772020-03-15 Lewis Hyatt <lhyatt@gmail.com>
978
979 * c.opt: Avoid redundancy in the help text.
980
e78e50d5
MP
9812020-03-02 Marek Polacek <polacek@redhat.com>
982
983 PR c++/93958 - add missing -std=gnu++20.
984 * c.opt: Add -std=gnu++20.
985
649e1741
MS
9862020-03-01 Martin Sebor <msebor@redhat.com>
987
988 PR c++/92721
989 * c-attribs.c (append_access_attrs): Correctly handle attribute.
990 (handle_access_attribute): Same.
991
7b60f3ba
JJ
9922020-02-25 Jakub Jelinek <jakub@redhat.com>
993
994 PR c/93858
995 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
996 "did you mean" hint in diagnostics.
997
fb260504
JM
9982020-02-15 Jason Merrill <jason@redhat.com>
999
1000 * c.opt: Add -std=c++20.
1001
1d757b09
EB
10022020-02-14 Eric Botcazou <ebotcazou@adacore.com>
1003
1004 * c-ada-spec.c: Include bitmap.h.
1005 (dump_ada_double_name): Rename into...
1006 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
1007 (dump_ada_array_type): Adjust to above renaming. Robustify.
1008 (dump_nested_types_1): New function copied from... Add dumped_types
1009 parameter and pass it down to dump_nested_type.
1010 (dump_nested_types): ...this. Remove parent parameter. Just call
1011 dump_nested_types_1 on an automatic bitmap.
1012 (dump_nested_type): Add dumped_types parameter.
1013 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
1014 Adjust recursive calls and adjust to above renaming.
1015 (dump_ada_declaration): Adjust call to dump_nested_types.
1016 Tidy up and adjust to above renaming.
1017 (dump_ada_specs): Initialize and release bitmap obstack.
1018
0cc575e4
MS
10192020-02-10 Martin Sebor <msebor@redhat.com>
1020
1021 PR c/93640
1022 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
1023
a59aa302
JJ
10242020-02-10 Jakub Jelinek <jakub@redhat.com>
1025
1026 PR other/93641
1027 * c-format.c (check_plain): Fix up last argument of strncasecmp.
1028 Remove useless extra test.
1029
e464fc90
TB
10302020-02-03 Julian Brown <julian@codesourcery.com>
1031 Tobias Burnus <tobias@codesourcery.com>
1032
1033 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
1034
e3b6c052
JM
10352020-01-29 Jason Merrill <jason@redhat.com>
1036
1037 PR c++/89357
1038 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
1039
6d00f052
JM
10402020-01-23 Jason Merrill <jason@redhat.com>
1041
1042 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
1043
8a990ffa
MS
10442020-01-23 Martin Sebor <msebor@redhat.com>
1045
1046 PR c/84919
1047 * c-common.c (check_function_arguments): Avoid overlap checking
1048 of sprintf functions.
1049
55b7df8b
JM
10502020-01-22 Jason Merrill <jason@redhat.com>
1051
1052 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
1053 PR c++/40752
1054 * c-warn.c (conversion_warning): Check operands only after checking
1055 the whole expression. Don't check second operand of + for sign.
1056
c77074d0
JM
10572020-01-21 Jason Merrill <jason@redhat.com>
1058 Manuel López-Ibáñez <manu@gcc.gnu.org>
1059
1060 PR c++/40752 - useless -Wconversion with short +=.
1061 * c.opt (-Warith-conversion): New.
1062 * c-warn.c (conversion_warning): Recurse for operands of
1063 operators. Only warn about the whole expression with
1064 -Warith-conversion.
1065
731dbfc3
JM
10662020-01-21 Jason Merrill <jason@redhat.com>
1067
1068 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
1069 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
1070
ad1a3914
NS
10712020-01-20 Nathan Sidwell <nathan@acm.org>
1072
1073 PR preprocessor/80005
1074 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
1075
49789fd0
IS
10762020-01-18 Iain Sandoe <iain@sandoe.co.uk>
1077
1078 * c-common.c (co_await, co_yield, co_return): New.
1079 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
1080 RID_CO_RETURN): New enumeration values.
1081 (D_CXX_COROUTINES): Bit to identify coroutines are active.
1082 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
1083 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
1084 * c.opt (fcoroutines): New command-line switch.
1085
4bc1899b
DM
10862020-01-10 David Malcolm <dmalcolm@redhat.com>
1087
1088 * c-format.c (local_event_ptr_node): New.
1089 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
1090 (init_dynamic_diag_info): Initialize local_event_ptr_node.
1091 * c-format.h (T_EVENT_PTR): New define.
1092
f25e33fa
MS
10932020-01-10 Martin Sebor <msebor@redhat.com>
1094
1095 PR c/93132
1096 * c-attribs.c (append_access_attrs): Validate against the translated
1097 access string rather than the human-readable representation.
1098
8d9254fc
JJ
10992020-01-01 Jakub Jelinek <jakub@redhat.com>
1100
1101 Update copyright years.
1102
39292e25
EB
11032019-12-20 Eric Botcazou <ebotcazou@adacore.com>
1104
1105 * c-ada-spec.h (decl_sloc): Delete.
1106 * c-ada-spec.c (decl_sloc): Make static.
1107
519d7496
JB
11082019-12-19 Julian Brown <julian@codesourcery.com>
1109
1110 * c-common.h (c_omp_map_clause_name): Add prototype.
1111 * c-omp.c (c_omp_map_clause_name): New function.
1112 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
1113 PRAGMA_OACC_CLAUSE_DETACH.
1114
a6163563
JB
11152019-12-19 Julian Brown <julian@codesourcery.com>
1116 Maciej W. Rozycki <macro@codesourcery.com>
1117 Tobias Burnus <tobias@codesourcery.com>
1118 Thomas Schwinge <thomas@codesourcery.com>
1119
1120 * c-pragma.h (pragma_omp_clause): Add
1121 PRAGMA_OACC_CLAUSE_NO_CREATE.
1122
e8f1ade2
MS
11232019-12-17 Martin Sebor <msebor@redhat.com>
1124
1125 PR c++/61339
1126 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
1127
368877a1
DM
11282019-12-11 David Malcolm <dmalcolm@redhat.com>
1129
1130 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
1131 implementation.
1132 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
1133
d68f5d45
DM
11342019-12-09 David Malcolm <dmalcolm@redhat.com>
1135
1136 * c-format.c (range_label_for_format_type_mismatch::get_text):
1137 Replace label_text ctor called with true with label_text::take.
1138
d3e28653
DM
11392019-12-09 David Malcolm <dmalcolm@redhat.com>
1140
1141 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
1142 initial newline from expected outputs.
1143 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
1144 call to diagnostic_show_locus.
1145
abd6d8cc
JJ
11462019-12-06 Jakub Jelinek <jakub@redhat.com>
1147
1148 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
1149 now.
1150
7906797e
MP
11512019-12-05 Marek Polacek <polacek@redhat.com>
1152 Jakub Jelinek <jakub@redhat.com>
1153
1154 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
1155 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
1156
5c04da88
MP
11572019-12-05 Marek Polacek <polacek@redhat.com>
1158
1159 PR c++/92271 - make __is_same alias for __is_same_as.
1160 * c-common.c: Add __is_same, an alias for __is_same_as.
1161
43aae289
MP
11622019-12-03 Marek Polacek <polacek@redhat.com>
1163
1164 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
1165 * c-cppbuiltin.c (c_cpp_builtins): Predefine
1166 __cpp_aggregate_paren_init=201902 for -std=c++2a.
1167
d7ddfbcb
JH
11682019-11-30 Jan Hubicka <hubicka@ucw.cz>
1169
1170 * c-attribs.c (handle_symver_attribute): New function
1171 (c_common_attributes): Add symver.
1172
65ef05d0
RS
11732019-11-30 Richard Sandiford <richard.sandiford@arm.com>
1174
1175 * c-common.c (pointer_int_sum): Use verify_type_context to check
1176 whether the target allows pointer arithmetic for the types involved.
1177 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
1178 to check whether the target allows sizeof and alignof operations
1179 for the types involved.
1180
1a291106
JM
11812019-11-27 Jason Merrill <jason@redhat.com>
1182
1183 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
1184
05d6cb1a
JJ
11852019-11-26 Jakub Jelinek <jakub@redhat.com>
1186
1187 PR c++/61414
1188 * c-attribs.c (handle_mode_attribute): Add mode attribute to
1189 ENUMERAL_TYPEs.
1190
5b8d9367
JM
11912019-11-25 Joseph Myers <joseph@codesourcery.com>
1192
1193 PR c/91985
1194 * c-common.c (c_common_type_for_mode): Handle decimal
1195 floating-point types being NULL_TREE.
1196 * c-format.c (get_format_for_type_1): Handle specified types being
1197 NULL_TREE.
1198 * c-lex.c (interpret_float): Give an error for decimal
1199 floating-point constants when decimal floating-point not
1200 supported.
1201
1fbf51cb
JJ
12022019-11-23 Jakub Jelinek <jakub@redhat.com>
1203
1204 PR middle-end/83859
1205 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
1206 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
1207 group warning with inform together.
1208 (handle_access_attribute): Formatting fix.
1209
761df906
JJ
12102019-11-22 Jakub Jelinek <jakub@redhat.com>
1211
bdaf8be1
JJ
1212 PR c/90677
1213 * c-common.h (identifier_global_tag): Declare.
1214 * c-format.c (get_pointer_to_named_type): Renamed to ...
1215 (get_named_type): ... this. Use identifier_global_tag instead of
1216 identifier_global_value, handle the return value being a TYPE_P.
1217 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
1218 to call get_named_type instead. Formatting fixes.
1219
c2ecce6d 1220 Implement P1902R1, Missing feature-test macros 2017-2019.
761df906
JJ
1221 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
1222 and __cpp_generic_lambdas for -std=c++2a. Define
1223 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
1224 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
1225 __cpp_concepts for -std=c++2a.
1226
54aa6b58
MS
12272019-11-22 Martin Sebor <msebor@redhat.com>
1228
1229 PR middle-end/83859
1230 * c-attribs.c (handle_access_attribute): New function.
1231 (c_common_attribute_table): Add new attribute.
1232 (get_argument_type): New function.
1233 (append_access_attrs): New function.
1234 (get_nonnull_operand): Rename...
1235 (get_attribute_operand): ...to this.
1236 * c-common.c (get_nonnull_operand): Rename...
1237 (get_attribute_operand): ...to this.
1238
6c80b1b5
JM
12392019-11-21 Joseph Myers <joseph@codesourcery.com>
1240
1241 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
1242 of warning.
1243
192961ff
JM
12442019-11-19 Joseph Myers <joseph@codesourcery.com>
1245
1246 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
1247 warning for standard attributes mixed with fallthrough attributes.
1248
f8aea5e3
JM
12492019-11-15 Joseph Myers <joseph@codesourcery.com>
1250
1251 * c-attribs.c (handle_fallthrough_attribute): Remove static.
1252 * c-common.h (handle_fallthrough_attribute): Declare.
1253
2cc94aa8
JM
12542019-11-15 Joseph Myers <joseph@codesourcery.com>
1255
1256 * c-attribs.c (handle_deprecated_attribute): Remove static.
1257 * c-common.h (handle_deprecated_attribute): Declare.
1258
7c5890cc
JM
12592019-11-14 Joseph Myers <joseph@codesourcery.com>
1260
1261 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
1262 char for C.
1263
b2417b59
JJ
12642019-11-14 Jakub Jelinek <jakub@redhat.com>
1265
d0ec7c93
JJ
1266 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
1267 valid vendors.
1268
b2417b59
JJ
1269 * c-omp.c (c_omp_check_context_selector): Handle name lists
1270 containing string literals. Don't diagnose atomic_default_mem_order
1271 with multiple props.
1272
00be2a5f
JM
12732019-11-13 Joseph Myers <joseph@codesourcery.com>
1274
1275 * c-cppbuiltin.c (builtin_define_float_constants): Also define
1276 NORM_MAX constants. Update call to get_max_float.
1277 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
1278 constants.
1279
2dbad62d
EB
12802019-11-13 Eric Botcazou <ebotcazou@adacore.com>
1281
1282 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
1283 (dump_forward_type): Do not generate a declaration for function types.
1284 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
1285 of the component type if it is declared in another file.
1286
6ed76044
ML
12872019-11-12 Martin Liska <mliska@suse.cz>
1288
1289 * c-opts.c (c_common_post_options):
1290 Use SET_OPTION_IF_UNSET.
1291
62aee289
MR
12922019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
1293 Frederik Harwath <frederik@codesourcery.com>
1294
1295 gcc/c-family/
1296 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
1297 constant.
1298 * c-pragma.c (oacc_pragmas): Add "serial" entry.
1299
f486280c
RS
13002019-11-08 Richard Sandiford <richard.sandiford@arm.com>
1301
1302 * c-common.h (gnu_vector_type_p): New function.
1303 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
1304 vectors to satisfy gnu_vector_type_p.
1305 (c_build_vec_convert): Likewise __builtin_convertvector.
1306 (convert_vector_to_array_for_subscript): Likewise when applying
1307 implicit vector to array conversion.
1308 (scalar_to_vector): Likewise when converting vector-scalar
1309 operations to vector-vector operations.
1310
017c6491
JM
13112019-11-08 Joseph Myers <joseph@codesourcery.com>
1312
1313 * c.opt (Wold-style-definition): Initialize to -1.
1314 * c-opts.c (c_common_post_options): Set warn_old_style_definition
1315 to flag_isoc2x if not set explicitly.
1316
c01bd174
JM
13172019-11-07 Joseph Myers <joseph@codesourcery.com>
1318
1319 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
1320
0df65305
JM
13212019-11-05 Jason Merrill <jason@redhat.com>
1322
1323 * c-opts.c (c_common_post_options): -fconcepts-ts implies
1324 -fconcepts.
1325
e0c866dd
KK
13262019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
1327
1328 * c-opts.c (c_common_post_options): Update
1329 latest_abi_version.
1330
f968ef9b
JJ
13312019-11-02 Jakub Jelinek <jakub@redhat.com>
1332
d0c464d2
JJ
1333 * c-common.h (c_omp_get_context_selector): Remove.
1334 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
1335 and renamed to omp_get_context_selector.
1336
917dd789
JJ
1337 * c-omp.c (c_omp_mark_declare_variant): Use
1338 omp_context_selector_set_compare.
1339
f968ef9b
JJ
1340 PR c++/88335 - Implement P1073R3: Immediate functions
1341 * c-common.h (enum rid): Add RID_CONSTEVAL.
1342 * c-common.c (c_common_reswords): Add consteval.
1343
5f6705b7
JJ
13442019-11-01 Martin Sebor <msebor@redhat.com>
1345
1346 PR middle-end/91679
1347 PR middle-end/91647
1348 PR middle-end/91463
1349 PR middle-end/92312
1350 * c-pretty-print.c (direct_abstract_declarator): Print
1351 bound in zero-length arrays.
1352 * c.opt (-Wzero-length-bounds): New option.
1353
43f1814c
NS
13542019-10-30 Nathan Sidwell <nathan@acm.org>
1355
1356 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
1357 macros.
1358
ad1539d5
MS
13592019-10-28 Martin Sebor <msebor@redhat.com>
1360
1361 PR c/66970
1362 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
1363 even when only preprocessing.
1364 * c-common.h (names_builtin_p): Declare new function.
1365 * c-lex.c (init_c_lex): Set has_builtin.
1366 (c_common_has_builtin): Define a new function.
1367 * c-ppoutput.c (init_pp_output): Set has_builtin.
1368
135df52c
JJ
13692019-10-24 Jakub Jelinek <jakub@redhat.com>
1370
1371 * c-common.h (c_omp_context_selector_matches): Remove.
1372 * c-omp.c (c_omp_context_selector_matches): Remove.
1373 * c-attribs.c (c_common_attribute_table): Add
1374 "omp declare target {host,nohost,block}" attributes.
1375
8ad0c477
JM
13762019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
1377
1378 * c-lex.c (c_common_has_attribute): Update nodiscard value.
1379
56898e43
RS
13802019-10-14 Richard Sandiford <richard.sandiford@arm.com>
1381
1382 * c-common.h (user_facing_original_type_p): Declare.
1383 * c-common.c: Include c-spellcheck.h.
1384 (user_facing_original_type_p): New function.
1385
20de9568
JJ
13862019-10-12 Jakub Jelinek <jakub@redhat.com>
1387
1388 * c-common.h (c_omp_mark_declare_variant,
1389 c_omp_context_selector_matches): Declare.
1390 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
1391 and hsa-common.h.
1392 (c_omp_get_context_selector): Support second argument NULL.
1393 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
1394 functions.
1395 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
1396 attribute, add "omp declare variant base" and
1397 "omp declare variant variant" attributes.
1398
175a85b2
JM
13992019-10-11 Joseph Myers <joseph@codesourcery.com>
1400
1401 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
1402 CppReason(CPP_W_C11_C2X_COMPAT).
1403
fe2bc27c
JM
14042019-10-11 Joseph Myers <joseph@codesourcery.com>
1405
1406 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
1407 _Decimal64 and _Decimal128.
1408
27dfdc0f
JM
14092019-10-10 Joseph Myers <joseph@codesourcery.com>
1410
1411 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
1412 types if DFP not supported.
1413
94e7f906
JJ
14142019-10-10 Jakub Jelinek <jakub@redhat.com>
1415
1416 * c-common.h (c_omp_check_context_selector,
1417 c_omp_get_context_selector): Declare.
1418 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
1419 in diagnostic message.
1420 (c_omp_check_context_selector, c_omp_get_context_selector): New
1421 functions.
1422 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
1423 attribute.
1424 (handle_omp_declare_variant_attribute): New function.
1425
a7160771
MS
14262019-10-09 Martin Sebor <msebor@redhat.com>
1427
1428 PR tree-optimization/90879
1429 * c.opt (-Wstring-compare): New option.
1430
cb57504a
JM
14312019-10-08 Andrew Sutton <asutton@lock3software.com>
1432 Jason Merrill <jason@redhat.com>
1433
1434 Update the concepts implementation to conform to the C++20
1435 specification, improve compile times, and generally clean up
1436 the implementation.
1437
1438 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
1439 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
1440 * c.opt: Add -Wconcepts-ts.
1441 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
1442 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
1443 (set_std_cxx2a): Enable concepts by default.
1444
fbb2a6dc
JM
14452019-10-08 Joseph Myers <joseph@codesourcery.com>
1446
1447 * c-opts.c (c_common_post_options): Set
1448 -fno-fp-int-builtin-inexact for C2X.
1449
8e007055
JJ
14502019-10-05 Jakub Jelinek <jakub@redhat.com>
1451
1452 PR c++/91369 - Implement P0784R7: constexpr new
1453 * c-cppbuiltin.c (c_cpp_builtins): Predefine
1454 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
1455
843f104d
JM
14562019-10-04 Joseph Myers <joseph@codesourcery.com>
1457
1458 PR c/82752
1459 * c-format.c (C_STD_VER): Handle C2x.
1460 (C_STD_NAME): Likewise.
1461 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
1462 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
1463 modifier allowed and 'p' flag.
1464 * c-format.h (enum format_std_version): Add STD_C2X.
1465 (struct format_char_info): Mention 'p' in comment on flags2.
1466
e9c9a142
DM
14672019-10-01 David Malcolm <dmalcolm@redhat.com>
1468
1469 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
1470 calling diagnostic_show_locus, rather than destroying it afterwards.
1471
7552c36a
JJ
14722019-10-01 Jakub Jelinek <jakub@redhat.com>
1473
1474 PR c++/91925
1475 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
1476 with NULL DECL_FIELD_OFFSET.
1477
8209db25
RS
14782019-10-01 Richard Sandiford <richard.sandiford@arm.com>
1479
1480 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
1481 has a type name, use it in preference to the __vector syntax.
1482
9343bf99
RS
14832019-09-30 Richard Sandiford <richard.sandiford@arm.com>
1484
1485 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
1486 two spaces between a comma and "...".
1487
59bc434a
JJ
14882019-09-27 Jakub Jelinek <jakub@redhat.com>
1489
1490 PR c++/88203
1491 * c-common.h (c_omp_predefined_variable): Declare.
1492 * c-omp.c (c_omp_predefined_variable): New function.
1493 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
1494 for predefined variables.
1495
c6447c20
RS
14962019-09-27 Richard Sandiford <richard.sandiford@arm.com>
1497
1498 * c-common.h (build_function_call_vec): Take the original
1499 function decl as an optional final parameter.
1500 (check_builtin_function_arguments): Take the original function decl.
1501 * c-common.c (check_builtin_function_arguments): Likewise.
1502 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
1503 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
1504
c4438114
JM
15052019-09-15 Jason Merrill <jason@redhat.com>
1506
1507 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
1508 fold_for_warn in "|| mask" warning.
1509
68a57628
ML
15102019-09-10 Martin Liska <mliska@suse.cz>
1511
1512 * c.opt: Use newly added WarnRemoved.
1513
f48ef52e
ML
15142019-09-09 Martin Liska <mliska@suse.cz>
1515
1516 * c.opt: Update comment of removed
1517 options that are preserved only for backward
1518 compatibility.
1519
67f6e649
ML
15202019-09-06 Martin Liska <mliska@suse.cz>
1521
1522 PR c++/91125
1523 * c-common.c: Remove definition of flag_use_repository.
1524 * c-common.h: Likewise.
1525 * c-opts.c (c_common_handle_option):
1526 Do not handle OPT_frepo option.
1527 * c.opt: Mark the option with Deprecated.
1528
db9d2274
MP
15292019-09-04 Marek Polacek <polacek@redhat.com>
1530
1531 * c.opt (fdeduce-init-list): Ignored.
1532
68e2c199
PK
15332019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1534
1535 PR c/78736
1536 * c.opt (Wenum-conversion): New option.
1537
7a4418a5
JL
15382019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1539
1540 * c-attribs.c (handle_section_attribute): Call the
1541 handle_generic_attribute target hook after performing target
1542 independent processing.
1543 (handle_noinit_attribute): Likewise.
1544
5f76ab15
ILT
15452019-09-03 Ian Lance Taylor <iant@golang.org>
1546
1547 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
1548 when using -fgo-dump-spec.
1549
ae0d3f6a
ML
15502019-09-02 Martin Liska <mliska@suse.cz>
1551
1552 PR c++/91155
1553 * c-common.c (fname_as_string): Use cxx_printable_name for
1554 __PRETTY_FUNCTION__ same as was used before r265711.
1555
8a902edb
MP
15562019-08-28 Marek Polacek <polacek@redhat.com>
1557
1558 Implement P1152R4: Deprecating some uses of volatile.
1559 PR c++/91361
1560 * c-opts.c (c_common_post_options): Enable -Wvolatile by
1561 default for C++2a, unless -Wno-deprecated.
1562 * c.opt (Wvolatile): New warning.
1563
4742dbe7
MP
15642019-08-28 Marek Polacek <polacek@redhat.com>
1565
1566 PR c++/91360 - Implement C++20 P1143R2: constinit.
1567 * c-common.c (c_common_reswords): Add constinit and __constinit.
1568 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
1569 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
1570 RID_LAST_CXX20.
1571 (D_CXX20): Define.
1572 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
1573 * c-format.c (cxx_keywords): Add "constinit".
1574 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
1575
6a074892
JJ
15762019-08-27 Jakub Jelinek <jakub@redhat.com>
1577
1578 PR c++/91415
1579 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
1580 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
1581 like COMPOUND_EXPR rather than normal expression.
1582
22f8849d
IS
15832019-08-23 Iain Sandoe <iain@sandoe.co.uk>
1584
1585 PR pch/61250
1586 * c-lex.c (c_lex_with_flags): Don't call
1587 c_common_no_more_pch () from here.
1588
df375b03
JJ
15892019-08-23 Jakub Jelinek <jakub@redhat.com>
1590
1591 PR middle-end/91283
1592 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
1593 instead of flag_excess_precision_cmdline.
1594 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
1595 * c-opts.c (c_common_post_options): Likewise.
1596
14b7950f
MS
15972019-08-22 Martin Sebor <msebor@redhat.com>
1598
1599 PR middle-end/91490
1600 * c-common.c (braced_list_to_string): Add argument and overload.
1601 Handle flexible length arrays and unions.
1602
8bb2ee59
EB
16032019-08-21 Eric Botcazou <ebotcazou@adacore.com>
1604
1605 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
1606 function declarations where arguments are missing. Rename variables.
1607
21c1e205
RB
16082019-08-15 Richard Biener <rguenther@suse.de>
1609
1610 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
1611 enabled, define __SIZETYPE__.
1612
f0033821
CL
16132019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
1614
1615 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
1616 exclusion with "section" attribute.
1617 (attr_noinit_exclusions): New table.
1618 (handle_noinit_attribute): New function.
1619
4d732405
RS
16202019-08-13 Richard Sandiford <richard.sandiford@arm.com>
1621
1622 PR middle-end/91421
1623 * c-common.c (resolve_overloaded_builtin): Use
1624 copy_decl_built_in_function.
1625
51ad8481
MS
16262019-08-13 Martin Sebor <msebor@redhat.com>
1627
1628 PR c/80619
1629 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
1630 (asm_fprintf_length_spec): Same.
1631 * c-format.h (format_lengths): Add FMT_LEN_w.
1632
77eb117f
JJ
16332019-08-10 Jakub Jelinek <jakub@redhat.com>
1634
1635 * c-pragma.h (enum pragma_omp_clause): Add
1636 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
1637
398e3feb
JJ
16382019-08-07 Jakub Jelinek <jakub@redhat.com>
1639
1640 * c-pragma.h (enum pragma_omp_clause): Add
1641 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
1642 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
1643 enumeration value.
1644
ab574db6
MP
16452019-08-05 Marek Polacek <polacek@redhat.com>
1646
1647 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
1648 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
1649 default for C++2a, unless -Wno-deprecated.
1650 * c.opt (Wcomma-subscript): New warning.
1651
554a530f
JJ
16522019-07-20 Jakub Jelinek <jakub@redhat.com>
1653
1654 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
1655 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
1656 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
1657 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
1658 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
1659 constructs with the loop construct.
1660
1a888209
JJ
16612019-07-13 Jakub Jelinek <jakub@redhat.com>
1662
1663 PR c/91149
1664 * c-omp.c (c_omp_split_clauses): Fix a pasto in
1665 OMP_CLAUSE_REDUCTION_TASK handling.
1666
1fdd6f04
JJ
16672019-07-12 Jakub Jelinek <jakub@redhat.com>
1668
1669 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
1670 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
1671
99b1c316
MS
16722019-07-09 Martin Sebor <msebor@redhat.com>
1673
1674 PR c++/61339
1fdd6f04 1675 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
1676 and others to class.
1677 * c-pretty-print.h: Same.
1678
6c1dae73
MS
16792019-07-09 Martin Sebor <msebor@redhat.com>
1680
1681 PR c++/61339
1682 * c-format.c (check_argument_type): Change class-key from class to
1683 struct and vice versa to match convention and avoid -Wclass-is-pod
1684 and -Wstruct-no-pod.
1685 * c-pretty-print.h: Same.
1686
8ba6ea87
ML
16872019-07-03 Martin Liska <mliska@suse.cz>
1688
1689 * c-common.c (try_to_locate_new_include_insertion_point): Remove
1690 dead assignemts.
1691
83eb9522
JJ
16922019-07-03 Jakub Jelinek <jakub@redhat.com>
1693
1694 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
1695 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
1696 with OMP_PARALLEL.
1697
1c6ffbab
QZ
16982019-07-02 qing zhao <qing.zhao@oracle.com>
1699
1700 PR preprocessor/90581
1701 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
1702 * c.opt: Add new option -fmax-include-depth.
1703
7ffc7de5
JM
17042019-06-26 Jason Merrill <jason@redhat.com>
1705
1706 PR c++/55442 - memory-hog with highly recursive constexpr.
1707 * c.opt (fconstexpr-loop-limit): New.
1708
361af3e4
JJ
17092019-06-25 Jakub Jelinek <jakub@redhat.com>
1710
1711 PR sanitizer/90954
1712 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
1713 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
1714
ab20d992
JJ
17152019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1716
1717 * c-common.c (c_common_nodes_and_builtins): Define
1718 alternate "__intN__" name for "__intN" types.
1719
f4af4019
JH
17202019-06-24 Jan Hubicka <jh@suse.cz>
1721
1722 * c-common.c (braced_lists_to_strings): Check that
1723 type is array or integer prior checking string flag.
1724
da9e9b57
MB
17252019-06-21 Matthew Beliveau <mbelivea@redhat.com>
1726
1727 PR c++/90875 - added -Wswitch-outside-range option
1728 * c.opt (Wswitch-outside-range): Added new option.
1729 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
1730
3f3d6a6f
MP
17312019-06-21 Marek Polacek <polacek@redhat.com>
1732
1733 PR c++/90953 - ICE with -Wmissing-format-attribute.
1734 * c-common.c (check_function_arguments_recurse): Use
1735 get_attribute_name.
1736 (check_missing_format_attribute): Likewise.
1737
1bf32c11
MP
17382019-06-19 Marek Polacek <polacek@redhat.com>
1739
1740 PR c++/60364 - noreturn after first decl not diagnosed.
1741 * c-attribs.c (handle_noreturn_attribute): No longer static.
1742 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
1743 Declare.
1744 * c-format.c (check_function_format): Use get_attribute_name.
1745
a04c0734
MS
17462019-06-19 Martin Sebor <msebor@redhat.com>
1747
1748 PR translation/90156
1749 * c-format.c (function_format_info::format_type): Adjust type.
1750 (function_format_info::is_raw): New member.
1751 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
1752 (decode_format_attr): Adjust call to decode_format_type.
1753 Avoid a redundant call to convert_format_name_to_system_name.
1754 Avoid abbreviating the word "arguments" in a diagnostic.
1755 (format_warning_substr): New function.
1756 (avoid_dollar_number): Quote dollar sign in a diagnostic.
1757 (finish_dollar_format_checking): Same.
1758 (check_format_info): Same.
1759 (struct baltoks_t): New.
1760 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
1761 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
1762 functions.
1763 (check_format_info_main): Call check_plain. Use baltoks_t. Call
1764 maybe_diag_unbalanced_tokens.
1765 (handle_format_attribute): Spell out the word "arguments" in
1766 a diagnostic.
1767
d3786ebb
MB
17682019-06-11 Matthew Beliveau <mbelivea@redhat.com>
1769
1770 PR c++/90449 - add -Winaccessible-base option.
1771 * c.opt (Winaccessible-base): New option.
1772
bf38f7e9
JJ
17732019-06-10 Jakub Jelinek <jakub@redhat.com>
1774
1775 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
1776 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
1777 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
1778 combined/composite constructs where it is not allowed. Copy over
1779 OMP_CLAUSE_REDUCTION_INSCAN.
1780
0ecf545c
MS
17812019-06-05 Martin Sebor <msebor@redhat.com>
1782
1783 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
1784 (handle_alias_ifunc_attribute): Same.
1785 (handle_copy_attribute): Same.
1786 (handle_weakref_attribute): Same.
1787 (handle_nonnull_attribute): Same.
1788 * c-warn.c (warn_for_sign_compare): Same.
1789 (warn_for_restrict): Same.
1790 * c.opt: Same.
1791
36b34127
MS
17922019-06-05 Martin Sebor <msebor@redhat.com>
1793
1794 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
1795 * c.opt (-Wformat-diag): Remove a spurious period.
1796
357a352f
JJ
17972019-05-29 Jakub Jelinek <jakub@redhat.com>
1798
1799 PR c/90628
1800 * c-common.c (check_builtin_function_arguments)
1801 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
1802 as last argument.
1803
2b8235ea
EB
18042019-05-23 Eric Botcazou <ebotcazou@adacore.com>
1805
1806 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
1807
6d86ddc4
ML
18082019-05-22 Martin Liska <mliska@suse.cz>
1809
1810 PR lto/90500
1811 * c-attribs.c (handle_copy_attribute): Do not copy
1812 target_clones attribute.
1813
419ba5b9
EB
18142019-05-21 Eric Botcazou <ebotcazou@adacore.com>
1815
1816 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
1817 * c-ada-spec.c (print_assignment_operator): New function.
1818 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
1819 assignment operators declared as methods and filter out the others.
1820
e03436e7
TS
18212019-05-17 Thomas Schwinge <thomas@codesourcery.com>
1822
1823 PR c/89433
1824 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
1825 "omp declare target".
1826
a9c697b8
MS
18272019-05-16 Martin Sebor <msebor@redhat.com>
1828
ab20d992
JJ
1829 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
1830 keywords, operators, and types in diagnostics.
1831 (handle_scalar_storage_order_attribute): Same.
1832 (handle_mode_attribute): Same.
1833 (handle_visibility_attribute): Same.
1834 (handle_assume_aligned_attribute): Same.
1835 (handle_no_split_stack_attribute): Same.
1836 * c-common.c (shorten_compare): Same.
1837 (c_common_truthvalue_conversion): Same.
1838 (cb_get_source_date_epoch): Same.
1839 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
1840 in diagnostics.
1841 (interpret_float): Same.
1842 * c-omp.c (c_finish_omp_for): Same.
1843 * c-opts.c (c_common_post_options): Same.
1844 * c-pch.c (c_common_pch_pragma): Same.
1845 * c-pragma.c (pop_alignment): Same.
1846 (handle_pragma_pack): Same.
1847 (apply_pragma_weak): Same.
1848 (handle_pragma_weak): Same.
1849 (handle_pragma_scalar_storage_order): Same.
1850 (handle_pragma_redefine_extname): Same.
1851 (add_to_renaming_pragma_list): Same.
1852 (maybe_apply_renaming_pragma): Same.
1853 (push_visibility): Same.
1854 (handle_pragma_visibility): Same.
1855 (handle_pragma_optimize): Same.
1856 (handle_pragma_message): Same.
1857 * c-warn.c (warn_for_omitted_condop): Same.
1858 (lvalue_error): Same.
a9c697b8 1859
6b943512
RB
18602019-05-15 Richard Biener <rguenther@suse.de>
1861
1862 PR c/90474
1863 * c-common.c (c_common_mark_addressable_vec): Also mark
1864 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
1865 c_mark_addressable.
ab20d992 1866
b744fc85
NS
18672019-05-06 Nathan Sidwell <nathan@acm.org>
1868
1869 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
1870
598f50d7
NS
18712019-04-30 Nathan Sidwell <nathan@acm.org>
1872
1873 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
1874
5bcc5a3b
ML
18752019-04-30 Martin Liska <mliska@suse.cz>
1876
1877 * c-pragma.c (handle_pragma_diagnostic): Provide hints
1878 for unknown options.
1879
e78a87f7
RS
18802019-04-26 Richard Sandiford <richard.sandiford@arm.com>
1881
1882 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
1883 the pointer target rather than the pointer itself.
1884
c280b7ee
JJ
18852019-04-19 Jakub Jelinek <jakub@redhat.com>
1886
1887 PR c/89888
1888 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
1889 arguments.
1890 (c_do_switch_warnings): Remove outside_range_p argument.
1891 * c-common.c (check_case_bounds): Removed.
1892 (c_add_case_label): Remove orig_type and outside_range_p arguments.
1893 Don't call check_case_bounds. Fold low_value as well as high_value.
1894 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
1895 Check for case labels outside of range of original type here and
1896 adjust them.
1897
8e8225e6
JJ
18982019-04-12 Jakub Jelinek <jakub@redhat.com>
1899
63b8a166
JJ
1900 PR translation/90041
1901 * c.opt (-fhandle-exceptions): Use %< and %> around option names
1902 in the Warn diagnostics.
1903
8e8225e6
JJ
1904 PR c/89946
1905 * c-attribs.c (handle_patchable_function_entry_attribute): Add
1906 function comment. Warn if arguments of the attribute are not positive
1907 integer constants.
1908
53a3f614
EB
19092019-04-09 Eric Botcazou <ebotcazou@adacore.com>
1910
1911 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
1912 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
1913
22be5873
EB
19142019-04-07 Eric Botcazou <ebotcazou@adacore.com>
1915
1916 * c-ada-spec.c (is_float128): New predicate extracted from...
1917 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
1918 <REAL_TYPE>: ...here. Call it.
1919
34facf20
DM
19202019-04-05 David Malcolm <dmalcolm@redhat.com>
1921
1922 PR c/89985
1923 * c-warn.c (check_address_or_pointer_of_packed_member): Add
1924 auto_diagnostic_group. Guard inform calls by result of
1925 warning_at call.
1926
05564120
MP
19272019-04-05 Marek Polacek <polacek@redhat.com>
1928
ab20d992 1929 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
05564120
MP
1930 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
1931 of RHS.
1932
7a506c3c
JM
19332019-04-03 Jason Merrill <jason@redhat.com>
1934
1935 PR c++/86586 - -fcompare-debug=-Wsign-compare.
1936 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
1937
ddeae8c8
MS
19382019-04-01 Martin Sebor <msebor@redhat.com>
1939
1940 PR c/89685
1941 * c-attribs.c (handle_copy_attribute): Handle references and
1942 non-constant expressions.
1943
a15ffa22
JJ
19442019-03-22 Jakub Jelinek <jakub@redhat.com>
1945
1946 PR c++/87481
1947 * c.opt (-fconstexpr-ops-limit=): New option.
1948
36a3a7a3
JJ
19492019-03-21 Jakub Jelinek <jakub@redhat.com>
1950
1951 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
1952 template param.
1953
bec1da64
MS
19542019-03-19 Martin Sebor <msebor@redhat.com>
1955
1956 PR tree-optimization/89688
1957 * c-common.c (braced_list_to_string): Make static.
1958 (braced_lists_to_strings): Define new function.
1959 * c-common.h (braced_list_to_string): Remove.
1960 (braced_lists_to_strings): Declare.
1961
1fe61adf
ML
19622019-03-12 Martin Liska <mliska@suse.cz>
1963
1964 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
1965
93964ebd
ML
19662019-03-11 Martin Liska <mliska@suse.cz>
1967
1968 * c-opts.c (c_common_post_options): Wrap apostrophes
1969 in gcc internal format with %'.
1970
a3f9f006
ML
19712019-03-11 Martin Liska <mliska@suse.cz>
1972
1973 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
1974 in a string format message and fix GNU coding style.
1975 * c-common.c (vector_types_convertible_p): Likewise.
1976 (c_build_vec_perm_expr): Likewise.
1977 * c-indentation.c (get_visual_column): Likewise.
1978 * c-opts.c (c_common_handle_option): Likewise.
1979 (c_common_post_options): Likewise.
1980 (sanitize_cpp_opts): Likewise.
1981 * c-pch.c (c_common_pch_pragma): Likewise.
1982 * c-pragma.c (handle_pragma_pack): Likewise.
1983
1db01ff9
JJ
19842019-03-08 Jakub Jelinek <jakub@redhat.com>
1985
1986 PR tree-optimization/89550
1987 * c-common.c (c_common_truthvalue_conversion): Only set
1988 TREE_NO_WARNING if warning_at returned true.
1989 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
1990
ba790e6f
JJ
19912019-02-25 Sandra Loosemore <sandra@codesourcery.com>
1992 Martin Sebor <msebor@gmail.com>
1993
1994 * c.opt (Wmissing-attributes): Clean up doc string.
1995
7da73ba7
JJ
19962019-02-25 Jakub Jelinek <jakub@redhat.com>
1997
1998 PR c/89495
1999 * c-format.c (maybe_read_dollar_number): Compute nargnum in
2000 HOST_WIDE_INT type to avoid overflows and change overflow_flag
2001 checking.
2002
921bb9d1
RB
20032019-02-22 Richard Biener <rguenther@suse.de>
2004
2005 * c-pch.c (no_checksum): Remove.
2006 (pch_init): Remove assertion that executable_checksum is not
2007 all zero.
2008 (c_common_valid_pch): Likewise.
2009
e2ebb05c
MS
20102019-02-18 Martin Sebor <msebor@redhat.com>
2011
2012 PR middle-end/89294
2013 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
2014
3fe53000
DM
20152019-02-16 David Malcolm <dmalcolm@redhat.com>
2016
2017 PR c++/88680
2018 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
2019 implementing -Wtype-limits.
2020
28a8cef1
MS
20212019-02-11 Martin Sebor <msebor@redhat.com>
2022
2023 PR c++/87996
2024 * c-common.c (invalid_array_size_error): New function.
2025 (valid_array_size_p): Call it. Handle size as well as type.
2026 * c-common.h (valid_constant_size_p): New function.
2027 (enum cst_size_error): New type.
2028
ec2be203
DM
20292019-01-31 David Malcolm <dmalcolm@redhat.com>
2030
2031 PR c/89122
2032 * known-headers.cc (get_stdlib_header_for_name): Add
2033 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
2034
8936f047
JJ
20352019-01-31 Jakub Jelinek <jakub@redhat.com>
2036
2037 PR libstdc++/88170
2038 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
2039 a C cast in pp_c_flag_gnu_v3 mode.
2040
6a335b96
JJ
20412019-01-29 Jakub Jelinek <jakub@redhat.com>
2042
2043 PR c/86125
2044 * c-common.c (c_common_nodes_and_builtins): Build type variants for
2045 builtin_structptr_types types even for C.
2046
2a06eba5
BE
20472019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
2048
2049 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
2050 when rhs is of array type correctly. Fix handling of nested structures.
2051 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
2052 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
2053 type casts within nested compound expressions.
2054
18a23298
JJ
20552019-01-22 Jakub Jelinek <jakub@redhat.com>
2056
2057 PR middle-end/88968
2058 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
2059 variable after using BIT_FIELD_REF.
2060
420183d9
L
20612019-01-18 H.J. Lu <hongjiu.lu@intel.com>
2062
2063 PR c/51628
2064 PR c/88664
2065 * c-common.h (warn_for_address_or_pointer_of_packed_member):
2066 Remove the boolean argument.
2067 * c-warn.c (check_address_of_packed_member): Renamed to ...
2068 (check_address_or_pointer_of_packed_member): This. Also
2069 warn pointer conversion.
2070 (check_and_warn_address_of_packed_member): Renamed to ...
2071 (check_and_warn_address_or_pointer_of_packed_member): This.
2072 Also warn pointer conversion.
2073 (warn_for_address_or_pointer_of_packed_member): Remove the
2074 boolean argument. Don't check pointer conversion here.
2075
99063eee
RS
20762019-01-15 Richard Sandiford <richard.sandiford@arm.com>
2077
2078 PR inline-asm/52813
2079 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
2080
a30d0196
JJ
20812019-01-14 Jakub Jelinek <jakub@redhat.com>
2082
2083 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
2084 and __cpp_nontype_template_parameter_auto. Add a comment that
2085 __cpp_template_auto is deprecated.
2086
2d91f79d
TH
20872019-01-14 Tom Honermann <tom@honermann.net>
2088
2089 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
2090 * c-common.c (c_common_reswords): Add char8_t.
2091 (fix_string_type): Use char8_t for the type of u8 string literals.
2092 (c_common_get_alias_set): char8_t doesn't alias.
2093 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
2094 C++.
2095 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
2096 (keyword_begins_type_specifier): Add RID_CHAR8.
2097 * c-common.h (rid): Add RID_CHAR8.
2098 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
2099 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
2100 Define char8_type_node and char8_array_type_node.
2101 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
2102 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
2103 (c_cpp_builtins): Predefine __cpp_char8_t.
2104 * c-lex.c (lex_string): Use char8_array_type_node as the type of
2105 CPP_UTF8STRING.
2106 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
2107 * c-opts.c: If not otherwise specified, enable -fchar8_t when
2108 targeting C++2a.
2109 * c.opt: Add the -fchar8_t command line option.
2110
23db6ced
MS
21112019-01-14 Martin Sebor <msebor@redhat.com>
2112
2113 PR target/88638
2114 * c-attribs.c (positional_argument): Call valid_format_string_type_p
2115 and issue errors if it fails.
2116 * c-common.h (valid_format_string_type_p): Declare.
2117 * c-format.c (valid_stringptr_type_p): Rename...
2118 (valid_format_string_type_p): ...to this and make extern.
2119 (handle_format_arg_attribute): Adjust to new name.
2120 (check_format_string): Same.
2121
234c3818
L
21222019-01-13 H.J. Lu <hongjiu.lu@intel.com>
2123
2124 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
2125 Replace "may may" with "may" in warning message.
2126
d8fcab68
JJ
21272019-01-07 Jakub Jelinek <jakub@redhat.com>
2128
2129 PR c++/85052
2130 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
2131 (c_build_vec_convert): Declare.
2132 * c-common.c (c_build_vec_convert): New function.
2133
29d24852
MS
21342019-01-04 Martin Sebor <msebor@redhat.com>
2135
2136 PR c/88546
2137 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
2138 Handle C++ empty throw specification and C11 _Noreturn.
2139 (has_attribute): Also handle C11 _Noreturn.
2140
9069a4c9
MS
21412019-01-04 Martin Sebor <msebor@redhat.com>
2142
2143 PR c/88363
2144 * c-attribs.c (positional_argument): Also accept enumerated types.
2145
a5544970
JJ
21462019-01-01 Jakub Jelinek <jakub@redhat.com>
2147
2148 Update copyright years.
2149
da77eace
L
21502018-12-20 H.J. Lu <hongjiu.lu@intel.com>
2151
2152 PR c/51628
2153 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
2154 * c-warn.c (check_alignment_of_packed_member): New function.
2155 (check_address_of_packed_member): Likewise.
2156 (check_and_warn_address_of_packed_member): Likewise.
2157 (warn_for_address_or_pointer_of_packed_member): Likewise.
2158 * c.opt: Add -Wno-address-of-packed-member.
2159
573767d4
DM
21602018-12-20 David Malcolm <dmalcolm@redhat.com>
2161
2162 PR c++/87504
2163 * c-warn.c (get_outermost_macro_expansion): New function.
2164 (spelled_the_same_p): Use it to unwind the macro expansions, and
2165 compare the outermost macro in each nested expansion, rather than
2166 the innermost.
2167
a14feb3c
DM
21682018-12-19 David Malcolm <dmalcolm@redhat.com>
2169
2170 PR c++/87504
2171 * c-common.h (warn_tautological_cmp): Convert 1st param from
2172 location_t to const op_location_t &.
2173 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
2174 when testing for INTEGER_CST.
2175 (warn_tautological_bitwise_comparison): Convert 1st param from
2176 location_t to const op_location_t &; use it to build a
2177 binary_op_rich_location, and use this.
2178 (spelled_the_same_p): New function.
2179 (warn_tautological_cmp): Convert 1st param from location_t to
2180 const op_location_t &. Warn for macro expansions if
2181 spelled_the_same_p. Use binary_op_rich_location.
2182
dfd7fdca
DM
21832018-12-19 David Malcolm <dmalcolm@redhat.com>
2184
2185 PR c++/43064
2186 PR c++/43486
2187 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
2188 (verify_tree): Handle location wrappers.
2189 (c_common_truthvalue_conversion): Strip any location wrapper.
2190 Handle CONST_DECL.
2191 (fold_offsetof): Strip any location wrapper.
2192 (complete_array_type): Likewise for initial_value.
2193 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
2194 index before checking for INTEGER_CST.
2195 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
2196 print parentheses around location wrappers.
2197 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
2198 before checking for INTEGER_CST.
2199 (warn_tautological_bitwise_comparison): Call
2200 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
2201 before checking for INTEGER_CST.
2202 (readonly_error): Strip any location wrapper.
2203 (warn_array_subscript_with_type_char): Strip location wrappers
2204 before checking for INTEGER_CST. Use the location of the index if
2205 available.
2206
5c8b3702
JM
22072018-12-06 Jason Merrill <jason@redhat.com>
2208
2209 PR c++/88136 - -Wdeprecated-copy false positives
2210 * c.opt (Wdeprecated-copy-dtor): New.
2211 (Wdeprecated-copy): Move to -Wextra.
2212
673670da
MS
22132018-11-29 Martin Sebor <msebor@redhat.com>
2214
2215 PR c/88172
2216 PR testsuite/88208
2217 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
2218 alignments to values less than the target requires.
2219 (has_attribute): For attribute aligned consider both the attribute
2220 and the alignment bits.
2221 * c-common.c (c_init_attributes): Optionally issue a warning for
2222 zero alignment.
2223
04864ec8
MS
22242018-11-28 Martin Sebor <msebor@redhat.com>
2225
2226 PR c/88065
2227 PR c/87297
2228 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
2229 or destination is an error.
2230
ace83db0
JJ
22312018-11-28 Jakub Jelinek <jakub@redhat.com>
2232
2233 PR c++/88215
2234 * c-ubsan.c: Include langhooks.h.
2235 (ubsan_instrument_division): Change gcc_assert that main variants
2236 of op0 and op1 types are equal to gcc_checking_assert that the
2237 main variants are compatible types.
2238
da193a27
EB
22392018-11-27 Eric Botcazou <ebotcazou@adacore.com>
2240
2241 * c-ada-spec.c: Include stringpool.h.
2242 (has_static_fields): Return false for incomplete types.
2243 (is_tagged_type): Likewise.
2244 (has_nontrivial_methods): Likewise.
2245 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
2246 (struct overloaded_name_hash): New structure.
2247 (struct overloaded_name_hasher): Likewise.
2248 (overloaded_names): New global variable.
2249 (init_overloaded_names): New static function.
2250 (overloaded_name_p): New predicate.
2251 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
2252 on the TYPE_STUB_DECL of the original type of a typedef, if any.
2253 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
2254 Remove always-true condition and dump forward types.
2255 (dump_ada_specs): Delete overloaded_names.
2256
98f08eb8
MS
22572018-11-20 Martin Sebor <msebor@redhat.com>
2258
2259 * c-attribs.c (type_for_vector_size): New function.
2260 (type_valid_for_vector_size): Same.
2261 (handle_vector_size_attribute): Move code to the functions above
2262 and call them.
2263 (validate_attribute, has_attribute): New functions.
2264 * c-common.h (has_attribute): Declare.
2265 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
2266 * c-common.c (c_common_resword): Same.
2267
2674fa47
JM
22682018-11-16 Jason Merrill <jason@redhat.com>
2269
2270 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
2271 * c-attribs.c (attr_cold_hot_exclusions): Make public.
2272
258b3854
JJ
22732018-11-16 Jakub Jelinek <jakub@redhat.com>
2274
2275 PR middle-end/87854
2276 * c-common.c (fix_string_type): Reject string literals larger than
2277 TYPE_MAX_VALUE (ssizetype) bytes.
2278
1d249509
MS
22792018-11-15 Martin Sebor <msebor@redhat.com>
2280
2281 PR c++/87541
2282 PR c++/87542
2283 * c-attribs.c (positional_argument): New function.
2284 (handle_alloc_size_attribute): Use it and simplify.
2285 (handle_alloc_align_attribute): Same.
2286 (handle_assume_aligned_attribute): Same.
2287 (handle_nonnull_attribute): Same.
2288 * c-common.c (check_function_arguments): Pass fntype to
2289 check_function_format.
2290 * c-common.h (check_function_format): Add an argument.
2291 (PosArgFlags, positional_argument): Declare new type and function.
2292 * c-format.c (decode_format_attr): Add arguments.
2293 (check_format_string, get_constant): Same.
2294 (convert_format_name_to_system_name): Adjust.
2295
478dd60d
DM
22962018-11-15 David Malcolm <dmalcolm@redhat.com>
2297
2298 PR other/19165
2299 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
2300
8cca0163
JJ
23012018-11-14 Jakub Jelinek <jakub@redhat.com>
2302
8ee09943
JJ
2303 P1236R1 - Signed integers are two's complement
2304 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
2305 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
2306 with in-range second operand well defined for -std=c++2a.
2307
8cca0163
JJ
2308 PR other/88007
2309 * c-common.c (parse_optimize_options): Allocate option string from
2310 opts_obstack rather than as GC memory. Move the allocation after
2311 warning for invalid option.
2312
620e594b
DM
23132018-11-13 David Malcolm <dmalcolm@redhat.com>
2314
2315 * c-common.c (c_get_substring_location): Update for renaming of
2316 get_source_location_for_substring to get_location_within_string.
2317 * c-lex.c: Replace "source_location" with "location_t".
2318 * c-opts.c: Likewise.
2319 * c-ppoutput.c: Likewise.
2320
f9731de3
MS
23212018-11-13 Martin Sebor <msebor@redhat.com>
2322
2323 PR middle-end/81824
2324 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
2325 (handle_tls_model_attribute): Improve diagnostics.
2326
e4bd6d5e
JM
23272018-11-12 Jason Merrill <jason@redhat.com>
2328
a6bb6b07
JM
2329 * c-cppbuiltin.c (c_cpp_builtins): Define
2330 __cpp_impl_destroying_delete.
2331
e4bd6d5e
JM
2332 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
2333 __cpp_conditional_explicit.
2334
79a2c428
MS
23352018-11-09 Martin Sebor <msebor@redhat.com>
2336
2337 PR middle-end/81824
2338 * c-attribs.c (handle_copy_attribute): New function.
2339
4c7bd361
MS
23402018-11-09 Martin Sebor <msebor@redhat.com>
2341
2342 PR c/87795
2343 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
2344
28567c40
JJ
23452018-11-08 Jakub Jelinek <jakub@redhat.com>
2346
2347 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
2348 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
2349 enum omp_memory_order MEMORY_ORDER.
2350 (c_finish_omp_flush): Add MO argument.
2351 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
2352 (c_finish_omp_for): Add FINAL_P argument.
2353 * c-omp.c: Include memmodel.h.
2354 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
2355 OMP_TASKGROUP_CLAUSES to it.
2356 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
2357 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
2358 instead of OMP_ATOMIC_SEQ_CST.
2359 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
2360 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
2361 __atomic_thread_fence call with the given value.
2362 (check_omp_for_incr_expr): Formatting fixes.
2363 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
2364 even in OpenMP loops, diagnose if NE_EXPR and incr expression
2365 is not constant expression 1 or -1. Transform NE_EXPR loops
2366 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
2367 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
2368 loops too.
2369 (c_omp_split_clauses): Add support for combined
2370 #pragma omp parallel master and
2371 #pragma omp {,parallel }master taskloop{, simd} constructs.
2372 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
2373 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
2374 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
2375 (c_omp_predetermined_sharing): Don't return
2376 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
2377 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
2378 PRAGMA_OMP_REQUIRES.
2379 * c-pragma.h (enum pragma_kind): Likewise.
2380 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
2381 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
2382
204839e7
DM
23832018-11-08 David Malcolm <dmalcolm@redhat.com>
2384
2385 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
2386
d8010ee4
DM
23872018-11-08 David Malcolm <dmalcolm@redhat.com>
2388
2389 * c-format.c (local_cgraph_node_ptr_node): New variable.
2390 (gcc_dump_printf_char_table): Add entry for %C.
2391 (get_pointer_to_named_type): New function, taken from the handling
2392 code for "gimple *" from...
2393 (init_dynamic_diag_info): ...here. Add handling for
2394 "cgraph_node *".
2395 * c-format.h (T_CGRAPH_NODE): New.
2396
4be5c72c
JM
23972018-10-19 Jason Merrill <jason@redhat.com>
2398
2399 * c-cppbuiltin.c (c_cpp_builtins): Add
2400 __cpp_nontype_template_parameter_class.
2401
f3f6029d
NS
24022018-10-31 Nathan Sidwell <nathan@acm.org>
2403
ab5324fb
NS
2404 * c-opts.c (c_finish_options): Force command line macro
2405 location. Refactor to avoid repeating main debug hook.
2406 (push_command_line_include): Clarify comment.
2407
f3f6029d
NS
2408 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
2409
91e3ec29
MS
24102018-10-30 Martin Sebor <msebor@redhat.com>
2411
2412 PR middle-end/87041
2413 * c-format.c (check_format_types): Avoid diagnosing null pointer
2414 arguments to printf-family of functions.
2415
b5ff4f5c
MP
24162018-10-30 Marek Polacek <polacek@redhat.com>
2417
2418 Implement P0892R2, explicit(bool).
2419 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
2420
7e2de6df
DM
24212018-10-29 David Malcolm <dmalcolm@redhat.com>
2422
2423 * name-hint.h (name_hint::take_deferred): New member function.
2424
b2bf438c
DM
24252018-10-29 David Malcolm <dmalcolm@redhat.com>
2426
2427 PR c++/56856
2428 * c-common.c (check_function_sentinel): Call fold_for_warn on the
2429 argument.
2430 (check_function_restrict): Rename param "argarray" to
2431 "unfolded_argarray", and make a copy named "argarray", calling
2432 fold_for_warn on each argument.
2433 (check_function_arguments): Add note about responsibility for
2434 folding the arguments.
2435
9f936c86
JM
24362018-10-17 Joseph Myers <joseph@codesourcery.com>
2437
2438 * c-common.c (flag_isoc2x): New variable.
2439 * c-common.h (clk_c): Update comment to reference C2X.
2440 (flag_isoc99, flag_isoc11): Update comments to reference future
2441 standard versions in general.
2442 (flag_isoc2x): Declare.
2443 * c-opts.c (set_std_c2x): New function.
2444 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
2445 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
2446 flag_isoc2x to 0.
2447 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
2448
7a8a92c4
JM
24492018-10-17 Joseph Myers <joseph@codesourcery.com>
2450
2451 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
2452 (std=iso9899:2018): Document C17 as published in 2018.
2453
4dc003ff
CL
24542018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
2455
2456 PR c++/87364
2457 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
2458
79371671
WW
24592018-10-11 Will Wray <wjwray@gmail.com>
2460
2461 PR c++/87364
2462 * c-pretty-print.h (pp_c_type_cast): Prototype.
2463 (pp_c_integer_constant): Likewise.
2464 * c-pretty-print.c (pp_c_type_cast): No longer static.
2465 (pp_c_integer_constant): Likewise.
2466 (pp_c_enumeration_constant): Fix loop termination when finding
2467 name of constant. No longer returns a value. Call
2468 pp_c_integer_constant.
2469 (c_pretty_printer::constant): Update for changes to
2470 pp_c_enumeration_constant.
2471
46c62690
JJ
24722018-10-11 Jakub Jelinek <jakub@redhat.com>
2473
2474 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
2475 for no_unique_address.
2476
c24300ba
DM
24772018-10-09 David Malcolm <dmalcolm@redhat.com>
2478
2479 * c-common.c (c_option_controlling_cpp_error): Rename to...
2480 (c_option_controlling_cpp_diagnostic): ...this, and convert
2481 "reason" from int to enum.
2482 (c_cpp_error): Rename to...
2483 (c_cpp_diagnostic): ...this, converting level and reason to enums.
2484 * c-common.h (c_cpp_error): Rename to...
2485 (c_cpp_diagnostic): ...this, converting level and reason to enums.
2486 * c-opts.c (c_common_init_options): Update for renaming.
2487
8656dafa
RS
24882018-10-08 Richard Sandiford <richard.sandiford@arm.com>
2489
2490 PR c/87286
2491 * c-common.c (vector_types_compatible_elements_p): Use
2492 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
2493
8cff0652
VK
24942018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
2495
2496 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
2497 to generate constructor destructor priority warning.
2498 * c.opt (-Wprio-ctor-dtor): New option.
2499
bedf03a2
JM
25002018-10-01 Jason Merrill <jason@redhat.com>
2501
2502 * c-lex.c (c_common_has_attribute): Add no_unique_address.
2503
6cc430c1
EB
25042018-10-01 Eric Botcazou <ebotcazou@adacore.com>
2505
2506 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
2507 (dump_ada_node): Add const keyword.
2508
87677ac7
ML
25092018-09-25 Martin Liska <mliska@suse.cz>
2510
2511 * c-common.c (c_common_truthvalue_conversion):
2512 Remove Pascal from documentation.
2513
518196cb
EB
25142018-09-21 Eric Botcazou <ebotcazou@adacore.com>
2515
2516 * c-ada-spec.c: Include diagnostic.h.
2517 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
2518
a599af84
MP
25192018-09-19 Marek Polacek <polacek@redhat.com>
2520
2521 * c.opt (Wclass-conversion): New.
2522
9c4a4b3c
DM
25232018-09-17 David Malcolm <dmalcolm@redhat.com>
2524
2525 * c-format.c (range_label_for_format_type_mismatch::get_text):
2526 Update for new param.
2527
c896ecfe
DM
25282018-09-17 David Malcolm <dmalcolm@redhat.com>
2529
2530 * c-format.c (format_warning_at_char): Update for introduction of
2531 format_string_diagnostic_t.
2532 (format_type_warning): Likewise.
2533
80c6d1f4
MJ
25342018-09-17 Martin Jambor <mjambor@suse.cz>
2535
2536 PR c/63886
2537 * c.opt (Wabsolute-value): New.
2538
6d900107
BE
25392018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2540
2541 * c-common.c (complete_flexible_array_elts): New helper function.
2542 * c-common.h (complete_flexible_array_elts): Declare.
2543
b5764229
BE
25442018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2545
2546 * c-common.c (braced_list_to_string): Remove eval parameter.
2547 Add some more checks. Always create zero-terminated STRING_CST.
2548 * c-common.h (braced_list_to_string): Adjust prototype.
2549
85204e23
DM
25502018-08-27 David Malcolm <dmalcolm@redhat.com>
2551
2552 PR 87091
2553 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
2554 to a tri-state.
2555 (maybe_suggest_missing_token_insertion): Likewise.
2556 (maybe_add_include_fixit): Add param "override_location". If set,
2557 and source-printing is enabled, then override the rich_location's
2558 primary location with that of the insertion point for the fix-it
2559 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
2560 * c-common.h (extern void maybe_add_include_fixit): Add bool
2561 param.
2562 * c-format.c (selftest::test_type_mismatch_range_labels): Update
2563 for conversion of show_caret_p to a tri-state.
2564 * c-warn.c (warn_for_restrict): Likewise.
2565 * known-headers.cc
2566 (suggest_missing_header::~suggest_missing_header): Update call to
2567 maybe_add_include_fixit to suggest overriding the location, as it
2568 is for a note.
2569
3d78e008
ML
25702018-08-27 Martin Liska <mliska@suse.cz>
2571
2572 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
2573 fndecl_built_in_p and remove check for FUNCTION_DECL if
2574 possible.
3d78e008
ML
2575 (check_builtin_function_arguments): Likewise.
2576 (reject_gcc_builtin): Likewise.
2577 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
2578
b5be6d0c
MP
25792018-08-26 Marek Polacek <polacek@redhat.com>
2580
2581 PR c++/87029, Implement -Wredundant-move.
2582 * c.opt (Wredundant-move): New option.
2583
79ca9c35
MP
25842018-08-21 Marek Polacek <polacek@redhat.com>
2585
2586 PR c++/86981, Implement -Wpessimizing-move.
2587 * c.opt (Wpessimizing-move): New option.
2588
097f82ec
DM
25892018-08-20 David Malcolm <dmalcolm@redhat.com>
2590
2591 PR other/84889
2592 * c-attribs.c (common_handle_aligned_attribute): Add
2593 auto_diagnostic_group instance.
2594 * c-indentation.c (warn_for_misleading_indentation): Likewise.
2595 * c-opts.c (c_common_post_options): Likewise.
2596 * c-warn.c (warn_logical_not_parentheses): Likewise.
2597 (warn_duplicated_cond_add_or_warn): Likewise.
2598 (warn_for_multistatement_macros): Likewise.
2599
3fb558b1
NS
26002018-08-20 Nathan Sidwell <nathan@acm.org>
2601
2602 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
2603 access.
2604
800c0e98
NS
26052018-08-17 Nathan Sidwell <nathan@acm.org>
2606
2607 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
2608 field.
2609 (laxy_hex_fp_value_count): Make unsigned.
2610 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
2611 manipulate the macro.
2612 (builtin_defin_with_hex_fp_value): Adjust callback name, use
2613 cpp_define_lazily.
2614
6f795a92
DM
26152018-08-17 David Malcolm <dmalcolm@redhat.com>
2616
2617 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
2618 (gcc_dump_printf_length_specs): New.
2619 (gcc_dump_printf_flag_pairs): New.
2620 (gcc_dump_printf_flag_specs): New.
2621 (gcc_dump_printf_char_table): New.
2622 (format_types_orig): Add entry for "gcc_dump_printf".
2623 (init_dynamic_diag_info): Set up length_char_specs and
2624 conversion_specs for gcc_dump_printf_format_type.
2625 (handle_format_attribute): Handle gcc_dump_printf_format_type.
2626
c5d725c0
NS
26272018-08-17 Nathan Sidwell <nathan@acm.org>
2628
10f04917
NS
2629 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
2630
c5d725c0
NS
2631 * c-ada-spec.c: Don't #include "cpp-id-data.h"
2632 * c-cppbuiltin.c: Likewise.
2633
c0c12356
ML
26342018-08-17 Martin Liska <mliska@suse.cz>
2635
2636 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
2637 Ignore/Deprecated flag. Warning is done automatically for
2638 Deprecated flags.
c0c12356 2639
10fcc142
DM
26402018-08-16 David Malcolm <dmalcolm@redhat.com>
2641
2642 PR c++/70693
2643 * c-common.c (selftest::c_family_tests): Call
2644 selftest::c_indentation_c_tests.
2645 * c-common.h (selftest::c_indentation_c_tests): New decl.
2646 * c-indentation.c: Include "selftest.h".
2647 (next_tab_stop): Add "tab_width" param, rather than accessing
2648 cpp_opts.
2649 (get_visual_column): Likewise. Clarify comment. Bulletproof
2650 against reading past the end of the line.
2651 (get_first_nws_vis_column): Add "tab_width" param.
2652 (detect_intervening_unindent): Likewise.
2653 (should_warn_for_misleading_indentation): Read tab width from
2654 cpp_opts and pass around.
2655 (selftest::test_next_tab_stop): New test.
2656 (selftest::assert_get_visual_column_succeeds): New function.
2657 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
2658 (selftest::assert_get_visual_column_fails): New function.
2659 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
2660 (selftest::test_get_visual_column): New test.
2661 (selftest::c_indentation_c_tests): New function.
2662
3f6677f4
NS
26632018-08-16 Nathan Sidwell <nathan@acm.org>
2664
2665 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
2666 (store_ada_macro): Likewise.
2667 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
2668 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
2669
96e6ae57
DM
26702018-08-15 David Malcolm <dmalcolm@redhat.com>
2671
2672 * c-format.c: Include "selftest-diagnostic.h" and
2673 "gcc-rich-location.h".
2674 (format_warning_at_char): Pass NULL for new label params of
2675 format_warning_va.
2676 (class indirection_suffix): New class.
2677 (class range_label_for_format_type_mismatch): New class.
2678 (format_type_warning): Move logic for generating "*" suffix to
2679 class indirection_suffix. Create "fmt_label" and "param_label"
2680 to show their types, and pass them to the
2681 format_warning_at_substring calls.
2682 (selftest::test_type_mismatch_range_labels): New test.
2683 (selftest::c_format_c_tests): Call it.
2684
23aa9f7c
MS
26852018-08-13 Martin Sebor <msebor@redhat.com>
2686
2687 PR tree-optimization/71625
2688 * c-common.c (braced_list_to_string): New function.
2689 * c-common.h (braced_list_to_string): Declare it.
2690
f10a9135
NS
26912018-08-08 Nathan Sidwell <nathan@acm.org>
2692
2693 * c-common.c (try_to_locate_new_include_inertion_point): Use
2694 linemap_included_from_linemap.
2695 * c-lex.c (fe_file_change): Use linemap_included_from.
2696 * c-ppoutput.c (pp_file_change): Likewise.
2697
8a45b051
MS
26982018-08-01 Martin Sebor <msebor@redhat.com>
2699
2700 PR tree-optimization/86650
ab20d992 2701 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
8a45b051
MS
2702 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
2703 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
2704 * c-format.h (T89_G): Update to be "gimple *" rather than
2705 "gcall *".
2706 (local_gcall_ptr_node): Rename...
2707 (local_gimple_ptr_node): ...to this.
2708
e540ccc0
DM
27092018-07-31 David Malcolm <dmalcolm@redhat.com>
2710
2711 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
2712 table entries for gcc_diag_char_table, and the 'Z' entry from
2713 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
2714 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
2715 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
2716 adding missing "Z" for this table. Remove erroneous "G" and "K"
2717 entries.
2718 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
2719 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
2720 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
2721
425fc685
RE
27222018-07-31 Richard Earnshaw <rearnsha@arm.com>
2723
2724 * c-common.c (speculation_safe_resolve_call): New function.
2725 (speculation_safe_resolve_params): New function.
2726 (speculation_safe_resolve_return): New function.
2727 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
2728 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
2729 __HAVE_SPECULATION_SAFE_VALUE.
2730
181463c2
DM
27312018-07-20 David Malcolm <dmalcolm@redhat.com>
2732
2733 * c-common.c (c_cpp_error): Remove redundant "line_table"
2734 parameter from call to rich_location::set_range.
2735 (maybe_suggest_missing_token_insertion): Likewise.
2736
0d7f9065
MS
27372018-07-20 Martin Sebor <msebor@redhat.com>
2738
2739 PR middle-end/82063
ab20d992 2740 * c.opt (-Warray-bounds): Remove redundant -Wall.
0d7f9065 2741
00abf86c
MS
27422018-07-20 Martin Sebor <msebor@redhat.com>
2743
2744 PR middle-end/82063
2745 * c-common.h (c_common_handle_option): Change function argument
2746 to HOST_WIDE_INT.
2747 * c-opts.c (c_common_init_options): Same.
2748 (c_common_handle_option): Same. Remove special handling of
2749 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
2750 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
2751 options to take a HOST_WIDE_INT argument and accept a byte-size
2752 suffix. Initialize.
2753 (-Wvla-larger-than): Same.
2754 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
2755 (-Wno-vla-larger-than): Same.
2756
9b452033
JJ
27572018-07-12 Jakub Jelinek <jakub@redhat.com>
2758
2759 * c-attribs.c (c_common_attribute_table): Add
2760 "omp declare target implicit" attribute.
2761
cd0762f3
RB
27622018-07-12 Richard Biener <rguenther@suse.de>
2763
2764 PR c/86453
2765 * c-attribs.c (handle_packed_attribute): Do not build a variant
2766 type with TYPE_PACKED, instead ignore the attribute if we may
2767 not apply to the original type.
2768
0b27c3ed
JJ
27692018-07-10 Jakub Jelinek <jakub@redhat.com>
2770
2771 PR c++/86443
2772 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
2773 to contain TREE_LIST for both the original class iterator and the
2774 "last" helper var.
2775
e730a0ef
EB
27762018-07-07 Eric Botcazou <ebotcazou@adacore.com>
2777
2778 * c-ada-spec.c (to_ada_name): Remove index parameter.
2779 (pp_ada_tree_identifier): Likewise.
2780 (dump_ada_macros): Adjust call to to_ada_name.
2781 (struct overloaded_name_hash): Delete.
2782 (struct overloaded_name_hasher): Likewise.
2783 (overloaded_names): Likewise.
2784 (compute_overloading_index): Likewise.
2785 (dump_ada_decl_name): Do not call compute_overloading_index and
2786 adjust calls to pp_ada_tree_identifier.
2787 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
2788 (dump_ada_import): Add spc parameter and switch to aspect syntax.
2789 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
2790 (dump_ada_enum_type): Remove type and display_convention parameters.
2791 Adjust calls to pp_ada_tree_identifier.
2792 (dump_ada_node): Likewise and for dump_ada_structure.
2793 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
2794 and tidy up.
2795 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
2796 syntax.
2797 (print_constructor): Adjust call to pp_ada_tree_identifier.
2798 (print_destructor): Likewise.
2799 (dump_ada_declaration): Switch to aspect syntax.
2800 (dump_ada_structure): Likewise and tidy up. Replace display_convention
2801 parameter with nested parameter.
2802 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
2803 (dump_ada_specs): Do not delete overloaded_names table.
2804
8de583fc
PB
28052018-07-06 Peter Bergner <bergner@linux.ibm.com>
2806
2807 PR target/86324
e730a0ef 2808 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
2809 target hook.
2810
09cff37b
NS
28112018-07-05 Nathan Sidwell <nathan@acm.org>
2812
2813 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
2814 NO_IMPLICIT_EXTERN_C.
2815
98086b2b
ML
28162018-06-28 Martin Liska <mliska@suse.cz>
2817
2818 * cppspec.c: Include opt-suggestions.h.
2819
ab20d992
JJ
28202018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
2821 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
2822 Cesar Philippidis <cesar@codesourcery.com>
2823
2824 * c-pragma.h (enum pragma_omp_clause): Add
2825 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
2826 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
2827
f41b7612
JJ
28282018-06-20 Jakub Jelinek <jakub@redhat.com>
2829
2830 PR c++/86210
2831 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
2832 comment.
2833
4252ccd7
MS
28342018-06-18 Martin Sebor <msebor@redhat.com>
2835
2836 PR middle-end/85602
2837 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
2838 nonstring.
2839
e197e64e
KV
28402018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2841
2842 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
2843
34a7a230
JM
28442018-06-13 Jason Merrill <jason@redhat.com>
2845
5cef3733
JM
2846 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
2847 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
2848 handling.
2849
34a7a230
JM
2850 PR c++/86094 - wrong code with defaulted move ctor.
2851 * c-opts.c (c_common_post_options): Bump the current ABI version to
2852 13. Set warn_abi_version and flag_abi_compat_version to the current
2853 version rather than 0. Fix defaulting flag_abi_compat_version from
2854 warn_abi_version.
2855
bb0f14ae
MS
28562018-06-12 Martin Sebor <msebor@redhat.com>
2857
2858 PR c/85931
2859 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
2860 sizeof source and destination yields the same value.
2861
3713f2e2
ML
28622018-06-12 Martin Liska <mliska@suse.cz>
2863
2864 * c.opt: Make MPX-related options as Deprecated.
2865
4af78ef8
DM
28662018-06-08 David Malcolm <dmalcolm@redhat.com>
2867
2868 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
2869 rather than 0.
2870
31db0fe0
ML
28712018-06-08 Martin Liska <mliska@suse.cz>
2872
2873 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
2874 for MPX (macros, related functions, fields in cgraph_node, ...).
2875 (handle_bnd_legacy): Likewise.
2876 (handle_bnd_instrument): Likewise.
2877 * c.opt: Likewise.
2878
fe16acf2
JJ
28792018-06-06 Jakub Jelinek <jakub@redhat.com>
2880
2881 PR c++/86068
2882 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
2883 __cpp_transactional_memory to 201500 instead of 210500.
2884
4dbdb49b
JM
28852018-06-06 Jason Merrill <jason@redhat.com>
2886
2887 PR c++/85710 - ICE with -Wmemset-elt-size.
2888 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
2889
f8ad043f
JM
28902018-06-01 Jason Merrill <jason@redhat.com>
2891
2892 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
2893 201703.
2894
abc24d93
EB
28952018-06-01 Eric Botcazou <ebotcazou@adacore.com>
2896
2897 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
2898 declaration for a typedef independently of whether the declaration of
2899 the subtype is generated.
2900
d258f4aa
MS
29012018-05-31 Martin Sebor <msebor@redhat.com>
2902
2903 PR c/82063
2904 * c.opt (-Wno-alloc-size-larger-than): New option.
2905
b67b9225
DP
29062018-04-22 David Pagan <dave.pagan@oracle.com>
2907
2908 PR c/55976
2909 * c-opts.c (c_common_post_options): Set default for warn_return_type
ab20d992 2910 for C++/C++ with ObjC extensions only. For C, makes it possible to
b67b9225
DP
2911 differentiate between default (no option), -Wreturn-type, and
2912 -Wno-return-type.
2913
04eb9c55
JM
29142018-05-29 Jason Merrill <jason@redhat.com>
2915
2916 * c.opt (Winit-list-lifetime): New flag.
2917
b0c31bc6
BE
29182018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
2919
2920 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
2921 splay_tree_delete_pointers.
2922
44284983
JJ
29232018-05-26 Jakub Jelinek <jakub@redhat.com>
2924
2925 PR bootstrap/85921
2926 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
2927 noinline variable to workaround broken kernel headers.
2928
b46b715d
JM
29292018-05-18 Jason Merrill <jason@redhat.com>
2930
2931 * c.opt (Wdeprecated-copy): New flag.
2932
40659769
ML
29332018-05-17 Martin Liska <mliska@suse.cz>
2934
2935 * c-warn.c (overflow_warning): Do not use
2936 space in between 'G_' and '('.
2937
403962ea
JM
29382018-05-09 Jason Merrill <jason@redhat.com>
2939
2940 * c-common.c (valid_array_size_p): Add complain parameter.
2941 * c-common.h: ...which defaults to true.
2942
1c9ee609
JJ
29432018-05-11 Jakub Jelinek <jakub@redhat.com>
2944
2945 PR c/85696
2946 * c-omp.c (c_omp_predetermined_sharing): Return
2947 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
2948
19916065
ML
29492018-05-11 Martin Liska <mliska@suse.cz>
2950
92a285c1 2951 PR sanitizer/85556
19916065
ML
2952 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
2953 TREE_LIST values.
2954
79e7b1fe
JJ
29552018-05-10 Jakub Jelinek <jakub@redhat.com>
2956
2957 PR c++/85662
2958 * c-common.h (fold_offsetof_1): Removed.
2959 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
2960 CTX argument defaulted to ERROR_MARK.
2961 * c-common.c (fold_offsetof_1): Renamed to ...
2962 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
2963 argument, convert the pointer constant to TYPE and use size_binop
2964 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
2965 a pointer type. Adjust recursive calls.
2966
86c12f76
EB
29672018-05-10 Eric Botcazou <ebotcazou@adacore.com>
2968
2969 PR c++/85400
2970 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
2971
ee336e84
NS
29722018-05-07 Nathan Sidwell <nathan@acm.org>
2973
2974 * c.opt (ffor-scope): Remove functionality, issue warning.
2975
6c072e21
NS
29762018-05-03 Nathan Sidwell <nathan@acm.org>
2977
2978 * c.opt (ffriend-injection): Remove functionality, issue warning.
2979
2cc7d3a7
DM
29802018-05-01 David Malcolm <dmalcolm@redhat.com>
2981
2982 PR c/84258
2983 * c-format.c (struct format_check_results): Add field
2984 "number_non_char".
2985 (check_format_info): Initialize it, and warn if encountered.
2986 (check_format_arg): Distinguish between wide char and
2987 everything else when detecting arrays of non-char.
2988
7761dfbe
DM
29892018-04-30 David Malcolm <dmalcolm@redhat.com>
2990
2991 * c-format.c (get_corrected_substring): Update for
2992 location_get_source_line returning a char_span. Use a char_span
2993 when handling the prefix of the correction.
2994 * c-indentation.c (get_visual_column): Update for
2995 location_get_source_line returning a char_span.
2996 (get_first_nws_vis_column): Likewise.
2997
62e98ef1
DM
29982018-03-29 David Malcolm <dmalcolm@redhat.com>
2999
3000 PR c++/84269
3001 * known-headers.cc (get_stdlib_header_for_name): Add various names
3002 from <assert.h>, <string.h>, and <memory.h>; add more names from
3003 <stdio.h>.
3004
a7dea617
JJ
30052018-03-27 Jakub Jelinek <jakub@redhat.com>
3006
3007 PR c++/85061
3008 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
3009 get_base_address of the second operand is a VAR_P, rather than the
3010 operand itself, and use gcc_checking_assert instead of gcc_assert.
3011
889a3a30
MP
30122018-03-23 Marek Polacek <polacek@redhat.com>
3013
3014 PR c++/85045
3015 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
3016 <case RDIV_EXPR>: Tweak condition.
3017
452154b9
EB
30182018-03-20 Eric Botcazou <ebotcazou@adacore.com>
3019
3020 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
3021
63ecb626
JJ
30222018-03-16 Jakub Jelinek <jakub@redhat.com>
3023
ce811fc4
JJ
3024 PR c/84909
3025 * c-warn.c (conversion_warning): Replace "to to" with "to" in
3026 diagnostics.
3027
63ecb626
JJ
3028 PR c/84910
3029 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
3030 diagnostics.
3031
a1295eec
RB
30322018-03-16 Richard Biener <rguenther@suse.de>
3033
3034 PR c/84873
3035 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
3036 unshare the possibly folded expression.
3037
919674fb
RB
30382018-03-15 Richard Biener <rguenther@suse.de>
3039
3040 PR c/84873
3041 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
3042
f99309b2
MS
30432018-03-13 Martin Sebor <msebor@redhat.com>
3044
3045 PR tree-optimization/84725
3046 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
3047 with all three narrow character types, including their qualified forms.
3048
e9b9fa4c
MS
30492018-03-12 Martin Sebor <msebor@redhat.com>
3050
3051 PR tree-optimization/83456
ab20d992 3052 * c-common.c (check_function_restrict): Return bool.
e9b9fa4c
MS
3053 Restore checking of bounded built-in functions.
3054 (check_function_arguments): Also return the result
3055 of warn_for_restrict.
ab20d992
JJ
3056 * c-common.c (check_function_restrict): Return bool.
3057 * c-warn.c (warn_for_restrict): Return bool.
e9b9fa4c 3058
0805d020
MP
30592018-03-02 Marek Polacek <polacek@redhat.com>
3060
3061 PR c++/84171
3062 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
3063 is erroneous.
3064
ed2a2f08
TS
30652018-03-02 Thomas Schwinge <thomas@codesourcery.com>
3066
3067 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
3068 function".
3069
90abdde0
MP
30702018-03-01 Marek Polacek <polacek@redhat.com>
3071
3072 PR c++/84639
3073 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
3074 alignment in computation.
3075
c6db43fa
EB
30762018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3077
3078 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
3079 <REAL_TYPE>: Deal specifically with _Float128/__float128.
3080
9e25c7ed
EB
30812018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3082
3083 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
3084 (is_char_array): Take a type instead of a declaration.
3085 (dump_ada_array_type): Likewise.
3086 (is_simple_enum): Minor tweak.
3087 (dump_ada_enum_type): New function extracted from...
3088 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
3089 <INTEGER_TYPE>: Remove unreachable code.
3090 <RECORD_TYPE>: Likewise. Minor tweaks.
3091 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
3092 <ENUMERAL_TYPE>: New case.
3093 <RECORD_TYPE>: Factor out common code.
3094 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
3095 Minor tweaks. Deal with enumeral types.
3096 (dump_ada_structure): Minor tweaks.
3097
09de3550
EB
30982018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3099
3100 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
3101 address for incomplete structures.
3102 (dump_forward_type): Do not bail out for incomplete structures.
3103 (dump_ada_declaration): Do not special-case incomplete structures
3104 for subtypes. Dump them as null records for types.
3105
095d8d4b
EB
31062018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3107
3108 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
3109 (is_char_array): Fix formatting.
3110 (dump_template_types): Likewise.
3111 (dump_generic_ada_node): Rename into...
3112 (dump_ada_node): ...this.
3113 <POINTER_TYPE>: Remove superfluous space. Use generic address for
3114 incomplete structures and not for empty structures. Do not use it
3115 when forward declarations are needed.
3116 (dump_forward_type): New function.
3117 (dump_nested_types): Remove FORWARD parameter. Do not consider
3118 TREE_VISITED and do not generate a forward declaration. Only dump
3119 original nested types for nested declaration.
3120 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
3121 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
3122 <RECORD_TYPE>: Do not consider TREE_VISITED.
3123 (dump_ada_declaration): Use booleans and fix formatting throughout.
3124 <TYPE_DECL>: Skip incomplete structures and not empty structures.
3125 Call dump_forward_type instead of dump_nested_types for a typedef.
3126 Remove superfluous check and adjust call to dump_nested_types.
3127 <POINTER_TYPE>: Call dump_forward_type and fall through.
3128 (dump_ada_struct_decl): Rename into...
3129 (dump_ada_structure): ...this. Do not special-case empty structures.
3130
d4cfd486
MS
31312018-02-27 Martin Sebor <msebor@redhat.com>
3132
3133 PR c++/83871
3134 * c.opt (-Wmissing-attributes): New option.
3135
b22dbd03
ML
31362018-02-21 Martin Liska <mliska@suse.cz>
3137
3138 * c.opt (Wcatch-value=): Add IntegerRange.
3139
883dfe2a
JM
31402018-02-15 Jason Merrill <jason@redhat.com>
3141
3142 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
3143
0444aa9c
NS
31442018-02-09 Nathan Sidwell <nathan@acm.org>
3145
3146 PR c/84293
3147 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
3148 arg.
3149 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
3150 arg. Adjust.
3151
cea71f0a
MS
31522018-02-09 Martin Sebor <msebor@redhat.com>
3153
3154 PR lto/84212
3155 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
3156 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
3157 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
3158 (-Wstrict-overflow, -Wsuggest-attribute): Same.
3159 (-Wuninitialized): Same.
3160
8c8b7be5
EB
31612018-02-09 Eric Botcazou <ebotcazou@adacore.com>
3162
3163 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
3164 keyword for components.
3165
7c30b12a
PC
31662018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
3167
3168 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
3169
eece7fe5
JK
31702018-02-02 Julia Koval <julia.koval@intel.com>
3171
3172 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
3173
7d07a93a
MP
31742018-01-29 Marek Polacek <polacek@redhat.com>
3175
3176 PR c/83966
3177 * c-format.c (check_function_format): Check current_function_decl.
3178
53723269
JJ
31792018-01-27 Jakub Jelinek <jakub@redhat.com>
3180
3181 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
3182 argument.
3183 (LAZY_HEX_FP_VALUES_CNT): Define.
3184 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
3185 values rather than just 12.
3186 (builtin_define_with_hex_fp_value): Likewise.
3187
7365279f
BK
31882018-01-18 Boris Kolpackov <boris@codesynthesis.com>
3189
92a285c1
ML
3190 PR other/70268
3191 * c.opt (-fmacro-prefix-map): New option.
3192 * c-opts.c (c_common_handle_option): Handle it.
3193 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
3194 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 3195
bb9869d5
DM
31962018-01-17 David Malcolm <dmalcolm@redhat.com>
3197
3198 PR c++/83814
3199 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
3200
68dc87c3
EB
32012018-01-10 Eric Botcazou <ebotcazou@adacore.com>
3202
3203 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
3204 Skip 'f' and 'F' characters if it is true.
3205 (store_ada_macro): Minor tweak.
3206 (dump_ada_macros) <CPP_COMMENT>: Likewise.
3207 <CPP_WSTRING>: Likewise.
3208 <CPP_STRING>: Output '&' in the buffer if not the first string.
3209 <CPP_NUMBER>: Adjust calls to dump_number.
3210
9a004410
DM
32112018-01-10 David Malcolm <dmalcolm@redhat.com>
3212
3213 PR c++/43486
3214 * c-common.c: Include "selftest.h".
3215 (get_atomic_generic_size): Perform the test for integral type
3216 before the range test for any integer constant, fixing indentation
3217 of braces. Call fold_for_warn before testing for an INTEGER_CST.
3218 (reject_gcc_builtin): Strip any location wrapper from EXPR.
3219 (selftest::test_fold_for_warn): New function.
3220 (selftest::c_common_c_tests): New function.
3221 (selftest::c_family_tests): Call it, and
3222 selftest::c_pretty_print_c_tests.
3223 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
3224 * c-format.c (check_format_arg): Convert VAR_P check to a
3225 fold_for_warn.
3226 * c-pretty-print.c: Include "selftest.h".
3227 (pp_c_cast_expression): Don't print casts for location wrappers.
3228 (selftest::assert_c_pretty_printer_output): New function.
3229 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
3230 (selftest::test_location_wrappers): New function.
3231 (selftest::c_pretty_print_c_tests): New function.
3232 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
3233
5c0caeb3
RS
32342018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3235 Alan Hayward <alan.hayward@arm.com>
3236 David Sherwood <david.sherwood@arm.com>
3237
3238 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
3239
73a699ae
RS
32402018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3241 Alan Hayward <alan.hayward@arm.com>
3242 David Sherwood <david.sherwood@arm.com>
3243
3244 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
3245 as polynomial.
3246
928686b1
RS
32472018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3248 Alan Hayward <alan.hayward@arm.com>
3249 David Sherwood <david.sherwood@arm.com>
3250
3251 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
3252 (convert_vector_to_array_for_subscript): Handle polynomial
3253 TYPE_VECTOR_SUBPARTS.
3254 (c_common_type_for_mode): Check valid_vector_subparts_p.
3255 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
3256 VECTOR_CST_NELTS.
3257
85ec4feb
JJ
32582018-01-03 Jakub Jelinek <jakub@redhat.com>
3259
3260 Update copyright years.
3261
170a8bd6 32622017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 3263 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
3264
3265 * c-pragma.c (init_pragma): Register pragma GCC unroll.
3266 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
3267
ab20d992 32682017-12-22 Alexandre Oliva <aoliva@redhat.com>
18408e96
AO
3269
3270 PR debug/83527
3271 PR debug/83419
3272 * c-semantics.c (only_debug_stmts_after_p): New.
3273 (pop_stmt_list): Clear side effects in debug-only stmt list.
3274 Check for single nondebug stmt followed by debug stmts only.
3275
c12d20d4
AO
32762017-12-21 Alexandre Oliva <aoliva@redhat.com>
3277
3278 PR debug/83419
3279 * c-semantics.c (pop_stmt_list): Propagate side effects from
3280 single nondebug stmt to container list.
3281
01512446
JJ
32822017-12-19 Jakub Jelinek <jakub@redhat.com>
3283
3284 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
3285 conditions with typical order conditions.
3286
82cfbd01
MP
32872017-12-18 Marek Polacek <polacek@redhat.com>
3288
3289 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
3290 not in effect.
3291
99da11ec
MS
32922017-12-17 Martin Sebor <msebor@redhat.com>
3293
3294 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
3295 an error for attribute warn_if_not_aligned.
3296
cc8bea0a
MS
32972017-12-16 Martin Sebor <msebor@redhat.com>
3298
3299 PR tree-optimization/78918
3300 * c-common.c (check_function_restrict): Avoid checking built-ins.
3301 * c.opt (-Wrestrict): Include in -Wall.
3302
4849deb1
JJ
33032017-12-15 Jakub Jelinek <jakub@redhat.com>
3304
3305 * c-attribs.c (c_common_attribute_table,
3306 c_common_format_attribute_table): Swap affects_type_identity
3307 and handler fields, adjust comments.
3308
c65e18d3
BE
33092017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3310
3311 * c.opt (Wcast-function-type): New warning option.
3312 * c-lex.c (get_fileinfo): Avoid warning.
3313 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
3314
2004617a
QZ
33152017-12-14 Qing Zhao <qing.zhao@oracle.com>
3316
7365279f 3317 PR middle_end/79538
2004617a
QZ
3318 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
3319 Adjust the size of buf1 and buf2, add a new buf to avoid
3320 format-overflow warning.
3321
ab20d992 33222017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
3323
3324 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
3325 subsequent statement list.
3326
5d9ae53d
MS
33272017-12-07 Martin Sebor <msebor@redhat.com>
3328
3329 PR c/81544
3330 PR c/81566
3331 * c-attribs.c (attr_aligned_exclusions): New array.
3332 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
3333 (attr_common_exclusions, attr_const_pure_exclusions): Same.
3334 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
3335 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
3336 (attr_warn_unused_result_exclusions): Same.
3337 (handle_hot_attribute, handle_cold_attribute): Simplify.
3338 (handle_const_attribute): Warn on function returning void.
3339 (handle_pure_attribute): Same.
3340 (handle_aligned_attribute): Diagnose conflicting attribute
3341 specifications.
3342 * c-warn.c (diagnose_mismatched_attributes): Simplify.
3343
c79144f8
DM
33442017-12-06 David Malcolm <dmalcolm@redhat.com>
3345
3346 PR c/83236
3347 * c-common.c (selftest::c_family_tests): Call
3348 selftest::c_spellcheck_cc_tests.
3349 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
3350 * c-spellcheck.cc: Include "selftest.h".
3351 (name_reserved_for_implementation_p): New function.
3352 (should_suggest_as_macro_p): New function.
3353 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
3354 should_suggest_as_macro_p and call it.
3355 (selftest::test_name_reserved_for_implementation_p): New function.
3356 (selftest::c_spellcheck_cc_tests): New function.
3357 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
3358
613bc14f
DM
33592017-12-06 David Malcolm <dmalcolm@redhat.com>
3360
3361 * c-spellcheck.cc: New file, taken from macro-handling code in
3362 spellcheck-tree.c.
3363 * c-spellcheck.h: New file, taken from macro-handling code in
3364 spellcheck-tree.h.
3365
e76c7157
JJ
33662017-12-01 Jakub Jelinek <jakub@redhat.com>
3367
3368 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
3369 attribute.
3370 (handle_simd_attribute): Don't check for "cilk simd function"
3371 attribute. Reindent, formatting changes.
3372
b0da4034
JK
33732017-11-30 Julia Koval <julia.koval@intel.com>
3374
3375 * c-common.h (inv_list): Remove.
3376
058f0b9e
JJ
33772017-11-28 Jakub Jelinek <jakub@redhat.com>
3378
3379 PR sanitizer/81275
3380 * c-common.c (c_switch_covers_all_cases_p_1,
3381 c_switch_covers_all_cases_p): New functions.
3382 * c-common.h (c_switch_covers_all_cases_p): Declare.
3383
5e9d6aa4 33842017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 3385 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
3386
3387 * array-notation-common.c: Delete.
3388 * c-cilkplus.c: Ditto.
3389 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
3390 * c-common.def (ARRAY_NOTATION_REF): Remove.
3391 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
3392 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
3393 c_validate_cilk_plus_loop, cilkplus_an_parts,
3394 cilk_ignorable_spawn_rhs_op,
3395 cilk_recognize_spawn): Remove.
3396 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
3397 * c-omp.c: Remove CILK_SIMD check.
3398 * c-pragma.c: Ditto.
3399 * c-pragma.h: Remove CILK related pragmas.
3400 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
3401 ARRAY_NOTATION_REF condition.
3402 (c_pretty_printer::expression): Ditto.
3403 * c.opt (fcilkplus): Remove.
3404 * cilk.c: Delete.
3405
1af4ebf5
MG
34062017-11-21 Marc Glisse <marc.glisse@inria.fr>
3407
3408 * c-pretty-print.c (pp_c_additive_expression,
3409 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
3410
d44ed508
JJ
34112017-11-21 Jakub Jelinek <jakub@redhat.com>
3412
7d2f0f9b
JJ
3413 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
3414
d44ed508
JJ
3415 PR c++/83059
3416 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
3417 instead of tree_to_uhwi, formatting fix.
3418
26edace6
DM
34192017-11-20 David Malcolm <dmalcolm@redhat.com>
3420
3421 PR c/81404
3422 * known-headers.cc: New file, based on material from c/c-decl.c.
3423 (suggest_missing_header): Copied as-is.
3424 (get_stdlib_header_for_name): New, based on get_c_name_hint but
3425 heavily edited to add C++ support. Add some knowledge about
3426 <limits.h>, <stdint.h>, and <wchar.h>.
3427 * known-headers.h: Likewise.
3428
6c7a259b
DM
34292017-11-20 David Malcolm <dmalcolm@redhat.com>
3430
3431 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
3432 (lookup_name_fuzzy): Likewise. Convert return type from
3433 const char * to name_hint. Add location_t param.
3434 * name-hint.h: New header.
3435
f9c59f7e
JJ
34362017-11-19 Jakub Jelinek <jakub@redhat.com>
3437
3438 PR c/66618
3439 PR c/69960
3440 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
3441
1e39313a
JM
34422017-11-16 Joseph Myers <joseph@codesourcery.com>
3443
3444 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
3445 expected publication date of C17.
3446 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
3447
3ca0dc60
JM
34482017-11-15 Joseph Myers <joseph@codesourcery.com>
3449
3450 PR c/81156
3451 * c-common.c (c_common_reswords): Add __builtin_tgmath.
3452 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
3453
025d57f0
MS
34542017-11-10 Martin Sebor <msebor@redhat.com>
3455
3456 PR c/81117
3457 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
3458 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
3459 * c.opt (-Wstringop-truncation): New option.
3460
1b6fa695
ML
34612017-11-06 Martin Liska <mliska@suse.cz>
3462
3463 PR middle-end/82404
3464 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
3465 FE.
3466 * c.opt: Set default value of warn_return_type.
3467
64a5912c
DM
34682017-10-31 David Malcolm <dmalcolm@redhat.com>
3469
3470 * c-common.c (binary_op_error): Update for renaming of
3471 error_at_rich_loc.
3472 (c_parse_error): Likewise.
3473 * c-warn.c (warn_logical_not_parentheses): Likewise for
3474 renaming of inform_at_rich_loc.
3475 (warn_for_restrict): Likewise for renaming of
3476 warning_at_rich_loc_n.
3477
c76dc9c3
JM
34782017-10-30 Joseph Myers <joseph@codesourcery.com>
3479
3480 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
3481 * c-opts.c (set_std_c17): New function.
3482 (c_common_init_options): Use gnu17 as default C version.
3483 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
3484
ee5fd23a
MM
34852017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
3486
3487 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
3488 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
3489 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
3490 __FP_FAST_FMA<N>X.
3491
d1047465
MP
34922017-10-23 Marek Polacek <polacek@redhat.com>
3493
3494 PR c/82681
3495 * c-warn.c (warnings_for_convert_and_check): Fix typos.
3496
9e878cf1
EB
34972017-10-19 Eric Botcazou <ebotcazou@adacore.com>
3498
3499 * c-common.c (check_builtin_function_arguments): Also check arguments
3500 of __builtin_alloca_with_align_and_max.
3501
89b6abbb
DM
35022017-10-17 David Malcolm <dmalcolm@redhat.com>
3503
3504 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
3505 rather than NULL to format_warning_va.
3506 (check_format_types): Likewise when calling format_type_warning.
3507 Remove code to extract source_ranges and source_range * in favor
3508 of just a location_t.
3509 (format_type_warning): Convert source_range * param to a
3510 location_t.
3511
39382c09
JJ
35122017-10-13 Jakub Jelinek <jakub@redhat.com>
3513
3514 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
3515 [LR]SHIFT_EXPR.
3516
62e1c678
DM
35172017-10-12 David Malcolm <dmalcolm@redhat.com>
3518
3519 * c-common.c (enum missing_token_insertion_kind): New enum.
3520 (get_missing_token_insertion_kind): New function.
3521 (maybe_suggest_missing_token_insertion): New function.
3522 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
3523
b90c9338
NS
35242017-10-11 Nathan Sidwell <nathan@acm.org>
3525
3526 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
3527 (c_common_handle_option): Update incpath_kind names.
3528
3a266bcd
ML
35292017-10-11 Martin Liska <mliska@suse.cz>
3530
3531 PR sanitizer/82490
3532 * c-attribs.c (handle_no_sanitize_attribute): Report directly
3533 Wattributes warning.
3534
8e6cdc90
RS
35352017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
3536
3537 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
3538 operating on trees as wide_ints.
3539 * c-common.c (pointer_int_sum): Likewise.
3540 * c-pretty-print.c (pp_c_integer_constant): Likewise.
3541 * c-warn.c (match_case_to_enum_1): Likewise.
3542 (c_do_switch_warnings): Likewise.
3543 (maybe_warn_shift_overflow): Likewise.
3544
802b38c9
JJ
35452017-10-10 Jakub Jelinek <jakub@redhat.com>
3546
3547 PR c/82437
3548 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
3549 instead of wide_int::from.
3550
4e34b338
JJ
35512017-10-06 Jakub Jelinek <jakub@redhat.com>
3552
3553 PR c/82437
3554 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
3555 using to_widest use wide_int with the larger of the two precisions.
3556
4bc4b2b4
BE
35572017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
3558
3559 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
3560 functions.
3561
a1488398
RS
35622017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
3563
3564 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
3565 when combining the original unconverted comparison operands.
3566
01c9fb68
JJ
35672017-09-29 Jakub Jelinek <jakub@redhat.com>
3568
3569 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
3570 attribute.
3571
6e3e8419
EB
35722017-09-29 Eric Botcazou <ebotcazou@adacore.com>
3573
3574 * c-ada-spec.c (to_ada_name): Add index parameter.
3575 (pp_ada_tree_identifier): Likewise.
3576 (dump_ada_macros): Adjust call to to_ada_name.
3577 (struct overloaded_name_hash): New type.
3578 (struct overloaded_name_hasher): Likewise.
3579 (overloaded_names): New hash table.
3580 (compute_overloading_index): New function.
3581 (dump_ada_decl_name): Call it and pass the result to
3582 pp_ada_tree_identifier.
3583 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
3584 (dump_ada_function_declaration): Likewise.
3585 (dump_generic_ada_node): Likewise.
3586 (print_constructor): Likewise.
3587 (print_destructor): Likewise.
3588 (dump_ada_specs): Delete overloaded_names table.
3589
79310774
EB
35902017-09-29 Eric Botcazou <ebotcazou@adacore.com>
3591
3592 * c-ada-spec.c (max_ada_macros): Move around.
3593 (store_ada_macro_index): Likewise.
3594 (source_file): Rename into...
3595 (macro_source_file): ...this.
3596 (count_ada_macro): Move around.
3597 (store_ada_macro): Likewise.
3598 (compare_macro): Likewise.
3599 (print_ada_macros): Merge in...
3600 (dump_ada_macros): ...this.
3601 (source_file_base): Rename into...
3602 (current_source_file): ...this.
3603 (print_comment): Move around.
3604 (dump_ada_nodes): Call dump_ada_declaration directly.
3605 (struct with): Change type of limited field to bool.
3606 (append_withs): Change type of limited_access parameter to bool.
3607 (pp_ada_tree_identifie): Likewise.
3608 (dump_ada_decl_nam): Likewise.
3609 (dump_generic_ada_node): Likewise. Do not print the return type.
3610 (to_ada_name): Change type of space_found parameter to bool.
3611 (dump_ada_function_declaration): Return void and change type of
3612 parameters to bool. Also print the return type for a function.
3613 (print_ada_methods): Rename into...
3614 (dump_ada_methods): ...this.
3615 (print_ada_declaration): Rename into ...
3616 (dump_ada_declaration): ...this. Do not print the return type.
3617 (print_ada_struct_decl): Rename into...
3618 (dump_ada_struct_decl): ...this.
3619
7d386d45
JJ
36202017-09-29 Jakub Jelinek <jakub@redhat.com>
3621
3622 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
3623 rather than DECL_INITIAL.
3624 (common_handle_aligned_attribute): Likewise.
3625
ab20d992 36262017-09-20 Alexandre Oliva <aoliva@redhat.com>
9ed32e27
AO
3627
3628 * c.opt (gen-decls): Add RejectNegative.
3629
026a79f7
AS
36302017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
3631 Jakub Jelinek <jakub@redhat.com>
3632
3633 Add support for -std=c++2a.
3634 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
3635 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
3636 * c-opts.c (set_std_cxx2a): New.
3637 (c_common_handle_option): Set options when -std=c++2a is enabled.
3638 (c_common_post_options): Adjust comments.
3639 (set_std_cxx14, set_std_cxx17): Likewise.
3640
4a8ca690
EB
36412017-09-15 Eric Botcazou <ebotcazou@adacore.com>
3642
3643 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
3644 message for non-uniform endianness and issue a warning in C++.
3645
7b936140
JJ
36462017-09-15 Jakub Jelinek <jakub@redhat.com>
3647
3648 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
3649 (Wc++17-compat): Change from undocumented alias to option.
3650 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
3651 change C++1z to C++17 in description.
3652 (std=c++1z, std=gnu++1z): Change from option to undocumented
3653 deprecated alias.
3654 (std=c++17, std=gnu++17): Change from undocumented alias to option.
3655 Adjust description.
3656 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
3657 * c-opts.c (set_std_cxx1z): Rename to ...
3658 (set_std_cxx17): ... this.
3659 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
3660 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 3661 caller.
7b936140
JJ
3662 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
3663 comments.
3664
12263f13
L
36652017-09-12 H.J. Lu <hongjiu.lu@intel.com>
3666
3667 * c-attribs.c (common_handle_aligned_attribute): Don't warn
3668 function alignment if warn_if_not_aligned_p is true.
3669
6836632e
NS
36702017-09-12 Nathan Sidwell <nathan@acm.org>
3671
3672 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
3673 resort_sorted_fields): Move to c/c-decl.c.
3674 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
3675 (struct sorted_fields_type): Move to c/c-lang.h.
3676
019bf9ad
JW
36772017-09-09 Jonathan Wakely <jwakely@redhat.com>
3678
3679 PR c++/81852
3680 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
3681
bc7fe952
MP
36822017-09-04 Marek Polacek <polacek@redhat.com>
3683
3684 PR c/81783
3685 * c-warn.c (warn_tautological_bitwise_comparison): New function.
3686 (warn_tautological_cmp): Call it.
3687
ab20d992 36882017-09-01 Boris Kolpackov <boris@codesynthesis.com>
de7c2c6a
BK
3689
3690 * c-opts.c (c_common_finish): Write dependency information even if
3691 there are errors.
3692
d2e05fcb
JJ
36932017-09-01 Jakub Jelinek <jakub@redhat.com>
3694
3695 PR c/81887
3696 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
3697 (omp_pragmas_simd): ... here.
3698 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
3699 create new clauses list containing just simd clause.
3700
18e2a8b8
RS
37012017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3702 Alan Hayward <alan.hayward@arm.com>
3703 David Sherwood <david.sherwood@arm.com>
3704
3705 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
3706 into scalar_mode_supported_p call.
3707 (handle_mode_attribute): Update call to scalar_mode_supported_p.
3708
16d22000
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-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
3714 for the mode iterator.
3715
b397965c
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-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
3721 * c-common.c (c_build_vec_perm_expr): Likewise.
3722
357b7604
RS
37232017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3724 Alan Hayward <alan.hayward@arm.com>
3725 David Sherwood <david.sherwood@arm.com>
3726
3727 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
3728
e05c94ba
RS
37292017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3730 Alan Hayward <alan.hayward@arm.com>
3731 David Sherwood <david.sherwood@arm.com>
3732
3733 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
3734 before calling targetm.addr_space.valid_pointer_mode.
3735
5c20c4af
RS
37362017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3737 Alan Hayward <alan.hayward@arm.com>
3738 David Sherwood <david.sherwood@arm.com>
3739
3740 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
3741
c94843d2 37422017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
3743 Alan Hayward <alan.hayward@arm.com>
3744 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
3745
3746 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
3747 iterators.
3748 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
3749
4e10a5a7
RS
37502017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
3751 Alan Hayward <alan.hayward@arm.com>
3752 David Sherwood <david.sherwood@arm.com>
3753
3754 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
3755 case statements.
3756
130fcab0
ML
37572017-08-29 Martin Liska <mliska@suse.cz>
3758
3759 PR other/39851
3760 * c-common.c (parse_optimize_options): Add argument to function
3761 call.
3762 * c-pragma.c (handle_pragma_diagnostic): Likewise.
3763
14e18d71
DM
37642017-08-24 David Malcolm <dmalcolm@redhat.com>
3765
3766 * c-lex.c (interpret_float): Use token location
3767 when building an EXCESS_PRECISION_EXPR.
3768
2f687306
DM
37692017-08-21 David Malcolm <dmalcolm@redhat.com>
3770
3771 * c-common.c (check_function_arguments): Add "arglogs" param; pass
3772 it to check_function_format.
3773 * c-common.h (check_function_arguments): Add vec<location_t> *
3774 param.
3775 (check_function_format): Likewise.
3776 * c-format.c (struct format_check_context): Add field "arglocs".
3777 (check_function_format): Add param "arglocs"; pass it to
3778 check_format_info.
ab20d992 3779 (check_format_info): Add param "arglocs"; use it to initialize
2f687306
DM
3780 new field of format_ctx.
3781 (check_format_arg): Pass format_ctx->arglocs to new param of
3782 check_format_info_main.
3783 (class argument_parser): New field "arglocs".
3784 (argument_parser::argument_parser): Add "arglocs_" param and use
3785 it to initialize new field.
3786 (argument_parser::check_argument_type): Pass new arglocs field to
3787 check_format_types.
3788 (check_format_info_main): Add param "arglocs", and use it when
3789 constructing arg_parser.
3790 (check_format_types): Add param "arglocs"; use it if non-NULL when
3791 !EXPR_HAS_LOCATION (cur_param) to get at location information.
3792
00aa1fa2
L
37932017-08-18 H.J. Lu <hongjiu.lu@intel.com>
3794
3795 PR c/53037
3796 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
3797 (c_common_attribute_table): Add warn_if_not_aligned.
3798 (handle_aligned_attribute): Renamed to ...
3799 (common_handle_aligned_attribute): Remove argument, name, and add
3800 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
3801 (handle_aligned_attribute): New.
3802 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
3803
27be025d
MS
38042017-08-14 Martin Sebor <msebor@redhat.com>
3805
3806 PR c/81117
3807 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
3808 (handle_nonstring_attribute): New function.
3809
da67acb9
MS
38102017-08-14 Martin Sebor <msebor@redhat.com>
3811
3812 PR c/81117
3813 * c-format.h (T89_G): New macro.
3814 * c-format.c (local_gcall_ptr_node): New variable.
3815 (init_dynamic_diag_info): Initialize it.
3816
a8b522b4
ML
38172017-08-11 Martin Liska <mliska@suse.cz>
3818
3819 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
3820 TARGET_SUPPORTS_ALIASES.
3821
32129a17
DM
38222017-08-10 David Malcolm <dmalcolm@redhat.com>
3823
3824 * c-common.c (c_parse_error): Add rich_location * param, using it
3825 rather implicitly using input_location.
3826 * c-common.h (c_parse_error): Add rich_location * param.
3827
30af3a2b
MP
38282017-08-09 Marek Polacek <polacek@redhat.com>
3829
3830 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
3831 (c_common_truthvalue_conversion): Likewise.
3832 * c-omp.c (c_finish_omp_atomic): Likewise.
3833 * c-common.h (build_binary_op): Update declaration.
3834
314e6352
ML
38352017-08-08 Martin Liska <mliska@suse.cz>
3836
3837 * c-ada-spec.c: Include header files.
3838 * c-ubsan.c: Likewise.
3839 * c-warn.c: Likewise.
3840
56b5041c
JJ
38412017-08-07 Jakub Jelinek <jakub@redhat.com>
3842
3843 PR c/69389
3844 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
3845
db440138
EB
38462017-08-07 Eric Botcazou <ebotcazou@adacore.com>
3847
3848 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
3849 (print_ada_methods): Likewise.
3850 (print_ada_declaration): Likewise.
3851
577eec56
ML
38522017-08-07 Martin Liska <mliska@suse.cz>
3853
3854 * array-notation-common.c: Add new includes.
3855 * c-format.c( handle_format_attribute): Canonicalize a format
3856 function name.
3857 * c-lex.c (c_common_has_attribute): Canonicalize name of an
3858 attribute.
3859 * c-pretty-print.c: Add new include.
3860
b854df3c
EB
38612017-08-05 Eric Botcazou <ebotcazou@adacore.com>
3862
3863 * c-ada-spec.c (has_static_fields): Look only into variables.
3864 (print_constructor): Add TYPE parameter and use it for the name.
3865 (print_destructor): Likewise.
3866 (print_ada_declaration): Adjust to new constructor/destructor names.
3867 Adjust calls to print_constructor and print_destructor.
3868 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
3869 Look only into variables in the final loop.
3870
9f2cb25e
EB
38712017-08-01 Eric Botcazou <ebotcazou@adacore.com>
3872
3873 * c-ada-spec.c (has_static_fields): Look only into fields.
3874 (dump_generic_ada_node): Small tweak.
3875 (dump_nested_types): Look only into fields.
3876 (print_ada_declaration): Look only into methods. Small tweak.
3877 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
3878
f4bcd9eb
EB
38792017-08-01 Eric Botcazou <ebotcazou@adacore.com>
3880
3881 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
3882 (dump_ada_function_declaration): Likewise.
3883 (dump_generic_ada_node): Likewise.
3884 (print_ada_declaration): Add support for const-qualified variables.
3885
f34ebeb2
ML
38862017-07-31 Martin Liska <mliska@suse.cz>
3887
3888 PR sanitize/81530
3889 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
3890 Guard condition with flag_sanitize_p also with current_function_decl
3891 non-null equality.
3892 (ubsan_maybe_instrument_reference_or_call): Likewise.
3893
218e5d04
UB
38942017-07-30 Uros Bizjak <ubizjak@gmail.com>
3895
3896 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
3897
942047f2
EB
38982017-07-29 Eric Botcazou <ebotcazou@adacore.com>
3899
3900 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
3901 for enumeral types.
3902 (print_ada_declaration): Add missing guard for record types.
3903
a40ff0ae
JJ
39042017-07-27 Jakub Jelinek <jakub@redhat.com>
3905
3906 PR c/45784
3907 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
3908 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
3909 new COMPOUND_EXPRs around the rhs of the comparison.
3910
06bd22f6
MP
39112017-07-27 Marek Polacek <polacek@redhat.com>
3912
3913 PR c/81417
3914 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
3915 the types.
3916
036ea399
JJ
39172017-07-27 Jakub Jelinek <jakub@redhat.com>
3918
3919 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
3920 (handle_noipa_attribute): New function.
3921
417ca011
TD
39222017-07-07 Torsten Duwe <duwe@suse.de>
3923
3924 * c-attribs.c (c_common_attribute_table): Add entry for
3925 "patchable_function_entry".
3926
5aaa8fb4
NS
39272017-07-20 Nathan Sidwell <nathan@acm.org>
3928
3929 Remove TYPE_METHODS.
3930 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
3931 dump_ada_template, print_ada_methods,
3932 print_ada_declaration): Member fns are on TYPE_FIELDS.
3933
ff22eb12
NS
39342017-07-18 Nathan Sidwell <nathan@acm.org>
3935
3936 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
3937
eea77d1f
DM
39382017-07-14 David Malcolm <dmalcolm@redhat.com>
3939
3940 * c-common.c (try_to_locate_new_include_insertion_point): New
3941 function.
3942 (per_file_includes_t): New typedef.
3943 (added_includes_t): New typedef.
3944 (added_includes): New variable.
3945 (maybe_add_include_fixit): New function.
3946 * c-common.h (maybe_add_include_fixit): New decl.
3947
281ac396
MS
39482017-07-10 Martin Sebor <msebor@redhat.com>
3949
3950 PR other/81345
3951 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
3952
b6f43128
DM
39532017-07-06 David Malcolm <dmalcolm@redhat.com>
3954
3955 * c-common.c (selftest::c_family_tests): New.
3956 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
3957 (selftest::c_family_tests): New decl.
3958
efbf55b0
MP
39592017-07-04 Marek Polacek <polacek@redhat.com>
3960
3961 PR c/81231
3962 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
3963 types.
3964
6c86bd88
MP
39652017-07-04 Marek Polacek <polacek@redhat.com>
3966
3967 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
3968
17a7218b
ML
39692017-06-28 Martin Liska <mliska@suse.cz>
3970
3971 PR ipa/81128
3972 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
3973 to a function declaration.
3974
63010089
ML
39752017-06-28 Martin Liska <mliska@suse.cz>
3976
3977 PR driver/79659
3978 * c.opt: Add IntegerRange to various options.
3979
3e2becc4
MP
39802017-06-26 Marek Polacek <polacek@redhat.com>
3981
3982 PR c/80116
3983 * c-common.h (warn_for_multistatement_macros): Declare.
3984 * c-warn.c: Include "c-family/c-indentation.h".
3985 (warn_for_multistatement_macros): New function.
3986 * c.opt (Wmultistatement-macros): New option.
3987 * c-indentation.c (guard_tinfo_to_string): No longer static.
3988 Change the parameter type to "enum rid". Handle RID_SWITCH.
3989 * c-indentation.h (guard_tinfo_to_string): Declare.
3990
2db9b7cd
MG
39912017-06-23 Marc Glisse <marc.glisse@inria.fr>
3992
3993 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
3994
c3684b7b
MS
39952017-06-15 Martin Sebor <msebor@redhat.com>
3996
3997 PR c++/80560
3998 * c.opt (-Wclass-memaccess): New option.
3999
e72c4afd
BK
40002017-06-14 Boris Kolpackov <boris@codesynthesis.com>
4001
4002 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
4003
8a516588
MP
40042017-06-13 Marek Polacek <polacek@redhat.com>
4005
4006 PR objc/80949
4007 * c-warn.c (do_warn_duplicated_branches): Return if any of the
4008 branches is null.
4009
45b2222a
ML
40102017-06-13 Martin Liska <mliska@suse.cz>
4011
4012 PR sanitize/78204
4013 * c-attribs.c (add_no_sanitize_value): New function.
4014 (handle_no_sanitize_attribute): Likewise.
4015 (handle_no_sanitize_address_attribute): Use the function.
4016 (handle_no_sanitize_thread_attribute): New function.
4017 (handle_no_address_safety_analysis_attribute): Use
4018 add_no_sanitize_value.
4019 (handle_no_sanitize_undefined_attribute): Likewise.
4020 * c-common.h: Declare new functions.
4021 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
4022 (ubsan_instrument_shift): Likewise.
4023 (ubsan_instrument_bounds): Likewise.
4024 (ubsan_maybe_instrument_array_ref): Likewise.
4025 (ubsan_maybe_instrument_reference_or_call): Likewise.
4026
a01f151f
JM
40272017-06-11 Jason Merrill <jason@redhat.com>
4028
4029 * c-ada-spec.c, c-pragma.c: Use id_equal.
4030
3de4ac6d
MP
40312017-06-04 Marek Polacek <polacek@redhat.com>
4032
4033 PR c/80919
4034 * c-format.c (matching_type_p): Return false if any of the types
4035 requires structural equality.
4036
2474f48f
MS
40372017-06-02 Martin Sebor <msebor@redhat.com>
4038
4039 PR c/80892
4040 * c-warn.c (conversion_warning): Use -Wconversion for integer
4041 conversion and -Wfloat-conversion for floating one.
4042
40ffd95f
BE
40432017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4044
4045 * c.opt (Wsizeof-pointer-div): New warning option.
4046
3fa4634c
VR
40472017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
4048
4049 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
4050 (Wcatch-value=1): Enable by -Wall.
4051
f012c8ef
DM
40522017-05-30 David Malcolm <dmalcolm@redhat.com>
4053
4054 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
4055 format_chars.
4056 * c.opt (fdiagnostics-show-template-tree): New option.
4057 (felide-type): New option.
4058
63dbcd13
VR
40592017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
4060
4061 * c.opt (Wcatch-value=): New C++ warning flag.
4062
be136b5c
NS
40632017-05-24 Nathan Sidwell <nathan@acm.org>
4064
4065 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
4066 const casts to avoid warning.
4067
3cd211af
MS
40682017-05-24 Martin Sebor <msebor@redhat.com>
4069
4070 PR c/80731
4071 * c-common.h (unsafe_conversion_p): Add a function argument.
4072 * c-common.c (unsafe_conversion_p): Same.
4073 Add type names and values to diagnostics.
4074 (scalar_to_vector): Adjust.
4075 * c-warn.c (constant_expression_error): Add a function argument.
4076 Add type names and values to diagnostics.
4077 (conversion_warning): Add a function argument.
4078 Add type names and values to diagnostics.
4079 (warnings_for_convert_and_check): Same.
4080
1ff7be5a
JM
40812017-05-19 Jason Merrill <jason@redhat.com>
4082
4083 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
4084 enumerators.
4085
ff502317
BE
40862017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4087
4088 * c-format.c (locus): Move out of function scope,
4089 add GTY attribute.
4090
2a8a8d7b
NS
40912017-05-19 Nathan Sidwell <nathan@acm.org>
4092
4093 * c-opts.c (class_dump_file, class_dump_flags): Delete.
4094 (c_common_parse_file): Remove class dump handling.
4095 (get_dump_info): Likewise.
4096
39aac208
RB
40972017-05-19 Richard Biener <rguenther@suse.de>
4098
4099 PR c++/80593
4100 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
4101 to alias-set zero memory.
4102
6ecd2339
BE
41032017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
4104
4105 * c-format.c (local_tree_type_node): Add GTY attribute.
4106
6574d78e
MP
41072017-05-18 Marek Polacek <polacek@redhat.com>
4108
4109 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
4110 (c_common_fixed_point_type_for_size): Likewise.
4111 (c_common_type_for_mode): Likewise.
4112 (shorten_compare): Likewise.
4113 (c_promoting_integer_type_p): Use false/true instead of 0/1.
4114 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
4115
e3455240
MP
41162017-05-18 Marek Polacek <polacek@redhat.com>
4117
4118 * c-common.c (self_promoting_args_p): Change the return type to bool.
4119 Use false/true instead of 0/1.
4120 * c-common.h (self_promoting_args_p): Update.
4121
3fa8871b
MP
41222017-05-17 Marek Polacek <polacek@redhat.com>
4123
4124 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
4125 * c-warn.c: Likewise.
4126
b42cc3ca
VV
41272017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
4128
4129 Implement new C++ intrinsics __is_assignable and __is_constructible.
4130 * c-common.c (__is_assignable, __is_constructible): New.
4131 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
4132
1a817418
ML
41332017-05-17 Martin Liska <mliska@suse.cz>
4134
4135 * c-common.h: Introduce dump_flags_t type and
4136 use it instead of int type.
4137 * c-gimplify.c (c_genericize): Likewise.
4138 * c-opts.c: Likewise.
4139
b2fa0a8b
MP
41402017-05-17 Marek Polacek <polacek@redhat.com>
4141
4142 * c-common.c (c_save_expr): Remove.
4143 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
4144 * c-common.h (c_save_expr): Remove declaration.
4145
31c2d57d
VR
41462017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
4147
4148 PR c/35441
4149 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
4150 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
4151 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
4152 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
4153 RDIV_EXPR.
4154 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
4155
684f84de
MP
41562017-05-09 Marek Polacek <polacek@redhat.com>
4157
4158 PR c/80525
4159 * c-warn.c (unwrap_c_maybe_const): New.
4160 (warn_logical_operator): Call it.
4161
641da50a
NS
41622017-05-09 Nathan Sidwell <nathan@acm.org>
4163
4164 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
4165 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
4166
631238ac
MS
41672017-05-08 Martin Sebor <msebor@redhat.com>
4168
4169 PR translation/80280
4170 * c-format.h (struct format_flag_spec): Add new member.
4171 (T89_T): New macro.
4172 * c-format.c (local_tree_type_node): New global.
4173 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
4174 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
4175 (strfmon_flag_specs): Likewise.
4176 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
4177 with distinct quoting properties.
4178 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
4179 (flag_chars_t::validate): Add argument and handle bad quoting.
4180 (check_format_info_main): Handle quoting problems.
4181 (init_dynamic_diag_info): Simplify.
4182
49f0c04c
JM
41832017-05-08 Jason Merrill <jason@redhat.com>
4184
4185 * c-opts.c (c_common_post_options): Update defaults for
4186 flag_abi_version and flag_abi_compat_version.
4187
56d35585
DM
41882017-05-05 David Malcolm <dmalcolm@redhat.com>
4189
4190 * c-common.c (c_cpp_error): Replace report_diagnostic
4191 with diagnostic_report_diagnostic.
4192
0f2c4a8f
MS
41932017-05-04 Martin Sebor <msebor@redhat.com>
4194
4195 PR translation/80280
4196 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
4197 (handle_weakref_attribute): Same.
4198
6fe63fb4
NS
41992017-05-03 Nathan Sidwell <nathan@acm.org>
4200
4201 Canonicalize canonical type hashing
4202 * c-common.c (complete_array_type): Use type_hash_canon.
4203
815d9cc6
XR
42042017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
4205
92a285c1 4206 PR c++/80038
815d9cc6
XR
4207 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
4208 prototype.
4209 (cilk_install_body_pedigree_operations): Likewise.
4210 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
4211 detatched.
4212 (cilk_gimplify_call_params_in_spawned_fn): Remove.
4213 (cilk_install_body_pedigree_operations): Likewise.
4214 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
4215 unwrapping.
4216
f8a36447
JJ
42172017-04-27 Jakub Jelinek <jakub@redhat.com>
4218
4219 PR c++/80534
4220 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
4221 flag on non-aggregate element types.
4222
7c145456
BE
42232017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
4224
4225 * c-common.c (c_type_hasher, type_hash_table): Remove.
4226 (c_common_get_alias_set): Remove unreachable code.
4227 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
4228
c3cbcd45
VR
42292017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
4230
4231 * c.opt (Wextra-semi): New C++ warning flag.
4232
8a59d466
JJ
42332017-04-20 Jakub Jelinek <jakub@redhat.com>
4234
4235 PR middle-end/80423
4236 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
4237
8487c9a5
JJ
42382017-04-18 Jakub Jelinek <jakub@redhat.com>
4239
4240 PR middle-end/79788
4241 PR middle-end/80375
4242 * c-common.c (c_common_type_for_mode): Don't handle
4243 widest_*_literal_type_node here.
4244 c_common_signed_or_unsigned_type): Likewise.
4245 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
4246 to *intTI_type_node or *intDI_type_node depending on whether
4247 TImode is supported by the target or not.
4248
3ee0fb02
ML
42492017-04-10 Martin Liska <mliska@suse.cz>
4250
4251 PR sanitizer/80350
4252 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
4253 doing an UBSAN check.
4254
5764ee3c
JW
42552017-04-03 Jonathan Wakely <jwakely@redhat.com>
4256
4257 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
4258
6f3af356
JJ
42592017-03-31 Jakub Jelinek <jakub@redhat.com>
4260
4261 PR c++/79572
4262 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
4263 tree *.
4264 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
4265 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
4266 REFERENCE_TYPE.
4267
f6a7a9d5
DM
42682017-03-31 David Malcolm <dmalcolm@redhat.com>
4269
4270 PR documentation/78732
4271 * c.opt (Wendif-labels): Fix description to refer to
4272 #else rather than #elif.
4273
af88f557
JJ
42742017-03-31 Jakub Jelinek <jakub@redhat.com>
4275
4276 PR libstdc++/80251
4277 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
4278 * c-common.c (c_common_reswords): Add __is_aggregate trait.
4279
a9e4a1a5
JJ
42802017-03-27 Jakub Jelinek <jakub@redhat.com>
4281
4282 PR middle-end/80162
4283 * c-common.c (c_common_mark_addressable_vec): Don't set
4284 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
4285
3f01b620
MS
42862017-03-21 Martin Sebor <msebor@redhat.com>
4287
4288 PR c++/79548
4289 * c-common.c (set_underlying_type): Mark type used only when
4290 original del is declared unused.
4291
2f6f187a
DM
42922017-03-10 David Malcolm <dmalcolm@redhat.com>
4293
4294 PR translation/79848
4295 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
4296 "%qs".
4297
a02fa805
DM
42982017-03-10 David Malcolm <dmalcolm@redhat.com>
4299
4300 PR c/79921
4301 * c-indentation.c (warn_for_misleading_indentation): Remove parens
4302 from inform's message, so that xgettext can locate it.
4303
822a132c
MP
43042017-03-09 Marek Polacek <polacek@redhat.com>
4305
4306 PR c++/79962
4307 PR c++/79984
4308 * c-attribs.c (handle_nonnull_attribute): Save the result of default
4309 conversion to the attribute list.
4310
bba81f1c
ML
43112017-03-09 Martin Liska <mliska@suse.cz>
4312
4313 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
4314
108154ff
JM
43152017-03-03 Jason Merrill <jason@redhat.com>
4316
4317 * c.opt (Wnoexcept-type): New.
4318
eb0e7c34
RB
43192017-03-02 Richard Biener <rguenther@suse.de>
4320
4321 PR c/79756
4322 * c-common.c (c_common_mark_addressable_vec): Look through
4323 C_MAYBE_CONST_EXPR.
4324
9453ba0a
ML
43252017-02-28 Martin Liska <mliska@suse.cz>
4326
4327 * c.opt: Replace space with tabular for options of <number>
4328 type.
4329
6a825afe
ML
43302017-02-28 Martin Liska <mliska@suse.cz>
4331
4332 * c.opt: Fix --help=option -Q for options which are of
4333 an enum type.
4334
4227c9ad
JJ
43352017-02-24 Jakub Jelinek <jakub@redhat.com>
4336
4337 PR c++/79588
4338 * c-common.c (check_function_restrict): New function.
4339 (check_function_arguments): Add FNDECL argument. Call
4340 check_function_restrict if -Wrestrict.
4341 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
4342 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
4343 * c-common.h (check_function_arguments): Add FNDECL argument.
4344 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
4345
59909673
EB
43462017-02-24 Eric Botcazou <ebotcazou@adacore.com>
4347
4348 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
4349 treatment of parameters with pointer-to-tagged type and tidy up.
4350 (print_ada_methods): Remove the special treatment of C++ static member
4351 functions.
4352
54dcd526
ML
43532017-02-22 Martin Liska <mliska@suse.cz>
4354
4355 * c.opt: Replace inequality signs with square brackets
4356 for -Wnornalized.
4357
00bc9de3
JJ
43582017-02-21 Jakub Jelinek <jakub@redhat.com>
4359
4360 PR c++/79641
4361 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
4362 preserve quals.
4363
97fcf744
JM
43642017-02-17 Joseph Myers <joseph@codesourcery.com>
4365
4366 * c-cppbuiltin.c (builtin_define_float_constants): Define
4367 __DECIMAL_DIG__ to the value for long double.
4368
c7545f1c
MP
43692017-02-15 Marek Polacek <polacek@redhat.com>
4370
4371 PR c/79515
4372 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
4373 conversion has occured.
4374
c2e84327
DM
43752017-01-24 David Malcolm <dmalcolm@redhat.com>
4376
4377 * c-common.c (c_common_reswords): Add "__RTL".
4378 * c-common.h (enum rid): Add RID_RTL.
4379
2ebd93e1
MP
43802017-01-20 Marek Polacek <polacek@redhat.com>
4381
4382 PR c/64279
4383 * c-common.h (do_warn_duplicated_branches_r): Declare.
4384 * c-gimplify.c (c_genericize): Walk the function tree calling
4385 do_warn_duplicated_branches_r.
4386 * c-warn.c (expr_from_macro_expansion_r): New.
4387 (do_warn_duplicated_branches): New.
4388 (do_warn_duplicated_branches_r): New.
4389 * c.opt (Wduplicated-branches): New option.
4390
0d80ab91
DM
43912017-01-17 David Malcolm <dmalcolm@redhat.com>
4392
4393 PR c++/71497
4394 * c-indentation.c (warn_for_misleading_indentation): Use the past
4395 subjunctive in the note.
4396
7f991c36
AH
43972017-01-17 Aldy Hernandez <aldyh@redhat.com>
4398
4399 PR c/79116
4400 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
4401 start type to integer_type.
4402
1c70261c
JJ
44032017-01-16 Jakub Jelinek <jakub@redhat.com>
4404
4405 PR driver/49726
4406 * c.opt (gen-decls): Add Driver flag.
4407
1ddca3f3
PC
44082017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
4409
4410 Revert:
4411 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
4412
4413 PR c++/71737
4414 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
4415
7d2f3f1d
PC
44162017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
4417
4418 PR c++/71737
4419 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
4420
bce6f760
MS
44212017-01-12 Martin Sebor <msebor@redhat.com>
4422
4423 (-Wformat-overflow): ...to this.
4424
bf5fbf46
MS
44252017-01-11 Martin Sebor <msebor@redhat.com>
4426
4427 PR c/78768
4428 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
4429 Also enable for LTO.
4430
e363df3f
JM
44312017-01-10 Jason Merrill <jason@redhat.com>
4432
4433 Implement P0195R2, C++17 variadic using.
4434 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
4435
bd2c6270
JJ
44362017-01-09 Jakub Jelinek <jakub@redhat.com>
4437
4438 PR translation/79019
4439 PR translation/79020
4440 * c.opt (Wnormalized=): Fix typo in description.
4441
efcc8d38
MS
44422017-01-08 Martin Sebor <msebor@redhat.com>
4443
4444 PR middle-end/77708
4445 * c.opt (-Wformat-truncation): New option.
4446
ab20d992 44472017-01-06 Alexandre Oliva <aoliva@redhat.com>
435f3f7a
AO
4448
4449 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
4450 value to unsigned short to fit in 4 hex digits without
4451 warnings.
4452
4e89adf9
EB
44532017-01-05 Eric Botcazou <ebotcazou@adacore.com>
4454
4455 * c.opt (fsso-struct): Add 'native' value.
4456
cd445b54
ML
44572017-01-05 Martin Liska <mliska@suse.cz>
4458
4459 PR pch/78970
4460 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
4461 header.
4462
a9342885
MP
44632017-01-04 Marek Polacek <polacek@redhat.com>
4464
4465 PR c++/64767
4466 * c.opt (Wpointer-compare): New option.
4467
fc73e60c
JJ
44682017-01-04 Jakub Jelinek <jakub@redhat.com>
4469
4470 PR driver/78957
4471 * c.opt (fsso-struct=): Add RejectNegative.
4472
cbe34bb5
JJ
44732017-01-01 Jakub Jelinek <jakub@redhat.com>
4474
4475 Update copyright years.
4476
d4a6c0ea
ML
44772016-12-29 Martin Liska <mliska@suse.cz>
4478
4479 PR c/78933
4480 * c.opt (strong-eval-order): Add RejectNegative keyword.
4481
67a5ad7c
JM
44822016-12-22 Jason Merrill <jason@redhat.com>
4483
4484 Implement P0522R0, matching of template template arguments.
4485 * c-cppbuiltin.c (c_cpp_builtins): Define
4486 __cpp_template_template_args.
4487
0dba7960
JJ
44882016-12-21 Jakub Jelinek <jakub@redhat.com>
4489
4490 PR bootstrap/78817
4491 * c-common.c (struct nonnull_arg_ctx): New type.
4492 (check_function_nonnull): Return bool instead of void. Use
4493 nonnull_arg_ctx as context rather than just location_t.
4494 (check_nonnull_arg): Adjust for the new context type, set
4495 warned_p to true if a warning has been diagnosed.
4496 (check_function_arguments): Return bool instead of void.
4497 * c-common.h (check_function_arguments): Adjust prototype.
4498
31bfc9b9
JM
44992016-12-21 Jason Merrill <jason@redhat.com>
4500
4501 * c.opt (-fnew-ttp-matching): New flag.
4502 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
4503
629b3d75
MJ
45042016-12-14 Martin Jambor <mjambor@suse.cz>
4505
4506 * c-omp.c: Include omp-general.h instead of omp-low.h.
4507 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
4508 name.
4509
474da67e
MS
45102016-12-14 Martin Sebor <msebor@redhat.com>
4511
4512 PR c/17308
4513 * c-common.c (check_nonnull_arg): Disable when optimization
4514 is enabled.
4515
fe366b87
MP
45162016-12-12 Marek Polacek <polacek@redhat.com>
4517
4518 PR c++/78647
4519 * c-common.c (attribute_fallthrough_p): Return false for
4520 error_mark_node.
4521
8bd9f164
MS
45222016-12-08 Martin Sebor <msebor@redhat.com>
4523
4524 PR c/78284
4525 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
4526
060162e0
MS
45272016-12-08 Martin Sebor <msebor@redhat.com>
4528
4529 PR c/78165
92a285c1
ML
4530 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
4531 suffix.
060162e0 4532
ee92e7ba
MS
45332016-12-07 Martin Sebor <msebor@redhat.com>
4534
4535 PR c/53562
4536 PR middle-end/77784
4537 PR middle-end/78149
4538 PR middle-end/78138
4539 * c.opt (-Wstringop-overflow): New option.
4540
84b0769e
MO
45412016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
4542
4543 * c-attribs.c (asan odr indicator): New attribute.
4544 (handle_asan_odr_indicator_attribute): New function.
4545
7fa6a965
PK
45462016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4547
4548 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
4549 ptrdiff_type_node;
4550
56d8ffc1
JG
45512016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
4552
4553 * c-common.c (excess_precision_mode_join): New.
4554 (c_ts18661_flt_eval_method): New.
4555 (c_c11_flt_eval_method): Likewise.
4556 (c_flt_eval_method): Likewise.
4557 * c-common.h (excess_precision_mode_join): New.
4558 (c_flt_eval_method): Likewise.
4559 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
4560 (cpp_iec_559_value): Call it.
4561 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
4562 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
4563 __FLT_EVAL_METHOD_TS_18661_3__.
4564
04f0fcf7
JG
45652016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
4566
4567 * c-opts.c (c_common_post_options): Add logic to handle the default
4568 case for -fpermitted-flt-eval-methods.
4569
fb2675cb
PB
45702016-11-23 Paolo Bonzini <bonzini@gnu.org>
4571
4572 * c.opt (Wexpansion-to-defined): New.
4573
ec1c5694
JJ
45742016-11-23 Jakub Jelinek <jakub@redhat.com>
4575
4576 PR target/78451
4577 * c-pragma.c (handle_pragma_target): Don't replace
4578 current_target_pragma, but chainon the new args to the current one.
4579
730c9e75
NS
45802016-11-22 Nathan Sidwell <nathan@acm.org>
4581
4582 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 4583 indentation and formatting.
730c9e75 4584
89990732
MS
45852016-11-21 Martin Sebor <msebor@redhat.com>
4586
4587 * c.opt (-fprintf-return-value): Enable by default.
4588
48330c93
BE
45892016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4590
4591 PR c++/71973
4592 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
4593 * c-common.c (c_common_nodes_and_builtins): Initialize
4594 const_tm_ptr_type_node.
4595
0d939c95
MP
45962016-11-16 Marek Polacek <polacek@redhat.com>
4597
4598 PR c/78285
4599 * c-common.c (c_add_case_label): Turn error_at calls into inform.
4600
8e745a17
JJ
46012016-11-14 Jakub Jelinek <jakub@redhat.com>
4602
4603 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
4604
1ee62b92 46052016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
4606 Richard Biener <rguenther@suse.de>
4607
4608 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
4609 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
4610 * c.opt (fgimple): New option.
1ee62b92 4611
22b15758
UB
46122016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4613
4614 PR c/35503
4615 * c-common.h (warn_for_restrict): Declare.
4616 * c-warn.c: Include gcc-rich-location.h.
4617 (warn_for_restrict): New function.
4618 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
4619 (gcc_cdiag_char_table): Likewise.
4620 (gcc_cxxdiag_char_table): Likewise.
4621 * c.opt (Wrestrict): New option.
4622
4be719cd
EB
46232016-11-13 Eric Botcazou <ebotcazou@adacore.com>
4624
4625 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
4626 for nested types only if the type is a record or union and dump SLOC.
4627
4a826ca6
JM
46282016-11-09 Jason Merrill <jason@redhat.com>
4629
4630 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
4631
2e955d50
JJ
46322016-11-09 Jakub Jelinek <jakub@redhat.com>
4633
4634 * c-ubsan.c (ubsan_instrument_shift): Handle split
4635 -fsanitize=shift-base and -fsanitize=shift-exponent.
4636
51dc6603
JM
46372016-11-07 Jason Merrill <jason@redhat.com>
4638
4639 * c.opt (Wc++1z-compat): New.
4640 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
4641
6dc4a604
ML
46422016-11-07 Martin Liska <mliska@suse.cz>
4643
4644 * c-warn.c (warn_for_unused_label): Save all labels used
4645 in goto or in &label.
4646
b302001e
JM
46472016-11-03 Jason Merrill <jason@redhat.com>
4648
4649 * c-cppbuiltin.c (c_cpp_builtins): Correct
4650 __cpp_inheriting_constructors.
4651
31f7f784
JM
46522016-11-01 Jason Merrill <jason@redhat.com>
4653
2bc78e3c
JM
4654 * c-cppbuiltin.c (c_cpp_builtins): Update
4655 __cpp_inheriting_constructors.
4656
31f7f784
JM
4657 * c.opt (-fnew-inheriting-ctors): New.
4658 * c-opts.c: Default to on for ABI 11+.
4659
dcb466ec
JJ
46602016-10-31 Jakub Jelinek <jakub@redhat.com>
4661
4662 PR c++/77948
4663 * c.opt (fext-numeric-literals): Add Var and Init.
4664 * c-opts.c (c_common_handle_option): Don't clear
4665 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
4666 (c_common_post_options): Clear it here if not set
4667 explicitly.
4668
52e1b91e
AH
46692016-10-28 Aldy Hernandez <aldyh@redhat.com>
4670
4671 PR debug/77773
4672 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
4673 if NULL.
4674
e16f1cc7
JJ
46752016-10-25 Jakub Jelinek <jakub@redhat.com>
4676
4677 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
4678 * c-common.c (c_common_reswords): Add __builtin_launder.
4679
f8348061
BE
46802016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
4681
4682 * c-common.c (c_common_truthvalue_conversion): Warn for
4683 multiplications in boolean context. Fix the quoting of '<<' and '<'
4684 in the shift warning.
4685
eff89e01
BE
46862016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
4687
4688 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
4689
24bc7bf4
JM
46902016-10-20 Jason Merrill <jason@redhat.com>
4691
4692 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
4693
4c712374
BE
46942016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4695
4696 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
4697 integer shift ops in boolean context.
4698
46992016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
4700
4701 * c.opt (Walloca): New.
4702 (Walloca-larger-than=): New.
4703 (Wvla-larger-than=): New.
4704
8fa18c06
MP
47052016-10-17 Marek Polacek <polacek@redhat.com>
4706
4707 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
4708 Return immediately when finding a match.
4709 (warn_tautological_cmp): Remove a boolean variable that is no longer
4710 needed.
4711
b12b1915
MP
47122016-10-17 Marek Polacek <polacek@redhat.com>
4713
4714 * c-attribs.c: New file.
4715 * c-common.c: Move attributes handling to c-attribs.c.
4716 (get_nonnull_operand): No longer static.
4717 * c-common.h: Move the declarations from c-attribs.c to its own section.
4718
2045acd9
JM
47192016-10-14 Jason Merrill <jason@redhat.com>
4720
4721 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
4722 and __cpp_deduction_guides.
4723
14a2c9aa
JM
47242016-10-13 Jason Merrill <jason@redhat.com>
4725
4726 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
4727
4d0cdd0c
TP
47282016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
4729
4730 * c-cppbuiltin.c: Include memmodel.h.
4731 * c-opts.c: Likewise.
4732 * c-pragma.c: Likewise.
4733 * c-warn.c: Likewise.
4734
70f6d5e1
JJ
47352016-10-12 Jakub Jelinek <jakub@redhat.com>
4736
4737 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
4738 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
4739 * c-opts.c (sanitize_cpp_opts): Initialize
4740 cpp_opts->cpp_warn_implicit_fallthrough.
4741
78f61294
MP
47422016-10-11 Marek Polacek <polacek@redhat.com>
4743
4744 * c-common.c (warning_candidate_p): Change the return type to bool
4745 and return true/false instead of 1/0.
4746 (vector_mode_valid_p): Likewise.
4747
038b5cc0
MP
47482016-10-11 Marek Polacek <polacek@redhat.com>
4749
4750 * c-common.c (fold_for_warn): No longer static.
4751 (bool_promoted_to_int_p): Likewise.
4752 (c_common_get_narrower): Likewise.
4753 (constant_expression_warning): Move to c-warn.c.
4754 (constant_expression_error): Likewise.
4755 (overflow_warning): Likewise.
4756 (warn_logical_operator): Likewise.
4757 (find_array_ref_with_const_idx_r): Likewise.
4758 (warn_tautological_cmp): Likewise.
4759 (expr_has_boolean_operands_p): Likewise.
4760 (warn_logical_not_parentheses): Likewise.
4761 (warn_if_unused_value): Likewise.
4762 (strict_aliasing_warning): Likewise.
4763 (sizeof_pointer_memaccess_warning): Likewise.
4764 (check_main_parameter_types): Likewise.
4765 (conversion_warning): Likewise.
4766 (warnings_for_convert_and_check): Likewise.
4767 (match_case_to_enum_1): Likewise.
4768 (match_case_to_enum): Likewise.
4769 (c_do_switch_warnings): Likewise.
4770 (warn_for_omitted_condop): Likewise.
4771 (readonly_error): Likewise.
4772 (lvalue_error): Likewise.
4773 (invalid_indirection_error): Likewise.
4774 (warn_array_subscript_with_type_char): Likewise.
4775 (warn_about_parentheses): Likewise.
4776 (warn_for_unused_label): Likewise.
4777 (warn_for_div_by_zero): Likewise.
4778 (warn_for_memset): Likewise.
4779 (warn_for_sign_compare): Likewise.
4780 (do_warn_double_promotion): Likewise.
4781 (do_warn_unused_parameter): Likewise.
4782 (record_locally_defined_typedef): Likewise.
4783 (maybe_record_typedef_use): Likewise.
4784 (maybe_warn_unused_local_typedefs): Likewise.
4785 (maybe_warn_bool_compare): Likewise.
4786 (maybe_warn_shift_overflow): Likewise.
4787 (warn_duplicated_cond_add_or_warn): Likewise.
4788 (diagnose_mismatched_attributes): Likewise.
4789 * c-common.h: Move the declarations from c-warn.c to its own section.
4790 * c-warn.c: New file.
4791
627be19f
JM
47922016-10-08 Jason Merrill <jason@redhat.com>
4793
4794 * c-common.c (c_common_truthvalue_conversion): Don't distribute
4795 into COND_EXPR in C++.
4796
7bad794a
JJ
47972016-10-08 Jakub Jelinek <jakub@redhat.com>
4798
4799 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
4800 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
4801 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
4802
be845b04
JJ
48032016-10-07 Jakub Jelinek <jakub@redhat.com>
4804
4805 Implement LWG2296 helper intrinsic
4806 * c-common.h (enum rid): Add RID_ADDRESSOF.
4807 * c-common.c (c_common_reswords): Add __builtin_addressof.
4808
c09c4992
BE
48092016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
4810
4811 PR c++/77700
4812 * c-common.c (c_common_truthvalue_conversion): Warn also for
4813 suspicious enum values in boolean context.
4814
342cfb3e
JJ
48152016-10-06 Jakub Jelinek <jakub@redhat.com>
4816
4817 Implement P0258R2 - helper for C++17
4818 std::has_unique_object_representations trait
4819 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
4820 * c-common.c (c_common_reswords): Add
4821 __has_unique_object_representations.
4822
2e69f143
JJ
48232016-10-05 Jakub Jelinek <jakub@redhat.com>
4824
4825 PR sanitizer/66343
4826 * c-ubsan.c (ubsan_instrument_return): Don't call
4827 initialize_sanitizer_builtins here.
4828
700fff34
BE
48292016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
4830
4831 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
4832 conditional expression in boolean context when only one arm is
4833 non-boolean.
4834
9563bfcd
JJ
48352016-10-05 Jakub Jelinek <jakub@redhat.com>
4836
04a32443
JJ
4837 PR sanitizer/77823
4838 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
4839 is not integral.
4840
9563bfcd
JJ
4841 * c-common.c (c_common_reswords): Update comment for C++11.
4842
f1644724
JM
48432016-10-04 Jason Merrill <jason@redhat.com>
4844
4845 * c-common.c (make_tree_vector_from_ctor): New.
4846 * c-common.h: Declare it.
4847
5a79befb
JJ
48482016-10-04 Jakub Jelinek <jakub@redhat.com>
4849
4850 * c-cppbuiltin.c (c_cpp_builtins): Don't define
4851 __LIBGCC_JCR_SECTION_NAME__.
4852
1633d3b9
BE
48532016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
4854
4855 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
4856 left shift in boolean context.
4857
a2c6e7f2
JJ
48582016-09-29 Jakub Jelinek <jakub@redhat.com>
4859
4860 Implement P0001R1 - C++17 removal of register storage class specifier
4861 * c.opt (Wregister): New warning.
4862 * c-opts.c (c_common_post_options): Enable -Wregister by
4863 default for C++17.
4864
75304c87
JG
48652016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
4866
4867 * c-opts.c (c_common_post_options): Remove special case for
4868 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
4869 in C++.
4870
bbfac6da
JJ
48712016-09-27 Jakub Jelinek <jakub@redhat.com>
4872
6e39060a
JJ
4873 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
4874 -std=c++1z.
4875
bbfac6da
JJ
4876 * c-ada-spec.c (print_ada_declaration): Remove break after return.
4877
e73cf9a2
TP
48782016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
4879
4880 * c-common.c: Include memmodel.h.
4881
c6147dc4
MP
48822016-09-26 Marek Polacek <polacek@redhat.com>
4883
4884 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
4885
81fea426
MP
48862016-09-26 Marek Polacek <polacek@redhat.com>
4887
4888 PR c/7652
4889 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
4890 (handle_fallthrough_attribute): New function.
4891 (attribute_fallthrough_p): New function.
4892 * c-common.h (attribute_fallthrough_p): Declare.
4893
9a2300e9
MP
48942016-09-24 Marek Polacek <polacek@redhat.com>
4895
4896 PR c/77490
4897 * c.opt (Wbool-operation): New.
4898
a09e9e35
BE
48992016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4900
4901 * c-common.c (c_common_truthvalue_conversion): Inhibit
4902 Wint-in-bool-context warning with from_macro_definition_at.
4903 Mention the expression will always evaluate to true.
4904
d43b4ccc
MS
49052016-09-21 Martin Sebor <msebor@redhat.com>
4906
4907 PR bootstrap/77676
4908 * c.opt (fprintf-return-value): Temporarily initialize to zero
4909 to unblock bootstrap failures.
4910
2e1c20b1
JJ
49112016-09-21 Jakub Jelinek <jakub@redhat.com>
4912
4913 PR c++/77651
4914 * c.opt (Waligned-new=): Add RejectNegative.
4915 (faligned-new=): Likewise. Spelling fix - change
4916 aligned_new_threshhold to aligned_new_threshold.
4917 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
4918 to aligned_new_threshold.
4919
88d0c3f0
MS
49202016-09-20 Martin Sebor <msebor@redhat.com>
4921
4922 PR middle-end/49905
4923 * c.opt: Add -Wformat-length and -fprintf-return-value.
4924
144a96e4
BE
49252016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4926
4927 PR c++/77434
4928 * c.opt (Wint-in-bool-context): New warning.
4929 * c-common.c (c_common_truthvalue_conversion): Warn on integer
4930 constants in boolean context.
4931
63012d9a
JM
49322016-09-19 Joseph Myers <joseph@codesourcery.com>
4933
4934 * c-common.c (max_align_t_align): Also consider alignment of
4935 float128_type_node.
4936
931388ce
JM
49372016-09-15 Jason Merrill <jason@redhat.com>
4938
4939 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
4940 DECL_EXTERNAL.
4941
38711381
JM
49422016-09-14 Jason Merrill <jason@redhat.com>
4943
4944 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
4945 limit FIELD_DECL, either.
4946
e51fbec3
MP
49472016-09-14 Marek Polacek <polacek@redhat.com>
4948
4949 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
4950 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
4951 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
4952
254830ba
DM
49532016-09-13 David Malcolm <dmalcolm@redhat.com>
4954
4955 * c-common.c (warn_logical_not_parentheses): Replace
4956 rich_location::add_fixit_insert calls with add_fixit_insert_before
4957 and add_fixit_insert_after, eliminating the "next_loc" calculation.
4958
42763690
JM
49592016-09-13 Jason Merrill <jason@redhat.com>
4960 Tom de Vries <tom@codesourcery.com>
4961
4962 PR c++/77427
4963 * c-common.c (set_underlying_type): Don't treat array as builtin type.
4964
9453eee9
JM
49652016-09-13 Jason Merrill <jason@redhat.com>
4966
4967 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
4968 limit types at all.
4969
e96809e3
JM
49702016-09-12 Jason Merrill <jason@redhat.com>
4971
4972 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
4973 bit/byte confusion, allow large alignment for types.
4974
54dcdb88
BE
49752016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
4976
4977 PR c++/77496
4978 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
4979
d1463eb9
DM
49802016-09-12 David Malcolm <dmalcolm@redhat.com>
4981
4982 PR c/72858
4983 * c-format.c (argument_parser::check_argument_type): Add params
4984 "type_start" and "conversion_char". Use the former to generate
4985 offset_to_type_start and pass it and conversion_char to
4986 check_format_types.
4987 (check_format_info_main): Capture the start of the type
4988 information as "type_start", and pass it an format_char
4989 to arg_parser.check_argument_type.
4990 (check_format_types): Provide an example in the leading comment.
4991 Add params "offset_to_type_start" and "conversion_char"; pass
4992 them to format_type_warning calls.
4993 (test_get_modifier_for_format_len): Likewise.
4994 (matching_type_p): New function.
4995 (get_format_for_type): Add param "conversion_char" and move
4996 implementation into...
4997 (get_format_for_type_1): ...new function, called twice.
4998 Use new function matching_type_p rather than checking for
4999 TYPE_CANONICAL equality.
5000 (get_corrected_substring): New function.
5001 (format_type_warning): Provide an example in the leading comment.
5002 Add params "offset_to_type_start" and "conversion_char". Replace
5003 call to get_format_for_type with call to get_corrected_substring
5004 and move rejection of hints for widths/precisions there.
5005 (assert_format_for_type_streq): Add param "conversion_char".
5006 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
5007 (test_get_format_for_type_printf): Add conversion chars to the
5008 tests, adding coverage for various combinations of integer
5009 vs double conversions, and for preserving octal and hexadecimal
5010 conversions.
5011 (test_get_format_for_type_scanf): Add conversion chars to the
5012 tests.
5013
5b28efbb
TV
50142016-09-10 Tom de Vries <tom@codesourcery.com>
5015
5016 PR C/71602
5017 * c-common.c (build_va_arg): Handle more strict
5018 targetm.canonical_va_list_type. Replace first argument type error with
5019 assert.
5020
3f0177e7
MS
50212016-09-09 Martin Sebor <msebor@redhat.com>
5022
5023 PR c/77520
5024 PR c/77521
5025 * c-format.c (argument_parser::find_format_char_info): Use %qc
5026 format directive unconditionally.
5027
af63ba4b
JM
50282016-09-09 Jason Merrill <jason@redhat.com>
5029
5030 Implement C++17 new of over-aligned types.
5031 * c.opt: Add -faligned-new and -Waligned-new.
5032 * c-common.c (max_align_t_align): Split out from...
5033 (cxx_fundamental_alignment_p): ...here.
5034 * c-common.h: Declare it.
5035 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
5036
c65248cb
JM
50372016-09-09 Joseph Myers <joseph@codesourcery.com>
5038
5039 * c-cppbuiltin.c (builtin_define_type_width): New function.
5040 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
5041 macros.
5042
e5106e27
DM
50432016-09-07 David Malcolm <dmalcolm@redhat.com>
5044
5045 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
5046 a POINTER_TYPE.
5047 (substring_loc::get_location): Move to substring-locations.c,
5048 keeping implementation as...
5049 (c_get_substring_location): New function, from the above, reworked
5050 to use accessors rather than member lookup.
5051 * c-common.h (class substring_loc): Move to substring-locations.h,
5052 replacing with a forward decl.
5053 (c_get_substring_location): New decl.
5054 * c-format.c: Include "substring-locations.h".
5055 (format_warning_va): Move to substring-locations.c.
5056 (format_warning_at_substring): Likewise.
5057
ab20d992 50582016-09-06 Martin Sebor <msebor@redhat.com>
a42e7952
MS
5059
5060 PR c/77336
5061 * c-format.c (check_function_format): Avoid issuing warnings for
5062 functions unless they call format functions with non-constant
5063 format strings.
5064
b772a565
RB
50652016-09-06 Richard Biener <rguenther@suse.de>
5066
5067 PR c/77450
5068 * c-common.c (c_common_mark_addressable_vec): Handle
5069 COMPOUND_LITERAL_EXPR.
5070
25ff5dd3
MP
50712016-09-05 Marek Polacek <polacek@redhat.com>
5072
5073 PR c/77423
5074 * c-common.c (bool_promoted_to_int_p): New function.
5075 (expr_has_boolean_operands_p): New function.
5076 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
5077 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
5078
21234eb5
TV
50792016-09-04 Tom de Vries <tom@codesourcery.com>
5080
5081 revert:
5082 2016-08-29 Tom de Vries <tom@codesourcery.com>
5083
5084 * c-common.c (build_va_arg): Replace first argument type error
5085 with assert.
5086
9dc5773f
JJ
50872016-09-02 Jakub Jelinek <jakub@redhat.com>
5088
5089 PR c/65467
5090 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
5091 (c_finish_omp_for): Reject _Atomic qualified iterators.
5092
50932016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
5094
5095 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
5096 size to guarantee it fits the output of the formatted function
5097 regardless of its arguments.
5098
295844f6
MP
50992016-09-01 Marek Polacek <polacek@redhat.com>
5100
5101 PR c/7652
5102 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
5103 FALLTHRU comments.
5104
3d06b6f2
MP
51052016-08-29 Marek Polacek <polacek@redhat.com>
5106
5107 PR c/77292
5108 * c-common.c (warn_logical_not_parentheses): Don't warn for
5109 a comparison or a logical operator.
5110
34cedad5
TV
51112016-08-29 Tom de Vries <tom@codesourcery.com>
5112
5113 * c-common.c (build_va_arg): Fix type comparison assert.
5114
f162d717
TV
51152016-08-29 Tom de Vries <tom@codesourcery.com>
5116
5117 * c-common.c (build_va_arg): Replace first argument type error
5118 with assert.
5119
ba9bbd6f
TV
51202016-08-29 Tom de Vries <tom@codesourcery.com>
5121
5122 PR c/77398
5123 * c-common.c (build_va_arg): Add first argument error. Build va_arg
5124 with error_mark_node as va_list instead of with illegal va_list.
5125
ebef225f
MP
51262016-08-25 Marek Polacek <polacek@redhat.com>
5127 David Malcolm <dmalcolm@redhat.com>
5128
5129 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
5130 * c-common.h (warn_logical_not_parentheses): Update declaration.
5131
b00e6e75
MP
51322016-08-22 Marek Polacek <polacek@redhat.com>
5133
5134 PR c++/77321
5135 * c-common.c (warn_for_memset): Check type for null.
5136
6dc198e3
JM
51372016-08-22 Joseph Myers <joseph@codesourcery.com>
5138
14ec014e 5139 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
5140 _FloatNx types for suffixes for built-in functions.
5141
c65699ef
JM
51422016-08-19 Joseph Myers <joseph@codesourcery.com>
5143
5144 PR c/32187
5145 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
5146 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
5147 (RID_FLOAT128X): New enum rid values.
5148 (CASE_RID_FLOATN_NX): New macro.
5149 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
5150 keywords.
5151 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
5152 corresponding complex types.
5153 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
5154 _FloatNx and corresponding complex types.
5155 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
5156 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
5157 and _FloatNx types for the widest type for determining
5158 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
5159 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
5160 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
5161 and _FloatNx types.
5162 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
5163 constants.
5164 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
5165 _FloatNx types.
5166
cc015f3a
DM
51672016-08-18 David Malcolm <dmalcolm@redhat.com>
5168
5169 * c-opts.c (c_diagnostic_finalizer): Update for change to
5170 diagnostic_show_locus.
5171
cb18fd07
DM
51722016-08-18 David Malcolm <dmalcolm@redhat.com>
5173
5174 * c-common.c: Include "spellcheck.h".
5175 (cb_get_suggestion): New function.
5176 * c-common.h (cb_get_suggestion): New decl.
5177 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
5178 cb_get_suggestion.
5179
a76989dc
MP
51802016-08-18 Marek Polacek <polacek@redhat.com>
5181
5182 PR c/71514
5183 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
5184 and pointer-to-VLA.
5185
65e736c0
DM
51862016-08-16 David Malcolm <dmalcolm@redhat.com>
5187
5188 PR c/72857
5189 * c-common.c (substring_loc::get_range): Rename to...
5190 (substring_loc::get_location): ...this, converting param from a
5191 source_range * to a location_t *. Call
5192 get_source_location_for_substring rather than
5193 get_source_range_for_substring, and pass in m_caret_idx.
5194 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
5195 (substring_loc::get_range): Replace with...
5196 (substring_loc::get_location): ...this.
5197 (substring_loc::set_caret_index): New method.
5198 (substring_loc): Add field m_caret_idx.
5199 * c-format.c (format_warning_va): Update for above changes.
5200 Rename local "substring_loc" to "fmt_substring_loc" to avoid
5201 clashing with type name.
5202 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
5203 (check_argument_type): Likewise.
5204 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
5205 Use a copy when emitting warnings, setting the caret index from TYPE.
5206
7e1dde14 52072016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 5208 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
5209
5210 * c-ada-spec.c (dump_number): New function.
5211 (handle_escape_character): Likewise.
5212 (print_ada_macros): Add handling of constant integers and strings.
5213
191816a3
MP
52142016-08-12 Marek Polacek <polacek@redhat.com>
5215
5216 PR c/7652
5217 * c-common.c (scalar_to_vector): Adjust fall through comment.
5218 * c-opts.c (c_common_handle_option): Likewise.
5219 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
5220 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
5221 fall through comment.
5222 * cilk.c (extract_free_variables): Add FALLTHRU.
5223
452df4a4
JM
52242016-08-10 Jason Merrill <jason@redhat.com>
5225
5226 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
5227
f3365c12
JM
52282016-08-09 Jason Merrill <jason@redhat.com>
5229
5230 * c-common.c (c_common_attribute_table): vector_size affects type
5231 identity.
5232
f0bc3323
MP
52332016-08-09 Marek Polacek <polacek@redhat.com>
5234
5235 PR c/7652
5236 * c-ada-spec.c (dump_generic_ada_node): Add return.
5237
98e5a19a
JM
52382016-08-09 Jason Merrill <jason@redhat.com>
5239
5240 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
5241 C++17 constexpr lambdas.
5242
895aa8e1
DM
52432016-08-08 David Malcolm <dmalcolm@redhat.com>
5244
5245 PR c/64955
5246 * c-common.h (selftest::c_format_c_tests): New declaration.
5247 (selftest::run_c_tests): New declaration.
5248 * c-format.c: Include "selftest.h.
5249 (format_warning_va): Add param "corrected_substring" and use
5250 it to add a replacement fix-it hint.
5251 (format_warning_at_substring): Likewise.
5252 (format_warning_at_char): Update for new param of
5253 format_warning_va.
5254 (argument_parser::check_argument_type): Pass "fki" to
5255 check_format_types.
5256 (check_format_types): Add param "fki" and pass it to
5257 format_type_warning.
5258 (deref_n_times): New function.
5259 (get_modifier_for_format_len): New function.
5260 (selftest::test_get_modifier_for_format_len): New function.
5261 (get_format_for_type): New function.
5262 (format_type_warning): Add param "fki" and use it to attempt
5263 to provide hints for argument types when calling
5264 format_warning_at_substring.
5265 (selftest::get_info): New function.
5266 (selftest::assert_format_for_type_streq): New function.
5267 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
5268 (selftest::test_get_format_for_type_printf): New function.
5269 (selftest::test_get_format_for_type_scanf): New function.
5270 (selftest::c_format_c_tests): New function.
5271
e52ed3fe
DM
52722016-08-08 David Malcolm <dmalcolm@redhat.com>
5273
5274 PR c/52952
5275 * c-format.c: Include "diagnostic.h".
5276 (location_column_from_byte_offset): Delete.
5277 (location_from_offset): Delete.
5278 (format_warning_va): New function.
5279 (format_warning_at_substring): New function.
5280 (format_warning_at_char): New function.
5281 (check_format_arg): Capture location of format_tree and pass to
5282 check_format_info_main.
5283 (argument_parser): Add fields "start_of_this_format" and
5284 "format_string_cst".
5285 (flag_chars_t::validate): Add param "format_string_cst". Convert
5286 warning_at call using location_from_offset to call to
5287 format_warning_at_char.
5288 (argument_parser::argument_parser): Add param "format_string_cst_"
5289 and use use it to initialize field "format_string_cst".
5290 Initialize new field "start_of_this_format".
5291 (argument_parser::read_format_flags): Convert warning_at call
5292 using location_from_offset to a call to format_warning_at_char.
5293 (argument_parser::read_any_format_left_precision): Likewise.
5294 (argument_parser::read_any_format_precision): Likewise.
5295 (argument_parser::read_any_other_modifier): Likewise.
5296 (argument_parser::find_format_char_info): Likewise, in three places.
5297 (argument_parser::parse_any_scan_set): Likewise, in one place.
5298 (argument_parser::handle_conversions): Likewise, in two places.
5299 (argument_parser::check_argument_type): Add param "fmt_param_loc"
5300 and use it to make a substring_loc. Pass the latter to
5301 check_format_types.
5302 (check_format_info_main): Add params "fmt_param_loc" and
5303 "format_string_cst". Convert warning_at calls using
5304 location_from_offset to calls to format_warning_at_char. Pass the
5305 new params to the arg_parser ctor. Pass "format_string_cst" to
5306 flag_chars.validate. Pass "fmt_param_loc" to
5307 arg_parser.check_argument_type.
5308 (check_format_types): Convert first param from a location_t
5309 to a const substring_loc & and rename to "fmt_loc". Attempt
5310 to extract the range of the relevant parameter and pass it
5311 to format_type_warning.
5312 (format_type_warning): Convert first param from a location_t
5313 to a const substring_loc & and rename to "fmt_loc". Add
5314 params "param_range" and "type". Replace calls to warning_at
5315 with calls to format_warning_at_substring.
5316
1c4d457e
DM
53172016-08-08 David Malcolm <dmalcolm@redhat.com>
5318
5319 * c-format.c (class flag_chars_t): New class.
5320 (struct length_modifier): New struct.
5321 (class argument_parser): New class.
5322 (flag_chars_t::flag_chars_t): New ctor.
5323 (flag_chars_t::has_char_p): New method.
5324 (flag_chars_t::add_char): New method.
5325 (flag_chars_t::validate): New method.
5326 (flag_chars_t::get_alloc_flag): New method.
5327 (flag_chars_t::assignment_suppression_p): New method.
5328 (argument_parser::argument_parser): New ctor.
5329 (argument_parser::read_any_dollar): New method.
5330 (argument_parser::read_format_flags): New method.
5331 (argument_parser::read_any_format_width): New method.
5332 (argument_parser::read_any_format_left_precision): New method.
5333 (argument_parser::read_any_format_precision): New method.
5334 (argument_parser::handle_alloc_chars): New method.
5335 (argument_parser::read_any_length_modifier): New method.
5336 (argument_parser::read_any_other_modifier): New method.
5337 (argument_parser::find_format_char_info): New method.
5338 (argument_parser::validate_flag_pairs): New method.
5339 (argument_parser::give_y2k_warnings): New method.
5340 (argument_parser::parse_any_scan_set): New method.
5341 (argument_parser::handle_conversions): New method.
5342 (argument_parser::check_argument_type): New method.
5343 (check_format_info_main): Introduce classes argument_parser
5344 and flag_chars_t, moving the code within the loop into methods
5345 of these classes. Make various locals "const".
5346
88fa5555
DM
53472016-08-05 David Malcolm <dmalcolm@redhat.com>
5348
5349 * c-common.c: Include "substring-locations.h".
5350 (get_cpp_ttype_from_string_type): New function.
5351 (g_string_concat_db): New global.
5352 (substring_loc::get_range): New method.
5353 * c-common.h (g_string_concat_db): New declaration.
5354 (class substring_loc): New class.
5355 * c-lex.c (lex_string): When concatenating strings, capture the
5356 locations of all tokens using a new obstack, and record the
5357 concatenation locations within g_string_concat_db.
5358 * c-opts.c (c_common_init_options): Construct g_string_concat_db
5359 on the ggc-heap.
5360
78169471
MP
53612016-07-29 Marek Polacek <polacek@redhat.com>
5362
638fc14f
MP
5363 PR c/71926
5364 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
5365 parentheses warning.
5366
78169471
MP
5367 PR c/71574
5368 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
5369
1225d6b1
ML
53702016-07-28 Martin Liska <mliska@suse.cz>
5371
5372 PR gcov-profile/68025
5373 * c-common.c (handle_no_profile_instrument_function_attribute):
5374
ec1e2a40
BE
53752016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
5376
5377 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
5378 BITS_PER_UNIT_LOG.
5379
5ec2cd9f
JM
53802016-07-25 Jason Merrill <jason@redhat.com>
5381
5382 PR c++/65970
5383 * c.opt (fconstexpr-loop-limit): New.
5384
9dc5773f 53852016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
5386
5387 PR c++/71675
5388 * c-common.c (resolve_overloaded_builtin): Avoid converting
5389 __atomic_compare_exchange_n return type to that of what its
5390 first argument points to.
5391
e3fe09c1
UB
53922016-07-22 Uros Bizjak <ubizjak@gmail.com>
5393
5394 * c-common.c: Use HOST_WIDE_INT_M1U instead of
5395 ~(unsigned HOST_WIDE_INT) 0.
5396
bc91c436
ML
53972016-07-22 Martin Liska <mliska@suse.cz>
5398
5399 PR gcov-profile/69028
5400 PR gcov-profile/62047
5401 * cilk.c (create_cilk_helper_decl): Set location of a new decl
5402 to the current_function_decl.
5403
451dcc66
JM
54042016-07-21 Jason Merrill <jason@redhat.com>
5405
5406 PR c++/65168
5407 * c-common.c (c_common_truthvalue_conversion): Check
5408 c_inhibit_evaluation_warnings for warning about address of
5409 reference.
5410
de6a69ee
DM
54112016-07-20 David Malcolm <dmalcolm@redhat.com>
5412
5413 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
5414 const char *.
5415
d022c55a
JM
54162016-07-15 Jason Merrill <jason@redhat.com>
5417
5418 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
5419
ddbbcb19
JJ
54202016-07-15 Jakub Jelinek <jakub@redhat.com>
5421
5422 PR c/71858
5423 * c-common.h (enum lookup_name_fuzzy_kind): Add
5424 FUZZY_LOOKUP_FUNCTION_NAME.
5425
d0cf395a
JM
54262016-07-08 Jason Merrill <jason@redhat.com>
5427
5428 P0145: Refining Expression Order for C++.
5429 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
5430 * c-opts.c: Adjust.
5431
98d44e93
MT
54322016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
5433
5434 PR c++/71214
5435 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
5436
f9d8d994
TS
54372016-06-29 Thomas Schwinge <thomas@codesourcery.com>
5438
5439 * c-pragma.h (enum pragma_kind): Rename
5440 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
5441 users.
5442
4aa83879
RB
54432016-06-29 Richard Biener <rguenther@suse.de>
5444
5445 PR middle-end/71002
5446 * c-common.c (c_common_get_alias_set): Remove union type punning case.
5447
a25bd9e6
JM
54482016-06-24 Jason Merrill <jason@redhat.com>
5449
5450 P0145R2: Refining Expression Order for C++.
5451 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
5452 MODIFY_EXPR.
5453
a86451b9
JJ
54542016-06-24 Jakub Jelinek <jakub@redhat.com>
5455
5456 * c-common.c (check_builtin_function_arguments): Require last
5457 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
5458 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
5459 if the last argument is pointer to enumerated or boolean type.
5460
1a4f11c8
DM
54612016-06-22 David Malcolm <dmalcolm@redhat.com>
5462
5463 PR c/70339
5464 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
5465 (lookup_name_fuzzy): New prototype.
5466
fe55692c
JDA
54672016-06-21 John David Anglin <danglin@gcc.gnu.org>
5468
5469 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
5470
4eb24e01
JM
54712016-06-14 Jason Merrill <jason@redhat.com>
5472
5473 P0145R2: Refining Expression Order for C++.
5474 * c.opt (fargs-in-order): New.
5475 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
5476
ef7cf206
JJ
54772016-06-13 Jakub Jelinek <jakub@redhat.com>
5478
0dda258b
JJ
5479 PR sanitizer/71498
5480 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
5481 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
5482
ef7cf206
JJ
5483 PR preprocessor/71183
5484 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
5485 to cb_get_source_date_epoch.
5486
50b15873
JJ
54872016-06-10 Jakub Jelinek <jakub@redhat.com>
5488
5489 PR c/68657
5490 * c.opt (Wpsabi): Add Warning flag.
5491
4d926e34
MS
54922016-06-10 Martin Sebor <msebor@redhat.com>
5493
5494 PR c/71392
14ec014e 5495 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
5496 the nonnull attribute in type-generic builtins.
5497
e01b4e16
MS
54982016-06-09 Martin Sebor <msebor@redhat.com>
5499
5500 PR c/70883
5501 * c-common.c (builtin_function_validate_nargs): Make text of error
5502 message consistent with others like it.
5503
44a845ca
MS
55042016-06-08 Martin Sebor <msebor@redhat.com>
5505 Jakub Jelinek <jakub@redhat.com>
5506
5507 PR c++/70507
5508 PR c/68120
5509 * c-common.c (check_builtin_function_arguments): Handle
5510 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
5511
a80a7051
RB
55122016-06-08 Richard Biener <rguenther@suse.de>
5513
5514 * c-common.c (parse_optimize_options): Improve diagnostic messages.
5515
bfd67b47
RB
55162016-06-07 Richard Biener <rguenther@suse.de>
5517
5518 PR c/61564
5519 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
5520 options and warn about others.
5521
15c98b2e
ES
55222016-06-01 Eduard Sanou <dhole@openmailbox.org>
5523
5524 * c-common.c (get_source_date_epoch): Rename to
5525 cb_get_source_date_epoch.
5526 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
5527 message when the parsing fails. Use error_at instead of fatal_error.
5528 * c-common.h (get_source_date_epoch): Rename to
5529 cb_get_source_date_epoch.
5530 * c-common.h (cb_get_source_date_epoch): Prototype.
5531 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
5532 * c-common.h (c_omp_region_type): Remove trailing comma.
5533 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
5534 * c-lex.c (c_lex_with_flags): Remove initialization of
5535 pfile->source_date_epoch.
5536
00631022
JJ
55372016-05-30 Jakub Jelinek <jakub@redhat.com>
5538
5539 PR c++/71349
5540 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
5541 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
5542 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
5543 instead of C_OMP_CLAUSE_SPLIT_FOR.
5544
f17a223d
RB
55452016-05-24 Richard Biener <rguenther@suse.de>
5546
5547 PR middle-end/70434
5548 PR c/69504
5549 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
5550 (convert_vector_to_array_for_subscript): ... this.
5551 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
5552 VIEW_CONVERT_EXPR to an array type. Rename to ...
5553 (convert_vector_to_array_for_subscript): ... this.
5554
4f2e1536
MP
55552016-05-12 Marek Polacek <polacek@redhat.com>
5556
5557 PR c/70756
5558 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
5559 size_in_bytes and pass LOC to it.
5560
d6e83a8d
MM
55612016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
5562
5563 PR c/43651
5564 * c.opt (Wduplicate-decl-specifier): New option.
5565
5c3a10fb
MP
55662016-05-11 Marek Polacek <polacek@redhat.com>
5567
5568 PR c++/71024
5569 * c-common.c (diagnose_mismatched_attributes): New function.
5570 * c-common.h (diagnose_mismatched_attributes): Declare.
5571
deef7113
MP
55722016-05-04 Marek Polacek <polacek@redhat.com>
5573
5574 * c.opt (Wdangling-else): New option.
5575
79ce98bc
MP
55762016-05-03 Marek Polacek <polacek@redhat.com>
5577
5578 PR c/70859
5579 * c-common.c (builtin_function_validate_nargs): Add location
5580 parameter. Use it.
5581 (check_builtin_function_arguments): Add location and arguments
5582 parameters. Use them.
5583 * c-common.h (check_builtin_function_arguments): Update declaration.
5584
381cdae4
RB
55852016-05-03 Richard Biener <rguenther@suse.de>
5586
5587 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
5588 allow call args to gimplify to SSA names.
5589
1d793c34
MP
55902016-05-03 Marek Polacek <polacek@redhat.com>
5591
5592 * c-common.h (enum c_omp_region_type): Remove stray comma.
5593
77886428
CP
55942016-05-02 Cesar Philippidis <cesar@codesourcery.com>
5595
5596 * c-common.h (enum c_omp_region_type): Define.
5597
697e0b28
RS
55982016-05-02 Richard Sandiford <richard.sandiford@arm.com>
5599
5600 * c-common.c (shorten_compare): Use wi::to_wide.
5601
e7ff0319
CP
56022016-04-29 Cesar Philippidis <cesar@codesourcery.com>
5603
5604 PR middle-end/70626
5605 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
5606 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
5607 reduction clauses in acc parallel loops.
5608
2fff3db8
MP
56092016-04-29 Marek Polacek <polacek@redhat.com>
5610
5611 PR c/70852
5612 * c-common.c (warn_for_memset): Check domain before accessing it.
5613
509063eb
DV
56142016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
5615
5616 PR/69089
5617 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
5618 "aligned" attribute.
5619
b632761d
JM
56202016-04-28 Jason Merrill <jason@redhat.com>
5621
5622 * c-lex.c (c_common_has_attribute): Handle nodiscard.
5623
174f6622
ES
56242016-04-28 Eduard Sanou <dhole@openmailbox.org>
5625 Matthias Klose <doko@debian.org>
5626
5627 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 5628 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
5629 handling.
5630 * c-common.h (get_source_date_epoch): Prototype.
5631 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
5632
6bc2bb18
RB
56332015-04-27 Ryan Burn <contact@rnburn.com>
5634
5635 PR c++/69024
5636 PR c++/68997
5637 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
5638 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
5639 external linkage.
5640 (cilk_detect_and_unwrap): Corresponding changes.
5641 (extract_free_variables): Don't extract free variables from
5642 AGGR_INIT_EXPR slot.
5643 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
5644 (cilk_recognize_spawn): Likewise.
5645
c1e1f433
BS
56462016-04-27 Bernd Schmidt <bschmidt@redhat.com>
5647
5648 * c.opt (Wmemset-elt-size): New option.
5649 * c-common.c (warn_for_memset): New function.
5650 * c-common.h (warn_for_memset): Declare.
5651
d067e05f
JM
56522016-04-25 Jason Merrill <jason@redhat.com>
5653
5654 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
5655 No longer static.
5656 * c-common.h: Declare it.
5657 * c-lex.c (c_common_has_attribute): Add maybe_unused.
5658
9aa36ae5
JM
56592016-04-22 Jason Merrill <jason@redhat.com>
5660
5661 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
5662
477d4906
IV
56632016-04-20 Ilya Verbin <ilya.verbin@intel.com>
5664
5665 PR c++/69363
5666 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
5667 * c-common.h (c_finish_cilk_clauses): Remove declaration.
5668
fe37c7af
MM
56692016-04-18 Michael Matz <matz@suse.de>
5670
5671 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
5672 and SET_DECL_ALIGN.
5673
23f2660f
EB
56742016-04-17 Eric Botcazou <ebotcazou@adacore.com>
5675
5676 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
5677 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
5678 to incomplete types.
5679 (dump_nested_type): Remove redundant tests and tidy up.
5680 (print_ada_declaration): Also set TREE_VISITED on the declaration of
5681 a type which is the typedef of an original type.
5682
1e77281b
MP
56832016-04-15 Marek Polacek <polacek@redhat.com>
5684
5685 PR c/70651
5686 * c-common.c (build_va_arg): Change two asserts into errors and return
5687 error_mark_node.
5688
b3a77f21
MP
56892016-04-13 Marek Polacek <polacek@redhat.com>
5690
5691 PR c++/70639
5692 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
5693 for switch statements, too.
5694
322b8466
JM
56952016-03-28 Jason Merrill <jason@redhat.com>
5696
5697 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
5698
fbdb6baf
MP
56992016-03-23 Marek Polacek <polacek@redhat.com>
5700
5701 PR c++/69884
5702 * c.opt (Wignored-attributes): New option.
5703
5c240f4d
DM
57042016-03-22 David Malcolm <dmalcolm@redhat.com>
5705
5706 PR c/69993
5707 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
5708 diagnostic text, reversing the order of the warning and note so
5709 that they appear in source order.
5710
14ba7b28
MP
57112016-03-17 Marek Polacek <polacek@redhat.com>
5712
5713 PR c/69407
5714 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
5715 operations.
5716
08a1cadc
JM
57172016-03-14 Jason Merrill <jason@redhat.com>
5718
2aaeea19
JM
5719 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
5720
08a1cadc
JM
5721 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
5722
c06d25bb
RB
57232016-03-09 Richard Biener <rguenther@suse.de>
5724
5725 PR c/70143
5726 * c-common.c (strict_aliasing_warning): Add back
5727 alias_sets_conflict_p check.
5728
80aac5c8
JM
57292016-03-08 Jason Merrill <jason@redhat.com>
5730
5731 * c-opts.c (set_std_cxx1z): Don't enable concepts.
5732
64b23c13
DM
57332016-03-04 David Malcolm <dmalcolm@redhat.com>
5734
5735 PR c/68187
5736 * c-indentation.c (get_visual_column): Move code to determine next
5737 tab stop to...
5738 (next_tab_stop): ...this new function.
5739 (line_contains_hash_if): Delete function.
5740 (detect_preprocessor_logic): Delete function.
5741 (get_first_nws_vis_column): New function.
5742 (detect_intervening_unindent): New function.
5743 (should_warn_for_misleading_indentation): Replace call to
5744 detect_preprocessor_logic with a call to
5745 detect_intervening_unindent.
5746
729526f5
DM
57472016-03-04 David Malcolm <dmalcolm@redhat.com>
5748
5749 PR c/68187
5750 * c-indentation.c (should_warn_for_misleading_indentation): When
5751 suppressing warnings about cases where the guard and body are on
5752 the same column, only use the first non-whitespace column in place
5753 of the guard token column when dealing with "else" clauses.
5754 When rejecting aligned BODY and NEXT, loosen the requirement
5755 from equality with the first non-whitespace of guard to simply
5756 that they not be indented relative to it.
5757
e9a35493
RB
57582016-03-04 Richard Biener <rguenther@suse.de>
5759
5760 PR c++/70054
5761 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
5762 instead of alias_sets_conflict_p.
5763
1be56bc5
MP
57642016-03-01 Marek Polacek <polacek@redhat.com>
5765
5766 PR c++/69795
5767 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
5768 any DECL.
5769
35886f0b
MS
57702016-02-22 Martin Sebor <msebor@redhat.com>
5771
5772 PR middle-end/69780
5773 * c-common.c (check_builtin_function_arguments): Validate and
5774 reject invalid arguments to __builtin_alloca_with_align.
5775
4246c8da
MW
57762016-02-20 Mark Wielaard <mjw@redhat.com>
5777
5778 PR c/28901
5779 * c.opt (Wunused-const-variable): Turn into Alias for...
5780 (Wunused-const-variable=): New option.
5781
268be88c
BE
57822016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5783
5784 PR c++/69865
5785 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
5786 here...
5787 (c_common_init_options): ...to here.
5788 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
5789
871b3f47
JJ
57902016-02-19 Jakub Jelinek <jakub@redhat.com>
5791
5792 PR c++/69826
5793 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
5794 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
5795 flag_preprocess_only.
5796
bf14eba2
JJ
57972016-02-16 Jakub Jelinek <jakub@redhat.com>
5798
5799 PR c/69835
5800 * c.opt (Wnonnull-compare): Enable for -Wall.
5801
ba6b3795
JJ
58022016-02-15 Jakub Jelinek <jakub@redhat.com>
5803
5804 PR c++/69797
5805 * c-common.c (sync_resolve_size): Diagnose too few arguments
5806 even when params is non-NULL empty vector.
5807
a011cd92
BS
58082016-02-08 Bernd Schmidt <bschmidt@redhat.com>
5809
5810 PR target/60410
5811 * c.opt (fshort-double): Remove.
5812
46cb9332
MS
58132016-02-05 Martin Sebor <msebor@redhat.com>
5814
5815 PR c++/69662
5816 * c.opt (Warning options): Update -Wplacement-new to take
5817 an optional argument.
5818
e1b81f2b
JJ
58192016-02-01 Jakub Jelinek <jakub@redhat.com>
5820
5821 PR preprocessor/69543
5822 PR c/69558
5823 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
5824 instead of loc to control_warning_option.
5825
b6adbb9f
NS
58262016-02-01 Nathan Sidwell <nathan@codesourcery.com>
5827
5828 * c.opt (fopenacc-dim=): New option.
5829
5d70666e
RB
58302016-01-27 Ryan Burn <contact@rnburn.com>
5831
5832 PR cilkplus/69267
5833 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
5834 gimplify_arg. Removed superfluous post_p argument.
5835 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
5836 superfluous post_p argument.
5837 * c-gimplify.c (c_gimplify_expr): Likewise.
5838
01e1dea3
DM
58392016-01-26 David Malcolm <dmalcolm@redhat.com>
5840
5841 PR other/69006
5842 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
5843 pp_newline_and_flush with pp_flush.
5844
9f04a53e
MS
58452016-01-20 Martin Sebor <msebor@redhat.com>
5846
5847 PR c/69405
5848 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
5849 an incompatible argument when the argument isn't a valid tree node.
5850
7f26f7df
JM
58512016-01-18 Jason Merrill <jason@redhat.com>
5852
5853 PR c++/68767
5854 * c-common.c (check_function_arguments_recurse): Fold the whole
5855 COND_EXPR, not just the condition.
5856
f62bf092
TV
58572016-01-18 Tom de Vries <tom@codesourcery.com>
5858
5859 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
5860 classify as loop clause.
5861
e0a575ff
JJ
58622016-01-15 Jakub Jelinek <jakub@redhat.com>
5863
5864 PR bootstrap/68271
5865 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
5866 C++ FE no longer has limit on number of pragmas.
5867
58682015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
5869
5870 PR c++/69048
5871 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 5872 to add missing cleanup point.
b6e3db06 5873
c7df95d8
DM
58742016-01-14 David Malcolm <dmalcolm@redhat.com>
5875
5876 PR c++/68819
5877 * c-indentation.c (get_visual_column): Add location_t param.
5878 Handle the column number being zero by effectively disabling the
5879 warning, with an "inform".
5880 (should_warn_for_misleading_indentation): Add location_t argument
5881 for all uses of get_visual_column.
5882
21efdd80
PP
58832016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
5884
5885 PR c++/69029
5886 * c-indentation.c (should_warn_for_misleading_indentation):
5887 Don't warn about do-while statements.
5888
7a127fa7
MS
58892016-01-07 Martin Sebor <msebor@redhat.com>
5890
5891 PR c/68966
5892 * c-common.c (sync_resolve_size): Reject first argument when it's
5893 a pointer to _Bool.
5894
c589e975
DM
58952016-01-05 David Malcolm <dmalcolm@redhat.com>
5896
5897 PR c/69122
5898 * c-indentation.c (get_visual_column): Remove default argument.
5899 (should_warn_for_misleading_indentation): For the multiline case,
5900 update call to get_visual_column for next_stmt_exploc so that it
5901 captures the location of the first non-whitespace character in the
5902 relevant line. Don't issue warnings if there is non-whitespace
5903 before the next statement.
5904
818ab71a
JJ
59052016-01-04 Jakub Jelinek <jakub@redhat.com>
5906
5907 Update copyright years.
5908
745e411d
DM
59092015-12-21 David Malcolm <dmalcolm@redhat.com>
5910
5911 * c-common.c (binary_op_error): Convert first param from
5912 location_t to rich_location * and use it when emitting an error.
5913 * c-common.h (binary_op_error): Convert first param from
5914 location_t to rich_location *.
5915
de67c4c3
DM
59162015-12-16 David Malcolm <dmalcolm@redhat.com>
5917
5918 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
5919 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
5920
4a38b02b
IV
59212015-12-15 Ilya Verbin <ilya.verbin@intel.com>
5922
5923 * c-common.c (c_common_attribute_table): Handle "omp declare target
5924 link" attribute.
5925
54d62f51
JJ
59262015-12-14 Jakub Jelinek <jakub@redhat.com>
5927
5928 PR c/68833
5929 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
5930
8d4227c8
TB
59312014-12-12 Tobias Burnus <burnus@net-b.de>
5932
5933 PR fortran/68815
5934 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
5935 specifiers (%d, %i,%u and %c).
5936
f6069ccc
DM
59372015-12-10 David Malcolm <dmalcolm@redhat.com>
5938
5939 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
5940
63bbf46d
JJ
59412015-12-08 Jakub Jelinek <jakub@redhat.com>
5942
5943 PR c/48088
5944 PR c/68657
5945 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
5946 * c-pragma.c (handle_pragma_diagnostic): Adjust
5947 control_warning_option caller.
5948
f79520bb
DM
59492015-12-07 David Malcolm <dmalcolm@redhat.com>
5950
5951 * c-common.c (c_cpp_error): Update for change to
5952 rich_location::set_range.
5953
b3d5bc62
JJ
59542015-12-04 Paolo Bonzini <bonzini@gnu.org>
5955
5956 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
5957 shifting 1 out of the sign bit.
5958
59592015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
5960
5961 * c-common.c (c_common_attribute_table[]): Update max arguments
5962 count for "simd" attribute.
5963 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
5964
6eb4a537
JJ
59652015-12-03 Jakub Jelinek <jakub@redhat.com>
5966
5967 PR preprocessor/57580
5968 * c-ppoutput.c (print): Change printed field to bool.
5969 Move src_file last for smaller padding.
5970 (init_pp_output): Set print.printed to false instead of 0.
5971 (scan_translation_unit): Fix up formatting. Set print.printed
5972 to true after printing something other than newline.
5973 (scan_translation_unit_trad): Set print.printed to true instead of 1.
5974 (maybe_print_line_1): Set print.printed to false instead of 0.
5975 (print_line_1): Likewise.
5976 (do_line_change): Set print.printed to true instead of 1.
5977 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
5978 dump_macro): Set print.printed to false after printing newline.
5979
4250754e
JM
59802015-12-02 Jason Merrill <jason@redhat.com>
5981
f479b43d
JM
5982 * c-common.c (fold_for_warn): New.
5983 (warn_logical_operator, warn_tautological_cmp)
5984 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
5985
4250754e
JM
5986 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
5987 (c_fully_fold_internal, decl_constant_value_for_optimization):
5988 Move to c/c-fold.c.
5989 * c-common.h: Don't declare decl_constant_value_for_optimization.
5990
e9e32ee6
JM
59912015-12-02 Joseph Myers <joseph@codesourcery.com>
5992
5993 PR c/68162
5994 * c-common.h (c_build_qualified_type): Add extra default
5995 arguments.
5996
37d5ad46
JB
59972015-12-01 Julian Brown <julian@codesourcery.com>
5998 Cesar Philippidis <cesar@codesourcery.com>
5999 James Norris <James_Norris@mentor.com>
6000
6001 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
6002 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
6003 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
6004
f07862c7
EB
60052015-11-30 Eric Botcazou <ebotcazou@adacore.com>
6006
6007 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
6008 (decl_sloc_common): Delete and move bulk of processing to...
6009 (decl_sloc): ...here.
6010 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
6011 (dump_ada_double_name): Remove S parameter and compute the suffix.
6012 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
6013 element type and deal with an anonymous one.
6014 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
6015 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
6016 and remove reference to QUAL_UNION_TYPE.
6017 (dump_nested_types): Make 2 passes on the fields and move bulk to...
6018 (dump_nested_type): ...here. New function extracted from above.
6019 Generate a full declaration for anonymous element type of arrays.
6020 (print_ada_declaration): Really skip anonymous declarations. Remove
6021 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
6022 Clean up processing of declarations of array types and objects.
6023 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
6024 Remove obsolete code and tidy up.
6025
75c8aac3
JH
60262015-11-29 Jan Hubicka <hubicka@ucw.cz>
6027
6028 PR c/67581
6029 * c-common.c (handle_transparent_union_attribute): Update
6030 also type variants.
6031
b58d3df2
ML
60322015-11-27 Martin Liska <mliska@suse.cz>
6033
6034 PR c++/68312
6035 * array-notation-common.c (cilkplus_extract_an_triplets):
6036 Release vector of vectors.
6037 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
6038
89a01fcf
EB
60392015-11-26 Eric Botcazou <ebotcazou@adacore.com>
6040
6041 PR c++/68527
6042 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
6043 (print_ada_struct_decl): Likewise.
6044
cc5c5226
IZ
60452015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
6046
6047 PR c++/68001
6048 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
6049 * cilk.c (recognize_spawn): Determine location in a more precise
6050 way.
6051
269adb9d
JM
60522015-11-19 Jason Merrill <jason@redhat.com>
6053
6054 * c-common.c (shorten_compare): But look through macros from
6055 system headers.
6056
d0eccfcd
JM
60572015-11-18 Jason Merrill <jason@redhat.com>
6058
6059 * c-common.c (shorten_compare): Don't -Wtype-limits if the
6060 non-constant operand comes from a macro.
6061
3e44547c
JM
60622015-11-17 Jason Merrill <jason@redhat.com>
6063
6064 PR bootstrap/68346
6065 * c-common.c (warn_tautological_cmp): Fold before checking for
6066 constants.
6067
0f62c7a0
MP
60682015-11-16 Marek Polacek <polacek@redhat.com>
6069
6070 PR c++/68362
6071 * c-common.c (check_case_bounds): Fold low and high cases.
6072
a868811e
MP
60732015-11-16 Marek Polacek <polacek@redhat.com>
6074
6075 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
6076 * c-common.c (c_common_get_alias_set): Likewise.
6077 (handle_visibility_attribute): Likewise.
6078
fff77217
KY
60792015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
6080
6081 * c-common.c (handle_simd_attribute): New.
6082 (struct attribute_spec): Add entry for "simd".
6083 (handle_simd_attribute): New.
6084
269e63b7
KT
60852015-11-13 Kai Tietz <ktietz70@googlemail.com>
6086
6087 * c-lex.c (interpret_float): Use fold_convert.
6088
ebedc9a3
DM
60892015-11-13 David Malcolm <dmalcolm@redhat.com>
6090
6091 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
6092 and store it on the result.
6093 * c-opts.c (c_common_init_options): Set
6094 global_dc->colorize_source_p.
6095
6e232ba4
JN
60962015-11-12 James Norris <jnorris@codesourcery.com>
6097 Joseph Myers <joseph@codesourcery.com>
6098
7365279f 6099 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
6100 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
6101 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
6102 PRAGMA_OACC_CLAUSE_LINK.
6103
e78bede6
MP
61042015-11-11 Marek Polacek <polacek@redhat.com>
6105
6106 PR c/68107
6107 PR c++/68266
6108 * c-common.c (valid_array_size_p): New function.
6109 * c-common.h (valid_array_size_p): Declare.
6110
3f8257db 61112015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
6112
6113 PR bootstrap/68271
6114 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
6115
69f293c9
AM
61162015-11-11 Andrew MacLeod <amacleod@redhat.com>
6117
6118 * array-notation-common.c: Remove unused header files.
6119 * c-ada-spec.c: Likewise.
6120 * c-cilkplus.c: Likewise.
6121 * c-common.c: Likewise.
6122 * c-cppbuiltin.c: Likewise.
6123 * c-dump.c: Likewise.
6124 * c-format.c: Likewise.
6125 * c-gimplify.c: Likewise.
6126 * c-indentation.c: Likewise.
6127 * c-lex.c: Likewise.
6128 * c-omp.c: Likewise.
6129 * c-opts.c: Likewise.
6130 * c-pch.c: Likewise.
6131 * c-ppoutput.c: Likewise.
6132 * c-pragma.c: Likewise.
6133 * c-pretty-print.c: Likewise.
6134 * c-semantics.c: Likewise.
6135 * c-ubsan.c: Likewise.
6136 * cilk.c: Likewise.
6137 * stub-objc.c: Likewise.
6138
3a40d81d
NS
61392015-11-09 Thomas Schwinge <thomas@codesourcery.com>
6140 Cesar Philippidis <cesar@codesourcery.com>
6141 James Norris <jnorris@codesourcery.com>
6142 Julian Brown <julian@codesourcery.com>
6143 Nathan Sidwell <nathan@codesourcery.com>
6144
6145 * c-pragma.c (oacc_pragmas): Add "routine".
6146 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
6147
ee45a32d
EB
61482015-11-08 Eric Botcazou <ebotcazou@adacore.com>
6149
6150 * c-common.c (c_common_attributes): Add scalar_storage_order.
6151 (handle_scalar_storage_order_attribute): New function.
6152 * c-pragma.c (global_sso): New variable.
6153 (maybe_apply_pragma_scalar_storage_order): New function.
6154 (handle_pragma_scalar_storage_order): Likewise.
6155 (init_pragma): Register scalar_storage_order.
6156 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
6157 * c.opt (Wscalar-storage-order): New warning.
6158 (fsso-struct=): New option.
6159
eb11eb15
MS
61602015-11-08 Martin Sebor <msebor@redhat.com>
6161
6162 * c.opt (Wplacement-new): Add a period to the end of a sentence.
6163
0aad0198
RS
61642015-11-07 Richard Sandiford <richard.sandiford@arm.com>
6165
6166 * c-common.c: Don't undef DEF_BUILTIN.
6167
8a645150
DM
61682015-11-06 David Malcolm <dmalcolm@redhat.com>
6169
6170 * c-common.c (c_cpp_error): Convert parameter from location_t to
6171 rich_location *. Eliminate the "column_override" parameter and
6172 the call to diagnostic_override_column.
6173 Update the "done_lexing" clause to set range 0
6174 on the rich_location, rather than overwriting a location_t.
6175 * c-common.h (c_cpp_error): Convert parameter from location_t to
6176 rich_location *. Eliminate the "column_override" parameter.
6177
7a5e4956
CP
61782015-11-05 Cesar Philippidis <cesar@codesourcery.com>
6179 Thomas Schwinge <thomas@codesourcery.com>
6180 James Norris <jnorris@codesourcery.com>
6181
6182 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
6183 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
6184 clauses with parallel and kernels and loops.
6185 * c-pragma.h (enum pragma_omp_clause): Add entries for
6186 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
6187 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
6188 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
6189 INDEPENDENT,SEQ}.
6190 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
6191
e2f5cc96
MS
61922015-11-05 Martin Sebor <msebor@redhat.com>
6193
6194 PR c++/67942
6195 * c.opt (-Wplacement-new): New option.
6196
e01d41e5
JJ
61972015-11-05 Jakub Jelinek <jakub@redhat.com>
6198
6199 * c-common.h (c_finish_omp_atomic): Add TEST argument.
6200 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
6201 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
6202 save_expr or create_tmp_var* if TEST is true.
6203 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
6204 Don't call add_stmt here.
6205 (struct c_omp_check_loop_iv_data): New type.
6206 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
6207 c_omp_check_loop_iv_exprs): New functions.
6208 (c_omp_split_clauses): Adjust for lastprivate being allowed on
6209 distribute.
6210 (c_omp_declare_simd_clauses_to_numbers): Change
6211 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
6212 (c_omp_declare_simd_clauses_to_decls): Similarly change those
6213 from numbers to PARM_DECLs.
6214
595278be
MM
62152015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
6216
6217 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
6218 flag_checking.
6219
3f8257db 62202015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
6221
6222 PR c++-common/67882
b3d5bc62
JJ
6223 * c-common.h (fold_offsetof_1): Add argument.
6224 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
6225 offsetof expressions that reference elements past the end of
6226 an array.
6227
4bf9e5a8
TS
62282015-11-03 Thomas Schwinge <thomas@codesourcery.com>
6229 Chung-Lin Tang <cltang@codesourcery.com>
6230
6231 * c-pragma.c (oacc_pragmas): Add "atomic".
6232 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
6233
3b1661a9
ES
62342015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
6235
6236 * c-common.c (handle_target_clones_attribute): New.
6237 (c_common_attribute_table): Add handle_target_clones_attribute.
6238 (handle_always_inline_attribute): Add check on target_clones attribute.
6239 (handle_target_attribute): Ditto.
6240
2adfab87
AM
62412015-10-29 Andrew MacLeod <amacleod@redhat.com>
6242
6243 * array-notation-common.c: Reorder #include's and remove duplicates.
6244 * c-ada-spec.c: Likewise.
6245 * c-cilkplus.c: Likewise.
6246 * c-common.c: Likewise.
6247 * c-cppbuiltin.c: Likewise.
6248 * c-dump.c: Likewise.
6249 * c-format.c: Likewise.
6250 * c-gimplify.c: Likewise.
6251 * c-indentation.c: Likewise.
6252 * c-lex.c: Likewise.
6253 * c-omp.c: Likewise.
6254 * c-opts.c: Likewise.
6255 * c-pch.c: Likewise.
6256 * c-ppoutput.c: Likewise.
6257 * c-pragma.c: Likewise.
6258 * c-pretty-print.c: Likewise.
6259 * c-semantics.c: Likewise.
6260 * c-ubsan.c: Likewise.
6261 * cilk.c: Likewise.
6262 * stub-objc.c: Likewise.
6263
d90ec4f2
JM
62642015-10-28 Jason Merrill <jason@redhat.com>
6265
6266 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
6267
88bae6f4
TS
62682015-10-27 Thomas Schwinge <thomas@codesourcery.com>
6269 James Norris <jnorris@codesourcery.com>
6270 Cesar Philippidis <cesar@codesourcery.com>
6271
6272 PR c/64765
6273 PR c/64880
6274 * c-common.h (c_oacc_split_loop_clauses): Declare function.
6275 * c-omp.c (c_oacc_split_loop_clauses): New function.
6276
b1726d6c
MS
62772015-10-21 Martin Sebor <msebor@redhat.com>
6278
6279 PR driver/68043
6280 * c.opt: End each sentence that describes an option with a period.
6281
fa60eeb9
MP
62822015-10-20 Marek Polacek <polacek@redhat.com>
6283
6284 * array-notation-common.c (is_cilkplus_vector_p): Define.
6285 * c-common.h (is_cilkplus_vector_p): Declare.
6286
95979049
MP
62872015-10-20 Marek Polacek <polacek@redhat.com>
6288
6289 * c.opt (std=gnu++11): Do not describe as experimental.
6290 (std=gnu++14): Likewise.
6291
2a9fb712
JM
62922015-10-19 Jason Merrill <jason@redhat.com>
6293
6294 * c-cppbuiltin.c (c_cpp_builtins): Define
6295 __cpp_nontype_template_args.
6296
13b380a3
JM
62972015-10-19 Jason Merrill <jason@redhat.com>
6298
6299 * c-cppbuiltin.c (c_cpp_builtins): Define
6300 __cpp_enumerator_attributes, __cpp_fold_expressions,
6301 __cpp_unicode_characters.
6302
d9a6bd32
JJ
63032015-10-13 Jakub Jelinek <jakub@redhat.com>
6304 Aldy Hernandez <aldyh@redhat.com>
6305
6306 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
6307 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
6308 (c_define_builtins): Likewise.
6309 * c-common.h (enum c_omp_clause_split): Add
6310 C_OMP_CLAUSE_SPLIT_TASKLOOP.
6311 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
6312 (c_finish_omp_for): Add ORIG_DECLV argument.
6313 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
6314 201511 instead of 201307.
6315 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
6316 OMP_CRITICAL_CLAUSES to it.
6317 (c_finish_omp_ordered): Add CLAUSES argument, set
6318 OMP_ORDERED_CLAUSES to it.
6319 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
6320 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
6321 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
6322 constructs and new OpenMP 4.5 clauses. Clear
6323 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
6324 verification code.
6325 * c-pragma.c (omp_pragmas_simd): Add taskloop.
6326 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
6327 (enum pragma_omp_clause): Add
6328 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
6329 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
6330
624d31fe
RS
63312015-10-05 Richard Sandiford <richard.sandiford@arm.com>
6332
6333 * c-lex.c (interpret_float): Use real_equal instead of
6334 REAL_VALUES_EQUAL.
6335
b8fd7909
JM
63362015-10-04 Jason Merrill <jason@redhat.com>
6337
6338 Implement N4514, C++ Extensions for Transactional Memory.
6339 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
6340 (c_common_attribute_table): Add transaction_safe_dynamic.
6341 transaction_safe now affects type identity.
6342 (handle_tm_attribute): Handle transaction_safe_dynamic.
6343 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
6344 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
6345 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
6346 (D_TRANSMEM): New.
6347 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
6348 * c-pretty-print.c (pp_c_attributes_display): Don't print
6349 transaction_safe in C++.
6350
12651878
MP
63512015-10-02 Marek Polacek <polacek@redhat.com>
6352
6353 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
6354
3e3b8d63
MP
63552015-10-02 Marek Polacek <polacek@redhat.com>
6356
6357 PR c/64249
6358 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
6359 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
6360 * c.opt (Wduplicated-cond): New option.
6361
0d1a8f75
JM
63622015-10-01 Joseph Myers <joseph@codesourcery.com>
6363
6364 * c.opt (std=c11): Do not describe as experimental.
6365 (std=gnu11): Likewise.
6366 (std=iso9899:2011): Likewise.
6367
3e32ee19
NS
63682015-09-28 Nathan Sidwell <nathan@codesourcery.com>
6369
6370 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
6371 (DEF_FUNCTION_TYPE_VAR_11): Delete.
6372
974348ee
MP
63732015-09-25 Marek Polacek <polacek@redhat.com>
6374
6375 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
6376 (ubsan_instrument_shift): Likewise.
6377
15dbc1a6
MP
63782015-09-25 Marek Polacek <polacek@redhat.com>
6379
6380 PR sanitizer/64906
6381 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
6382
6b95d7cc
PP
63832015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
6384
6385 * c-indentation.c (should_warn_for_misleading_indentation):
6386 Compare next_stmt_vis_column with guard_line_first_nws instead
6387 of with guard_line_vis_column.
6388
c1822f9c
MLI
63892015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
6390
6391 PR c/49654
6392 PR c/49655
6393 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
6394 options and options not valid for the current language.
6395
d5398058
PP
63962015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
6397
6398 * c-indentation.c (should_warn_for_misleading_indentation):
6399 Float out and consolidate the calls to get_visual_column that
6400 are passed guard_exploc as an argument. Compare
6401 next_stmt_vis_column with guard_line_first_nws instead of with
6402 body_line_first_nws.
6403
6b333269
NS
64042015-09-22 Nathan Sidwell <nathan@codesourcery.com>
6405
6406 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
6407 Wnamespaces): New C++ warnings.
6408
a75f1574
JM
64092015-09-22 Jason Merrill <jason@redhat.com>
6410
6411 * c-common.h (abi_compat_version_crosses): New.
6412 (warn_abi_version): Declare.
6413 * c-common.c: Define it.
6414 * c-opts.c (c_common_post_options): Handle it.
6415 flag_abi_compat_version defaults to 8.
6416
bdaaa8b7
VV
64172015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
6418
6419 Complete the implementation of N4230, Nested namespace definition.
6420 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
6421 __cpp_nested_namespace_definitions.
6422
eaa797e8
MLI
64232015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6424
6425 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
6426
c4914de6
MLI
64272015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6428
6429 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
6430 when warning.
6431 * c-pragma.h (pragma_lex): Add optional loc argument.
6432
fcb87c50
MM
64332015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
6434
6435 * c-format.c (check_format_arg): Adjust to use common block size in all
6436 object pools.
6437
31bdd08a
DM
64382015-09-15 David Malcolm <dmalcolm@redhat.com>
6439
6440 * c-format.c (location_from_offset): Update for change in
6441 signature of location_get_source_line.
6442 * c-indentation.c (get_visual_column): Likewise.
6443 (line_contains_hash_if): Likewise.
6444
aa9f4b4c
MP
64452015-09-14 Marek Polacek <polacek@redhat.com>
6446
6447 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
6448 setting various warnings.
6449
aa256c4a
MP
64502015-09-14 Marek Polacek <polacek@redhat.com>
6451
6452 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
6453 a negative value.
6454
0f876f22
MW
64552015-09-11 Mark Wielaard <mjw@redhat.com>
6456
6457 PR c/28901
6458 * c.opt (Wunused-variable): Option from common.opt.
6459 (Wunused-const-variable): New option.
6460
273aa49e
PC
64612015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
6462
6463 PR c++/53184
6464 * c.opt ([Wsubobject-linkage]): Add.
6465
1807ffc1
MS
64662015-09-03 Martin Sebor <msebor@redhat.com>
6467
6468 PR c/66516
6469 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
6470 functions.
6471 * c-common.c (reject_gcc_builtin): Define.
6472
38942840
BI
64732015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
6474
6475 PR middle-end/60586
6476 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
6477 prototype.
6478 * c-gimplify.c (c_gimplify_expr): Added a call to the function
6479 cilk_gimplify_call_params_in_spawned_fn.
6480 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
6481 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
6482 unwrapping.
6483
c316b5e4
MP
64842015-08-25 Marek Polacek <polacek@redhat.com>
6485
6486 PR middle-end/67330
6487 * c-common.c (handle_weak_attribute): Don't check whether the
6488 visibility can be changed here.
6489
584a7c46
MLI
64902015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
6491
6492 * c-lex.c (c_lex_with_flags): Use explicit locations.
6493
a79683d5
TS
64942015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
6495
6496 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
6497 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
6498
61717a45
FXC
64992015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
6500
6501 PR middle-end/36757
6502 * c-common.c (check_builtin_function_arguments): Add check
6503 for BUILT_IN_SIGNBIT argument.
6504
329524f5
PC
65052015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
6506
6507 PR c++/67160
6508 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
6509 in c++1z mode.
6510
4ee55665
MP
65112015-08-17 Marek Polacek <polacek@redhat.com>
6512
6513 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
6514 with whitespaces before qualifier names.
6515
b893e375
MP
65162015-08-12 Marek Polacek <polacek@redhat.com>
6517
6518 PR c++/55095
6519 * c-common.c (maybe_warn_shift_overflow): Properly handle
6520 left-shifting 1 into the sign bit.
6521
c2d89095
MLI
65222015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6523
6524 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
6525
971e17ff
AS
65262015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
6527 Braden Obrzut <admin@maniacsvault.net>
6528 Jason Merrill <jason@redhat.com>
6529
6530 Add C++ Concepts TS support.
6531 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
6532 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
6533 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
6534 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
6535 * c-opts.c (set_std_cxx1z): Set flag_concepts.
6536 * c.opt (fconcepts): New.
6537
b3d5bc62
JJ
65382015-08-02 Martin Sebor <msebor@redhat.com>
6539
6540 * c.opt (-Wframe-address): New warning option.
6541
8ebca419
PP
65422015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6543
6544 * c-indentation.c (should_warn_for_misleading_indentation):
6545 Improve heuristics.
6546
1a1e101f
PP
65472015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6548
6549 * c-indentation.c (get_visual_column): Add parameter first_nws,
6550 use it. Update comment documenting the function.
6551 (is_first_nonwhitespace_on_line): Remove.
6552 (should_warn_for_misleading_indentation): Replace usage of
6553 of is_first_nonwhitespace_on_line with get_visual_column.
6554
992118a1
PP
65552015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
6556
6557 * c-indentation.h (struct token_indent_info): Define.
6558 (get_token_indent_info): Define.
6559 (warn_for_misleading_information): Declare.
6560 * c-common.h (warn_for_misleading_information): Remove.
6561 * c-identation.c (warn_for_misleading_indentation):
6562 Change declaration to take three token_indent_infos. Adjust
6563 accordingly.
6564 * c-identation.c (should_warn_for_misleading_indentation):
6565 Likewise. Bail out early if the body is a compound statement.
6566 (guard_tinfo_to_string): Define.
6567
e8fa3817
JM
65682015-07-30 Jason Merrill <jason@redhat.com>
6569
6570 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
6571 '*' for reference decay.
6572
173864e8
MP
65732015-07-30 Marek Polacek <polacek@redhat.com>
6574
6575 * c-common.c (warn_tautological_cmp): Bail for float types.
6576
f2afe6dd
MP
65772015-07-27 Marek Polacek <polacek@redhat.com>
6578
6579 PR bootstrap/67030
6580 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
6581
05b28fd6
MP
65822015-07-27 Marek Polacek <polacek@redhat.com>
6583
6584 PR c++/66555
6585 PR c/54979
6586 * c-common.c (find_array_ref_with_const_idx_r): New function.
6587 (warn_tautological_cmp): New function.
6588 * c-common.h (warn_tautological_cmp): Declare.
6589 * c.opt (Wtautological-compare): New option.
6590
5a5062b8
MP
65912015-07-23 Marek Polacek <polacek@redhat.com>
6592
6593 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
6594 (ubsan_instrument_shift): Likewise.
6595
dc891fe7
MP
65962015-07-23 Marek Polacek <polacek@redhat.com>
6597
6598 PR sanitizer/66908
6599 * c-ubsan.c: Include gimplify.h.
6600 (ubsan_instrument_division): Unshare OP0 and OP1.
6601 (ubsan_instrument_shift): Likewise.
6602
451b5e48
MP
66032015-07-20 Marek Polacek <polacek@redhat.com>
6604 Richard Sandiford <richard.sandiford@arm.com>
6605
6606 PR c++/55095
6607 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
6608 Use EXPR_LOC_OR_LOC.
6609 (maybe_warn_shift_overflow): New function.
6610 * c-common.h (maybe_warn_shift_overflow): Declare.
6611 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
6612 * c.opt (Wshift-overflow): New option.
6613
fb0b2914
ML
66142015-07-16 Martin Liska <mliska@suse.cz>
6615
6616 * c-format.c (static void check_format_info_main): Use
6617 object_allocator instead of pool_allocator.
6618 (check_format_arg): Likewise.
6619 (check_format_info_main): Likewise.
6620
903f5c23
AM
66212015-07-15 Andrew MacLeod <amacleod@redhat.com>
6622
6623 * c-opts.c: Remove multiline #include comment.
6624
026c3cfd
AH
66252015-07-12 Aldy Hernandez <aldyh@redhat.com>
6626
6627 * c-common.c: Fix double word typos.
6628
bb49ee66
EB
66292015-07-10 Eric Botcazou <ebotcazou@adacore.com>
6630
6631 * c-ada-spec.h (cpp_operation): Revert latest change.
6632 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
6633 constructors and destructors.
6634
1916bcb5
AM
66352015-07-09 Andrew MacLeod <amacleod@redhat.com>
6636
6637 * c-common.h: Adjust includes for flags.h changes.
6638 * stub-objc.c: Likewise.
026c3cfd 6639
a9dcd529
EB
66402015-07-08 Eric Botcazou <ebotcazou@adacore.com>
6641
6642 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
6643 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
6644
b03b462f
JJ
66452015-07-08 Jakub Jelinek <jakub@redhat.com>
6646
6647 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
6648 are to be removed, return NULL rather than original clauses list.
6649
c7131fb2
AM
66502015-07-07 Andrew MacLeod <amacleod@redhat.com>
6651
6652 * array-notation-common.c: Adjust includes.
6653 * c-ada-spec.c: Likewise.
6654 * c-cilkplus.c: Likewise.
6655 * c-common.h: Likewise.
6656 * c-cppbuiltin.c: Likewise.
6657 * c-dump.c: Likewise.
6658 * c-format.c: Likewise.
6659 * c-gimplify.c: Likewise.
6660 * c-indentation.c: Likewise.
6661 * c-lex.c: Likewise.
6662 * c-omp.c: Likewise.
6663 * c-opts.c: Likewise.
6664 * c-pch.c: Likewise.
6665 * c-ppoutput.c: Likewise.
6666 * c-pragma.c: Likewise.
6667 * c-pretty-print.c: Likewise.
6668 * c-semantics.c: Likewise.
6669 * c-ubsan.c: Likewise.
6670 * cilk.c: Likewise.
6671 * stub-objc.c: Likewise.
6672
2a7fb83f
EB
66732015-07-07 Eric Botcazou <ebotcazou@adacore.com>
6674
6675 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
6676 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
6677
a03c9bf1
JM
66782015-07-01 Jason Merrill <jason@redhat.com>
6679
36a85135
JM
6680 * c-common.h (D_CXX11): Rename from D_CXX0X.
6681 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
6682 * c-common.c: Adjust.
6683
e7fa68d5
JM
6684 * c-opts.c (c_common_post_options): Default to C++14.
6685
a03c9bf1
JM
6686 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
6687
fe95b036
ESR
66882015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
6689
6690 Implement N4197 - Adding u8 character literals
b3d5bc62 6691 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 6692 CPP_CHAR.
b3d5bc62 6693 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 6694 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 6695 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
6696 and CPP_UTF8CHAR tokens.
6697 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 6698
da2e71c9
MLI
66992015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6700
6701 PR fortran/66605
6702 * c-common.c (do_warn_unused_parameter): Move here.
6703 * c-common.h (do_warn_unused_parameter): Declare.
6704
b155cfd9
MP
67052015-06-29 Marek Polacek <polacek@redhat.com>
6706
6707 PR c/66322
6708 * c-common.c (check_case_bounds): Add bool * parameter. Set
6709 OUTSIDE_RANGE_P.
6710 (c_add_case_label): Add bool * parameter. Pass it down to
6711 check_case_bounds.
6712 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
6713 warning here.
6714 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
6715 declarations.
6716
31521951
MP
67172015-06-27 Marek Polacek <polacek@redhat.com>
6718
6719 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
6720 or VECTOR_INTEGER_TYPE_P throughout.
6721 * c-gimplify.c: Likewise.
6722
22d03525
MP
67232015-06-26 Marek Polacek <polacek@redhat.com>
6724
6725 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
6726 * c-common.c (c_fully_fold_internal): Likewise.
6727 (c_alignof_expr): Likewise.
6728 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
6729 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 6730 * cilk.c (create_parm_list): Likewise.
22d03525 6731
af05e6e5
MP
67322015-06-26 Marek Polacek <polacek@redhat.com>
6733
6734 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
6735
f0889939
AM
67362015-06-25 Andrew MacLeod <amacleod@redhat.com>
6737
6738 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
6739 * c-gimplify.c: Likewise.
6740 * c-pragma.c: Likewise.
6741 * c-ubsan.c: Likewise.
6742 * cilk.c: Likewise.
6743
ca752f39
RS
67442015-06-25 Richard Sandiford <richard.sandiford@arm.com>
6745
6746 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
6747 ggc_hasher.
6748
16a16ec7
AM
67492015-06-25 Andrew MacLeod <amacleod@redhat.com>
6750
6751 * cilk.c: Move calls.h after tm.h in the include chain.
6752
0ae9bd27
MP
67532015-06-25 Marek Polacek <polacek@redhat.com>
6754
6755 * array-notation-common.c: Use VAR_P throughout.
6756 * c-ada-spec.c: Likewise.
6757 * c-common.c: Likewise.
6758 * c-format.c: Likewise.
6759 * c-gimplify.c: Likewise.
6760 * c-omp.c: Likewise.
6761 * c-pragma.c: Likewise.
6762 * c-pretty-print.c: Likewise.
6763 * cilk.c: Likewise.
6764
62f9079a
MP
67652015-06-25 Marek Polacek <polacek@redhat.com>
6766
6767 * cilk.c (extract_free_variables): Use is_global_var.
6768
0fa16060
RS
67692015-06-23 Richard Sandiford <richard.sandiford@arm.com>
6770
6771 * c-common.c: Don't include target-def.h.
6772
a68ae2e1
MP
67732015-06-23 Marek Polacek <polacek@redhat.com>
6774
6775 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
6776 when comparing INTEGER_CSTs.
6777
c6a2f2d9
PMR
67782015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
6779
6780 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
6781 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
6782 (dump_ada_template): Skip partially specialized types.
6783
6b4db501
MM
67842015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
6785
6786 * c-common.c (scalar_to_vector): Use std::swap instead of manually
6787 swapping.
6788
abb226c9
AM
67892015-06-17 Andrew MacLeod <amacleod@redhat.com>
6790
6791 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
6792 * c-ada-spec.c: Likewise.
6793 * c-cilkplus.c: Likewise.
6794 * c-common.c: Likewise.
6795 * c-common.h: Likewise.
6796 * c-cppbuiltin.c: Likewise.
6797 * c-dump.c: Likewise.
6798 * c-format.c: Likewise.
6799 * c-gimplify.c: Likewise.
6800 * c-indentation.c: Likewise.
6801 * c-lex.c: Likewise.
6802 * c-omp.c: Likewise.
6803 * c-opts.c: Likewise.
6804 * c-pch.c: Likewise.
6805 * c-ppoutput.c: Likewise.
6806 * c-pragma.c: Likewise.
6807 * c-pretty-print.c: Likewise.
6808 * c-semantics.c: Likewise.
6809 * c-ubsan.c: Likewise.
6810 * cilk.c: Likewise.
6811 * stub-objc.c: Likewise.
6812
076fecad
PP
68132015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
6814
6815 PR c++/65168
6816 * c-common.c (c_common_truthvalue_conversion): Warn when
6817 converting an address of a reference to a truth value.
6818
13fdf2e2
AM
68192015-06-08 Andrew MacLeod <amacleod@redhat.com>
6820
6821 * array-notation-common.c : Adjust include files.
6822 * c-ada-spec.c : Likewise.
6823 * c-cilkplus.c : Likewise.
6824 * c-common.c : Likewise.
6825 * c-common.h : Likewise.
6826 * c-cppbuiltin.c : Likewise.
6827 * c-dump.c : Likewise.
6828 * c-format.c : Likewise.
6829 * c-gimplify.c : Likewise.
6830 * c-indentation.c : Likewise.
6831 * c-lex.c : Likewise.
6832 * c-omp.c : Likewise.
6833 * c-opts.c : Likewise.
6834 * c-pch.c : Likewise.
6835 * c-ppoutput.c : Likewise.
6836 * c-pragma.c : Likewise.
6837 * c-pretty-print.c : Likewise.
6838 * c-semantics.c : Likewise.
6839 * c-ubsan.c : Likewise.
6840 * cilk.c : Likewise.
6841 * stub-objc.c : Likewise.
6842
a1661b90
MP
68432015-06-08 Marek Polacek <polacek@redhat.com>
6844
6845 PR c/66415
6846 * c-format.c (location_from_offset): Return LOC if LINE is null.
6847
d7438551
AH
68482015-06-05 Aldy Hernandez <aldyh@redhat.com>
6849
6850 * c-common.h (c_parse_final_cleanups): New prototype.
6851 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
6852
b3d5bc62
JJ
68532015-06-04 Sriraman Tallam <tmsriram@google.com>
6854
6855 * c-common.c (noplt): New attribute.
6856 (handle_noplt_attribute): New handler.
6857
ecb9f223
AM
68582015-06-04 Andrew MacLeod <amacleod@redhat.com>
6859
6860 * array-notation-common.c: Adjust includes for restructured coretypes.h.
6861 * c-ada-spec.c: Likewise.
6862 * c-cilkplus.c: Likewise.
6863 * c-common.c: Likewise.
6864 * c-common.h: Likewise.
6865 * c-cppbuiltin.c: Likewise.
6866 * c-dump.c: Likewise.
6867 * c-format.c: Likewise.
6868 * c-gimplify.c: Likewise.
6869 * c-indentation.c: Likewise.
6870 * c-lex.c: Likewise.
6871 * c-omp.c: Likewise.
6872 * c-opts.c: Likewise.
6873 * c-pch.c: Likewise.
6874 * c-ppoutput.c: Likewise.
6875 * c-pragma.c: Likewise.
6876 * c-pretty-print.c: Likewise.
6877 * c-semantics.c: Likewise.
6878 * c-ubsan.c: Likewise.
6879 * cilk.c: Likewise.
6880 * stub-objc.c: Likewise.
6881
6ac48155
DM
68822015-06-02 David Malcolm <dmalcolm@redhat.com>
6883
6884 PR c/66220:
6885 * c-indentation.c (should_warn_for_misleading_indentation): Use
6886 expand_location rather than expand_location_to_spelling_point.
6887 Don't warn if the guarding statement is more indented than the
6888 next/body stmts.
6889
773ce42e
DM
68902015-06-02 David Malcolm <dmalcolm@redhat.com>
6891
6892 * c-indentation.c (warn_for_misleading_indentation): Bail out
6893 immediately if -Wmisleading-indentation isn't enabled.
6894
4fef8379
ML
68952015-06-01 Martin Liska <mliska@suse.cz>
6896
6897 * c-format.c (check_format_arg):Use new type-based pool allocator.
6898 (check_format_info_main) Likewise.
6899
1edfb384
EB
69002015-05-31 Eric Botcazou <ebotcazou@adacore.com>
6901
6902 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
6903 (has_nontrivial_methods): Likewise.
6904
9677ef52
MP
69052015-05-25 Marek Polacek <polacek@redhat.com>
6906
6907 * c-ubsan.c (ubsan_instrument_shift): Use type0.
6908
fd5c817a
MP
69092015-05-22 Marek Polacek <polacek@redhat.com>
6910
6911 PR c/47043
6912 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
6913
a2f45fe6 69142015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
6915
6916 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
6917 STACK_GROWS_DOWNWARD.
6918
a2f45fe6 69192015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
6920
6921 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
6922 STACK_GROWS_DOWNWARD rather than if it is defined.
6923
0fee2ac2 69242015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 6925
0fee2ac2
MLI
6926 PR c/52952
6927 * c-format.c (location_column_from_byte_offset): New.
6928 (location_from_offset): New.
6929 (struct format_wanted_type): Add offset_loc field.
6930 (check_format_info): Move handling of location for extra arguments
6931 closer to the point of warning.
6932 (check_format_info_main): Pass the result of location_from_offset
6933 to warning_at.
6934 (format_type_warning): Pass the result of location_from_offset
6935 to warning_at.
6936
cf4ef6f7
MP
69372015-05-20 Marek Polacek <polacek@redhat.com>
6938
6939 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
6940
3a65ee74
MP
69412015-05-20 Marek Polacek <polacek@redhat.com>
6942
6943 * c-ada-spec.c (dump_sloc): Use DECL_P.
6944
21b634ae
MP
69452015-05-20 Marek Polacek <polacek@redhat.com>
6946
6947 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
6948 * c-common.c: Likewise.
6949
0e50b624
DM
69502015-05-19 David Malcolm <dmalcolm@redhat.com>
6951
6952 * c-common.h (fe_file_change): Strengthen param from
6953 const line_map * to const line_map_ordinary *.
6954 (pp_file_change): Likewise.
6955 * c-lex.c (fe_file_change): Likewise.
6956 (cb_define): Use linemap_check_ordinary when invoking
6957 SOURCE_LINE.
6958 (cb_undef): Likewise.
6959 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
6960 invoking cb_file_change.
6961 (c_finish_options): Likewise.
6962 (push_command_line_include): Likewise.
6963 (cb_file_change): Strengthen param "new_map" from
6964 const line_map * to const line_map_ordinary *.
6965 * c-ppoutput.c (cb_define): Likewise for local "map".
6966 (pp_file_change): Likewise for param "map" and local "from".
6967
fab27f52
MM
69682015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
6969
6970 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
6971
2fe1d762
TV
69722015-05-18 Tom de Vries <tom@codesourcery.com>
6973
6974 * c-common.c (build_va_arg_1): New function.
6975 (build_va_arg): Add address operator to va_list operand if necessary.
6976
7a37fa90
MM
69772015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
6978
6979 PR c/48956
6980 * c-common.c (int_safely_convertible_to_real_p): Define.
6981 (unsafe_conversion_p): Check conversions involving complex types.
6982 (conversion_warning): Add new warning message for conversions which
6983 discard imaginary component.
6984 * c-common.h: (enum conversion_safety): Add new enumerator for such
6985 conversions.
6986
3aa3c9fc
MP
69872015-05-14 Marek Polacek <polacek@redhat.com>
6988
6989 PR c/66066
6990 PR c/66127
6991 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
6992 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
6993 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
6994 use it. If FOR_INT_CONST, require that all evaluated operands be
6995 INTEGER_CSTs.
6996
c3388e62
DM
69972015-05-12 David Malcolm <dmalcolm@redhat.com>
6998
6999 * c-common.h (warn_for_misleading_indentation): New prototype.
7000 * c-indentation.c: New file.
7001 * c.opt (Wmisleading-indentation): New option.
7002
c7b38fd5
TV
70032015-05-12 Tom de Vries <tom@codesourcery.com>
7004
7005 PR tree-optimization/66010
7006 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
7007
381bf11e
JM
70082015-05-09 Jason Merrill <jason@redhat.com>
7009
edff0c06
JM
7010 * c-opts.c (c_common_post_options): Also clear
7011 cpp_opts->cpp_warn_cxx11_compat.
7012
129211bc
JM
7013 * c-common.h (enum cxx_dialect): Add cxx_unset.
7014 * c-common.c (cxx_dialect): Initialize to cxx_unset.
7015 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
7016
381bf11e
JM
7017 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
7018 (std=gnu++0x): Mark as Undocumented.
7019 (std=gnu++1y): Add deprecated message.
7020
fe191308
JM
70212015-05-08 Jason Merrill <jason@redhat.com>
7022
765189ff
JM
7023 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
7024 * c-opts.c: Adjust.
7025
fe191308
JM
7026 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
7027
755e528f
MP
70282015-05-08 Marek Polacek <polacek@redhat.com>
7029
7030 PR c/64918
7031 * c.opt (Woverride-init-side-effects): New option.
7032
0173bd2a
MP
70332015-05-07 Marek Polacek <polacek@redhat.com>
7034
7035 PR c/65179
7036 * c-common.c (c_fully_fold_internal): Warn when left shifting a
7037 negative value.
7038 * c.opt (Wshift-negative-value): New option.
7039 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
7040 when -Wextra and C99/C++11 mode.
7041
e0f0d3b9
MP
70422015-05-07 Marek Polacek <polacek@redhat.com>
7043 Martin Uecker <uecker@eecs.berkeley.edu>
7044
7045 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
7046 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
7047
8243e2a9
JM
70482015-05-05 Jason Merrill <jason@redhat.com>
7049
7050 * c.opt (Wterminate): New.
7051
577cd070
MP
70522015-04-30 Marek Polacek <polacek@redhat.com>
7053
7054 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
7055 require that the non-constant be of a boolean type.
7056
0373796b
JT
70572015-04-29 Josh Triplett <josh@joshtriplett.org>
7058
e0f0d3b9
MP
7059 * c-common.c (handle_section_attribute): Refactor to reduce
7060 nesting and distinguish between error cases.
0373796b 7061
716c0ba6
MP
70622015-04-29 Marek Polacek <polacek@redhat.com>
7063
7064 PR c/64610
7065 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
7066 with 0/1.
7067
8848828b
JJ
70682015-04-29 Jakub Jelinek <jakub@redhat.com>
7069
7070 * c-common.h (omp_clause_mask): Unconditionally define as a class.
7071 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
7072 HOST_BITS_PER_WIDE_INT.
7073
ecd0e562
TV
70742015-04-28 Tom de Vries <tom@codesourcery.com>
7075
7076 PR tree-optimization/65887
7077 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
7078
2a877204 70792015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 7080 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
7081
7082 * c-ada-spec.c (in_function): Delete.
7083 (dump_generic_ada_node): Do not change in_function and remove the
7084 redundant code dealing with it.
7085 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
7086 (print_ada_methods): Output the static member functions in a nested
7087 package after the regular methods as well as associated renamings.
7088
4853031e
MP
70892015-04-24 Marek Polacek <polacek@redhat.com>
7090
7091 PR c/65830
7092 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
7093 and OPT_Wshift_count_overflow.
7094
8c2b7f79
MP
7095 PR c/63357
7096 * c-common.c (warn_logical_operator): Warn if the operands have the
7097 same expressions.
7098
b8787813
MP
70992015-04-24 Marek Polacek <polacek@redhat.com>
7100
7101 PR c/61534
7102 * c-common.c (warn_logical_operator): Bail if either operand comes
7103 from a macro expansion.
7104
8fba1830
BRF
71052015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
7106
7107 PR target/55143
7108 * c-common.c (c_default_pointer_mode): Add definition.
7109 * c-common.h (c_default_pointer_mode): Add declaration.
7110
17958621
JJ
71112015-03-11 Jakub Jelinek <jakub@redhat.com>
7112
7113 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
7114 on record_builtin_type argument.
7115
7ccb1a11
JJ
71162015-03-10 Jakub Jelinek <jakub@redhat.com>
7117
7118 PR c/65120
7119 * c-common.c (warn_logical_not_parentheses): Don't warn for
7120 !x == 0 or !x != 0.
7121
04fd785e
MP
71222015-03-07 Marek Polacek <polacek@redhat.com>
7123
7124 PR sanitizer/65280
7125 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
7126 before trying to figure out whether we have a flexible array member.
7127
a4e26206 71282015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 7129 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
7130
7131 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
7132
0d2489f4
EB
71332015-03-05 Eric Botcazou <ebotcazou@adacore.com>
7134
7135 PR ada/65319
7136 * c-ada-spec.c (print_destructor): Remove obsolete code.
7137
83ed54d7
EB
71382015-03-01 Eric Botcazou <ebotcazou@adacore.com>
7139
7140 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
7141 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
7142 DECL_TEMPLATE_RESULT emulations.
7143 (dump_ada_template)): Add guard for TYPE_METHODS.
7144
7631f0e2
MP
71452015-02-27 Marek Polacek <polacek@redhat.com>
7146
7147 PR c/65040
7148 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
7149
d1783ae5
KT
71502015-02-27 Kai Tietz <ktietz@redhat.com>
7151
7152 PR c/35330
7153 * c-pragma.c (handle_pragma_weak): Do not try to create
7154 weak/alias of declarations not being function, or variable
7155 declarations.
7156
56a9f6bc
TS
71572015-02-24 Thomas Schwinge <thomas@codesourcery.com>
7158
7159 PR libgomp/64625
7160 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
7161 Remove macros.
7162 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
7163
3d5cb23d
MP
71642015-02-16 Marek Polacek <polacek@redhat.com>
7165
7166 PR c/65066
7167 * c-format.c (check_format_types): Handle null param.
7168
fa008882
MP
71692015-02-13 Marek Polacek <polacek@redhat.com>
7170
7171 PR c/65040
7172 * c-format.c (check_format_types): Don't warn about different
7173 signedness if the original value is in the range of WANTED_TYPE.
7174
785f21af
JM
71752015-02-12 Jason Merrill <jason@redhat.com>
7176
7177 PR c++/64956
7178 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
7179 to the current highest version.
7180 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
7181
4886ec8e
JJ
71822015-02-04 Jakub Jelinek <jakub@redhat.com>
7183
7184 PR c/64824
7185 PR c/64868
7186 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
7187 instead of RDIV_EXPR. Use build_binary_op instead of
7188 build2_loc.
7189
40fecdd6
JM
71902015-01-30 Joseph Myers <joseph@codesourcery.com>
7191
7192 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
7193 to pass input_location as first argument.
7194
a0c88d06
TV
71952015-01-23 Tom de Vries <tom@codesourcery.com>
7196
7197 PR libgomp/64672
7198 * c.opt (fopenacc): Mark as LTO option.
7199
1506ae0e
TV
72002015-01-23 Tom de Vries <tom@codesourcery.com>
7201
7202 PR libgomp/64707
7203 * c.opt (fopenmp): Mark as LTO option.
7204
31be63ab
JJ
72052015-01-21 Jakub Jelinek <jakub@redhat.com>
7206
7207 PR c/63307
b1726d6c 7208 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
7209 (compare_decls): Fix up formatting.
7210
72112015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
7212
7213 PR c/63307
7214 * cilk.c: Include vec.h.
7215 (struct cilk_decls): New structure.
7216 (wrapper_parm_cb): Split this function to...
7217 (fill_decls_vec): ...this...
7218 (create_parm_list): ...and this.
7219 (compare_decls): New function.
7220 (for_local_cb): Remove.
7221 (wrapper_local_cb): Ditto.
7222 (build_wrapper_type): For now first traverse and fill vector of
7223 declarations then sort it and then deal with sorted vector.
7224 (cilk_outline): Ditto.
7225 (declare_one_free_variable): Ditto.
7226
6875457f
JM
72272015-01-21 Jason Merrill <jason@redhat.com>
7228
7229 PR c++/64629
7230 * c-format.c (check_format_arg): Call decl_constant_value.
7231
185c9e56
ML
72322015-01-19 Martin Liska <mliska@suse.cz>
7233
7234 * c-common.c (handle_noicf_attribute): New function.
7235
41dbbb37
TS
72362015-01-15 Thomas Schwinge <thomas@codesourcery.com>
7237 Bernd Schmidt <bernds@codesourcery.com>
7238 James Norris <jnorris@codesourcery.com>
7239 Cesar Philippidis <cesar@codesourcery.com>
7240 Ilmir Usmanov <i.usmanov@samsung.com>
7241 Jakub Jelinek <jakub@redhat.com>
7242
7243 * c.opt (fopenacc): New option.
7244 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
7245 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
7246 New macros.
7247 * c-common.h (c_finish_oacc_wait): New prototype.
7248 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
7249 (c_finish_oacc_wait): New function.
7250 * c-pragma.c (oacc_pragmas): New variable.
7251 (c_pp_lookup_pragma, init_pragma): Handle it.
7252 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
7253 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
7254 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
7255 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
7256 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
7257 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
7258 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
7259 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
7260 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
7261 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
7262 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
7263 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
7264 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
7265 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
7266 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
7267 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
7268 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
7269 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
7270 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
7271 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
7272 PRAGMA_OACC_CLAUSE_WORKER.
7273
3f8257db 72742015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
7275
7276 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
7277 for the new option fstack-protector_explicit.
7278 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
7279 (handle_stack_protect_attribute): New function.
7280
3f8257db 72812015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
7282
7283 * c.opt: New option -Warray-bounds=.
7284
adfac8df
JJ
72852015-01-09 Michael Collison <michael.collison@linaro.org>
7286
7287 * array-notation-common.c: Include hash-set.h, machmode.h,
7288 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7289 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
7290 * c-ada-spec.c: Ditto.
7291 * c-cilkplus.c: Ditto.
7292 * c-common.c: Include input.h due to flattening of tree.h.
7293 Define macro GCC_C_COMMON_C.
7294 * c-common.h: Flatten tree.h header files into c-common.h.
7295 Remove include of tree-core.h.
7296 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
7297 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7298 fold-const.h, wide-int.h, and inchash.h due to
7299 flattening of tree.h.
7300 * c-dump.c: Ditto.
7301 * c-format.c: Flatten tree.h header files into c-common.h.
7302 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
7303 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7304 fold-const.h, wide-int.h, and inchash.h due to
7305 flattening of tree.h.
7306 * c-dump.c: Include hash-set.h, machmode.h,
7307 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7308 fold-const.h, wide-int.h, and inchash.h due to
7309 flattening of tree.h.
7310 * c-format.c: Include hash-set.h, machmode.h,
7311 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7312 fold-const.h, wide-int.h, inchash.h and real.h due to
7313 flattening of tree.h.
7314 * c-gimplify.c: Include hash-set.h, machmode.h,
7315 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7316 fold-const.h, wide-int.h, and inchash.h due to
7317 flattening of tree.h.
7318 * cilk.c: Ditto.
7319 * c-lex.c: Ditto.
7320 * c-omp.c: Ditto.
7321 * c-opts.c: Ditto.
7322 * c-pch.c: Ditto.
7323 * c-ppoutput.c: Ditto.
7324 * c-pragma.c: Ditto.
7325 * c-pretty-print.c: Ditto.
7326 * c-semantics.c: Ditto.
7327 * c-ubsan.c: Ditto.
7328 * stub-objc.c: Ditto.
7329
f5481fc4
JM
73302015-01-08 Jason Merrill <jason@redhat.com>
7331
7332 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
7333 do_ubsan_in_current_function.
7334 (ubsan_maybe_instrument_reference_or_call): Likewise.
7335 * c-ubsan.h: Declare it.
7336
de35aa66
MS
73372015-01-08 Mike Stump <mikestump@comcast.net>
7338
7339 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
7340
4a9a42ab
MP
73412015-01-07 Marek Polacek <polacek@redhat.com>
7342
7343 PR c/64440
7344 * c-common.c (c_fully_fold_internal): Warn for division and modulo
7345 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
7346
2f42e5de
TS
73472015-01-05 Trevor Saunders <tsaunders@mozilla.com>
7348
7349 PR c++/31397
7350 * c.opt (Wsuggest-override): New option.
7351
5624e564
JJ
73522015-01-05 Jakub Jelinek <jakub@redhat.com>
7353
7354 Update copyright years.
7355
5bd012f8
MP
73562015-01-05 Marek Polacek <polacek@redhat.com>
7357
7358 PR c/64423
7359 * c-common.c (warn_array_subscript_with_type_char): Add location_t
7360 parameter. Use it.
7361 * c-common.h (warn_array_subscript_with_type_char): Update
7362 declaration.
7363
a7fa8d18
ESR
73642014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
7365
7366 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
7367 Control macro with flag_sized_deallocation.
7368
3f8257db 73692014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
7370
7371 * c.opt (Wdiscarded-array-qualifiers): New option.
7372
1f8d3e84
JJ
73732014-12-19 Jakub Jelinek <jakub@redhat.com>
7374
7375 PR preprocessor/63831
7376 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
7377 and __has_cpp_attribute here.
7378 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
7379 c_common_has_attribute.
7380 * c-common.h (c_common_has_attribute): New prototype.
7381 * c-lex.c (init_c_lex): Set cb->has_attribute to
7382 c_common_has_attribute instead of cb_has_attribute.
7383 (get_token_no_padding): New function.
7384 (cb_has_attribute): Renamed to ...
7385 (c_common_has_attribute): ... this. No longer static. Use
7386 get_token_no_padding, require ()s, don't build TREE_LIST
7387 unnecessarily, fix up formatting, adjust diagnostics, call
7388 init_attributes.
7389
20b06add
JM
73902014-12-15 Jason Merrill <jason@redhat.com>
7391
7392 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
7393 (-Wsized-deallocation): New.
7394 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
7395 to on in C++14 and up.
7396
94a073b2
JM
73972014-12-11 Jason Merrill <jason@redhat.com>
7398
acaa5911
JM
7399 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
7400
94a073b2
JM
7401 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
7402 we aren't complaining about VLAs.
7403
7fb66c15
MP
74042014-12-06 Marek Polacek <polacek@redhat.com>
7405
7406 PR tree-optimization/64183
7407 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
7408 shift-expression if it is integer_type_node. Use types_compatible_p.
7409
b731b390
JJ
74102014-11-29 Jakub Jelinek <jakub@redhat.com>
7411
7412 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
7413 last argument from create_tmp_var_raw and create_tmp_var calls.
7414 * cilk.c (gimplify_cilk_spawn): Likewise.
7415 * c-omp.c (c_finish_omp_atomic): Likewise.
7416
6a4da643
MP
74172014-11-28 Marek Polacek <polacek@redhat.com>
7418
7419 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
7420 instead of unsigned_type_node.
7421
541e35a6
MP
74222014-11-28 Marek Polacek <polacek@redhat.com>
7423
7424 PR c/63862
7425 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
7426 to op1_utype.
7427 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
7428 expression to unsigned_type_node.
7429
dcc97066
MW
74302014-11-20 Mark Wielaard <mjw@redhat.com>
7431
7432 PR debug/38757
7433 * c-opts.c (set_std_c89): Set lang_hooks.name.
7434 (set_std_c99): Likewise.
7435 (set_std_c11): Likewise.
7436 (set_std_cxx98): Likewise.
7437 (set_std_cxx11): Likewise.
7438 (set_std_cxx14): Likewise.
7439 (set_std_cxx1z): Likewise.
7440
aa7da51a
JJ
74412014-11-21 Jakub Jelinek <jakub@redhat.com>
7442
7443 PR target/63764
7444 * c-common.h (convert_vector_to_pointer_for_subscript): Change
7445 return type to bool.
009a3480 7446 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
7447 (convert_vector_to_pointer_for_subscript): Change return type to
7448 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
7449 and copy it into a TARGET_EXPR and use that instead of *vecp
7450 directly.
7451
538dd0b7
DM
74522014-11-19 David Malcolm <dmalcolm@redhat.com>
7453
7454 Merger of git branch "gimple-classes-v2-option-3".
7455 * ChangeLog.gimple-classes: New.
7456 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
7457 from being just a vec<gimple> to a vec<gbind *>.
7458
c39a5e99
JJ
74592014-11-18 Jakub Jelinek <jakub@redhat.com>
7460
7461 PR sanitizer/63813
7462 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
7463 argument to ptype, set type to TREE_TYPE (ptype). Don't call
7464 get_pointer_alignment for non-pointers. Use ptype, or if it is
7465 reference type, corresponding pointer type, as type of kind
7466 argument.
7467 (ubsan_maybe_instrument_reference,
7468 ubsan_maybe_instrument_member_call): Adjust callers.
7469
8537a4a9
MP
74702014-11-15 Marek Polacek <polacek@redhat.com>
7471
7472 PR middle-end/63884
7473 * array-notation-common.c (is_sec_implicit_index_fn): Return false
7474 for NULL fndecl.
7475 (extract_array_notation_exprs): Return for NULL node.
7476
2079956a
JM
74772014-11-12 Joseph Myers <joseph@codesourcery.com>
7478
7479 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
7480 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
7481
1304953e
JJ
74822014-11-12 Jakub Jelinek <jakub@redhat.com>
7483
7484 PR c/59708
7485 * c-common.c (check_builtin_function_arguments): Handle
7486 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
7487
e5e44252
AK
74882014-11-10 Andi Kleen <ak@linux.intel.com>
7489
7490 PR c/60804
7491 * c-common.h (check_no_cilk): Declare.
7492 * cilk.c (get_error_location): New function.
7493 (check_no_cilk): Dito.
7494
e64b984d
AK
74952014-11-10 Andi Kleen <ak@linux.intel.com>
7496
7497 * cilk.c (recognize_spawn): Use expression location
7498 for error message.
7499
13c21655
PC
75002014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
7501
7502 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
7503
42fd12b1
ESR
75042014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
7505
7506 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
7507 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
7508 (__cpp_range_based_for, __cpp_initializer_lists,
7509 __cpp_delegating_constructors, __cpp_nsdmi,
7510 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
7511 for C++11; (__cpp_attribute_deprecated): Remove in favor of
7512 __has_cpp_attribute.
7513 * c-lex.c (cb_has_attribute): New callback CPP function;
7514 (init_c_lex): Set has_attribute callback.
7515
6f450181
RB
75162014-11-04 Richard Biener <rguenther@suse.de>
7517
7518 * c-common.c (shorten_compare): Do not shorten mixed
7519 DFP and non-DFP compares.
7520
26f0e1d6
ESR
75212014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
7522
7523 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
7524 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
7525 Commentary and rearrangement of tests.
7526 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
7527 Commentary and rearrangement of tests.
ab20d992 7528 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
26f0e1d6
ESR
7529 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
7530
ef4bddc2
RS
75312014-10-29 Richard Sandiford <richard.sandiford@arm.com>
7532
7533 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
7534 enum from machine_mode.
7535
c582198b
AM
75362014-10-28 Andrew MacLeod <amacleod@redhat.com>
7537
adfac8df
JJ
7538 * c-common.c: Adjust include files.
7539 * c-gimplify.c: Ditto.
7540 * cilk.c: Ditto.
7541 * c-pragma.c: Ditto.
7542 * c-ubsan.c: Ditto.
c582198b 7543
60393bbc
AM
75442014-10-27 Andrew MacLeod <amacleod@redhat.com>
7545
7546 * c-gimplify.c: Adjust include files.
7547
d723bb7c
MLI
75482014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
7549
7550 PR c++/53061
7551 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
7552 c_common_initialize_diagnostics.
7553 * c-common.h: Likewise.
7554
90f3520e
MP
75552014-10-24 Marek Polacek <polacek@redhat.com>
7556
7557 PR c/56980
7558 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
7559 print "struct"/"union"/"enum" for typedefed names.
7560
59d7607a
MP
75612014-10-23 Marek Polacek <polacek@redhat.com>
7562
7563 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
7564 in unsigned type.
7565
d95a2703
JJ
75662014-10-22 Jakub Jelinek <jakub@redhat.com>
7567 Yury Gribov <y.gribov@samsung.com>
7568
7569 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
7570 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
7571 instead of flag_sanitize_recover as bool flag.
7572
8e6ef852
KY
75732014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
7574
7575 * cilk.c: Revert previous change.
7576
948cf550
IZ
75772014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
7578
7579 PR c/63307
7580 * cilk.c: Include vec.h.
7581 (struct cilk_decls): New structure.
7582 (wrapper_parm_cb): Split this function to...
7583 (fill_decls_vec): ...this...
7584 (create_parm_list): ...and this.
7585 (compare_decls): New function.
7586 (for_local_cb): Remove.
7587 (wrapper_local_cb): Ditto.
7588 (build_wrapper_type): For now first traverse and fill vector of
7589 declarations then sort it and then deal with sorted vector.
7590 (cilk_outline): Ditto.
7591 (declare_one_free_variable): Ditto.
7592
92574c7c
MP
75932014-10-17 Marek Polacek <polacek@redhat.com>
7594
7595 * c-opts.c (c_common_post_options): Set warn_implicit_int.
7596 * c.opt (Wimplicit-int): Initialize to -1.
7597
83685514
AM
75982014-10-16 Andrew MacLeod <amacleod@redhat.com>
7599
7600 * c-pragma.c: Adjust include files.
7601 * c-semantics.c: Likewise.
7602
5b8300ea
DD
76032014-10-16 DJ Delorie <dj@redhat.com>
7604
7605 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
7606 multiples of bytes.
7607
5f83e90b
JM
76082014-10-14 Jason Merrill <jason@redhat.com>
7609
7610 PR c++/63455
7611 * c-common.h (CPP_PREPARSED_EXPR): New.
7612 (N_CP_TTYPES): Adjust.
7613
d73326ca
MP
76142014-10-15 Marek Polacek <polacek@redhat.com>
7615
7616 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
7617
78a7c317
DD
76182014-10-14 DJ Delorie <dj@redhat.com>
7619
7620 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
7621 types, not just __int128.
7622 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
7623 types, not just __int128.
7624 (cpp_atomic_builtins): Round pointer sizes up.
7625 (type_suffix): Use type precision, not specific types.
7626 * c-common.c (c_common_reswords): Remove __int128 special case.
7627 (c_common_type_for_size): Check for all __intN types, not just
7628 __int128.
7629 (c_common_type_for_mode): Likewise.
7630 (c_common_signed_or_unsigned_type): Likewise.
7631 (c_build_bitfield_integer_type): Likewise.
7632 (c_common_nodes_and_builtins): Likewise.
7633 (keyword_begins_type_specifier): Likewise.
7634 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
7635 __intN variants.
7636
2a22f99c
TS
76372014-10-12 Trevor Saunders <tsaunders@mozilla.com>
7638
7639 * c-common.c: Use hash_table instead of hashtab.
7640
2a8ef767
ESR
76412014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
7642
adfac8df 7643 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
7644 C++11 section.
7645
3c9aabbd
MG
76462014-10-03 Marc Glisse <marc.glisse@inria.fr>
7647
7648 PR c++/54427
7649 PR c++/57198
7650 PR c++/58845
7651 * c-common.c (warn_logical_operator): Punt for vectors.
7652
a15f7cb8
ESR
76532014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
7654
7655 Implement SD-6: SG10 Feature Test Recommendations
7656 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
7657 macros and the __has_header macro.
7658
8d0cf15e
JM
76592014-09-30 Jason Merrill <jason@redhat.com>
7660
dd5d5481
JM
7661 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
7662 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
7663 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
7664
b752325e
JM
7665 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
7666 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
7667
8d0cf15e
JM
7668 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
7669 * c-common.c (c_common_reswords): Remove __is_convertible_to.
7670
083e891e
MP
76712014-09-24 Marek Polacek <polacek@redhat.com>
7672
7673 PR c/61405
7674 PR c/53874
7675 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
7676
7861b648
AK
76772014-09-23 Andi Kleen <ak@linux.intel.com>
7678
7679 * c-common.c (handle_no_reorder_attribute): New function.
7680 (c_common_attribute_table): Add no_reorder attribute.
7681
9a79452d
JM
76822014-09-22 Joseph Myers <joseph@codesourcery.com>
7683
7684 * c-cppbuiltin.c (c_cpp_builtins): Define
7685 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
7686 modes.
7687
dd69f047
JM
76882014-09-18 Joseph Myers <joseph@codesourcery.com>
7689
7690 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
7691 for supported floating-point modes.
7692
737a4826
MLI
76932014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
7694
7695 * c.opt (Wpsabi): Use LangEnabledBy.
7696 * c-opts.c (c_common_handle_option): Do not handle here.
7697
8cc4b7a2
JM
76982014-09-12 Joseph Myers <joseph@codesourcery.com>
7699
7700 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
7701 macros for floating-point modes.
7702
179b5a55
MG
77032014-09-11 Marc Glisse <marc.glisse@inria.fr>
7704
7705 PR target/58757
7706 * c-cppbuiltin.c (builtin_define_float_constants): Correct
7707 __*_DENORM_MIN__ without denormals.
7708
570a11fe
JJ
77092014-09-10 Jakub Jelinek <jakub@redhat.com>
7710
7711 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
7712 ubsan_instrument_vla, ubsan_instrument_return): Adjust
7713 ubsan_create_data callers.
7714 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
7715 index is constant or BIT_AND_EXPR with constant mask and is
7716 small enough for the bound.
7717 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
7718 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
7719
b559c810
MLI
77202014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7721
7722 * c.opt: Add CppReason to various flags.
7723 (Wdate-time): Re-sort.
7724 * c-common.c: Include c-common.h earlier.
7725 (struct reason_option_codes_t): Delete.
7726 (c_option_controlling_cpp_error): Prefix global type and struct
7727 with cpp_.
7728
1ef33fd4
MLI
77292014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7730
7731 * c.opt (Wnormalized): New.
7732 (Wnormalized=): Use Enum and Reject Negative.
7733 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
7734
66bb34c0
JM
77352014-09-08 Joseph Myers <joseph@codesourcery.com>
7736
7737 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
7738 digits of floating-point modes if -fbuilding-libgcc.
7739
53d68b9f
JM
77402014-09-05 Joseph Myers <joseph@codesourcery.com>
7741
7742 * c-cppbuiltin.c (c_cpp_builtins): Also define
7743 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
7744 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
7745 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
7746 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
7747 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
7748 __LIBGCC_STACK_GROWS_DOWNWARD__,
7749 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
7750 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
7751 __LIBGCC_DWARF_FRAME_REGISTERS__,
7752 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
7753 __LIBGCC_STACK_POINTER_REGNUM__ and
7754 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
7755 (builtin_define_with_value): Handle backslash-escaping in string
7756 macro values.
7757
f65586dc
RB
77582014-09-05 Richard Biener <rguenther@suse.de>
7759
7760 PR middle-end/63148
7761 * c-format.c (check_format_arg): Properly handle
7762 effectively signed POINTER_PLUS_EXPR offset.
7763
2b71f4a4
MLI
77642014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
7765
7766 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
7767 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
7768 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
7769 and Init.
7770 * c-opts.c (c_common_handle_option): Do not handle here.
7771 (sanitize_cpp_opts): Likewise.
7772 * c-common.c (struct reason_option_codes_t): Handle
7773 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
7774
d2e4feca
MP
77752014-09-03 Marek Polacek <polacek@redhat.com>
7776
7777 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
7778
9a771876
JJ
77792014-09-02 Jakub Jelinek <jakub@redhat.com>
7780 Balaji V. Iyer <balaji.v.iyer@intel.com>
7781 Igor Zamyatin <igor.zamyatin@intel.com>
7782
7783 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
7784 * c-common.c (c_common_reswords): Added _Cilk_for.
7785 * c-common.h (enum rid): Added RID_CILK_FOR.
7786 (cilk_for_number_of_iterations): Add declaration.
7787 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
7788 CILK_FOR.
7789 * c-pragma.c (init_pragma): Register "grainsize" pragma.
7790 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
7791
81b5d104
MLI
77922014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7793
7794 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
7795 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
7796 Wundef): Use CPP, Var and Init.
7797 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
7798
b753b37b
MLI
77992014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7800
7801 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
7802 * c-opts.c (c_common_handle_option): Do not handle here.
7803
028aee17
JM
78042014-08-25 Jason Merrill <jason@redhat.com>
7805
7806 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
7807 -std=c++14 and -std=gnu++14, rather than the reverse.
7808 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
7809 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
7810 * c-common.h (cxx_dialect): Remove cxx1y.
7811
e4276ba5
ESR
78122014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
7813
7814 * c-common.h (enum cxx_dialect): Add cxx14.
7815 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
7816 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
7817 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
7818
a545cacd
JM
78192014-08-22 Jason Merrill <jason@redhat.com>
7820
7821 * c.opt (std=gnu++17): Fix alias.
7822
59ea0364
MP
78232014-08-22 Marek Polacek <polacek@redhat.com>
7824
7825 PR c++/62199
7826 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
7827 check for vector types. Drop LHS argument.
7828 * c-common.h (warn_logical_not_parentheses): Adjust.
7829
596e808c
MLI
78302014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
7831
7832 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
7833 (Wmultichar): Likewise.
7834 (Wdate-time): Use C-family languages instead of Common. Use CPP
7835 and Var.
7836 * c-opts.c (c_common_handle_option): Do not handle the above
7837 options here.
7838 (sanitize_cpp_opts): Likewise.
7839
18767f65
MLI
78402014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
7841
7842 PR fortran/44054
7843 * c-opts.c: Include tree-diagnostics.h.
7844 (c_diagnostic_finalizer): New.
7845 (c_common_initialize_diagnostics): Use it.
7846
b4413594
MLI
78472014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
7848
7849 PR preprocessor/51303
7850 * c-common.c (struct reason_option_codes_t option_codes):
7851 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
7852
43f9a13c
MLI
78532014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
7854
7855 PR c/60975
7856 PR c/53063
7857 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
7858 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
7859 (c_common_post_options): Call init_global_opts_from_cpp.
7860 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
7861
04159acf
MP
78622014-08-19 Marek Polacek <polacek@redhat.com>
7863
7864 PR c++/62153
7865 * c-common.c (maybe_warn_bool_compare): New function.
7866 * c-common.h (maybe_warn_bool_compare): Declare.
7867 * c.opt (Wbool-compare): New option.
7868
35aff4fb
MP
78692014-08-19 Marek Polacek <polacek@redhat.com>
7870
7871 * c.opt (Wc99-c11-compat): New option.
7872
177cce46
MP
78732014-08-19 Marek Polacek <polacek@redhat.com>
7874
7875 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
7876 to warn_c90_c99_compat.
7877 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
7878 to -1.
7879
6ae9194f
MLI
78802014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
7881 Steven Bosscher <steven@gcc.gnu.org>
7882
7883 PR c/52952
7884 * c-format.c: Add extra_arg_loc and format_string_loc to struct
7885 format_check_results.
7886 (check_function_format): Use true and add comment for boolean
7887 argument.
7888 (finish_dollar_format_checking): Use explicit location when warning.
7889 (check_format_info): Likewise.
7890 (check_format_arg): Set extra_arg_loc and format_string_loc.
7891 (check_format_info_main): Use explicit location when warning.
7892 (check_format_types): Pass explicit location.
7893 (format_type_warning): Likewise.
7894
8e54f6d3
MLI
78952014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
7896
7897 PR fortran/44054
7898 * c-format.c: Handle Fortran flags.
7899
cd4e76fc
IZ
79002014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
7901
7902 PR other/61962
7903 * array-notation-common.c (find_rank): Added handling for other
7904 types of references.
7905
f3bede71
MP
79062014-08-10 Marek Polacek <polacek@redhat.com>
7907
7908 PR c/51849
7909 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
7910 * c.opt (Wc90-c99-compat): Add option.
7911
9f25a338
TS
79122014-08-07 Trevor Saunders <tsaunders@mozilla.com>
7913
7914 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
7915
62e4eb35
MP
79162014-08-03 Marek Polacek <polacek@redhat.com>
7917
ab20d992 7918 * c-common.c (check_case_value): Add location_t parameter. Use it.
62e4eb35
MP
7919 (c_add_case_label): Pass loc to check_case_value.
7920
b787e7a2
TS
79212014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7922
7923 * cilk.c: Use hash_map instead of pointer_map.
7924
6e2830c3
TS
79252014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7926
7927 * c-gimplify.c: Use hash_set instead of pointer_set.
7928
a7ee52fb
IZ
79292014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
7930
7931 PR middle-end/61455
7932 * array-notation-common.c (extract_array_notation_exprs): Handling
7933 of DECL_EXPR added.
7934
944fa280
JJ
79352014-08-01 Jakub Jelinek <jakub@redhat.com>
7936
7937 * c-common.h (min_align_of_type): Removed prototype.
7938 * c-common.c (min_align_of_type): Removed.
7939 * c-ubsan.h (ubsan_maybe_instrument_reference,
7940 ubsan_maybe_instrument_member_call): New prototypes.
7941 * c-ubsan.c: Include stor-layout.h and builtins.h.
7942 (ubsan_maybe_instrument_reference_or_call,
7943 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
7944 functions.
7945
b4dfdc11
MG
79462014-07-31 Marc Glisse <marc.glisse@inria.fr>
7947
7948 PR c++/60517
7949 * c.opt (-Wreturn-local-addr): Move to common.opt.
7950
a41844e5
JM
79512014-07-30 Jason Merrill <jason@redhat.com>
7952
7953 PR c++/61659
7954 PR c++/61687
7955 Revert:
7956 * c.opt (-fuse-all-virtuals): New.
7957
976d5a22
TT
79582014-07-30 Tom Tromey <tromey@redhat.com>
7959
7960 PR c/59855
7961 * c.opt (Wdesignated-init): New option.
7962 * c-common.c (c_common_attribute_table): Add "designated_init".
7963 (handle_designated_init): New function.
7964
cdc94aca
MP
79652014-07-24 Marek Polacek <polacek@redhat.com>
7966
7967 PR c/57653
7968 * c-opts.c (c_finish_options): If -imacros is in effect, return.
7969
f41373b6
DS
79702014-07-16 Dodji Seketeli <dodji@redhat.com>
7971
7972 PR preprocessor/60723 - missing system-ness marks for macro tokens
7973 * c-ppoutput.c (struct print::prev_was_system_token): New data
7974 member.
7975 (init_pp_output): Initialize it.
7976 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
7977 (do_line_change): Return a flag saying if a line marker was
7978 emitted or not.
7979 (scan_translation_unit): Detect if the system-ness of the token we
7980 are about to emit is different from the one of the previously
7981 emitted token. If so, emit a line marker. Avoid emitting useless
7982 adjacent line markers. Avoid emitting line markers for tokens
7983 originating from the expansion of built-in macros.
7984 (scan_translation_unit_directives_only): Adjust.
7985
4d661eaa
MP
79862014-07-15 Marek Polacek <polacek@redhat.com>
7987
7988 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
7989 TYPE_MAX_VALUE is NULL.
7990
b108f48f
JJ
79912014-07-14 Jakub Jelinek <jakub@redhat.com>
7992
7993 PR middle-end/61294
7994 * c.opt (Wmemset-transposed-args): New warning.
7995
c0221884
JM
79962014-07-10 Jason Merrill <jason@redhat.com>
7997
7998 PR c++/61659
7999 PR c++/61687
8000 * c.opt (-fuse-all-virtuals): New.
8001
63dfbb95
RB
80022014-07-09 Richard Biener <rguenther@suse.de>
8003
8004 PR c-family/61741
8005 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
8006 using unsigned arithmetic if overflow does not wrap instead of
8007 if overflow is undefined.
8008
773ec47f
MP
80092014-07-06 Marek Polacek <polacek@redhat.com>
8010
8011 PR c/6940
8012 * c.opt (Wsizeof-array-argument): New option.
8013
00a7ba58
JJ
80142014-07-03 Jakub Jelinek <jakub@redhat.com>
8015
b1726d6c 8016 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
8017 comments->count <= 1, as comments->entries might be NULL.
8018
52ec0ea3
MP
80192014-07-01 Marek Polacek <polacek@redhat.com>
8020
8021 * c.opt (Wint-conversion): New option.
8022
d5c3d343
MP
80232014-07-01 Marek Polacek <polacek@redhat.com>
8024
8025 PR c/58286
8026 * c.opt (Wincompatible-pointer-types): New option.
8027
6e7ceb17
PC
80282014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
8029
8030 PR c++/51400
8031 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
8032 Do not discard TYPE_QUALS of type.
8033
da73100b
JM
80342014-06-26 Jason Merrill <jason@redhat.com>
8035
8036 * c-common.h (enum cxx_dialect): Add cxx1z.
8037 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
8038 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
8039
08eedf75
TJ
80402014-06-26 Teresa Johnson <tejohnson@google.com>
8041
8042 * c-common.h (get_dump_info): Declare.
8043 * c-gimplify.c (c_genericize): Use saved dump files.
8044 * c-opts.c (c_common_parse_file): Begin and end dumps
8045 once around parsing invocation.
8046 (get_dump_info): New function.
8047
7b56b2f8
MP
80482014-06-23 Marek Polacek <polacek@redhat.com>
8049 Andrew MacLeod <amacleod@redhat.com>
8050
8051 PR c/61553
8052 * c-common.c (get_atomic_generic_size): Don't segfault if the
8053 type doesn't have a size.
8054
0e37a2f3
MP
80552014-06-20 Marek Polacek <polacek@redhat.com>
8056
8057 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
8058 (ubsan_walk_array_refs_r): New function.
8059 (c_genericize): Instrument array bounds.
8060 * c-ubsan.c: Include "internal-fn.h".
8061 (ubsan_instrument_division): Mark instrumented arrays as having
8062 side effects. Adjust ubsan_type_descriptor call.
8063 (ubsan_instrument_shift): Likewise.
8064 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
8065 (ubsan_instrument_bounds): New function.
8066 (ubsan_array_ref_instrumented_p): New function.
8067 (ubsan_maybe_instrument_array_ref): New function.
8068 * c-ubsan.h (ubsan_instrument_bounds): Declare.
8069 (ubsan_array_ref_instrumented_p): Declare.
8070 (ubsan_maybe_instrument_array_ref): Declare.
8071
80722014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
8073
8074 PR lto/61123
8075 * c.opt (fshort-enums): Add to LTO.
8076 * c.opt (fshort-wchar): Likewise.
8077
5c3d09f7
MP
80782014-06-16 Marek Polacek <polacek@redhat.com>
8079
8080 PR c/60439
8081 * c.opt (Wswitch-bool): Add Var.
8082
9cf32741
JJ
80832014-06-12 Jakub Jelinek <jakub@redhat.com>
8084
8085 PR middle-end/61486
8086 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
8087 #pragma omp target teams or
8088 #pragma omp {,target }teams distribute simd.
8089
62984918
JM
80902014-06-12 Jason Merrill <jason@redhat.com>
8091
8092 * c.opt (Wabi=, fabi-compat-version): New.
8093 * c-opts.c (c_common_handle_option): Handle -Wabi=.
8094 (c_common_post_options): Handle flag_abi_compat_version default.
8095 Disallow -fabi-compat-version=1.
8096 * c-common.h (abi_version_crosses): New.
8097
f961457f
JH
80982014-06-11 Jan Hubicka <hubicka@ucw.cz>
8099
adfac8df 8100 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
8101 section names that are no longer trees.
8102
92d28cbb
JJ
81032014-06-10 Jakub Jelinek <jakub@redhat.com>
8104
8105 PR fortran/60928
8106 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
8107 (omp_pragmas): ... back here.
8108
742938c9
MP
81092014-06-05 Marek Polacek <polacek@redhat.com>
8110
8111 PR c/49706
8112 * c-common.c (warn_logical_not_parentheses): New function.
8113 * c-common.h (warn_logical_not_parentheses): Declare.
8114 * c.opt (Wlogical-not-parentheses): New option.
8115
9d548dfb
MP
81162014-06-04 Marek Polacek <polacek@redhat.com>
8117
8118 PR c/30020
8119 * c-common.c (check_case_bounds): Add location parameter.
8120 Use it.
8121 (c_add_case_label): Pass loc to check_case_bounds.
8122
fedfecef
MP
81232014-06-03 Marek Polacek <polacek@redhat.com>
8124
8125 PR c/60439
8126 * c.opt (Wswitch-bool): New option.
8127
f6a7cffc
TS
81282014-05-22 Thomas Schwinge <thomas@codesourcery.com>
8129
040d18b6
TS
8130 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
8131 Remove prototypes.
8132 (record_types_used_by_current_var_decl): Move prototype to where
8133 it belongs.
8134
f6a7cffc
TS
8135 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
8136 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
8137 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
8138
632f2871
RS
81392014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
8140
8141 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
8142 * c-common.c (c_common_nodes_and_builtins): Don't initialize
8143 void_zero_node.
8144 * c-pretty-print.c (pp_c_void_constant): New function.
8145 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
8146 (c_pretty_printer::expression): Handle VOID_CST.
8147 * cilk.c (extract_free_variables): Likewise.
8148 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
8149 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
8150
766090c2
TS
81512014-05-17 Trevor Saunders <tsaunders@mozilla.com>
8152
8153 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
8154 * c-pragma.c (push_alignment): Adjust.
8155 (handle_pragma_push_options): Likewise.
8156
661a0813
MP
81572014-05-09 Marek Polacek <polacek@redhat.com>
8158
8159 PR c/50459
8160 * c-common.c (check_user_alignment): Return -1 if alignment is error
8161 node.
8162 (handle_aligned_attribute): Don't call default_conversion on
8163 FUNCTION_DECLs.
8164 (handle_vector_size_attribute): Likewise.
8165 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
8166 (handle_sentinel_attribute): Call default_conversion and allow even
8167 integral types as an argument.
8168
2793eeab
MP
81692014-05-08 Marek Polacek <polacek@redhat.com>
8170
8171 PR c/61053
8172 * c-common.c (min_align_of_type): New function factored out from...
8173 (c_sizeof_or_alignof_type): ...here.
8174 * c-common.h (min_align_of_type): Declare.
8175
f827930a
MP
81762014-05-08 Marek Polacek <polacek@redhat.com>
8177
8178 PR c/61077
8179 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
8180 parameter type of main.
8181
ca49b74e
DD
81822014-05-07 DJ Delorie <dj@redhat.com>
8183
8184 * c-cppbuiltin.c (print_bits_of_hex): New.
8185 (builtin_define_type_minmax): Print values using hex so as not to
8186 require a pre-computed list of string values.
8187
1d60af08
KZ
81882014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
8189 Mike Stump <mikestump@comcast.net>
8190 Richard Sandiford <rdsandiford@googlemail.com>
8191
8192 * c-ada-spec.c: Include wide-int.h.
8193 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
8194 (dump_generic_ada_node): Use wide-int interfaces.
8195 * c-common.c: Include wide-int-print.h.
8196 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
8197 (pointer_int_sum): Use wide-int interfaces.
8198 (c_common_nodes_and_builtins): Use make_int_cst.
8199 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
8200 (handle_alloc_size_attribute): Use wide-int interfaces.
8201 (get_nonnull_operand): Likewise.
8202 * c-format.c (get_constant): Use tree_fits_uhwi_p.
8203 * c-lex.c: Include wide-int.h.
8204 (narrowest_unsigned_type): Take a widest_int rather than two
8205 HOST_WIDE_INTs.
8206 (narrowest_signed_type): Likewise.
8207 (interpret_integer): Update accordingly. Use wide-int interfaces.
8208 (lex_charconst): Use wide-int interfaces.
8209 * c-pretty-print.c: Include wide-int.h.
8210 (pp_c_integer_constant): Use wide-int interfaces.
8211 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
8212 INT_CST_LT_UNSIGNED.
8213
b15458be
RB
82142014-05-06 Richard Biener <rguenther@suse.de>
8215
8216 * c-opts.c (c_common_post_options): For -freestanding,
8217 -fno-hosted and -fno-builtin disable pattern recognition
8218 if not enabled explicitely.
8219
6577374e
MP
82202014-05-02 Marek Polacek <polacek@redhat.com>
8221
8222 * c.opt (Wsizeof-pointer-memaccess): Describe option.
8223
d00887e8
MP
82242014-05-01 Marek Polacek <polacek@redhat.com>
8225
8226 PR c/43245
8227 * c.opt (Wdiscarded-qualifiers): Add.
8228
f8ed5150
MP
82292014-04-30 Marek Polacek <polacek@redhat.com>
8230
8231 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
8232 INT_MIN / -1 sanitization only for integer types.
8233
45484dcf
MP
82342014-04-25 Marek Polacek <polacek@redhat.com>
8235
8236 PR c/18079
8237 * c-common.c (handle_noinline_attribute): Warn if the attribute
8238 conflicts with always_inline attribute.
8239 (handle_always_inline_attribute): Warn if the attribute conflicts
8240 with noinline attribute.
8241
38e514c0
MP
82422014-04-25 Marek Polacek <polacek@redhat.com>
8243
8244 PR c/60156
8245 * c-common.c (check_main_parameter_types): Warn about variadic main.
8246
44875f92
MS
82472014-04-24 Mike Stump <mikestump@comcast.net>
8248
8249 * c.opt (Wshadow-ivar): Default to on.
8250
dcaaa5a0
DP
82512014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
8252
8253 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
8254
c07d7c02
MP
82552014-04-23 Marek Polacek <polacek@redhat.com>
8256
8257 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
8258
1c33c9b7
JJ
82592014-04-22 Jakub Jelinek <jakub@redhat.com>
8260
8261 PR sanitizer/60275
8262 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
8263 if flag_sanitize_undefined_trap_on_error.
8264 (ubsan_instrument_division, ubsan_instrument_shift,
8265 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
8266 if !flag_sanitize_recover.
8267
793c625f
MG
82682014-04-22 Marc Glisse <marc.glisse@inria.fr>
8269
8270 PR libstdc++/43622
8271 * c-common.c (registered_builtin_types): Make non-static.
8272 * c-common.h (registered_builtin_types): Declare.
8273
b0f1bf36 82742014-04-14 Richard Biener <rguenther@suse.de>
ab20d992 8275 Marc Glisse <marc.glisse@inria.fr>
b0f1bf36
RB
8276
8277 PR c/60819
8278 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
8279 apply may-alias the scalar pointer type when applicable.
8280
3b07fa4a
IZ
82812014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
8282
8283 PR middle-end/60467
8284 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
8285 as possible argument for Cilk_spawn.
8286
cbbd2b1c
TB
82872014-04-11 Tobias Burnus <burnus@net-b.de>
8288
8289 PR c/60194
8290 * c.opt (Wformat-signedness): Add
8291 * c-format.c(check_format_types): Use it.
8292
6415bd5d
JM
82932014-04-11 Jason Merrill <jason@redhat.com>
8294
8295 PR c++/57926
8296 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
8297 default_conversion for an array argument.
8298
6525783a
MP
82992014-04-08 Marek Polacek <polacek@redhat.com>
8300
8301 PR sanitizer/60745
8302 * c-ubsan.c: Include asan.h.
8303 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
8304
880a467b
NS
83052014-04-03 Nathan Sidwell <nathan@codesourcery.com>
8306
8307 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
8308
7b59ff2d
MP
83092014-04-02 Marek Polacek <polacek@redhat.com>
8310
8311 * c-common.h (c_expand_expr): Remove declaration.
8312
8edbfaa6
JJ
83132014-03-28 Jakub Jelinek <jakub@redhat.com>
8314
8315 PR c++/60689
8316 * c-common.c (add_atomic_size_parameter): When creating new
8317 params vector, push the size argument first.
8318
07d72e1d
JJ
83192014-03-26 Jakub Jelinek <jakub@redhat.com>
8320
8321 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8322 ubsan_instrument_vla, ubsan_instrument_return): Adjust
8323 ubsan_create_data callers.
8324
b35e0fa0
JJ
83252014-03-22 Jakub Jelinek <jakub@redhat.com>
8326
8327 PR debug/60603
8328 * c-opts.c (c_finish_options): Restore cb_file_change call to
8329 <built-in>.
8330
39a1ebb3
JJ
83312014-03-13 Jakub Jelinek <jakub@redhat.com>
8332
8333 PR middle-end/36282
8334 * c-pragma.c (apply_pragma_weak): Only look at
8335 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
8336 DECL_ASSEMBLER_NAME_SET_P (decl).
8337 (maybe_apply_pending_pragma_weaks): Exit early if
8338 vec_safe_is_empty (pending_weaks) rather than only when
8339 !pending_weaks.
8340 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
8341 set assembler name back to NULL afterwards.
8342
a07f6ed2
JM
83432014-03-11 Jason Merrill <jason@redhat.com>
8344
8345 * c.opt: Add -std=gnu++14.
8346
75b107f5
IB
83472014-03-11 Ian Bolton <ian.bolton@arm.com>
8348
8349 * c-opts.c (c_common_post_options): Don't override
8350 -ffp-contract=fast if unsafe-math-optimizations is on.
8351
f42c637e
PM
83522014-03-08 Paulo Matos <paulo@matos-sorge.com>
8353
22b15758 8354 * c.opt: Enable LTO FE for fshort-double.
f42c637e 8355
70e24808
JM
83562014-03-07 Jason Merrill <jason@redhat.com>
8357
8358 * c.opt: Add -std=c++14.
8359
3af9c5e9
MP
83602014-03-06 Marek Polacek <polacek@redhat.com>
8361
8362 PR c/60197
8363 * cilk.c (contains_cilk_spawn_stmt): New function.
8364 (contains_cilk_spawn_stmt_walker): Likewise.
8365 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
8366 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
8367
b3bdf019
JJ
83682014-03-03 Jakub Jelinek <jakub@redhat.com>
8369
8370 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
8371 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
8372 even when flag_preprocess_only.
8373
ca7e759d
JM
83742014-02-26 Jason Merrill <jason@redhat.com>
8375
8376 PR c++/59231
8377 PR c++/11586
8378 * c-common.c (shorten_compare): Don't check
8379 c_inhibit_evaluation_warnings.
8380
28e41874
JJ
83812014-02-19 Jakub Jelinek <jakub@redhat.com>
8382
cca615af
JJ
8383 PR c/37743
8384 * c-common.c (c_common_nodes_and_builtins): When initializing
8385 c_uint{16,32,64}_type_node, also set corresponding
8386 uint{16,32,64}_type_node to the same value.
8387
28e41874
JJ
8388 PR c++/60267
8389 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
8390 for PRAGMA_IVDEP if flag_preprocess_only.
8391
c2bf53a1
JJ
83922014-02-12 Jakub Jelinek <jakub@redhat.com>
8393
8394 PR c/60101
8395 * c-common.c (merge_tlist): If copy is true, call new_tlist,
8396 if false, add ADD itself, rather than vice versa.
8397 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
8398 copy. For SAVE_EXPR, only call merge_tlist once.
8399
8fcbce72
JJ
84002014-02-08 Jakub Jelinek <jakub@redhat.com>
8401
8402 PR middle-end/60092
8403 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
8404 and tree_to_uhwi.
8405 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
8406 functions.
8407 (c_common_attribute_table): Add alloc_align and assume_aligned
8408 attributes.
8409
0a756a3f
MP
84102014-02-06 Marek Polacek <polacek@redhat.com>
8411
8412 PR c/60087
8413 * c-common.c (warn_for_sign_compare): Call warning_at with location
8414 instead of warning.
8415
7ec4847a
MP
84162014-02-05 Marek Polacek <polacek@redhat.com>
8417
8418 PR c/53123
8419 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
8420 statement.
8421
66f20604
MP
84222014-02-04 Marek Polacek <polacek@redhat.com>
8423
8424 PR c/60036
8425 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
8426 SAVE_EXPR.
8427
5d77fb19
MG
84282014-02-03 Marc Glisse <marc.glisse@inria.fr>
8429
8430 PR c++/53017
8431 PR c++/59211
8432 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
8433 handle_vector_size_attribute, handle_nonnull_attribute): Call
8434 default_conversion on the attribute argument.
8435 (handle_nonnull_attribute): Increment the argument number.
8436
81e5eca8
MP
84372014-01-31 Marek Polacek <polacek@redhat.com>
8438
8439 PR c/59963
8440 * c-common.c (add_atomic_size_parameter): Pass vNULL to
8441 build_function_call_vec.
8442 (resolve_overloaded_builtin): Likewise.
8443 * c-common.h (build_function_call_vec): Adjust declaration.
8444
68fca595
MP
84452014-01-30 Marek Polacek <polacek@redhat.com>
8446
8447 PR c/59940
8448 * c-common.h (unsafe_conversion_p): Adjust declaration.
8449 (warnings_for_convert_and_check): Likewise.
8450 (convert_and_check): Likewise.
8451 * c-common.c (unsafe_conversion_p): Add location parameter. Call
8452 expansion_point_location_if_in_system_header on it.
8453 (warnings_for_convert_and_check): Add location parameter. Call
8454 expansion_point_location_if_in_system_header on it. Use it.
8455 (convert_and_check): Add location parameter. Use it.
8456 (conversion_warning): Likewise.
8457 (c_add_case_label): Adjust convert_and_check calls.
8458 (scalar_to_vector): Adjust unsafe_conversion_p calls.
8459
b72271b9
BI
84602014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
8461
8462 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
8463 flag_cilkplus.
8464 * c-pragma.c (init_pragma): Likewise.
8465 * c.opt: Likewise.
8466
393e8e8b
MP
84672014-01-23 Marek Polacek <polacek@redhat.com>
8468
8469 PR c/59846
8470 * c-common.c (shorten_compare): Add location_t parameter.
8471 * c-common.h (shorten_binary_op): Adjust declaration.
8472
f04dda30
MP
84732014-01-23 Marek Polacek <polacek@redhat.com>
8474
8475 PR c/58346
8476 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
8477 * c-common.h: Declare it.
8478
621955cb
EB
84792014-01-20 Eric Botcazou <ebotcazou@adacore.com>
8480
8481 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
8482 * c-ada-spec.c (dump_ads): Likewise.
8483 (cpp_check): Likewise.
8484 (dump_ada_specs): Likewise.
8485
84862014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
8487
8488 PR c++/49718
8489 * c-common.c (handle_no_instrument_function_attribute): Allow
8490 no_instrument_function attribute in class member
8491 definition/declaration.
8492
241f845a
JJ
84932014-01-15 Jakub Jelinek <jakub@redhat.com>
8494
8495 PR c/58943
8496 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
8497 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
8498 being COMPOUND_EXPR.
8499 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
8500 operand a SAVE_EXPR and second MODIFY_EXPR.
8501
e83b8e2e
JJ
85022014-01-09 Jakub Jelinek <jakub@redhat.com>
8503
8504 PR target/58115
8505 * c-pch.c (c_common_write_pch): Call
8506 prepare_target_option_nodes_for_pch.
8507
23a5b65a
RS
85082014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8509
8510 Update copyright years
8511
f9030485
RS
85122014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
8513
8514 * array-notation-common.c, c-cilkplus.c: Use the standard form for
8515 the copyright notice.
8516
f2aa696b
EB
85172013-12-28 Eric Botcazou <ebotcazou@adacore.com>
8518
8519 * c-ada-spec.c (print_constructor): New function.
8520 (print_destructor): Retrieve the origin of the destructor.
8521 (print_ada_declaration): Revamp handling of constructors/destructors.
8522
3f8257db 85232013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
8524 Bill Maddox <maddox@google.com>
8525 Jason Merrill <jason@redhat.com>
8526
8527 * c.opt: Add -fdeclone-ctor-dtor.
8528 * c-opts.c (c_common_post_options): Default to on iff -Os.
8529
41958c28
BI
85302013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
8531
8532 * c-common.c (c_common_attribute_table): Added "cilk simd function"
8533 attribute.
8534 * c-pragma.h (enum pragma_cilk_clause): Remove.
ab20d992 8535 (enum pragma_omp_clause): Added the following fields:
41958c28
BI
8536 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
8537 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
8538 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
8539 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
8540 PRAGMA_CILK_CLAUSE_UNIFORM.
8541
b1726d6c 8542
12893402
BI
85432013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
8544
8545 * cilk.c (cilk_outline): Made this function non-static.
8546 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
8547 (create_cilk_wrapper): Added a new parameter: a function pointer.
8548 (c_install_body_w_frame_cleanup): Remove
8549 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
8550 * c-common.h (cilk_outline): New prototype.
8551 (gimplify_cilk_spawn): Removed two parameters.
8552 (cilk_install_body_with_frame_cleanup): New prototype.
8553 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
8554 CILK_SPAWN_STMT case.
8555
085b42ed
BS
85562013-12-11 Bernd Schmidt <bernds@codesourcery.com>
8557
2ce064c3
BS
8558 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
8559
085b42ed
BS
8560 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
8561 (int_array_type_node): Remove.
8562 * c-common.c (c_common_nodes_and_builtins): Don't build it.
8563
9e36c9ed
MP
85642013-12-05 Marek Polacek <polacek@redhat.com>
8565
8566 PR c/52023
8567 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
8568 [ADJUST_FIELD_ALIGN].
8569
296674db
JM
85702013-12-04 Joseph Myers <joseph@codesourcery.com>
8571
8572 PR c/52023
8573 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
8574 and check field alignment if set.
8575 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
8576 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
8577
b1726d6c 85782013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
8579 Marek Polacek <polacek@redhat.com>
8580
8581 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
8582 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
8583
d7947e19
L
85842013-11-29 H.J. Lu <hongjiu.lu@intel.com>
8585
8586 PR c/59309
8587 * cilk.c (gimplify_cilk_spawn): Properly handle function without
8588 arguments.
8589
fad7652e
JJ
85902013-11-29 Jakub Jelinek <jakub@redhat.com>
8591
8592 PR c/59280
8593 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
8594 goto invalid. If it is error_mark_node, don't issue further
8595 diagnostics.
8596
8b5e1202
SO
85972013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
8598
8599 * c.opt (Wopenmp-simd): New.
8600
0a508bb6
JJ
86012013-11-22 Jakub Jelinek <jakub@redhat.com>
8602
8603 * c-ubsan.h (ubsan_instrument_return): New prototype.
8604 * c-ubsan.c (ubsan_instrument_return): New function.
8605
2fb9a547
AM
86062013-11-22 Andrew MacLeod <amacleod@redhat.com>
8607
8608 * c-common.c: Add required include files from gimple.h.
ab20d992
JJ
8609 * c-gimplify.c: Likewise.
8610 * cilk.c: Likewise.
2fb9a547 8611
8400e75e
DM
86122013-11-22 David Malcolm <dmalcolm@redhat.com>
8613
8614 * c-common.c (unsafe_conversion_p): Remove use of
8615 EXPR_LOC_OR_HERE macro.
8616 (conversion_warning): Likewise.
8617 (warnings_for_convert_and_check): Likewise.
8618 (warn_for_collisions_1): Likewise.
8619 (shorten_compare): Likewise, and remove use of in_system_header
8620 macro, using the location from the former.
8621 * c-lex.c (dump_one_header): Remove use of input_filename macro.
8622 (cb_def_pragma): Remove use of in_system_header macro.
8623 (lex_string): Likewise.
8624 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
8625
eb1ce453
KZ
86262013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
8627 Mike Stump <mikestump@comcast.net>
8628 Richard Sandiford <rdsandiford@googlemail.com>
8629
8630 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
8631 instead of TREE_INT_CST_LOW, in cases where there is a protecting
8632 tree_fits_shwi_p or tree_fits_uhwi_p.
8633 (dump_generic_ada_node): Likewise.
8634 * c-format.c (check_format_arg): Likewise.
8635 * c-pretty-print.c (pp_c_integer_constant): Likewise.
8636
6b3b8c27
KZ
86372013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
8638
8639 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
8640
49b0aa18
JC
86412013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
8642
8643 PR c/53001
8644 * c-common.c (unsafe_conversion_p): Make this function
8645 return an enumeration with more detail.
8646 (conversion_warning): Use the new return type of
8647 unsafe_conversion_p to separately warn either about conversions
8648 that lower floating point number precision or about the other
8649 kinds of conversions.
8650 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
8651 (unsafe_conversion_p): switching return type to
8652 conversion_safety enumeration.
49b0aa18
JC
8653 * c.opt: Adding new warning -Wfloat-conversion and
8654 enabling it with -Wconversion.
8655
b826515a
BS
86562013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
8657
8e745a17
JJ
8658 * c-opts.c: Include plugin.h.
8659 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 8660
b9a55b13
MP
86612013-11-19 Marek Polacek <polacek@redhat.com>
8662
8663 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
8664 call.
8665 (ubsan_instrument_shift): Likewise.
8666 (ubsan_instrument_vla): Likewise.
8667
7d362f6c
RS
86682013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8669
8670 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
8671 cast to unsigned type.
8672
386b1f1f
RS
86732013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8674
8675 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
8676 tree_low_cst.
8677 (complete_array_type): Update comment to refer to tree_to_[su]hwi
8678 rather than tree_low_cst.
8679
ae7e9ddd
RS
86802013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8681
8682 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
8683 tree_to_uhwi throughout.
8684
9439e9a1
RS
86852013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8686
8687 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
8688 tree_low_cst (..., 0) with tree_to_shwi throughout.
8689
cc269bb6
RS
86902013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8691
8692 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
8693 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
8694
9541ffee
RS
86952013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
8696
8697 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
8698 host_integerp (..., 0) with tree_fits_shwi_p throughout.
8699
c02065fc
AH
87002013-11-15 Aldy Hernandez <aldyh@redhat.com>
8701
8702 * c-cilkplus.c: New file.
8703 * c-common.c (readonly_error): Add location argument.
8704 * c-common.h (readonly_error): Same.
8705 (c_finish_cilk_clauses): Protoize.
8706 (c_check_cilk_loop): Same.
8707 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
8708 Do not fail on error_mark_node.
8709 Abstract increment canonicalization to here...
8710 (c_omp_for_incr_canonicalize_ptr): New.
8711 c-pragma.c (init_pragma): Register "simd" pragma.
8712 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
8713 (enum pragma_cilk_clause): New.
8714
9cc65f15
RS
87152013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
8716
8717 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
8718 wchar_type and host_integerp checks.
8719
18f429e2
AM
87202013-11-14 Andrew MacLeod <amacleod@redhat.com>
8721
8722 * c-common.c: Likewise.
8723 * c-gimplify.c: Likewise.
8724 * cilk.c: Likewise.
8725
d8a2d370
DN
87262013-11-14 Diego Novillo <dnovillo@google.com>
8727
8728 * c-common.c: Include fold-const.h.
8729 Include stor-layout.h.
8730 Include calls.h.
8731 Include stringpool.h.
8732 Include attribs.h.
8733 Include varasm.h.
8734 Include trans-mem.h.
8735 * c-cppbuiltin.c: Include stor-layout.h.
8736 Include stringpool.h.
8737 * c-format.c: Include stringpool.h.
8738 * c-lex.c: Include stringpool.h.
8739 Include stor-layout.h.
8740 * c-pragma.c: Include stringpool.h.
8741 Include attribs.h.
8742 Include varasm.h.
8743 Include gcc-symtab.h.
8744 * c-pretty-print.c: Include stor-layout.h.
8745 Include attribs.h.
8746 * cilk.c: Include stringpool.h.
8747 Include calls.h.
8748
38b7bc7f
JM
87492013-11-13 Joseph Myers <joseph@codesourcery.com>
8750
8751 * c-common.h (enum rid): Add RID_AUTO_TYPE.
8752 * c-common.c (c_common_reswords): Add __auto_type.
8753 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
8754
45b0be94
AM
87552013-11-12 Andrew MacLeod <amacleod@redhat.com>
8756
18f429e2
AM
8757 * c-common.c: Include gimplify.h.
8758 * c-gimplify.c: Likewise.
8759 * cilk.c: Likewise.
8760 * c-omp.c: Include gimple-expr.h instead of gimple.h.
8761 * c-ubsan.c: Don't include gimple.h.
45b0be94 8762
582d9b50
JM
87632013-11-12 Joseph Myers <joseph@codesourcery.com>
8764
8765 * c-common.c (c_common_reswords): Add _Thread_local.
8766
6b28e197
JM
87672013-11-09 Joseph Myers <joseph@codesourcery.com>
8768
8769 * c-common.c (atomic_size_supported_p): New function.
8770 (resolve_overloaded_atomic_exchange)
8771 (resolve_overloaded_atomic_compare_exchange)
8772 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
8773 Use it instead of comparing size with a local list of sizes.
8774
267bac10
JM
87752013-11-07 Andrew MacLeod <amacleod@redhat.com>
8776 Joseph Myers <joseph@codesourcery.com>
8777
8778 * c-common.h (enum rid): Add RID_ATOMIC.
8779 * c-common.c (c_common_reswords): Add _Atomic.
8780 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
8781 (keyword_is_type_qualifier): Accept RID_ATOMIC.
8782 * c-format.c (check_format_types): Check for extra _Atomic
8783 qualifiers in format argument.
8784 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
8785 (pp_c_type_qualifier_list): Mention _Atomic in comment.
8786
5157b91e
TB
87872013-11-06 Tobias Burnus <burnus@net-b.de>
8788
8789 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
8790
6dbe0958
JM
87912013-11-06 Joseph Myers <joseph@codesourcery.com>
8792
8793 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
8794 standards modes.
8795 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
8796 to mean lack of IEEE 754 support.
8797
e8ff5196
TB
87982013-11-05 Tobias Burnus <burnus@net-b.de>
8799
8800 * c.opt (-Wdate-time): New option
8801 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
8802
254a0760
JM
88032013-11-05 Joseph Myers <joseph@codesourcery.com>
8804
8805 * c-cppbuiltin.c (cpp_iec_559_value): Test
8806 flag_excess_precision_cmdline not flag_excess_precision.
8807
6d7f7e0a
TB
88082013-11-05 Tobias Burnus <burnus@net-b.de>
8809
8810 * c.opt (fopenmp-simd): New option.
8811 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
8812 (omp_pragmas): ... this new struct.
8813 (c_pp_lookup_pragma): Also walk omp_pragmas.
8814 (init_pragma): Init pragmas for -fopenmp-simd.
8815
55a7f02f
MP
88162013-11-04 Marek Polacek <polacek@redhat.com>
8817
8818 PR c++/58979
8819 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
8820
9193fb05
JM
88212013-11-04 Joseph Myers <joseph@codesourcery.com>
8822
8823 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
8824 New functions.
8825 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
8826
94159ecf
EB
88272013-11-04 Eric Botcazou <ebotcazou@adacore.com>
8828
8829 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
8830 (dump_ada_specs): Adjust prototype of second callback.
8831 * c-ada-spec.c (cpp_check): New global variable.
8832 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
8833 (print_generic_ada_decl): Likewise.
8834 (has_static_fields): Change return type to bool and add guard.
8835 (has_nontrivial_methods): New predicate.
8836 (is_tagged_type): Change return type to bool.
8837 (separate_class_package): Call has_nontrivial_methods.
8838 (pp_ada_tree_identifier): Minor tweaks.
8839 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
8840 (dump_ada_array_domains): Likewise.
8841 (dump_ada_array_type): Likewise.
8842 (dump_template_types): Remove cpp_check parameter and do not pass it to
8843 dump_generic_ada_node.
8844 (dump_ada_template): Likewise.
8845 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
8846 recursively.
8847 (print_ada_methods): Change return type to integer. Remove cpp_check
8848 parameter and do not pass it down.
8849 (dump_nested_types): Remove cpp_check parameter and do not pass it to
8850 dump_generic_ada_node.
8851 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
8852 accessing methods.
8853 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
8854 down. Use has_nontrivial_methods to recognize C++ classes. Use return
8855 value of print_ada_methods.
8856 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
8857 Set cpp_check to it before invoking dump_ada_nodes.
8858 (dump_ada_specs): Likewise.
8859
b906f4ca
MP
88602013-11-03 Marek Polacek <polacek@redhat.com>
8861
8862 * c-ubsan.c: Don't include hash-table.h.
8863 (ubsan_instrument_vla): New function.
8864 * c-ubsan.h: Declare it.
8865
5e20cdc9
DM
88662013-10-31 David Malcolm <dmalcolm@redhat.com>
8867
8868 Automated part of renaming of symtab_node_base to symtab_node.
8869
8870 Patch autogenerated by rename_symtab.py from
8871 https://github.com/davidmalcolm/gcc-refactoring-scripts
8872 revision 58bb219cc090b2f4516a9297d868c245495ee622
8873
8874 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
8875 symtab_node_base to symtab_node.
8876
7057e645
ESR
88772013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
8878
8e745a17 8879 Implement C++14 digit separators.
7057e645
ESR
8880 * c-lex.c (interpret_float): Remove digit separators from scratch string
8881 before building real literal.
8882
193ea7bc
JJ
88832013-10-30 Jakub Jelinek <jakub@redhat.com>
8884
8885 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
8886
939b37da
BI
88872013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
8888
8889 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
8890 fields.
8891 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
8892 enabled.
8893 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
8894 (insert_cilk_frame): New prototype.
8895 (cilk_init_builtins): Likewise.
8896 (gimplify_cilk_spawn): Likewise.
8897 (c_cilk_install_body_w_frame_cleanup): Likewise.
8898 (cilk_detect_spawn_and_unwrap): Likewise.
8899 (cilk_set_spawn_marker): Likewise.
8900 (build_cilk_sync): Likewise.
8901 (build_cilk_spawn): Likewise.
8902 * cilk.c: New file.
8903
67348ccc
DM
89042013-10-29 David Malcolm <dmalcolm@redhat.com>
8905
8906 Patch autogenerated by refactor_symtab.py from
8907 https://github.com/davidmalcolm/gcc-refactoring-scripts
8908 revision 58bb219cc090b2f4516a9297d868c245495ee622
8909
8910 * c-gimplify.c (c_genericize): Update for conversion of symtab types
8911 to a true class hierarchy.
8912 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
8913
d570872d
RS
89142013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
8915
8916 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
8917
98906124
JL
89182013-10-26 Jeff Law <law@redhat.com>
8919
adfac8df
JJ
8920 * c-common.c (c_define_builtins): Remove mudflap support.
8921 * c.opt: Ignore and warn for mudflap options.
98906124 8922
d73749df 89232013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
8924
8925 PR other/33426
8926 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
8927 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
8928
3f04b1bb
JM
89292013-10-23 Jason Merrill <jason@redhat.com>
8930
8931 * c-format.c (gcc_cxxdiag_char_table): Add %X.
8932
acf0174b
JJ
89332013-10-11 Jakub Jelinek <jakub@redhat.com>
8934
acd15a28
JJ
8935 * c-common.h (omp_clause_mask::operator !=): New method.
8936 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
8937 instead of if (mask & something) tests everywhere.
8938
acf0174b
JJ
8939 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
8940 201307 instead of 201107.
8941 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
8942 (c_common_attribute_table): Add "omp declare target" and
8943 "omp declare simd" attributes.
8944 (handle_omp_declare_target_attribute,
8945 handle_omp_declare_simd_attribute): New functions.
8946 * c-omp.c: Include c-pragma.h.
8947 (c_finish_omp_taskgroup): New function.
8948 (c_finish_omp_atomic): Add swapped argument, if true,
8949 build the operation first with rhs, lhs arguments and use NOP_EXPR
8950 build_modify_expr.
8951 (c_finish_omp_for): Add code argument, pass it down to make_code.
8952 (c_omp_split_clauses): New function.
8953 (c_split_parallel_clauses): Removed.
8954 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
8955 c_omp_declare_simd_clauses_to_decls): New functions.
8956 * c-common.h (omp_clause_mask): New type.
8957 (OMP_CLAUSE_MASK_1): Define.
8958 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
8959 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
8960 omp_clause_mask::operator |, omp_clause_mask::operator &,
8961 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
8962 omp_clause_mask::operator ==): New methods.
8963 (enum c_omp_clause_split): New.
8964 (c_finish_omp_taskgroup): New prototype.
8965 (c_finish_omp_atomic): Add swapped argument.
8966 (c_finish_omp_for): Add code argument.
8967 (c_omp_split_clauses): New prototype.
8968 (c_split_parallel_clauses): Removed.
8969 (c_omp_declare_simd_clauses_to_numbers,
8970 c_omp_declare_simd_clauses_to_decls): New prototypes.
8971 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
8972 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
8973 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
8974 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
8975 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
8976 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
8977 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
8978 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
8979 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
8980 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
8981 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
8982 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
8983 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
8984 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
8985 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
8986 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
8987 PRAGMA_OMP_CLAUSE_UNIFORM.
8988
826cacfe
MG
89892013-10-09 Marc Glisse <marc.glisse@inria.fr>
8990
8991 PR tree-optimization/20318
8992 * c-common.c (handle_returns_nonnull_attribute): New function.
8993 (c_common_attribute_table): Add returns_nonnull.
8994
2284b034
MG
89952013-10-03 Marc Glisse <marc.glisse@inria.fr>
8996
8997 PR c++/19476
8998 * c.opt (fcheck-new): Move to common.opt.
8999
b56e9788
MP
90002013-09-25 Marek Polacek <polacek@redhat.com>
9001 Jakub Jelinek <jakub@redhat.com>
9002
9003 PR sanitizer/58413
9004 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
9005 an expression if we can prove it is correct.
9006 (ubsan_instrument_division): Likewise. Remove unnecessary
9007 check.
9008
ce6923c5
MP
90092013-09-18 Marek Polacek <polacek@redhat.com>
9010
9011 PR sanitizer/58411
9012 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
9013 Declare it.
9014 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
9015
fb5610fb
IS
90162013-09-14 Iain Sandoe <iain@codesourcery.com>
9017
9018 PR target/48094
9019 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
9020 fobjc-gc, freplace-objc-classes): Accept for LTO.
9021
88b0e79e
JC
90222013-09-13 Jacek Caban <jacek@codeweavers.com>
9023
9024 * c-target.def: New hook
9025
c9b0866a
PC
90262013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
9027
9028 PR c++/43452
9029 * c.opt (Wdelete-incomplete): Add.
9030
0af94e6f
JR
90312013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
9032
9033 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
9034 (vector_types_compatible_elements_p): New function.
9035 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
9036 declaration.
9037 (vector_types_compatible_elements_p): Declare.
9038
7c26172c
GDR
90392013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
9040
9041 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
9042 a virtual member function.
9043 (pp_simple_type_specifier): Remove.
9044 (pp_c_type_specifier): Likewise.
9045 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
9046 Rename from pp_c_type_specifier. Adjust.
9047 (c_pretty_printer::c_pretty_printer): Do not assign to
9048 simple_type_specifier.
9049
20059c8b
GDR
90502013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9051
9052 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
9053 member function.
9054 (c_pretty_printer::storage_class_specifier): Likewise.
9055 (c_pretty_printer::initializer): Likewise.
9056 (pp_declaration): Remove.
9057 (pp_declaration_specifiers): Likewise.
9058 (pp_abstract_declarator): Likewise.
9059 (pp_declarator): Likewise.
9060 (pp_type_id): Likewise.
9061 (pp_statement): Likewise.
9062 (pp_constant): Likewise.
9063 (pp_id_expression): Likewise.
9064 (pp_primary_expression): Likewise.
9065 (pp_unary_expression): Likewise.
9066 (pp_multiplicative_expression): Likewise.
9067 (pp_conditional_expression): Likewise.
9068 (pp_assignment_expression): Likewise.
9069 (pp_expression): Likewise.
9070 (pp_c_type_id): Likewise.
9071 (pp_c_storage_class_specifier): Likewise.
9072 * c-pretty-print.c (pp_c_type_cast): Tidy.
9073 (pp_c_pointer): Likewise.
9074 (pp_c_type_specifier): Likewise.
9075 (pp_c_parameter_type_list): Likewise.
9076 (pp_c_function_definition): Likewise.
9077 (pp_c_init_declarator): Likewise.
9078 (pp_c_initializer_list): Likewise.
9079 (pp_c_constructor_elts): Likewise.
9080 (c_pretty_printer::direct_abstract_declarator): Likewise.
9081 (c_pretty_printer::declaration_specifiers): Likewise.
9082 (c_pretty_printer::primary_expression): Likewise.
9083 (c_pretty_printer::postfix_expression): Likewise.
9084 (c_pretty_printer::type_id): Rename from pp_c_type_id.
9085 (c_pretty_printer::storage_class_specifier): Rename from
9086 pp_c_storage_class_specifier.
9087 (c_pretty_printer::initializer): Rename from pp_c_initializer.
9088 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
9089 storage_class_specifier, initializer, offset_list, flags.
9090
de5a5fa1
MP
90912013-08-30 Marek Polacek <polacek@redhat.com>
9092
9093 * c-ubsan.c: New file.
9094 * c-ubsan.h: New file.
9095
8f0e4d72
GDR
90962013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
9097
9098 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
9099 member function.
9100 (c_pretty_printer::declaration_specifiers): Likewise.
9101 (c_pretty_printer::declarator): Likewise.
9102 (c_pretty_printer::abstract_declarator): Likewise.
9103 (c_pretty_printer::direct_abstract_declarator): Likewise.
9104 (c_pretty_printer::direct_declarator): Likewise.
9105 (c_pretty_printer::function_specifier): Likewise.
9106 (pp_declaration): Adjust.
9107 (pp_declaration_specifiers): Likewise.
9108 (pp_abstract_declarator): Likewise.
9109 (pp_direct_declarator): Likewise.
9110 (pp_function_specifier): Likewise.
9111 (pp_direct_abstract_declarator): Remove as unused.
9112 (pp_c_declaration): Remove.
9113 (pp_c_declaration_specifiers): Likewise.
9114 (pp_c_declarator): Likewise.
9115 (pp_c_direct_declarator): Likewise.
9116 (pp_c_function_specifier): Likewise.
9117 (pp_c_direct_abstract_declarator): Likewise.
9118 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
9119 from pp_c_abstract_declarator. Adjust.
ab20d992 9120 (c_pretty_printer::direct_abstract_declarator): Rename from
8f0e4d72
GDR
9121 pp_c_direct_abstract_declarator. Adjust.
9122 (c_pretty_printer::function_specifier): Rename from
9123 pp_c_function_specifier. Adjust.
9124 (c_pretty_printer::declaration_specifiers): Rename from
9125 pp_c_declaration_specifiers. Adjust.
9126 (c_pretty_printer::direct_declarator): Rename from
9127 pp_c_direct_declarator. Adjust.
9128 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
9129 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
9130 (c_pretty_printer::c_pretty_printer): Do not assign to
9131 declaration, declaration_specifiers, declarator,
9132 direct_declarator, direct_abstract_declarator, function_specifier.
9133
00d34d3a
GDR
91342013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
9135
9136 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
9137 virtual member function.
9138 (c_pretty_printer::multiplicative_expression): Likewise.
9139 (c_pretty_printer::conditional_expression): Likewise.
9140 (c_pretty_printer::assignment_expression): Likewise.
9141 (c_pretty_printer::expression): Likewise.
9142 (pp_unary_expression): Adjust.
9143 (pp_multiplicative_expression): Likewise.
9144 (pp_assignment_expression): Likewise.
9145 (pp_conditional_expression): Likewise.
9146 (pp_expression): Likewise.
9147 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
9148 from pp_c_unary_expression. Adjust.
9149 (c_pretty_printer::multiplicative_expression): Rename from
9150 pp_c_multiplicative_expression. Adjust.
9151 (c_pretty_printer::conditional_expression): Rename from
9152 pp_c_conditional_expression. Adjust.
9153 (c_pretty_printer::assignment_expression): Rename from
9154 pp_c_assignment_expression. Adjust.
9155 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
9156 (c_pretty_printer::c_pretty_printer): Do not assign to
9157 unary_expression, multiplicative_expression,
9158 conditional_expression, expression.
9159
fb22178f
GDR
91602013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
9161
9162 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
9163 virtual member function.
9164 (pp_postfix_expression): Adjust.
9165 (pp_c_postfix_expression): Remove.
9166 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
9167 from pp_c_postfix_expression. Adjust.
9168 (c_pretty_printer::c_pretty_printer): Do not assign to
9169 postfix_expression.
9170
7ecc2600
GDR
91712013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
9172
9173 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
9174 virtua member function.
9175 (pp_primary_expression): Adjust.
9176 (pp_c_primary_expression): Remove.
9177 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
9178 from pp_c_primary_expression. Adjust.
9179 (pp_c_initializer_list): Use pp_primary_expression.
9180 (c_pretty_printer::c_pretty_printer): Do not assign to
9181 primary_expression.
9182
0691175f
GDR
91832013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
9184
9185 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
9186 * c-pretty-print.c (M_): Remove.
9187 (c_pretty_printer::translate_string): Define.
9188 (pp_c_type_specifier): Use it.
9189 (pp_c_primary_expression): Likewise.
9190 (pp_c_expression): Likewise.
9191
66dfe4c4
GDR
91922013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
9193
9194 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
9195 virtual function.
9196 (pp_c_id_expression): Remove.
9197 (pp_id_expression): Adjust.
9198 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
9199 pp_c_id_expression. Adjust.
9200 (pp_c_postfix_expression): Use pp_id_expression.
9201 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
9202
ca43e9d5
GDR
92032013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
9204
9205 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
9206 member function.
9207 (pp_constant): Adjust.
9208 (pp_c_constant): Remove.
9209 * c-pretty-print.c (c_pretty_printer::constant): Rename from
9210 pp_c_constant. Adjust.
9211 (pp_c_constant)
9212 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
9213 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
9214
da6ca2b5
GDR
92152013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
9216
9217 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
9218 (c_pretty_printer::c_pretty_printer): Declare.
9219 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
9220 c_pretty_printer_init. Adjust.
9221 (print_c_tree): Do not call c_pretty_printer_init.
9222 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
9223
65a372f4
AC
92242013-08-09 Arnaud Charlet <charlet@adacore.com>
9225
9226 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
9227
fd9b0f32
PC
92282013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
9229
9230 PR c++/58080
9231 * c-common.c (pointer_int_sum): Add bool parameter.
9232 * c-common.h (pointer_int_sum): Adjust declaration.
9233
e0aec1e9
GDR
92342013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
9235
9236 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
9237 c_pretty_printer variable.
9238
b066401f
GDR
92392013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
9240
9241 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
9242 (pp_base): Remove.
9243 (pp_c_base): Likewise. Adjust users.
9244 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
9245 (pp_c_whitespace): Do not call pp_base.
9246 (pp_c_left_paren): Likewise.
9247 (pp_c_right_paren): Likewise.
9248 (pp_c_left_brace): Likewise.
9249 (pp_c_right_brace): Likewise.
9250 (pp_c_left_bracket): Likewise.
9251 (pp_c_right_bracket): Likewise.
9252 (pp_c_dot): Likewise.
9253 (pp_c_ampersand): Likewise.
9254 (pp_c_star): Likewise.
9255 (pp_c_arrow): Likewise.
9256 (pp_c_semicolon): Likewise.
9257 (pp_c_complement): Likewise.
9258 (pp_c_exclamation): Likewise.
9259 (pp_c_direct_declarator): Likewise.
9260 (pp_c_ws_string): Likewise.
9261 (pp_c_identifier): Likewise.
9262 (pp_c_statement): Likewise.
9263 (print_c_tree): Likewise.
9264
65e5a578
ESR
92652013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
9266
9267 PR c++/58072
9268 * c-common.c (c_parse_error): Catch user-defined literal tokens and
9269 provide useful error strings.
9270
137a1a27
GDR
92712013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9272
9273 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
9274 printer functions instead of pp_string or operators and punctuators.
9275 (dump_generic_ada_node): Likewise.
9276 * c-pretty-print.c (pp_c_type_specifier): Likewise.
9277 (pp_c_relational_expression): Likewise.
9278 (pp_c_logical_or_expression): Likewise.
9279
07838b13
GDR
92802013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9281
9282 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
9283 functions instead of pp_character.
9284 (pp_ada_tree_identifier): Likewise.
9285 (dump_ada_double_name): Likewise.
9286 (dump_ada_function_declaration): Likewise.
9287 (dump_ada_array_domains): Likewise.
9288 (dump_template_types): Likewise.
9289 (dump_generic_ada_node): Likewise.
9290 (print_ada_declaration): Likewise.
9291 (print_ada_struct_decl): Likewise.
9292 * c-pretty-print.c (pp_c_integer_constant): Likewise.
9293
433cc7b0
TT
92942013-07-23 Tom Tromey <tromey@redhat.com>
9295
9296 * c-common.h (enum rid) <RID_GENERIC>: New constant.
9297 * c-common.c (c_common_reswords): Add _Generic.
9298
688010ba
OB
92992013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
9300
9301 * c-common.c: Fix typos.
9302 * c-common.h: Likewise.
9303
2a99e5e6
LL
93042013-07-13 Lubos Lunak <l.lunak@suse.cz>
9305
9306 PR c++/55203
9307 * c-common.c (c_common_attribute_table): Add warn_unused.
9308 (handle_warn_unused_attribute): New.
9309
c26302d5
JJ
93102013-07-10 Jakub Jelinek <jakub@redhat.com>
9311
9312 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
9313 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
9314
dfeadaa0
PC
93152013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
9316
9317 PR c++/57869
9318 * c.opt: Add Wconditionally-supported.
9319
6a2fa4b2
GS
93202013-07-08 Graham Stott <graham.stott@btinternet.com>
9321
adfac8df 9322 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
9323 unused variables l_length and l_node.
9324
ecdbd01a 93252013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
9326
9327 PR c/57821
9328 * c-common.c (complete_array_type): Delay folding first index
9329 like other indices. When folding, check for index overflow.
9330
bedc293e
MG
93312013-06-27 Marc Glisse <marc.glisse@inria.fr>
9332
9333 PR c++/57509
9334 * c-common.h (c_build_vec_perm_expr): New complain argument.
9335 * c-common.c (c_build_vec_perm_expr): Likewise.
9336 Use save_expr also in C++.
9337
604b2bfc
GDR
93382013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
9339
9340 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
9341 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
9342 * c-opts.c (c_common_post_options): Likewise.
9343
dfeadaa0 93442013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
9345
9346 * array-notation-common.c (length_mismatch_in_expr): Changed the
9347 parameter type's from a dynamic array to a vec_tree. Also removed
9348 the size parameters.
9349 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
9350 the change above.
9351
2ce86d2e
BI
93522013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
9353
9354 * c-common.h (struct cilkplus_an_parts): New structure.
9355 (struct cilkplus_an_loop_parts): Likewise.
9356 (cilkplus_extract_an_triplets): New prototype.
9357 (fix_sec_implicit_args): Likewise.
9358 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
9359 (fix_sec_implicit_args): Likewise.
604b2bfc 9360
07a6825b
BI
93612013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
9362
9363 * array-notation-common.c (find_inv_trees): Removed an unwanted
9364 typecasting.
9365 * c-common.h (struct inv_list::additional_tcodes): Changed type from
9366 enum rid to enum tree_code.
9367
08346abd
JH
93682013-06-11 Jan Hubicka <jh@suse.cz>
9369
9370 * c-common.c (handle_alias_ifunc_attribute): Do not set
9371 DECL_EXTERNAL for weakref variables.
9372 * c-pragma.c (handle_pragma_weak): Make sure aliases
9373 are not declared as external.
9374
d60f1706
BI
93752013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
9376
9377 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
9378 function from c/c-array-notation.c.
9379 (is_cilkplus_reduce_builtin): Likewise.
9380 (find_rank): Likewise.
9381 (extract_array_notation_exprs): Likewise.
9382 (replace_array_notations): Likewise.
9383 (find_inv_trees): Likewise.
9384 (replace_inv_trees): Likewise.
9385 (contains_array_notation_expr): Likewise.
9386 (find_correct_array_notation_type): Likewise.
9387 * c-common.h (struct inv_list): Moved this struct from the file
9388 c/c-array-notation.c and added a new field called additional tcodes.
9389 (length_mismatch_in_expr_p): New prototype.
9390 (is_cilkplus_reduce_builtin): Likewise.
9391 (find_rank): Likewise.
9392 (extract_array_notation_exprs): Likewise.
9393 (replace_array_notation): Likewise.
9394 (find_inv_trees): Likewise.
9395 (replace_inv_trees): Likewise.
9396 (find_correct_array_notation_type): Likewise.
dfeadaa0 9397
36536d79
BI
93982013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
9399
9400 * c-common.c (c_define_builtins): When cilkplus is enabled, the
9401 function array_notation_init_builtins is called.
9402 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
9403 * c-common.def (ARRAY_NOTATION_REF): New tree.
9404 * c-common.h (build_array_notation_expr): New function declaration.
9405 (build_array_notation_ref): Likewise.
9406 (extract_sec_implicit_index_arg): New extern declaration.
9407 (is_sec_implicit_index_fn): Likewise.
9408 (ARRAY_NOTATION_CHECK): New define.
9409 (ARRAY_NOTATION_ARRAY): Likewise.
9410 (ARRAY_NOTATION_START): Likewise.
9411 (ARRAY_NOTATION_LENGTH): Likewise.
9412 (ARRAY_NOTATION_STRIDE): Likewise.
9413 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
9414 ARRAY_NOTATION_REF.
9415 (pp_c_expression): Likewise.
9416 * c.opt (flag_enable_cilkplus): New flag.
9417 * array-notation-common.c: New file.
9418
f7716d57
JJ
94192013-05-14 Jakub Jelinek <jakub@redhat.com>
9420
9421 PR c++/57274
9422 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
9423
a5e0cd1d
MG
94242013-05-10 Marc Glisse <marc.glisse@inria.fr>
9425
9426 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
9427 vectors.
9428
f6bc1c4a
HS
94292013-05-07 Han Shen <shenhan@google.com>
9430
9431 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
9432
3f12f6e9
SKS
94332013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
9434
9435 * c-common.c (check_user_alignment): Emit error for negative values.
9436
61949153
PC
94372013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
9438
9439 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
9440
e93e18e9
PC
94412013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
9442
9443 * c-cppbuiltin.c (c_cpp_builtins): Do not define
9444 __GXX_EXPERIMENTAL_CXX1Y__.
9445
44d90fe1 94462013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 9447 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
9448
9449 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
9450 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
9451 to simply use OPT_Wpointer_arith.
9452 (c_sizeof_or_alignof_type): Likewise.
9453
13f39b2e
PC
94542013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
9455
9456 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
9457
4b84d650
JJ
94582013-04-12 Jakub Jelinek <jakub@redhat.com>
9459
9460 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
9461 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
9462 specifiers.
9463
fb037b5d
SB
94642013-04-07 Steven Bosscher <steven@gcc.gnu.org>
9465
9466 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
9467
4e856798
PC
94682013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
9469
9470 * c-common.c (pointer_int_sum): Remove dead code.
9471
4b1baac8
RS
94722013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
9473
9474 PR middle-end/56524
9475 * c-common.c (handle_optimize_attribute): Don't call
9476 save_optabs_if_changed.
9477
0b50e654
JJ
94782013-03-05 Jakub Jelinek <jakub@redhat.com>
9479
9480 PR middle-end/56461
9481 * c-pch.c (pch_init): Free target_validity at the end.
9482
48c41403
JJ
94832013-03-04 Jakub Jelinek <jakub@redhat.com>
9484
9485 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
9486
e664c61c
KS
94872013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
9488 Jakub Jelinek <jakub@redhat.com>
9489
9490 PR sanitizer/56454
9491 * c-common.c (handle_no_sanitize_address_attribute): New function.
9492 (c_common_attribute_table): Add no_sanitize_address attribute.
9493 (handle_no_address_safety_analysis_attribute): Add
9494 no_sanitize_address attribute, not no_address_safety_analysis
9495 attribute.
9496
a475fd3d 94972013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
9498
9499 PR target/52555
9500 * c-common.c (handle_optimize_attribute): Call
9501 save_optabs_if_changed.
9502
f6007d99
JJ
95032013-02-18 Jakub Jelinek <jakub@redhat.com>
9504 Steven Bosscher <steven@gcc.gnu.org>
9505
9506 PR pch/54117
9507 * c-opts.c (c_common_post_options): If debug info is enabled
9508 and non-dwarf*, refuse to load PCH files and when writing PCH
9509 file warn.
9510
cf35e2b1
JJ
95112013-02-05 Jakub Jelinek <jakub@redhat.com>
9512
9513 PR middle-end/56167
9514 * c-common.c (handle_error_attribute): Fix condition.
9515
32887460
JJ
95162013-01-30 Jakub Jelinek <jakub@redhat.com>
9517
9518 PR c++/55742
9519 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
9520
5af057d8
JM
95212013-01-18 Jason Merrill <jason@redhat.com>
9522
9523 PR target/54908
9524 * c.opt (-fextern-tls-init): New.
9525 * c-opts.c (c_common_post_options): Handle it.
9526
cc83c823
JJ
95272013-01-09 Jakub Jelinek <jakub@redhat.com>
9528
9529 PR c/48418
9530 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
9531 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
9532 and is either negative or bigger or equal to type precision
9533 of the first operand.
9534
a859517f
MP
95352012-12-03 Marek Polacek <polacek@redhat.com>
9536
9537 PR c/55570
9538 * c-common.c (check_user_alignment): Swap order of tests,
9539 check TREE_CODE first.
9540
2d7aa578
ESR
95412012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
9542
9543 PR c++/52654
9544 * c-common.h (overflow_type): New enum.
9545 (build_userdef_literal): Add overflow_type argument.
9546 (tree_userdef_literal): Add overflow_type.
9547 (USERDEF_LITERAL_OVERFLOW): New access macro.
9548 * c-common.c (build_userdef_literal): Add overflow_type
9549 argument.
9550 * c-lex.c (c_lex_with_flags): Add overflow_type to
9551 build_userdef_literal calls.
9552 (interpret_integer, interpret_float): Add overflow_type argument.
9553
cc3c4f62
RB
95542012-11-28 Richard Biener <rguenther@suse.de>
9555
9556 PR c/35634
9557 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
9558 here and use a type with proper overflow behavior for types that would
9559 need to be promoted for the arithmetic.
9560
77bc5132
JJ
95612012-11-23 Jakub Jelinek <jakub@redhat.com>
9562
9563 PR sanitizer/55435
9564 * c-common.c (handle_no_address_safety_analysis_attribute): New
9565 function.
9566 (c_common_attribute_table): Add no_address_safety_analysis.
9567
5dc99c46
SB
95682012-11-16 Simon Baldwin <simonb@google.com>
9569
9570 * c.opt: Add f[no-]canonical-system-headers.
9571 * c-opts.c (c_common_handle_option): Handle
9572 OPT_fcanonical_system_headers.
9573
a4a0016d
ESR
95742012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
9575
9576 PR c++/54413
9577 * c-opts.c (c_common_handle_option): Set new flags.
9578 * c.opt: Describe new flags.
9579
7dbb85a7
JM
95802012-11-09 Jason Merrill <jason@redhat.com>
9581
9582 * c.opt (Wabi-tag): New.
9583
ad7bac31
AK
95842012-11-09 Andi Kleen <ak@linux.intel.com>
9585
9586 PR 55139
9587 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 9588 MEMMODEL_MASK
ad7bac31 9589
7332899a
MLI
95902012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
9591
9592 PR c/53063
9593 * c.opt (Wformat): Make it Alias Wformat=1.
9594 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
9595 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
9596 LangEnabledBy.
9597 (Wformat=): RejectNegative. Use LangEnabledBy.
9598 (Wnonnull): Use LangEnabledBy.
9599 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
9600 * c-format.c (set_Wformat): Delete.
9601 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
ab20d992
JJ
9602 (maybe_read_dollar_number): Likewise.
9603 (avoid_dollar_number): Likewise.
9604 (finish_dollar_format_checking): Likewise.
9605 (check_format_info): Likewise.
9606 (check_format_info_main): Likewise.
9607 (check_format_types): Likewise.
9608 (format_type_warning): Likewise.
9609 * c-common.c (int): Likewise.
9610 (check_function_sentinel): Likewise.
8e745a17 9611 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 9612
34a180a6
MLI
96132012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
9614
9615 PR c/53063
9616 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
9617 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
9618 Use LangEnabledBy.
9619 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
9620 common.opt.
9621 (Wvariadic-macros): Init(1).
9622 * c-opts.c (c_common_handle_option): Do not handle them
9623 explicitly.
9624 (c_common_post_options): Likewise.
9625 (sanitize_cpp_opts): warn_unused_macros is now
9626 cpp_warn_unused_macros.
9627 (push_command_line_include): Likewise.
9628 * c-common.c (warn_unknown_pragmas): Do not define.
9629 * c-common.h (warn_unknown_pragmas): Do not declare.
9630
3f46d6a5
MLI
96312012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
9632
9633 PR c/51294
9634 * c-common.c (conversion_warning): Handle conditional expressions.
9635
880661a4
JW
96362012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
9637
9638 PR c++/54930
9639 * c.opt (Wreturn_local_addr): Define new option.
9640
4514a96b
JM
96412012-10-25 Jason Merrill <jason@redhat.com>
9642
f14edc1a
JM
9643 * c.opt (Wvirtual-move-assign): New.
9644
4514a96b
JM
9645 * c.opt (Winherited-variadic-ctor): New.
9646
93100c6b
MG
96472012-10-25 Marc Glisse <marc.glisse@inria.fr>
9648
9649 PR c++/54427
9650 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
9651
1efcb8c6
JM
96522012-10-23 Joseph Myers <joseph@codesourcery.com>
9653
9654 * c-common.h (pch_cpp_save_state): Declare.
9655 * c-target.def (c_preinclude): New hook.
9656 * c-opts.c (done_preinclude): New.
9657 (push_command_line_include): Handle default preincluded header.
9658 (cb_file_change): Call pch_cpp_save_state when calling
9659 push_command_line_include.
9660 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
9661 (pch_cpp_save_state): New.
9662 (pch_init): Call pch_cpp_save_state conditionally, instead of
9663 calling cpp_save_state.
9664
4a0ae68e
MLI
96652012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9666
9667 PR c/53063
9668 PR c/40989
9669 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
9670 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
9671 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
9672 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
9673 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
9674 * c-opts.c (c_common_handle_option): Remove explicit handling from
9675 here.
9676 (c_common_post_options): Likewise.
9677
67e4210b
EB
96782012-10-18 Eric Botcazou <ebotcazou@adacore.com>
9679
9680 * c-ada-spec.c (LOCATION_COL): Delete.
9681 (compare_location): New function.
9682 (compare_node): Use it.
9683 (compare_comment): Likewise.
9684
65d4f2cd
MLI
96852012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
9686
9687 PR c/53063
9688 PR c/40989
9689 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
9690 * c-opts.c (c_common_handle_option): Do not set them here. Add
9691 comment.
9692 (c_common_post_options): Likewise.
9693
909881cb
EB
96942012-10-16 Eric Botcazou <ebotcazou@adacore.com>
9695
9696 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
9697 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
9698 Remove POINTER_TYPE handling, add large unsigned handling and use
9699 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
9700
3a785c97
JJ
97012012-10-12 Jakub Jelinek <jakub@redhat.com>
9702
9703 PR c/54381
9704 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
9705 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
9706 locs and array of 3 trees instead of just single loc and single
9707 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
9708 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
9709 For *cmp* builtins that take two sources strings report warnings
9710 about first and second source, not about destination and source.
9711
5e54f81d
MG
97122012-10-12 Marc Glisse <marc.glisse@inria.fr>
9713
9714 PR c++/53055
9715 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
9716
f5b02f1e
EB
97172012-10-11 Eric Botcazou <ebotcazou@adacore.com>
9718
9719 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
9720 declaring something coming from another file.
9721
b46dbc6c
AC
97222012-10-10 Arnaud Charlet <charlet@adacore.com>
9723
f5b02f1e 9724 PR ada/54845
b46dbc6c
AC
9725 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
9726
5d9de0d0
PC
97272012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
9728
9729 PR c++/54194
9730 * c-common.c (warn_about_parentheses): Add location_t parameter;
9731 use EXPR_LOC_OR_LOC.
9732 * c-common.h: Update declaration.
9733
a212e43f
MG
97342012-10-09 Marc Glisse <marc.glisse@inria.fr>
9735
9736 PR c++/54427
9737 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
9738 more operations. Make error messages optional.
9739 * c-common.h (enum stv_conv): Moved from c-typeck.c.
9740 (scalar_to_vector): Declare.
9741
b1db7f91
JM
97422012-10-08 Jason Merrill <jason@redhat.com>
9743
9744 * c-common.c (c_common_reswords): Add thread_local.
9745
e28d52cf
DS
97462012-10-08 Dodji Seketeli <dodji@redhat.com>
9747
9748 PR c++/53528 C++11 attribute support
9749 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
9750 new functions.
9751 * c-common.c (check_cxx_fundamental_alignment_constraints): New
9752 static function.
9753 (handle_aligned_attribute): In choose strictest alignment
9754 among many. Use new check_cxx_fundamental_alignment_constraints.
9755 (handle_transparent_union_attribute): In c++11 attribute syntax,
9756 don't look through typedefs.
9757
3b78de56
AC
97582012-10-04 Arnaud Charlet <charlet@adacore.com>
9759
9760 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
9761 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
9762 out of dumpfile.h.
9763
6040bb5f
DC
97642012-09-25 Dehao Chen <dehao@google.com>
9765
9766 PR middle-end/54645
3b78de56 9767 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
9768 map when read in the pch.
9769
3f8257db 97702012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
9771
9772 * c-ada-spec.c: Style fixes.
9773
3f8257db 97742012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
9775
9776 * c.opt (-fada-spec-parent): Define new command line switch.
9777 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
9778 is specified, generate binding spec as a child of the specified unit.
9779
0ccb505d
PC
97802012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
9781 Manuel López-Ibáñez <manu@gcc.gnu.org>
9782
9783 PR c++/53210
9784 * c.opt ([Winit-self]): Enabled by -Wall in C++.
9785
c583af79
AC
97862012-08-23 Arnaud Charlet <charlet@adacore.com>
9787
9788 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
9789 for pointers, and add missing Convention C pragma.
9790 (print_ada_struct_decl): Add missing aliased keyword.
9791 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
9792
1a4049e7
JJ
97932012-08-17 Jakub Jelinek <jakub@redhat.com>
9794
9795 * c-common.c (sizeof_pointer_memaccess_warning): New function.
9796 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
9797 * c-opts.c (c_common_handle_option): Enable it for -Wall.
9798 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
9799 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
9800
70b5e7dc
RG
98012012-08-10 Richard Guenther <rguenther@suse.de>
9802
9803 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
9804
f8923f7e
SB
98052012-08-07 Steven Bosscher <steven@gcc.gnu.org>
9806
9807 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
9808 instead of separate pp_newline and pp_flush.
9809 (print_c_tree): Likewise.
9810
e45abe1f
RH
98112012-07-26 Richard Henderson <rth@redhat.com>
9812
9813 * c-common.c (handle_hot_attribute): Allow labels.
9814 (handle_cold_attribute): Likewise.
9815
332f1d24
JJ
98162012-07-20 Jakub Jelinek <jakub@redhat.com>
9817
9818 PR c++/28656
9819 * c-common.c (check_function_nonnull): Handle multiple nonnull
9820 attributes properly.
9821
7ee2468b
SB
98222012-07-16 Steven Bosscher <steven@gcc.gnu.org>
9823
9824 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
9825 * c-ada-spec.c: Likewise.
9826 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
9827
ee7b28eb
SB
98282012-07-14 Steven Bosscher <steven@gcc.gnu.org>
9829
9830 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
9831 Remove code conditional on it.
9832
6bdf3519
SB
98332012-07-11 Steven Bosscher <steven@gcc.gnu.org>
9834
9835 * c-gimplify.c: Do not include basic-block.h.
9836 * c-common.c: Do not include linfuncs.h.
9837
532aafad
SB
98382012-07-08 Steven Bosscher <steven@gcc.gnu.org>
9839
9840 * c-common.h: Include tree.h.
9841
8d0d1915
JM
98422012-07-02 Jason Merrill <jason@redhat.com>
9843
9844 PR c++/53524
9845 * c-common.c (get_priority): Call default_conversion.
9846
fbc873ad
UB
98472012-07-01 Uros Bizjak <ubizjak@gmail.com>
9848
9849 * c-pch.c (c_common_write_pch): Remove unused variables.
9850
d4a10d0a
SB
98512012-06-29 Steven Bosscher <steven@gcc.gnu.org>
9852
9853 * cppspec.c: Moved from gcc/ to here.
9854
6f3a2e23
KT
98552012-06-27 Kai Tietz <ktietz@redhat.com>
9856
9857 PR preprocessor/37215
9858 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
9859
8ca92d04
SB
98602012-06-21 Steven Bosscher <steven@gcc.gnu.org>
9861
9862 * c-common.h (c_common_print_pch_checksum): Remove.
9863 * c-pch.c: Do not include output.h.
9864 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
9865 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
9866 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
9867 (struct c_pch_header): Remove.
9868 (get_ident): Update gpch version.
9869 (pch_init): Do not print executable_checksum to asm_out_file.
9870 Do not fail if there is no asm_out_file to read back from. Set
9871 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
9872 (c_common_write_pch): Verify that nothing was written to asm_out_file
9873 since pch_init was called. Do not write a c_pch_header, and do not
9874 copy from asm_out_file to the PCH.
9875 (c_common_read_pch): Do not read a c_pch_header, and do not restore
9876 the content of asm_out_file from the PCH.
9877 (c_common_print_pch_checksum): Remove.
9878 * c-opts.c (c_common_init): Print out executable_checksum directly.
9879
70f42967
SB
98802012-06-19 Steven Bosscher <steven@gcc.gnu.org>
9881
9882 * c-target.def (objc_declare_unresolved_class_reference,
9883 objc_declare_class_definition): Add new hooks.
9884
a8781821
SB
98852012-06-19 Steven Bosscher <steven@gcc.gnu.org>
9886
9887 * c-lex.c: Do not include output.h.
9888 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
9889 Remove uses of ASM_OUTPUT_IDENT.
9890
9e1a8dd1
RR
98912012-06-15 Marc Glisse <marc.glisse@inria.fr>
9892
9893 PR c++/51033
9894 * c-common.h (c_build_vec_perm_expr): Move decl here.
9895 * c-common.c (c_build_vec_perm_expr): Move definition
9896 here.
9897
6f07a821
SB
98982012-06-06 Steven Bosscher <steven@gcc.gnu.org>
9899
9900 * c.opt (fconserve-space): Turn into a no-op.
9901
9faeb493 99022012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
9903
9904 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
9905 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
9906 both the start and end of the function.
9907
a4b7d13c
SB
99082012-06-04 Steven Bosscher <steven@gcc.gnu.org>
9909
9910 * c-common.c: Do not include output.h.
9911 * c-pragma.c: Likewise.
9912
c265f413
SA
99132012-06-04 Steven Bosscher <steven@gcc.gnu.org>
9914
9915 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
9916 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
9917 (lang_decl_name): Handle namespace decls.
9918
be7a421e
SB
99192012-05-31 Steven Bosscher <steven@gcc.gnu.org>
9920
9921 * c-ada-spec.c: Do not include output.h.
9922 * c-semantics.c: Likewise.
9923
65de6659
JM
99242012-05-29 Joseph Myers <joseph@codesourcery.com>
9925
9926 * c-common.c: Fix typo.
9927
ca5f4331
MM
99282012-05-29 Michael Matz <matz@suse.de>
9929
9930 * c-common.h (c_expand_decl): Remove prototype.
9931
4f7f7aca
MLI
99322012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9933
9934 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
9935 * c-opts.c (c_common_handle_option): Remove code handling
9936 warn_missing_braces.
9937
4a792f9b
PC
99382012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
9939
9940 PR c++/25137
9941 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
9942 -Wmissing_braces.
9943
650dc14a
DS
99442012-05-22 Dodji Seketeli <dodji@redhat.com>
9945
9946 PR c++/53322
9947 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
9948
9b095bf1
MLI
99492012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
9950
9951 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
9952 * c-opts.c (c_common_handle_option): Do not handle explicitly
9953 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
9954
0b2c4be5
DS
99552012-05-16 Dodji Seketeli <dodji@redhat.com>
9956
9957 PR preprocessor/7263
ab20d992 9958 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
0b2c4be5
DS
9959 to cpp_classify_number. For diagnostics, use the precise location
9960 instead of the global input_location.
9961
a1bde5af
PC
99622012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
9963
d02924ef 9964 PR c++/11856
a1bde5af
PC
9965 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
9966
d1ede5f4
BS
99672012-05-14 Bernd Schmidt <bernds@codesourcery.com>
9968
a1bde5af 9969 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 9970
f2bc201f
MLI
99712012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
9972
9973 PR 53063
9974 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
9975 Wreorder): Use LangEnabledBy.
9976 * c-opts.c (c_common_handle_option): Do not enable them
9977 explicitly. Call lang-specific generated functions.
9978 (c_common_post_options): Do not set them here.
9979
95744782
MLI
99802012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
9981
9982 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
9983 Wmissing-field-initializers,Wmissing-parameter-type,
9984 Wold-style-declaration,Woverride-init): Use EnabledBy.
9985 * c-opts.c (c_common_post_options): Do not set here explicitly.
9986
7d5a5747
MLI
99872012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
9988
9989 PR 53063
9990 * c-opts.c (c_common_handle_option): Use handle_generated_option
9991 to enable sub-options.
9992
5a3c9cf2
PC
99932012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
9994
9995 PR c++/53158
9996 * c-common.c (warnings_for_convert_and_check): Use warning_at.
9997
3ac8781c
RG
99982012-05-10 Richard Guenther <rguenther@suse.de>
9999
10000 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
10001 adjust commentary about TYPE_IS_SIZETYPE types.
10002
1e537948
MLI
100032012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
10004
10005 PR c++/53261
10006 * c-common.c (warn_logical_operator): Check that argument of
10007 integer_zerop is not NULL.
10008
f2c4a785
MLI
100092012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
10010
10011 PR c/43772
10012 * c-common.c (warn_logical_operator): Do not warn if either side
10013 is already true or false.
10014
50f305ca
MLI
100152012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
10016
10017 PR c/51712
10018 * c-common.c (expr_original_type): New.
10019 (shorten_compare): Do not warn for enumeration types.
10020
0c3641b0
MLI
100212012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
10022
10023 * c.opt (fpermissive): Add Var(flag_permissive).
10024
7edaa4d2
MG
100252012-04-30 Marc Glisse <marc.glisse@inria.fr>
10026
10027 PR c++/51033
10028 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
10029 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
10030
b9c8da34
DS
100312012-04-30 Dodji Seketeli <dodji@redhat.com>
10032
10033 Add -Wvarargs option
ab20d992 10034 * c.opt (Wvarargs): Define new option.
b9c8da34 10035
e6c69da0
MLI
100362012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
10037
10038 * c-common.c (check_function_arguments): Replace
10039 Wmissing-format-attribute with Wsuggest-attribute=format.
10040
90137d8f
MLI
100412012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
10042
10043 * c.opt (Wsuggest-attribute=format): New. Alias of
10044 Wmissing-format-attribute.
10045 * c-format.c (decode_format_type): Replace
10046 Wmissing-format-attribute with Wsuggest-attribute=format.
10047 (check_function_format): Likewise.
10048
9faeb493 100492012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
10050
10051 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
10052 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
10053 * c.opt: Add Wliteral-suffix.
10054
c1771a20
MLI
100552012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
10056
10057 PR c/44774
10058 * c.opt (Wpedantic): New.
10059 (pedantic): Alias Wpedantic.
10060 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
10061 (c_common_post_options): Likewise.
10062 (sanitize_cpp_opts): Likewise.
10063 * c-lex.c (interpret_float): Likewise.
10064 * c-format.c (check_format_types): Likewise.
10065 * c-common.c (pointer_int_sum): Likewise.
10066 (c_sizeof_or_alignof_type): Likewise.
10067 (c_add_case_label): Likewise.
10068 (c_do_switch_warnings): Likewise.
10069 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
10070
04b391c1
JM
100712012-04-15 Jason Merrill <jason@redhat.com>
10072
10073 PR c++/52818
10074 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
10075 (C_STD_NAME): Distinguish between C++98 and C++11.
10076
ac868f29
EB
100772012-04-11 Eric Botcazou <ebotcazou@adacore.com>
10078
10079 PR target/52624
10080 * c-common.h (uint16_type_node): Rename into...
10081 (c_uint16_type_node): ...this.
10082 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
10083 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
10084
fd4116f4
MLI
100852012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
10086
10087 * c-common.c (warn_if_unused_value): Move definition to here.
10088 * c-common.h (warn_if_unused_value): Move declaration to here.
10089
573ac65e
WB
100902012-03-23 William Bader <williambader@hotmail.com>
10091
10092 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
10093
552b8185
JM
100942012-03-20 Jason Merrill <jason@redhat.com>
10095
10096 * c-common.h (enum cxx_dialect): Add cxx1y.
10097 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
10098 test.
10099 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
10100 * c-opts.c (c_common_post_options): Likewise.
10101 (set_std_cxx1y): New.
10102 (c_common_handle_option): Call it.
10103 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
10104
04398fa8
PC
101052012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
10106
10107 PR c++/14710
10108 * c.opt ([Wuseless-cast]): Add.
10109
d2a12ae7
RG
101102012-03-16 Richard Guenther <rguenther@suse.de>
10111
10112 * c-pretty-print.c (pp_c_initializer_list): Adjust.
10113
a12bf402
MLI
101142012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
10115
10116 PR c++/44783
10117 * c.opt (ftemplate-backtrace-limit) Add.
10118
5c30094f
RO
101192012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10120
10121 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
10122 handling.
10123 * c-pragma.c (handle_pragma_extern_prefix): Remove.
10124 (init_pragma): Don't register extern_prefix.
10125
21fa2faf
RG
101262012-03-12 Richard Guenther <rguenther@suse.de>
10127
10128 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
10129 (builtin_type_for_size): Likewise.
10130
e3793c6f
JJ
101312012-02-13 Jakub Jelinek <jakub@redhat.com>
10132
10133 PR c++/52215
10134 * c-common.c (sync_resolve_params): Don't decide whether to convert
10135 or not based on TYPE_SIZE comparison, convert whenever arg_type
10136 is unsigned INTEGER_TYPE.
10137
93286335
PC
101382012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
10139
10140 PR c/52118
10141 * c.opt ([Wunused-local-typedefs]): Fix description.
10142
7a421706
MS
101432012-01-24 Mike Stump <mikestump@comcast.net>
10144
10145 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
10146 exactly.
10147
ba9b1f11
RG
101482012-01-18 Richard Guenther <rguenther@suse.de>
10149
10150 * c-opts.c (c_common_post_options): Reset LTO flags if
10151 we are about to generate a PCH.
10152
465406be
PC
101532012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
10154
10155 PR c++/51777
10156 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
10157 use pp_unsigned_wide_integer.
10158
aee15221
RG
101592012-01-10 Richard Guenther <rguenther@suse.de>
10160
10161 PR middle-end/51806
10162 * c-opts.c (c_common_handle_option): Move -Werror handling
10163 to language independent code.
10164
5720c0dc
RG
101652012-01-05 Richard Guenther <rguenther@suse.de>
10166
10167 PR middle-end/51764
10168 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
10169 from common.opt.
10170
73ac190a
PC
101712011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
10172
10173 PR c++/51316
10174 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
10175 of array types with an unknown bound.
10176
48b0b196
JM
101772011-12-20 Joseph Myers <joseph@codesourcery.com>
10178
10179 * c-common.c (flag_isoc99): Update comment to refer to C11.
10180 (flag_isoc1x): Change to flag_isoc11.
10181 * c-common.h (flag_isoc99): Update comment to refer to C11.
10182 (flag_isoc1x): Change to flag_isoc11.
10183 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
10184 C11.
10185 * c-opts.c (set_std_c1x): Change to set_std_c11.
10186 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
10187 Call set_std_c11.
10188 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
10189 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
10190 * c.opt (std=c1x): Change to std=c11. Document as non-draft
10191 standard.
10192 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
10193 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
10194 (std=gnu1x): Make alias of std=gnu11.
10195
d58d6eb5
JM
101962011-12-19 Jason Merrill <jason@redhat.com>
10197
10198 PR c++/51228
10199 * c-common.c (handle_transparent_union_attribute): Check the first
10200 field if the type is complete.
10201
b3908fcc
JW
102022011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
10203
10204 PR libstdc++/51365
10205 * c-common.c (RID_IS_FINAL): Add.
10206 * c-common.h (RID_IS_FINAL): Add.
10207
fea3ca91
IS
102082011-11-30 Iain Sandoe <iains@gcc.gnu.org>
10209
10210 * c.opt (fgnu-runtime): Provide full description.
10211 (fnext-runtime): Likewise.
10212 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
10213
62bad7cd
AM
102142011-11-28 Andrew MacLeod <amacleod@redhat.com>
10215
10216 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
10217 predefines in one place. Add LOCK_FREE predefines.
10218 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
10219 new func.
10220
c466c4ff
AM
102212011-11-24 Andrew MacLeod <amacleod@redhat.com>
10222
10223 PR c/51256
9faeb493 10224 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 10225 conditions
9faeb493
UB
10226 (resolve_overloaded_atomic_exchange,
10227 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
10228 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
10229 error_mark_node for error conditions.
9faeb493 10230
a5952633
RG
102312011-11-08 Richard Guenther <rguenther@suse.de>
10232
10233 PR middle-end/51010
ab20d992 10234 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
a5952633 10235
0a35513e
AH
102362011-11-07 Richard Henderson <rth@redhat.com>
10237 Aldy Hernandez <aldyh@redhat.com>
10238 Torvald Riegel <triegel@redhat.com>
10239
10240 Merged from transactional-memory.
10241
10242 * c-common.c (handle_tm_wrap_attribute,
10243 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
10244 (struct c_common_reswords): Added __transaction* keywords.
10245 (struct c_common_attribute_table): Added transaction* and tm_regparm
10246 attributes.
10247 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
10248 masks.
10249 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
10250 find_tm_attribute): Declare.
10251
6d87092d
JM
102522011-11-07 Jason Merrill <jason@redhat.com>
10253
10254 PR c++/35688
10255 * c-common.c, c-common.h: Revert yesterday's changes.
10256
8e7860a1
JM
102572011-11-06 Jason Merrill <jason@redhat.com>
10258
10259 PR c++/35688
10260 * c-common.c (decl_has_visibility_attr): Split out from...
10261 (c_determine_visibility): ...here.
10262 * c-common.h: Declare it.
10263
d19fa6b5
JM
102642011-11-06 Joseph Myers <joseph@codesourcery.com>
10265
10266 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
10267 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
10268 type.
10269 (check_user_alignment): New. Split out of
10270 handle_aligned_attribute. Disallow integer constants with
10271 noninteger types. Conditionally allow zero.
10272 (handle_aligned_attribute): Use check_user_alignment.
10273 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
10274
86951993
AM
102752011-11-06 Andrew MacLeod <amacleod@redhat.com>
10276 Richard Henderson <rth@redhat.com>
10277
10278 Merged from cxx-mem-model.
10279
10280 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 10281 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
10282 parameters that are the same type size.
10283 (get_atomic_generic_size): New. Find size of generic
10284 atomic function parameters and do typechecking.
10285 (add_atomic_size_parameter): New. Insert size into parameter list.
10286 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
10287 either __atomic_exchange_n or external library call.
9faeb493 10288 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 10289 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 10290 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
10291 __atomic_load_n or an external library call.
10292 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
10293 __atomic_store_n or an external library call.
10294 (resolve_overloaded_builtin): Handle new __atomic builtins.
10295
cf9e9959
EB
102962011-11-04 Eric Botcazou <ebotcazou@adacore.com>
10297
10298 PR c++/50608
10299 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
10300 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
10301 <INDIRECT_REF>: Return the argument.
10302 <ARRAY_REF>: Remove special code for negative offset.
10303 Call fold_build_pointer_plus instead of size_binop.
10304 (fold_offsetof): Remove STOP_REF argument and adjust.
10305 * c-common.h (fold_offsetof_1): Declare.
10306 (fold_offsetof): Remove STOP_REF argument.
10307
25339f10
JM
103082011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
10309
10310 PR c++/50810
10311 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
10312 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
10313 Wnarrowing for C++0x and C++98.
10314 * c.opt ([Wnarrowing]): Update.
10315
89401152
PC
103162011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
10317
10318 PR c++/44277
10319 * c.opt: Add Wzero-as-null-pointer-constant.
10320
97e3ad20
JM
103212011-10-31 Jason Merrill <jason@redhat.com>
10322
15694fdd
JM
10323 * c.opt (-fdeduce-init-list): Off by default.
10324
97e3ad20
JM
10325 PR c++/50920
10326 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
10327 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
10328 and -Wc++11-compat.
10329 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
10330
fb9120e3
RAV
103312011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
10332
10333 PR c++/30066
10334 * c.opt (fvisibility-inlines-hidden): Description change.
10335
3ce4f9e4
ESR
103362011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
10337
10338 Implement C++11 user-defined literals.
10339 * c-common.c (build_userdef_literal): New.
10340 * c-common.def: New tree code.
10341 * c-common.h (tree_userdef_literal): New tree struct and accessors.
10342 * c-lex.c (interpret_float): Add suffix parm.
10343 (c_lex_with_flags): Build literal tokens.
10344
5f53c243
PC
103452011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
10346
10347 PR c++/50841
10348 Revert:
10349 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
10350
10351 PR c++/50810
10352 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
10353 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
10354 Wnarrowing for C++0x and C++98.
10355 * c.opt ([Wnarrowing]): Update.
10356
263734e1
PC
103572011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
10358
10359 PR c++/50810
10360 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
10361 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
10362 Wnarrowing for C++0x and C++98.
10363 * c.opt ([Wnarrowing]): Update.
10364
d2e312d7
PC
103652011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
10366
10367 PR c++/45385
10368 * c-common.c (conversion_warning): Remove code looking for
10369 artificial operands.
10370
d17687f6
DS
103712011-10-18 Dodji Seketeli <dodji@redhat.com>
10372
10373 PR bootstrap/50760
10374 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 10375 !NO_IMPLICIT_EXTERN_C.
d17687f6 10376
fc8396e9
PC
103772011-10-17 Michael Spertus <mike_spertus@symantec.com>
10378
10379 * c-common.c (c_common_reswords): Add __bases,
10380 __direct_bases.
10381 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
10382
103832011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
10384
10385 PR c++/50757
10386 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
10387
847e697a
TT
103882011-10-15 Tom Tromey <tromey@redhat.com>
10389 Dodji Seketeli <dodji@redhat.com>
10390
10391 * c.opt (fdebug-cpp): New option.
10392 * c-opts.c (c_common_handle_option): Handle the option.
10393 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
10394 output stream in parameter. Factorized from ...
10395 (maybe_print_line): ... this. Dump location debug information when
10396 -fdebug-cpp is in effect.
10397 (print_line_1): New static function. Takes an output stream in
10398 parameter. Factorized from ...
10399 (print_line): ... here. Dump location information when -fdebug-cpp
10400 is in effect.
10401 (scan_translation_unit): Dump location information when
10402 -fdebug-cpp is in effect.
10403
92582b75
TT
104042011-10-15 Tom Tromey <tromey@redhat.com>
10405 Dodji Seketeli <dodji@redhat.com>
10406
10407 * c.opt (ftrack-macro-expansion): New option. Handle it with and
10408 without argument.
10409 * c-opts.c (c_common_handle_option)<case
10410 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
10411 cases. Handle -ftrack-macro-expansion with and without argument.
10412
46427374
TT
104132011-10-15 Tom Tromey <tromey@redhat.com>
10414 Dodji Seketeli <dodji@redhat.com>
10415
10416 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
10417 (print_line, cb_define, do_line_change): Adjust to avoid touching
10418 the internals of struct line_map. Use the public API instead.
10419 * c-pch.c (c_common_read_pch): Likewise.
10420 * c-lex.c (fe_file_change): Likewise.
10421
fc8396e9
PC
104222011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
10423
10424 PR c++/17212
10425 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
10426
104272011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
10428
10429 PR c++/33067
10430 * c-pretty-print.c (pp_c_floating_constant): Output
10431 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
10432
e79983f4
MM
104332011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
10434
10435 * c-common.c (def_builtin_1): Delete old interface with two
10436 parallel arrays to hold standard builtin declarations, and replace
10437 it with a function based interface that can support creating
10438 builtins on the fly in the future. Change all uses, and poison
10439 the old names. Make sure 0 is not a legitimate builtin index.
10440 * c-omp.c (c_finish_omp_barrier): Ditto.
10441 (c_finish_omp_taskwait): Ditto.
10442 (c_finish_omp_flush): Ditto.
10443
6637388f
TG
104442011-10-11 Tristan Gingold <gingold@adacore.com>
10445
10446 * c.opt: (fallow-parameterless-variadic-functions): New.
10447
3797cb21
DS
104482011-09-08 Dodji Seketeli <dodji@redhat.com>
10449
10450 PR c++/33255 - Support -Wunused-local-typedefs warning
10451 * c-common.h (struct c_language_function::local_typedefs): New
10452 field.
9faeb493
UB
10453 (record_locally_defined_typedef, maybe_record_typedef_use)
10454 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 10455 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
10456 (maybe_record_typedef_use)
10457 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
10458 * c.opt: Declare new -Wunused-local-typedefs flag.
10459
693ddb1b
EB
104602011-09-06 Eric Botcazou <ebotcazou@adacore.com>
10461
10462 PR middle-end/50266
10463 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
10464 computations.
10465
830c740f
RG
104662011-09-05 Richard Guenther <rguenther@suse.de>
10467
10468 * c-common.c (complete_array_type): Use ssize_int (-1) instead
10469 of integer_minus_one_node for empty array upper bounds.
10470
892a371f
DS
104712011-08-28 Dodji Seketeli <dodji@redhat.com>
10472
10473 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
10474 it's the first time it's being called on this main TU.
10475
0e3fdb48
RB
104762011-08-24 Richard Guenther <rguenther@suse.de>
10477
10478 PR c/49396
10479 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
10480
104812011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
10482
10483 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
10484 defined in cpp_init_builtins and c_cpp_builtins.
10485
d4a83c10
JM
104862011-08-19 Joseph Myers <joseph@codesourcery.com>
10487
10488 * c-common.c (c_common_reswords): Add __builtin_complex.
10489 * c-common.h (RID_BUILTIN_COMPLEX): New.
10490
bbceee64
JM
104912011-08-18 Joseph Myers <joseph@codesourcery.com>
10492
10493 * c-common.c (c_common_reswords): Add _Noreturn.
10494 (keyword_is_function_specifier): Handle RID_NORETURN.
10495 * c-common.h (RID_NORETURN): New.
10496
3f8257db 104972011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
10498
10499 * c-common.c (unsafe_conversion_p): New function. Check if it is
10500 unsafe to convert an expression to the type.
10501 (conversion_warning): Adjust, use unsafe_conversion_p.
10502 * c-common.h (unsafe_conversion_p): New function declaration.
10503
20906c66
JJ
105042011-08-02 Jakub Jelinek <jakub@redhat.com>
10505
10506 * c-common.h (c_finish_omp_atomic): Adjust prototype.
10507 (c_finish_omp_taskyield): New prototype.
10508 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
10509 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
10510 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
10511 or RHS1 have side-effects, evaluate those too in the right spot,
10512 if it is a decl and LHS is also a decl, error out if they
10513 aren't the same.
10514 (c_finish_omp_taskyield): New function.
10515 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
10516 * c-pragma.c (omp_pragmas): Add taskyield.
10517 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
10518 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
10519 PRAGMA_OMP_CLAUSE_MERGEABLE.
10520
770e5a2e
DS
105212011-07-25 Dodji Seketeli <dodji@redhat.com>
10522
10523 * c-common.h (set_underlying_type): Remove parm name from
10524 declaration.
10525
1baae426
RG
105262011-07-25 Romain Geissler <romain.geissler@gmail.com>
10527
10528 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 10529
fcb21722
JM
105302011-07-22 Jason Merrill <jason@redhat.com>
10531
76f86d00
JM
10532 PR c++/49793
10533 * c.opt (Wnarrowing): New.
10534
3a636414
JM
10535 PR c++/30112
10536 * c-common.h: Declare c_linkage_bindings.
10537 * c-pragma.c (handle_pragma_redefine_extname): Use it.
10538
fcb21722
JM
10539 PR c++/49813
10540 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
10541 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
10542 as flag_isoc99 for 'restrict'.
10543 (pp_c_specifier_qualifier_list): Likewise for _Complex.
10544
02614448
ILT
105452011-07-21 Ian Lance Taylor <iant@google.com>
10546
10547 PR middle-end/49705
10548 * c-common.c (c_disable_warnings): New static function.
10549 (c_enable_warnings): New static function.
10550 (c_fully_fold_internal): Change local unused_p to bool. Call
10551 c_disable_warnings and c_enable_warnings rather than change
10552 c_inhibit_evaluation_warnings.
10553
34429675
JM
105542011-07-20 Jason Merrill <jason@redhat.com>
10555
10556 PR c++/6709 (DR 743)
10557 PR c++/42603 (DR 950)
10558 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
10559 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
10560 (CPP_DECLTYPE): New.
10561 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
10562
5d49b6a7
RG
105632011-07-19 Richard Guenther <rguenther@suse.de>
10564
10565 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
10566 * c-omp.c (c_finish_omp_for): Likewise.
10567
e84a58ff
EB
105682011-07-12 Eric Botcazou <ebotcazou@adacore.com>
10569
10570 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
10571 body on the next line.
10572
329af3c7
JM
105732011-07-08 Jason Merrill <jason@redhat.com>
10574
4063e61b
JM
10575 PR c++/45437
10576 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
10577
329af3c7
JM
10578 PR c++/49673
10579 * c-common.c (c_apply_type_quals_to_decl): Don't check
10580 TYPE_NEEDS_CONSTRUCTING.
10581
1a072294
RG
105822011-07-06 Richard Guenther <rguenther@suse.de>
10583
10584 * c-common.c (c_common_nodes_and_builtins):
10585 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
10586
fce5dddd
RG
105872011-07-05 Richard Guenther <rguenther@suse.de>
10588
10589 * c-common.c (c_common_nodes_and_builtins): Build all common
10590 tree nodes first.
10591
45d439ac
JJ
105922011-06-27 Jakub Jelinek <jakub@redhat.com>
10593
56300785
JJ
10594 * c-common.h (c_tree_chain_next): New static inline function.
10595
45d439ac
JJ
10596 * c-common.c (check_builtin_function_arguments): Handle
10597 BUILT_IN_ASSUME_ALIGNED.
10598
e0a8ecf2
AM
105992011-06-21 Andrew MacLeod <amacleod@redhat.com>
10600
10601 * c-common.c: Add sync_ or SYNC__ to builtin names.
10602 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
10603
106042011-06-20 Pierre Vittet <piervit@pvittet.com>
10605
10606 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
10607 handler.
10608 (gen_pragma_handler): New union.
10609 (internal_pragma_handler): New type.
10610 (c_register_pragma_with_data)
10611 (c_register_pragma_with_expansion_and_data): New functions.
10612
10613 * c-pragma.c (registered_pragmas, c_register_pragma_1)
10614 (c_register_pragma, c_register_pragma_with_expansion)
10615 (c_invoke_pragma_handler): Changed to work with
10616 internal_pragma_handler.
10617 (c_register_pragma_with_data)
10618 (c_register_pragma_with_expansion_and_data): New functions.
10619
677f3fa8
JM
106202011-06-14 Joseph Myers <joseph@codesourcery.com>
10621
10622 * c-common.c: Include common/common-target.h.
10623 (handle_section_attribute): Use
10624 targetm_common.have_named_sections.
10625 * c-cppbuiltin.c: Include common/common-target.h.
10626 (c_cpp_builtins): Use targetm_common.except_unwind_info.
10627
d7fc8c14
RG
106282011-06-10 Richard Guenther <rguenther@suse.de>
10629
10630 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
10631 to print a IDENTIFIER_NODE.
10632
10e48e39
RO
106332011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10634 Joseph Myers <joseph@codesourcery.com>
10635
10636 * c.opt (fbuilding-libgcc): New option.
10637 * c-cppbuiltin.c (c_cpp_builtins): Define
10638 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
10639
6976ae51
JM
106402011-06-07 Jason Merrill <jason@redhat.com>
10641
3ff60975
JM
10642 * c-common.c (max_tinst_depth): Lower default to 900.
10643
6976ae51
JM
10644 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
10645
009db074
RG
106462011-06-07 Richard Guenther <rguenther@suse.de>
10647
10648 * c-common.c (c_common_nodes_and_builtins): Do not set
10649 size_type_node or call set_sizetype.
10650
b4592b92
DS
106512011-06-07 Dodji Seketeli <dodji@redhat.com>
10652
10653 PR debug/49130
10654 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 10655 type when using pointer comparison to compare types.
b4592b92 10656
014ab419
JW
106572011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
10658
10659 * c.opt: Add -Wdelete-non-virtual-dtor.
10660 * c-opts.c (c_common_handle_option): Include it in -Wall.
10661
4f60111f
NF
106622011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
10663
10664 PR bootstrap/49190
10665
10666 Revert:
10667 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
10668
10669 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
10670 not tree_common.
10671
4cc4f2f4
JJ
106722011-05-27 Jakub Jelinek <jakub@redhat.com>
10673
10674 PR c++/49165
10675 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
10676 C++ don't call c_common_truthvalue_conversion on void type arms.
10677
38e01f9e
NF
106782011-05-27 Nathan Froyd <froydnj@codesourcery.com>
10679
10680 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
10681 (stmt_list_stack): Define.
10682 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
10683 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
10684
92e948a8
NF
106852011-05-26 Nathan Froyd <froydnj@codesourcery.com>
10686
10687 * c-common.c (warning_candidate_p): Check for BLOCKs.
10688
a2fc3e63
NF
106892011-05-26 Nathan Froyd <froydnj@codesourcery.com>
10690
10691 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
10692 not tree_common.
10693
0957c029
JJ
106942011-05-25 Jakub Jelinek <jakub@redhat.com>
10695
10696 * c-common.c (def_fn_type): Remove extra va_end.
10697
828fb3ba
JM
106982011-05-23 Jason Merrill <jason@redhat.com>
10699
10700 PR c++/48106
10701 * c-common.c (c_common_get_narrower): New.
10702 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
10703
dde05067
NF
107042011-05-23 Nathan Froyd <froydnj@codesourcery.com>
10705
10706 * c-common.h (check_function_arguments): Tweak prototype of
10707 check_function_arguments.
10708 * c-common.c (check_function_arguments): Likewise. Adjust
10709 calls to check_function_nonnull, check_function_format, and
10710 check_function_sentinel.
10711 (check_function_sentinel): Take a FUNCTION_TYPE rather than
10712 separate attributes and typelist arguments. Use
10713 FOREACH_FUNCTION_ARGS to iterate over argument types.
10714
3c0d13bf
PC
107152011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
10716
10717 * c-common.c (c_common_reswords): Reorder.
10718 * c-common.h (rid): Likewise.
10719
8242dd04
NF
107202011-05-10 Nathan Froyd <froydnj@codesourcery.com>
10721
10722 * c-common.c (def_fn_type): Don't call build_function_type, call
10723 build_function_type_array or build_varargs_function_type_array
10724 instead.
10725 (c_common_nodes_and_builtins): Likewise.
10726
3d528853
NF
107272011-05-05 Nathan Froyd <froydnj@codesourcery.com>
10728
10729 * c-common.c (c_add_case_label): Omit the loc argument to
10730 build_case_label.
10731 * c-common.h (build_case_label): Remove.
10732 * c-semantics.c (build_case_label): Remove.
10733
a04a722b
JM
107342011-05-05 Joseph Myers <joseph@codesourcery.com>
10735
10736 * c-objc.h (objc_start_method_definition): Update prototype.
10737 * stub-objc.c (objc_start_method_definition): Add extra parameter.
10738
e19a18d4
NF
107392011-05-04 Nathan Froyd <froydnj@codesourcery.com>
10740
10741 * c-common.c (check_main_parameter_types): Reindent. Don't use
10742 TYPE_ARG_TYPES directly.
10743 (handle_nonnull_attribute): Likewise.
10744 (sync_resolve_params): Likewise.
10745 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
10746 to check_format_string.
10747 (handle_format_attribute): Likewise.
10748 (check_format_string): Take a function type to examine instead of
10749 a type list. Use a function_arg_iterator to step through argument
10750 types.
10751
c62c040f
RG
107522011-05-04 Richard Guenther <rguenther@suse.de>
10753
10754 * c-common.c (fix_string_type): Use size_int for index type bounds.
10755 (start_fname_decls): Do not pass NULL to build_int_cst.
10756 (c_init_attributes): Likewise.
10757 * c-lex.c (c_lex_with_flags): Likewise.
10758
c12ff9d8
JM
107592011-04-27 Jason Merrill <jason@redhat.com>
10760
10761 * c-common.c (make_tree_vector_from_list): New.
10762 * c-common.h: Declare it.
10763
304dfbe3
RG
107642011-04-26 Richard Guenther <rguenther@suse.de>
10765
10766 PR preprocessor/48248
10767 * c-ppoutput.c (maybe_print_line): Always optimize newlines
10768 for output size with -P.
10769
3c0d13bf
PC
107702011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
10771
10772 * c-common.c (struct c_common_resword): Add __underlying_type.
10773 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
10774
04695783
JM
107752011-04-20 Jim Meyering <meyering@redhat.com>
10776
10777 * c-format.c (init_dollar_format_checking): Remove useless
10778 if-before-free.
10779
0dc33c3c
NP
107802011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
10781
10782 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 10783 (objc_detect_field_duplicates): New.
0dc33c3c 10784 * stub-objc.c: Likewise.
3c0d13bf 10785
c59633d9
NP
107862011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
10787
10788 * stub-objc.c (objc_declare_protocols): Renamed to
10789 objc_declare_protocol.
10790 * c-objc.h: Likewise.
3c0d13bf 10791
32dabdaf
NP
107922011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
10793
10794 * stub-objc.c (objc_declare_class): Updated argument name.
10795
81f653d6
NF
107962011-04-12 Nathan Froyd <froydnj@codesourcery.com>
10797
10798 * c-common.h (c_common_init_ts): Declare.
10799 * c-common.c (c_common_init_ts): Define.
10800
eb345401
NP
108012011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
10802
10803 * c-objc.h (objc_build_message_expr): Updated prototype.
10804 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 10805
a358e188
MJ
108062011-04-12 Martin Jambor <mjambor@suse.cz>
10807
10808 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
10809 of cgraph_node.
10810
e6313a78
RG
108112011-04-11 Richard Guenther <rguenther@suse.de>
10812
10813 * c-common.c (complete_array_type): Build a range type of
10814 proper type.
10815
dcf0c47e
NF
108162011-04-08 Nathan Froyd <froydnj@codesourcery.com>
10817
10818 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
10819 (handle_type_generic_attribute): Likewise.
10820
1ee44b26
JM
108212011-04-07 Jason Merrill <jason@redhat.com>
10822
10823 PR c++/48450
10824 * c-common.c (c_common_truthvalue_conversion): Don't ignore
10825 conversion from C++0x scoped enum.
10826
acce4e77
JM
108272011-04-06 Joseph Myers <joseph@codesourcery.com>
10828
10829 * c-target-def.h: New file.
10830 * c-target.def: New file.
10831 * c-target.h: New file.
10832 * c-common.c (targetcm): Don't define here.
10833 * c-common.h (default_handle_c_option): Declare.
10834 * c-format.c: Include c-target.h instead of target.h.
10835 * c-opts.c: Include c-target.h instead of target.h. Explicitly
10836 include tm.h.
10837 (default_handle_c_option): Move from targhooks.c.
10838
e2eefb55
JJ
108392011-03-29 Jakub Jelinek <jakub@redhat.com>
10840
10841 PR preprocessor/48248
10842 * c-ppoutput.c (print): Add src_file field.
10843 (init_pp_output): Initialize it.
10844 (maybe_print_line): Don't optimize by adding up to 8 newlines
10845 if map->to_file and print.src_file are different file.
10846 (print_line): Update print.src_file.
10847
ba78087b
KT
108482011-03-25 Kai Tietz <ktietz@redhat.com>
10849
10850 * c-ada-spec.c (compare_comment): Use filename_cmp
10851 instead of strcmp for filename.
10852
0edf1bb2
JL
108532011-03-25 Jeff Law <law@redhat.com>
10854
adfac8df 10855 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 10856
c7dc8804
JM
108572011-03-25 Jason Merrill <jason@redhat.com>
10858
10859 * c.opt: Add -std=c++03.
10860
d1d879b1
EB
108612011-03-22 Eric Botcazou <ebotcazou@adacore.com>
10862
10863 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
10864
3f8257db 108652011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
10866
10867 PR target/12171
5050afdf
KT
10868 * c-pretty-print.c (pp_c_specifier_qualifier_list):
10869 Display allowed attributes for function pointer types.
10870 (pp_c_attributes_display): New function to display
10871 attributes having affects_type_identity flag set to true.
10872 * c-pretty-print.h (pp_c_attributes_display): New prototype.
10873
62d784f7
KT
10874 * c-common.c (c_common_attribute_table):
10875 Add new element.
10876 (c_common_format_attribute_table): Likewise.
10877
82d37118
JM
108782011-03-18 Jason Merrill <jason@redhat.com>
10879
49a000c3
JM
10880 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
10881 * c-common.h: Don't declare it here.
10882 * c-common.c: Or define it here.
10883 * c-opts.c (c_common_handle_option): Or set it here.
10884
82d37118
JM
10885 PR c++/35315
10886 * c-common.c (handle_transparent_union_attribute): Don't
10887 make a duplicate type in C++.
10888
17bc631c
JM
108892011-03-15 Jason Merrill <jason@redhat.com>
10890
10891 * c-common.c (max_constexpr_depth): New.
10892 * c-common.h: Declare it.
10893 * c-opts.c (c_common_handle_option): Set it.
10894 * c.opt (fconstexpr-depth): New option.
10895
1b9b91a6
JM
108962011-03-11 Jason Merrill <jason@redhat.com>
10897
f231b5ff
JM
10898 * c-common.c (attribute_takes_identifier_p): Add missing const.
10899
1b9b91a6
JM
10900 PR c++/46803
10901 * c-common.c (attribute_takes_identifier_p): Assume that an
10902 unknown attribute takes an identifier.
10903
a19e4d44
NF
109042011-03-07 Nathan Froyd <froydnj@codesourcery.com>
10905
10906 PR c/47786
10907 * c-common.c (c_type_hash): Call list_length instead of iterating
10908 through DECL_CHAIN. Rename 'i' to 'n_elements'.
10909
982d62f6
JJ
109102011-02-19 Jakub Jelinek <jakub@redhat.com>
10911
10912 PR c/47809
10913 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
10914
0a256240
NP
109152011-02-17 Iain Sandoe <iains@gcc.gnu.org>
10916
10917 * c.opt (fobjc-abi-version=) New.
10918 (fobjc-nilcheck): New.
10919
ba9e6dd5
NF
109202011-02-03 Nathan Froyd <froydnj@codesourcery.com>
10921
10922 PR c++/46890
10923 * c-common.h (keyword_is_decl_specifier): Declare.
10924 * c-common.c (keyword_is_decl_specifier): Define.
10925 (keyword_is_function_specifier): New function.
10926
7273813a
JJ
109272011-01-26 Jakub Jelinek <jakub@redhat.com>
10928
10929 PR c/47473
10930 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
10931 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
10932 REAL_TYPE.
10933
908ef79b
AC
109342011-01-26 Arnaud Charlet <charlet@adacore.com>
10935
10936 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
10937
237e9384
JJ
109382011-01-26 Jakub Jelinek <jakub@redhat.com>
10939
10940 PR pch/47430
10941 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
10942 after init_c_lex if pch_file is set.
10943
47ea1edf
DK
109442011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
10945
d4dba752 10946 PR c++/43601
47ea1edf
DK
10947 * c.opt (-fkeep-inline-dllexport): New switch.
10948
2aa9c6ae
RG
109492011-01-12 Richard Guenther <rguenther@suse.de>
10950
10951 PR middle-end/32511
10952 * c-common.c (handle_weak_attribute): Warn instead of error
10953 on declaring an inline function weak.
10954
7bd11157
TT
109552011-01-05 Tom Tromey <tromey@redhat.com>
10956
10957 * c-common.h (lvalue_error): Update.
10958 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
10959 not error.
10960
0e66e494 109612010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 10962
b4f588c4
NP
10963 PR objc/47075
10964 * c-objc.h (objc_finish_message_expr): Added argument to
10965 prototype.
10966
f4da8dce
NF
109672010-12-22 Nathan Froyd <froydnj@codesourcery.com>
10968
10969 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
10970 Use prototype_p.
10971
46270f14
NP
109722010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
10973
10974 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 10975 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 10976
4816c593
NF
109772010-12-10 Nathan Froyd <froydnj@codesourcery.com>
10978
10979 * c-common.h (readonly_error): Declare.
10980 * c-common.c (readonly_error): Define.
10981
7a6daeb0
NF
109822010-12-09 Nathan Froyd <froydnj@codesourcery.com>
10983
10984 * c-common.h (invalid_indirection_error): Declare.
10985 * c-common.c (invalid_indirection_error): Define.
10986
892f6119
RG
109872010-12-03 Richard Guenther <rguenther@suse.de>
10988
10989 PR c/46745
10990 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
10991 (pp_c_unary_expression): Likewise.
10992 (pp_c_expression): Likewise.
10993
6c39e757
NP
109942010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
10995
10996 * c-common.h (objc_finish_function): New.
10997 (objc_non_volatilized_type): Removed.
10998 (objc_type_quals_match): Removed.
10999 * stub-objc.c (objc_finish_function): New.
11000 (objc_non_volatilized_type): Removed.
11001 (objc_type_quals_match): Removed.
9faeb493 11002
7c475d11
JM
110032010-11-30 Joseph Myers <joseph@codesourcery.com>
11004
11005 * c-common.h (parse_optimize_options): Declare.
11006 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
11007 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
11008
71f3e391
JM
110092010-11-29 Joseph Myers <joseph@codesourcery.com>
11010
11011 * c-opts.c (check_deps_environment_vars): Use getenv instead of
11012 GET_ENVIRONMENT.
11013 * c-pch.c (O_BINARY): Don't define here.
11014 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
11015
d5fabb58
JM
110162010-11-25 Joseph Myers <joseph@codesourcery.com>
11017
11018 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
11019 targetm.except_unwind_info.
11020
299404a1
JM
110212010-11-23 Joseph Myers <joseph@codesourcery.com>
11022
11023 * c-opts.c (c_common_handle_option): Pass location to
11024 set_struct_debug_option.
11025
c98cd5bf
JM
110262010-11-23 Joseph Myers <joseph@codesourcery.com>
11027
11028 * c-common.c (visibility_options): Move from ../opts.c.
11029 * c-common.h (struct visibility_flags, visibility_options):
11030 Declare here.
11031 * c-opts.c (finish_options): Rename to c_finish_options.
11032 (c_common_init): Update call to finish_options.
11033
a9546771
NP
110342010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
11035
11036 PR objc/34033
11037 * c-lex.c (lex_string): Check that each string in an Objective-C
11038 string concat sequence starts with either one or zero '@', and
11039 that there are no spurious '@' signs at the end.
11040
24a57808
JM
110412010-11-20 Joseph Myers <joseph@codesourcery.com>
11042
11043 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
11044 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
11045 HANDLE_PRAGMA_VISIBILITY.
11046 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
11047 HANDLE_PRAGMA_VISIBILITY): Don't define.
11048 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
11049
a9aa2c3a
NF
110502010-11-20 Nathan Froyd <froydnj@codesourcery.com>
11051
11052 PR c++/16189
11053 PR c++/36888
11054 PR c++/45331
11055 * c-common.h (keyword_begins_type_specifier): Declare.
11056 (keyword_is_storage_class_specifier): Declare.
11057 (keyword_is_type_qualifier): Declare.
11058 * c-common.c (keyword_begins_type_specifier): New function.
11059 (keyword_is_storage_class_specifier): New function.
11060 (keyword_is_type_qualifier): Declare.
11061
5386338c
JM
110622010-11-19 Joseph Myers <joseph@codesourcery.com>
11063
11064 PR c/46547
11065 * c-common.c (in_late_binary_op): Define.
11066 (c_common_truthvalue_conversion): Check in_late_binary_op before
11067 calling c_save_expr.
11068 * c-common.h (in_late_binary_op): Declare.
11069
69ccdddb
JM
110702010-11-19 Joseph Myers <joseph@codesourcery.com>
11071
11072 * c-opts.c (c_common_handle_option): Update calls to
11073 set_struct_debug_option.
11074
6b192a09
NP
110752010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
11076
11077 * c-common.h (objc_declare_protocols): Added additional argument.
11078 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 11079
fb52b50a
NF
110802010-11-18 Nathan Froyd <froydnj@codesourcery.com>
11081
11082 PR c/33193
11083 * c-common.h (build_real_imag_expr): Declare.
11084 * c-semantics.c (build_real_imag_expr): Define.
11085
b37421c6
JM
110862010-11-17 Joseph Myers <joseph@codesourcery.com>
11087
11088 * c-opts.c (c_common_parse_file): Take no arguments.
11089 * c-common.h (c_common_parse_file): Update prototype.
11090
07078664
JJ
110912010-11-16 Jakub Jelinek <jakub@redhat.com>
11092
11093 PR c++/46401
11094 * c-common.c (warning_candidate_p): Don't track non-const calls
11095 or STRING_CSTs.
11096
c6a13190
ILT
110972010-11-15 Ian Lance Taylor <iant@google.com>
11098
11099 * c-lex.c (init_c_lex): Set macro debug callbacks if
11100 flag_dump_go_spec is set.
11101
925e8657
NP
111022010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
11103
11104 * c-common.h (objc_build_incr_expr_for_property_ref): New.
11105 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
11106
bb0a9581
NF
111072010-11-15 Nathan Froyd <froydnj@codesourcery.com>
11108
11109 PR preprocessor/45038
11110 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
11111 dialects.
11112
c5fa0890
JM
111132010-11-12 Joseph Myers <joseph@codesourcery.com>
11114
11115 * c-common.h (c_family_lang_mask): Declare.
11116 * c-opts.c (c_family_lang_mask): Make extern.
11117 * c-pragma.c (handle_pragma_diagnostic): Use
11118 control_warning_option.
11119
a4d8c676
JM
111202010-11-12 Joseph Myers <joseph@codesourcery.com>
11121
11122 * c-common.c (parse_optimize_options): Update call to
11123 decode_options.
11124 * c-common.h (c_common_handle_option): Update prototype.
11125 * c-opts.c (c_common_handle_option): Take location_t parameter and
11126 pass it to other functions.
11127
f954bd2c
JM
111282010-11-11 Joseph Myers <joseph@codesourcery.com>
11129
11130 * c-opts.c (warning_as_error_callback): Remove.
11131 (c_common_initialize_diagnostics): Don't call
11132 register_warning_as_error_callback.
11133 (c_common_handle_option): Handle -Werror=normalized= here.
11134
d8a07487
JM
111352010-11-10 Joseph Myers <joseph@codesourcery.com>
11136
11137 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
11138 in diagnostic.
11139 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
11140 letter.
11141 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
11142 Remove trailing '.' from diagnostics.
11143 * c.opt (Wwrite-strings_: Avoid '`' in help text.
11144
d5478783
JM
111452010-11-10 Joseph Myers <joseph@codesourcery.com>
11146
11147 * c-common.c (parse_optimize_options): Pass global_dc to
11148 decode_options.
11149 * c-opts.c (c_common_handle_option): Pass &global_options to
11150 set_Wstrict_aliasing.
11151 * c.opt (v): Don't mark Common or document here.
11152
91ebb981
IS
111532010-11-06 Iain Sandoe <iains@gcc.gnu.org>
11154
11155 PR target/44981
11156 * c-format.c (format_type): New type gcc_objc_string_format_type.
11157 (valid_stringptr_type_p): New.
11158 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 11159 (check_format_string): Pass expected type, use
91ebb981
IS
11160 valid_stringptr_type_p (), check that the format string types are
11161 consistent with the format specification.
11162 (decode_format_attr): Warn if NSString is used outside objective-c.
11163 (format_types_orig): Add NSString.
11164 (format_name): New.
11165 (format_flags): New.
11166 (check_format_arg): Handle format strings requiring an external parser.
11167 first_target_format_type: New variable.
11168 (handle_format_attribute): Set up first_target_format_type, pass the
11169 expected format arg string type to check_format_string().
ab20d992 11170 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
91ebb981
IS
11171 * stub-objc.c (objc_string_ref_type_p): New.
11172 (objc_check_format_arg): New.
11173
bede2adc
NP
111742010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
11175
9faeb493 11176 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
11177 * c-common.h (objc_build_class_component_ref): New.
11178 * stub-objc.c (objc_build_class_component_ref): New.
11179
9a179d01
NP
111802010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
11181
11182 * c.opt (Wproperty-assign-default): New option.
11183
22d8d616
NP
111842010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
11185
11186 Implemented -fobjc-std=objc1 flag.
11187 * c.opt (fobjc-std=objc1): New option.
11188
2debdb4f
NP
111892010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
11190
11191 Implemented format and noreturn attributes for Objective-C methods.
11192 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
11193 attribute for Objective-C methods.
11194
ec52b111
JM
111952010-10-31 Jason Merrill <jason@redhat.com>
11196
11197 * c-common.c (conversion_warning, warn_for_collisions_1): Use
11198 EXPR_LOC_OR_HERE.
11199
46a88c12
NP
112002010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
11201
11202 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
11203 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
11204 (objc_add_property_declaration): Removed arguments for copies and
11205 ivar.
11206 (objc_build_getter_call): Renamed to
11207 objc_maybe_build_component_ref.
11208 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
11209 (objc_is_property_ref): New.
11210 * c-common.c (c_common_reswords): Removed copies and ivar.
11211 * stub-objc.c (objc_add_property_declaration): Removed arguments
11212 for copies and ivar.
11213 (objc_build_getter_call): Renamed to
11214 objc_maybe_build_component_ref.
11215 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
11216 (objc_is_property_ref): New.
9faeb493 11217
1e4bf85b
AC
112182010-10-29 Arnaud Charlet <charlet@adacore.com>
11219 Matthew Gingell <gingell@adacore.com>
11220
11221 * c-ada-spec.c (separate_class_package): New function.
11222 (pp_ada_tree_identifier): Prefix references to C++ classes with the
11223 name of their enclosing package.
11224 (print_ada_declaration): Use separate_class_package.
11225
81f0bab2
JM
112262010-10-27 Jason Merrill <jason@redhat.com>
11227
2b08f2c5
JM
11228 * c-common.c (c_common_reswords): Add __is_literal_type.
11229 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
11230
81f0bab2
JM
11231 * c-common.c (check_case_value): Remove special C++ code.
11232
200290f2
NP
112332010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
11234
11235 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
11236 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
11237 and RID_LAST_PATTR.
11238 (objc_add_property_declaration): Added additional arguments.
11239 (objc_property_attribute_kind): Removed.
11240 (objc_set_property_attr): Removed.
11241 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
11242 copy and nonatomic.
11243 * stub-objc.c (objc_add_property_declaration): Added additional
11244 arguments.
11245 (objc_set_property_attr): Removed.
9faeb493 11246
f614132b
NP
112472010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
11248
11249 * c-common.h (objc_add_property_variable): Renamed to
11250 objc_add_property_declaration. Added location argument.
11251 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 11252
b8a18805
NP
112532010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
11254
11255 * c-common.h (objc_maybe_printable_name): New.
11256 * stub-objc.c (objc_maybe_printable_name): New.
11257
3f8257db
JJ
112582010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
11259 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
11260
11261 * c-common.h (c_common_mark_addressable_vec): Declare.
11262 * c-common.c (c_common_mark_addressable_vec): New function.
11263
249a82c4
NP
112642010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
11265
11266 * c-common.h (objc_set_method_type): Removed.
11267 (objc_add_method_declaration): Added boolean argument.
11268 (objc_start_method_definition): Same change.
11269 (objc_build_method_signature): Same change.
11270 * stub-objc.c (objc_set_method_type): Removed.
11271 (objc_add_method_declaration): Added boolean argument.
11272 (objc_start_method_definition): Same change.
11273 (objc_build_method_signature): Same change.
11274
977e30bc
NP
112752010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
11276
11277 * c-common.h (finish_file): Removed.
11278 (objc_write_global_declarations): New.
11279 * c-opts.c (c_common_parse_file): Do not call finish_file.
11280 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 11281
da57d1b9
NP
112822010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
11283
11284 Implemented parsing @synthesize and @dynamic for
11285 Objective-C/Objective-C++.
11286 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
11287 (objc_add_synthesize_declaration): New.
11288 (objc_add_dynamic_declaration): New.
11289 * c-common.c (c_common_reswords): Add synthesize and dynamic.
11290 * stub-objc.c (objc_add_synthesize_declaration): New.
11291 (objc_add_dynamic_declaration): New.
9faeb493 11292
0069111f
MM
112932010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
11294
11295 PR target/46041
11296 * c-cppbuiltin.c (mode_has_fma): Move function here from
11297 builtins.c. Don't use the fma optab, instead just use the
11298 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
11299 using -save-temps.
11300
e426b47b
NP
113012010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
11302
11303 Merge from 'apple/trunk' branch on FSF servers.
0069111f 11304
3f8257db 11305 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 11306
9faeb493 11307 Radar 4330422
e426b47b
NP
11308 * c-common.h (objc_non_volatilized_type): New declaration
11309 * stub-objc.c (objc_non_volatilized_type): New stub.
11310
90fbfdc3
NP
113112010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
11312
e426b47b 11313 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 11314
ab20d992 11315 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 11316
9faeb493 11317 Radar 4133425
90fbfdc3 11318 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 11319 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 11320
c37d8c30
IS
113212010-10-17 Iain Sandoe <iains@gcc.gnu.org>
11322
11323 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
11324 * c-common.h (enum rid): Add RID_AT_PACKAGE.
11325 (objc_ivar_visibility_kind): New enum.
11326 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 11327 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
11328 visibility enum.
11329
1b1562a5
MM
113302010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
11331
11332 * c-cppbuiltin.c (builtin_define_float_constants): Emit
11333 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
11334 has the appropriate fma builtins.
11335 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
11336
668ea4b1
IS
113372010-10-14 Iain Sandoe <iains@gcc.gnu.org>
11338
1b1562a5 11339 merge from FSF apple 'trunk' branch.
3f8257db 11340 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 11341
668ea4b1
IS
11342 Radars 4436866, 4505126, 4506903, 4517826
11343 * c-common.c (c_common_resword): Define @property and its attributes.
11344 * c-common.h: Define property attribute enum entries.
11345 (OBJC_IS_PATTR_KEYWORD): New.
11346 (objc_property_attribute_kind): New enum.
11347 Declare objc_set_property_attr (), objc_add_property_variable (),
11348 objc_build_getter_call () and objc_build_setter_call ().
11349 * stub-objc.c (objc_set_property_attr): New stub.
11350 (objc_add_property_variable): Likewise.
11351 (objc_build_getter_call): Likewise.
11352 (objc_build_setter_call) Likewise.
1b1562a5 11353
a1178b30
IS
113542010-10-13 Iain Sandoe <iains@gcc.gnu.org>
11355
1b1562a5 11356 merge from FSF apple 'trunk' branch.
ab20d992 11357 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
11358
11359 Radar 3803157 (method attributes)
11360 * c-common.c (handle_deprecated_attribute): Recognize
11361 objc methods as valid declarations.
11362 * c-common.h: Declare objc_method_decl ().
1b1562a5 11363 * stub-objc.c (objc_method_decl): New stub.
a1178b30 11364
a75bfaa6
JM
113652010-10-08 Joseph Myers <joseph@codesourcery.com>
11366
11367 * c-common.c (parse_optimize_options): Call
11368 decode_cmdline_options_to_array_default_mask before
11369 decode_options. Update arguments to decode_options.
11370 * c-common.h (c_common_init_options_struct): Declare.
11371 * c-opts.c (c_common_init_options_struct): New. Split out from
11372 c_common_init_options.
11373
f05b9d93
NP
113742010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
11375
11376 Implemented fast enumeration for Objective-C.
11377 * c-common.h (objc_finish_foreach_loop): New.
11378 * stub-objc.c (objc_finish_foreach_loop): New.
11379
1ebe4b4f
JM
113802010-10-05 Joseph Myers <joseph@codesourcery.com>
11381
11382 * c-common.h (struct diagnostic_context): Don't declare here.
11383 (c_common_initialize_diagnostics): Declare using
11384 diagnostic_context typedef.
11385 * c-opts.c (c_common_handle_option): Pass global_dc to
11386 handle_generated_option.
11387
d4d24ba4
JM
113882010-10-04 Joseph Myers <joseph@codesourcery.com>
11389
11390 * c-opts.c (c_common_handle_option): Pass &global_options_set to
11391 handle_generated_option.
11392
478a1c5b
ILT
113932010-10-03 Ian Lance Taylor <iant@google.com>
11394
11395 * c.opt (-fplan9-extensions): New option.
11396
82a1c2fe
FXC
113972010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
11398
11399 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
11400 Remove.
11401 (c_cpp_builtins): Call functions from cppbuiltin.c instead
11402 of duplicating code.
11403
92902b1b
IS
114042010-09-30 Iain Sandoe <iains@gcc.gnu.org>
11405
11406 * c-common.c: Add two new entries for @optional
11407 and @required keywords.
11408
11409 merge from FSF 'apple/trunk' branch.
3f8257db 11410 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
11411
11412 Radar 4386773
11413 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
11414 objective-c keywords.
11415 (objc_set_method_opt): New declaration.
11416 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 11417
46625112
JM
114182010-09-30 Joseph Myers <joseph@codesourcery.com>
11419
11420 * c-common.c (handle_optimize_attribute): Pass &global_options to
11421 cl_optimization_save and cl_optimization_restore.
11422 * c-opts.c (c_common_handle_option): Pass &global_options to
11423 handle_generated_option.
11424 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
11425 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
11426 &global_options to cl_optimization_restore.
11427
49b91f05
NP
114282010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
11429
11430 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
11431 Objective-C/Objective-C++ keywords.
11432
13ed556f 114332010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 11434
9faeb493
UB
11435 Merge from 'apple/trunk' branch on FSF servers.
11436
3f8257db 11437 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
11438
11439 Radar 4281748
11440 * c-common.h (objc_check_global_decl): New declaration.
11441 * stub-objc.c (objc_check_global_decl): New stub.
11442
f0036cca
JM
114432010-09-29 Joseph Myers <joseph@codesourcery.com>
11444
11445 * c.opt: Don't use VarExists.
11446
e3339d0f
JM
114472010-09-29 Joseph Myers <joseph@codesourcery.com>
11448
11449 * c-common.c (c_cpp_error): Update names of diagnostic_context
11450 members.
11451 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
11452 cl_optimization members.
11453 * c-opts.c (warning_as_error_callback, c_common_handle_option,
11454 sanitize_cpp_opts, finish_options): Update names of cpp_options
11455 members.
11456
1973201f
NP
114572010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
11458
11459 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
11460 (objc_is_reserved_word): Removed.
11461 * c-common.c: Updated comments.
11462 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
11463 objc_is_reserved_word.
11464 * stub-objc.c (objc_is_reserved_word): Removed.
11465
f7e71da5
IS
114662010-09-28 Iain Sandoe <iains@gcc.gnu.org>
11467
9faeb493 11468 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
11469 include attributes.
11470 (objc_start_method_definition): Likewise.
11471 (objc_build_keyword_decl): Likewise.
11472 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
11473 (objc_start_method_definition): Likewise.
11474 (objc_build_keyword_decl): Likewise.
11475
c165dca7
IS
114762010-09-28 Iain Sandoe <iains@gcc.gnu.org>
11477
11478 * c-common.h (objc_start_class_interface): Adjust prototype.
11479 (objc_start_category_interface): Likewise.
11480 (objc_start_protocol): Likewise.
11481 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
11482 (objc_start_class_interface): Likewise.
11483 (objc_start_category_interface): Likewise.
11484
7458026b
ILT
114852010-09-27 Ian Lance Taylor <iant@google.com>
11486
11487 * c-common.c (c_common_attribute_table): Add no_split_stack.
11488 (handle_no_split_stack_attribute): New static function.
11489
b581b85b
NP
114902010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
11491
9faeb493 11492 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 11493
3f8257db 11494 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 11495
9faeb493 11496 Radar 4229905
b581b85b
NP
11497 * c-common.h (objc_have_common_type): New declaration.
11498 * stub-objc.c (objc_have_common_type): New stub.
11499
11500 2005-06-22 Ziemowit Laski <zlaski@apple.com>
11501
11502 Radar 4154928
11503 * c-common.h (objc_common_type): New prototype.
9faeb493 11504 * stub-objc.c (objc_common_type): New stub.
b581b85b 11505
46a4da10
JH
115062010-09-24 Jan Hubicka <jh@suse.cz>
11507
11508 * c-common.c (handle_leaf_attribute): New function.
11509 (struct attribute_spec c_common_att): Add leaf.
11510
e200444e
JM
115112010-09-22 Joseph Myers <joseph@codesourcery.com>
11512
11513 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
11514 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
11515 -dump, -dump=, -imacros, -imacros=, -include, -include=,
11516 -include-barrier, -include-directory, -include-directory=,
11517 -include-directory-after, -include-directory-after=,
11518 -include-prefix, -include-prefix=, -include-with-prefix,
11519 -include-with-prefix=, -include-with-prefix-after,
11520 -include-with-prefix-after=, -include-with-prefix-before,
11521 -include-with-prefix-before=, -no-integrated-cpp,
11522 -no-line-commands, -no-standard-includes, -no-warnings, -output,
11523 -output=, -pedantic, -pedantic-errors, -preprocess,
11524 -print-missing-file-dependencies, -trace-includes, -traditional,
11525 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
11526 -user-dependencies, -verbose, -write-dependencies,
11527 -write-user-dependencies, no-integrated-cpp, traditional): New.
11528
29a80ea6
NP
115292010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
11530
11531 PR objc/23710
ac1fc2fc
NP
11532 * c-common.h (objc_start_method_definition): Return bool instead
11533 of void.
11534 * stub-objc.c (objc_start_method_definition): Return bool instead
11535 of void.
11536
115372010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
11538
11539 PR objc/25965
11540 * c-common.h (objc_get_interface_ivars): New declaration.
11541 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 11542
de621752
ILT
115432010-09-15 Ian Lance Taylor <iant@google.com>
11544
11545 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 11546 messages. Remove period at end of warning message.
de621752 11547
ba885ec5
NS
115482010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11549
11550 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
11551 (handle_alias_attribute): ... here.
11552 (handle_ifunc_attribute): New.
11553
c5ee1358
MM
115542010-09-06 Mark Mitchell <mark@codesourcery.com>
11555
11556 * c-common.h (do_warn_double_promotion): Declare.
11557 * c-common.c (do_warn_double_promotion): Define.
11558
0a0b3574
MM
115592010-09-05 Mark Mitchell <mark@codesourcery.com>
11560
11561 * c.opt (Wdouble-promotion): New.
11562
d1779886
JM
115632010-09-02 Joseph Myers <joseph@codesourcery.com>
11564
11565 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
11566 fvtable-thunks, fxref): Mark no longer supported in help text.
11567
2d2bd949
JM
115682010-09-02 Joseph Myers <joseph@codesourcery.com>
11569
11570 * c.opt (Wimport, fall-virtual, falt-external-templates,
11571 fdefault-inline, fenum-int-equiv, fexternal-templates,
11572 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
11573 fname-mangling-version-, fnew-abi, fnonnull-objects,
11574 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
11575 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
11576 applicable.
11577 (fhandle-exceptions): Mark with Alias and Warn.
11578 * c-opts.c (c_common_handle_option): Don't handle options marked
11579 as ignored.
11580
5de8299c
JM
115812010-09-02 Joseph Myers <joseph@codesourcery.com>
11582
11583 * c.opt (Wcomments, Werror-implicit-function-declaration,
11584 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
11585 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
11586 aliases.
11587 * c-common.c (option_codes): Use OPT_Wcomment instead of
11588 OPT_Wcomments.
11589 * c-opts.c (warning_as_error_callback, c_common_handle_option):
11590 Don't handle options marked as aliases.
11591
0ceb0201
RG
115922010-08-25 Richard Guenther <rguenther@suse.de>
11593
11594 * c-common.c (c_common_get_alias_set): Remove special
11595 handling for pointers.
11596
ac47786e
NF
115972010-08-20 Nathan Froyd <froydnj@codesourcery.com>
11598
11599 * c-common.c: Use FOR_EACH_VEC_ELT.
11600 * c-gimplify.c: Likewise.
11601 * c-pragma.c: Likewise.
11602
c878765b
JM
116032010-08-16 Joseph Myers <joseph@codesourcery.com>
11604
11605 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
11606 RejectDriver.
11607 (MMDX): Change back to MMD. Mark NoDriverArg instead of
11608 RejectDriver.
11609 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
11610 instead of OPT_MDX and OPT_MMDX.
11611
603349bf
JM
116122010-08-16 Joseph Myers <joseph@codesourcery.com>
11613
11614 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
11615
644fa7ac
JM
116162010-08-12 Joseph Myers <joseph@codesourcery.com>
11617
11618 * c.opt (MD, MMD): Change to MDX and MMDX.
11619 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
11620
481e1176
JM
116212010-08-11 Joseph Myers <joseph@codesourcery.com>
11622
11623 * c-opts.c (c_common_handle_option): Call handle_generated_option
11624 instead of handle_option.
11625
ac8dc9f7
NF
116262010-08-08 Nathan Froyd <froydnj@codesourcery.com>
11627
11628 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
11629 (maybe_apply_renaming_pragma): Delete unneeded declarations.
11630
4f8c876d
NF
116312010-08-08 Nathan Froyd <froydnj@codesourcery.com>
11632
11633 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
11634 (pending_redefine_extname): Change type to a VEC.
11635 (add_to_renaming_pragma_list): Update for new type of
11636 pending_redefine_extname.
ac8dc9f7 11637 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 11638
3b0c690e
AC
116392010-08-04 Arnaud Charlet <charlet@adacore.com>
11640
11641 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
11642 visited.
11643 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
11644 decide whether a type has already been declared/seen.
11645 Do not go to the original type.
11646 (dump_nested_types): New parameter forward.
11647 Generate forward declaration if needed and mark type as visited.
11648 (print_ada_declaration): Call dump_nested_types if not already done.
11649 Mark types as visited.
11650
1890bccc
JM
116512010-08-03 Joseph Myers <joseph@codesourcery.com>
11652
11653 * c.opt (-print-pch-checksum): Remove option.
11654 * c-opts.c (c_common_handle_option): Don't handle
11655 OPT_print_pch_checksum.
11656
5f20c657
JM
116572010-07-27 Joseph Myers <joseph@codesourcery.com>
11658
11659 * c-common.h (c_common_handle_option): Update prototype and return
11660 value type.
11661 * c-opts.c (c_common_handle_option): Update prototype and return
11662 value type. Update calls to handle_option and
11663 enable_warning_as_error.
11664
f551f80c
JJ
116652010-07-27 Jakub Jelinek <jakub@redhat.com>
11666
11667 PR c/45079
11668 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
11669
61ff2bdc
JM
116702010-07-27 Joseph Myers <joseph@codesourcery.com>
11671
11672 * c-common.h (c_common_missing_argument): Remove.
11673 * c-opts.c (c_common_missing_argument): Remove.
11674 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
11675 idirafter, imacros, include, isysroot, isystem, iquote): Add
11676 MissingArgError.
11677 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
11678
7a9bf9a4
JM
116792010-07-27 Joseph Myers <joseph@codesourcery.com>
11680
11681 * c-common.h (c_common_option_lang_mask,
11682 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
11683 New.
11684 (c_common_init_options): Update prototype.
11685 * c-opts.c (c_common_option_lang_mask): New.
11686 (c_common_initialize_diagnostics): Split out of
11687 c_common_init_options.
11688 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
11689 New.
11690 (c_common_init_options): Update prototype. Use decoded options in
11691 search for -lang-asm.
11692
910ad8de
NF
116932010-07-15 Nathan Froyd <froydnj@codesourcery.com>
11694
11695 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
11696 * c-format.c: Likewise.
11697
718f9c0f
MLI
116982010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
11699
11700 * c-common.h: Include diagnostic-core.h. Error if already
11701 included.
11702 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
11703
4d451982
MLI
117042010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
11705
adfac8df 11706 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
11707 Do not include expr.h
11708 (vector_mode_valid_p): Move here.
11709
119fe915
SB
117102010-06-21 DJ Delorie <dj@redhat.com>
11711
11712 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
11713 allow these pragmas anywhere.
11714
117152010-06-14 Jakub Jelinek <jakub@redhat.com>
11716
11717 PR bootstrap/44509
11718 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
11719 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
11720 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
11721 ggc_strdup instead of xstrdup.
11722
117232010-06-10 Jakub Jelinek <jakub@redhat.com>
11724
11725 * c-cppbuiltin.c: Include cpp-id-data.h.
11726 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
11727 (lazy_hex_fp_value): New function.
11728 (builtin_define_with_hex_fp_value): Provide definitions lazily.
11729
6662d794
MLI
117302010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11731
11732 * c-gimplify.c: Do not include tree-flow.h
11733
38f8b050
JR
117342010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
11735
11736 PR other/44034
11737 * c-common.c: Rename targetm member:
11738 targetm.enum_va_list -> targetm.enum_va_list_p
11739
9589f23e
AS
117402010-06-28 Anatoly Sokolov <aesok@post.ru>
11741
11742 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
11743
3b06d379
SB
117442010-06-28 Steven Bosscher <steven@gcc.gnu.org>
11745
11746 * c-cppbuiltin.c: Do not include except.h.
11747
d166d4c3
AK
117482010-06-24 Andi Kleen <ak@linux.intel.com>
11749
9faeb493
UB
11750 * c-common.c (warn_for_omitted_condop): New.
11751 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 11752
70cb8be6
JM
117532010-06-21 Joseph Myers <joseph@codesourcery.com>
11754
11755 * c.opt (lang-objc): Remove.
11756 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
11757
a4c97feb
JR
117582010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
11759
11760 * c-opts.c: Include "tm_p.h".
11761
6e2f1956
JM
117622010-06-20 Joseph Myers <joseph@codesourcery.com>
11763
11764 * c-common.c (parse_optimize_options): Update call to
11765 decode_options.
11766
bc87224e
NF
117672010-06-18 Nathan Froyd <froydnj@codesourcery.com>
11768
11769 * c-common.c (record_types_used_by_current_var_decl): Adjust for
11770 new type of types_used_by_cur_var_decl.
11771
b49cf425
JR
117722010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
11773
11774 PR bootstrap/44512
11775 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
11776 for C++ standard compliance.
11777
59f9c2ed
JM
117782010-06-16 Jason Merrill <jason@redhat.com>
11779
11780 * c.opt: Add -Wnoexcept.
11781
33766b66
RG
117822010-06-16 Richard Guenther <rguenther@suse.de>
11783
11784 PR c/44555
11785 * c-common.c (c_common_truthvalue_conversion): Remove
11786 premature and wrong optimization concering ADDR_EXPRs.
11787
eff7e30c
AC
117882010-06-15 Arnaud Charlet <charlet@adacore.com>
11789
11790 * c-ada-spec.c (dump_sloc): Remove column info.
11791 (is_simple_enum): New function.
11792 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
11793 enum types when relevant.
11794
6312e84d
MLI
117952010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
11796
9faeb493 11797 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
11798 location.
11799
1cb42611
JM
118002010-06-10 Joseph Myers <joseph@codesourcery.com>
11801
11802 * c-opts.c (c_common_handle_option): Don't handle
11803 OPT_fshow_column.
11804
a9429e29
LB
118052010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
11806
11807 * c-pragma.c (push_alignment): Use typed GC allocation.
11808 (handle_pragma_push_options): Likewise.
11809
11810 * c-common.c (parse_optimize_options): Likewise.
11811
11812 * c-common.h (struct sorted_fields_type): Add variable_size GTY
11813 option.
11814
5498f011
JM
118152010-06-07 Joseph Myers <joseph@codesourcery.com>
11816
11817 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
11818 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
11819 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
11820 flag_signed_bitfields, warn_strict_null_sentinel,
11821 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
11822 flag_gen_declaration, flag_no_gnu_keywords,
11823 flag_implement_inlines, flag_implicit_templates,
11824 flag_implicit_inline_templates, flag_optional_diags,
11825 flag_elide_constructors, flag_default_inline, flag_rtti,
11826 flag_conserve_space, flag_access_control, flag_check_new,
11827 flag_new_for_scope, flag_weak, flag_working_directory,
11828 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
11829 flag_enforce_eh_specs, flag_threadsafe_statics,
11830 flag_pretty_templates): Remove.
11831 * c-common.h (flag_preprocess_only, flag_nil_receivers,
11832 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
11833 flag_replace_objc_classes, flag_undef, flag_no_builtin,
11834 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
11835 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
11836 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
11837 flag_no_gnu_keywords, flag_implement_inlines,
11838 flag_implicit_templates, flag_implicit_inline_templates,
11839 flag_optional_diags, flag_elide_constructors, flag_default_inline,
11840 flag_rtti, flag_conserve_space, flag_access_control,
11841 flag_check_new, flag_new_for_scope, flag_weak,
11842 flag_working_directory, flag_use_cxa_atexit,
11843 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
11844 flag_threadsafe_statics, flag_pretty_templates,
11845 warn_strict_null_sentinel): Remove.
11846 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
11847 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
11848 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
11849 fimplicit-inline-templates, fimplicit-templates,
11850 flax-vector-conversions, fms-extensions, fnil-receivers,
11851 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
11852 frtti, fshort-double, fshort-enums, fshort-wchar,
11853 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
11854 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
11855 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
11856 gen-decls, undef): Use Var.
11857 (fdefault-inline, foptional-diags): Document as doing nothing.
11858 * c-opts.c (c_common_handle_option): Remove cases for options now
11859 using Var. Mark ignored options as such.
11860
39dabefd
SB
118612010-06-05 Steven Bosscher <steven@gcc.gnu.org>
11862
9faeb493 11863 * c-common.c: Moved to here from parent directory.
39dabefd
SB
11864 * c-common.def: Likewise.
11865 * c-common.h: Likewise.
11866 * c-cppbuiltin.c: Likewise.
11867 * c-dump.c: Likewise.
11868 * c-format.c: Likewise.
11869 * c-format.h : Likewise.
11870 * c-gimplify.c: Likewise.
11871 * c-lex.c: Likewise.
11872 * c-omp.c: Likewise.
11873 * c.opt: Likewise.
11874 * c-opts.c: Likewise.
11875 * c-pch.c: Likewise.
11876 * c-ppoutput.c: Likewise.
11877 * c-pragma.c: Likewise.
11878 * c-pragma.h: Likewise.
11879 * c-pretty-print.c: Likewise.
11880 * c-pretty-print.h: Likewise.
11881 * c-semantics.c: Likewise.
11882 * stub-objc.c: Likewise.
11883
11884 * c-common.c: Include gt-c-family-c-common.h.
11885 * c-pragma.c: Include gt-c-family-c-pragma.h.
11886\f
c48514be 11887Copyright (C) 2010-2021 Free Software Foundation, Inc.
39dabefd
SB
11888
11889Copying and distribution of this file, with or without modification,
11890are permitted in any medium without royalty provided the copyright
11891notice and this notice are preserved.